Subject: Re: [bug#28718] [PATCH] gnu: qemu: Add sysconfdir to configure-flags.

From: [email-masked] (Ludovic Courtès)
Date: Sat, 07 Oct 2017 22:34:11 +0200

Hi Oleg,

Oleg Pykhalov <[email-masked]> skribis:

> From 371ba5aee9ef1412753fdb43230f107087f9651b Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <[email-masked]>
> Date: Fri, 6 Oct 2017 06:24:58 +0300
> Subject: [PATCH] gnu: qemu: Add sysconfdir to configure-flags.
>
> * gnu/packages/virtualization.scm (qemu): Add sysconfdir to configure-flags.
> ---
>  gnu/packages/virtualization.scm | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
> index a8e54d684..21fc7b784 100644
> --- a/gnu/packages/virtualization.scm
> +++ b/gnu/packages/virtualization.scm
> @@ -111,6 +111,7 @@
>                           "--disable-debug-info" ; save build space
>                           "--enable-virtfs"      ; just to be sure
>                           ,(string-append "--prefix=" out)
> +                         ,(string-append "--sysconfdir=/tmp/etc")

[...]

> I've used this patch to run a QEMU VM with bridge interface.
>
> $ mkdir -p /tmp/etc/qemu
> $ echo 'allow bridge0' | tee -a /tmp/etc/qemu/bridge.conf
> # ip link add bridge0 type bridge
> # ip link set dev enp6s0 master bridge0
> # ip link up bridge0
> # dhclient bridge0
> # qemu-system-x86_64 -net nic -net bridge,br=bridge0 # …

It feels wrong to me to default to /tmp/etc instead of /etc.

Setting up a bridge requires root privileges anyway, so why not stick to
/etc instead of /tmp/etc?

Thanks,
Ludo’.