unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Rutger Helling <rhelling@mykolab.com>
To: Marius Bakke <mbakke@fastmail.com>
Cc: 29875-done@debbugs.gnu.org
Subject: bug#29875: [PATCH] gnu: qemu: Add wrapper for Samba.
Date: Fri, 29 Dec 2017 00:07:31 +0100	[thread overview]
Message-ID: <20171229000731.0491fcd6@mykolab.com> (raw)
In-Reply-To: <87bmiidabo.fsf@fastmail.com>

[-- Attachment #1: Type: text/plain, Size: 3338 bytes --]

Hi Marius,

thanks for the review! I've pushed it as two seperate patches, minus
the "touch" command.

I tried the "--smbd=smbd" command and a bunch of variants,
unfortunately that just causes QEMU to complain about missing smbd and
quit immediately.

On Thu, 28 Dec 2017 18:35:55 +0100
Marius Bakke <mbakke@fastmail.com> wrote:

> Rutger Helling <rhelling@mykolab.com> writes:
> 
> > This patch adds a small hack to get Samba support working on QEMU,
> > without actually pulling it in as an input.  
> 
> Awesome :)
> 
> > It seems to work surprisingly well. The only bad thing is that you
> > need to explicitly install Samba in your profile for Samba support.
> > There's no error if you try to run something like -net
> > user,smb=/tmp without having Samba installed in your profile. QEMU
> > will just merrily keep on running while not actually starting a
> > Samba server.  
> 
> Huh, I would have expected a warning at least.  But not complaining :)
> 
> > I've also updated the URL of QEMU.  
> 
> Can you push that as a separate patch?
> 
> > From f45a7663f646b195222dc4426b19884147051f05 Mon Sep 17 00:00:00
> > 2001 From: Rutger Helling <rhelling@mykolab.com>
> > Date: Thu, 28 Dec 2017 08:57:28 +0100
> > Subject: [PATCH] gnu: qemu: Add wrapper for Samba.
> >
> > * gnu/packages/virtualization.scm (qemu)[arguments]: Change
> > #:configure-flags to a list, add --smbd flag. Add
> > 'create-samba-wrapper phase. [home-page]: Update URL.  
> 
> [...]
> 
> > diff --git a/gnu/packages/virtualization.scm
> > b/gnu/packages/virtualization.scm index 0e4feb7b1..1584580ad 100644
> > --- a/gnu/packages/virtualization.scm
> > +++ b/gnu/packages/virtualization.scm
> > @@ -96,7 +96,10 @@
> >       '(;; Running tests in parallel can occasionally lead to
> > failures, like: ;; boot_sector_test: assertion failed (signature ==
> > SIGNATURE): (0x00000000 == 0x0000dead) #:parallel-tests? #f
> > -       #:configure-flags '("--enable-usb-redir" "--enable-opengl")
> > +       #:configure-flags (list "--enable-usb-redir"
> > "--enable-opengl"
> > +                               (string-append "--smbd="
> > +                                              (assoc-ref %outputs
> > "out")
> > +
> > "/libexec/samba-wrapper"))  
> 
> Reading the script, would it work to simply pass "--smbd=smbd" here?
> 
> [...]
> 
> > +         ;; 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))  
> 
> The "touch" here is unnecessary.
> 
> If the above is insufficient, this LGTM.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2017-12-28 23:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-28  8:32 [bug#29875] [PATCH] gnu: qemu: Add wrapper for Samba Rutger Helling
2017-12-28 17:35 ` Marius Bakke
2017-12-28 23:07   ` Rutger Helling [this message]
2017-12-29 13:28   ` Ludovic Courtès
2017-12-29 14:02     ` Rutger Helling
2018-01-07 10:44       ` Ludovic Courtès
2018-01-07 11:46         ` Rutger Helling
2018-01-07 14:13           ` Ludovic Courtès
2018-01-07 14:26             ` Rutger Helling
2018-01-07 22:44               ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171229000731.0491fcd6@mykolab.com \
    --to=rhelling@mykolab.com \
    --cc=29875-done@debbugs.gnu.org \
    --cc=mbakke@fastmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).