Marcus Meissner (meissner@suse.de) wrote:
Hi,
After some bugreports about default enabling services, I found some inconsistencies in our current usage of %service_add/del_section macros that hinder work.
Especially if %service_add_pre is missing, the default enablement will not work.
So if you use %service_..., it must be present in all 4 sections.
In %pre %service_add_pre SERVICE.service
In %post
%service_add_post SERVICE.service
In %preun %service_del_preun SERVICE.service
In %postun %service_del_postun SERVICE.service
I fixed some already myself and have asked my new colleague Johannes to do some more fixes and perhaps also enhance rpmlint to detect missing sections.
You can and should also check your own packages with these systemd units.
Thanks a lot for the info! However please can this be added to the wiki? Mailing list posts is no substitute for documentation, and unfortunately it seems that %service_* are not documented yet; at least, not in the right place :-/ https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org