GNU bug report logs - #54266
[PATCH] samba: wrap scripts with GUIX_PYTHONPATH

Previous Next

Package: guix-patches;

Reported by: fesoj000 <fesoj000 <at> gmail.com>

Date: Sat, 5 Mar 2022 17:27:03 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: fesoj000 <fesoj000 <at> gmail.com>
To: 54266 <at> debbugs.gnu.org
Subject: [bug#54266] [PATCH] samba: wrap scripts with GUIX_PYTHONPATH
Date: Sat, 5 Mar 2022 13:06:04 +0100
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





This bug report was last modified 2 years and 151 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.