The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=15752 
====================================================================== 
Reported By:                danblack
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15752
Category:                   CPack
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-09-20 05:00 EDT
Last Modified:              2015-09-20 05:00 EDT
====================================================================== 
Summary:                    CPackRPM leave @PROTECTED_AT@ in rpm spec
Description: 
Related issue where patch was introduced
http://public.kitware.com/Bug/view.php?id=14063

diff -u _CPack_Packages/Linux/RPM/SPECS/MariaDB-server.spec.in
_CPack_Packages/Linux/RPM/SPECS/MariaDB-server.spec

-@CPACK_RPM_INSTALL_FILES@
-@CPACK_RPM_ABSOLUTE_INSTALL_FILES@
-@CPACK_RPM_USER_INSTALL_FILES@
+%dir "/etc/my.cnf.d"
+"/usr/sbin/rcmysql"
+"/usr/sbin/mysqld"
+%dir "/usr/lib/systemd"
+%dir "/usr/lib/systemd/system"
+%dir "/usr/lib/systemd/system/mariadb@PROTECTED_AT@bootstrap.service.d"


Steps to Reproduce: 
1. CMakeLists.txt
    INSTALL(FILES
      ${CMAKE_CURRENT_SOURCE_DIR}/mariadb-bootstrap.conf
      DESTINATION ${SYSTEMD_SYSTEM_CONFDIR}/mariadb@bootstrap.service.d/
COMPONENT Server
    )
2. 

error: Directory not found:
/home/dan/software_projects/mariadb-server/_CPack_Packages/Linux/RPM/MariaDB-10.1.8-centos5-x86_64/server/usr/lib/systemd/system/mariadb@PROTECTED_AT@bootstrap.service.d
    Directory not found:
/home/dan/software_projects/mariadb-server/_CPack_Packages/Linux/RPM/MariaDB-10.1.8-centos5-x86_64/server/usr/lib/systemd/system/mariadb@PROTECTED_AT@bootstrap.service.d

...
CPack Error: Error when generating package: MariaDB
Makefile:96: recipe for target 'package' failed
make: *** [package] Error 1


Additional Information: 
patch

--- /usr/share/cmake/Modules/CPackRPM.cmake.orig        2015-09-20
16:58:41.218835125 +1000
+++ /usr/share/cmake/Modules/CPackRPM.cmake     2015-09-20 18:42:52.023543458
+1000
@@ -1184,6 +1184,7 @@
 #  - either because the user asked for it :
CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
 #  - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE
 if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT
CPACK_RPM_USER_BINARY_SPECFILE)
+   string(REPLACE "\@PROTECTED_AT\@" "@" CPACK_RPM_INSTALL_FILES
"${CPACK_RPM_INSTALL_FILES}")
    file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in
       "# -*- rpm-spec -*-
 BuildRoot:     
\@CPACK_RPM_DIRECTORY\@/\@CPACK_PACKAGE_FILE_NAME\@\@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH\@

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-09-20 05:00 danblack       New Issue                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to