From nobody Sat Apr 20 11:16:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1605800220; cv=none; d=zohomail.com; s=zohoarc; b=XTrJ0vWG6kNyivL1iCaGuvg/Y+XTIEmO9P7zxJmeeqskeXB9+B8E6BtF9XZuxU3Kam9Fm1C5xjPuRtt1kNMBAPzEsNvcE1K6tysWMY+94AWM5p38E0Z1bx9psx8xuUv40HIGbcuz0E2H8f5uQ04F1nmbL9OTrYm0bzUS+/lZacs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605800220; 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=+An0L66JRapBz0ZXngBSHo024E6LsEzADyZDmrJNHU8=; b=Afin/BxVKXMAZxUu6GT+lF0NUc+rCFw0Cl7gbv2dTo6LKx6ax7X1WfQBBGYaRc3BJ75YG2xRQVCYgcoaBO5+b0xiGctn3rf6r/vuVrkvjQ/D+oJPNVtGDF2i28dcqk2ukhhXSWnuRNAuf2MdGZ3cvdP5C1q3w2GzGq9LMAiQ2TA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1605800220953304.39225829303064; Thu, 19 Nov 2020 07:37:00 -0800 (PST) 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-406-pZciLwCAMe22cYdMyV22IA-1; Thu, 19 Nov 2020 10:36:57 -0500 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 31B0B80ED8A; Thu, 19 Nov 2020 15:36:52 +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 13D826064B; Thu, 19 Nov 2020 15:36:52 +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 CE94A4BB7B; Thu, 19 Nov 2020 15:36:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AJFacVU022252 for ; Thu, 19 Nov 2020 10:36:38 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9251760C05; Thu, 19 Nov 2020 15:36:38 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.194.170]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EBB7260BE2 for ; Thu, 19 Nov 2020 15:36:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605800219; 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=+An0L66JRapBz0ZXngBSHo024E6LsEzADyZDmrJNHU8=; b=fm/MlvEpH+KD/QULNIxLkrNRJ5LxStD05dA3lHccNisDnvCH+L7xP8TlEF9Gjsz0nRbex2 LZLDZpxbhGLpieki+1Fgq3EmGg7n4SQcyphhAKrbcUEB8LS5NxUwJC7cpIL9zrKzWnn6yN N82hvbZQt6N4yVd5sIKovGhTJ+3k7xA= X-MC-Unique: pZciLwCAMe22cYdMyV22IA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 1/3] conf: Write network config to disk after generating UUID Date: Thu, 19 Nov 2020 16:36:28 +0100 Message-Id: <20201119153630.332878-2-abologna@redhat.com> In-Reply-To: <20201119153630.332878-1-abologna@redhat.com> References: <20201119153630.332878-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" While we generally expect libvirt objects to be defined using the appropriate APIs, there are cases where it's reasonable for an external entity, usually a package manager, to drop a valid configuration file under /etc/libvirt and have libvirt take over from there: notably, this is exactly how the default network is handled. For the most part, whether the configuration is saved back to disk after being parsed by libvirt doesn't matter, because we'll end up with the same values anyway, but an obvious exception to this is data that gets randomly generated when not present, namely MAC address and UUID. Historically, both were handled by our build system, but commit a47ae7c004e9 moved handling of the former inside libvirt proper; this commit extends such behavior to the latter as well. Proper error handling for the virNetworkSaveConfig() call, which was missing until now, is introduced in the process. Signed-off-by: Andrea Bolognani Reviewed-by: Laine Stump --- src/conf/virnetworkobj.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/conf/virnetworkobj.c b/src/conf/virnetworkobj.c index 1b29d7cc64..1e167c7874 100644 --- a/src/conf/virnetworkobj.c +++ b/src/conf/virnetworkobj.c @@ -1001,6 +1001,7 @@ virNetworkLoadConfig(virNetworkObjListPtr nets, char *configFile =3D NULL, *autostartLink =3D NULL; virNetworkDefPtr def =3D NULL; virNetworkObjPtr obj; + bool saveConfig =3D false; int autostart; =20 if ((configFile =3D virNetworkConfigFile(configDir, name)) =3D=3D NULL) @@ -1029,7 +1030,10 @@ virNetworkLoadConfig(virNetworkObjListPtr nets, case VIR_NETWORK_FORWARD_OPEN: if (!def->mac_specified) { virNetworkSetBridgeMacAddr(def); - virNetworkSaveConfig(configDir, def, xmlopt); + /* We just generated a new MAC address, and we need to persist + * the configuration to disk to avoid the network getting a + * different one the next time the daemon is started */ + saveConfig =3D true; } break; =20 @@ -1049,6 +1053,17 @@ virNetworkLoadConfig(virNetworkObjListPtr nets, goto error; } =20 + /* The network didn't have a UUID so we generated a new one, and + * we need to persist the configuration to disk to avoid the network + * getting a different one the next time the daemon is started */ + if (!def->uuid_specified) + saveConfig =3D true; + + if (saveConfig && + virNetworkSaveConfig(configDir, def, xmlopt) < 0) { + goto error; + } + if (!(obj =3D virNetworkObjAssignDef(nets, def, 0))) goto error; =20 --=20 2.26.2 From nobody Sat Apr 20 11:16:37 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=1605800213; cv=none; d=zohomail.com; s=zohoarc; b=j8f+2amACr5a1nL7q5ocQznljtOi5RV5ES0RWbiijxlX4KnHVnpjURX5y8Z4+atXsph3WrVJHQoSTEXBiNUuKVfjoXCIqglERD+5FpQpywml8MTIxgzaaGwOmy98eIPl0Fkkl17AxXk8oIPYfszJbHZOJfRzd0cs6mHl9bRLB4k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605800213; 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=GMh8nI49OZnOL2giLVTTUsTl9ajyRpt8WWFJLPCl2RQ=; b=Q0qHFU6mnZzTpl7i/sOuu7XAqypupPhiLsgHnkF25b9yEmTMAeccAT+JJUOCrp33GIaxcZ4h94vKrouViPW68g2Wn8HhXSsho3g+iRU+0L0WMzarpH4UPXyeCDda4uK98mU10KprM9QU+1ikA32HXXwUKDD5DIG30CFq6hlfbRQ= 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) header.from= 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 1605800213854400.40692109749875; Thu, 19 Nov 2020 07:36:53 -0800 (PST) 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-229-9QzoC-rBORKUMF7SDFhsTw-1; Thu, 19 Nov 2020 10:36:50 -0500 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 8ABDD1005D58; Thu, 19 Nov 2020 15:36:42 +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 5FBD760636; Thu, 19 Nov 2020 15:36:42 +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 BF35A1809C9F; Thu, 19 Nov 2020 15:36:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AJFadY1022260 for ; Thu, 19 Nov 2020 10:36:39 -0500 Received: by smtp.corp.redhat.com (Postfix) id A89B860BE2; Thu, 19 Nov 2020 15:36:39 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.194.170]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 013A560C05 for ; Thu, 19 Nov 2020 15:36:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605800212; 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=GMh8nI49OZnOL2giLVTTUsTl9ajyRpt8WWFJLPCl2RQ=; b=ICcWAZ3RNqp9b6dINZEQua5RMQPGTF8uU1OXPozkRyOyMlb9t+/O6Kf6fVIYLwThcKTeFv 8R4X6xBYbAFRx5O+fW0CiHZZDV4Nrr4WNxrukdiNxZUnS4hgJaZwHLsqhJsPjmOImcrJ+d L3voEvQc9FIX2GvVtcw2fIbtNi2olZw= X-MC-Unique: 9QzoC-rBORKUMF7SDFhsTw-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 2/3] network: Drop UUID handling for default network Date: Thu, 19 Nov 2020 16:36:29 +0100 Message-Id: <20201119153630.332878-3-abologna@redhat.com> In-Reply-To: <20201119153630.332878-1-abologna@redhat.com> References: <20201119153630.332878-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" We are generating a fresh UUID and storing it in the XML for the default network, but this is unnecessary because the network driver will automatically generate one if it's missing from the XML; the fact that we only do this if the uuidgen command happens to be available on the build machine is further proof that we can safely skip this step. This patch is best viewed with 'git show -w'. Signed-off-by: Andrea Bolognani Reviewed-by: Laine Stump --- src/network/meson.build | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/src/network/meson.build b/src/network/meson.build index 13dd2c26b2..3ec598c3f9 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -84,31 +84,13 @@ if conf.has('WITH_NETWORK') runstatedir / 'libvirt' / 'network', ] =20 - uuidgen_prog =3D find_program('uuidgen', required: false) - - if uuidgen_prog.found() - uuid =3D run_command(uuidgen_prog).stdout().strip() - - configure_file( - input: 'default.xml.in', - output: '@BASENAME@', - command: [ - 'sed', '-e', 's||\\n @0@|'.format(uuid= ), - '@INPUT@', - ], - capture: true, - install: true, - install_dir: confdir / 'qemu' / 'networks', - ) - else - configure_file( - input: 'default.xml.in', - output: '@BASENAME@', - copy: true, - install: true, - install_dir: confdir / 'qemu' / 'networks', - ) - endif + configure_file( + input: 'default.xml.in', + output: '@BASENAME@', + copy: true, + install: true, + install_dir: confdir / 'qemu' / 'networks', + ) =20 meson.add_install_script( meson_python_prog.path(), python3_prog.path(), meson_install_symlink_p= rog.path(), --=20 2.26.2 From nobody Sat Apr 20 11:16:37 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=1605800296; cv=none; d=zohomail.com; s=zohoarc; b=M7dl/0lFzuQow12IClFt/8Chn1i3p9OMGoCf59Xe0Cm0Uiq7WFuwECrprIywWYYbu+swzuhKcDLH32CenZA6sfyI9niCWIH0QMaMQvUyeujRj3ZuM96GcGSnqigYiwaB9D+iuq3dg/mKsMi1RtJrYm/Rx0XpVpMLuvgVNb/BUPk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605800296; 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=Y1G7vFdcURNhvKOu1RW+Bh1BsFL9t46sT8i7lTOyTO0=; b=GeqF+sZmGbI15dV9KBgsIJdhiQTnhDL+GFKN3O4MAGUleQB5smUXjKHWi5O8iDEAGrHE/0EGSBDo6IkUJXxgPgLbsHX8lBsuQKLxfcOo/ycWhR/Ci4ofvYduHHGScmyd/w6DC9+ovMCuIr4B0IlAa1h2tAnJhOgypmWS80a0T8g= 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) header.from= 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 160580029656524.93320406967564; Thu, 19 Nov 2020 07:38:16 -0800 (PST) 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-514-cuP_1HLUPdmw7u7Z0EDGXQ-1; Thu, 19 Nov 2020 10:37:00 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0A47E10051D3; Thu, 19 Nov 2020 15:36:55 +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 D7D605D6A8; Thu, 19 Nov 2020 15:36:54 +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 99E4D4E58F; Thu, 19 Nov 2020 15:36:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AJFafmf022280 for ; Thu, 19 Nov 2020 10:36:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id 166B860C05; Thu, 19 Nov 2020 15:36:41 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.194.170]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 45FD860BE2 for ; Thu, 19 Nov 2020 15:36:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605800295; 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=Y1G7vFdcURNhvKOu1RW+Bh1BsFL9t46sT8i7lTOyTO0=; b=NvKvrCxRwhnVLhsThAu3iGmbTqqERrBV5a6laQfSjP/j4uuQOpYPF/4BPOl7Oxlx4BkvBE PHVCeYeP+n0lTTabnZ95ArnY1KLWU0U7GkXecUa0ceO+xnYlB0y1DpBKdzodPnoM4yADR7 mOGWIkCM3y/jQfGPnrpivE+iewcwHB8= X-MC-Unique: cuP_1HLUPdmw7u7Z0EDGXQ-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 3/3] spec: Drop UUID handling for default network Date: Thu, 19 Nov 2020 16:36:30 +0100 Message-Id: <20201119153630.332878-4-abologna@redhat.com> In-Reply-To: <20201119153630.332878-1-abologna@redhat.com> References: <20201119153630.332878-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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.15 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" We're no longer generating a UUID during installation, so we clearly don't need to strip it afterwards; and since the network driver is perfectly capable of generating a UUID if necessary, we don't need to do that at %post time either. Signed-off-by: Andrea Bolognani Reviewed-by: Neal Gompa Reviewed-by: Laine Stump --- libvirt.spec.in | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index de76878bc6..880051b6f8 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1240,8 +1240,6 @@ cp -a $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter/= *.xml \ # libvirt saves these files with mode 600 chmod 600 $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter/*.xml =20 -# Strip auto-generated UUID - we need it generated per-install -sed -i -e "//d" $RPM_BUILD_ROOT%{_datadir}/libvirt/networks/default.= xml %if ! %{with_qemu} rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/libvirtd_qemu.aug rm -f $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug @@ -1422,9 +1420,7 @@ if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/= qemu/networks/default.xml ; ;; esac =20 - UUID=3D`/usr/bin/uuidgen` sed -e "s/${orig_sub}/${sub}/g" \ - -e "s,,\n $UUID," \ < %{_datadir}/libvirt/networks/default.xml \ > %{_sysconfdir}/libvirt/qemu/networks/default.xml ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/de= fault.xml --=20 2.26.2