How to undo %{fillup_only} ?

I’m building a package using %{fillup_only} to place a configuration file at /etc/sysconfig/.

What is the proper method to delete that file upon removal of the package?

Related question: I note that updating the package will not overwrite the existing configuration file at /etc/sysconfig/. That’s good to preserve any existing user configurations, but when the syntax of the configuration file changes I have to replace the old one by the new template. Can I force this?



It should clean it out on rpm removal though?

Just mark as %config in your %files section and don’t use (noreplace).

Thank you. That is it.

Ooops, I was too fast

When I test it I see that it does not remove the config file in /etc/sysconfig/ when I remove the rpm package with yast.



%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/www
%dir %{_libdir}/%{name}
# The format has changed; otherwise use %config(noreplace)
%config /var/adm/fillup-templates/sysconfig.mjpg-streamer
%doc %{_mandir}/man1/mjpg_streamer.1.gz
%doc %{_mandir}/man1/mjpg_streamer_udp_client.1.gz
%doc %{_mandir}/man1/mstreamer.1.gz