MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0009872 | CMake | CPack | public | 2009-11-09 14:39 | 2009-11-28 17:17 |
Reporter | hellerf | ||||
Assigned To | Eric NOULARD | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | CMake-2-8 | ||||
Target Version | Fixed in Version | CMake-2-8 | |||
Summary | 0009872: CPackRPM does not work with rpmbuild version 4.7.1 (patch included) | ||||
Description | Thank you very much for CMake--I love it. ===recreate=== 1. Get rpmbuild 4.7.1 (distributed with Fedora Core 11) 2. Get lastest CVS of CMake and build, install 3. Create a CMakeLists.txt that installs a target and specifies just enough CPack info to generate an RPM (example attached) 4. cmake . 5. make 6. cpack -V -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM ===discussion and patch=== I need to build RPMs using CPack. This worked using rpmbuild 4.4.2.1 and the latest CVS version of CMake. But when I installed rpmbuild 4.7.1 I found that, prior to the %install phase, rpmbuild clears your entire buildroot directory and cpack fails. This is problematic, as CMake does not build the buildroot directory after %install. See http://osdir.com/ml/fedora-packaging/2009-09/msg00001.html [^] for a full discussion. My patch is basically stolen from http://cvs.fedoraproject.org/viewvc/rpms/kernel/F-12/kernel.spec?revision=1.1913&view=co [^] The point of the patch is to override the build stage that clears the buildroot directory =================================================================== RCS file: /cvsroot/CMake/CMake/Modules/CPackRPM.cmake,v retrieving revision 1.14 diff -u -r1.14 CPackRPM.cmake --- CPackRPM.cmake 28 Sep 2009 15:46:50 -0000 1.14 +++ CPackRPM.cmake 9 Nov 2009 17:36:47 -0000 @@ -318,7 +318,9 @@ %define _topdir ${CPACK_RPM_DIRECTORY} ${TMP_RPM_SPEC_INSTALL_POST} ${CPACK_RPM_SPEC_MORE_DEFINE} - +# rpmbuild 4.7+ will remove the buildroot dir during pre-install +%global __spec_install_pre %{___build_pre} + %description ${CPACK_RPM_PACKAGE_DESCRIPTION} This patch allows me to generate RPMs on Fedora Core 11 with rpmbuild 4.7.1. | ||||
Steps To Reproduce | |||||
Additional Information | I found the culprit to be /usr/lib/rpm/redhat/macros where the __spec_install_pre does the following: #============================================================================== # ---- Build policy macros. # # #--------------------------------------------------------------------- # Expanded at beginning of %install scriptlet. # %__spec_install_pre %{___build_pre}\ [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"\ mkdir -p `dirname "$RPM_BUILD_ROOT"`\ mkdir "$RPM_BUILD_ROOT"\ %{nil} | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | CMakeLists.txt (372) 2009-11-09 14:39 https://public.kitware.com/Bug/file/2643/CMakeLists.txt bug-9872-erk1.patch (647) 2009-11-13 17:19 https://public.kitware.com/Bug/file/2655/bug-9872-erk1.patch bug-9872-erk2.patch (2,640) 2009-11-28 07:44 https://public.kitware.com/Bug/file/2696/bug-9872-erk2.patch | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2009-11-09 14:39 | hellerf | New Issue | |||
2009-11-09 14:39 | hellerf | File Added: CMakeLists.txt | |||
2009-11-09 15:30 | Eric NOULARD | Note Added: 0018376 | |||
2009-11-11 16:29 | Eric NOULARD | Note Added: 0018398 | |||
2009-11-11 16:52 | Eric NOULARD | Note Added: 0018399 | |||
2009-11-13 17:19 | Eric NOULARD | File Added: bug-9872-erk1.patch | |||
2009-11-13 17:22 | Eric NOULARD | Note Added: 0018409 | |||
2009-11-14 20:30 | hellerf | Note Added: 0018411 | |||
2009-11-14 20:33 | hellerf | Note Edited: 0018411 | |||
2009-11-15 04:50 | Eric NOULARD | Note Added: 0018412 | |||
2009-11-15 05:27 | hellerf | Note Added: 0018413 | |||
2009-11-15 13:56 | Eric NOULARD | Note Added: 0018415 | |||
2009-11-22 09:33 | Alex Neundorf | Status | new => assigned | ||
2009-11-22 09:33 | Alex Neundorf | Assigned To | => Eric NOULARD | ||
2009-11-22 13:30 | Eric NOULARD | Note Added: 0018535 | |||
2009-11-22 13:30 | Eric NOULARD | Status | assigned => closed | ||
2009-11-22 13:30 | Eric NOULARD | Resolution | open => fixed | ||
2009-11-22 13:30 | Eric NOULARD | Fixed in Version | => CMake-2-8 | ||
2009-11-25 09:01 | Eric NOULARD | Note Added: 0018588 | |||
2009-11-25 09:01 | Eric NOULARD | Status | closed => feedback | ||
2009-11-25 09:01 | Eric NOULARD | Resolution | fixed => reopened | ||
2009-11-28 07:44 | Eric NOULARD | File Added: bug-9872-erk2.patch | |||
2009-11-28 07:46 | Eric NOULARD | Note Added: 0018603 | |||
2009-11-28 10:00 | Eric NOULARD | Note Added: 0018604 | |||
2009-11-28 17:12 | hellerf | Note Added: 0018610 | |||
2009-11-28 17:17 | Eric NOULARD | Note Added: 0018611 | |||
2009-11-28 17:17 | Eric NOULARD | Status | feedback => closed | ||
2009-11-28 17:17 | Eric NOULARD | Resolution | reopened => fixed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|