From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 05 12:26:51 2022 Received: (at submit) by debbugs.gnu.org; 5 Mar 2022 17:26:51 +0000 Received: from localhost ([127.0.0.1]:48967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nQYB9-0001Ex-8U for submit@debbugs.gnu.org; Sat, 05 Mar 2022 12:26:51 -0500 Received: from lists.gnu.org ([209.51.188.17]:36074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nQTAo-0007jY-1n for submit@debbugs.gnu.org; Sat, 05 Mar 2022 07:06:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQTAn-0006xv-UN for guix-patches@gnu.org; Sat, 05 Mar 2022 07:06:09 -0500 Received: from [2a00:1450:4864:20::42c] (port=43880 helo=mail-wr1-x42c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nQTAl-0004Dt-N5 for guix-patches@gnu.org; Sat, 05 Mar 2022 07:06:09 -0500 Received: by mail-wr1-x42c.google.com with SMTP id e24so3340915wrc.10 for ; Sat, 05 Mar 2022 04:06:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject :content-language:to:content-transfer-encoding; bh=+qz8SEJesP6c46pTu63/+QoImSuqQM09LAfU4fcZajY=; b=IWQKbkV8C2/vS1NmxT+maoZ2rRJRa3IMQ+yksOuSN7fIPSmdeOoXJJ0xQwdFmXWuBu jPhSjud6h4Q0JMafTPo3Azy6T+cg3HETI+XMTZKwYu84hh66XUVzgxwfFjO5EbLupFfS xfZwzPtbPLH3XpPaUsXEJH9PdBPuSIEhqAGJDrfu2L8NJNPmNDKYUknWG5sFjV0MRZKs jjMl+aIyEtpUq24UKcJIy19Opy0P/fekTkARxj5kTKjgisq19Ae1WGApwtiwnlf+TGEs ukywKltgxWQb+Mi8PzUlDejOX26jSlEMNCbjsVAJVUjfulRML8qr0blI23+5rgpK78cR 6n8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:content-language:to:content-transfer-encoding; bh=+qz8SEJesP6c46pTu63/+QoImSuqQM09LAfU4fcZajY=; b=vU/7Y/0s6gSXacZGK85VjIG55pZ8cutgnq6bfQQ4FFwtTh1IM07LjiKAH5x9cOrgMy IbG3UyO1hBh9Qn/Ns3qPZWlFOOEA5eNaNCLnHchdfNs3Y3Vr0n3T0SK2zxzeWX6Ue3BU mVkJuVZkAItiEQAkDBqW+1GaWrTcefOKMf+yHqk4qyW4nLB5JEEm88dffGPbh3bi6wYy genODjWk+vG06Mdwrx8vf6hUPszsg3Cm2d/T1wwvg52TzmBMOOPTrFGaPxivSjKzwRA8 bmTgg2yIBWropwiDPDqIQvI4u50O0LCrJ1acfTlBp9ZJS8DGFXFyEJ2qGQoNnC9ks4Yt jcKw== X-Gm-Message-State: AOAM530W7L2SjEPsnoOKhIQ4W51ArhG4n16cuGGkm2Nl2mYSp/Jn/xvI 5/tLMCKa2D62Qn9Z/Fsng2SigwOyBRoVxO9mCT4= X-Google-Smtp-Source: ABdhPJzTQW7ZNiBtRnCEwt7m+5HFBppjOOlhCmaXyI8kVPjJPo/G3U0ZUiJrJdajudmOxQ5c3v3HKQ== X-Received: by 2002:adf:d08f:0:b0:1f0:7eaa:e541 with SMTP id y15-20020adfd08f000000b001f07eaae541mr2255767wrh.372.1646481965839; Sat, 05 Mar 2022 04:06:05 -0800 (PST) Received: from ?IPV6:2003:ee:af37:9e00:7c00:dc64:347c:6fed? (p200300eeaf379e007c00dc64347c6fed.dip0.t-ipconnect.de. [2003:ee:af37:9e00:7c00:dc64:347c:6fed]) by smtp.gmail.com with ESMTPSA id s17-20020adfdb11000000b001f02d5fea43sm7311010wri.98.2022.03.05.04.06.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 05 Mar 2022 04:06:05 -0800 (PST) Message-ID: <50be1b85-e682-d910-970c-14a08275278f@gmail.com> Date: Sat, 5 Mar 2022 13:06:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 From: fesoj000 Subject: [PATCH] samba: wrap scripts with GUIX_PYTHONPATH Content-Language: en-US To: guix-patches@gnu.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=fesoj000@gmail.com; helo=mail-wr1-x42c.google.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 05 Mar 2022 12:26:49 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Tools like samba-tool depend on the python libraries installed by samba. * gnu/packages/samba.scm: new buildstep (samba)[wrap-scripts]: Add build step. --- gnu/packages/samba.scm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm index b775ad905c..e7afe9330d 100644 --- a/gnu/packages/samba.scm +++ b/gnu/packages/samba.scm @@ -40,6 +40,7 @@ (define-module (gnu packages samba) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages crypto) #:use-module (gnu packages cups) @@ -231,12 +232,23 @@ (define-public samba (add-before 'install 'disable-etc,var-samba-directories-setup (lambda _ (substitute* "dynconfig/wscript" - (("bld\\.INSTALL_DIR.*") ""))))) + (("bld\\.INSTALL_DIR.*") "")))) + (add-after 'install 'wrap-scripts + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each (lambda (file) + (wrap-program (string-append out file) + `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH"))))) + '("/bin/samba-tool" "/sbin/samba_dnsupdate" + "/sbin/samba_downgrade_db" "/sbin/samba-gpupdate" + "/sbin/samba_kcc" "/sbin/samba_spnupdate" + "/sbin/samba_upgradedns")))))) ;; FIXME: The test suite seemingly hangs after failing to provision the ;; test environment. #:tests? #f)) (inputs (list acl + bash-minimal cmocka cups gamin -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 05 15:12:22 2022 Received: (at 54266) by debbugs.gnu.org; 5 Mar 2022 20:12:22 +0000 Received: from localhost ([127.0.0.1]:49132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nQalK-0005hI-LD for submit@debbugs.gnu.org; Sat, 05 Mar 2022 15:12:22 -0500 Received: from xavier.telenet-ops.be ([195.130.132.52]:60478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nQalI-0005h8-1m for 54266@debbugs.gnu.org; Sat, 05 Mar 2022 15:12:21 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by xavier.telenet-ops.be with bizsmtp id 2kCH2700V4UW6Th01kCJ3L; Sat, 05 Mar 2022 21:12:18 +0100 Message-ID: <8515aeed4b6af1c2ec78247ea0fe7809d1a7fa21.camel@telenet.be> Subject: Re: [bug#54266] [PATCH] samba: wrap scripts with GUIX_PYTHONPATH From: Maxime Devos To: fesoj000 , 54266@debbugs.gnu.org Date: Sat, 05 Mar 2022 21:12:09 +0100 In-Reply-To: <50be1b85-e682-d910-970c-14a08275278f@gmail.com> References: <50be1b85-e682-d910-970c-14a08275278f@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-azd26tllm+GE8SHhYALW" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1646511138; bh=3dVynRujuN9Pdlwc2csTMTULPBb1e6CUe6gCxeCPUig=; h=Subject:From:To:Date:In-Reply-To:References; b=VOpiWHXkVVc6MVWjTRjLAT4fxLt4e5uPctRW70uxyOXaLdBcV3pmgqp9BullkuR9f Fq7ph0+GeK80O2hPqpX8dHyoUXMUmhKu2UQcer2xvkYlrLKLNDTYGl7W1S6QHowgb4 ORUZNtfR6smCxu/RFQDXqgGnyqP7n98cL+ZPE5YAqODT0vqnnaszFoGvpxpoObxs7h 4lv8dcu2MbuJMMjTR57aZgX9UOhjAYux7NYYJfxyTPPAJ8lKuqorWFfoCHJ+hUiOHm Hs07w16+/pwpK13bUGrBPq9jhDEXMbp9e23BdVezGumYdZY6cgEA5Oa0sJB66s+WhR ZaA8S9bA8BPKQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54266 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-azd26tllm+GE8SHhYALW Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable fesoj000 schreef op za 05-03-2022 om 13:06 [+0100]: > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 (wrap-program (string-append out file) > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 `("GUIX_PYTHONPATH" =3D (,(getenv=20 > "GUIX_PYTHONPATH"))))) (getenv "...") includes too much, it also includes the python libraries from native-inputs that are only required for tests. I recommend: (string-join (map (cut (@ (guix build python-build-system) site-packages) (list (assoc-ref inputs "this-python-input") (assoc-ref inputs "that-python-input") [...]) outputs) #\:) (untested). Possibly there's a simpler way to do this ... (Many packages simply do (getenv "GUIX_PYTHONPATH"), but that's a bug in those packages, see e.g. .) Greetings, Maxime. --=-azd26tllm+GE8SHhYALW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYiPEGRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7oQkAP44CLA4B5puN1MB65JSiLEn/7Gw 83JeMviw/y2s6+iLMQEAg6dbmjdNXGPH0yfa90uvwVp07LoRMq1orXtzcBZzmgc= =7R5Z -----END PGP SIGNATURE----- --=-azd26tllm+GE8SHhYALW-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 08 14:26:35 2022 Received: (at 54266) by debbugs.gnu.org; 8 Mar 2022 19:26:35 +0000 Received: from localhost ([127.0.0.1]:57960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRfTe-0004UU-P3 for submit@debbugs.gnu.org; Tue, 08 Mar 2022 14:26:35 -0500 Received: from mail-ed1-f49.google.com ([209.85.208.49]:36454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRfTd-0004UG-3u for 54266@debbugs.gnu.org; Tue, 08 Mar 2022 14:26:33 -0500 Received: by mail-ed1-f49.google.com with SMTP id o1so50750edc.3 for <54266@debbugs.gnu.org>; Tue, 08 Mar 2022 11:26:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject :content-language:to:content-transfer-encoding; bh=/LZ5fqFhSy0M59DB+xjUA3OQbQbQu18bj0Onu8Rrh50=; b=PGdIHYbeYGx7ccKEip1A9R959KAvkPpgf0iCApcfwFDwwUQ3O8txM47CIqb2G+SBT8 /PI9ry+o3HMF4TRQ6UPNFLiodaeqp0TbyjmffWS7ta9AWwI0s1m8jxvkegdTAC7Qovyx 5ULnS+jPVtx/7HcM3UtcKRBLDzkuQUGvLbnPzuuwwE8dZDKzuHesnF53QxXQdtFZg8G5 uLjCG15hpimgFp2mrWFoWbXgeSmTX0dsuEDp2C2AGPth9cGzjN5TKORoQbIu6wYjnTzX XNVKB/53kt1kHk/jfliwS6hNrvBFZ480fZvhpo0pkDaxGNpzDh8q0PDnJsb8E9lz2chp RrxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:content-language:to:content-transfer-encoding; bh=/LZ5fqFhSy0M59DB+xjUA3OQbQbQu18bj0Onu8Rrh50=; b=4j0Dy9yyO+0KStEYuYgFt1nru1MLYQtC4NZBLDhgc6Ws30m++1zPUyCsD/xJgMYDDK d2CGrx56VclEp2i6I/kbJGF5pyEVgtOVwDP6mCsNwBkneCWkfYAAkloBmR6Pm4GaBC+H 3IQYL3O0dM8JPU6XrDhyRXnnCBLuzOrL9S2c2TvxKc0AlFFPQrTOj9+9VG+Cp9IhQw5j KLN99/nW8GKVZvvIP/43h09epTtVG+D7AJGWT47bFiuIrtt8wC9shPTPCoR0h6CSk1tg mlek73DIFlUqscFohYs8XAsxUvjOl8JWNAfuR+aOR9+AVF+oGPxwhWXNwvJ1BUQ/aCid cjzw== X-Gm-Message-State: AOAM530sMwcDFInITDSm3ckD0wJIXZarmH36+fDq5d8QixYMs0nO5SOj DRLbc1nR5rWefwqoky8knAPqOMxgogg= X-Google-Smtp-Source: ABdhPJy4AljybrXWnwgn3qFlK85J9zjuTAVknrLkNA62SNwxNvLbX71WOjqdaPBOWyhlHqOSslWzxw== X-Received: by 2002:a05:6402:254b:b0:412:d172:2607 with SMTP id l11-20020a056402254b00b00412d1722607mr17624677edb.80.1646767587237; Tue, 08 Mar 2022 11:26:27 -0800 (PST) Received: from ?IPV6:2003:ee:af2f:e00:c2f9:c2bb:bf95:1fc5? (p200300eeaf2f0e00c2f9c2bbbf951fc5.dip0.t-ipconnect.de. [2003:ee:af2f:e00:c2f9:c2bb:bf95:1fc5]) by smtp.gmail.com with ESMTPSA id o14-20020a170906774e00b006d5b915f27dsm6231230ejn.169.2022.03.08.11.26.26 for <54266@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Mar 2022 11:26:26 -0800 (PST) Message-ID: Date: Tue, 8 Mar 2022 20:26:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 From: fesoj000 Subject: [PATCH] samba: wrap scripts with GUIX_PYTHONPATH Content-Language: en-US To: 54266@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 54266 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Tools like samba-tool need the python libraries installed by samba and some of sambas inputs. * gnu/packages/samba.scm: new buildstep (samba)[wrap-scripts]: Add build step. --- gnu/packages/samba.scm | 46 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm index b775ad905c..2bdf89163e 100644 --- a/gnu/packages/samba.scm +++ b/gnu/packages/samba.scm @@ -40,6 +40,7 @@ (define-module (gnu packages samba) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages crypto) #:use-module (gnu packages cups) @@ -193,10 +194,13 @@ (define-public samba (base32 "0zyid2np45kl8hzp9fjqwvn5lxj766a4f0mya58vldqrhcrmw4b9")))) (build-system gnu-build-system) (arguments - (list - #:make-flags #~(list "TEST_OPTIONS=--quick") ;some tests are very long - #:phases - #~(modify-phases %standard-phases + `(#:make-flags '("TEST_OPTIONS=--quick") ;some tests are very long + #:imported-modules ((guix build python-build-system) + ,@%gnu-build-system-modules) + #:modules (((guix build python-build-system) #:select (python-version)) + ,@%gnu-build-system-modules) + #:phases + (modify-phases %standard-phases (add-before 'configure 'setup-docbook-stylesheets (lambda* (#:key inputs #:allow-other-keys) ;; Append Samba's own DTDs to XML_CATALOG_FILES @@ -212,12 +216,13 @@ (define-public samba (string-append all " $XML_CATALOG_FILES"))))) (replace 'configure ;; Samba uses a custom configuration script that runs WAF. - (lambda* (#:key inputs #:allow-other-keys) - (let* ((libdir (string-append #$output "/lib"))) + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (libdir (string-append out "/lib"))) (invoke "./configure" "--enable-selftest" "--enable-fhs" - (string-append "--prefix=" #$output) + (string-append "--prefix=" out) "--sysconfdir=/etc" "--localstatedir=/var" ;; Install public and private libraries into @@ -231,12 +236,37 @@ (define-public samba (add-before 'install 'disable-etc,var-samba-directories-setup (lambda _ (substitute* "dynconfig/wscript" - (("bld\\.INSTALL_DIR.*") ""))))) + (("bld\\.INSTALL_DIR.*") "")))) + (add-after 'install 'wrap-scripts + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (define (site-package-path python) + (string-append "/lib/python" (python-version python) + "/site-packages")) + (define (guix-pythonpath site-package-path) + (string-join + (append (map (lambda (input) + (string-append (assoc-ref inputs input) + site-package-path)) + '("tdb" "ldb" "talloc")) + (list (string-append out site-package-path))) + ":")) + (for-each (lambda (file) + (wrap-program (string-append out file) + `("GUIX_PYTHONPATH" = + (,(guix-pythonpath + (site-package-path + (assoc-ref inputs "python"))))))) + '("/bin/samba-tool" "/sbin/samba_dnsupdate" + "/sbin/samba_downgrade_db" "/sbin/samba-gpupdate" + "/sbin/samba_kcc" "/sbin/samba_spnupdate" + "/sbin/samba_upgradedns")))))) ;; FIXME: The test suite seemingly hangs after failing to provision the ;; test environment. #:tests? #f)) (inputs (list acl + bash-minimal cmocka cups gamin -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 08 15:39:15 2022 Received: (at 54266) by debbugs.gnu.org; 8 Mar 2022 20:39:15 +0000 Received: from localhost ([127.0.0.1]:58002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRgbz-0006Ni-4X for submit@debbugs.gnu.org; Tue, 08 Mar 2022 15:39:15 -0500 Received: from andre.telenet-ops.be ([195.130.132.53]:55184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRgbw-0006NW-Es for 54266@debbugs.gnu.org; Tue, 08 Mar 2022 15:39:13 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by andre.telenet-ops.be with bizsmtp id 3wfA2700E4UW6Th01wfAan; Tue, 08 Mar 2022 21:39:10 +0100 Message-ID: Subject: Re: [bug#54266] [PATCH] samba: wrap scripts with GUIX_PYTHONPATH From: Maxime Devos To: fesoj000 , 54266@debbugs.gnu.org Date: Tue, 08 Mar 2022 21:39:05 +0100 In-Reply-To: References: <50be1b85-e682-d910-970c-14a08275278f@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-ytoVZMfyWgEFoIcYzwKQ" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1646771950; bh=9h7PmKGJhw8evpfG4moLKuwtlRfxoo5MbxShiV59oAU=; h=Subject:From:To:Date:In-Reply-To:References; b=MqelOozlpvdbrvCW0IdWW2/WTX7jUz9eOFu+/0+W8ref/FfK3gT2QUCWfJp/dX2l3 qeBIBZc68jk9jbirZ+G9M5pQr0DMSPJ+/WeaKKXJGUY1Kxoz9j3D+UXx/X9qM9VtDn 2w/Dxte1uQtBZIc8bDr6K486re9GmSJJ43kBLHVOQyamCnn7AWzzf//pB+yrJKTniV sZQVBOkaDAq48N/KgNkeLNKWCrK4+lorYTs7Q3isaRCq4uQJcYvB3/UnGpdhd8zPSk 6wYkTaNbsrbFVXXxRLMOF5LzayvaHsbxkpYAscSzes2u6KDx+QECPqRwn8L/rv7xSX 8hAwz0IuhSiKQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54266 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-ytoVZMfyWgEFoIcYzwKQ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable fesoj000 schreef op di 08-03-2022 om 20:26 [+0100]: > -=C2=A0=C2=A0=C2=A0=C2=A0 (list > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #:make-flags #~(list "TEST_OPTIONS=3D--qu= ick") ;some tests are very long > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #:phases > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #~(modify-phases %standard-phases > +=C2=A0=C2=A0=C2=A0=C2=A0 `(#:make-flags '("TEST_OPTIONS=3D--quick") ;som= e tests are very long What's the reason for turning things from G-exps into S-exps? --=-ytoVZMfyWgEFoIcYzwKQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYie+6RccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hIaAQD4UuIPnnfQJBp4ntkonaU9b8/1 lR2ndVkHm9bsTKCrCgEAx3gJOYUl7YrdMHLmEBgj1tHp3RYy7E5EsxoPXiuCZQw= =sDJD -----END PGP SIGNATURE----- --=-ytoVZMfyWgEFoIcYzwKQ-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 08 15:44:48 2022 Received: (at 54266) by debbugs.gnu.org; 8 Mar 2022 20:44:49 +0000 Received: from localhost ([127.0.0.1]:58007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRghM-0006WB-O4 for submit@debbugs.gnu.org; Tue, 08 Mar 2022 15:44:48 -0500 Received: from baptiste.telenet-ops.be ([195.130.132.51]:33354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRghL-0006W1-Lr for 54266@debbugs.gnu.org; Tue, 08 Mar 2022 15:44:48 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id 3wkm270024UW6Th01wkmmn; Tue, 08 Mar 2022 21:44:46 +0100 Message-ID: <6117b63516dfa5b4801ed876d33658412aedbfff.camel@telenet.be> Subject: Re: [bug#54266] [PATCH] samba: wrap scripts with GUIX_PYTHONPATH From: Maxime Devos To: fesoj000 , 54266@debbugs.gnu.org Date: Tue, 08 Mar 2022 21:44:45 +0100 In-Reply-To: References: <50be1b85-e682-d910-970c-14a08275278f@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-CunI/kc/sBe1C1Oxe16N" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1646772286; bh=tpAU+nfnZXBzREEfeDBgUNbY4pPh5nOzQg67gPs1JBw=; h=Subject:From:To:Date:In-Reply-To:References; b=H0I3K2QnjW2km8+UKj5/SmpDy1+OmswXyEp4ddTYbI54E61Ap+3lzP2/Tv/xtj4p4 sz7C4Hiw4nHj3hq90bn+UHqkE+GrdVhDdG6rtp3q2Om8wVBp1mCx0AQA0B/X/+Txzs G/LMMAhUXGgPLSGSn44EiiXhMRbpvi399R6AqqwVUUVrsOsv0Pc3t7eDiGLakbCz8X zALVyte2XGGlj0K2sJQ6yAii/E8VNCzOTcgZzcQ67PWzvoKLWCy2XGXiqQSLDt9pq5 12llOnpHbYhxvA0OLWSfQDReAcvvFcMRBBtszUMP/4UUgnLOQ7byAwbr9JKQIcZEBJ qOP7K9UMtn1cw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54266 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-CunI/kc/sBe1C1Oxe16N Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 ZmVzb2owMDAgc2NocmVlZiBvcCBkaSAwOC0wMy0yMDIyIG9tIDIwOjI2IFsrMDEwMF06Cj4gK8Kg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCAod3Jh cC1wcm9ncmFtIChzdHJpbmctYXBwZW5kIG91dCBmaWxlKQo+ICvCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgIGAoIkdVSVhfUFlUSE9OUEFU SCIgPQo+ICvCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqDCoCAoLChndWl4LXB5dGhvbnBhdGgKPiArwqDCoMKgwqDCoMKgwqDCoMKgwqDC oMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgKHNpdGUtcGFj a2FnZS1wYXRoCj4gK8KgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgKGFzc29jLXJlZiBpbnB1dHMgInB5dGhvbiIpKSkp KSkpCgpJIHdvdWxkIGV4cGVjdCB0aGF0IHB5dGhvbiBhbHdheXMgcHV0cyBpdHMgb3duIHNpdGUt cGFja2FnZXMgaW4gZnJvbnQKb2YgdGhlIHBhdGgsIHRob3VnaCBJIGNvdWxkIGJlIG1pc3Rha2Vu LCBzbyBpcyB0aGlzIG5lY2Vzc2FyeT8KCkFsc28sIGl0IGxvb2tzIGxpa2Ugc29tZSBvZiB0aGUg cHl0aG9uIHN0dWYgdXNlcyAnbGRiJywgc28gJ2xkYicgbWlnaHQKbmVlZCB0byBiZSBpbmNsdWRl ZCBhcyB3ZWxsLgoKR3JlZXRpbmdzLApNYXhpbWUuCg== --=-CunI/kc/sBe1C1Oxe16N Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYifAPRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7iP2AQD7eXTr4dnAssa2B/FDc35XrNUH bXnBLiNJT7WOsnJ9OgEA882VCZGEPk2pg9Puh9dmX0wAdeXVrD74RYDGW5JaZA8= =WB2Q -----END PGP SIGNATURE----- --=-CunI/kc/sBe1C1Oxe16N-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 08 17:02:09 2022 Received: (at 54266) by debbugs.gnu.org; 8 Mar 2022 22:02:09 +0000 Received: from localhost ([127.0.0.1]:58056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRhuD-0002K5-9B for submit@debbugs.gnu.org; Tue, 08 Mar 2022 17:02:09 -0500 Received: from mail-ed1-f41.google.com ([209.85.208.41]:44595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRhuB-0002Je-Cf for 54266@debbugs.gnu.org; Tue, 08 Mar 2022 17:02:08 -0500 Received: by mail-ed1-f41.google.com with SMTP id x5so472452edd.11 for <54266@debbugs.gnu.org>; Tue, 08 Mar 2022 14:02:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=NRze/7pQWThkDVecAbChFy2pdkP7ILUH/jT+rTPv80k=; b=NaPL0q7tD6WCfY/Z52QjbEUvdCPKpnI+OMhwGgYRom6ZKhjA210k3mu+NbdYiqg+y0 FYRcX49Xrui480tUjFPluz49TeQ5v3cfsvFcw8PZ7Rs96nV4EhlfIXSetn0wvcplBsOO YYMTfYsJ6cFstaPGSWSBpE2w9lut07sI72iOUNnEap/gyaO0huMe57h4vBb3JwwZJqqf b6f2TC+mWEQDrH+x+nIxHIFIQTOhqSlhp3+/Op1c8sA7uN84Xqg8K41ybvR77mNAkztf 2UY4wxY9EN2jc6Od3DDDT/0HBSbkN28lBMY/btY7W0ZPKm9NLtO/KD1SG53GpoVsccW/ tbNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=NRze/7pQWThkDVecAbChFy2pdkP7ILUH/jT+rTPv80k=; b=rU+n3FpuIa86pBsHr8YvzsZ1NqdS/T2ApR+q8mBEmxLGkaZ6iy2OQwhPjGyzqqpyjJ Uq9h0uVdiAViNByI3J8kVAX4MEIRJYBEV+Zh/Ooa/t5XPHB2piPKdPho88m1j1LWYNLI dARyQjxtKY9lgDnbehBdzCyeGXfXK2NQ2+qjEdkikuoU+futBeEZmujED2WYyn2BO6ax hc+re22R2orS66zAVxr7Z9YaaKxwKHlQo9xx2et7amK79ObHV8yS2c/gxQ6kKlO5VZdx kZQiI/9gR2H1Mzvhn1CyAjcvxdb3SmKGd6qi0j91lDA1CmK438OdxORofGvfNA+r9FOo U9qQ== X-Gm-Message-State: AOAM531nB8vAOaH11bAADkWocqYd+/Fvkeat7ysrGk6e4Bl8kN+JhUs1 +jjNstDby9fsy3J1pCUjdcs= X-Google-Smtp-Source: ABdhPJywRiMu7c+N1Zvj87/tmPvrC0b1vjdUfVVM9i33OX8B61Npgflc115K7/JauidXfDFG+vu+xA== X-Received: by 2002:a50:d4d2:0:b0:410:9fa2:60d6 with SMTP id e18-20020a50d4d2000000b004109fa260d6mr18630758edj.35.1646776921287; Tue, 08 Mar 2022 14:02:01 -0800 (PST) Received: from ?IPV6:2003:ee:af2f:e00:c2f9:c2bb:bf95:1fc5? (p200300eeaf2f0e00c2f9c2bbbf951fc5.dip0.t-ipconnect.de. [2003:ee:af2f:e00:c2f9:c2bb:bf95:1fc5]) by smtp.gmail.com with ESMTPSA id 17-20020a170906059100b006cee1bceddasm9359ejn.130.2022.03.08.14.02.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Mar 2022 14:02:00 -0800 (PST) Message-ID: <7a858578-21af-828c-20ab-e0683a7b78c2@gmail.com> Date: Tue, 8 Mar 2022 23:01:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [bug#54266] [PATCH] samba: wrap scripts with GUIX_PYTHONPATH Content-Language: en-US To: Maxime Devos , 54266@debbugs.gnu.org References: <50be1b85-e682-d910-970c-14a08275278f@gmail.com> From: fesoj000 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 54266 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) On 3/8/22 9:39 PM, Maxime Devos wrote: > fesoj000 schreef op di 08-03-2022 om 20:26 [+0100]: >> -     (list >> -      #:make-flags #~(list "TEST_OPTIONS=--quick") ;some tests are very long >> -      #:phases >> -      #~(modify-phases %standard-phases >> +     `(#:make-flags '("TEST_OPTIONS=--quick") ;some tests are very long > > What's the reason for turning things from G-exps into S-exps? Good question, here is the gexp version. diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm index b775ad905c..c4457cc11e 100644 --- a/gnu/packages/samba.scm +++ b/gnu/packages/samba.scm @@ -40,6 +40,7 @@ (define-module (gnu packages samba) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages crypto) #:use-module (gnu packages cups) @@ -195,6 +196,10 @@ (define-public samba (arguments (list #:make-flags #~(list "TEST_OPTIONS=--quick") ;some tests are very long + #:imported-modules `((guix build python-build-system) + ,@%gnu-build-system-modules) + #:modules `(((guix build python-build-system) #:select (python-version)) + ,@%gnu-build-system-modules) #:phases #~(modify-phases %standard-phases (add-before 'configure 'setup-docbook-stylesheets @@ -231,12 +236,36 @@ (define-public samba (add-before 'install 'disable-etc,var-samba-directories-setup (lambda _ (substitute* "dynconfig/wscript" - (("bld\\.INSTALL_DIR.*") ""))))) + (("bld\\.INSTALL_DIR.*") "")))) + (add-after 'install 'wrap-scripts + (lambda* (#:key inputs #:allow-other-keys) + (define (site-package-path python) + (string-append "/lib/python" (python-version python) + "/site-packages")) + (define (guix-pythonpath site-package-path) + (string-join + (append (map (lambda (input) + (string-append (assoc-ref inputs input) + site-package-path)) + '("tdb" "ldb" "talloc")) + (list (string-append #$output site-package-path))) + ":")) + (for-each (lambda (file) + (wrap-program (string-append #$output file) + `("GUIX_PYTHONPATH" = + (,(guix-pythonpath + (site-package-path + (assoc-ref inputs "python"))))))) + '("/bin/samba-tool" "/sbin/samba_dnsupdate" + "/sbin/samba_downgrade_db" "/sbin/samba-gpupdate" + "/sbin/samba_kcc" "/sbin/samba_spnupdate" + "/sbin/samba_upgradedns"))))) ;; FIXME: The test suite seemingly hangs after failing to provision the ;; test environment. #:tests? #f)) (inputs (list acl + bash-minimal cmocka cups gamin -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 08 17:22:00 2022 Received: (at 54266) by debbugs.gnu.org; 8 Mar 2022 22:22:00 +0000 Received: from localhost ([127.0.0.1]:58078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRiDP-0002ou-Ov for submit@debbugs.gnu.org; Tue, 08 Mar 2022 17:22:00 -0500 Received: from mail-ej1-f48.google.com ([209.85.218.48]:43781) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRiDN-0002oh-Nn for 54266@debbugs.gnu.org; Tue, 08 Mar 2022 17:21:58 -0500 Received: by mail-ej1-f48.google.com with SMTP id d10so934460eje.10 for <54266@debbugs.gnu.org>; Tue, 08 Mar 2022 14:21:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:references :content-language:reply-to:to:in-reply-to:content-transfer-encoding; bh=oNqoTSw7GjO1UbCbDqZLiRqcz4C8j0ZYt61kh7Dn/eU=; b=RzN5vBGGtQjpvl6xUSR/ntSCAgFUAG05NtyhiPe0uP+7morby0jljUioGkOdsl0GG9 cF8cQUxR24UwGS8muMZFVUa+m7l0Hx1GRBEUr6MRfoX2UT0hjYEe2+07ZqL4S9xCpUM5 dR7EM0jlhHu0pi9phe/sbXlAy6jxp3OViVZnFKnVK70Dag2RlemhuyaAstG4JUFZoeDy b6GhDg9839zU0/y/g4wcstnntcicnjtzODJGvpc1GCX0U+AQZ0uuJtLhWWSrdBLAFDF2 xfwGQrIfJSrdHO6Aqq0rfpcbKEOT20eEkRAmhUamSjS2VabWfe1In1qHnm21TLSS5oZZ krUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:references:content-language:reply-to:to:in-reply-to :content-transfer-encoding; bh=oNqoTSw7GjO1UbCbDqZLiRqcz4C8j0ZYt61kh7Dn/eU=; b=6LnVr14EQ9fsWceFBQ7NtLc8i8XmxQHqX+tRrqe9q8SCdWjRLN29xF+FEwW9Ej+sag rKoYK1LFDWgHlUwxhJMFwoR9RMLbg8XFiKja54rVsRvqWxNFaPBrNBHUMouQASuM64C8 0rmR1nI6pdFpUaHvKevay6fgDFe2GtViS1RY25pZTDhFfWL3iz1n//cyBNqbuKyj+bKS s9sLAVR5QhElPVzWtVHe+0ldyXmakwJCjLc+zGjvD+ObPYDPmSc/lfUlfQYF7pgisgBJ FlG85ZnppDvo5Y+yR09ZSeEZyz9fsZUX7gyR0WbnnrMMf63pBr9psFRlxzw0ybHfg6Ho aY8g== X-Gm-Message-State: AOAM531GMW0EbBSOGh/qgzy5EOU/0T1a1S419GeIWN4pssQgPZPngDI7 xj1IhBh+GVAfDZdJsfO2SvJr7S7o1lU= X-Google-Smtp-Source: ABdhPJzL43i3UNF+IiNkawcv/dtKmNpbHl8QbW0ruOwRWYzEyYKnBOw13wvYYW34KPLxg0NUQXKd+A== X-Received: by 2002:a17:906:fc10:b0:6cd:84e:7248 with SMTP id ov16-20020a170906fc1000b006cd084e7248mr15576915ejb.281.1646778111917; Tue, 08 Mar 2022 14:21:51 -0800 (PST) Received: from ?IPV6:2003:ee:af2f:e00:c2f9:c2bb:bf95:1fc5? (p200300eeaf2f0e00c2f9c2bbbf951fc5.dip0.t-ipconnect.de. [2003:ee:af2f:e00:c2f9:c2bb:bf95:1fc5]) by smtp.gmail.com with ESMTPSA id i22-20020a170906251600b006d6d9081f46sm20571ejb.150.2022.03.08.14.21.51 for <54266@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Mar 2022 14:21:51 -0800 (PST) Message-ID: <42365ae6-a63a-5825-8a96-59a54b706b15@gmail.com> Date: Tue, 8 Mar 2022 23:21:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 From: fesoj000 Subject: Re: [bug#54266] [PATCH] samba: wrap scripts with GUIX_PYTHONPATH References: <07a2e445-f1b8-16dc-ba68-add645ba2588@gmail.com> Content-Language: en-US To: 54266@debbugs.gnu.org In-Reply-To: <07a2e445-f1b8-16dc-ba68-add645ba2588@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 54266 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: fesoj000 Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 3/8/22 9:44 PM, Maxime Devos wrote: > fesoj000 schreef op di 08-03-2022 om 20:26 [+0100]: >> +                            (wrap-program (string-append out file) >> +                              `("GUIX_PYTHONPATH" = >> +                                (,(guix-pythonpath >> +                                   (site-package-path >> +                                    (assoc-ref inputs "python"))))))) > > I would expect that python always puts its own site-packages in front > of the path, though I could be mistaken, so is this necessary?hm, "python3 -c 'import sys; print(sys.path)'" always includes its own site packages. If you talk about the samba package output then we can do this like the new diff below. > Also, it looks like some of the python stuf uses 'ldb', so 'ldb' might > need to be included as well. 'ldb' is included, you can look at the guix-pythonpath function which builds the pythonpath. In fact not only 'ldb' is need but further 'tdb' and 'talloc'. diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm index b775ad905c..fa8ff5b6bb 100644 --- a/gnu/packages/samba.scm +++ b/gnu/packages/samba.scm @@ -40,6 +40,7 @@ (define-module (gnu packages samba) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages crypto) #:use-module (gnu packages cups) @@ -195,6 +196,10 @@ (define-public samba (arguments (list #:make-flags #~(list "TEST_OPTIONS=--quick") ;some tests are very long + #:imported-modules `((guix build python-build-system) + ,@%gnu-build-system-modules) + #:modules `(((guix build python-build-system) #:select (python-version)) + ,@%gnu-build-system-modules) #:phases #~(modify-phases %standard-phases (add-before 'configure 'setup-docbook-stylesheets @@ -231,12 +236,36 @@ (define-public samba (add-before 'install 'disable-etc,var-samba-directories-setup (lambda _ (substitute* "dynconfig/wscript" - (("bld\\.INSTALL_DIR.*") ""))))) + (("bld\\.INSTALL_DIR.*") "")))) + (add-after 'install 'wrap-scripts + (lambda* (#:key inputs #:allow-other-keys) + (define (site-package-path python) + (string-append "/lib/python" (python-version python) + "/site-packages")) + (define (guix-pythonpath site-package-path) + (string-join + (append (list (string-append #$output site-package-path)) + (map (lambda (input) + (string-append (assoc-ref inputs input) + site-package-path)) + '("tdb" "ldb" "talloc"))) + ":")) + (for-each (lambda (file) + (wrap-program (string-append #$output file) + `("GUIX_PYTHONPATH" = + (,(guix-pythonpath + (site-package-path + (assoc-ref inputs "python"))))))) + '("/bin/samba-tool" "/sbin/samba_dnsupdate" + "/sbin/samba_downgrade_db" "/sbin/samba-gpupdate" + "/sbin/samba_kcc" "/sbin/samba_spnupdate" + "/sbin/samba_upgradedns"))))) ;; FIXME: The test suite seemingly hangs after failing to provision the ;; test environment. #:tests? #f)) (inputs (list acl + bash-minimal cmocka cups gamin -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 08 17:28:31 2022 Received: (at 54266) by debbugs.gnu.org; 8 Mar 2022 22:28:31 +0000 Received: from localhost ([127.0.0.1]:58093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRiJj-00030W-0O for submit@debbugs.gnu.org; Tue, 08 Mar 2022 17:28:31 -0500 Received: from albert.telenet-ops.be ([195.130.137.90]:33236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRiJg-00030N-I6 for 54266@debbugs.gnu.org; Tue, 08 Mar 2022 17:28:29 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by albert.telenet-ops.be with bizsmtp id 3yUS2700K4UW6Th06yUT7W; Tue, 08 Mar 2022 23:28:27 +0100 Message-ID: <627b297ab383846cd2572bc29337dc5a224f425a.camel@telenet.be> Subject: Re: [bug#54266] [PATCH] samba: wrap scripts with GUIX_PYTHONPATH From: Maxime Devos To: fesoj000 Date: Tue, 08 Mar 2022 23:28:26 +0100 In-Reply-To: <07a2e445-f1b8-16dc-ba68-add645ba2588@gmail.com> References: <50be1b85-e682-d910-970c-14a08275278f@gmail.com> <6117b63516dfa5b4801ed876d33658412aedbfff.camel@telenet.be> <07a2e445-f1b8-16dc-ba68-add645ba2588@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-m3AakI1I+BCfTQzIGIkJ" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1646778507; bh=+3Ls85Qet7bK6O1zdh8zLmTnaDaZE0h87W/w/8mQwLg=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=c9FQtewAe9Lc/Nmim8C0tIhORWaeYz0DINHCh3/OEZCtvH3kH30Idau+swIaCXCq6 VNq4kfg6/HRXJfDZmMuwng15YtHFcxwz7sXQ7oKe/C5CCm7CcLrhbMyHju0URzmjf4 GVqF6x/uRyUrCIN2ZG72w4D83CLJP4FSX3Z5BhTL/yiqMjiyYwny9J2awdT6CDbFbP 1k9E861JqNOqp68aLEEq6weMTNAUa7bjgqK9y/IERqvTDDTdwo+/WgvNyuKRcOAz0C sEQIW79vkPvn94Nq3a1ahi+WjYlC0qu3TjiUNbqc7XJRFzjOlfu8bumv9wU2V0THmO 7BDTRQ/P6buxw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54266 Cc: 54266@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-m3AakI1I+BCfTQzIGIkJ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable [Please keep 54266@debbugs.gnu.org in CC] fesoj000 schreef op di 08-03-2022 om 23:14 [+0100]: > packages. If you talk about the samba package output then we can do this = like > the new diff below. Looking at some of the python scripts, it seems that they add samba's python libraries to the path by theirselves, so I don't think this is necessary. > > Also, it looks like some of the python stuf uses 'ldb', so 'ldb' might > > need to be included as well. > 'ldb' is included, you can look at the guix-pythonpath function which bui= lds > the pythonpath. In fact not only 'ldb' is need but further 'tdb' and 'tal= loc'. Looking a little closer, it indeed seems fine (untested)! Greetings, Maxime. --=-m3AakI1I+BCfTQzIGIkJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYifYihccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pyvAP0cONy768a67sQn1jycZxRQJUpe 6oJww7UrWE1l/GWxHQEAt8S5Fio1bJ9AWsMaTCgmcH4yWciOEwHzxWcC4Osd4gs= =3FNc -----END PGP SIGNATURE----- --=-m3AakI1I+BCfTQzIGIkJ-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 08 17:29:55 2022 Received: (at 54266) by debbugs.gnu.org; 8 Mar 2022 22:29:55 +0000 Received: from localhost ([127.0.0.1]:58098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRiL5-00032k-BP for submit@debbugs.gnu.org; Tue, 08 Mar 2022 17:29:55 -0500 Received: from laurent.telenet-ops.be ([195.130.137.89]:56940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRiL4-00032d-9n for 54266@debbugs.gnu.org; Tue, 08 Mar 2022 17:29:54 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by laurent.telenet-ops.be with bizsmtp id 3yVs2700S4UW6Th01yVsbT; Tue, 08 Mar 2022 23:29:53 +0100 Message-ID: <475e57fbd9aed4d022121c70d7bb3904c6cae82b.camel@telenet.be> Subject: Re: [bug#54266] [PATCH] samba: wrap scripts with GUIX_PYTHONPATH From: Maxime Devos To: fesoj000 , 54266@debbugs.gnu.org Date: Tue, 08 Mar 2022 23:29:52 +0100 In-Reply-To: <42365ae6-a63a-5825-8a96-59a54b706b15@gmail.com> References: <07a2e445-f1b8-16dc-ba68-add645ba2588@gmail.com> <42365ae6-a63a-5825-8a96-59a54b706b15@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-Y6636Mjf57tAgd0BQPpa" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1646778593; bh=ZtOnVdZVu+vws4drhoz23pNzzeOX9Xoi12ryRTT0IMk=; h=Subject:From:To:Date:In-Reply-To:References; b=h2GZ0jXC3ZM3avQiNaMfqVhqEfvqXQa8/Zi5HsArmo2yXzYm3/74bYO3x37E2/VgR Ks4hPLwaITkcIUfNZ7nyJdPH5d3u5Tpl+4hqikGKNHbJQ5W8jfPnUa+lCPzDjpF4rh WReKkaHzg/sg5/ljlVM7xd3O4FEVd2BXz8FUNTy21hsst34XwHpE76nl33eZM1yOHU 1Lb0ZLU0NWpABYrefaBIrxO76o7zOYQdmHQRfpliFcJI5RHAGONOhhD+8Y3iFa9TmC sT2iVHOe/9QFKmQzYGl1wPqbCGPYjPZTZrkPmSNq12FslIt3n3k391jPk42Hy+AZQe qdiOeTu8Fy2Uw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54266 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-Y6636Mjf57tAgd0BQPpa Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Nevermind the comment about keeping debbugs in CC or To, seems like the mail was received twice and one of them has 54266@debbugs.gnu.org --=-Y6636Mjf57tAgd0BQPpa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYifY4BccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ggrAP0YjWIS6AmAX89E47wjCNA7wzkS 8RDQtJbgwUvDd+tkxgD/WXXPNp0ZtUlij2Q1fMN8TJbZJVJgEcnt4qFhJmIHqAw= =Pisl -----END PGP SIGNATURE----- --=-Y6636Mjf57tAgd0BQPpa-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 08 18:09:09 2022 Received: (at 54266) by debbugs.gnu.org; 8 Mar 2022 23:09:09 +0000 Received: from localhost ([127.0.0.1]:58105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRix3-00044P-Ee for submit@debbugs.gnu.org; Tue, 08 Mar 2022 18:09:09 -0500 Received: from mail-ej1-f53.google.com ([209.85.218.53]:45028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRix1-00044B-VT for 54266@debbugs.gnu.org; Tue, 08 Mar 2022 18:09:08 -0500 Received: by mail-ej1-f53.google.com with SMTP id qt6so1127225ejb.11 for <54266@debbugs.gnu.org>; Tue, 08 Mar 2022 15:09:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:references :content-language:reply-to:to:in-reply-to:content-transfer-encoding; bh=RjrlfcejWrXWaYobiZIYoN2rOYiKnoybDH+BGF7LN2U=; b=hZYEljIK2tNDVJ/3LiEDui8fp3PTZn8g7FKJGtpdBfFodMpSov4lpUmWm5Mk97rvQy RKibkRawO1Y6dVYJv8yGPiPgyNREYCE1vawhnmX7lWb5j16Axicmpt+bqH5yPvs2H4lY RmpBtYxpjNrp+3u6AAEiZHyjh80WmTif7wTokNQpyLnNRWSLbHmPgP22mBbE1b+9wJcQ 0pGYjseh3iKZc142ESlEwnmtenJfT8nun8QxbIM1VeOdc6rxgPWM+DDhWHKluozK4om2 crw/q5exhSapWHz9OPLVWJOBCf53wGspm8DiVgSwmaePrwz3WRVcGdWZ18Y7ED2ipOVJ iSOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:references:content-language:reply-to:to:in-reply-to :content-transfer-encoding; bh=RjrlfcejWrXWaYobiZIYoN2rOYiKnoybDH+BGF7LN2U=; b=vL1ywe0oXl75K5lYVNpFp7PIb7zP5U3k+QKNq3wUxwmRGgJbEz6Ap1mMJNheDvhiOb fdAkJYEYsUHDwel30mcdKk7uLI6Amyu0mA2YL6Q8jVS9rvYDUPJPSA/i09LLU6hiITg6 qZQ9IeV58Z32nRGqauPymPpcJM4FJRFB/7t3rvffJ7gtknBMjRm2dXQhStdnuXHNprOV F8FCztyLzJffco7gqriax2eGpB3jpZrT8+5jye7Ovgs4cKGhMm7/p9v/mMODDdMR3AxI YW1LCYc3lgJsj6mwcinE/k6pOUq0RPv1iIsw5KjK//G0J2dKow+OZviFPiv5kcfZ5c6a yECA== X-Gm-Message-State: AOAM531PrhjKij2MQbf1Aq2WaU5mf2/sLvm9GyTgKvt14ajYX6f5Y8tF bHr7j7GTIWkPv74/r3JvB17DCZc9XNc= X-Google-Smtp-Source: ABdhPJxZcV55VvYPvvSc00A3NCA2oAyXUSljl3JFh58fAPf31GrgELD16mE9ODcorHegYs6ZvgkeJg== X-Received: by 2002:a17:906:6547:b0:6bd:e2ad:8c82 with SMTP id u7-20020a170906654700b006bde2ad8c82mr15038767ejn.693.1646780942112; Tue, 08 Mar 2022 15:09:02 -0800 (PST) Received: from ?IPV6:2003:ee:af2f:e00:c2f9:c2bb:bf95:1fc5? (p200300eeaf2f0e00c2f9c2bbbf951fc5.dip0.t-ipconnect.de. [2003:ee:af2f:e00:c2f9:c2bb:bf95:1fc5]) by smtp.gmail.com with ESMTPSA id ka6-20020a170907990600b006ce54c95e3csm50637ejc.161.2022.03.08.15.09.01 for <54266@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Mar 2022 15:09:01 -0800 (PST) Message-ID: <507835fa-d569-8ee2-2df3-f45f1281d10e@gmail.com> Date: Wed, 9 Mar 2022 00:09:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 From: fesoj000 Subject: Re: [bug#54266] [PATCH] samba: wrap scripts with GUIX_PYTHONPATH References: Content-Language: en-US To: 54266@debbugs.gnu.org In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 54266 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: fesoj000 Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 3/8/22 11:28 PM, Maxime Devos wrote: > [Please keep 54266@debbugs.gnu.org in CC] > > fesoj000 schreef op di 08-03-2022 om 23:14 [+0100]: >> packages. If you talk about the samba package output then we can do this like >> the new diff below. > > Looking at some of the python scripts, it seems that they > add samba's python libraries to the path by theirselves, > so I don't think this is necessary. I just tested it, without the samba site-packages path the scripts still seem to work just fine. >>> Also, it looks like some of the python stuf uses 'ldb', so 'ldb' might >>> need to be included as well. >> 'ldb' is included, you can look at the guix-pythonpath function which builds >> the pythonpath. In fact not only 'ldb' is need but further 'tdb' and 'talloc'. > > Looking a little closer, it indeed seems fine (untested)! > > Greetings, > Maxime. (I again made the mistake to not include debbugs ...) From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 08 18:10:57 2022 Received: (at 54266) by debbugs.gnu.org; 8 Mar 2022 23:10:57 +0000 Received: from localhost ([127.0.0.1]:58109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRiym-00046w-Ql for submit@debbugs.gnu.org; Tue, 08 Mar 2022 18:10:57 -0500 Received: from mail-ej1-f52.google.com ([209.85.218.52]:45815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRiyl-00046i-0D for 54266@debbugs.gnu.org; Tue, 08 Mar 2022 18:10:55 -0500 Received: by mail-ej1-f52.google.com with SMTP id qa43so1121770ejc.12 for <54266@debbugs.gnu.org>; Tue, 08 Mar 2022 15:10:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject :content-language:to:content-transfer-encoding; bh=3igOC5lXPI+hkUSIhpFB2Q6h9ZgNXSBeoDY/pOHXtKE=; b=cRsDQny2WVYTc/BT9zNr3LuZJHtvPmKBHJJLR+h8sBP2qvLfUeD/hdmJGcPl0a6ZHe g6FgJCd5X8+XNzZYYn6iiP3sr99FHL1imvLZzWaiRG26sgJotyM8kYSwbdBj36M9etgM ipgWH6M4N1TMU3iNOtYYWtymlGMW9wm475JyFzgizeXs9JDfRXb1L9fL2NQjJ5brJiHi GPS4v5iGY4gZJjc6tODUlEp7MmYCouedUZL1F+KpLTXrTkY56pBeXt1WLcYEQ+8azt0a XglNvEhR6AN5+SmhSsA69DnoI6zNNxSrizy/oGRAfgJ4zDIkhkBEwr0XP5e6rgwGnwiq maOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:content-language:to:content-transfer-encoding; bh=3igOC5lXPI+hkUSIhpFB2Q6h9ZgNXSBeoDY/pOHXtKE=; b=i3fNiiKb5KwWXLLz3DHVd/flSnyQfMnPbJksN0jtHBY8O52ivzJYwjG4713jGui97H GwpXQ6TLf1cc7lTdGbM0Ah37YOHXy75MJ/B3NzbtI7o5qwHDSEaTAqxyQz7rbkcpieuP tZRg6zomk5DQDUQ7lLg/FBs42Ww26TjpH3MRKFRBuaR8TRUHfyClHiVeyB7x79SwgMki sVWSTcQ5U2tuhmwZFVnFXVctVtoB2+ULsGkujUi3ah33s5RXQdjuXty4M2sxZz83td2k tm0etQswVmLmWc9kVJ627m6pm271BNdgfiLLXNK+cl77DSgiEHcw51grD1hTlhyQ4aF3 MeWA== X-Gm-Message-State: AOAM5316e36Dglb74xAeq29BYl0qsUD/FOBsKDFVU/vWW+CoKim8FORG 92nF3Y20O3ixnIkIsIy6VC9sXL6CoLc= X-Google-Smtp-Source: ABdhPJwgKK7we6VG2N3NO5NjSFHEw6+3CzX8Rz27tPPFOgOiyeBS7G1TElUNkPyMfLAvqYLEq6EL3g== X-Received: by 2002:a17:907:8a04:b0:6cd:2902:8db3 with SMTP id sc4-20020a1709078a0400b006cd29028db3mr15504503ejc.530.1646781049480; Tue, 08 Mar 2022 15:10:49 -0800 (PST) Received: from ?IPV6:2003:ee:af2f:e00:c2f9:c2bb:bf95:1fc5? (p200300eeaf2f0e00c2f9c2bbbf951fc5.dip0.t-ipconnect.de. [2003:ee:af2f:e00:c2f9:c2bb:bf95:1fc5]) by smtp.gmail.com with ESMTPSA id q22-20020a170906771600b006cf8a37ebf5sm54047ejm.103.2022.03.08.15.10.48 for <54266@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Mar 2022 15:10:49 -0800 (PST) Message-ID: Date: Wed, 9 Mar 2022 00:10:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 From: fesoj000 Subject: [PATCH] samba: wrap scripts with GUIX_PYTHONPATH Content-Language: en-US To: 54266@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 54266 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Tools like samba-tool need the python libraries installed by samba and some of sambas inputs. * gnu/packages/samba.scm: new buildstep (samba)[wrap-scripts]: Add build step. --- gnu/packages/samba.scm | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm index b775ad905c..cb34fd8c2c 100644 --- a/gnu/packages/samba.scm +++ b/gnu/packages/samba.scm @@ -40,6 +40,7 @@ (define-module (gnu packages samba) #:use-module (gnu packages autotools) #:use-module (gnu packages backup) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages crypto) #:use-module (gnu packages cups) @@ -195,6 +196,10 @@ (define-public samba (arguments (list #:make-flags #~(list "TEST_OPTIONS=--quick") ;some tests are very long + #:imported-modules `((guix build python-build-system) + ,@%gnu-build-system-modules) + #:modules `(((guix build python-build-system) #:select (python-version)) + ,@%gnu-build-system-modules) #:phases #~(modify-phases %standard-phases (add-before 'configure 'setup-docbook-stylesheets @@ -231,12 +236,35 @@ (define-public samba (add-before 'install 'disable-etc,var-samba-directories-setup (lambda _ (substitute* "dynconfig/wscript" - (("bld\\.INSTALL_DIR.*") ""))))) + (("bld\\.INSTALL_DIR.*") "")))) + (add-after 'install 'wrap-scripts + (lambda* (#:key inputs #:allow-other-keys) + (define (site-package-path python) + (string-append "/lib/python" (python-version python) + "/site-packages")) + (define (guix-pythonpath site-package-path) + (string-join + (map (lambda (input) + (string-append (assoc-ref inputs input) + site-package-path)) + '("tdb" "ldb" "talloc")) + ":")) + (for-each (lambda (file) + (wrap-program (string-append #$output file) + `("GUIX_PYTHONPATH" = + (,(guix-pythonpath + (site-package-path + (assoc-ref inputs "python"))))))) + '("/bin/samba-tool" "/sbin/samba_dnsupdate" + "/sbin/samba_downgrade_db" "/sbin/samba-gpupdate" + "/sbin/samba_kcc" "/sbin/samba_spnupdate" + "/sbin/samba_upgradedns"))))) ;; FIXME: The test suite seemingly hangs after failing to provision the ;; test environment. #:tests? #f)) (inputs (list acl + bash-minimal cmocka cups gamin -- 2.34.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 18 17:58:27 2022 Received: (at 54266) by debbugs.gnu.org; 18 Mar 2022 21:58:27 +0000 Received: from localhost ([127.0.0.1]:58560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVKc7-0004iu-3z for submit@debbugs.gnu.org; Fri, 18 Mar 2022 17:58:27 -0400 Received: from mail-ed1-f48.google.com ([209.85.208.48]:39694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVKc5-0004ig-2Y for 54266@debbugs.gnu.org; Fri, 18 Mar 2022 17:58:25 -0400 Received: by mail-ed1-f48.google.com with SMTP id g20so11743411edw.6 for <54266@debbugs.gnu.org>; Fri, 18 Mar 2022 14:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:content-language:to:from :subject:content-transfer-encoding; bh=NmBmk6/fhle8iZ97H2o/WBCF9kO557bbqbvRZOC+sTg=; b=PyFs/MQ4qo2yx5Tbbe5jX/bAeon2trnkgWegQk+0zo5VJoSOuX80nmcKevKtK6PtsU lWTxJGsw/zmGbzcSbjtfcBxH6aw1/Rg+YIy4N4sot4Oq0IPS/DRedQap5jPOAnvTmZ6p ytjnj73daEgwkwnGVS4ClezR/6G7H9DfrYgOL8Qxayca9K/Ak/v1HB8JHABtIgqssvCX lzPAhg09UgetkxJiecJaVRngZN1vILVAcEczSWw4Zv4tD7Vtn0J/hFCH5V1PR/XXNyev 40P9nuxxqbh4wSNmhV5hiXZ+edaPSLxzSi72wZnaNQyZOcfBeG1zpDuZIktmz96WcYFV zgbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:from:subject:content-transfer-encoding; bh=NmBmk6/fhle8iZ97H2o/WBCF9kO557bbqbvRZOC+sTg=; b=RYMRX9prYO88g3/y38+4YNgjt+nZYaQqZHwjC1uQ7wBZforshjyPez2tEXaNlirgJU a5H4auu2LWxG6GU/Orx7tQyVMMPTNTr0Rl6Wtr3zL+eXUMysZODitljpl6k0dGaqNxw6 6VkENZvwAocI3E5dO2KDxbbwNe5NVrwJ1H3jOhyJ8Vd+GTUYdiB6y1fRU6JLtXZweQkh onJPevdqx9DGIUdhvcefNSwlH9fsDWrZjdIYRxKNd4UlHy7OVKWZRbajD+lfoNiBEGn0 AT/4rX5i/oyWEIM4MaVQvlolYH1Q1Q+zFTV018+V7KBdthhvKIX+h9T1h6p5XQkEhygq Y8sQ== X-Gm-Message-State: AOAM533EeIPuuI3wXTOpyKz4dnrV1+PIf5YAKCatC7QOr5LK7ihffwPN 7tf7jeNLLOTiha6jcJ2QzVHtbRiUBkg= X-Google-Smtp-Source: ABdhPJz4z8xMBzqgNO+BZXvybuHNKF13ROD6d7E+/rmxp6ztYsozcRqgckUYe64hCfoq7QujTBLtcA== X-Received: by 2002:a05:6402:358c:b0:418:3377:a5f8 with SMTP id y12-20020a056402358c00b004183377a5f8mr11767287edc.27.1647640698997; Fri, 18 Mar 2022 14:58:18 -0700 (PDT) Received: from ?IPV6:2003:ee:af2f:e00:c2f9:c2bb:bf95:1fc5? (p200300eeaf2f0e00c2f9c2bbbf951fc5.dip0.t-ipconnect.de. [2003:ee:af2f:e00:c2f9:c2bb:bf95:1fc5]) by smtp.gmail.com with ESMTPSA id bm23-20020a170906c05700b006d597fd51c6sm4168323ejb.145.2022.03.18.14.58.18 for <54266@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Mar 2022 14:58:18 -0700 (PDT) Message-ID: Date: Fri, 18 Mar 2022 22:58:19 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-US To: 54266@debbugs.gnu.org From: fesoj000 Subject: [PATCH] gnu: samba: wrap scripts Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 54266 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Are there still open issues which are not addressed by the last patch? BR From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 16 12:53:58 2023 Received: (at 54266) by debbugs.gnu.org; 16 Jan 2023 17:53:59 +0000 Received: from localhost ([127.0.0.1]:34664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHTgE-00006o-Mh for submit@debbugs.gnu.org; Mon, 16 Jan 2023 12:53:58 -0500 Received: from mail-qt1-f178.google.com ([209.85.160.178]:35609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHTgC-00006Y-9x for 54266@debbugs.gnu.org; Mon, 16 Jan 2023 12:53:56 -0500 Received: by mail-qt1-f178.google.com with SMTP id g9so10580781qtu.2 for <54266@debbugs.gnu.org>; Mon, 16 Jan 2023 09:53:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=alHF6ZJlzB5WmT/bdB9RJryYfaNz6ZulOsZEAglM7lk=; b=aWwkDr+AY7QgW5aBLPZY3JgSyJjn9lEb8EoY9KL19O36inOlhaNRMM6CsrwrgG39bT x+125nzBCTWw46s8VeZ/GfF15YG2+pShYBiZwi+aQlsE5LVZAOh5qPn5ptqMR6rZIhI/ y5Q5xWvT06x1G3p1eQGvo9o7j/ryscCBQLWPX9w9mEcASD7MdTwUfvFpUwrHyJBtKfxP tLvc+zlUaW9oI7n5qLNzgxjR+et/gwZo0w096VeDXwf6pVr4NDDzliNhx0ZB+Juf0zEg IYZMegb+pKr3GTzUCjqaIcN95+s3ZmPWQtJuIdJhSyXp5K/cLzQ62f0sFK/OxfoY3AOo qeuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=alHF6ZJlzB5WmT/bdB9RJryYfaNz6ZulOsZEAglM7lk=; b=epYjquRpzUny6sqPV9ba+T+BaQPaYTwdASDpZb8qp1lerQ4PJ2k9ubH103JJASw0Nl m98UFWxFDC/kEAuHGIiKuZGmeWbKdgvO50kDKNp+S69s3KeYBYDypDm+Pr+FcOgpVGkB Btmqxhtqu9ReOJDAlGMtqoTWAd5ZojXMAFnGaB70ge/hF0+pppGHfNALXqR6VqmXNFnx PdmRnX2puf+W1ZTEuPmPhfqmZC/sdlBrtFCnTQNBvZqqx0RPALz+lW3cSzs8c9BCAX67 gmssAlSohxrUj1lTawG2qeChSrKC0+lQl6qHfd/fcY0ot3C6OQYfpVySDmCkMnFBWtYc tMnw== X-Gm-Message-State: AFqh2kpTNE49DgjIpo9zxKba1Ii0W9AH247YtCY/Bv1QARc1qE/8NVRN t+2eGdCoh1nQRFA82swgnyxpBi/NTh5j6MfL X-Google-Smtp-Source: AMrXdXvGgPJHD9gq3dX1YELGMvC1VzFzg8IkM9fetm+2ZnbYAww0JLD65cFlLXK70QgCny2NasQSZQ== X-Received: by 2002:ac8:7c99:0:b0:3a7:e727:a015 with SMTP id y25-20020ac87c99000000b003a7e727a015mr110092902qtv.20.1673891630689; Mon, 16 Jan 2023 09:53:50 -0800 (PST) Received: from hurd (dsl-10-130-209.b2b2c.ca. [72.10.130.209]) by smtp.gmail.com with ESMTPSA id w22-20020a05620a425600b006cbc00db595sm18651499qko.23.2023.01.16.09.53.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 09:53:50 -0800 (PST) From: Maxim Cournoyer To: fesoj000 Subject: Re: bug#54266: [PATCH] samba: wrap scripts with GUIX_PYTHONPATH References: <507835fa-d569-8ee2-2df3-f45f1281d10e@gmail.com> Date: Mon, 16 Jan 2023 12:53:49 -0500 In-Reply-To: <507835fa-d569-8ee2-2df3-f45f1281d10e@gmail.com> (fesoj's message of "Wed, 9 Mar 2022 00:09:01 +0100") Message-ID: <87edru5psi.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 54266 Cc: 54266@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, fesoj000 writes: > On 3/8/22 11:28 PM, Maxime Devos wrote: >> [Please keep 54266@debbugs.gnu.org in CC] >> fesoj000 schreef op di 08-03-2022 om 23:14 [+0100]: >>> packages. If you talk about the samba package output then we can do this like >>> the new diff below. >> Looking at some of the python scripts, it seems that they >> add samba's python libraries to the path by theirselves, >> so I don't think this is necessary. > I just tested it, without the samba site-packages path the scripts still seem > to work just fine. > >>>> Also, it looks like some of the python stuf uses 'ldb', so 'ldb' might >>>> need to be included as well. >>> 'ldb' is included, you can look at the guix-pythonpath function which builds >>> the pythonpath. In fact not only 'ldb' is need but further 'tdb' and 'talloc'. >> Looking a little closer, it indeed seems fine (untested)! I'm a bit lost, is there something left to do here? Else let's close it (replying to 54266-done@debbugs.gnu.org). -- Thanks, Maxim