From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUTdd-0000eB-UE for guix-patches@gnu.org; Thu, 28 Dec 2017 03:34:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUTda-0001By-Ny for guix-patches@gnu.org; Thu, 28 Dec 2017 03:34:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:45822) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eUTda-0001BM-J2 for guix-patches@gnu.org; Thu, 28 Dec 2017 03:34:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eUTda-0003qP-AS for guix-patches@gnu.org; Thu, 28 Dec 2017 03:34:02 -0500 Subject: [bug#29875] [PATCH] gnu: qemu: Add wrapper for Samba. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUTcR-0000QD-OM for guix-patches@gnu.org; Thu, 28 Dec 2017 03:32:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUTcO-0007Su-Ju for guix-patches@gnu.org; Thu, 28 Dec 2017 03:32:51 -0500 Date: Thu, 28 Dec 2017 09:32:34 +0100 From: Rutger Helling Message-ID: <20171228093234.42b99416@mykolab.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/5Q5ASuAXa21VBG+HrLZu_v."; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 29875@debbugs.gnu.org, ludo@gnu.org --Sig_/5Q5ASuAXa21VBG+HrLZu_v. Content-Type: multipart/mixed; boundary="MP_/.Fwmf//CEntypiG5AmiCh3N" --MP_/.Fwmf//CEntypiG5AmiCh3N Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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=3D/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. --MP_/.Fwmf//CEntypiG5AmiCh3N Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0001-gnu-qemu-Add-wrapper-for-Samba.patch =46rom f45a7663f646b195222dc4426b19884147051f05 Mon Sep 17 00:00:00 2001 From: Rutger Helling 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-fla= gs 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, lik= e: ;; boot_sector_test: assertion failed (signature =3D=3D SIGNATURE):= (0x00000000 =3D=3D 0x0000dead) #:parallel-tests? #f - #:configure-flags '("--enable-usb-redir" "--enable-opengl") + #:configure-flags (list "--enable-usb-redir" "--enable-opengl" + (string-append "--smbd=3D" + (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 with= out + ;; pulling it in as an input. Note that you need to explicitly in= stall + ;; 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 fail= ure. @@ -176,7 +194,7 @@ ("pkg-config" ,pkg-config) ("python" ,python-2) ; incompatible with Python 3 acc= ording 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. --=20 2.15.1 --MP_/.Fwmf//CEntypiG5AmiCh3N-- --Sig_/5Q5ASuAXa21VBG+HrLZu_v. Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEAVThuRzJ2e93ZI3n86cn20T8yjYFAlpErCIACgkQ86cn20T8 yja9PAf+Nk4rGJU42HjLI6wJlenBbeVgrtIgErWJrsSslAWyq1y7olDzNOhAs3G+ iIOjnEt3vOiTjCaNxRel9FhDMfVZDtVHriMyRuCHu5wQ7lc0WEhk/IbFA7+y56eH c5HLf4Yt+xeY+M9kAnQ5uxMT2nl0yNECwrYbpjUUroi03PoN44k9AILvDGTsvowX 6qecXL76oxkB9rWdTDvQec0r5r4xKMcRqAF6LT7Tjvt5bI60O4TToS9inyNVqb9h 4yRVn+uXcURvKLVZxWuPpo6zfqKILF4ApYeAD9CXkLpxujK0OXYSw94LpiW5307R 3d6d+IQaA3GDOSXAQjCwrTzjV7W0Lw== =Zuz2 -----END PGP SIGNATURE----- --Sig_/5Q5ASuAXa21VBG+HrLZu_v.--