[opensuse-packaging] Upgrade path from xinetd to systemd socket-activated service
Hi, Some time ago I converted the VNC service in xorg-x11-Xvnc package from being a xinetd service to be a socket-activated systemd service. However this change does not preserve the enabled state - people who had VNC enabled and upgrade get it disabled again. Is there some preferred way to transfer the "enabled" state during such upgrade? My idea so far is to check for /etc/xinetd.d/vnc.rpmsave in %post. If it exist and the service inside was enabled, then enable the systemd socket. Michal Srb -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Le jeudi 22 mars 2018 à 13:23 +0100, Michal Srb a écrit :
Hi,
Some time ago I converted the VNC service in xorg-x11-Xvnc package from being a xinetd service to be a socket-activated systemd service.
However this change does not preserve the enabled state - people who had VNC enabled and upgrade get it disabled again. Is there some preferred way to transfer the "enabled" state during such upgrade?
Maybe you could expand the script used for initscript => systemd service migration to handle xinetd : /usr/sbin/systemd-sysv-convert -- Frederic Crozat Enterprise Desktop Release Manager SUSE -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Thu, Mar 22, Michal Srb wrote:
Hi,
Some time ago I converted the VNC service in xorg-x11-Xvnc package from being a xinetd service to be a socket-activated systemd service.
However this change does not preserve the enabled state - people who had VNC enabled and upgrade get it disabled again. Is there some preferred way to transfer the "enabled" state during such upgrade?
My idea so far is to check for /etc/xinetd.d/vnc.rpmsave in %post. If it exist and the service inside was enabled, then enable the systemd socket.
Better is to check in %pre, if /etc/xinetd.d/vnc exist and the service was enabled and store that for the %post install section. I would never relay on the rpmsave file: could be that for whatever reasons it will not be created, or it is very old and the admin did disable the systemd socke for vnc meanwhile, since he does not need the service anymore. Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & CaaSP SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On čtvrtek 22. března 2018 16:09:52 CET Thorsten Kukuk wrote:
On Thu, Mar 22, Michal Srb wrote:
Hi,
Some time ago I converted the VNC service in xorg-x11-Xvnc package from being a xinetd service to be a socket-activated systemd service.
However this change does not preserve the enabled state - people who had VNC enabled and upgrade get it disabled again. Is there some preferred way to transfer the "enabled" state during such upgrade?
My idea so far is to check for /etc/xinetd.d/vnc.rpmsave in %post. If it exist and the service inside was enabled, then enable the systemd socket. Better is to check in %pre, if /etc/xinetd.d/vnc exist and the service was enabled and store that for the %post install section.
I would never relay on the rpmsave file: could be that for whatever reasons it will not be created, or it is very old and the admin did disable the systemd socke for vnc meanwhile, since he does not need the service anymore.
Actually I just discovered that /etc/xinetd.d/vnc still exists during %post and is only renamed to vnc.rpmsave after %post. So it is perfect for my usecase - it will be there only during the first upgrade from the xinetd version to the systemd version. Any following upgrades won't see the file, so they won't re-activate the service. So I'll do that. :-) Michal -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (3)
-
Frederic Crozat
-
Michal Srb
-
Thorsten Kukuk