Re: [Guidelines Change] Change to the Packaging Guidelines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 07.08.12 13:11, Tom Callaway (tcallawa@xxxxxxxxxx) wrote:

> On 08/07/2012 12:55 PM, Tom Hughes wrote:
> > On 07/08/12 17:41, Tom Callaway wrote:
> > 
> >> The systemd scriptlet guidelines have been updated for Fedora 18. In
> >> Fedora 18, the systemd package now provides helper macros to simplify
> >> %post, %preun, and %postun invocations in packages with systemd unit
> >> files. Additionally, these macros enable support for systemd "profiles",
> >> a Fedora 18 Feature.
> >>
> >> ​https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
> > 
> > The postun macros look wrong - as written the guidelines will result in
> > a service that is not enabled by default not being restarted on upgrade
> > which is a change from the current behaviour.
> 
> You're right. I've corrected this. Thanks!

Urks. Now it's all backwards.

A service making use of these macros should never invoke "systemctl"
directly, and especially not "systemctl enable", since that makes the
whole "preset" logic useless. Presets are about moving the enablement
policy out of the packages, so that policy and mechanism are neatly
separated.

For services which should not be restarted on upgrade (D-Bus, ...) we
should recommend this:

%postun
%{systemd_postun} 

and for services which should be restarted on upgrade, we should
recommend this: 

%postun
%{systemd_postun_with_restart} apache-httpd.service 

And nobody should use systemctl enable in the spec snippets
anymore. That should be encoded in the preset policy (see other mail I
just sent).

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux