all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#29875] [PATCH] gnu: qemu: Add wrapper for Samba.
@ 2017-12-28  8:32 Rutger Helling
  2017-12-28 17:35 ` Marius Bakke
  0 siblings, 1 reply; 10+ messages in thread
From: Rutger Helling @ 2017-12-28  8:32 UTC (permalink / raw)
  To: 29875, ludo


[-- 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 --]

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-01-07 22:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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   ` 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

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.