From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 YNmMOUb10mGcGQAAgWs5BA (envelope-from ) for ; Mon, 03 Jan 2022 14:08:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qBoqNkb10mG7CAAAauVa8A (envelope-from ) for ; Mon, 03 Jan 2022 14:08:22 +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 5B8F538187 for ; Mon, 3 Jan 2022 14:08:22 +0100 (CET) Received: from localhost ([::1]:43700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4N4X-0000nC-FF for larch@yhetil.org; Mon, 03 Jan 2022 08:08:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4N4F-0000k4-7N for bug-guix@gnu.org; Mon, 03 Jan 2022 08:08:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51013) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n4N4E-0002ME-U2 for bug-guix@gnu.org; Mon, 03 Jan 2022 08:08:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n4N4E-0002hc-JT for bug-guix@gnu.org; Mon, 03 Jan 2022 08:08:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52976: Some tools in Samba fail to find modules, and a missing dependency Resent-From: Simon Streit Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 03 Jan 2022 13:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52976 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 52976@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164121523410319 (code B ref -1); Mon, 03 Jan 2022 13:08:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jan 2022 13:07:14 +0000 Received: from localhost ([127.0.0.1]:34326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n4N3S-0002gN-EP for submit@debbugs.gnu.org; Mon, 03 Jan 2022 08:07:14 -0500 Received: from lists.gnu.org ([209.51.188.17]:44440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n4N3P-0002gC-O4 for submit@debbugs.gnu.org; Mon, 03 Jan 2022 08:07:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4N3P-000081-KM for bug-guix@gnu.org; Mon, 03 Jan 2022 08:07:11 -0500 Received: from smtprelay03.ispgateway.de ([80.67.31.41]:5651) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4N3N-0001OL-Sy for bug-guix@gnu.org; Mon, 03 Jan 2022 08:07:11 -0500 Received: from [92.195.30.39] (helo=milk) by smtprelay03.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1n4N3V-0006wr-Og; Mon, 03 Jan 2022 14:07:17 +0100 From: Simon Streit Gcc: nnfolder+archive:sent.2022-01 Date: Mon, 03 Jan 2022 14:07:04 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Df-Sender: bGlzdHNAbmV0cGFuaWMub3Jn Received-SPF: none client-ip=80.67.31.41; envelope-from=simon@netpanic.org; helo=smtprelay03.ispgateway.de X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" 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=1641215302; 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:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post; bh=CvRgu2s+Pv71BRlJqBffvru+LSSY6QGxSpc0eWER0Ro=; b=H8tQeRJ0nffdhwKAirqOJhxwPGrt+sUEbph0LgV1aoO48AgkKZzXAOsgsHA1dpw5Px+RKZ VcJzrRnbfK88GFFS0Hi96C5IMj5M39XKoI/iOTd2xW84cc8gBxoyXJP+3JqQSTcujPI54w 5jbL/L5S9PPIBcyWu/rD3IYfX1XKXFYykYruMcd8M9aWbbXknMFzlLOKCdzsopohpNuTZu ILlnni9Jt/ETKdK0Ay/eXmniyX5EXhk6B/9E/slxro501gSLwCGPRFeV3rshgbp2z+z0Cv rHz56CrK+Tg3GzF/es5jgp1CwToKSduBEq8ZETLKmY6WV7CO08ErwG438wdQoA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641215302; a=rsa-sha256; cv=none; b=VlqUugNJMRfCCzYnDzmAwczfiPuX39KmuovJ6eRRSbjlSccztpQHo1m6gf/rt/AfB78XcO 4KN7iojVxFKojuhuqi+AlI+eb2AmiSGCjlYVf5tiBIrdexI1oQMvgR2h6dVGnKATAA5a77 xPTj3MhoU++WE971rDovv8HJkh0I6ELkOKShS8jRPdigW1atNrwCe6ZM8ErZZ2oCBIWufP EsCqAJF4nGIlrAhMD1EJGEg2zpvRFPNbWorMz9Z/9zz7NDrPZG3vaGEo74jgRbIG/5tujj c+3rbP8T1+5i6Bj+67NWXoNoBCVYurAHVoSr9CM2utA6ofPTmuy65QNDvKS/7w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.29 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 5B8F538187 X-Spam-Score: -3.29 X-Migadu-Scanner: scn1.migadu.com X-TUID: Ze1yDanHkXZS --=-=-= Content-Type: text/plain While experimenting with Samba, I noticed that some tools, especially samba-tools will not run, and crash: --8<---------------cut here---------------start------------->8--- root@motor ~# samba-tool Traceback (most recent call last): File "/run/current-system/profile/bin/samba-tool", line 33, in from samba.netcmd.main import cmd_sambatool File "/gnu/store/78baaab8085rd5xnfrpdkxdf07zkmin9-samba-mod-4.13.14/lib/python3.9/site-packages/samba/__init__.py", line 29, in import samba.param ModuleNotFoundError: No module named 'talloc' --8<---------------cut here---------------end--------------->8--- Doing more testing, other tools appear to not find the libraries they need too. The combination is as folows: - samba-tool, fails when tdb missing. - samba-gpupdate Idem. - samba_dnsupdate requires dnspython, but fails when talloc missing. - samba_downgrade_db" fails when tdb missing. - samba_kcc Idem. - samba_spnupdate" Idem. - samba_upgradedns" dns not found when talloc missing. I prepared a small patch to wrap up the inputs appropriately. I hope it is acceptable that they are all combined in one wrap procedure. dnspython was added as a new input too. Kind regards Simon --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-samba-Use-PYTHONPATH.patch >From 201dc8e01fa4484e24b3e088ab6a4211e9839f33 Mon Sep 17 00:00:00 2001 From: Simon Streit Date: Mon, 3 Jan 2022 13:08:23 +0100 Subject: [PATCH] gnu: samba: Use PYTHONPATH. * gnu/packages/samba.scm (samba): Use PYTHONPATH in 'wrap-program phase.. --- gnu/packages/samba.scm | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm index bb5b402eee..33a39eb3be 100644 --- a/gnu/packages/samba.scm +++ b/gnu/packages/samba.scm @@ -235,7 +235,30 @@ (define-public samba (lambda _ (substitute* "dynconfig/wscript" (("bld\\.INSTALL_DIR.*") "")) - #t))) + #t)) + (add-after 'install 'wrap-program + ;; Some samba tools selectively fail to find talloc, tdb + ;; and dnspython. + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (string-append (assoc-ref outputs "out"))) + (talloc (string-append (assoc-ref inputs "talloc") + "/lib/python3.9/site-packages")) + (tdb (string-append (assoc-ref inputs "tdb") + "/lib/python3.9/site-packages")) + (python-dnspython (string-append + (assoc-ref inputs "python-dnspython") + "/lib/python3.9/site-packages"))) + (for-each + (lambda (bin) + (wrap-program (string-append out bin) + `("PYTHONPATH" prefix (,talloc ,tdb ,python-dnspython)))) + '("/bin/samba-tool" + "/sbin/samba-gpupdate" + "/sbin/samba_dnsupdate" + "/sbin/samba_downgrade_db" + "/sbin/samba_kcc" + "/sbin/samba_spnupdate" + "/sbin/samba_upgradedns")))))) ;; FIXME: The test suite seemingly hangs after failing to provision the ;; test environment. #:tests? #f)) @@ -258,7 +281,8 @@ (define-public samba python popt readline - tdb)) + tdb + python-dnspython)) (propagated-inputs ;; In Requires or Requires.private of pkg-config files. (list ldb talloc tevent)) -- 2.34.0 --=-=-=--