From nobody Fri Mar 29 01:07:03 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=1605473031; cv=none; d=zohomail.com; s=zohoarc; b=jJPnumn+HYO+QMMkmDZ8fN/huCE2UMplyGX3NZnODAocgprmyJ3Y/nfDhianswe0Zb/H0HNLLbQNkL+kC0hQVw2Dken7oH39gl7kdb+4cOixyryUwoB/5gRYyc4dZZ+i04lnmNureuDRjVKbpLwQ3WuJhu9KsnIUW54nKqZMorI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605473031; 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=UvfsDvKWLCh4SZvu1zOFIjkfxF50gwLNzOUOun0zrFoRP4FOCQmCONBWn9HZr05lCTJM6qGhT3jw+qje4Hwku63YPepbkGclth+/m8elLaBcxrs7wBxLP5UYgGOwMVsVBpFr3Ol1zgBdlmgKLgpOz/Hf+KSibEvptlPwf1QduJM= 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 1605473031479577.3301699308554; Sun, 15 Nov 2020 12:43:51 -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-106-TDlPgNgRMRmu-B_wrXvC8A-1; Sun, 15 Nov 2020 15:43:47 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 611361007465; Sun, 15 Nov 2020 20:43:42 +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 5EB6660CCC; Sun, 15 Nov 2020 20:43:41 +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 2BAF858107; Sun, 15 Nov 2020 20:43:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AFKhYRa027933 for ; Sun, 15 Nov 2020 15:43:34 -0500 Received: by smtp.corp.redhat.com (Postfix) id 04F823C04; Sun, 15 Nov 2020 20:43:34 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.192.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 13DD027CC1 for ; Sun, 15 Nov 2020 20:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605473030; 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=AGbiJnHfuayock1sh3khzesVUjSTnoyyjQ7ORtaJ9HF3uBS/ycXI3ONqXoWsGAyh5xdBtH bXWuyTA816aybRvcDE0d7McukGdvJzpbA4pvNShJ2v7j6Qj9f38zShnEKbl3CDFGmP2xA8 iPignXlBXqFXnqUKAOhLeObIwQQTQLY= X-MC-Unique: TDlPgNgRMRmu-B_wrXvC8A-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] network: Drop UUID handling for default network Date: Sun, 15 Nov 2020 21:43:22 +0100 Message-Id: <20201115204323.119777-2-abologna@redhat.com> In-Reply-To: <20201115204323.119777-1-abologna@redhat.com> References: <20201115204323.119777-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-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 --- 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 Fri Mar 29 01:07:03 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=1605473038; cv=none; d=zohomail.com; s=zohoarc; b=LtGyQj51EvPNYAy7eV4d613hvJFZFc7Iw7Nupe6l9Qy2sIx8ZqAjOs2E6TvsBZj/0Dh6hkuUfLzsQjYSNa4d3t7TZ1FzmoDhHWq1oByGrr1Wtre7jJqETaf7MTsYjrqHuSvgKynOIvqbxziUZk08hiaYxjPuSW1U5VyJq+1BMc8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605473038; 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=0t/24N7/+bhlrpYef1bx14mbArh4jdaEemN/ppkYbHc=; b=mZo/pK/FDWJbWRwVfP8o9ebTn5dpYpqV/MwBiLBd0jj471BsKQ3mABjgQw1s75tI4GvhzHtJMB8XGGE+sPvmCvSAJwzJr6+I2WngZrLXpJOSQ5Ss8weug0+1Zwzq9cRGHvRFj2WfYYb8BW0fcYZsovYBX+rbLfhv/YwT5bcw58A= 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 1605473037885731.1047023261076; Sun, 15 Nov 2020 12:43:57 -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-451-oTatbzb8MAyUHpw-i5Q_mw-1; Sun, 15 Nov 2020 15:43:51 -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 EAF6C8049C4; Sun, 15 Nov 2020 20:43:43 +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 C931A51919; Sun, 15 Nov 2020 20:43:43 +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 913F5180C5A2; Sun, 15 Nov 2020 20:43:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AFKhZcB027944 for ; Sun, 15 Nov 2020 15:43:35 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6E2EE27BA5; Sun, 15 Nov 2020 20:43:35 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.192.74]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7D1363C04 for ; Sun, 15 Nov 2020 20:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605473034; 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=0t/24N7/+bhlrpYef1bx14mbArh4jdaEemN/ppkYbHc=; b=HuST2WeWN54ofgRUewsSdF6PkIHpQpheD+nlC2h6dUj+Nd/Ua4ZHexx5iNK/SdJhhafVAS uG72aatA8iszk805lr+l7SSRCHBVS/LgVtgVcKBAJ39ALpD2N42YruvMJHr0t20+CcDOq/ x3fQ0vU1pRHe7tTn+okX5/KZ6nnleZM= X-MC-Unique: oTatbzb8MAyUHpw-i5Q_mw-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] spec: Drop UUID handling for default network Date: Sun, 15 Nov 2020 21:43:23 +0100 Message-Id: <20201115204323.119777-3-abologna@redhat.com> In-Reply-To: <20201115204323.119777-1-abologna@redhat.com> References: <20201115204323.119777-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.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 --- libvirt.spec.in | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 034982809d..f4cee8940d 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