forked from pool/systemd-rpm-macros
.
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=6
This commit is contained in:
parent
9c1f03c0b4
commit
45953f9b68
@ -29,6 +29,7 @@ Requires(preun): systemd \
|
|||||||
Requires(postun): systemd \
|
Requires(postun): systemd \
|
||||||
|
|
||||||
%_unitdir /usr/lib/systemd/system
|
%_unitdir /usr/lib/systemd/system
|
||||||
|
%_userunitdir /usr/lib/systemd/user
|
||||||
%_presetdir /usr/lib/systemd/system-preset
|
%_presetdir /usr/lib/systemd/system-preset
|
||||||
%_udevhwdbdir /usr/lib/udev/hwdb.d
|
%_udevhwdbdir /usr/lib/udev/hwdb.d
|
||||||
%_udevrulesdir /usr/lib/udev/rules.d
|
%_udevrulesdir /usr/lib/udev/rules.d
|
||||||
@ -36,6 +37,7 @@ Requires(postun): systemd \
|
|||||||
%_tmpfilesdir /usr/lib/tmpfiles.d
|
%_tmpfilesdir /usr/lib/tmpfiles.d
|
||||||
%_sysctldir /usr/lib/sysctl.d
|
%_sysctldir /usr/lib/sysctl.d
|
||||||
%_ntpunitsdir /usr/lib/systemd/ntp-units.d
|
%_ntpunitsdir /usr/lib/systemd/ntp-units.d
|
||||||
|
%_binfmtdir /usr/lib/binfmt.d
|
||||||
|
|
||||||
%service_add_pre() \
|
%service_add_pre() \
|
||||||
test -n "$FIRST_ARG" || FIRST_ARG=$1 \
|
test -n "$FIRST_ARG" || FIRST_ARG=$1 \
|
||||||
@ -108,6 +110,7 @@ test -n "$FIRST_ARG" || FIRST_ARG=$1 \
|
|||||||
if [ $FIRST_ARG -ge 1 ]; then \
|
if [ $FIRST_ARG -ge 1 ]; then \
|
||||||
# Package upgrade, not uninstall \
|
# Package upgrade, not uninstall \
|
||||||
if test "$YAST_IS_RUNNING" != "instsys" -a "$DISABLE_RESTART_ON_UPDATE" != yes ; then \
|
if test "$YAST_IS_RUNNING" != "instsys" -a "$DISABLE_RESTART_ON_UPDATE" != yes ; then \
|
||||||
|
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : \
|
||||||
/usr/bin/systemctl try-restart %{?*} >/dev/null 2>&1 || : \
|
/usr/bin/systemctl try-restart %{?*} >/dev/null 2>&1 || : \
|
||||||
fi \
|
fi \
|
||||||
else # package uninstall \
|
else # package uninstall \
|
||||||
@ -119,6 +122,43 @@ else # package uninstall \
|
|||||||
fi \
|
fi \
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
|
%systemd_post() \
|
||||||
|
if [ $1 -eq 0 ] ; then \
|
||||||
|
# Package removal, not upgrade \
|
||||||
|
/usr/bin/systemctl --no-reload disable %{?*} > /dev/null 2>&1 || : \
|
||||||
|
/usr/bin/systemctl stop %{?*} > /dev/null 2>&1 || : \
|
||||||
|
fi \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%systemd_user_post() %systemd_post --user --global %{?*}
|
||||||
|
|
||||||
|
%systemd_preun() \
|
||||||
|
if [ $1 -eq 0 ] ; then \
|
||||||
|
# Package removal, not upgrade \
|
||||||
|
/usr/bin/systemctl --no-reload disable %{?*} > /dev/null 2>&1 || : \
|
||||||
|
/usr/bin/systemctl stop %{?*} > /dev/null 2>&1 || : \
|
||||||
|
fi \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%systemd_user_preun() \
|
||||||
|
if [ $1 -eq 0 ] ; then \
|
||||||
|
# Package removal, not upgrade \
|
||||||
|
systemctl --no-reload --user --global disable %{?*} > /dev/null 2>&1 || : \
|
||||||
|
fi \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%systemd_postun() \
|
||||||
|
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%systemd_postun_with_restart() \
|
||||||
|
@rootbindir@/systemctl daemon-reload >/dev/null 2>&1 || : \
|
||||||
|
if [ $1 -ge 1 ] ; then \
|
||||||
|
# Package upgrade, not uninstall \
|
||||||
|
/usr/bin/systemctl try-restart %{?*} >/dev/null 2>&1 || : \
|
||||||
|
fi \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
%udev_hwdb_update() \
|
%udev_hwdb_update() \
|
||||||
/usr/bin/udevadm hwdb --update >/dev/null 2>&1 || : \
|
/usr/bin/udevadm hwdb --update >/dev/null 2>&1 || : \
|
||||||
%{nil}
|
%{nil}
|
||||||
@ -130,3 +170,16 @@ fi \
|
|||||||
%journal_catalog_update() \
|
%journal_catalog_update() \
|
||||||
/usr/bin/journalctl --update-catalog >/dev/null 2>&1 || : \
|
/usr/bin/journalctl --update-catalog >/dev/null 2>&1 || : \
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
|
%tmpfiles_create() \
|
||||||
|
/usr/bin/systemd-tmpfiles --create %{?*} >/dev/null 2>&1 || : \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%sysctl_apply() \
|
||||||
|
/usr/lib/systemd/systemd-sysctl %{?*} >/dev/null 2>&1 || : \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%binfmt_apply() \
|
||||||
|
/usr/lib/systemd/systemd-binfmt %{?*} >/dev/null 2>&1 || : \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
diff -Naur orig/macros.systemd mod/macros.systemd
|
|
||||||
--- orig/macros.systemd 2014-10-14 08:54:56.264889350 +0200
|
|
||||||
+++ mod/macros.systemd 2014-10-15 13:10:43.134133358 +0200
|
|
||||||
@@ -108,6 +108,7 @@
|
|
||||||
if [ $FIRST_ARG -ge 1 ]; then \
|
|
||||||
# Package upgrade, not uninstall \
|
|
||||||
if test "$YAST_IS_RUNNING" != "instsys" -a "$DISABLE_RESTART_ON_UPDATE" != yes ; then \
|
|
||||||
+ /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : \
|
|
||||||
/usr/bin/systemctl try-restart %{?*} >/dev/null 2>&1 || : \
|
|
||||||
fi \
|
|
||||||
else # package uninstall \
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 18 13:30:37 UTC 2014 - werner@suse.de
|
||||||
|
|
||||||
|
- Apply then delete patch systemd-daemon-reload-before-service-restart.patch
|
||||||
|
- Add orignal systemd macros as well (boo#807164)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 15 09:28:36 UTC 2014 - thomas.blume@suse.com
|
Wed Oct 15 09:28:36 UTC 2014 - thomas.blume@suse.com
|
||||||
|
|
||||||
|
@ -29,8 +29,6 @@ Source0: macros.systemd
|
|||||||
Requires: coreutils
|
Requires: coreutils
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# make systemd aware of changed unit file content after update
|
|
||||||
Patch0: systemd-daemon-reload-before-service-restart.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Starting with openSUSE 12.1, several RPM macros must be used to package systemd
|
Starting with openSUSE 12.1, several RPM macros must be used to package systemd
|
||||||
@ -38,7 +36,6 @@ services files. This package provides these macros.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
cd %{_sourcedir}
|
cd %{_sourcedir}
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user