network: add (empty) network.conf file to distribution files

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 <laine@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Laine Stump 2024-04-19 22:19:42 -04:00
parent 9293644d8a
commit 45c4527f36
5 changed files with 60 additions and 0 deletions

View File

@ -2120,6 +2120,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

View File

@ -0,0 +1,36 @@
(* /etc/libvirt/network.conf *)
module Libvirtd_network =
autoload xfm
let eol = del /[ \t]*\n/ "\n"
let value_sep = del /[ \t]*=[ \t]*/ " = "
let indent = del /[ \t]*/ ""
let array_sep = del /,[ \t\n]*/ ", "
let array_start = del /\[[ \t\n]*/ "[ "
let array_end = del /\]/ "]"
let str_val = del /\"/ "\"" . store /[^\"]*/ . del /\"/ "\""
let bool_val = store /0|1/
let int_val = store /[0-9]+/
let str_array_element = [ seq "el" . str_val ] . del /[ \t\n]*/ ""
let str_array_val = counter "el" . array_start . ( str_array_element . ( array_sep . str_array_element ) * ) ? . array_end
let str_entry (kw:string) = [ key kw . value_sep . str_val ]
let bool_entry (kw:string) = [ key kw . value_sep . bool_val ]
let int_entry (kw:string) = [ key kw . value_sep . int_val ]
let str_array_entry (kw:string) = [ key kw . value_sep . str_array_val ]
(* Each entry in the config is one of the following *)
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
let empty = [ label "#empty" . eol ]
let record = indent . eol
let lns = ( record | comment | empty ) *
let filter = incl "/etc/libvirt/network.conf"
. Util.stdexcl
let xfm = transform lns filter

View File

@ -49,6 +49,22 @@ if conf.has('WITH_NETWORK')
],
}
network_conf = configure_file(
input: 'network.conf.in',
output: 'network.conf',
configuration: configmake_conf,
)
virt_conf_files += network_conf
virt_aug_files += files('libvirtd_network.aug')
virt_test_aug_files += {
'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 += {
'name': 'virtnetworkd',
}

View File

@ -0,0 +1,3 @@
# Master configuration file for the network driver.
# All settings described here are optional - if omitted, sensible
# defaults are used.

View File

@ -0,0 +1,2 @@
module Test_libvirtd_network =
@CONFIG@