[CMake] CPack 2.8.7 RPM: hiding /etc/init.d from %files list

Deborah Pickett Deborah.Pickett at autodesk.com
Thu Jan 5 23:05:17 EST 2012


Hi everyone,

I've been porting our commercial, in-house, unmaintainable Linux product build process to CMake.  It's been remarkably easy, but now I've hit a hurdle.

I need to produce an RPM that will install on both Red Hat 5 and Suse 11.  For political reasons I can't produce two distinct RPMs.  The executables are all happily statically linked so there isn't a problem with differing libraries.  The problem is that there is an init script in my product, which wants to go into /etc/init.d/mydaemon.

On Red Hat, /etc/init.d is a symlink to /etc/rc.d/init.d, and on Suse, /etc/rc.d/init.d is a symlink to /etc/init.d.  (Swift's big-endians and little-endians have nothing on the arbitrariness of this.)

Packing with CPack 2.8.7's RPM generator wants to insert /etc/init.d into the %files list.  The resulting RPM will install on Suse, but on Red Hat, you get:
  file /etc/init.d from install of myproduct-1-1.x86_64 conflicts with file from package chkconfig-1.3.30.2-2.el5.x86_64
Naturally, from the symmetry of the situation, if I put my init script in /etc/rc.d/init.d/daemon, I get an RPM that installs on Red Hat but doesn't install on Suse.



More information about the CMake mailing list