Resolve custom file packaging conflicts
StarlingX provides custom versions of certain files that are provided
by upstream packages. If the files are not packaged upstream as config
files, using the %config(noreplace) spec file directive, this can
cause a problem if the original package is updated on a running
system, as the custom file will be overwritten.
For certain systemd files, we can instead install these files to
directories under /etc, which will override the original installed
files at runtime without needing to modify the original files. This
handles most of the conflicts addressed by this update.
For example, instead of replacing /usr/lib/tmpfiles.d/systemd.conf in
a postinstall scriptlet with the customized file, we can install the
file to /etc/tmpfiles.d/systemd.conf to the same end effect.
In the case of the customization to /etc/rc.d/init.d/lighttpd,
however, this update addresses it by ensuring lighttpd-config copies
the customized file whenever lighttpd-config is updated. If lighttpd
is ever updated, updating lighttpd-config at the same time will ensure
the customized version of the file is maintained. Other options here
would be to update the lighttpd package to mark this script as though
it is a config file, or update how it is called by StarlingX so that
the custom file can be given a unique filename.
Signed-off-by: Don Penney <email@example.com>