MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0013898 | CMake | CPack | public | 2013-02-07 19:15 | 2013-07-01 09:37 |
Reporter | Jonathan M Davis | ||||
Assigned To | Eric NOULARD | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | Linux | OS Version | ||
Product Version | CMake 2.8.10.2 | ||||
Target Version | Fixed in Version | ||||
Summary | 0013898: cpack fails to use some CPACK_RPM_PACKAGE_* variables in the generated rpm spec if their value is less than 3 characters long | ||||
Description | If you do set(CPACK_RPM_PACKAGE_AUTOREQPROV 0) or set(CPACK_RPM_PACKAGE_AUTOREQPROV no), when using the RPM generator for cpack, it has no effect on the RPM spec file which is generated. However, if you do set(CPACK_RPM_PACKAGE_AUTOREQPROV " no") or set(CPACK_RPM_PACKAGE_AUTOREQPROV "no "), then it works. Looking through CPackRPM.cmake, I suspect that it has to do with this section at line 480: ---------------- if(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP) string(LENGTH ${_RPM_SPEC_HEADER} _PACKAGE_HEADER_STRLENGTH) math(EXPR _PACKAGE_HEADER_STRLENGTH "${_PACKAGE_HEADER_STRLENGTH} - 1") string(SUBSTRING ${_RPM_SPEC_HEADER} 1 ${_PACKAGE_HEADER_STRLENGTH} _PACKAGE_HEADER_TAIL) string(TOLOWER "${_PACKAGE_HEADER_TAIL}" _PACKAGE_HEADER_TAIL) string(SUBSTRING ${_RPM_SPEC_HEADER} 0 1 _PACKAGE_HEADER_NAME) set(_PACKAGE_HEADER_NAME "${_PACKAGE_HEADER_NAME}${_PACKAGE_HEADER_TAIL}") if(CPACK_RPM_PACKAGE_DEBUG) message("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}") endif() set(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}") else() # Do not forget to unset previously set header (from previous component) unset(TMP_RPM_${_RPM_SPEC_HEADER}) endif() ---------------- and I expect that it affects every variable which is looped over and hits that code: ---------------- foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLICTS AUTOPROV AUTOREQ AUTOREQPROV) ---------------- but I've only tested it with CPACK_RPM_PACKAGE_AUTOREQPROV. I've also only tested it with a library target. | ||||
Steps To Reproduce | 1. Use set(CPACK_RPM_PACKAGE_AUTOREQPROV 0) or set(CPACK_RPM_PACKAGE_AUTOREQPROV no) as part of setting up cpack for generating RPMs in cmake. 2. Use make package to generate the RPM. 3. Run "rpm -qRp filename.rpm" on your rpm, and it will print out the list of stuff in the Required field of the RPM. It should have a very short list of items with no .so files included. Instead, it lists all of the .so files that your program or library requires; stuff like libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.7)(64bit) | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2013-02-07 19:15 | Jonathan M Davis | New Issue | |||
2013-02-08 04:39 | Eric NOULARD | Note Added: 0032219 | |||
2013-02-08 04:39 | Eric NOULARD | Assigned To | => Eric NOULARD | ||
2013-02-08 04:39 | Eric NOULARD | Status | new => assigned | ||
2013-02-08 04:48 | Jonathan M Davis | Note Added: 0032220 | |||
2013-02-09 07:44 | Eric NOULARD | Note Added: 0032244 | |||
2013-02-09 07:44 | Eric NOULARD | Status | assigned => resolved | ||
2013-02-09 07:44 | Eric NOULARD | Resolution | open => fixed | ||
2013-07-01 09:37 | Robert Maynard | Note Added: 0033418 | |||
2013-07-01 09:37 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|