MantisBT - CMake
View Issue Details
0011595CMakeCPackpublic2010-12-10 12:122010-12-13 14:17
Benoît Bleuzé 
Eric NOULARD 
normalmajoralways
closedfixed 
amd64Linux Fedora11
CMake 2.8.3 
CMake 2.8.4CMake 2.8.4 
0011595: CPack can't generate RPMs (on FC11)
Generating tar packages works fine, but trying to generate RPM packages fails all the time. message from the command line:

CPack Error: Problem copying the package: /home/bbleuze/code/build/XXX/_CPack_Packages/Linux/RPM/XXX-0.2.0.rpm to /home/bbleuze/code/build/XXX/XXX-0.2.0.rpm
CPack Error: Error when generating package: XXX


The generator tries to copy a list a files, surrounded by single quotes (extracted from rpmbuild.err):

'[' -e /home/bbleuze/code/build/XXX/_CPack_Packages/Linux/RPM/XXX-0.2.0 ']'
+ mv '/home/bbleuze/code/build/XXX/_CPack_Packages/Linux/RPM/tmpBBroot/*' /home/bbleuze/code/build/XXX/_CPack_Packages/Linux/RPM/XXX-0.2.0
mv: cannot stat `/home/bbleuze/code/build/XXX/_CPack_Packages/Linux/RPM/tmpBBroot/*': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.7Die0i (%install)
    Bad exit status from /var/tmp/rpm-tmp.7Die0i (%install)

As you can see the file * doesn't exist. Basic bash mistake, globbing doesn't work when surrounded by single quotes.

Thank you for your help fixing this.

Benoît Bleuzé.
compile anything, run cpack -G RPM
No tags attached.
related to 0010871closed Eric NOULARD CPackRPM-generated spec file won't accept spaces in file paths. 
related to 0010345closed Eric NOULARD [Patch] CPackRPM: file path with spaces 
? CPackRPM.cmake (27,701) 2010-12-13 04:15
https://public.kitware.com/Bug/file/3566/CPackRPM.cmake
Issue History
2010-12-10 12:12Benoît BleuzéNew Issue
2010-12-10 13:11Eric NOULARDAssigned To => Eric NOULARD
2010-12-10 13:11Eric NOULARDStatusnew => assigned
2010-12-10 13:25Eric NOULARDNote Added: 0023873
2010-12-10 15:17Eric NOULARDCategory(No Category) => CPack
2010-12-11 05:19Eric NOULARDRelationship addedrelated to 0010871
2010-12-11 05:19Eric NOULARDRelationship addedrelated to 0010345
2010-12-13 03:21Benoît BleuzéNote Added: 0023906
2010-12-13 04:08Eric NOULARDNote Added: 0023907
2010-12-13 04:15Eric NOULARDFile Added: CPackRPM.cmake
2010-12-13 04:17Eric NOULARDNote Added: 0023908
2010-12-13 04:19Eric NOULARDTarget Version => CMake 2.8.4
2010-12-13 04:19Eric NOULARDSummarycpack can't generate RPMs => CPack can't generate RPMs (on FC11)
2010-12-13 07:06Benoît BleuzéNote Added: 0023915
2010-12-13 07:28Eric NOULARDNote Added: 0023920
2010-12-13 09:24Benoît BleuzéNote Added: 0023922
2010-12-13 14:17Eric NOULARDNote Added: 0023930
2010-12-13 14:17Eric NOULARDStatusassigned => closed
2010-12-13 14:17Eric NOULARDResolutionopen => fixed
2010-12-13 14:17Eric NOULARDFixed in Version => CMake 2.8.4

Notes
(0023873)
Eric NOULARD   
2010-12-10 13:25   
Hi Benoit,

Are you sure you are using CMake/CPack 2.8.3?
What says cpack --version?

I cannot reproduce this bug and it reminds me of something already fixed.
The singly quoted lines should now be double quoted.

May be you have several cmake/cpack version installed?
(0023906)
Benoît Bleuzé   
2010-12-13 03:21   
I do have several versions of cmake installed. 2.8.1 and 2.8.3. I compiled them both. My PATH environment variable is set only to point at the 2.8.3 version however. and running cpack --version or cmake --version yields a 2.8.3 string.

Any idea?
(0023907)
Eric NOULARD   
2010-12-13 04:08   
OK I can reproduce the problem.
I'll try to fix it.
The strange thing is the spec file is double quoted but used
shell file ends up with single quote...
(0023908)
Eric NOULARD   
2010-12-13 04:17   
Hi Benoit,

Would you please try to replace the
<yourprefix>/share/cmake-2.8/Modules/CPackRPM.cmake
with the one attached to the tracker.

It should fix the problem.
(0023915)
Benoît Bleuzé   
2010-12-13 07:06   
It works with the new CPackRPM.cmake file. Thanks a lot for the quick response.
I guess this change will make it in the next revision?

On my end this bug is fixed.

Benoit.
(0023920)
Eric NOULARD   
2010-12-13 07:28   
Yes it should make it for 2.8.4,
I'll have to check whether if it does not induce regression
on other RPM based distro.

Since my collection of RPM-based distro is not that wide
if you have any (various version of FC or RHEL, OpenSUSE, Mandriva etc..)
(0023922)
Benoît Bleuzé   
2010-12-13 09:24   
I tried with FC13. Same problem without the new file, correct behaviour with it. If you have some more tests I can run them for you.
(0023930)
Eric NOULARD   
2010-12-13 14:17   
Merge topic 'CPackRPM-Fix0011595' into next

8d366cd CPackRPM fix bug 0011595 : Can't generate RPMs (on FC11...)

Pushing upstream next