all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rutger Helling <rhelling@mykolab.com>
To: 29875@debbugs.gnu.org, ludo@gnu.org
Subject: [bug#29875] [PATCH] gnu: qemu: Add wrapper for Samba.
Date: Thu, 28 Dec 2017 09:32:34 +0100	[thread overview]
Message-ID: <20171228093234.42b99416@mykolab.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 493 bytes --]

This patch adds a small hack to get Samba support working on QEMU,
without actually pulling it in as an input.

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.

I've also updated the URL of QEMU.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-qemu-Add-wrapper-for-Samba.patch --]
[-- Type: text/x-patch, Size: 2956 bytes --]

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.
---
 gnu/packages/virtualization.scm | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

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"))
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
@@ -135,6 +138,21 @@
                                       (install-file info infodir))
                                     (find-files "." "\\.info"))
                           #t))))))
+         ;; 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))
          (add-before 'check 'make-gtester-verbose
            (lambda _
              ;; Make GTester verbose to facilitate investigation upon failure.
@@ -176,7 +194,7 @@
                      ("pkg-config" ,pkg-config)
                      ("python" ,python-2) ; incompatible with Python 3 according to error message
                      ("texinfo" ,texinfo)))
-    (home-page "http://www.qemu-project.org")
+    (home-page "https://www.qemu.org")
     (synopsis "Machine emulator and virtualizer")
     (description
      "QEMU is a generic machine emulator and virtualizer.
-- 
2.15.1


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

             reply	other threads:[~2017-12-28  8:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-28  8:32 Rutger Helling [this message]
2017-12-28 17:35 ` [bug#29875] [PATCH] gnu: qemu: Add wrapper for Samba Marius Bakke
2017-12-28 23:07   ` bug#29875: " Rutger Helling
2017-12-29 13:28   ` [bug#29875] " 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

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

  git send-email \
    --in-reply-to=20171228093234.42b99416@mykolab.com \
    --to=rhelling@mykolab.com \
    --cc=29875@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.