FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Packaging

 
 
LinkBack Thread Tools
 
Old 09-20-2011, 01:04 PM
Stephen Gallagher
 
Default Systemd upgrades and user-selected auto-start

Our current scriptlets for systemd result in an unacceptable upgrade
case. Specifically, it reverts all services to their default
enabled/disabled status. We should allow packagers to include scripts
that keep the user-selected auto-start between upgrades.

For example, HTTPD does not start automatically when installed (because
its default configuration is not necessarily useful). However, once it's
been set up by a user and selected for autostart with ckconfig (for
example), we should not be disabling it on upgrade.

The reverse might also be true. In a hardened environment, a service
that is configured for auto-start by default might be disabled for
security reasons. Turning it back on by default during an upgrade could
then be viewed as a security vulnerability.

I think the guidelines need to be relaxed so that scriptlets like the
following could be added:

%triggerun -- sssd < %{version}-%{release}
if /sbin/chkconfig --level 3 sssd ; then
/bin/systemctl --no-reload enable sssd.service >/dev/null 2>&1
|| :
fi

if /sbin/chkconfig --level 5 sssd ; then
/bin/systemctl --no-reload enable sssd.service >/dev/null 2>&1
|| :
fi

/sbin/chkconfig --del sssd >/dev/null 2>&1 || :


In this case, we check to see if the sssd service was running in
runlevel three or five, and if so we enable it on upgrade. (Yes, I'm
aware that this is currently in violation of packaging standards, but
SSSD was converted prior to the standard being decided upon).
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 09-20-2011, 02:14 PM
Tom Callaway
 
Default Systemd upgrades and user-selected auto-start

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/20/2011 09:04 AM, Stephen Gallagher wrote:
> Our current scriptlets for systemd result in an unacceptable
> upgrade case. Specifically, it reverts all services to their
> default enabled/disabled status. We should allow packagers to
> include scripts that keep the user-selected auto-start between
> upgrades.

As stated before, we argued about this, but this is what we had to
factor in:

* Lots of packages had services that were enabled by default, but
should not have been
* Certain services used to need to be enabled by default in a
pre-systemd universe, but no longer need to be.
* There is no way to differentiate between a service which is on
because it was set that way by the package and on because the user
made a conscious choice to set it that way.
* Runlevels and ordering in the SysV universe don't have exact
mappings in the systemd model, and we have to assume that it is
possible that both have been customized by the user.

So, for Fedora 16, we decided to force a clean reset of the proper
defaults for services, as decided by FESCo, and:

* Save a copy of the runlevel and priority status of the service being
migrated to systemd
* Provide a simple tool (/usr/bin/systemd-sysv-convert in
systemd-sysv, 150 lines of python) that can take the saved service
status and make an attempt to convert it to systemd, so that if the
user wishes to view or restore the same settings they had prior to the
upgrade, they can do so.

I'm not terribly interested in revisiting this painful discussion, and
to be honest, just want to move past it.

~tom

==
Fedora Project
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk54n+AACgkQPF6ZrZMFQmDC0gCdHIMyoPWo/aDwklH078ymwQkQ
qTcAn2yE5F2D9In+usCUwUbvcB3MIJtB
=7j/h
-----END PGP SIGNATURE-----
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 

Thread Tools




All times are GMT. The time now is 12:16 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org