MantisBT - CMake
View Issue Details
0010737CMakeCPackpublic2010-05-20 07:142010-11-09 22:57
Frank Stappers 
Eric NOULARD 
normalminoralways
closedfixed 
CMake-2-8 
CMake 2.8.3CMake 2.8.3 
0010737: CPACK_SYSTEM_NAME variable containing "(" or ")" prohibits CPack to copy RPM
If the CPACK_SYSTEM_NAME is set to a string that contains "(" or ")", as with:

cmake . -DCPACK_SYSTEM_NAME="openSUSE_11.2_(x86_64)"

, then CPack outputs the following error "CPack Error: Problem copying the package:...", after "Finalize package". No package is created.
The error does not occur when both "(" and ")" are removed.




CMake 2.8.1
OS: OpenSuSE 11.2 (x86-64)
No tags attached.
patch diff.patch (726) 2010-10-03 16:36
https://public.kitware.com/Bug/file/3425/diff.patch
patch diff_correct.patch (726) 2010-10-03 16:41
https://public.kitware.com/Bug/file/3426/diff_correct.patch
Issue History
2010-05-20 07:14Frank StappersNew Issue
2010-05-20 07:15Frank StappersNote Added: 0020795
2010-07-09 18:47Eric NOULARDStatusnew => assigned
2010-07-09 18:47Eric NOULARDAssigned To => Eric NOULARD
2010-07-09 18:55Eric NOULARDNote Added: 0021344
2010-10-03 16:36Frank StappersFile Added: diff.patch
2010-10-03 16:37Frank StappersNote Added: 0022397
2010-10-03 16:41Frank StappersFile Added: diff_correct.patch
2010-10-03 16:42Frank StappersNote Added: 0022398
2010-10-03 17:33Eric NOULARDNote Added: 0022399
2010-10-03 17:35Eric NOULARDNote Added: 0022400
2010-10-03 17:35Eric NOULARDStatusassigned => resolved
2010-10-03 17:35Eric NOULARDResolutionopen => fixed
2010-10-06 13:44David ColeFixed in Version => CMake 2.8.3
2010-10-06 13:44David ColeTarget Version => CMake 2.8.3
2010-11-09 22:57Philip LowmanStatusresolved => closed

Notes
(0020795)
Frank Stappers   
2010-05-20 07:15   
CPack Error occurs when:

cpack -G RPM

is executed.
(0021344)
Eric NOULARD   
2010-07-09 18:55   
When you want to know more about CPackRPM errors you may run

cpack -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM

then you'll see that you can check
rpmbuild.err and rpmbuild.out files.

in this case when rpmbuild is trying to change to the toplevel RPM directory
it fails because the ( is not escaped.

I'll try a fix but may be you'd be wanting to try a patch on your own?
I have a bunch of CPackRPM already waiting in my stack so I'm not sure to
be able to tackle this one soon.
(0022397)
Frank Stappers   
2010-10-03 16:37   
Uploaded "diff.patch" ((726 bytes) 2010-10-03 16:36), which resolves the error.
(0022398)
Frank Stappers   
2010-10-03 16:42   
Should be the "diff_correct.patch". In the previous one
"diff.patch", the "-" and "+" where swapped.
(0022399)
Eric NOULARD   
2010-10-03 17:33   
Thank you very much Franck.
Your patch works just fine.

I did merge it to next:

commit 4a4a53f3dd9a49efa95119a4c38b25c2ff77476d
Author: Eric NOULARD <eric.noulard@gmail.com>
Date: Sun Oct 3 23:29:34 2010 +0200

    CPackRPM Handle parenthesis in CPACK_SYSTEM_NAME (fix bug 10737)
    
    merge patch from Frank Stappers

Should be in 2.8.3.
(0022400)
Eric NOULARD   
2010-10-03 17:35   
Will close it when I'm sure it reaches 2.8.3