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 QMFOLQ3w4GFuUQEAgWs5BA (envelope-from ) for ; Fri, 14 Jan 2022 04:37: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 mp12.migadu.com with LMTPS id ADb1KQ3w4GEmTwAAauVa8A (envelope-from ) for ; Fri, 14 Jan 2022 04:37: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 2CCAB383A3 for ; Fri, 14 Jan 2022 04:37:49 +0100 (CET) Received: from localhost ([::1]:42438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8DPQ-0002lP-Bq for larch@yhetil.org; Thu, 13 Jan 2022 22:37:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8DOi-0002ax-1e for bug-guix@gnu.org; Thu, 13 Jan 2022 22:37:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42222) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8DOg-0006Dr-Fg for bug-guix@gnu.org; Thu, 13 Jan 2022 22:37:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n8DOg-00024a-BS for bug-guix@gnu.org; Thu, 13 Jan 2022 22:37: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: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 14 Jan 2022 03:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52976 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Simon Streit Received: via spool by 52976-submit@debbugs.gnu.org id=B52976.16421314087943 (code B ref 52976); Fri, 14 Jan 2022 03:37:02 +0000 Received: (at 52976) by debbugs.gnu.org; 14 Jan 2022 03:36:48 +0000 Received: from localhost ([127.0.0.1]:35125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8DOS-000242-Cr for submit@debbugs.gnu.org; Thu, 13 Jan 2022 22:36:48 -0500 Received: from mail-qt1-f173.google.com ([209.85.160.173]:42983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8DOQ-00023m-FW for 52976@debbugs.gnu.org; Thu, 13 Jan 2022 22:36:47 -0500 Received: by mail-qt1-f173.google.com with SMTP id y17so9521209qtx.9 for <52976@debbugs.gnu.org>; Thu, 13 Jan 2022 19:36:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=hW2uYboQWE3TgSWRCLdtRI/8M2Ge7fuo9OclCPQhrp4=; b=gyKj0dJH44lh66YTVuQg1k4HHZL0h7yy16MlUujlNAIYKcHDTS+8aX/jDtJH4LxDnK CxeX8eFiW1RtOJs65rK+QCxKw93V2A0IFdsDyypobfHhhuWA2+eP6l8K4RSdqZOJvnZr 3cvTgoLgLVYRj0HSqk2G3ru3I9mSkpEROR4h6YTkO5NzYgNqbBYeQlqm8X57TphZhH4y NKHurLUOAOJiT8R4j7DZU9/58iXDJmQa6p+AE7WaZtNk1L1UeLPFSJwIfKlVj4ophGCx JCsL5UYgDUAuaB4GeYq0C/qUd8LjFWeiUiuID/aDbqxgcbKDto2mwxJN8XptyR1VLRVF Zzpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=hW2uYboQWE3TgSWRCLdtRI/8M2Ge7fuo9OclCPQhrp4=; b=IFa+5vZKBmCWxRvLyDfWtV1gl7jNEmm3FUsFw3lDNZpH/6HkVosYAx0/v9B+/tzCxo t2OPVWUE789YJwvg04yOlykguxtxWE1NP0D4JqEYQesafDQO5hKFQ9laaJATnMMiizjU OoDock5az52dWIvzPYAUrQg21prWwBz/eDd77NL0cbUHzQbJ8iryu7vo0S6N+Iy8WdJp wzJZ4EHjP58fHZEs8WTK4jMcPPObEk+w0piEfAFsZfYU3GmYgg015gGBQ3oxrYxK5PQA yjkvLIQ5R5iVug4OssQxVHgctMUb40om4vl1fe2mnUbdqagkWfa89dUMX91AuKadzKKo yT7w== X-Gm-Message-State: AOAM530F41u+K75dP7gS9ARWifRF7MJ5KF/p5lN0UD3rjktCXEOfi6Jz xXmrSu0aVJIj5GC5l/1AspNJMFq3IpR+rw== X-Google-Smtp-Source: ABdhPJyFV2ifkD0bN6x2MnOmR2CBYsicC+AmK2MByPWMedBz9CbOYsjQGSMQcBKDTIle6gbOszlzyQ== X-Received: by 2002:a05:622a:174b:: with SMTP id l11mr6400670qtk.182.1642131400617; Thu, 13 Jan 2022 19:36:40 -0800 (PST) Received: from hurd (dsl-152-155.b2b2c.ca. [66.158.152.155]) by smtp.gmail.com with ESMTPSA id g6sm712209qtp.44.2022.01.13.19.36.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jan 2022 19:36:40 -0800 (PST) From: Maxim Cournoyer References: Date: Thu, 13 Jan 2022 22:36:39 -0500 In-Reply-To: (Simon Streit's message of "Mon, 03 Jan 2022 14:07:04 +0100") Message-ID: <8735lrxa2g.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: , Cc: 52976@debbugs.gnu.org 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=1642131469; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=hW2uYboQWE3TgSWRCLdtRI/8M2Ge7fuo9OclCPQhrp4=; b=LU3fvCBf6Yx4ylSc8DHyOGn/Z/otkdbioGsdXc5anYidHM82lycxNZ84wsPB/OcnRWdFeM 8vNrVJYaxxD5jsR0bYPQEHRbGMrKdREVkJmSqpxhWXq63AFIKhqpbU5V//suD9DS025qxq xOMqMyS1jNj8BsdkZYZC7bee7zxS87gY58VrOPqc6yeDfkYspQNezyXuFbRiyOl/MWuDDD cAr8qK0CDXGBVtbjuoZj9lb/e3yhdDhoxxVyeJnhzOkw5WL5foXq/Y/fj5wr8Dan5vPlLJ ktnnsLZfrpsv1MYr8fhsJZOEl7N1QbCl6lL1Q0UNxsc3hZH7Sw6cx+ipg8sC0A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642131469; a=rsa-sha256; cv=none; b=rq9ypvKFTmkaOPBTBtGSh8aYamMyxpQk/ms8rtDv8hed9Pb3kSTHHxIBPlgdKlPLp2nB1q Kv10ZklrEzgO0p1SaLXv0pfYNqbhGdbYnFppv4cBXCCfJq8P35bnjhr5zGRn6rP4LdGonJ nW9+qQ/Wt5yxDKBVTyAuZ190vdVS7UPFt2t+ETnYRvALz43mVJ58k+M1t35a6Mf6xizTG6 crf3WOiIMixtRKX46tV/KI+WeJl5nAt3fYXtymTHOYq/fhDe87WQQ546+CmfbrSgVlm4ns t8V6jLDT0tzha7gqfE1Q3GgcUkZT0Tuaqh1ujGgkxqKEXCZvembDX5RnT2qu9g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=gyKj0dJH; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: -2.02 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=gyKj0dJH; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: 2CCAB383A3 X-Spam-Score: -2.02 X-Migadu-Scanner: scn1.migadu.com X-TUID: WW/EEZPhacFy Hello Simon, Simon Streit writes: > While experimenting with Samba, I noticed that some tools, especially > samba-tools will not run, and crash: > > 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' > > 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. Thanks for testing samba! I've updated samba recently on the version-1.4.0 branch; but the problem probably remains (I've only tested smbd and smbclient). It's now at version 4.15.3 and I nedded to add the python-cryptogaphy, python-dnspython, python-markdown and python-pyasn1 as native inputs. Based on your findings it probably should be moved to an input. >>>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)) Trailing #t are no longer needed. > + (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"))) We shouldn't hard code Python versions in the paths as it'd be too prone to break. You could probably make good use of the recently introduced search-input-directory procedure here :-). > + (for-each > + (lambda (bin) > + (wrap-program (string-append out bin) > + `("PYTHONPATH" prefix (,talloc ,tdb ,python-dnspython)))) Make sure to run 'guix lint', it'll probably suggest to add minimal-bash as an input because of the use of wrap-program. > + '("/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)) Otherwise it LGTM. Could you try to rebase this patch on top of the version-1.4.0 branch? Otherwise, wait a few days and it should be merged into master. Thank you! Maxim