[CMake] CPACK RPM directories in %files section
Steven Green
steven at greenius.ltd.uk
Wed Nov 30 14:24:19 EST 2011
On 29/11/2011 22:12, Eric Noulard wrote:
> 2011/11/29 Steven Green<steven at greenius.ltd.uk>:
>> When I try to install it on CentOS using rpm or yum I get an error message
>> about /etc/init.d conflicting with another package.
Thanks for the reply. In the process of answering your questions, I
found the actual problem.
I had a file with destination: /etc/init.d/myfile
When rpm tried to create /etc/init.d it complained it was owned by
package chkconfig-1.3.30.2-2.e15.x86
Looking more closely I noted that on CentOS (5.5, 5.6 and 6.0)
/etc/init.d is actually a link to /etc/rc.d/init.d rather than a real
directory. In other Linux distributions I have used such as Debian,
Ubuntu, Gentoo, /etc/init.d is a real folder.
I simply changed the destination to /etc/rc.d/init.d/myfile and now the
rpm installs as expected.
However, I am not convinced that adding the intermediary directories
into the RPM is correct behaviour. If you run 'rpm -ql' on standard
CentOS packages, they do not include them.
Bug 12305 seems concerned that the intermediary folders would not get
deleted when an rpm is uninstalled, but you would not want system
folders such as /etc deleted. And non-system folders which you create
yourself can be set up so they get deleted using something like:
install(DIRECTORY DESTINATION /opt/myfolder)
- Steven
More information about the CMake
mailing list