Accepting request 984452 from Base:System

- Modify branding-preset-states to fix systemd-presets-common-SUSE
  not enabling new user systemd service preset configuration just
  as it handles system service presets. By passing an (optional)
  second parameter "user", the save/apply-changes commands now
  work with user services instead of system ones (boo#1200485)

- enable ignition-delete-config by default (bsc#1199524)

OBS-URL: https://build.opensuse.org/request/show/984452
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd-presets-common-SUSE?expand=0&rev=24
This commit is contained in:
Dominique Leuenberger 2022-06-24 06:45:16 +00:00 committed by Git OBS Bridge
commit 0b41231e67
4 changed files with 27 additions and 4 deletions

View File

@ -69,7 +69,7 @@ apply_preset_state_changes () {
exec 3<&- exec 3<&-
done done
if test -x /usr/bin/systemctl ; then if test -x /usr/bin/systemctl ; then
/usr/bin/systemctl list-unit-files /usr/bin/systemctl list-unit-files "$GLOBAL"
fi >systemd_preset-states.rpm-tmp fi >systemd_preset-states.rpm-tmp
exec 3<systemd_preset-states.rpm-tmp exec 3<systemd_preset-states.rpm-tmp
read -u3 PAD read -u3 PAD
@ -99,7 +99,7 @@ apply_preset_state_changes () {
fi fi
if test "$ENABLE_OLD" != "$ENABLE_NEW" ; then if test "$ENABLE_OLD" != "$ENABLE_NEW" ; then
echo "Resetting $SERVICE to the new default: $ENABLE_NEW" echo "Resetting $SERVICE to the new default: $ENABLE_NEW"
/usr/bin/systemctl preset "$SERVICE" || : /usr/bin/systemctl preset "$GLOBAL" "$SERVICE" || :
fi fi
done done
exec 3<&- exec 3<&-
@ -107,7 +107,13 @@ apply_preset_state_changes () {
} }
cd /usr/lib/systemd/system-preset if test "$2" == "user" ; then
cd /usr/lib/systemd/user-preset
GLOBAL="--global"
else
cd /usr/lib/systemd/system-preset
GLOBAL=""
fi
case $1 in case $1 in
apply-changes) apply-changes)

View File

@ -22,6 +22,7 @@ disable fstrim.service
enable fstrim.timer enable fstrim.timer
enable getty@.service enable getty@.service
enable hcn-init.service enable hcn-init.service
enable ignition-delete-config.service
enable ignition-firstboot-complete.service enable ignition-firstboot-complete.service
enable irqbalance.service enable irqbalance.service
enable iscsi.service enable iscsi.service

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Tue Jun 14 09:25:09 UTC 2022 - Antonio Larrosa <alarrosa@suse.com>
- Modify branding-preset-states to fix systemd-presets-common-SUSE
not enabling new user systemd service preset configuration just
as it handles system service presets. By passing an (optional)
second parameter "user", the save/apply-changes commands now
work with user services instead of system ones (boo#1200485)
-------------------------------------------------------------------
Mon May 23 12:37:54 UTC 2022 - Ignaz Forster <iforster@suse.com>
- enable ignition-delete-config by default (bsc#1199524)
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Apr 11 07:45:59 UTC 2022 - Jonathan Kang <songchuan.kang@suse.com> Mon Apr 11 07:45:59 UTC 2022 - Jonathan Kang <songchuan.kang@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package systemd-presets-common-SUSE # spec file for package systemd-presets-common-SUSE
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2022 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -68,6 +68,7 @@ if [ $1 -gt 1 -a -x %{_prefix}/lib/%{generic_name}/branding-preset-states ] ; th
# Note: the old version of the script is used here. # Note: the old version of the script is used here.
# #
%{_prefix}/lib/%{generic_name}/branding-preset-states save %{_prefix}/lib/%{generic_name}/branding-preset-states save
%{_prefix}/lib/%{generic_name}/branding-preset-states save user
elif [ $1 -eq 1 ]; then elif [ $1 -eq 1 ]; then
touch /run/rpm-%{name}-preset-all touch /run/rpm-%{name}-preset-all
fi fi
@ -79,6 +80,7 @@ if [ $1 -gt 1 ] ; then
# that have been changed and apply "systemct preset" on them. # that have been changed and apply "systemct preset" on them.
# #
%{_prefix}/lib/%{generic_name}/branding-preset-states apply-changes %{_prefix}/lib/%{generic_name}/branding-preset-states apply-changes
%{_prefix}/lib/%{generic_name}/branding-preset-states apply-changes user
fi fi
%posttrans %posttrans