MantisBT - CMake
View Issue Details
0013063CMakeCPackpublic2012-03-24 16:142012-04-25 18:03
Tom Hughes 
Eric NOULARD 
normalminoralways
closedfixed 
Amazon Linux20110923
CMake 2.8.7 
CMake 2.8.8CMake 2.8.8 
0013063: CPackRPM fails on CentOS-based systems
On Amazon Linux 20110923 (a CentOS-based distribution), using cpack to generate an RPM fails. rpm is not picking up _topdir, even though it is set in the spec. The solution is to pass a flag to rpm defining _topdir. I'm attaching a patch that does this.
No tags attached.
patch 0001-Set-_topdir-explicitly.patch (959) 2012-03-24 16:14
https://public.kitware.com/Bug/file/4263/0001-Set-_topdir-explicitly.patch
Issue History
2012-03-24 16:14Tom HughesNew Issue
2012-03-24 16:14Tom HughesFile Added: 0001-Set-_topdir-explicitly.patch
2012-03-24 16:48Eric NOULARDAssigned To => Eric NOULARD
2012-03-24 16:48Eric NOULARDStatusnew => assigned
2012-03-25 17:49Eric NOULARDNote Added: 0028965
2012-03-26 02:34Tom HughesNote Added: 0028966
2012-03-27 02:10Eric NOULARDNote Added: 0028974
2012-03-27 12:20Tom HughesNote Added: 0028980
2012-03-27 15:49Eric NOULARDNote Added: 0028983
2012-03-27 15:50Eric NOULARDNote Added: 0028984
2012-03-27 15:50Eric NOULARDStatusassigned => feedback
2012-04-20 15:08Eric NOULARDNote Added: 0029280
2012-04-20 15:08Eric NOULARDStatusfeedback => closed
2012-04-20 15:08Eric NOULARDResolutionopen => fixed
2012-04-20 15:08Eric NOULARDFixed in Version => CMake 2.8.8
2012-04-25 18:03David ColeTarget Version => CMake 2.8.8

Notes
(0028965)
Eric NOULARD   
2012-03-25 17:49   
Hi Tom,

What is the version of rpm/rpmbuild on this distro?
rpm --version

Did you try on CentOS?
(0028966)
Tom Hughes   
2012-03-26 02:34   
The version of rpm on Amazon Linux is RPM version 4.8.0. The release is 16.36.amzn1.

I also tried on CentOS 6.2 (rpm version 4.8.0). The problem does not seem to occur there, but the patch I submitted doesn't break anything.
(0028974)
Eric NOULARD   
2012-03-27 02:10   
Hi Tom,

Would you send me your e-mail such that I can give you authorship in the upstream
commit?
Mine is firstname.lastname at gmail dot com.
(0028980)
Tom Hughes   
2012-03-27 12:20   
Eric, my email should be in the patch that I attached.
(0028983)
Eric NOULARD   
2012-03-27 15:49   
Right of course. Sorry.
I just merged your fix to next:
Merge topic 'CPackPM-fixAmazonLinux' into next

3a0c60d Override topdir from rpm command line seems necessary on Amazon linux.

This should be harmless on other distros.
(I tested fedora and debian based + rpm)
But I'd suggest to wait dashboard run + user testing (e.g. on OpenSUSE)
before putting this in the next 2.8.8rc.
(0028984)
Eric NOULARD   
2012-03-27 15:50   
Waiting for wider testing
on RPM based distros.

OpenSUSE
Mandriva/Mageia
RHEL
...
(0029280)
Eric NOULARD   
2012-04-20 15:08   
This has been merged to master and included in 2.8.8.