Hi, What is the "best" way for packaging "relocatable" RPMs that have some "non-relocatable" components, in particular: service scripts and configuration files that always go into /etc/rc.d/init.d and /etc/sysconfig, respectively. I personally don't have too much experience with hand-rolling .spec files, but I'm asking the question on behalf of one of our developers.
Along with quick web searches, I've looked at the guides suggested in a previous thread from 2007, and there were a couple of suggestions but each had its own problems. The most interesting suggestion was to install the "non-relocatable" files in the "relocatable" location, and then in the %post section, either copy or symbolically link those files into /etc/rd.d/init.d and /etc/sysconfig... The problem described is that these files or links are then not registered as belonging to the RPM, and as such are not cleanly handled when removing or upgrading the RPM. What has been done in the past is to install the services scripts in a separate RPM, dependent on the first. Besides having to install two RPMs for one service, the issue with that is that if the first RPM was relocated, then the second RPM has to be manually reconfigured after installation to point to the new location. Two RPMs might end up being the "best" way, but it violates my sense of aesthetics. It just seems like if they are packaged in a single RPM, then the scripts can be packaged within the SPEC file, with the appropriate '%{_prefix}/foo' macro substitutions to point to the location where 'foo' and other files were installed. (Is there a way to update the RPM database, directly, and _tell_ it that '/etc/sysconfig/foo' belongs to package 'foo', whether or not it was listed in %files?) Looking forward to your collective insight! Thanks! --Aaron McCaleb _______________________________________________ Tech mailing list Tech@lists.lopsa.org https://lists.lopsa.org/cgi-bin/mailman/listinfo/tech This list provided by the League of Professional System Administrators http://lopsa.org/