Am 24/08/2023 um 13:06 schrieb Dan Čermák:
Hi list,
our packaging guidelines for %fillup_only [1] currently do not suggest anything for the %files section for the files generated in `/etc/sysconfig/`. I would like to suggest that we start adding the newly generated file `/etc/sysconfig/$pkgname` as follows to the %files section: --8<---------------cut here---------------start------------->8--- %files %ghost %config(noreplace) %attr(0600,root,root) /etc/sysconfig/%{name} %dir /etc/sysconfig --8<---------------cut here---------------end--------------->8---
This ensures that rpm is aware of the files as configuration files.
Hmm, probably I'm doing something wrong. I tried it by adding %ghost %config(noreplace) %{_sysconfdir}/sysconfig/locate to the %files section and I got [ 19s] plocate.i586: E: filelist-forbidden-sysconfig (Badness: 10000) /etc/sysconfig/locate [ 19s] Please use %{_fillupdir}/sysconfig.<pkgname> and call %fillup_and_insserv for [ 19s] new sysconfig files. But a call to %{fillup_only} is already present in the %post section. Cheers, Manfred
Thoughts, opinions?
Cheers,
Dan
Footnotes: [1] https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros#%fillup_on...