From ee9e3a44ef4b2c848a935417802b25c020dbb76e 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) Conflicts: ceph.spec.in --- ceph.spec.in | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/ceph.spec.in b/ceph.spec.in index 4183a7d87e0..891105b6bab 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1444,12 +1444,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. @@ -1585,12 +1580,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. @@ -1659,12 +1649,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. @@ -1785,12 +1770,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. @@ -1842,12 +1822,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. @@ -1900,12 +1875,7 @@ fi %endif %postun radosgw -%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. @@ -1966,12 +1936,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.47.3