From nobody Thu May 2 11:38:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1628009347; cv=none; d=zohomail.com; s=zohoarc; b=HC2kUuzwOtMJCcSarQz283C5nNtWa/KVfGwR2Vsr/OcIKP0fGoRHgXGtcPM7jy21BZlGGAd8QkqNtGTfpaWz158H2/qkXpC7CMr+d/1dxdvuzQVR+ac1UXtNTtgwaWSrKeblm+cMazHszGAk8c/DaUIj9UKNeMEtZZisARz7iSQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628009347; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Bd41NLM7n6mfF2Lj2uhMh1As6RAfGnMg/OqMeCnS0Fo=; b=THfz0zanweNmc6jkJ8hPQPm4PH+S7uyxM96ZgLcOr6QEIf2ES75JvZRN9ggaVtuC9mJaWAhMaovuXmOfblrBK1OKB6wMlzU4pb2E9AcshwJGF7h3XCRJOmau3Y2d8R/BKC3Igi95guylzpaShdm9c/sryYA+QTm7C9VEL3+MqNw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1628009347206500.88875772838276; Tue, 3 Aug 2021 09:49:07 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-139-e4BAAnJxPSuRykhywzvWFA-1; Tue, 03 Aug 2021 12:49:02 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id BE4951853029; Tue, 3 Aug 2021 16:48:56 +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 A28037A8D5; Tue, 3 Aug 2021 16:48:56 +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 7376D50050; Tue, 3 Aug 2021 16:48:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 173G83mb017969 for ; Tue, 3 Aug 2021 12:08:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id B718427C3A; Tue, 3 Aug 2021 16:08:03 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.39.194.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id C8DD23AA2; Tue, 3 Aug 2021 16:08:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628009346; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Bd41NLM7n6mfF2Lj2uhMh1As6RAfGnMg/OqMeCnS0Fo=; b=U9VeynSZ6mUAVqOcbZQlzUQQzH56/oe7EFvhMwTkCjU9mBASs0LJaKf0D055r/qnxdXByK OYYvBBfmJ9OxtcQF35ztbwUHcl6rciRfXk0hDc/vduD2fe3w+LjI2WqeqEJvSFBzwEh8kf YK4+1WP6S4etnNYkgJMD+F3imHREDHM= X-MC-Unique: e4BAAnJxPSuRykhywzvWFA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 1/6] rpm: macroize logic for restarting daemons post-transaction Date: Tue, 3 Aug 2021 17:07:49 +0100 Message-Id: <20210803160754.3333793-2-berrange@redhat.com> In-Reply-To: <20210803160754.3333793-1-berrange@redhat.com> References: <20210803160754.3333793-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1628010251657100001 The patterns for restarting daemons post-transaction has a bit of duplication across the different part of the spec. This is going to get much worse with the need to restart modular daemons, so benefits from macroization. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Michal Privoznik --- libvirt.spec.in | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 5c6494eefd..1d657aec35 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1248,6 +1248,21 @@ mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvi= rt_qemu_probes.stp \ # raising the test timeout VIR_TEST_DEBUG=3D1 %meson_test --no-suite syntax-check --timeout-multiplie= r 10 =20 +%global libvirt_daemon_schedule_restart() mkdir -p %{_localstatedir}/lib/r= pm-state/libvirt || : \ +/bin/systemctl is-active %1.service 1>/dev/null 2>&1 && \ + touch %{_localstatedir}/lib/rpm-state/libvirt/restart-%1 || : + +%global libvirt_daemon_finish_restart() rm -f %{_localstatedir}/lib/rpm-st= ate/libvirt/restart-%1 \ +rmdir %{_localstatedir}/lib/rpm-state/libvirt 2>/dev/null || : + +%global libvirt_daemon_needs_restart() -f %{_localstatedir}/lib/rpm-state/= libvirt/restart-%1 + +%global libvirt_daemon_perform_restart() if test %libvirt_daemon_needs_res= tart %1 \ +then \ + /bin/systemctl try-restart %1.service >/dev/null 2>&1 || : \ +fi \ +%libvirt_daemon_finish_restart %1 + %pre daemon # 'libvirt' group is just to allow password-less polkit access to # libvirtd. The uid number is irrelevant, so we use dynamic allocation @@ -1267,9 +1282,7 @@ exit 0 =20 %systemd_post %post_units =20 -# request daemon restart in posttrans -mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || : -touch %{_localstatedir}/lib/rpm-state/libvirt/restart || : +%libvirt_daemon_schedule_restart libvirtd =20 %preun daemon %global preun_units \\\ @@ -1302,7 +1315,8 @@ if [ $1 -ge 1 ] ; then fi =20 %posttrans daemon -if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then +if test %libvirt_daemon_needs_restart libvirtd +then # See if user has previously modified their install to # tell libvirtd to use --listen grep -E '^LIBVIRTD_ARGS=3D.*--listen' /etc/sysconfig/libvirtd 1>/dev/n= ull 2>&1 @@ -1338,7 +1352,8 @@ if [ -f %{_localstatedir}/lib/rpm-state/libvirt/resta= rt ]; then fi fi fi -rm -rf %{_localstatedir}/lib/rpm-state/libvirt || : + +%libvirt_daemon_finish_restart libvirtd =20 %post daemon-driver-network %if %{with_firewalld_zone} @@ -1388,15 +1403,11 @@ if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvir= t/qemu/networks/default.xml ; chmod 0600 %{_sysconfdir}/libvirt/qemu/networks/default.xml =20 # Make sure libvirt picks up the new network defininiton - mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || : - touch %{_localstatedir}/lib/rpm-state/libvirt/restart || : + %libvirt_daemon_schedule_restart libvirtd fi =20 %posttrans daemon-config-network -if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then - /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : -fi -rm -rf %{_localstatedir}/lib/rpm-state/libvirt || : +%libvirt_daemon_perform_restart libvirtd =20 %post daemon-config-nwfilter for datadir_file in %{_datadir}/libvirt/nwfilter/*.xml; do @@ -1407,15 +1418,10 @@ for datadir_file in %{_datadir}/libvirt/nwfilter/*.= xml; do fi done # Make sure libvirt picks up the new nwfilter defininitons -mkdir -p %{_localstatedir}/lib/rpm-state/libvirt || : -touch %{_localstatedir}/lib/rpm-state/libvirt/restart || : +%libvirt_daemon_schedule_restart libvirtd =20 %posttrans daemon-config-nwfilter -if [ -f %{_localstatedir}/lib/rpm-state/libvirt/restart ]; then - /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : -fi -rm -rf %{_localstatedir}/lib/rpm-state/libvirt || : - +%libvirt_daemon_perform_restart libvirtd =20 %if %{with_qemu} %pre daemon-driver-qemu --=20 2.31.1 From nobody Thu May 2 11:38:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1628009348; cv=none; d=zohomail.com; s=zohoarc; b=Y1KammNVx4y0Usm86TOPEKWbcJjVwcWoQRT2wJN8bWgSzWowJt+OUoQIqzS4ky1+ItA6BdP3IPYnPnrtnXceD7sY4se9Xt1lhA0pm/P4/n8b1Cf99zsFiYY58AJ3ZqnYdc2HAKHnHvAqtsKD9h1qfcql6pBff+7szApmx3zzy6E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628009348; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=69L2M/JbhCeVzg5e/upJCxZ8oT26gbuO1NXeJ6ExhgY=; b=DLayCtJv8+pHulliRkTbACJqGEi6DXa8rBHFXyTZWmNdog5xq17RbeBHemv2pgu6TphueI6LZjVIfqcBoYyudGGcA9Yk+IEDeZq76LDrpFQYLA/tr+uJZF17K9cWAgb7FQrMaOd2lLNx8OobPxR02aqg1/RbVZIbUHjRfr6QV1E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 162800934850537.08622749496271; Tue, 3 Aug 2021 09:49:08 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-203-GvnXLowQOLe7FfkVXHCnNQ-1; Tue, 03 Aug 2021 12:49:05 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2316993929; Tue, 3 Aug 2021 16:49:00 +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 F3FDC60C9D; Tue, 3 Aug 2021 16:48:59 +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 BDD28473CD; Tue, 3 Aug 2021 16:48:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 173G85AR017975 for ; Tue, 3 Aug 2021 12:08:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 78E8826FC0; Tue, 3 Aug 2021 16:08:05 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.39.194.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id A6EE227C4E; Tue, 3 Aug 2021 16:08:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628009347; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=69L2M/JbhCeVzg5e/upJCxZ8oT26gbuO1NXeJ6ExhgY=; b=V49GRXnTGeBxPYS0tIwDF26hMYfg2d2JJOKDxY2B4nquOK1mcHK2cMjuYR+m302mgfJ8hn 4wgfqFWBL0TpEdKrsZd+Z8+WB5Xx7GsS6oeOyQn7U5WsRakWNdNqpBwUC+fW2vw1BUikFO Aq7jPKafOMfoKUGLwqG7p+UbF5gQGBU= X-MC-Unique: GvnXLowQOLe7FfkVXHCnNQ-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/6] rpm: restart virtnwfilter/virnetworkd if configs change Date: Tue, 3 Aug 2021 17:07:50 +0100 Message-Id: <20210803160754.3333793-3-berrange@redhat.com> In-Reply-To: <20210803160754.3333793-1-berrange@redhat.com> References: <20210803160754.3333793-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1628009349179100002 Currently we restart libvirtd if the nwfilter/network configs have changed. We need to take account of possibility that the modular daemons are in use instead though. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Michal Privoznik --- libvirt.spec.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index 1d657aec35..c00d4c73da 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1404,10 +1404,12 @@ if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvir= t/qemu/networks/default.xml ; =20 # Make sure libvirt picks up the new network defininiton %libvirt_daemon_schedule_restart libvirtd + %libvirt_daemon_schedule_restart virtnetworkd fi =20 %posttrans daemon-config-network %libvirt_daemon_perform_restart libvirtd +%libvirt_daemon_perform_restart virtnetworkd =20 %post daemon-config-nwfilter for datadir_file in %{_datadir}/libvirt/nwfilter/*.xml; do @@ -1419,9 +1421,11 @@ for datadir_file in %{_datadir}/libvirt/nwfilter/*.x= ml; do done # Make sure libvirt picks up the new nwfilter defininitons %libvirt_daemon_schedule_restart libvirtd +%libvirt_daemon_schedule_restart virtnwfilterd =20 %posttrans daemon-config-nwfilter %libvirt_daemon_perform_restart libvirtd +%libvirt_daemon_perform_restart virtnwfilterd =20 %if %{with_qemu} %pre daemon-driver-qemu --=20 2.31.1 From nobody Thu May 2 11:38:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1628009363; cv=none; d=zohomail.com; s=zohoarc; b=YTdGeLegkV3Ay8DrWkgzANKXxvUfhap8Hhwdoko8VD+P8zbSCL+/IHPssn+NClFn5ImjMfd4tzt+XNL1T0hX/nVUgScp+B1kk9TT9l/woC+ZULLyY4AcYc1PR8sPy1F+4AIs1tyQVaB6YqvZHDMtC6tHV6Qn4q7oqp7SUYQNcxA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628009363; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=R4Asxmdy/XcHmbdMlp0IUAIopzMmY7gyJcASlKycG1E=; b=mBwKlBqkUMBuUIYfemaO2/1/boZtFOELO0T7ekM9nQ0YDzmokozGIryerBnmgmcNUE6SPCUJrzRw4hx/l03kfvc0ojmLnwrLEdFeKWU5Lh4po7cq2DCV8JnMbpQHbdSOr6ZyEE9XJSjGOhQLGud7eA1xnSdIv/JTdHud7hCNzLw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1628009363036292.120878722258; Tue, 3 Aug 2021 09:49:23 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-189-1w-IDLznMDWh7TIUqWUfEw-1; Tue, 03 Aug 2021 12:49:15 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C90601008064; Tue, 3 Aug 2021 16:49:02 +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 ACB6519CBA; Tue, 3 Aug 2021 16:49:02 +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 777F1473D4; Tue, 3 Aug 2021 16:49:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 173G86An017982 for ; Tue, 3 Aug 2021 12:08:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9BBA626FC0; Tue, 3 Aug 2021 16:08:06 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.39.194.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id D9F563AA2; Tue, 3 Aug 2021 16:08:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628009362; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=R4Asxmdy/XcHmbdMlp0IUAIopzMmY7gyJcASlKycG1E=; b=RN7vCMowODZgPt+d2p4xsa7pPac4xG1puvMgJJmUjIT3en2ySvCZQROxatbCIOkw6Y++FS DbIqT3aEYr1YZ5Z7E+M0DjBu7fX4dUJleYd/PDMuTlS1SlrngLIfYu33nbGcNvIrtNuzXw HCQqsplSyVD3ASvDb2wCjXVrVMNYFBo= X-MC-Unique: 1w-IDLznMDWh7TIUqWUfEw-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 3/6] rpm: restart modular daemons on upgrade Date: Tue, 3 Aug 2021 17:07:51 +0100 Message-Id: <20210803160754.3333793-4-berrange@redhat.com> In-Reply-To: <20210803160754.3333793-1-berrange@redhat.com> References: <20210803160754.3333793-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1628009364271100001 The daemons all need restarting to ensure they pick up the newly installed code. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Michal Privoznik --- libvirt.spec.in | 69 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index c00d4c73da..3999afad8b 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1360,11 +1360,80 @@ fi %firewalld_reload %endif =20 +%libvirt_daemon_schedule_restart virtnetworkd + %postun daemon-driver-network %if %{with_firewalld_zone} %firewalld_reload %endif =20 +%posttrans daemon-driver-network +%libvirt_daemon_perform_restart virtnetwork + + +%post daemon-driver-nwfilter +%libvirt_daemon_schedule_restart virtnwfilterd + +%posttrans daemon-driver-nwfilter +%libvirt_daemon_perform_restart virtnwfilterd + + +%post daemon-driver-nodedev +%libvirt_daemon_schedule_restart virtnodedevd + +%posttrans daemon-driver-nodedev +%libvirt_daemon_perform_restart virtnodedevd + + +%post daemon-driver-interface +%libvirt_daemon_schedule_restart virtinterfaced + +%posttrans daemon-driver-interface +%libvirt_daemon_perform_restart virtinterfaced + + +%post daemon-driver-secret +%libvirt_daemon_schedule_restart virtsecretd + +%posttranstrans daemon-driver-secret +%libvirt_daemon_perform_restart virtsecretd + + +%post daemon-driver-storage +%libvirt_daemon_schedule_restart virtstoraged + +%posttrans daemon-driver-storage +%libvirt_daemon_perform_restart virtstoraged + + +%post daemon-driver-qemu +%libvirt_daemon_schedule_restart virtqemud + +%posttrans daemon-driver-qemu +%libvirt_daemon_perform_restart virtqemud + + +%post daemon-driver-lxc +%libvirt_daemon_schedule_restart virtlxcd + +%posttrans daemon-driver-lxc +%libvirt_daemon_perform_restart virtlxcd + + +%post daemon-driver-vbox +%libvirt_daemon_schedule_restart virtvboxd + +%posttrans daemon-driver-vbox +%libvirt_daemon_perform_restart virtvboxd + + +%post daemon-driver-libxl +%libvirt_daemon_schedule_restart virtxend + +%posttrans daemon-driver-libxl +%libvirt_daemon_perform_restart virtxend + + %post daemon-config-network if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default= .xml ; then # see if the network used by default network creates a conflict, --=20 2.31.1 From nobody Thu May 2 11:38:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1628009349; cv=none; d=zohomail.com; s=zohoarc; b=IwuGDyI9lUfddVn11/uuPkySnJQrW1Cej0Y3/rr2Zn5STX2oV9OziHELwPkAivFuPwfuG3I1wq2iGnvd2t0AkMdR3ZwFRJ+Xtl0RPkgdNiKJCAUMF/sXNwg02TrWzuHE6UmTZsUQyDlbLUfnRihY6c6w0+GKYWl+veOa4ybdO5g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628009349; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RAFd8WL9AZvU1Kwh0bj59fPG8qM+cgLck/enB0QaKxU=; b=QPbXDEv9imTGAZFJlv9UgLmIsXT46BqIhs5Yn3PnUtLOiLPCteHnX9zEi5ZE0jztSk3abLwO3xSWMocHsh2EtsbQLjZB5+VM/90Nfs+BJJmUJYQBqk2y1TosUayJK9xlC1NGvV4CdmfRyjkDrypgymb2K6ahra0sBJUpQtUDwYo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1628009349195411.1777441282045; Tue, 3 Aug 2021 09:49:09 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-477-DFYHZx-kOgKiPoHsiGwl7w-1; Tue, 03 Aug 2021 12:49:05 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2E53093920; Tue, 3 Aug 2021 16:49:00 +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 F342527CB1; Tue, 3 Aug 2021 16:48:59 +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 BEE1B181AC0C; Tue, 3 Aug 2021 16:48:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 173G87ci017987 for ; Tue, 3 Aug 2021 12:08:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id CF05B27C3A; Tue, 3 Aug 2021 16:08:07 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.39.194.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 054E73AA2; Tue, 3 Aug 2021 16:08:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628009348; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=RAFd8WL9AZvU1Kwh0bj59fPG8qM+cgLck/enB0QaKxU=; b=SMsxWi9HZ8jCFbNglGLByC4iSV8YmRJajsBu2psaEwDMAsXxrIqa8GvbDb9PoqJXkQD+JQ Nkg44hIAOnJZMSRhPdgkMSwSjouFXnIWmMwWcmQpcX4vscJUvIFr8BwPmFZ24j1OfaIJ72 zc0mnmZ3DnQP7WXEZP5gEouthn3ubFQ= X-MC-Unique: DFYHZx-kOgKiPoHsiGwl7w-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 4/6] rpm: macroize logic for enabling/disabling daemons post/postun-install Date: Tue, 3 Aug 2021 17:07:52 +0100 Message-Id: <20210803160754.3333793-5-berrange@redhat.com> In-Reply-To: <20210803160754.3333793-1-berrange@redhat.com> References: <20210803160754.3333793-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1628009351136100005 The patterns for enabling/disabling daemons post/postun-install has a bit of duplication across the different part of the spec, due to the number of socket units involved. This is going to get much worse with the need to enable/disalbe modular daemons, so benefits from macroization. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Michal Privoznik --- libvirt.spec.in | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 3999afad8b..1494a18684 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1263,6 +1263,14 @@ then \ fi \ %libvirt_daemon_finish_restart %1 =20 +%global libvirt_daemon_systemd_post() %systemd_post %1.socket %1-ro.socket= %1-admin.socket %1.service + +%global libvirt_daemon_systemd_post_inet() %systemd_post %1.socket %1-ro.s= ocket %1-admin.socket %1-tls.socket %1-tcp.socket %1.service + +%global libvirt_daemon_systemd_preun() %systemd_preun %1.service %1-ro.soc= ket %1-admin.socket %1.socket + +%global libvirt_daemon_systemd_preun_inet() %systemd_preun %1.service %1-r= o.socket %1-admin.socket %1-tls.socket %1-tcp.socket %1.socket + %pre daemon # 'libvirt' group is just to allow password-less polkit access to # libvirtd. The uid number is irrelevant, so we use dynamic allocation @@ -1272,28 +1280,20 @@ getent group libvirt >/dev/null || groupadd -r libv= irt exit 0 =20 %post daemon -%global post_units \\\ - virtlockd.socket virtlockd-admin.socket \\\ - virtlogd.socket virtlogd-admin.socket \\\ - libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket \\\ - libvirtd-tcp.socket libvirtd-tls.socket \\\ - libvirtd.service \\\ - libvirt-guests.service +%libvirt_daemon_systemd_post virtlogd +%libvirt_daemon_systemd_post virtlockdd +%libvirt_daemon_systemd_post_inet libvirtd =20 -%systemd_post %post_units +%systemd_post libvirt-guests.service =20 %libvirt_daemon_schedule_restart libvirtd =20 %preun daemon -%global preun_units \\\ - libvirtd.service \\\ - libvirtd-tcp.socket libvirtd-tls.socket \\\ - libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket \\\ - virtlogd.socket virtlogd-admin.socket virtlogd.service \\\ - virtlockd.socket virtlockd-admin.socket virtlockd.service \\\ - libvirt-guests.service - -%systemd_preun %preun_units +%systemd_preun libvirt-guests.service + +%libvirt_daemon_systemd_preun_inet libvirtd +%libvirt_daemon_systemd_preun virtlogd +%libvirt_daemon_systemd_preun virtlockdd =20 %postun daemon /bin/systemctl daemon-reload >/dev/null 2>&1 || : --=20 2.31.1 From nobody Thu May 2 11:38:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1628009411; cv=none; d=zohomail.com; s=zohoarc; b=YX2DIDLDJGigUr6deF66G7mU2jKJwV0xlgpoilutp/fE3FNkKsKGY/Y2WI1R4dxaawHp3FRyiXsDk/sE3DuuP0TSwItMf3JZO6rvYJB0fbYxu8tDEQ/K3OJZN5Fxi27NFfY6KOX1cTRYH+Y3FMVY4lzn3PrpYZXCVXJM0JqD3oA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628009411; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0RnXBg1/Lew/YCVgayxnZuiFeklZkPvez3Sl7qb5pQo=; b=fZPbcSmYtYCZtTnvZIdoyu9iA3feJ8NMv9RSEjTXaCbu8PAqjAcQL+IkQaSbHGglYpJkNhu7y4WKeAF/tW0NVFm92DJ0jDS5/otbyK3+PwJreC0pbYJvpVwOp1VpPw2omwjJqXDB7EeaPKwwujICP1CC088rJ/CFweJpPdUQKFI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1628009411770598.3070000987088; Tue, 3 Aug 2021 09:50:11 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-265-1HHL04t_NoaSM6T6Irf_HA-1; Tue, 03 Aug 2021 12:49:13 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id DBF4393922; Tue, 3 Aug 2021 16:49:02 +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 BF44D7C1F0; Tue, 3 Aug 2021 16:49:02 +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 893F0473D6; Tue, 3 Aug 2021 16:49:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 173G89Hu017993 for ; Tue, 3 Aug 2021 12:08:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1309626FC0; Tue, 3 Aug 2021 16:08:09 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.39.194.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3CCCF3AA2; Tue, 3 Aug 2021 16:08:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628009410; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=0RnXBg1/Lew/YCVgayxnZuiFeklZkPvez3Sl7qb5pQo=; b=ePAm+qD5eOiJkAmHNO5biz5PbGf6yQCznJ1O5Y6Z2+Di1emkXogBdo5JD1Cm2WLFEHZNxW jw/xxLPRdXt6QWlqX6hnU0MsT3u4+lxXHXEDVS8Af8mL6y+/m/qxOutRfds0K5nT3hjKue gZnbeOPdSnYBLHjfKj+ziOL98PWS1L4= X-MC-Unique: 1HHL04t_NoaSM6T6Irf_HA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 5/6] rpm: handle enabling/disabling modular daemons post/postun-install Date: Tue, 3 Aug 2021 17:07:53 +0100 Message-Id: <20210803160754.3333793-6-berrange@redhat.com> In-Reply-To: <20210803160754.3333793-1-berrange@redhat.com> References: <20210803160754.3333793-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1628009413245100001 We need to enable or disable the modular daemons with systemd after the RPM install/uninstall. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Michal Privoznik --- libvirt.spec.in | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index 1494a18684..44d1e7a3c3 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -181,6 +181,11 @@ %define with_dmidecode 0%{!?_without_dmidecode:1} %endif =20 +%define with_modular_daemons 0 +%if 0%{?fedora} >=3D 35 || 0%{?rhel} >=3D 9 +%define with_modular_daemons 1 +%endif + # Force QEMU to run as non-root %define qemu_user qemu %define qemu_group qemu @@ -1282,7 +1287,11 @@ exit 0 %post daemon %libvirt_daemon_systemd_post virtlogd %libvirt_daemon_systemd_post virtlockdd +%if %{with_modular_daemons} +%libvirt_daemon_systemd_post_inet virtproxyd +%else %libvirt_daemon_systemd_post_inet libvirtd +%endif =20 %systemd_post libvirt-guests.service =20 @@ -1292,6 +1301,7 @@ exit 0 %systemd_preun libvirt-guests.service =20 %libvirt_daemon_systemd_preun_inet libvirtd +%libvirt_daemon_systemd_preun_inet virtproxyd %libvirt_daemon_systemd_preun virtlogd %libvirt_daemon_systemd_preun virtlockdd =20 @@ -1360,8 +1370,14 @@ fi %firewalld_reload %endif =20 +%if %{with_modular_daemons} +%libvirt_daemon_systemd_post virtnetworkd +%endif %libvirt_daemon_schedule_restart virtnetworkd =20 +%preun +%libvirt_daemon_systemd_preun virtnetworkd + %postun daemon-driver-network %if %{with_firewalld_zone} %firewalld_reload @@ -1372,64 +1388,118 @@ fi =20 =20 %post daemon-driver-nwfilter +%if %{with_modular_daemons} +%libvirt_daemon_systemd_post virtnwfilterd +%endif %libvirt_daemon_schedule_restart virtnwfilterd =20 +%preun daemon-driver-nwfilter +%libvirt_daemon_systemd_preun virtnwfilterd + %posttrans daemon-driver-nwfilter %libvirt_daemon_perform_restart virtnwfilterd =20 =20 %post daemon-driver-nodedev +%if %{with_modular_daemons} +%libvirt_daemon_systemd_post virtnodedevd +%endif %libvirt_daemon_schedule_restart virtnodedevd =20 +%preun daemon-driver-nodedev +%libvirt_daemon_systemd_preun virtnodedevd + %posttrans daemon-driver-nodedev %libvirt_daemon_perform_restart virtnodedevd =20 =20 %post daemon-driver-interface +%if %{with_modular_daemons} +%libvirt_daemon_systemd_post virtinterfaced +%endif %libvirt_daemon_schedule_restart virtinterfaced =20 +%preun daemon-driver-interface +%libvirt_daemon_systemd_preun virtinterfaced + %posttrans daemon-driver-interface %libvirt_daemon_perform_restart virtinterfaced =20 =20 %post daemon-driver-secret +%if %{with_modular_daemons} +%libvirt_daemon_systemd_post virtsecretd +%endif %libvirt_daemon_schedule_restart virtsecretd =20 +%preun daemon-driver-secret +%libvirt_daemon_systemd_preun virtsecretd + %posttranstrans daemon-driver-secret %libvirt_daemon_perform_restart virtsecretd =20 =20 %post daemon-driver-storage +%if %{with_modular_daemons} +%libvirt_daemon_systemd_post virtstoraged +%endif %libvirt_daemon_schedule_restart virtstoraged =20 +%preun daemon-driver-storage +%libvirt_daemon_systemd_preun virtstoraged + %posttrans daemon-driver-storage %libvirt_daemon_perform_restart virtstoraged =20 =20 %post daemon-driver-qemu +%if %{with_modular_daemons} +%libvirt_daemon_systemd_post virtqemud +%endif %libvirt_daemon_schedule_restart virtqemud =20 +%preun daemon-driver-qemu +%libvirt_daemon_systemd_preun virtqemud + %posttrans daemon-driver-qemu %libvirt_daemon_perform_restart virtqemud =20 =20 %post daemon-driver-lxc +%if %{with_modular_daemons} +%libvirt_daemon_systemd_post virtlxcd +%endif %libvirt_daemon_schedule_restart virtlxcd =20 +%preun daemon-driver-lxc +%libvirt_daemon_systemd_preun virtlxcd + %posttrans daemon-driver-lxc %libvirt_daemon_perform_restart virtlxcd =20 =20 %post daemon-driver-vbox +%if %{with_modular_daemons} +%libvirt_daemon_systemd_post virtvboxd +%endif %libvirt_daemon_schedule_restart virtvboxd =20 +%preun daemon-driver-vbox +%libvirt_daemon_systemd_preun virtvboxd + %posttrans daemon-driver-vbox %libvirt_daemon_perform_restart virtvboxd =20 =20 %post daemon-driver-libxl +%if %{with_modular_daemons} +%libvirt_daemon_systemd_post virtxend +%endif %libvirt_daemon_schedule_restart virtxend =20 +%preun daemon-driver-libxl +%libvirt_daemon_systemd_preun virtxend + %posttrans daemon-driver-libxl %libvirt_daemon_perform_restart virtxend =20 --=20 2.31.1 From nobody Thu May 2 11:38:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1628009354; cv=none; d=zohomail.com; s=zohoarc; b=PezDXvjzGpXei58qnk02jYwm/tKmKUpcpzRSlw8Rp8a3Mew8EPbUcTN0bOAou4CHQJLAZNt4Ms0uellkTohvtOZXb841g9L17rXmMFDJcob8MpXvGOwdjHFR97kYWjRnDMZ3UeWSfO868SydxX3MdMVKvdIJJzCSuTgCZTi1Wis= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628009354; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zlz4bkBhuf+xv0cSs4AFUIAdEHsjgSJJFZGq2npgB1o=; b=MxTJA6KA3ywMQZ/bveEyEJACyiL2x/EK7hEVe8cUe1lmNuP94rYKj04dTlaO2L22zDyjDGEOyJAR3nSNjkIRaksy4WXGHAw6iOqihHuGGN1oKAWWDOiCu9Z/Pe/TGNUsK8fBcj8Kc8yCR3cUm4Ae6YVMPDFtJ7xqNvJ7jWbdPb8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1628009354717887.2725264080444; Tue, 3 Aug 2021 09:49:14 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-37-IsEWkhzrMKqtuo-atscXPA-1; Tue, 03 Aug 2021 12:49:11 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 367FB8799FC; Tue, 3 Aug 2021 16:49:06 +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 0BEE419CBA; Tue, 3 Aug 2021 16:49:06 +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 BE30C181AC16; Tue, 3 Aug 2021 16:49:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 173G8BT4018001 for ; Tue, 3 Aug 2021 12:08:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 26BF327C4E; Tue, 3 Aug 2021 16:08:11 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.39.194.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 75EB33AA2; Tue, 3 Aug 2021 16:08:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628009353; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=zlz4bkBhuf+xv0cSs4AFUIAdEHsjgSJJFZGq2npgB1o=; b=Rj1WiQUIX/8vpaCjnz8Y76N4uEYvg+E5RHEMlbxMbjubO1bnxHF6pwx1aJx+M1Gig2B6/q 06DvBFZywhkm03IBndxy7rYPw3l9mY363xcCmX9MHiMV+nxhqiRNTuP4EUDhyMnNqKLrB6 +8zsJN+7+b+oOYYcml/sPz8gm6+G+K4= X-MC-Unique: IsEWkhzrMKqtuo-atscXPA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 6/6] rpm: use direct remote connection for Fedora >= 35 / RHEL >= 9 Date: Tue, 3 Aug 2021 17:07:54 +0100 Message-Id: <20210803160754.3333793-7-berrange@redhat.com> In-Reply-To: <20210803160754.3333793-1-berrange@redhat.com> References: <20210803160754.3333793-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1628009355736100003 Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Michal Privoznik --- libvirt.spec.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 44d1e7a3c3..af884f6126 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1081,6 +1081,12 @@ exit 1 %define arg_libssh2 -Dlibssh2=3Ddisabled %endif =20 +%if %{with_modular_daemons} + %define arg_remote_mode -Dremote_default_mode=3Ddirect +%else + %define arg_remote_mode -Dremote_default_mode=3Dlegacy +%endif + %define when %(date +"%%F-%%T") %define where %(hostname) %define who %{?packager}%{!?packager:Unknown} @@ -1111,7 +1117,7 @@ export SOURCE_DATE_EPOCH=3D$(stat --printf=3D'%Y' %{_= specdir}/%{name}.spec) -Ddriver_vz=3Ddisabled \ -Ddriver_bhyve=3Ddisabled \ -Ddriver_ch=3Ddisabled \ - -Dremote_default_mode=3Dlegacy \ + %{?arg_remote_mode} \ -Ddriver_interface=3Denabled \ -Ddriver_network=3Denabled \ -Dstorage_fs=3Denabled \ --=20 2.31.1