Subject: bug#78165: closed (Re: [bug#78165] [PATCH] gnu: /etc/qemu/firmware: Produce only /etc/qemu/firmware instead of /etc/qemu)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 16 May 2025 13:05:04 +0000

Your bug report

#78165: [PATCH] gnu: /etc/qemu/firmware: Produce only /etc/qemu/firmware instead of /etc/qemu

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
78165: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78165
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#78165] [PATCH] gnu: /etc/qemu/firmware: Produce only /etc/qemu/firmware instead of /etc/qemu
From: Maxim Cournoyer <[email-masked]>
To: Rutherther <[email-masked]>
Cc: Efraim Flashner <[email-masked]>, [email-masked]
Date: Fri, 16 May 2025 22:04:34 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Rutherther <[email-masked]> writes:

> The service unnecessarily populates /etc/qemu with a symlink, so it's not
> possible to write files like /etc/qemu/bridge.conf or /etc/qemu/host.conf
> anymore. Since etc-service-type uses file-union, it's possible to put files in
> subdirectories. This restores the behavior suggested by manual where user can
> extend etc-service-type with qemu/host.conf etc.
>
> * gnu/services/virtualization.scm (/etc/qemu/firmware): Extend with
> qemu/firmware instead of qemu

Good idea!  Pushed.

-- 
Thanks,
Maxim

Subject: [PATCH] gnu: /etc/qemu/firmware: Produce only /etc/qemu/firmware instead of /etc/qemu
From: Rutherther <[email-masked]>
To: [email-masked]
Cc: Rutherther <[email-masked]>
Date: Wed, 30 Apr 2025 18:54:00 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

The service unnecessarily populates /etc/qemu with a symlink, so it's not
possible to write files like /etc/qemu/bridge.conf or /etc/qemu/host.conf
anymore. Since etc-service-type uses file-union, it's possible to put files in
subdirectories. This restores the behavior suggested by manual where user can
extend etc-service-type with qemu/host.conf etc.

* gnu/services/virtualization.scm (/etc/qemu/firmware): Extend with
qemu/firmware instead of qemu

Change-Id: I7c1ea790e5abf7ad05dce56b7901ac6eb90208fd
---
 gnu/services/virtualization.scm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index 0836fe7d45..081093eab3 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -577,14 +577,13 @@ (define (libvirt-shepherd-service config)
 
 (define (/etc/qemu/firmware config)
   (let ((firmwares (libvirt-configuration-firmwares config)))
-    `(("qemu"
+    `(("qemu/firmware"
        ,(computed-file
          "etc-qemu-firmware"
          (with-imported-modules '((guix build union))
            #~(begin
                (use-modules (guix build union) (srfi srfi-26))
-               (mkdir #$output)
-               (union-build (string-append #$output "/firmware")
+               (union-build #$output
                             (map (cut string-append <> "/share/qemu/firmware")
                                  (list #$@firmwares))))))))))

base-commit: 8a9f0a618e929289d8d13e9341349ca7fdd06d99
-- 
2.49.0