From nobody Sat May 18 07:09:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1689345595; cv=none; d=zohomail.com; s=zohoarc; b=Vmzy2o5W9GVFZ5jMf2psFSAFKFuUK3HNptHlZdme42KCNrh/wMe35jXpEN4549Dd+BatDWq+EW6UeHowDpvIBGNUqsvVO5hv/KLwli51azWnBSvR9ks1bXK24cstTHjzYmedmmclp2jVtYgyZSpA8ekmIXYg90HhUh+jvnvHOG0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689345595; 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=TtJTQJIewhxpUmzWCUI3FwNJsBNwb88tRpcjnpnTbiw=; b=NbQUOoOqs0t6v8dsQqR9EZQ9vfwQQL4BdSp//4td0GsoRCGXR0GHQgWw2m9wUxdSJtnnIIDyMla2btNLFsnLB4zM1mKtFwU3N8V5SBVqv0h8VUh4dTL47HsYkbK2odYVGKLAZJCHqk4bhpqRu0pKwZ0hYxlO1/7ptgFceISntkI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1689345594962314.8445568051196; Fri, 14 Jul 2023 07:39:54 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-115-QjwvduOZNxuEG_Oxx44EYw-1; Fri, 14 Jul 2023 10:39:51 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C0AB788D123; Fri, 14 Jul 2023 14:39:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA98240C2063; Fri, 14 Jul 2023 14:39:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A57DE1946A40; Fri, 14 Jul 2023 14:39:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D4D29194658F for ; Fri, 14 Jul 2023 14:39:45 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A81AF2166B26; Fri, 14 Jul 2023 14:39:45 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 392852166B25 for ; Fri, 14 Jul 2023 14:39:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689345594; 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=TtJTQJIewhxpUmzWCUI3FwNJsBNwb88tRpcjnpnTbiw=; b=MtDCCg/nmvMq0VpUdc9tpSGPE5VnR8z1YoUbqLINlsClLDT0s4R2w/9BQe/wQVYMrmyoqW 1VDFwlcLVNzYSuRI9dqdt8xJ3DQwgnRTDOPD45pQ1HtdpcjOOBn3xu8CJcEk091rG1j/6D fccCGlT1uL/mUs6oGpeAtyB8HcO4IS8= X-MC-Unique: QjwvduOZNxuEG_Oxx44EYw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 1/8] rpm: Bump min_fedora Date: Fri, 14 Jul 2023 16:39:35 +0200 Message-ID: <20230714143942.125179-2-abologna@redhat.com> In-Reply-To: <20230714143942.125179-1-abologna@redhat.com> References: <20230714143942.125179-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1689345596474100003 Content-Type: text/plain; charset="utf-8"; x-default="true" According to our platform support policy, now that Fedora 38 is out we no longer target Fedora 36 and older. This allows us to simplify a few conditionals. Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander --- libvirt.spec.in | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 1f77cd90b7..c72b420e85 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -4,7 +4,7 @@ # 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 8 -%define min_fedora 33 +%define min_fedora 37 =20 %define arches_qemu_kvm %{ix86} x86_64 %{power64} %{arm} aarch64 s= 390x %if 0%{?rhel} @@ -21,7 +21,7 @@ %define arches_systemtap_64bit %{arches_64bit} %define arches_dmidecode %{arches_x86} %define arches_xen %{arches_x86} aarch64 -%if 0%{?fedora} >=3D 36 +%if 0%{?fedora} %define arches_xen x86_64 aarch64 %endif %define arches_vbox %{arches_x86} @@ -134,7 +134,7 @@ =20 %define with_firewalld_zone 0%{!?_without_firewalld_zone:1} =20 -%if (0%{?fedora} && 0%{?fedora} < 34) || (0%{?rhel} && 0%{?rhel} < 9) +%if 0%{?rhel} && 0%{?rhel} < 9 %define with_netcf 0%{!?_without_netcf:1} %endif =20 @@ -179,7 +179,7 @@ %endif =20 %define with_modular_daemons 0 -%if 0%{?fedora} >=3D 35 || 0%{?rhel} >=3D 9 +%if 0%{?fedora} || 0%{?rhel} >=3D 9 %define with_modular_daemons 1 %endif =20 @@ -347,7 +347,7 @@ BuildRequires: libssh2-devel >=3D 1.3.0 %if %{with_netcf} BuildRequires: netcf-devel >=3D 0.2.2 %endif -%if (0%{?fedora} >=3D 36) || (0%{?rhel} >=3D 9) +%if 0%{?fedora} || 0%{?rhel} >=3D 9 BuildRequires: passt %endif %if %{with_esx} @@ -467,7 +467,7 @@ Requires: dbus # For uid creation during pre Requires(pre): shadow-utils # Needed by /usr/libexec/libvirt-guests.sh script. -%if 0%{?fedora} >=3D 37 +%if 0%{?fedora} Requires: gettext-runtime %else Requires: gettext @@ -763,7 +763,7 @@ Requires: swtpm-tools %if %{with_numad} Requires: numad %endif - %if (0%{?fedora} >=3D 36) || (0%{?rhel} >=3D 9) + %if 0%{?fedora} || 0%{?rhel} >=3D 9 Recommends: passt Recommends: passt-selinux %endif --=20 2.41.0 From nobody Sat May 18 07:09:04 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=1689345595; cv=none; d=zohomail.com; s=zohoarc; b=i6OnFcg8scrwBUkqRvdfBJcunCGupq+vXl5av/0tXH0Q8OuqijskTNs3l+XDZMFAO6SrEUFeBAqWEfJJ6QO4cwZBPNbMOaSipKTANv8CEEPTYwArIGPtoln4ieSPbV0SuU3Bz/z0T4af6SQhxGKZM0A0BFy1bJI/gfwwOsXZhOY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689345595; 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=aiCEyLQ8HOAvwZSxV8ORmdzGOIfr+srvX21rVrGL8vU=; b=AVqswNyRwUnwRiOxV07QzJeOMSE2QzKvLhuMVrADQM3c2rsdBW9jMu27djg3GoiXv6TYkhAqGKttdw1VFAx1uoW1kR/FkVPOVGhE9yhmQQ3HXTXVEfAqvPe0LvDeIIgUmtbtQuEKwbemtmhBJD3zs4+qs9i5CtcYDm3GVuMci1Y= 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 1689345595977257.07753429394995; Fri, 14 Jul 2023 07:39:55 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-540-7dOh8XOlNHSGoDBvEyYNOQ-1; Fri, 14 Jul 2023 10:39:51 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 577623C0BE53; Fri, 14 Jul 2023 14:39:48 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1583310C95; Fri, 14 Jul 2023 14:39:48 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 72EF219465A0; Fri, 14 Jul 2023 14:39:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 8561E19465B7 for ; Fri, 14 Jul 2023 14:39:46 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 675332166B26; Fri, 14 Jul 2023 14:39:46 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ECF0D2166B25 for ; Fri, 14 Jul 2023 14:39:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689345595; 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=aiCEyLQ8HOAvwZSxV8ORmdzGOIfr+srvX21rVrGL8vU=; b=Mm2M6hQYqMZeXEHTv7Ud0ws755fqze1AW4hKX8ArE8ZfHQ+Ffj/Kz+oQN/oFEoCYD3M89a 6RUwCpYC1j6mBercv/gl75d+LiNIXUIvM4tbZQPOHmlZhHD8hbcNoizEIFKW2ZRooTfLNQ a5WcLhPfjUoV1xOhLBBat9LU8EZxapE= X-MC-Unique: 7dOh8XOlNHSGoDBvEyYNOQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 2/8] rpm: Style/alignment tweaks Date: Fri, 14 Jul 2023 16:39:36 +0200 Message-ID: <20230714143942.125179-3-abologna@redhat.com> In-Reply-To: <20230714143942.125179-1-abologna@redhat.com> References: <20230714143942.125179-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1689345596287100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander --- libvirt.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index c72b420e85..05e322492a 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -22,7 +22,7 @@ %define arches_dmidecode %{arches_x86} %define arches_xen %{arches_x86} aarch64 %if 0%{?fedora} - %define arches_xen x86_64 aarch64 + %define arches_xen x86_64 aarch64 %endif %define arches_vbox %{arches_x86} %define arches_ceph %{arches_64bit} @@ -686,7 +686,7 @@ Requires: libvirt-libs =3D %{version}-%{release} %if 0%{?fedora} Requires: glusterfs-client >=3D 2.0.1 %endif - %if (0%{?fedora} || 0%{?with_storage_gluster}) + %if 0%{?fedora} || 0%{?with_storage_gluster} Requires: /usr/sbin/gluster %endif =20 --=20 2.41.0 From nobody Sat May 18 07:09:04 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=1689345597; cv=none; d=zohomail.com; s=zohoarc; b=lRIy26Yk6vkN1ZVJy5gi/LzO94gCie1gLxQKN5RjOoOyvzuZQNIlb8rMV9Or1DJSUb1AXtOSqJMlfSrW3gSgEXOghxhZn7X7lOFyzp9/wnTHMIF9egdJgJ8cDbWzmRj/2gHk440tyDFK4boUuCa9bExul4tc0ijbT+VIlGm/i1U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689345597; 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=ncrcGYlDCp4rsYDKPEaDAUAM367jktjZt0C/MR/1mlc=; b=Kofb5tVv4ENj1FTh6A4AJNVAgAt8sssFBmn+CpNqzBBv0+Gu8PWC6omeBKQ1SdKfkOv13nk+Atz9bqoIEHIEbXjy+UGajAJTfAg3GxWagwKRQBUgx9DEVCe0VrptqXdsfISTpi+lwxC1ZexpWps48gvshsf97O59iaMIuaBNWvw= 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 1689345597245237.52387141494785; Fri, 14 Jul 2023 07:39:57 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-108-ymre0ec0N3ehpCCdzqItfg-1; Fri, 14 Jul 2023 10:39:51 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BD28B8D1691; Fri, 14 Jul 2023 14:39:48 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A25C51454142; Fri, 14 Jul 2023 14:39:48 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E4A0F1946A41; Fri, 14 Jul 2023 14:39:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 3A8D1194658F for ; Fri, 14 Jul 2023 14:39:47 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 28F6A2166B26; Fri, 14 Jul 2023 14:39:47 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ACAA42166B25 for ; Fri, 14 Jul 2023 14:39:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689345596; 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=ncrcGYlDCp4rsYDKPEaDAUAM367jktjZt0C/MR/1mlc=; b=RphRkK7J8aR5pM7NX1grTMYHIgPh6rX4Q/72abjA3TQ1uKuCf9ho5nqhEcjc6sFBil+2Vw wr3jJfQF/HycS41D7BksKdsLN07EuWZb/DCKr8cZMznsoqycCxG5ZSzf5+i9MhiX75IYMi GZMUiNXaICU+qDa2ll/h7lhgIHRxSsM= X-MC-Unique: ymre0ec0N3ehpCCdzqItfg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 3/8] rpm: Reorder scriptlets Date: Fri, 14 Jul 2023 16:39:37 +0200 Message-ID: <20230714143942.125179-4-abologna@redhat.com> In-Reply-To: <20230714143942.125179-1-abologna@redhat.com> References: <20230714143942.125179-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1689345597812100008 Content-Type: text/plain; charset="utf-8"; x-default="true" To make things more readable, use the same order (%pre, %post, %posttrans, %preun, %postun) everywhere. Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander --- libvirt.spec.in | 104 ++++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 05e322492a..db8d9158ae 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1492,9 +1492,6 @@ fi \ %endif %libvirt_daemon_schedule_restart libvirtd =20 -%preun daemon -%libvirt_daemon_systemd_preun_inet libvirtd - %posttrans daemon %libvirt_sysconfig_posttrans libvirtd if test %libvirt_daemon_needs_restart libvirtd @@ -1531,6 +1528,9 @@ then fi %libvirt_daemon_finish_restart libvirtd =20 +%preun daemon +%libvirt_daemon_systemd_preun_inet libvirtd + %pre daemon-common %libvirt_sysconfig_pre libvirt-guests # 'libvirt' group is just to allow password-less polkit access to libvirt @@ -1541,6 +1541,9 @@ exit 0 %post daemon-common %systemd_post libvirt-guests.service =20 +%posttrans daemon-common +%libvirt_sysconfig_posttrans libvirt-guests + %preun daemon-common %systemd_preun libvirt-guests.service =20 @@ -1548,15 +1551,15 @@ exit 0 /bin/systemctl daemon-reload >/dev/null 2>&1 || : %systemd_postun libvirt-guests.service =20 -%posttrans daemon-common -%libvirt_sysconfig_posttrans libvirt-guests - %pre daemon-lock %libvirt_sysconfig_pre virtlockd =20 %post daemon-lock %libvirt_daemon_systemd_post_priv virtlockd =20 +%posttrans daemon-lock +%libvirt_sysconfig_posttrans virtlockd + %preun daemon-lock %libvirt_daemon_systemd_preun_priv virtlockd =20 @@ -1566,15 +1569,15 @@ if [ $1 -ge 1 ] ; then /bin/systemctl reload-or-try-restart virtlockd.service >/dev/null 2>&1= || : fi =20 -%posttrans daemon-lock -%libvirt_sysconfig_posttrans virtlockd - %pre daemon-log %libvirt_sysconfig_pre virtlogd =20 %post daemon-log %libvirt_daemon_systemd_post_priv virtlogd =20 +%posttrans daemon-log +%libvirt_sysconfig_posttrans virtlogd + %preun daemon-log %libvirt_daemon_systemd_preun_priv virtlogd =20 @@ -1584,9 +1587,6 @@ if [ $1 -ge 1 ] ; then /bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 = || : fi =20 -%posttrans daemon-log -%libvirt_sysconfig_posttrans virtlogd - %pre daemon-proxy %libvirt_sysconfig_pre virtproxyd =20 @@ -1595,12 +1595,12 @@ fi %libvirt_daemon_systemd_post_inet virtproxyd %endif =20 -%preun daemon-proxy -%libvirt_daemon_systemd_preun_inet virtproxyd - %posttrans daemon-proxy %libvirt_sysconfig_posttrans virtproxyd =20 +%preun daemon-proxy +%libvirt_daemon_systemd_preun_inet virtproxyd + %pre daemon-driver-network %libvirt_sysconfig_pre virtnetworkd =20 @@ -1614,6 +1614,10 @@ fi %endif %libvirt_daemon_schedule_restart virtnetworkd =20 +%posttrans daemon-driver-network +%libvirt_sysconfig_posttrans virtnetworkd +%libvirt_daemon_perform_restart virtnetworkd + %preun daemon-driver-network %libvirt_daemon_systemd_preun virtnetworkd =20 @@ -1622,10 +1626,6 @@ fi %firewalld_reload %endif =20 -%posttrans daemon-driver-network -%libvirt_sysconfig_posttrans virtnetworkd -%libvirt_daemon_perform_restart virtnetworkd - %pre daemon-driver-nwfilter %libvirt_sysconfig_pre virtnwfilterd =20 @@ -1635,13 +1635,13 @@ fi %endif %libvirt_daemon_schedule_restart virtnwfilterd =20 -%preun daemon-driver-nwfilter -%libvirt_daemon_systemd_preun virtnwfilterd - %posttrans daemon-driver-nwfilter %libvirt_sysconfig_posttrans virtnwfilterd %libvirt_daemon_perform_restart virtnwfilterd =20 +%preun daemon-driver-nwfilter +%libvirt_daemon_systemd_preun virtnwfilterd + %pre daemon-driver-nodedev %libvirt_sysconfig_pre virtnodedevd =20 @@ -1651,13 +1651,13 @@ fi %endif %libvirt_daemon_schedule_restart virtnodedevd =20 -%preun daemon-driver-nodedev -%libvirt_daemon_systemd_preun virtnodedevd - %posttrans daemon-driver-nodedev %libvirt_sysconfig_posttrans virtnodedevd %libvirt_daemon_perform_restart virtnodedevd =20 +%preun daemon-driver-nodedev +%libvirt_daemon_systemd_preun virtnodedevd + %pre daemon-driver-interface %libvirt_sysconfig_pre virtinterfaced =20 @@ -1667,13 +1667,13 @@ fi %endif %libvirt_daemon_schedule_restart virtinterfaced =20 -%preun daemon-driver-interface -%libvirt_daemon_systemd_preun virtinterfaced - %posttrans daemon-driver-interface %libvirt_sysconfig_posttrans virtinterfaced %libvirt_daemon_perform_restart virtinterfaced =20 +%preun daemon-driver-interface +%libvirt_daemon_systemd_preun virtinterfaced + %pre daemon-driver-secret %libvirt_sysconfig_pre virtsecretd =20 @@ -1683,13 +1683,13 @@ fi %endif %libvirt_daemon_schedule_restart virtsecretd =20 -%preun daemon-driver-secret -%libvirt_daemon_systemd_preun virtsecretd - %posttrans daemon-driver-secret %libvirt_sysconfig_posttrans virtsecretd %libvirt_daemon_perform_restart virtsecretd =20 +%preun daemon-driver-secret +%libvirt_daemon_systemd_preun virtsecretd + %pre daemon-driver-storage-core %libvirt_sysconfig_pre virtstoraged =20 @@ -1699,13 +1699,13 @@ fi %endif %libvirt_daemon_schedule_restart virtstoraged =20 -%preun daemon-driver-storage-core -%libvirt_daemon_systemd_preun virtstoraged - %posttrans daemon-driver-storage-core %libvirt_sysconfig_posttrans virtstoraged %libvirt_daemon_perform_restart virtstoraged =20 +%preun daemon-driver-storage-core +%libvirt_daemon_systemd_preun virtstoraged + %if %{with_qemu} %pre daemon-driver-qemu %libvirt_sysconfig_pre virtqemud @@ -1729,12 +1729,12 @@ exit 0 %endif %libvirt_daemon_schedule_restart virtqemud =20 -%preun daemon-driver-qemu -%libvirt_daemon_systemd_preun virtqemud - %posttrans daemon-driver-qemu %libvirt_sysconfig_posttrans virtqemud %libvirt_daemon_perform_restart virtqemud + +%preun daemon-driver-qemu +%libvirt_daemon_systemd_preun virtqemud %endif =20 %if %{with_lxc} @@ -1747,48 +1747,48 @@ exit 0 %endif %libvirt_daemon_schedule_restart virtlxcd =20 -%preun daemon-driver-lxc -%libvirt_daemon_systemd_preun virtlxcd - %posttrans daemon-driver-lxc %libvirt_sysconfig_posttrans virtlxcd %libvirt_daemon_perform_restart virtlxcd + +%preun daemon-driver-lxc +%libvirt_daemon_systemd_preun virtlxcd %endif =20 %if %{with_vbox} +%pre daemon-driver-vbox +%libvirt_sysconfig_pre virtvboxd + %post daemon-driver-vbox %if %{with_modular_daemons} %libvirt_daemon_systemd_post virtvboxd %endif %libvirt_daemon_schedule_restart virtvboxd =20 -%pre daemon-driver-vbox -%libvirt_sysconfig_pre virtvboxd - -%preun daemon-driver-vbox -%libvirt_daemon_systemd_preun virtvboxd - %posttrans daemon-driver-vbox %libvirt_sysconfig_posttrans virtvboxd %libvirt_daemon_perform_restart virtvboxd + +%preun daemon-driver-vbox +%libvirt_daemon_systemd_preun virtvboxd %endif =20 %if %{with_libxl} +%pre daemon-driver-libxl +%libvirt_sysconfig_pre virtxend + %post daemon-driver-libxl %if %{with_modular_daemons} %libvirt_daemon_systemd_post virtxend %endif %libvirt_daemon_schedule_restart virtxend =20 -%pre daemon-driver-libxl -%libvirt_sysconfig_pre virtxend - -%preun daemon-driver-libxl -%libvirt_daemon_systemd_preun virtxend - %posttrans daemon-driver-libxl %libvirt_sysconfig_posttrans virtxend %libvirt_daemon_perform_restart virtxend + +%preun daemon-driver-libxl +%libvirt_daemon_systemd_preun virtxend %endif =20 %post daemon-config-network --=20 2.41.0 From nobody Sat May 18 07:09:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1689345594; cv=none; d=zohomail.com; s=zohoarc; b=aP3gJVgQmJ/k4fUQrmvT04FQXiqJdn9ulXujet3FTmDTOs+Jf4bqpLshIPF0tkUZhFfuftJ5h9n7sC4GRBQ39usZwlixhDwCZxb/NwSF0ZfZaVFuQ4qnnEDgF3XwokRuuzTmbCitOBrqjBlcu8QBJA9daXyHdZSHOAUjnQfqf/0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689345594; 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=MUEFRuxtwDqiqP5+pBvc8DARkJC+edCEYd3tWLNxp8w=; b=HuHBHaTx8D2TYx2uLRw326ePAEF+9ood/YRQS/vBVwrAZthGF84gmCx3FSuxsmGWa/wYRBl0ymgjy8zxmRZQj5HV7qpKXSeF9DVbYN2h3l5IwF2CiQMgGD+ljc5XGdIf7rmyq5Bpj0FFgdjOuXlsv++gL8f+l1KdggtAGnGnXps= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1689345594576922.1401058708511; Fri, 14 Jul 2023 07:39:54 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-67-gaYslV8GPGSOOXPT_KIITA-1; Fri, 14 Jul 2023 10:39:52 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5E5673852D91; Fri, 14 Jul 2023 14:39:49 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4A51B10E61; Fri, 14 Jul 2023 14:39:49 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2F4341946594; Fri, 14 Jul 2023 14:39:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id ECD091946A54 for ; Fri, 14 Jul 2023 14:39:47 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id DC7892166B28; Fri, 14 Jul 2023 14:39:47 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E0812166B26 for ; Fri, 14 Jul 2023 14:39:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689345593; 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=MUEFRuxtwDqiqP5+pBvc8DARkJC+edCEYd3tWLNxp8w=; b=HTOIIyeLchf+QNYDj/FpqrhfOeFxfU3J4uNRsUO/RJ9O1MH2a+YbwO89QMrR6J06Qto+YO Ipa8y/UyvfCdMQJ6CEjVI5bs25a0mDhlqN3uLCoWwYRyNbhTduf1DQKdPF09mNS1xGbtLC gwvqPTF8B4JlqAv7VB9lBhJJR62kocQ= X-MC-Unique: gaYslV8GPGSOOXPT_KIITA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 4/8] rpm: Reduce use of with_modular_daemons Date: Fri, 14 Jul 2023 16:39:38 +0200 Message-ID: <20230714143942.125179-5-abologna@redhat.com> In-Reply-To: <20230714143942.125179-1-abologna@redhat.com> References: <20230714143942.125179-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1689345596484100004 Content-Type: text/plain; charset="utf-8"; x-default="true" The current implementation pretty much assumes that targets where modular daemons are the default will stick with that configuration, as will targets where they're not, or that changes to these defaults will be performed by the admin after the packages have been installed. This is unnecessarily limiting: for example, on a target that defaults to using the monolithic daemon, it's entirely possible to create a local preset such as # /etc/systemd/system-preset/00-virt.preset disable libvirtd.service disable libvirtd*.socket enable virtqemud.service to opt into a modular daemon deployment. The opposite is of course also true. We shouldn't get in the way of these reasonable use cases. Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander --- libvirt.spec.in | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index db8d9158ae..c9317ed0cc 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1487,9 +1487,7 @@ fi \ %libvirt_sysconfig_pre libvirtd =20 %post daemon -%if ! %{with_modular_daemons} %libvirt_daemon_systemd_post_inet libvirtd -%endif %libvirt_daemon_schedule_restart libvirtd =20 %posttrans daemon @@ -1591,9 +1589,7 @@ fi %libvirt_sysconfig_pre virtproxyd =20 %post daemon-proxy -%if %{with_modular_daemons} %libvirt_daemon_systemd_post_inet virtproxyd -%endif =20 %posttrans daemon-proxy %libvirt_sysconfig_posttrans virtproxyd @@ -1609,9 +1605,7 @@ fi %firewalld_reload %endif =20 -%if %{with_modular_daemons} %libvirt_daemon_systemd_post virtnetworkd -%endif %libvirt_daemon_schedule_restart virtnetworkd =20 %posttrans daemon-driver-network @@ -1630,9 +1624,7 @@ fi %libvirt_sysconfig_pre virtnwfilterd =20 %post daemon-driver-nwfilter -%if %{with_modular_daemons} %libvirt_daemon_systemd_post virtnwfilterd -%endif %libvirt_daemon_schedule_restart virtnwfilterd =20 %posttrans daemon-driver-nwfilter @@ -1646,9 +1638,7 @@ fi %libvirt_sysconfig_pre virtnodedevd =20 %post daemon-driver-nodedev -%if %{with_modular_daemons} %libvirt_daemon_systemd_post virtnodedevd -%endif %libvirt_daemon_schedule_restart virtnodedevd =20 %posttrans daemon-driver-nodedev @@ -1662,9 +1652,7 @@ fi %libvirt_sysconfig_pre virtinterfaced =20 %post daemon-driver-interface -%if %{with_modular_daemons} %libvirt_daemon_systemd_post virtinterfaced -%endif %libvirt_daemon_schedule_restart virtinterfaced =20 %posttrans daemon-driver-interface @@ -1678,9 +1666,7 @@ fi %libvirt_sysconfig_pre virtsecretd =20 %post daemon-driver-secret -%if %{with_modular_daemons} %libvirt_daemon_systemd_post virtsecretd -%endif %libvirt_daemon_schedule_restart virtsecretd =20 %posttrans daemon-driver-secret @@ -1694,9 +1680,7 @@ fi %libvirt_sysconfig_pre virtstoraged =20 %post daemon-driver-storage-core -%if %{with_modular_daemons} %libvirt_daemon_systemd_post virtstoraged -%endif %libvirt_daemon_schedule_restart virtstoraged =20 %posttrans daemon-driver-storage-core @@ -1724,9 +1708,7 @@ fi exit 0 =20 %post daemon-driver-qemu - %if %{with_modular_daemons} %libvirt_daemon_systemd_post virtqemud - %endif %libvirt_daemon_schedule_restart virtqemud =20 %posttrans daemon-driver-qemu @@ -1742,9 +1724,7 @@ exit 0 %libvirt_sysconfig_pre virtlxcd =20 %post daemon-driver-lxc - %if %{with_modular_daemons} %libvirt_daemon_systemd_post virtlxcd - %endif %libvirt_daemon_schedule_restart virtlxcd =20 %posttrans daemon-driver-lxc @@ -1760,9 +1740,7 @@ exit 0 %libvirt_sysconfig_pre virtvboxd =20 %post daemon-driver-vbox - %if %{with_modular_daemons} %libvirt_daemon_systemd_post virtvboxd - %endif %libvirt_daemon_schedule_restart virtvboxd =20 %posttrans daemon-driver-vbox @@ -1778,9 +1756,7 @@ exit 0 %libvirt_sysconfig_pre virtxend =20 %post daemon-driver-libxl - %if %{with_modular_daemons} %libvirt_daemon_systemd_post virtxend - %endif %libvirt_daemon_schedule_restart virtxend =20 %posttrans daemon-driver-libxl --=20 2.41.0 From nobody Sat May 18 07:09:04 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=1689345596; cv=none; d=zohomail.com; s=zohoarc; b=G/94rFQFehfTW79UjVx4pavaLfwiWj+ygivhqt7l99olW7NhVIv7iTP2VRD02NngEnbbjtZPO5ipHKFV2/CDhYUwyFwbqL2Kz8+v3+vb8NaLXIwR1cvoTQRDH2W17BIVwIs1N53p8Yb0EfPSFsre4q7rk2l2ZI4fNOVXhEBQk7c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689345596; 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=PkPjS56WtJA1vR5thKYcPf+cVA+kpw88VQ4JgNG+PDE=; b=Xqm4TW1ZTH8SMdwV25ePcX20C92qjrR3VyMfRDOkYLYG+NkG5TDdQ+25/uVGlJA2GLWha39y7ngKub1on1a4sgb7lTFEj732iM2z9F2ezJfbCBiJhBcAcXLAHgOLRwTHU4hNr8QKoMiGoyqvg64zeOu35sci/jQIucXjXGKiY/I= 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 1689345596168602.6827130096063; Fri, 14 Jul 2023 07:39:56 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-284-V1wtg833N5SGzpAAbr94sw-1; Fri, 14 Jul 2023 10:39:53 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 465061C068DD; Fri, 14 Jul 2023 14:39:50 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2E7DF2166B27; Fri, 14 Jul 2023 14:39:50 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 614FC1946A40; Fri, 14 Jul 2023 14:39:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AC20F1946594 for ; Fri, 14 Jul 2023 14:39:48 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9A9DF2166B27; Fri, 14 Jul 2023 14:39:48 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2CBA92166B25 for ; Fri, 14 Jul 2023 14:39:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689345595; 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=PkPjS56WtJA1vR5thKYcPf+cVA+kpw88VQ4JgNG+PDE=; b=LeqIDUqEKyY0RbQN7pATppHmf+rbEeOcSLrkl3Kb5JgpuPCDb7Ra5VIeRCbActVNzaOd0l EMdo+pgcdLDjOJcjHnPeeKfSKHiBk3tqlZEpnzvFTcXQOD+fjTikNAsElpzB1pCjIsNnD8 A7835rQQnoQgYXAyJ2OIUwLWvquUWa0= X-MC-Unique: V1wtg833N5SGzpAAbr94sw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 5/8] rpm: Remove custom libvirtd restart logic Date: Fri, 14 Jul 2023 16:39:39 +0200 Message-ID: <20230714143942.125179-6-abologna@redhat.com> In-Reply-To: <20230714143942.125179-1-abologna@redhat.com> References: <20230714143942.125179-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1689345597808100007 Content-Type: text/plain; charset="utf-8"; x-default="true" This logic was necessary when socket activation was introduced in libvirt 5.6.0/5.7.0 in order to guarantee smooth upgrades. These days, even the oldest platform that we target ships a version of libvirtd that implements socket activation, so the additional code is no longer useful and we can treat libvirtd the same as all other services. Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander --- libvirt.spec.in | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index c9317ed0cc..d09c3b3340 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1492,39 +1492,7 @@ fi \ =20 %posttrans daemon %libvirt_sysconfig_posttrans libvirtd -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 - if test $? =3D 0 - then - # Then lets keep honouring --listen and *not* use - # systemd socket activation, because switching things - # might confuse mgmt tool like puppet/ansible that - # expect the old style libvirtd - /bin/systemctl mask \ - libvirtd.socket \ - libvirtd-ro.socket \ - libvirtd-admin.socket \ - libvirtd-tls.socket \ - libvirtd-tcp.socket >/dev/null 2>&1 || : - /bin/systemctl try-restart libvirtd.service >/dev/null 2>&1 || : - else - # Old libvirtd owns the sockets and will delete them on - # shutdown. Can't use a try-restart as libvirtd will simply - # own the sockets again when it comes back up. Thus we must - # do this particular ordering, so that we get libvirtd - # running with socket activation in use - /bin/systemctl stop libvirtd.service >/dev/null 2>&1 || : - /bin/systemctl try-restart \ - libvirtd.socket \ - libvirtd-ro.socket \ - libvirtd-admin.socket >/dev/null 2>&1 || : - /bin/systemctl start libvirtd.service >/dev/null 2>&1 || : - fi -fi -%libvirt_daemon_finish_restart libvirtd +%libvirt_daemon_perform_restart libvirtd =20 %preun daemon %libvirt_daemon_systemd_preun_inet libvirtd --=20 2.41.0 From nobody Sat May 18 07:09:04 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=1689345601; cv=none; d=zohomail.com; s=zohoarc; b=akURlCYF8z378qgXaYobi+wGZImRXJhktBy5XPtfL01/JxnJYOxwjGtlqa+Tc8A4gsU5yH4zCixKeY0b5Nm5jqgEr1Oxv6cADVdZqYxMq2rE+pciidl7LSfPbkBkqy3GJaW3Fxcg60Esb7f0Ltd+rF1s6PEZjMNknLEEC88H5EU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689345601; 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=d5I4WVYxRXr/ka4mGwTdibMeKiwxV7c2ujCn6iJ+kIU=; b=KCrCHlR4M5Fx0HcdQUoHmdzbr4t4iob9245xl/briOaFPhr9qL+lUKISNDgkbjhEx38P7cBE+t7Wwrh2A0KLJP406zKrWtn/ObGltpUGIZhK34dCX3vw5SNXjQEEB6npskHAqu8k4suNAvuc3iC1tbIN4UmcUd1FLrQAE8/kohc= 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 1689345601432608.0221493378342; Fri, 14 Jul 2023 07:40:01 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-552-Xn9zR6VgMy2-32LLsUh8Yg-1; Fri, 14 Jul 2023 10:39:56 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 64A4D185A793; Fri, 14 Jul 2023 14:39:54 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4EB48C57964; Fri, 14 Jul 2023 14:39:54 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9816619465A2; Fri, 14 Jul 2023 14:39:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 99BD319465A2 for ; Fri, 14 Jul 2023 14:39:49 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7C61A2166B26; Fri, 14 Jul 2023 14:39:49 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E08672166B25 for ; Fri, 14 Jul 2023 14:39:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689345600; 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=d5I4WVYxRXr/ka4mGwTdibMeKiwxV7c2ujCn6iJ+kIU=; b=iK/75Bi+f2hQALDT+COp942EHM7tE0gToLNKS+CxwHpzN4xJ3hk/W6JZfosAG8GjBvB60G u+BsXBT5eDwsUxPF4cXICCCWPcaLu2AGFCc5ze/tG+ADABZ+H0vOapzgNXZQWlQv1A+5KH smsK8vJEGDj+iKPnPGKkbXv4pUUfcZs= X-MC-Unique: Xn9zR6VgMy2-32LLsUh8Yg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 6/8] rpm: Introduce new macros for handling of systemd units Date: Fri, 14 Jul 2023 16:39:40 +0200 Message-ID: <20230714143942.125179-7-abologna@redhat.com> In-Reply-To: <20230714143942.125179-1-abologna@redhat.com> References: <20230714143942.125179-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1689345601830100001 Content-Type: text/plain; charset="utf-8"; x-default="true" systemd provides a number of standard RPM macros but they don't quite satisfy our requirements, as evidenced by the fact that we have already built some custom tooling around them. Scenarios that the standard macros don't cover and that we're already addressing with our custom ones: * for some services (libvirtd, virtnetworkd, virtnwfilterd) there are multiple conditions that might lead to a restart, and we want to make sure that they're not needlessly restarted several times per transaction; * some services (virtlogd, virtlockd) must not be restarted during upgrade, so we have to reload them instead. Issues that neither the standard macros nor our custom ones address: * presets for units should be applied then the unit is first installed, not when the package that contains it is. The package split that happened in 9.1.0 highlighted why this last point is so important: when virtproxyd and its sockets were moved from libvirt-daemon to the new libvirt-daemon-proxy package, upgrades from 9.0.0 caused presets for them to be applied. On a platform such as Fedora, where modular daemons are the default, this has resulted in breaking existing deployments in at least two scenarios. The first one is machines that were configured to use the monolithic daemon, either because the local admin had manually changed the configuration or because the installation dated back to before modular daemons had become the default. In this case, virtproxyd.socket being enabled resulted in a silent conflict with libvirtd.socket, which by design shares the same path, and thus a completely broken setup. The second one is machines where virtproxy-tls.socket, which is disabled by default, had manually been enabled: in this case, applying the presets resulted in it being disabled and thus a loss of remote availability. Note that these are just two concrete scenarios, but the problem is more generic. For example, if we were to add more units to an existing package, per the current approach they wouldn't have their presets applied. The new macros are designed to avoid all of the pitfalls mentioned above. As a bonus, they're also simpler to use: where the current approach requires restarts and other operations to be handled separately, the new one integrates the two so that, for each scriptlet, a single macro call is needed. https://bugzilla.redhat.com/show_bug.cgi?id=3D2210058 Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander --- libvirt.spec.in | 140 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index d09c3b3340..a41800c273 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1471,18 +1471,158 @@ then \ fi \ %libvirt_daemon_finish_restart %1 =20 +%define libvirt_rpmstatedir %{_localstatedir}/lib/rpm-state/libvirt + +# Mark units such that presets will later be applied to them. Meant +# to be called during %pre. Units that already exist on the system +# will not be marked, with the assumption that presets have already +# been applied at some point in the past. This makes it safe to call +# this macro for all units each time %pre runs. +%define libvirt_systemd_schedule_preset() \ + mkdir -p %{libvirt_rpmstatedir} || : \ + for unit in %{?*}; do \ + if ! test -e %{_unitdir}/$unit; then \ + touch %{libvirt_rpmstatedir}/preset-$unit || : \ + fi \ + done \ + %{nil} + +# Apply presets for units that have previously been marked. Meant to +# be called during %posttrans. Note that foo.service must be passed +# as the first argument, before all the various foo*.socket +# associated with it, for things to work correctly. This is necessary +# because Also=3Dfoo.socket is usually present in foo.service's +# [Install] section, and we want that configuration to take +# precedence over foo.socket's own presets. +%define libvirt_systemd_perform_preset() \ + %{?7:%{error:Too many arguments}} \ + for unit in %{?2} %{?3} %{?4} %{?5} %{?6} %1; do \ + if test -e %{libvirt_rpmstatedir}/preset-$unit; then \ + /usr/bin/systemctl --no-reload preset $unit || : \ + fi \ + rm -f %{libvirt_rpmstatedir}/preset-$unit \ + done \ + rmdir %{libvirt_rpmstatedir} 2>/dev/null || : \ + %{nil} + +# Mark a single unit for restart. Meant to be called during %pre. +%define libvirt_systemd_schedule_restart() \ + mkdir -p %{libvirt_rpmstatedir} || : \ + touch %{libvirt_rpmstatedir}/restart-%1 || : \ + %{nil} + +# Restart a unit that was previously marked. Meant to be called +# during %posttrans. If systemd is not running, no action will be +# performed. +%define libvirt_systemd_perform_restart() \ + if test -d /run/systemd/system && \ + test -e %{libvirt_rpmstatedir}/restart-%1; then \ + /usr/bin/systemctl try-restart %1 >/dev/null 2>&1 || : \ + fi \ + rm -f %{libvirt_rpmstatedir}/restart-%1 \ + rmdir %{libvirt_rpmstatedir} 2>/dev/null || : \ + %{nil} + +# Mark a single unit for reload. Meant to be called during %pre. +%define libvirt_systemd_schedule_reload() \ + mkdir -p %{libvirt_rpmstatedir} || : \ + touch %{libvirt_rpmstatedir}/reload-%1 || : \ + %{nil} + +# Reload a unit that was previously marked. Meant to be called during +# %posttrans. If systemd is not running, no action will be performed. +%define libvirt_systemd_perform_reload() \ + if test -d /run/systemd/system && \ + test -e %{libvirt_rpmstatedir}/reload-%1; then \ + /usr/bin/systemctl try-reload-or-restart %1 >/dev/null 2>&1 || : \ + fi \ + rm -f %{libvirt_rpmstatedir}/reload-%1 \ + rmdir %{libvirt_rpmstatedir} 2>/dev/null || : \ + %{nil} + +# Disable a single unit, optionally stopping it if systemd is +# running. Meant to be called during %preun. +%define libvirt_systemd_disable() \ + if test -d /run/systemd/system; then \ + /usr/bin/systemctl --no-reload disable --now %{?*} || : \ + else \ + /usr/bin/systemctl --no-reload disable %{?*} || : \ + fi \ + %{nil} + +# %pre implementation for services that should be restarted on +# upgrade. Note that foo.service must be passed as the first +# argument, before all the various foo*.socket associated with it. +%define libvirt_systemd_restart_pre() \ + %libvirt_systemd_schedule_preset %{?*} \ + %libvirt_systemd_schedule_restart %1 \ + %{nil} + +# %pre implementation for services that should be reloaded on +# upgrade. Note that foo.service must be passed as the first +# argument, before all the various foo*.socket associated with it. +%define libvirt_systemd_reload_pre() \ + %libvirt_systemd_schedule_preset %{?*} \ + %libvirt_systemd_schedule_reload %1 \ + %{nil} + +# %pre implementation for services that should be neither restarted +# nor reloaded on upgrade. +%define libvirt_systemd_noaction_pre() \ + %libvirt_systemd_schedule_preset %{?*} \ + %{nil} + +# %posttrans implementation for all services. We can use a single +# macro to cover all scenarios, because each operation will only be +# performed if it had previously been scheduled. Note that +# foo.service must be passed as the first argument, before all the +# various foo*.socket associated with it. +%define libvirt_systemd_posttrans() \ + %libvirt_systemd_perform_preset %{?*} \ + %libvirt_systemd_perform_reload %1 \ + %libvirt_systemd_perform_restart %1 \ + %{nil} + +# %preun implementation for all services. +%define libvirt_systemd_preun() \ + if [ $1 -lt 1 ]; then \ + %libvirt_systemd_disable %{?*} \ + fi \ + %{nil} + # For daemons with only UNIX sockets %define libvirt_daemon_systemd_post() %systemd_post %1.socket %1-ro.socket= %1-admin.socket %1.service %define libvirt_daemon_systemd_preun() %systemd_preun %1.service %1-ro.soc= ket %1-admin.socket %1.socket =20 +%define libvirt_systemd_unix_pre() %libvirt_systemd_restart_pre %1.service= %1.socket %1-ro.socket %1-admin.socket +%define libvirt_systemd_unix_posttrans() %libvirt_systemd_posttrans %1.ser= vice %1.socket %1-ro.socket %1-admin.socket +%define libvirt_systemd_unix_preun() %libvirt_systemd_preun %1.service %1.= socket %1-ro.socket %1-admin.socket + # For daemons with UNIX and INET sockets %define libvirt_daemon_systemd_post_inet() %systemd_post %1.socket %1-ro.s= ocket %1-admin.socket %1-tls.socket %1-tcp.socket %1.service %define libvirt_daemon_systemd_preun_inet() %systemd_preun %1.service %1-r= o.socket %1-admin.socket %1-tls.socket %1-tcp.socket %1.socket =20 +%define libvirt_systemd_inet_pre() %libvirt_systemd_restart_pre %1.service= %1.socket %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket +%define libvirt_systemd_inet_posttrans() %libvirt_systemd_posttrans %1.ser= vice %1.socket %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket +%define libvirt_systemd_inet_preun() %libvirt_systemd_preun %1.service %1.= socket %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket + # For daemons with only UNIX sockets and no unprivileged read-only access %define libvirt_daemon_systemd_post_priv() %systemd_post %1.socket %1-admi= n.socket %1.service %define libvirt_daemon_systemd_preun_priv() %systemd_preun %1.service %1-a= dmin.socket %1.socket =20 +%define libvirt_systemd_privileged_pre() %libvirt_systemd_reload_pre %1.se= rvice %1.socket %1-admin.socket +%define libvirt_systemd_privileged_posttrans() %libvirt_systemd_posttrans = %1.service %1.socket %1-admin.socket +%define libvirt_systemd_privileged_preun() %libvirt_systemd_preun %1.servi= ce %1.socket %1-admin.socket + +# For one-shot daemons that have no associated sockets and should never be= restarted +%define libvirt_systemd_oneshot_pre() %libvirt_systemd_noaction_pre %1.ser= vice +%define libvirt_systemd_oneshot_posttrans() %libvirt_systemd_posttrans %1.= service +%define libvirt_systemd_oneshot_preun() %libvirt_systemd_preun %1.service + +# For packages that install configuration for other daemons +%define libvirt_systemd_config_pre() %libvirt_systemd_schedule_restart %1.= service +%define libvirt_systemd_config_posttrans() %libvirt_systemd_perform_restar= t %1.service + %pre daemon %libvirt_sysconfig_pre libvirtd =20 --=20 2.41.0 From nobody Sat May 18 07:09:04 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=1689345604; cv=none; d=zohomail.com; s=zohoarc; b=furYifpolIEThpCtN4g9BxVjYF0pdiUoG0weob0TTXEzutrTGOfjY2Ldhofup4Q6wMe2wYmQ+1gu+1hmizPTxllvufUVC5+kVndPso2TSN5779JylahtB9cnOqMThHGjYd7h1T2SAffuADSmGEfwujKkLIxo70qXUSTutrIm5fo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689345604; 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=ECrPxRAiPT9+7D+3QTTvZZYjVrQSiRrZUWbFdBhCwz8=; b=GpDK5Gi/Z8pS/PBUoguyyQ2OYlf9BtMc5ydiGC6aYRhqnwz7Y5KDhePn/p80cMauZ0yj5WnscpkPtxcY4ksXdyUIplCgHllOFG5bHGmRnWeVJtCRmts8EMskGhfh/p8TrlPRMjvjqsO11oE9HwUrhoN3rutj5Lztsk0LRNlcTXg= 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 1689345604907451.9790018373112; Fri, 14 Jul 2023 07:40:04 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-614-iHsp_wASOESlrUnJGmXB-w-1; Fri, 14 Jul 2023 10:39:59 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5107D858EED; Fri, 14 Jul 2023 14:39:56 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3939F492C13; Fri, 14 Jul 2023 14:39:56 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CB79A1946A51; Fri, 14 Jul 2023 14:39:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 481CB1946594 for ; Fri, 14 Jul 2023 14:39:50 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3D86D2166B28; Fri, 14 Jul 2023 14:39:50 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C21012166B25 for ; Fri, 14 Jul 2023 14:39:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689345603; 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=ECrPxRAiPT9+7D+3QTTvZZYjVrQSiRrZUWbFdBhCwz8=; b=IkrO/iF9xEGlkYVIrcBAb1yjXRYpkB9BQzdntyOg+MGW/8KATZZr/cqFdnISV3LGtmtmMi E4gX64fpyjyB9W4fWQhvq1Uxb5Af5nJnvrAFVoQHYOPJs1CVZTzGFG0V/YObUDf71ODqLP hmLnwjBZ+XyqK1rDOkcA8rWO3oTvQ7U= X-MC-Unique: iHsp_wASOESlrUnJGmXB-w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 7/8] rpm: Switch to new macros for handling of systemd units Date: Fri, 14 Jul 2023 16:39:41 +0200 Message-ID: <20230714143942.125179-8-abologna@redhat.com> In-Reply-To: <20230714143942.125179-1-abologna@redhat.com> References: <20230714143942.125179-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1689345606410100001 Content-Type: text/plain; charset="utf-8"; x-default="true" In most cases the replacement is straightforward, with the biggest difference being that we now schedule restarts during %pre instead of %post. This also means that we can get rid of %post for most packages, reducing the number of scriptlets that need to run during install/upgrade. Notable exceptions are libvirt-guests.service, where we stop using the standard systemd macros to adopt our custom ones, as well as the virtlogd and virtlockd services, where the reload operation is moved from %postun to %posttrans. https://bugzilla.redhat.com/show_bug.cgi?id=3D2210058 Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander --- libvirt.spec.in | 168 +++++++++++++++++------------------------------- 1 file changed, 59 insertions(+), 109 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index a41800c273..d929170b2b 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -461,7 +461,8 @@ Requires: polkit >=3D 0.112 Requires: dmidecode %endif # For service management -Requires(post): /usr/bin/systemctl +Requires(posttrans): /usr/bin/systemctl +Requires(preun): /usr/bin/systemctl # libvirtd depends on 'messagebus' service Requires: dbus # For uid creation during pre @@ -1625,103 +1626,78 @@ fi \ =20 %pre daemon %libvirt_sysconfig_pre libvirtd - -%post daemon -%libvirt_daemon_systemd_post_inet libvirtd -%libvirt_daemon_schedule_restart libvirtd +%libvirt_systemd_inet_pre libvirtd =20 %posttrans daemon %libvirt_sysconfig_posttrans libvirtd -%libvirt_daemon_perform_restart libvirtd +%libvirt_systemd_inet_posttrans libvirtd =20 %preun daemon -%libvirt_daemon_systemd_preun_inet libvirtd +%libvirt_systemd_inet_preun libvirtd =20 %pre daemon-common %libvirt_sysconfig_pre libvirt-guests +%libvirt_systemd_oneshot_pre libvirt-guests # 'libvirt' group is just to allow password-less polkit access to libvirt # daemons. The uid number is irrelevant, so we use dynamic allocation. getent group libvirt >/dev/null || groupadd -r libvirt exit 0 =20 -%post daemon-common -%systemd_post libvirt-guests.service - %posttrans daemon-common %libvirt_sysconfig_posttrans libvirt-guests +%libvirt_systemd_oneshot_posttrans libvirt-guests =20 %preun daemon-common -%systemd_preun libvirt-guests.service - -%postun daemon-common -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -%systemd_postun libvirt-guests.service +%libvirt_systemd_oneshot_preun libvirt-guests =20 %pre daemon-lock %libvirt_sysconfig_pre virtlockd - -%post daemon-lock -%libvirt_daemon_systemd_post_priv virtlockd +%libvirt_systemd_privileged_pre virtlockd =20 %posttrans daemon-lock %libvirt_sysconfig_posttrans virtlockd +%libvirt_systemd_privileged_posttrans virtlockd =20 %preun daemon-lock -%libvirt_daemon_systemd_preun_priv virtlockd - -%postun daemon-lock -/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= || : -fi +%libvirt_systemd_privileged_preun virtlockd =20 %pre daemon-log %libvirt_sysconfig_pre virtlogd - -%post daemon-log -%libvirt_daemon_systemd_post_priv virtlogd +%libvirt_systemd_privileged_pre virtlogd =20 %posttrans daemon-log %libvirt_sysconfig_posttrans virtlogd +%libvirt_systemd_privileged_posttrans virtlogd =20 %preun daemon-log -%libvirt_daemon_systemd_preun_priv virtlogd - -%postun daemon-log -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - /bin/systemctl reload-or-try-restart virtlogd.service >/dev/null 2>&1 = || : -fi +%libvirt_systemd_privileged_preun virtlogd =20 %pre daemon-proxy %libvirt_sysconfig_pre virtproxyd - -%post daemon-proxy -%libvirt_daemon_systemd_post_inet virtproxyd +%libvirt_systemd_inet_pre virtproxyd =20 %posttrans daemon-proxy %libvirt_sysconfig_posttrans virtproxyd +%libvirt_systemd_inet_posttrans virtproxyd =20 %preun daemon-proxy -%libvirt_daemon_systemd_preun_inet virtproxyd +%libvirt_systemd_inet_preun virtproxyd =20 %pre daemon-driver-network %libvirt_sysconfig_pre virtnetworkd +%libvirt_systemd_unix_pre virtnetworkd =20 %post daemon-driver-network %if %{with_firewalld_zone} %firewalld_reload %endif =20 -%libvirt_daemon_systemd_post virtnetworkd -%libvirt_daemon_schedule_restart virtnetworkd - %posttrans daemon-driver-network %libvirt_sysconfig_posttrans virtnetworkd -%libvirt_daemon_perform_restart virtnetworkd +%libvirt_systemd_unix_posttrans virtnetworkd =20 %preun daemon-driver-network -%libvirt_daemon_systemd_preun virtnetworkd +%libvirt_systemd_unix_preun virtnetworkd =20 %postun daemon-driver-network %if %{with_firewalld_zone} @@ -1730,77 +1706,63 @@ fi =20 %pre daemon-driver-nwfilter %libvirt_sysconfig_pre virtnwfilterd - -%post daemon-driver-nwfilter -%libvirt_daemon_systemd_post virtnwfilterd -%libvirt_daemon_schedule_restart virtnwfilterd +%libvirt_systemd_unix_pre virtnwfilterd =20 %posttrans daemon-driver-nwfilter %libvirt_sysconfig_posttrans virtnwfilterd -%libvirt_daemon_perform_restart virtnwfilterd +%libvirt_systemd_unix_posttrans virtnwfilterd =20 %preun daemon-driver-nwfilter -%libvirt_daemon_systemd_preun virtnwfilterd +%libvirt_systemd_unix_preun virtnwfilterd =20 %pre daemon-driver-nodedev %libvirt_sysconfig_pre virtnodedevd - -%post daemon-driver-nodedev -%libvirt_daemon_systemd_post virtnodedevd -%libvirt_daemon_schedule_restart virtnodedevd +%libvirt_systemd_unix_pre virtnodedevd =20 %posttrans daemon-driver-nodedev %libvirt_sysconfig_posttrans virtnodedevd -%libvirt_daemon_perform_restart virtnodedevd +%libvirt_systemd_unix_posttrans virtnodedevd =20 %preun daemon-driver-nodedev -%libvirt_daemon_systemd_preun virtnodedevd +%libvirt_systemd_unix_preun virtnodedevd =20 %pre daemon-driver-interface %libvirt_sysconfig_pre virtinterfaced - -%post daemon-driver-interface -%libvirt_daemon_systemd_post virtinterfaced -%libvirt_daemon_schedule_restart virtinterfaced +%libvirt_systemd_unix_pre virtinterfaced =20 %posttrans daemon-driver-interface %libvirt_sysconfig_posttrans virtinterfaced -%libvirt_daemon_perform_restart virtinterfaced +%libvirt_systemd_unix_posttrans virtinterfaced =20 %preun daemon-driver-interface -%libvirt_daemon_systemd_preun virtinterfaced +%libvirt_systemd_unix_preun virtinterfaced =20 %pre daemon-driver-secret %libvirt_sysconfig_pre virtsecretd - -%post daemon-driver-secret -%libvirt_daemon_systemd_post virtsecretd -%libvirt_daemon_schedule_restart virtsecretd +%libvirt_systemd_unix_pre virsecretd =20 %posttrans daemon-driver-secret %libvirt_sysconfig_posttrans virtsecretd -%libvirt_daemon_perform_restart virtsecretd +%libvirt_systemd_unix_posttrans virsecretd =20 %preun daemon-driver-secret -%libvirt_daemon_systemd_preun virtsecretd +%libvirt_systemd_unix_preun virsecretd =20 %pre daemon-driver-storage-core %libvirt_sysconfig_pre virtstoraged - -%post daemon-driver-storage-core -%libvirt_daemon_systemd_post virtstoraged -%libvirt_daemon_schedule_restart virtstoraged +%libvirt_systemd_unix_pre virtstoraged =20 %posttrans daemon-driver-storage-core %libvirt_sysconfig_posttrans virtstoraged -%libvirt_daemon_perform_restart virtstoraged +%libvirt_systemd_unix_posttrans virtstoraged =20 %preun daemon-driver-storage-core -%libvirt_daemon_systemd_preun virtstoraged +%libvirt_systemd_unix_preun virtstoraged =20 %if %{with_qemu} %pre daemon-driver-qemu %libvirt_sysconfig_pre virtqemud +%libvirt_systemd_unix_pre virtqemud # We want soft static allocation of well-known ids, as disk images # are commonly shared across NFS mounts by id rather than name; see # https://fedoraproject.org/wiki/Packaging:UsersAndGroups @@ -1815,66 +1777,57 @@ if ! getent passwd qemu >/dev/null; then fi exit 0 =20 -%post daemon-driver-qemu -%libvirt_daemon_systemd_post virtqemud -%libvirt_daemon_schedule_restart virtqemud - %posttrans daemon-driver-qemu %libvirt_sysconfig_posttrans virtqemud -%libvirt_daemon_perform_restart virtqemud +%libvirt_systemd_unix_posttrans virtqemud =20 %preun daemon-driver-qemu -%libvirt_daemon_systemd_preun virtqemud +%libvirt_systemd_unix_preun virtqemud %endif =20 %if %{with_lxc} %pre daemon-driver-lxc %libvirt_sysconfig_pre virtlxcd - -%post daemon-driver-lxc -%libvirt_daemon_systemd_post virtlxcd -%libvirt_daemon_schedule_restart virtlxcd +%libvirt_systemd_unix_pre virtlxcd =20 %posttrans daemon-driver-lxc %libvirt_sysconfig_posttrans virtlxcd -%libvirt_daemon_perform_restart virtlxcd +%libvirt_systemd_unix_posttrans virtlxcd =20 %preun daemon-driver-lxc -%libvirt_daemon_systemd_preun virtlxcd +%libvirt_systemd_unix_preun virtlxcd %endif =20 %if %{with_vbox} %pre daemon-driver-vbox %libvirt_sysconfig_pre virtvboxd - -%post daemon-driver-vbox -%libvirt_daemon_systemd_post virtvboxd -%libvirt_daemon_schedule_restart virtvboxd +%libvirt_systemd_unix_pre virtvboxd =20 %posttrans daemon-driver-vbox %libvirt_sysconfig_posttrans virtvboxd -%libvirt_daemon_perform_restart virtvboxd +%libvirt_systemd_unix_posttrans virtvboxd =20 %preun daemon-driver-vbox -%libvirt_daemon_systemd_preun virtvboxd +%libvirt_systemd_unix_preun virtvboxd %endif =20 %if %{with_libxl} %pre daemon-driver-libxl %libvirt_sysconfig_pre virtxend - -%post daemon-driver-libxl -%libvirt_daemon_systemd_post virtxend -%libvirt_daemon_schedule_restart virtxend +%libvirt_systemd_unix_pre virtxend =20 %posttrans daemon-driver-libxl %libvirt_sysconfig_posttrans virtxend -%libvirt_daemon_perform_restart virtxend +%libvirt_systemd_unix_posttrans virtxend =20 %preun daemon-driver-libxl -%libvirt_daemon_systemd_preun virtxend +%libvirt_systemd_unix_preun virtxend %endif =20 +%pre daemon-config-network +%libvirt_systemd_config_pre libvirtd +%libvirt_systemd_config_pre virtnetworkd + %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, @@ -1911,15 +1864,15 @@ if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvir= t/qemu/networks/default.xml ; ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/de= fault.xml # libvirt saves this file with mode 0600 chmod 0600 %{_sysconfdir}/libvirt/qemu/networks/default.xml - - # 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 +%libvirt_systemd_config_posttrans libvirtd +%libvirt_systemd_config_posttrans virtnetworkd + +%pre daemon-config-nwfilter +%libvirt_systemd_config_pre libvirtd +%libvirt_systemd_config_pre virtnwfilterd =20 %post daemon-config-nwfilter for datadir_file in %{_datadir}/libvirt/nwfilter/*.xml; do @@ -1929,13 +1882,10 @@ for datadir_file in %{_datadir}/libvirt/nwfilter/*.= xml; do install -m 0600 "$datadir_file" "$sysconfdir_file" fi 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 +%libvirt_systemd_config_posttrans libvirtd +%libvirt_systemd_config_posttrans virtnwfilterd =20 %if %{with_lxc} %pre login-shell --=20 2.41.0 From nobody Sat May 18 07:09:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1689345665; cv=none; d=zohomail.com; s=zohoarc; b=MBLoMWOpHhXcj+Ul9l5x3I7oJbVlqw7X2g5V2UIK4+bgozjGIm+cJyX1RbvkhiTqJzhzS59Bay1TSEaqQ8xyj3wkGcTgqV0uUq9tUZYcOsC0CR997djmO0QvJSyE2QH3CEfDXKErZnkcFbui8WcA2G6pK4nSs2fvNRE24NClW7Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689345665; 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=Z7kP2T9Y1E8CRMXnJglkqaTTA6fQ/cPnCdqXx+L32GY=; b=SRyTqFenwNovnHJI34donQvuLl7pPec/6N5Yhzis1dC70FXzcbMfqvIBPV2Y6qantEzy5hFK1y40UyE0y+RYyvjsjeZ1cUhJNKf1u4xNX3n8Vvi7Fbro/uZ9xKxshEXs5CiXOYj4pmUvfonHfuReQwTMagmChh3SEr7DAAsWr7w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 168934566585869.9918588212073; Fri, 14 Jul 2023 07:41:05 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-650-ry0GCOy1OleiCCd-2d8lVA-1; Fri, 14 Jul 2023 10:40:02 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 142FA185A7A2; Fri, 14 Jul 2023 14:39:59 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id F1B694CD0E1; Fri, 14 Jul 2023 14:39:58 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B36A31946A46; Fri, 14 Jul 2023 14:39:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DD8A11946A69 for ; Fri, 14 Jul 2023 14:39:50 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CE9E42166B26; Fri, 14 Jul 2023 14:39:50 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 81B3A2166B25 for ; Fri, 14 Jul 2023 14:39:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689345664; 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=Z7kP2T9Y1E8CRMXnJglkqaTTA6fQ/cPnCdqXx+L32GY=; b=eemmShTIAYrzS6X9hu9Mv/S3mWUD8NFFv6/RTgdwf13gBp8pjfGPr/O54cj6ETXVEGJFvo ZIgNv8nFxwnhvf4TAe31aDemgSwdi706zcM1ci6RyZuE5mvj3aqJ0KLstRcI5mr7Aeppp4 3PGErK9HBz2Qc4l/nuGmoySLOTykKWA= X-MC-Unique: ry0GCOy1OleiCCd-2d8lVA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 8/8] rpm: Delete unused macros Date: Fri, 14 Jul 2023 16:39:42 +0200 Message-ID: <20230714143942.125179-9-abologna@redhat.com> In-Reply-To: <20230714143942.125179-1-abologna@redhat.com> References: <20230714143942.125179-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1689345667992100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Signed-off-by: Andrea Bolognani Reviewed-by: Martin Kletzander --- libvirt.spec.in | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index d929170b2b..17d5f5ff4a 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1457,21 +1457,6 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-= guests.sh # raising the test timeout VIR_TEST_DEBUG=3D1 %meson_test --no-suite syntax-check --timeout-multiplie= r 10 =20 -%define 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 || : - -%define libvirt_daemon_finish_restart() rm -f %{_localstatedir}/lib/rpm-st= ate/libvirt/restart-%1 \ -rmdir %{_localstatedir}/lib/rpm-state/libvirt 2>/dev/null || : - -%define libvirt_daemon_needs_restart() -f %{_localstatedir}/lib/rpm-state/= libvirt/restart-%1 - -%define 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 - %define libvirt_rpmstatedir %{_localstatedir}/lib/rpm-state/libvirt =20 # Mark units such that presets will later be applied to them. Meant @@ -1592,25 +1577,17 @@ fi \ %{nil} =20 # For daemons with only UNIX sockets -%define libvirt_daemon_systemd_post() %systemd_post %1.socket %1-ro.socket= %1-admin.socket %1.service -%define libvirt_daemon_systemd_preun() %systemd_preun %1.service %1-ro.soc= ket %1-admin.socket %1.socket =20 %define libvirt_systemd_unix_pre() %libvirt_systemd_restart_pre %1.service= %1.socket %1-ro.socket %1-admin.socket %define libvirt_systemd_unix_posttrans() %libvirt_systemd_posttrans %1.ser= vice %1.socket %1-ro.socket %1-admin.socket %define libvirt_systemd_unix_preun() %libvirt_systemd_preun %1.service %1.= socket %1-ro.socket %1-admin.socket =20 # For daemons with UNIX and INET sockets -%define libvirt_daemon_systemd_post_inet() %systemd_post %1.socket %1-ro.s= ocket %1-admin.socket %1-tls.socket %1-tcp.socket %1.service -%define libvirt_daemon_systemd_preun_inet() %systemd_preun %1.service %1-r= o.socket %1-admin.socket %1-tls.socket %1-tcp.socket %1.socket - %define libvirt_systemd_inet_pre() %libvirt_systemd_restart_pre %1.service= %1.socket %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket %define libvirt_systemd_inet_posttrans() %libvirt_systemd_posttrans %1.ser= vice %1.socket %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket %define libvirt_systemd_inet_preun() %libvirt_systemd_preun %1.service %1.= socket %1-ro.socket %1-admin.socket %1-tls.socket %1-tcp.socket =20 # For daemons with only UNIX sockets and no unprivileged read-only access -%define libvirt_daemon_systemd_post_priv() %systemd_post %1.socket %1-admi= n.socket %1.service -%define libvirt_daemon_systemd_preun_priv() %systemd_preun %1.service %1-a= dmin.socket %1.socket - %define libvirt_systemd_privileged_pre() %libvirt_systemd_reload_pre %1.se= rvice %1.socket %1-admin.socket %define libvirt_systemd_privileged_posttrans() %libvirt_systemd_posttrans = %1.service %1.socket %1-admin.socket %define libvirt_systemd_privileged_preun() %libvirt_systemd_preun %1.servi= ce %1.socket %1-admin.socket --=20 2.41.0