Stanislav Brabec schrieb:
Guido Berhoerster wrote:
* Andrei Borzenkov
[2014-11-20 12:25]: On Thu, Nov 20, 2014 at 1:38 PM, Guido Berhoerster
wrote: * Ludwig Nussel
[2014-11-20 11:20]: Stanislav Brabec schrieb:
Ludwig Nussel wrote:
Is it really worth the effort? We are talking about an optional package here. So if the admin installed the package but did not enable it's services it could be assumed that this is intentional. So even if the default policy for the package changed to enable a service by default now that doesn't mean it needs to enforce that on update.
Optional packages should be working properly out of the box. If the service is socket activated, its running needs no configuration, and it's secure to turn it on, we should do setup on packaging level. Especially if admin already enabled them, update should not break it.
I agree but the way to turn on things is the preset mechanism.
I think that these cases should be handled by packagers, not macro authors.
rpm scripts are fragile by nature. The more we can do in a generic way where the individual packager doesn't have to care the better.
Preset introduced later than the service, and you need one time preset:
%pre ... if [ $1 -gt 1 ] ; then if ! {test if preset exists in file or branding file} ; then echo -n "" >/run/rpm-%{name}-update-{service name}-new-in-upgrade fi fi
See also the discussion on the systemd list: http://lists.freedesktop.org/archives/systemd-devel/2014-November/025363.htm... It's perfectly fine for us to change the default enable state of a service. However the package should not make guesses whether the previous (disabled) state was because of the distro default or a conscious decision of the admin. IOW don't do that :-)
Keeping service state during migration from sysv style init scripts: [...]
That's what systemd-sysv-convert is supposed to do automatically, right? If it doesn't do it for some reason it's most likely a bug that needs to be fixed in systemd-sysv-convert. cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) Maxfeldstraße 5; 90409 Nürnberg; Germany -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org