From nobody Sat Apr 27 13:46:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1532084137155282.75128698022877; Fri, 20 Jul 2018 03:55:37 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8350D3082A2F; Fri, 20 Jul 2018 10:55:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9BD1860851; Fri, 20 Jul 2018 10:55:34 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CE8A118037F0; Fri, 20 Jul 2018 10:55:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6KAtWJw015191 for ; Fri, 20 Jul 2018 06:55:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id 17B8C2166BA0; Fri, 20 Jul 2018 10:55:32 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.42.22.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id A33442156899; Fri, 20 Jul 2018 10:55:31 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Fri, 20 Jul 2018 11:55:28 +0100 Message-Id: <20180720105529.13545-2-berrange@redhat.com> In-Reply-To: <20180720105529.13545-1-berrange@redhat.com> References: <20180720105529.13545-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] rpm: increase min required RHEL to 7 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 20 Jul 2018 10:55:36 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 We no longer build on RHEL-6, so can bump min required RHEL to 7 removing many conditions. Signed-off-by: Daniel P. Berrang=C3=A9 --- libvirt.spec.in | 92 ++++++------------------------------------------- 1 file changed, 11 insertions(+), 81 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index f83e5f8601..150a168514 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -3,7 +3,7 @@ # This spec file assumes you are building on a Fedora or RHEL version # that's still supported by the vendor. It may work on other distros # or versions, but no effort will be made to ensure that going forward. -%define min_rhel 6 +%define min_rhel 7 %define min_fedora 26 =20 %if (0%{?fedora} && 0%{?fedora} >=3D %{min_fedora}) || (0%{?rhel} && 0%{?r= hel} >=3D %{min_rhel}) @@ -34,10 +34,7 @@ =20 %if 0%{?rhel} %define with_qemu_tcg 0 - %define qemu_kvm_arches x86_64 - %if 0%{?rhel} >=3D 7 - %define qemu_kvm_arches x86_64 %{power64} aarch64 s390x - %endif + %define qemu_kvm_arches x86_64 %{power64} aarch64 s390x %endif =20 %ifarch %{qemu_kvm_arches} @@ -58,11 +55,7 @@ %define with_hyperv 0%{!?_without_hyperv:1} =20 # Then the secondary host drivers, which run inside libvirtd -%if 0%{?fedora} || 0%{?rhel} >=3D 7 - %define with_storage_rbd 0%{!?_without_storage_rbd:1} -%else - %define with_storage_rbd 0 -%endif +%define with_storage_rbd 0%{!?_without_storage_rbd:1} %if 0%{?fedora} %define with_storage_sheepdog 0%{!?_without_storage_sheepdog:1} %else @@ -116,7 +109,7 @@ =20 # librados and librbd are built only on x86_64 on rhel %ifnarch x86_64 - %if 0%{?rhel} >=3D 7 + %if 0%{?rhel} %define with_storage_rbd 0 %endif %endif @@ -146,20 +139,12 @@ %endif %endif =20 -# Fedora 17 / RHEL-7 are first where we use systemd. Although earlier -# Fedora has systemd, libvirt still used sysvinit there. -%if 0%{?fedora} || 0%{?rhel} >=3D 7 - %define with_systemd 1 - %define with_pm_utils 0 -%endif - -# Fedora 18 / RHEL-7 are first where firewalld support is enabled -%if 0%{?fedora} || 0%{?rhel} >=3D 7 - %define with_firewalld 1 -%endif +%define with_systemd 1 +%define with_pm_utils 0 +%define with_firewalld 1 =20 # fuse is used to provide virtualized /proc for LXC -%if %{with_lxc} && 0%{?rhel} !=3D 6 +%if %{with_lxc} %define with_fuse 0%{!?_without_fuse:1} %endif =20 @@ -194,10 +179,7 @@ %define with_libssh 0%{!?_without_libssh:1} %endif =20 -# Enable bash-completion for new enough distros -%if 0%{?fedora} || 0%{?rhel} >=3D 7 - %define with_bash_completion 0%{!?_without_bash_completion:1} -%endif +%define with_bash_completion 0%{!?_without_bash_completion:1} =20 # Use Python 3 when possible, Python 2 otherwise %if 0%{?fedora} || 0%{?rhel} > 7 @@ -220,11 +202,7 @@ %define qemu_group qemu =20 =20 -%if 0%{?fedora} || 0%{?rhel} >=3D 7 - %define with_systemd_macros 1 -%else - %define with_systemd_macros 0 -%endif +%define with_systemd_macros 1 =20 =20 # RHEL releases provide stable tool chains and so it is safe to turn @@ -315,47 +293,29 @@ BuildRequires: bash-completion >=3D 2.0 BuildRequires: ncurses-devel BuildRequires: gettext BuildRequires: libtasn1-devel -%if (0%{?rhel} && 0%{?rhel} < 7) -BuildRequires: libgcrypt-devel -%endif BuildRequires: gnutls-devel BuildRequires: libattr-devel # For pool-build probing for existing pools BuildRequires: libblkid-devel >=3D 2.17 # for augparse, optionally used in testing BuildRequires: augeas -%if 0%{?fedora} || 0%{?rhel} >=3D 7 BuildRequires: systemd-devel >=3D 185 -%else -BuildRequires: libudev-devel >=3D 145 -%endif BuildRequires: libpciaccess-devel >=3D 0.10.9 BuildRequires: jansson-devel %if %{with_sanlock} BuildRequires: sanlock-devel >=3D 2.4 %endif BuildRequires: libpcap-devel -%if 0%{?rhel} && 0%{?rhel} < 7 -BuildRequires: libnl-devel -%else BuildRequires: libnl3-devel -%endif BuildRequires: avahi-devel BuildRequires: libselinux-devel BuildRequires: dnsmasq >=3D 2.41 BuildRequires: iptables -%if 0%{?rhel} && 0%{?rhel} < 7 -BuildRequires: iptables-ipv6 -%endif BuildRequires: radvd BuildRequires: ebtables BuildRequires: module-init-tools BuildRequires: cyrus-sasl-devel -%if 0%{?fedora} || 0%{?rhel} >=3D 7 BuildRequires: polkit >=3D 0.112 -%else -BuildRequires: polkit >=3D 0.93 -%endif # For mount/umount in FS driver BuildRequires: util-linux %if %{with_qemu} @@ -373,12 +333,8 @@ BuildRequires: parted-devel # For Multipath support BuildRequires: device-mapper-devel %if %{with_storage_rbd} - %if 0%{?fedora} || 0%{?rhel} >=3D 7 BuildRequires: librados2-devel BuildRequires: librbd1-devel - %else -BuildRequires: ceph-devel - %endif %endif %if %{with_storage_gluster} BuildRequires: glusterfs-api-devel >=3D 3.4.1 @@ -405,11 +361,7 @@ BuildRequires: fuse-devel >=3D 2.8.6 BuildRequires: libssh2-devel >=3D 1.3.0 %endif =20 -%if 0%{?fedora} || 0%{?rhel} >=3D 7 BuildRequires: netcf-devel >=3D 0.2.2 -%else -BuildRequires: netcf-devel >=3D 0.1.8 -%endif %if %{with_esx} BuildRequires: libcurl-devel %endif @@ -485,11 +437,7 @@ Requires: iproute-tc %endif =20 Requires: avahi-libs -%if 0%{?fedora} || 0%{?rhel} >=3D 7 Requires: polkit >=3D 0.112 -%else -Requires: polkit >=3D 0.93 -%endif %ifarch %{ix86} x86_64 ia64 # For virConnectGetSysinfo Requires: dmidecode @@ -539,9 +487,6 @@ Requires: libvirt-libs =3D %{version}-%{release} Requires: dnsmasq >=3D 2.41 Requires: radvd Requires: iptables -%if 0%{?rhel} && 0%{?rhel} < 7 -Requires: iptables-ipv6 -%endif =20 %description daemon-driver-network The network driver plugin for the libvirtd daemon, providing @@ -554,9 +499,6 @@ Summary: Nwfilter driver plugin for the libvirtd daemon Requires: libvirt-daemon =3D %{version}-%{release} Requires: libvirt-libs =3D %{version}-%{release} Requires: iptables -%if 0%{?rhel} && 0%{?rhel} < 7 -Requires: iptables-ipv6 -%endif Requires: ebtables =20 %description daemon-driver-nwfilter @@ -570,11 +512,7 @@ Summary: Nodedev driver plugin for the libvirtd daemon Requires: libvirt-daemon =3D %{version}-%{release} Requires: libvirt-libs =3D %{version}-%{release} # needed for device enumeration -%if 0%{?fedora} || 0%{?rhel} >=3D 7 Requires: systemd >=3D 185 -%else -Requires: udev >=3D 145 -%endif =20 %description daemon-driver-nodedev The nodedev driver plugin for the libvirtd daemon, providing @@ -586,9 +524,7 @@ capabilities. Summary: Interface driver plugin for the libvirtd daemon Requires: libvirt-daemon =3D %{version}-%{release} Requires: libvirt-libs =3D %{version}-%{release} -%if (0%{?fedora} || 0%{?rhel} >=3D 7) Requires: netcf-libs >=3D 0.2.2 -%endif =20 %description daemon-driver-interface The interface driver plugin for the libvirtd daemon, providing @@ -1254,11 +1190,7 @@ exit 1 %define arg_init_script --with-init-script=3Dredhat %endif =20 -%if 0%{?fedora} || 0%{?rhel} >=3D 7 - %define arg_selinux_mount --with-selinux-mount=3D"/sys/fs/selinux" -%else - %define arg_selinux_mount --with-selinux-mount=3D"/selinux" -%endif +%define arg_selinux_mount --with-selinux-mount=3D"/sys/fs/selinux" =20 %if 0%{?fedora} # Nightly firmware repo x86/OVMF @@ -2028,8 +1960,6 @@ exit 0 %attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh =20 %files libs -f %{name}.lang -# RHEL6 doesn't have 'license' macro -%{!?_licensedir:%global license %%doc} %license COPYING COPYING.LESSER %config(noreplace) %{_sysconfdir}/libvirt/libvirt.conf %config(noreplace) %{_sysconfdir}/libvirt/libvirt-admin.conf --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat Apr 27 13:46:55 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1532084139364234.32913965055093; Fri, 20 Jul 2018 03:55:39 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D3839308214C; Fri, 20 Jul 2018 10:55:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7B7181001938; Fri, 20 Jul 2018 10:55:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2CB1F4A460; Fri, 20 Jul 2018 10:55:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6KAtWFx015196 for ; Fri, 20 Jul 2018 06:55:32 -0400 Received: by smtp.corp.redhat.com (Postfix) id B478E21568A0; Fri, 20 Jul 2018 10:55:32 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.42.22.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4CEEE2156899; Fri, 20 Jul 2018 10:55:32 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Fri, 20 Jul 2018 11:55:29 +0100 Message-Id: <20180720105529.13545-3-berrange@redhat.com> In-Reply-To: <20180720105529.13545-1-berrange@redhat.com> References: <20180720105529.13545-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] rpm: remove conditionals for systemd X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 20 Jul 2018 10:55:38 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 All our supported RHEL and Fedora versions include systemd, so we can assume it is always present in the spec. Signed-off-by: Daniel P. Berrang=C3=A9 --- libvirt.spec.in | 160 ++++-------------------------------------------- 1 file changed, 12 insertions(+), 148 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 150a168514..4113579e47 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -74,14 +74,12 @@ # A few optional bits off by default, we enable later %define with_fuse 0%{!?_without_fuse:0} %define with_sanlock 0%{!?_without_sanlock:0} -%define with_systemd 0%{!?_without_systemd:0} %define with_numad 0%{!?_without_numad:0} %define with_firewalld 0%{!?_without_firewalld:0} %define with_libssh2 0%{!?_without_libssh2:0} %define with_wireshark 0%{!?_without_wireshark:0} %define with_libssh 0%{!?_without_libssh:0} %define with_bash_completion 0%{!?_without_bash_completion:0} -%define with_pm_utils 1 =20 # Finally set the OS / architecture specific special cases =20 @@ -139,8 +137,6 @@ %endif %endif =20 -%define with_systemd 1 -%define with_pm_utils 0 %define with_firewalld 1 =20 # fuse is used to provide virtualized /proc for LXC @@ -202,9 +198,6 @@ %define qemu_group qemu =20 =20 -%define with_systemd_macros 1 - - # RHEL releases provide stable tool chains and so it is safe to turn # compiler warning into errors without being worried about frequent # changes in reported warnings @@ -278,9 +271,7 @@ BuildRequires: perl-interpreter BuildRequires: perl %endif BuildRequires: %{python} -%if %{with_systemd} BuildRequires: systemd-units -%endif %if %{with_libxl} BuildRequires: xen-devel %endif @@ -443,12 +434,10 @@ Requires: polkit >=3D 0.112 Requires: dmidecode %endif # For service management -%if %{with_systemd} Requires(post): systemd-units Requires(post): systemd-sysv Requires(preun): systemd-units Requires(postun): systemd-units -%endif %if %{with_numad} Requires: numad %endif @@ -909,10 +898,6 @@ Requires: ncurses Requires: gettext # Needed by virt-pki-validate script. Requires: gnutls-utils -%if %{with_pm_utils} -# Needed for probing the power management features of the host. -Requires: pm-utils -%endif %if %{with_bash_completion} Requires: %{name}-bash-completion =3D %{version}-%{release} %endif @@ -1172,24 +1157,12 @@ exit 1 %define arg_wireshark --without-wireshark-dissector %endif =20 -%if %{with_pm_utils} - %define arg_pm_utils --with-pm-utils -%else - %define arg_pm_utils --without-pm-utils -%endif - %define when %(date +"%%F-%%T") %define where %(hostname) %define who %{?packager}%{!?packager:Unknown} %define arg_packager --with-packager=3D"%{who}, %{when}, %{where}" %define arg_packager_version --with-packager-version=3D"%{release}" =20 -%if %{with_systemd} - %define arg_init_script --with-init-script=3Dsystemd -%else - %define arg_init_script --with-init-script=3Dredhat -%endif - %define arg_selinux_mount --with-selinux-mount=3D"/sys/fs/selinux" =20 %if 0%{?fedora} @@ -1262,7 +1235,7 @@ rm -f po/stamp-po --with-driver-modules \ %{?arg_firewalld} \ %{?arg_wireshark} \ - %{?arg_pm_utils} \ + --without-pm-utils \ --with-nss-plugin \ %{arg_packager} \ %{arg_packager_version} \ @@ -1272,7 +1245,7 @@ rm -f po/stamp-po %{?arg_loader_nvram} \ %{?enable_werror} \ --enable-expensive-tests \ - %{arg_init_script} \ + --with-init-script=3Dsystemd \ %{?arg_login_shell} make %{?_smp_mflags} V=3D1 gzip -9 ChangeLog @@ -1396,83 +1369,25 @@ exit 0 =20 %post daemon =20 -%if %{with_systemd} - %if %{with_systemd_macros} - %systemd_post virtlockd.socket virtlockd-admin.socket - %systemd_post virtlogd.socket virtlogd-admin.socket - %systemd_post libvirtd.service - %else -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl enable \ - virtlockd.socket \ - virtlockd-admin.socket \ - virtlogd.socket \ - virtlogd-admin.socket \ - libvirtd.service >/dev/null 2>&1 || : -fi - %endif -%else -/sbin/chkconfig --add libvirtd -/sbin/chkconfig --add virtlogd -/sbin/chkconfig --add virtlockd -%endif +%systemd_post virtlockd.socket virtlockd-admin.socket +%systemd_post virtlogd.socket virtlogd-admin.socket +%systemd_post libvirtd.service =20 # request daemon restart in posttrans mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || : touch %{_localstatedir}/lib/rpm-state/libvirt/restart || : =20 %preun daemon -%if %{with_systemd} - %if %{with_systemd_macros} - %systemd_preun libvirtd.service - %systemd_preun virtlogd.socket virtlogd-admin.socket virtlogd.serv= ice - %systemd_preun virtlockd.socket virtlockd-admin.socket virtlockd.s= ervice - %else -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable \ - libvirtd.service \ - virtlogd.socket \ - virtlogd-admin.socket \ - virtlogd.service \ - virtlockd.socket \ - virtlockd-admin.socket \ - virtlockd.service > /dev/null 2>&1 || : - /bin/systemctl stop \ - libvirtd.service \ - virtlogd.socket \ - virtlogd-admin.socket \ - virtlogd.service \ - virtlockd.socket \ - virtlockd-admin.socket \ - virtlockd.service > /dev/null 2>&1 || : -fi - %endif -%else -if [ $1 =3D 0 ]; then - /sbin/service libvirtd stop 1>/dev/null 2>&1 - /sbin/chkconfig --del libvirtd - /sbin/service virtlogd stop 1>/dev/null 2>&1 - /sbin/chkconfig --del virtlogd - /sbin/service virtlockd stop 1>/dev/null 2>&1 - /sbin/chkconfig --del virtlockd -fi -%endif +%systemd_preun libvirtd.service +%systemd_preun virtlogd.socket virtlogd-admin.socket virtlogd.service +%systemd_preun virtlockd.socket virtlockd-admin.socket virtlockd.service =20 %postun daemon -%if %{with_systemd} /bin/systemctl daemon-reload >/dev/null 2>&1 || : if [ $1 -ge 1 ] ; then /bin/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1= || : /bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 = || : fi -%else -if [ $1 -ge 1 ]; then - /sbin/service virtlockd reload > /dev/null 2>&1 || : - /sbin/service virtlogd reload > /dev/null 2>&1 || : -fi -%endif =20 # In upgrade scenario we must explicitly enable virtlockd/virtlogd # sockets, if libvirtd is already enabled and start them if @@ -1480,28 +1395,15 @@ fi # guests %triggerpostun daemon -- libvirt-daemon < 1.3.0 if [ $1 -ge 1 ] ; then -%if %{with_systemd} /bin/systemctl is-enabled libvirtd.service 1>/dev/null 2>&1 && /bin/systemctl enable virtlogd.socket virtlogd-admin.socket || : /bin/systemctl is-active libvirtd.service 1>/dev/null 2>&1 && /bin/systemctl start virtlogd.socket virtlogd-admin.socket || : -%else - /sbin/chkconfig libvirtd 1>/dev/null 2>&1 && - /sbin/chkconfig virtlogd on || : - /sbin/service libvirtd status 1>/dev/null 2>&1 && - /sbin/service virtlogd start || : - /sbin/service virtlockd reload > /dev/null 2>&1 || : - /sbin/service virtlogd reload > /dev/null 2>&1 || : -%endif fi =20 %posttrans daemon if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then -%if %{with_systemd} /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : -%else - /sbin/service libvirtd condrestart > /dev/null 2>&1 || : -%endif fi rm -rf %{_localstatedir}/lib/rpm-state/libvirt || : =20 @@ -1549,11 +1451,7 @@ fi =20 %posttrans daemon-config-network if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then -%if %{with_systemd} /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : -%else - /sbin/service libvirtd condrestart > /dev/null 2>&1 || : -%endif fi rm -rf %{_localstatedir}/lib/rpm-state/libvirt || : =20 @@ -1565,16 +1463,11 @@ touch %{_localstatedir}/lib/rpm-state/libvirt/resta= rt || : =20 %posttrans daemon-config-nwfilter if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then -%if %{with_systemd} /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : -%else - /sbin/service libvirtd condrestart > /dev/null 2>&1 || : -%endif fi rm -rf %{_localstatedir}/lib/rpm-state/libvirt || : =20 =20 -%if %{with_systemd} %triggerun -- libvirt < 0.9.4 %{_bindir}/systemd-sysv-convert --save libvirtd >/dev/null 2>&1 ||: =20 @@ -1584,7 +1477,6 @@ rm -rf %{_localstatedir}/lib/rpm-state/libvirt || : # Run these because the SysV package being removed won't do them /sbin/chkconfig --del libvirtd >/dev/null 2>&1 || : /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : -%endif =20 %if %{with_qemu} %pre daemon-driver-qemu @@ -1605,35 +1497,18 @@ exit 0 =20 %preun client =20 -%if %{with_systemd} - %if %{with_systemd_macros} - %systemd_preun libvirt-guests.service - %endif -%else -if [ $1 =3D 0 ]; then - /sbin/chkconfig --del libvirt-guests - rm -f /var/lib/libvirt/libvirt-guests -fi -%endif +%systemd_preun libvirt-guests.service =20 %post client =20 /sbin/ldconfig -%if %{with_systemd} - %if %{with_systemd_macros} - %systemd_post libvirt-guests.service - %endif -%else -/sbin/chkconfig --add libvirt-guests -%endif +%systemd_post libvirt-guests.service =20 %postun client =20 /sbin/ldconfig -%if %{with_systemd} - %if %{with_systemd_macros} - %systemd_postun libvirt-guests.service - %endif +%systemd_postun libvirt-guests.service + %triggerun client -- libvirt < 0.9.4 %{_bindir}/systemd-sysv-convert --save libvirt-guests >/dev/null 2>&1 ||: =20 @@ -1642,7 +1517,6 @@ fi =20 # Run this because the SysV package being removed won't do them /sbin/chkconfig --del libvirt-guests >/dev/null 2>&1 || : -%endif =20 %if %{with_sanlock} %post lock-sanlock @@ -1686,7 +1560,6 @@ exit 0 =20 %dir %attr(0700, root, root) %{_sysconfdir}/libvirt/ =20 -%if %{with_systemd} %{_unitdir}/libvirtd.service %{_unitdir}/virt-guest-shutdown.target %{_unitdir}/virtlogd.service @@ -1695,11 +1568,6 @@ exit 0 %{_unitdir}/virtlockd.service %{_unitdir}/virtlockd.socket %{_unitdir}/virtlockd-admin.socket -%else -%{_sysconfdir}/rc.d/init.d/libvirtd -%{_sysconfdir}/rc.d/init.d/virtlogd -%{_sysconfdir}/rc.d/init.d/virtlockd -%endif %config(noreplace) %{_sysconfdir}/sysconfig/libvirtd %config(noreplace) %{_sysconfdir}/sysconfig/virtlogd %config(noreplace) %{_sysconfdir}/sysconfig/virtlockd @@ -1951,11 +1819,7 @@ exit 0 %endif =20 =20 -%if %{with_systemd} %{_unitdir}/libvirt-guests.service -%else -%{_sysconfdir}/rc.d/init.d/libvirt-guests -%endif %config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests %attr(0755, root, root) %{_libexecdir}/libvirt-guests.sh =20 --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list