From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GBv3EfHiJ2JgYQAAgWs5BA (envelope-from ) for ; Wed, 09 Mar 2022 00:12:49 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id wJbzCvHiJ2L9bgAAG6o9tA (envelope-from ) for ; Wed, 09 Mar 2022 00:12:49 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A6EDF15181 for ; Wed, 9 Mar 2022 00:12:48 +0100 (CET) Received: from localhost ([::1]:53632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRj0Z-0008UX-CO for larch@yhetil.org; Tue, 08 Mar 2022 18:12:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRiys-0007iy-Ui for guix-patches@gnu.org; Tue, 08 Mar 2022 18:11:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35979) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRiys-0001Ru-Ly for guix-patches@gnu.org; Tue, 08 Mar 2022 18:11:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nRiys-00047F-Hb for guix-patches@gnu.org; Tue, 08 Mar 2022 18:11:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54266] [PATCH] samba: wrap scripts with GUIX_PYTHONPATH References: <50be1b85-e682-d910-970c-14a08275278f@gmail.com> In-Reply-To: <50be1b85-e682-d910-970c-14a08275278f@gmail.com> Resent-From: fesoj000 Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Mar 2022 23:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54266 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54266@debbugs.gnu.org Received: via spool by 54266-submit@debbugs.gnu.org id=B54266.164678105715811 (code B ref 54266); Tue, 08 Mar 2022 23:11:02 +0000 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 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646781168; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=3igOC5lXPI+hkUSIhpFB2Q6h9ZgNXSBeoDY/pOHXtKE=; b=ZlMFZsfh2npyIYO+j5YqnlX3vUcOWtDMewbNsV1hf52V78uwUhtTC3YbGiFuvMz0L7VBC7 YRXlga2WQk+xZ4nk8JZFIfz35B7GP0Cji4y12i9UYpL7uSD8CM1GTwXjDxXtP0kix3gpOv GOgUn8Nw3A43bs6VgPTBAZEpsQyh3Z4ozv+MPq5NmT7ZPg8cUqWsKiZ/2LswWm+nj2KkvD l1BzBpSG6BqjJzQoGLvhVTteUp9PYDHKk9lrYKW2xM+V3dqq4ZbEcx1nTSGdbTYJ7KdMqK On6aHFY8XBhK/YXCfBi6VjCvAdvAmwkVnJ1Bcyopp2YE603hQRVa8e5yd9diTg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646781168; a=rsa-sha256; cv=none; b=JKXC/jaX5CFv27nAd5x0nN74iuRWvt7XjtYJHMMHvmPCdzmKOfg44ry4EjIdVLgqwPQlMs lgg65yMT88ClRJ8pT5vbQGg++j8veBqIeHX6PYo2xAp86gtKEUh2TmiY/dWGl7rh2TnW85 lKlTzLYuLvfCuf2KHwncpDv6xpqh7ibZiiY3P+6PBBsAT00ULr4L1NRXxZLzVLCh1/yo24 CzKZ2d7sfFy2Lo7qzUaMb0ddir9252Rl/yIXX9iUenVh2bKAIm/jHDzq9BNxWBlozEG1h7 J72jrKFo87o8mmAJ+QexvTisltrjuJWm4ucnf8obKwAWtevzrqyIlPA4ZQNKTw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=cRsDQny2; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.59 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=cRsDQny2; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A6EDF15181 X-Spam-Score: 4.59 X-Migadu-Scanner: scn0.migadu.com X-TUID: rHqc+xK2XlSw 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