Accepting request 1090446 from Base:System
- Import commit 07bb12a282b0ea378850934c4a76008b448b8bad (merge of v253.5)
For a complete list of changes, visit:
25aec15788...07bb12a282
- Reexecute user managers on package updates.
For now we send signal to user instances to trigger their reexecution. It's
asynchronous but it shouldn't cause any problem in practice and it's probably
safer than triggering reexecution with "systemctl --user -M 1000@
daemon-reexec" command. The latter command creates a new PAM session behind
the scene bringing with it the known issue (upstream issue #8598) with
"(sd-pam)" helper process when the PAM session is being closed.
OBS-URL: https://build.opensuse.org/request/show/1090446
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=392
This commit is contained in:
commit
3754051e6e
@ -121,7 +121,24 @@ case "$command" in
|
||||
fi
|
||||
;;
|
||||
|
||||
user-reload-restart|user-reload|user-restart|user-reexec)
|
||||
user-reexec)
|
||||
if [ -n "$*" ]; then
|
||||
echo >&2 "Unexpected arguments for '$command': $*"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
[ -d /run/systemd/system ] || exit 0
|
||||
|
||||
# Reexecute user manager instances (if any). It is asynchronous but it
|
||||
# shouldn't be a problem in practice because systemd main package is not
|
||||
# shipping any user services currently. A problem would arise only if a
|
||||
# new version of a user service relied on an option that would be only
|
||||
# understood by the latest version of the user manager and the user unit
|
||||
# would be restarted before the user manager get reexecuted.
|
||||
systemctl kill --kill-who=main --signal=SIGRTMIN+25 "user@*.service"
|
||||
;;
|
||||
|
||||
user-reload-restart|user-reload|user-restart)
|
||||
if [ -n "$*" ]; then
|
||||
echo >&2 "Unexpected arguments for '$command': $*"
|
||||
exit 2
|
||||
@ -131,14 +148,6 @@ case "$command" in
|
||||
|
||||
users=$(systemctl list-units 'user@*' --legend=no | sed -n -r 's/.*user@([0-9]+).service.*/\1/p')
|
||||
|
||||
if [[ "$command" =~ reexec ]]; then
|
||||
for user in $users; do
|
||||
SYSTEMD_BUS_TIMEOUT=15s \
|
||||
systemctl --user -M "$user@" daemon-reexec &
|
||||
done
|
||||
wait
|
||||
fi
|
||||
|
||||
if [[ "$command" =~ reload ]]; then
|
||||
for user in $users; do
|
||||
SYSTEMD_BUS_TIMEOUT=15s \
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b619c2dbcc175b630519a1e84553f744ae003b49b031c83ee4cdbfd9226701fe
|
||||
size 8216304
|
3
systemd-v253.5+suse.29.g07bb12a282.tar.xz
Normal file
3
systemd-v253.5+suse.29.g07bb12a282.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c46ef61c3b92f4a83c203bf5961c1d6ca50fddbd8d97c59060feae0f04dc24ee
|
||||
size 8218940
|
@ -1,3 +1,23 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 1 15:58:24 UTC 2023 - Franck Bui <fbui@suse.com>
|
||||
|
||||
- Import commit 07bb12a282b0ea378850934c4a76008b448b8bad (merge of v253.5)
|
||||
|
||||
For a complete list of changes, visit:
|
||||
https://github.com/openSUSE/systemd/compare/25aec157888f7aa9a36726962fcbbf2c74ead440...07bb12a282b0ea378850934c4a76008b448b8bad
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 1 15:21:54 UTC 2023 - Franck Bui <fbui@suse.com>
|
||||
|
||||
- Reexecute user managers on package updates.
|
||||
|
||||
For now we send signal to user instances to trigger their reexecution. It's
|
||||
asynchronous but it shouldn't cause any problem in practice and it's probably
|
||||
safer than triggering reexecution with "systemctl --user -M 1000@
|
||||
daemon-reexec" command. The latter command creates a new PAM session behind
|
||||
the scene bringing with it the known issue (upstream issue #8598) with
|
||||
"(sd-pam)" helper process when the PAM session is being closed.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 9 14:25:04 UTC 2023 - Franck Bui <fbui@suse.com>
|
||||
|
||||
|
39
systemd.spec
39
systemd.spec
@ -19,7 +19,7 @@
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
|
||||
%define min_kernel_version 4.5
|
||||
%define archive_version +suse.28.g25aec15788
|
||||
%define archive_version +suse.29.g07bb12a282
|
||||
|
||||
%define _testsuitedir %{_systemd_util_dir}/tests
|
||||
%define xinitconfdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/X11/xinit
|
||||
@ -73,7 +73,7 @@
|
||||
|
||||
Name: systemd%{?mini}
|
||||
URL: http://www.freedesktop.org/wiki/Software/systemd
|
||||
Version: 253.4
|
||||
Version: 253.5
|
||||
Release: 0
|
||||
Summary: A System and Session Manager
|
||||
License: LGPL-2.1-or-later
|
||||
@ -976,14 +976,18 @@ if [ $1 -gt 1 ]; then
|
||||
fi
|
||||
|
||||
%post
|
||||
# Make /etc/machine-id an empty file during package installation. On the first
|
||||
# boot, machine-id is initialized and either committed (if /etc/ is writable) or
|
||||
# the system/image runs with a transient machine ID, that changes on each boot
|
||||
# (if the image is read-only). This is especially important for appliance builds
|
||||
# to avoid an identical machine ID in all images.
|
||||
if [ $1 -eq 1 ]; then
|
||||
# Make /etc/machine-id an empty file during package installation. On the
|
||||
# first boot, machine-id is initialized and either committed (if /etc/
|
||||
# is writable) or the system/image runs with a transient machine ID,
|
||||
# that changes on each boot (if the image is read-only). This is
|
||||
# important for appliance builds to avoid an identical machine ID in all
|
||||
# images.
|
||||
touch %{_sysconfdir}/machine-id
|
||||
chmod 444 %{_sysconfdir}/machine-id
|
||||
|
||||
# Persistent journal is the default
|
||||
mkdir -p %{_localstatedir}/log/journal
|
||||
fi
|
||||
|
||||
%if %{without bootstrap}
|
||||
@ -993,25 +997,8 @@ pam-config --add --systemd || :
|
||||
%endif
|
||||
|
||||
systemctl daemon-reexec || :
|
||||
|
||||
# Reexecute user manager instances (if any). It is asynchronous but it shouldn't
|
||||
# be a problem in practice: a problem would arise only if the new version of a
|
||||
# user service has a brand new option that is only understood by the latest
|
||||
# version of the user manager and the user service is started before the user
|
||||
# manager get reexecuted. But this case is very unlikely especially since we
|
||||
# don't restart any user service for now.
|
||||
#
|
||||
# Before doing this, we unfortunately have to wait until users will reexec their
|
||||
# user manager (by either rebooting or restarting their session) to a version
|
||||
# that supports SIGRTMIN+25 otherwise sending the signal to an old version will
|
||||
# kill the manager which means tearing down the user session.
|
||||
#
|
||||
# systemctl kill --kill-who=main --signal=SIGRTMIN+25 "user@*.service" || :
|
||||
|
||||
if [ $1 -eq 1 ]; then
|
||||
# Persistent journal is the default
|
||||
mkdir -p %{_localstatedir}/log/journal
|
||||
fi
|
||||
# Reexecute the user managers (if any)
|
||||
%{_systemd_util_dir}/systemd-update-helper user-reexec || :
|
||||
|
||||
%if %{without filetriggers}
|
||||
# During package installation, the followings are for config files shipped by
|
||||
|
@ -1,4 +1,4 @@
|
||||
# -*- Mode: rpm-spec; indent-tabs-mode: nil -*- */
|
||||
# -*- Mode: rpm-spec; indent-tabs-mode: nil -*-
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
#
|
||||
# This file is part of systemd.
|
||||
|
Loading…
Reference in New Issue
Block a user