Hello On Nov 13 11:18 Frederic Crozat wrote (excerpt):
You obviously don't want this default value to be applied when packages are updated, overriding sysadmin changes.
Of course I do not want overriding sysadmin changes for systemd units that still exist after package update.
Case not handled currently in presets is when a preset file is introduced for a particular package which is already installed.
This is what I had actually meant. I want presets be applied for systemd units that are new in case of a package update. And perhaps also for systemd units that are removed in case of a package update something may have to be done: Assume the old package provided foo.service and foo.socket. In systemd-presets-branding-* only foo.socket was enabled but foo.service was not enabled (I don't know if this makes sense in practice - it is only meant as an example here). Assume the new package only provides foo.service. Then it seems reasonable to change the preset for foo.service to be enabled so that the admin could do "systemctl preset foo" and have the service foo still enabled.
People versatile in RPM and bash are welcome to help to fix that (filetriggers like in Mageia RPM would be great to automate that but AFAIK, they haven't landed in upstream RPM yet)
Currently (as time permits - i.e. when there are no SLE issues with higher priority) I am working on a generic %posttrans RPM scriptlet to clean up obsoleted systemd units and refresh still valid units in case of a package update. But it is really complicated (as always with systemd), see https://bugzilla.opensuse.org/show_bug.cgi?id=904215 If and only if I had implemented this successfully, I am interested to work together with other people versatile in systemd to implement basically the same functionality for systemd-presets-branding-* (i.e. clean up stuff after package updates) or alternatively to implement a generic RPM macro that is run in %posttrans that cleans up systemd stuff after package updates. Kind Regards Johannes Meixner -- SUSE LINUX GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 21284 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org