From nobody Sun Feb 8 21:20:41 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1714024528961480.9513575794999; Wed, 24 Apr 2024 22:55:28 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id DB1AE2369; Thu, 25 Apr 2024 01:55:27 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 2523E22E5; Thu, 25 Apr 2024 01:39:41 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 7228721BB; Thu, 25 Apr 2024 01:38:43 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 4B5AF21AD for ; Thu, 25 Apr 2024 01:38:38 -0400 (EDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-223-9BVLWbdrNDeFcEhcf0GhAw-1; Thu, 25 Apr 2024 01:38:36 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1E03480D6E1 for ; Thu, 25 Apr 2024 05:38:36 +0000 (UTC) Received: from vhost3.router.laine.org (unknown [10.22.32.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 08E67492BC6 for ; Thu, 25 Apr 2024 05:38:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: 9BVLWbdrNDeFcEhcf0GhAw-1 From: Laine Stump To: devel@lists.libvirt.org Subject: [PATCH v3 11/27] network: add (empty) network.conf file to distribution files Date: Thu, 25 Apr 2024 01:38:17 -0400 Message-ID: <20240425053833.1066517-12-laine@redhat.com> In-Reply-To: <20240425053833.1066517-1-laine@redhat.com> References: <20240425053833.1066517-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: 3QOBK2GYWPNWVH5ZKRJHIIP2UT5EKSNW X-Message-ID-Hash: 3QOBK2GYWPNWVH5ZKRJHIIP2UT5EKSNW X-MailFrom: laine@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1714024530266100001 This file is generated from network.conf.in because it will soon have an item that must be modified according to meson buildtime config. Signed-off-by: Laine Stump Reviewed-by: Daniel P. Berrang=C3=A9 --- libvirt.spec.in | 3 ++ src/network/libvirtd_network.aug | 36 ++++++++++++++++++++++++ src/network/meson.build | 16 +++++++++++ src/network/network.conf.in | 3 ++ src/network/test_libvirtd_network.aug.in | 2 ++ 5 files changed, 60 insertions(+) create mode 100644 src/network/libvirtd_network.aug create mode 100644 src/network/network.conf.in create mode 100644 src/network/test_libvirtd_network.aug.in diff --git a/libvirt.spec.in b/libvirt.spec.in index 64018192b6..bde25c6f6e 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -2108,6 +2108,9 @@ exit 0 %config(noreplace) %{_sysconfdir}/libvirt/virtnetworkd.conf %{_datadir}/augeas/lenses/virtnetworkd.aug %{_datadir}/augeas/lenses/tests/test_virtnetworkd.aug +%config(noreplace) %{_sysconfdir}/libvirt/network.conf +%{_datadir}/augeas/lenses/libvirtd_network.aug +%{_datadir}/augeas/lenses/tests/test_libvirtd_network.aug %{_unitdir}/virtnetworkd.service %{_unitdir}/virtnetworkd.socket %{_unitdir}/virtnetworkd-ro.socket diff --git a/src/network/libvirtd_network.aug b/src/network/libvirtd_networ= k.aug new file mode 100644 index 0000000000..ae153d96a1 --- /dev/null +++ b/src/network/libvirtd_network.aug @@ -0,0 +1,36 @@ +(* /etc/libvirt/network.conf *) + +module Libvirtd_network =3D + autoload xfm + + let eol =3D del /[ \t]*\n/ "\n" + let value_sep =3D del /[ \t]*=3D[ \t]*/ " =3D " + let indent =3D del /[ \t]*/ "" + + let array_sep =3D del /,[ \t\n]*/ ", " + let array_start =3D del /\[[ \t\n]*/ "[ " + let array_end =3D del /\]/ "]" + + let str_val =3D del /\"/ "\"" . store /[^\"]*/ . del /\"/ "\"" + let bool_val =3D store /0|1/ + let int_val =3D store /[0-9]+/ + let str_array_element =3D [ seq "el" . str_val ] . del /[ \t\n]*/ "" + let str_array_val =3D counter "el" . array_start . ( str_array_element = . ( array_sep . str_array_element ) * ) ? . array_end + + let str_entry (kw:string) =3D [ key kw . value_sep . str_val ] + let bool_entry (kw:string) =3D [ key kw . value_sep . bool_val ] + let int_entry (kw:string) =3D [ key kw . value_sep . int_val ] + let str_array_entry (kw:string) =3D [ key kw . value_sep . str_array_va= l ] + + (* Each entry in the config is one of the following *) + let comment =3D [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \= t\n][^\n]*)?/ . del /\n/ "\n" ] + let empty =3D [ label "#empty" . eol ] + + let record =3D indent . eol + + let lns =3D ( record | comment | empty ) * + + let filter =3D incl "/etc/libvirt/network.conf" + . Util.stdexcl + + let xfm =3D transform lns filter diff --git a/src/network/meson.build b/src/network/meson.build index 305e2d52fb..0336435862 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -49,6 +49,22 @@ if conf.has('WITH_NETWORK') ], } =20 + network_conf =3D configure_file( + input: 'network.conf.in', + output: 'network.conf', + configuration: configmake_conf, + ) + virt_conf_files +=3D network_conf + virt_aug_files +=3D files('libvirtd_network.aug') + virt_test_aug_files +=3D { + 'name': 'test_libvirtd_network.aug', + 'aug': files('test_libvirtd_network.aug.in'), + 'conf': network_conf, + 'test_name': 'libvirtd_network', + 'test_srcdir': meson.current_source_dir(), + 'test_builddir': meson.current_build_dir(), + } + virt_daemon_confs +=3D { 'name': 'virtnetworkd', } diff --git a/src/network/network.conf.in b/src/network/network.conf.in new file mode 100644 index 0000000000..5c84003f6d --- /dev/null +++ b/src/network/network.conf.in @@ -0,0 +1,3 @@ +# Master configuration file for the network driver. +# All settings described here are optional - if omitted, sensible +# defaults are used. diff --git a/src/network/test_libvirtd_network.aug.in b/src/network/test_li= bvirtd_network.aug.in new file mode 100644 index 0000000000..ffdca520ce --- /dev/null +++ b/src/network/test_libvirtd_network.aug.in @@ -0,0 +1,2 @@ +module Test_libvirtd_network =3D + @CONFIG@ --=20 2.44.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org