From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUvFa-00033I-NL for guix-patches@gnu.org; Fri, 29 Dec 2017 09:03:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUvFW-0005Oh-KX for guix-patches@gnu.org; Fri, 29 Dec 2017 09:03:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:47262) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eUvFW-0005OI-H1 for guix-patches@gnu.org; Fri, 29 Dec 2017 09:03:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eUvFW-0004Hv-8G for guix-patches@gnu.org; Fri, 29 Dec 2017 09:03:02 -0500 Subject: [bug#29875] [PATCH] gnu: qemu: Add wrapper for Samba. Resent-Message-ID: Date: Fri, 29 Dec 2017 15:02:24 +0100 From: Rutger Helling Message-ID: <20171229150224.3d6bdf82@mykolab.com> In-Reply-To: <87efnd4q96.fsf@gnu.org> References: <20171228093234.42b99416@mykolab.com> <87bmiidabo.fsf@fastmail.com> <87efnd4q96.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/pewOGaZInpUM9oMM313ZgeQ"; 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 29875@debbugs.gnu.org --Sig_/pewOGaZInpUM9oMM313ZgeQ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, I'm not sure it's as simple as that. AFAIK "/usr/sbin/smbd" only appears in the configure file. You can modify it by specifying smbd=3D/location/of/binary, which it then builds into the qemu* binaries. I think it has to be a single binary (full path) with no arguments at all or it doesn't work. That's why I chose to do it in this way. Maybe someone more familiar with the QEMU source code can do it by patching the source code itself, but I would have no idea how to go about it. Plus I'm not sure if that would end up being less complex, or if it's even possible at all. On Fri, 29 Dec 2017 14:28:53 +0100 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > Hello! >=20 > Marius Bakke skribis: >=20 > > Rutger Helling writes: =20 >=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 > Why not patch qemu to use exec*p instead of exec* so that =E2=80=98smbd= =E2=80=99 is > searched for in $PATH? >=20 > The wrapper does the job, but it looks more complex to me than this > initial suggestion. >=20 > Ludo=E2=80=99. --Sig_/pewOGaZInpUM9oMM313ZgeQ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEAVThuRzJ2e93ZI3n86cn20T8yjYFAlpGSvAACgkQ86cn20T8 yjbf8wf6A+qEfy0e6UVMgB+fg1RmwGBl401eWrW4xvL/ozqY/Rx9P8i8NyyMgrxH SBYdwQ2o8siAef9I2hzOtevtmAxYh76IW9H5FDsJ0uqPNPKQ4rLhSitjskLztArA /jChQ/tl6qUEIneFesovphwmqHhhar6cEfWSm6oCmz+Tm5ntF5ihUqyXKU6GHT7m fIvJZfwPNhzSkKQI5/kE/j9e9WP3Iskt92ov2efOtGHqHRCM5ynyYdmco0K8SNk3 DBm+nGhOLiurilV80dw+/uCW9/+cFg+Ql1HhlEWaVbN/zSH2BUg06t+HyNsZS0ZV wLSmWFxyb23fedJ/fJP0g/fQlqE6AQ== =qDfj -----END PGP SIGNATURE----- --Sig_/pewOGaZInpUM9oMM313ZgeQ--