From ae1b79cbf416586401eb97e94123de842b638167eed8d589018e61d9526c32bf Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 17 Aug 2015 20:19:53 +0000 Subject: [PATCH] Accepting request 321271 from home:sbrabec:branches:systemd-preset Submit to Factory depends on request 320740. - Add %systemd_preset_pre and %systemd_preset_posttrans that will do one shot presetting of uuidd.service on upgrade. (bnc#900935#c46, FATE#318949). - Remove one shot presetting hacks. OBS-URL: https://build.opensuse.org/request/show/321271 OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=291 --- python-libmount.changes | 8 ++++++++ python-libmount.spec | 15 ++++++--------- util-linux-systemd.changes | 7 +++++-- util-linux-systemd.spec | 15 +++++---------- util-linux.changes | 8 ++++++++ util-linux.spec | 13 +++++-------- 6 files changed, 37 insertions(+), 29 deletions(-) diff --git a/python-libmount.changes b/python-libmount.changes index b0d44b9..7c9b3b8 100644 --- a/python-libmount.changes +++ b/python-libmount.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Aug 4 20:31:55 CEST 2015 - sbrabec@suse.com + +- Add %systemd_preset_pre and %systemd_preset_posttrans that will + do one shot presetting of uuidd.service on upgrade. + (bnc#900935#c46, FATE#318949). +- Remove one shot presetting hacks. + ------------------------------------------------------------------- Mon May 25 16:26:01 UTC 2015 - crrodriguez@opensuse.org diff --git a/python-libmount.spec b/python-libmount.spec index 4f2675e..34cd722 100644 --- a/python-libmount.spec +++ b/python-libmount.spec @@ -76,7 +76,7 @@ Name: python-libmount %endif Summary: %main_summary License: GPL-2.0+ -Group: %group_pl +Group: %main_group BuildRequires: audit-devel BuildRequires: bc BuildRequires: binutils-devel @@ -877,18 +877,12 @@ fi %postun -n util-linux-systemd %{service_del_postun fstrim.service fstrim.timer} -%pre -n uuidd +%pre -p /bin/bash -n uuidd /usr/sbin/groupadd -r uuidd 2>/dev/null || : /usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ -d /var/run/uuidd uuidd 2>/dev/null || : %{service_add_pre uuidd.socket uuidd.service} -# trick: service existed before, but it had no preset before 13.2 and in SLE12. Force %%service_add_post to run preset. -if [ $1 -gt 1 ] ; then - if ! test -f /usr/lib/systemd/system-preset/50-uuidd.preset ; then - echo -n "" >/run/rpm-%{name}-update-uuidd.socket-new-in-upgrade - echo -n "" >/run/rpm-%{name}-update-uuidd.service-new-in-upgrade - fi -fi +%systemd_preset_pre %post -n uuidd %{service_add_post uuidd.socket uuidd.service} @@ -898,6 +892,9 @@ fi %postun -n uuidd %{service_del_postun uuidd.socket uuidd.service} + +%posttrans -p /bin/bash -n uuidd +%systemd_preset_posttrans %endif %if %build_util_linux diff --git a/util-linux-systemd.changes b/util-linux-systemd.changes index debe21f..7c9b3b8 100644 --- a/util-linux-systemd.changes +++ b/util-linux-systemd.changes @@ -1,7 +1,10 @@ ------------------------------------------------------------------- -Fri Jul 10 12:33:47 UTC 2015 - werner@suse.de +Tue Aug 4 20:31:55 CEST 2015 - sbrabec@suse.com -- Require systemd at build to not to own /usr/lib/systemd/system-preset +- Add %systemd_preset_pre and %systemd_preset_posttrans that will + do one shot presetting of uuidd.service on upgrade. + (bnc#900935#c46, FATE#318949). +- Remove one shot presetting hacks. ------------------------------------------------------------------- Mon May 25 16:26:01 UTC 2015 - crrodriguez@opensuse.org diff --git a/util-linux-systemd.spec b/util-linux-systemd.spec index 428f763..437159b 100644 --- a/util-linux-systemd.spec +++ b/util-linux-systemd.spec @@ -90,8 +90,6 @@ BuildRequires: ncurses-devel BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: readline-devel -# Due /usr/lib/systemd/system-preset -BuildRequires: systemd BuildRequires: utempter-devel BuildRequires: zlib-devel %if %verify_sig @@ -879,18 +877,12 @@ fi %postun -n util-linux-systemd %{service_del_postun fstrim.service fstrim.timer} -%pre -n uuidd +%pre -p /bin/bash -n uuidd /usr/sbin/groupadd -r uuidd 2>/dev/null || : /usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ -d /var/run/uuidd uuidd 2>/dev/null || : %{service_add_pre uuidd.socket uuidd.service} -# trick: service existed before, but it had no preset before 13.2 and in SLE12. Force %%service_add_post to run preset. -if [ $1 -gt 1 ] ; then - if ! test -f /usr/lib/systemd/system-preset/50-uuidd.preset ; then - echo -n "" >/run/rpm-%{name}-update-uuidd.socket-new-in-upgrade - echo -n "" >/run/rpm-%{name}-update-uuidd.service-new-in-upgrade - fi -fi +%systemd_preset_pre %post -n uuidd %{service_add_post uuidd.socket uuidd.service} @@ -900,6 +892,9 @@ fi %postun -n uuidd %{service_del_postun uuidd.socket uuidd.service} + +%posttrans -p /bin/bash -n uuidd +%systemd_preset_posttrans %endif %if %build_util_linux diff --git a/util-linux.changes b/util-linux.changes index b0d44b9..7c9b3b8 100644 --- a/util-linux.changes +++ b/util-linux.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Aug 4 20:31:55 CEST 2015 - sbrabec@suse.com + +- Add %systemd_preset_pre and %systemd_preset_posttrans that will + do one shot presetting of uuidd.service on upgrade. + (bnc#900935#c46, FATE#318949). +- Remove one shot presetting hacks. + ------------------------------------------------------------------- Mon May 25 16:26:01 UTC 2015 - crrodriguez@opensuse.org diff --git a/util-linux.spec b/util-linux.spec index 8b60102..cfabc73 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -877,18 +877,12 @@ fi %postun -n util-linux-systemd %{service_del_postun fstrim.service fstrim.timer} -%pre -n uuidd +%pre -p /bin/bash -n uuidd /usr/sbin/groupadd -r uuidd 2>/dev/null || : /usr/sbin/useradd -r -g uuidd -c "User for uuidd" \ -d /var/run/uuidd uuidd 2>/dev/null || : %{service_add_pre uuidd.socket uuidd.service} -# trick: service existed before, but it had no preset before 13.2 and in SLE12. Force %%service_add_post to run preset. -if [ $1 -gt 1 ] ; then - if ! test -f /usr/lib/systemd/system-preset/50-uuidd.preset ; then - echo -n "" >/run/rpm-%{name}-update-uuidd.socket-new-in-upgrade - echo -n "" >/run/rpm-%{name}-update-uuidd.service-new-in-upgrade - fi -fi +%systemd_preset_pre %post -n uuidd %{service_add_post uuidd.socket uuidd.service} @@ -898,6 +892,9 @@ fi %postun -n uuidd %{service_del_postun uuidd.socket uuidd.service} + +%posttrans -p /bin/bash -n uuidd +%systemd_preset_posttrans %endif %if %build_util_linux