From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53616) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUhHR-0001eL-OH for guix-patches@gnu.org; Thu, 28 Dec 2017 18:08:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUhHO-0002NE-TF for guix-patches@gnu.org; Thu, 28 Dec 2017 18:08:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:46873) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eUhHO-0002Mt-JK for guix-patches@gnu.org; Thu, 28 Dec 2017 18:08:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eUhHO-0003S2-Ch for guix-patches@gnu.org; Thu, 28 Dec 2017 18:08:02 -0500 Subject: bug#29875: [PATCH] gnu: qemu: Add wrapper for Samba. Resent-To: guix-patches@gnu.org Resent-Message-ID: Date: Fri, 29 Dec 2017 00:07:31 +0100 From: Rutger Helling Message-ID: <20171229000731.0491fcd6@mykolab.com> In-Reply-To: <87bmiidabo.fsf@fastmail.com> References: <20171228093234.42b99416@mykolab.com> <87bmiidabo.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/R/9CDQu.FMDGLvF3meYJ08y"; 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: Marius Bakke Cc: 29875-done@debbugs.gnu.org --Sig_/R/9CDQu.FMDGLvF3meYJ08y Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Marius, thanks for the review! I've pushed it as two seperate patches, minus the "touch" command. I tried the "--smbd=3Dsmbd" 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 wrote: > Rutger Helling writes: >=20 > > This patch adds a small hack to get Samba support working on QEMU, > > without actually pulling it in as an input. =20 >=20 > Awesome :) >=20 > > 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. =20 >=20 > Huh, I would have expected a warning at least. But not complaining :) >=20 > > I've also updated the URL of QEMU. =20 >=20 > Can you push that as a separate patch? >=20 > > From 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-flags to a list, add --smbd flag. Add > > 'create-samba-wrapper phase. [home-page]: Update URL. =20 >=20 > [...] >=20 > > 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 =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")) =20 >=20 > Reading the script, would it work to simply pass "--smbd=3Dsmbd" here? >=20 > [...] >=20 > > + ;; 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)) =20 >=20 > The "touch" here is unnecessary. >=20 > If the above is insufficient, this LGTM. --Sig_/R/9CDQu.FMDGLvF3meYJ08y Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEAVThuRzJ2e93ZI3n86cn20T8yjYFAlpFeTMACgkQ86cn20T8 yjaUXAgAguLbSsV4m+RSitURQnzGQonOml86u65+5gm35gsHHgQ/P+djcL97lgsO jn+jjRHdhky3ZdExDIPO9ct2f8Q9eort8rQHTruWjvOomVnU4pklVYA8ucAzm0mL IY29JaoxmNvJtjdtk4Pbm6ZlgvCKZj8nyiDSaZClW1T88S1KsdPNOsB3TqcnAF9x c8syupipk+yzCu6kR4we/hbX1SBDBZc+tSAKPzqW4ZRCN8GcoZtD0+qBbu0Jl9dh Lwp62+Qc00awWIYiipD2ZUjfyqN8XklbG850PelGfjbsGB68RE7uhy49Ir9eRfiR d1eeiuUYmm+uzkguzxpToXK+XpGJQg== =lsmX -----END PGP SIGNATURE----- --Sig_/R/9CDQu.FMDGLvF3meYJ08y--