1
0
forked from pool/util-linux

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
This commit is contained in:
Marcus Meissner 2015-08-17 20:19:53 +00:00 committed by Git OBS Bridge
parent ae00e35b45
commit ae1b79cbf4
6 changed files with 37 additions and 29 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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