From patchwork Sat Mar 5 12:06:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fesoj000 X-Patchwork-Id: 37621 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 86DC727BBEB; Sat, 5 Mar 2022 17:29:55 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 18F6A27BBEA for ; Sat, 5 Mar 2022 17:29:55 +0000 (GMT) Received: from localhost ([::1]:48194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQYE6-0007Hn-77 for patchwork@mira.cbaines.net; Sat, 05 Mar 2022 12:29:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQYBL-0004JQ-Og for guix-patches@gnu.org; Sat, 05 Mar 2022 12:27:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55072) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nQYBL-0001ix-Fp for guix-patches@gnu.org; Sat, 05 Mar 2022 12:27:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nQYBL-0001Fi-Cy for guix-patches@gnu.org; Sat, 05 Mar 2022 12:27:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54266] [PATCH] samba: wrap scripts with GUIX_PYTHONPATH Resent-From: fesoj000 Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 05 Mar 2022 17:27:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54266 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54266@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16465012114776 (code B ref -1); Sat, 05 Mar 2022 17:27:03 +0000 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 Content-Language: en-US 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-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 X-Mailman-Approved-At: Sat, 05 Mar 2022 12:29:47 -0500 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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(-) cmocka cups gamin 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