]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
network: Drop UUID handling for default network
authorAndrea Bolognani <abologna@redhat.com>
Sun, 15 Nov 2020 15:30:34 +0000 (16:30 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 20 Nov 2020 10:44:05 +0000 (11:44 +0100)
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 <abologna@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
src/network/meson.build

index 13dd2c26b25eac96d1c6b505cfbb9bed43548433..3ec598c3f944f705d31f15a70227543865bf6a3d 100644 (file)
@@ -84,31 +84,13 @@ if conf.has('WITH_NETWORK')
     runstatedir / 'libvirt' / 'network',
   ]
 
-  uuidgen_prog = find_program('uuidgen', required: false)
-
-  if uuidgen_prog.found()
-    uuid = run_command(uuidgen_prog).stdout().strip()
-
-    configure_file(
-      input: 'default.xml.in',
-      output: '@BASENAME@',
-      command: [
-        'sed', '-e', 's|</name>|</name>\\n  <uuid>@0@</uuid>|'.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',
+  )
 
   meson.add_install_script(
     meson_python_prog.path(), python3_prog.path(), meson_install_symlink_prog.path(),