guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#29875] [PATCH] gnu: qemu: Add wrapper for Samba.


From: Ludovic Courtès
Subject: [bug#29875] [PATCH] gnu: qemu: Add wrapper for Samba.
Date: Fri, 29 Dec 2017 14:28:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello!

Marius Bakke <address@hidden> skribis:

> Rutger Helling <address@hidden> writes:

[...]

>> +         ;; Create a wrapper for Samba. This allows QEMU to use Samba 
>> without
>> +         ;; pulling it in as an input. Note that you need to explicitly 
>> install
>> +         ;; Samba in your Guix profile for Samba support.
>> +         (add-after 'install-info 'create-samba-wrapper
>> +           (lambda* (#:key inputs outputs #:allow-other-keys)
>> +             (let* ((out    (assoc-ref %outputs "out"))
>> +                    (libexec (string-append out "/libexec")))
>> +               (system* "touch" "samba-wrapper")
>> +               (call-with-output-file "samba-wrapper"
>> +                 (lambda (port)
>> +                   (format port "#!/bin/sh
>> + exec smbd $@")))
>> +               (chmod "samba-wrapper" #o755)
>> +               (install-file "samba-wrapper" libexec))
>> +             #t))

Why not patch qemu to use exec*p instead of exec* so that ‘smbd’ is
searched for in $PATH?

The wrapper does the job, but it looks more complex to me than this
initial suggestion.

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]