From 1d80aaff7a6475a1370b323b85e1db356614378a Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Tue, 29 Sep 2020 15:46:35 +0200 Subject: [PATCH] rpm: cleanup: drop %service_del_postun_without_restart SUSE needs %service_del_postun (with or without restart) *only* if there is a possibility that the RPM containing the unit file will be upgraded from a version that packaged SysVinit scripts instead of systemd unit files. (Which is not the case here.) Signed-off-by: Nathan Cutler (cherry picked from commit f69aa5abfb2279919026144aa51e3c72f593e935) --- ceph.spec.in | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index 2a90c3755de0b..1d18c50ae5d51 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1452,12 +1452,7 @@ fi %postun base /sbin/ldconfig -%if 0%{?suse_version} -%service_del_postun_without_restart ceph.target -%endif -%if 0%{?fedora} || 0%{?rhel} %systemd_postun ceph.target -%endif if [ $1 -ge 1 ] ; then # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to # "yes". In any case: if units are not running, do not touch them. @@ -1611,12 +1606,7 @@ fi %endif %postun mds -%if 0%{?suse_version} -%service_del_postun_without_restart ceph-mds@\*.service ceph-mds.target -%endif -%if 0%{?fedora} || 0%{?rhel} %systemd_postun ceph-mds@\*.service ceph-mds.target -%endif if [ $1 -ge 1 ] ; then # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to # "yes". In any case: if units are not running, do not touch them. @@ -1663,12 +1653,7 @@ fi %endif %postun mgr -%if 0%{?suse_version} -%service_del_postun_without_restart ceph-mgr@\*.service ceph-mgr.target -%endif -%if 0%{?fedora} || 0%{?rhel} %systemd_postun ceph-mgr@\*.service ceph-mgr.target -%endif if [ $1 -ge 1 ] ; then # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to # "yes". In any case: if units are not running, do not touch them. @@ -1815,12 +1800,7 @@ fi %endif %postun mon -%if 0%{?suse_version} -%service_del_postun_without_restart ceph-mon@\*.service ceph-mon.target -%endif -%if 0%{?fedora} || 0%{?rhel} %systemd_postun ceph-mon@\*.service ceph-mon.target -%endif if [ $1 -ge 1 ] ; then # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to # "yes". In any case: if units are not running, do not touch them. @@ -1872,12 +1852,7 @@ fi %endif %postun -n rbd-mirror -%if 0%{?suse_version} -%service_del_postun_without_restart ceph-rbd-mirror@\*.service ceph-rbd-mirror.target -%endif -%if 0%{?fedora} || 0%{?rhel} %systemd_postun ceph-rbd-mirror@\*.service ceph-rbd-mirror.target -%endif if [ $1 -ge 1 ] ; then # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to # "yes". In any case: if units are not running, do not touch them. @@ -1919,12 +1894,7 @@ fi %postun immutable-object-cache test -n "$FIRST_ARG" || FIRST_ARG=$1 -%if 0%{?suse_version} -%service_del_postun_without_restart ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target -%endif -%if 0%{?fedora} || 0%{?rhel} %systemd_postun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target -%endif if [ $FIRST_ARG -ge 1 ] ; then # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to # "yes". In any case: if units are not running, do not touch them. @@ -1980,12 +1950,7 @@ fi %postun radosgw /sbin/ldconfig -%if 0%{?suse_version} -%service_del_postun_without_restart ceph-radosgw@\*.service ceph-radosgw.target -%endif -%if 0%{?fedora} || 0%{?rhel} %systemd_postun ceph-radosgw@\*.service ceph-radosgw.target -%endif if [ $1 -ge 1 ] ; then # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to # "yes". In any case: if units are not running, do not touch them. @@ -2046,12 +2011,7 @@ fi %endif %postun osd -%if 0%{?suse_version} -%service_del_postun_without_restart ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target -%endif -%if 0%{?fedora} || 0%{?rhel} %systemd_postun ceph-osd@\*.service ceph-volume@\*.service ceph-osd.target -%endif if [ $1 -ge 1 ] ; then # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to # "yes". In any case: if units are not running, do not touch them. -- 2.39.5