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: Rutger Helling
Subject: [bug#29875] [PATCH] gnu: qemu: Add wrapper for Samba.
Date: Fri, 29 Dec 2017 15:02:24 +0100

Hi Ludo,

I'm not sure it's as simple as that. AFAIK "/usr/sbin/smbd" only
appears in the configure file. You can modify it by specifying
smbd=/location/of/binary, which it then builds into the qemu* binaries.
I think it has to be a single binary (full path) with no arguments at
all or it doesn't work. That's why I chose to do it in this way.

Maybe someone more familiar with the QEMU source code can do it by
patching the source code itself, but I would have no idea how to go
about it. Plus I'm not sure if that would end up being less complex, or
if it's even possible at all.

On Fri, 29 Dec 2017 14:28:53 +0100
address@hidden (Ludovic Courtès) wrote:

> 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’.

Attachment: pgpK9pJtLlvFr.pgp
Description: OpenPGP digital signature


reply via email to

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