emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41734: closed ([PATCH] gnu: sudo: Separate Python output.)


From: GNU bug Tracking System
Subject: bug#41734: closed ([PATCH] gnu: sudo: Separate Python output.)
Date: Mon, 08 Jun 2020 08:57:01 +0000

Your message dated Mon, 08 Jun 2020 10:56:21 +0200
with message-id <87v9k2aqbu.fsf@gmail.com>
and subject line Re: [bug#41734] [PATCH] gnu: sudo: Separate Python output.
has caused the debbugs.gnu.org bug report #41734,
regarding [PATCH] gnu: sudo: Separate Python output.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
41734: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41734
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] gnu: sudo: Separate Python output. Date: Sat, 6 Jun 2020 11:00:14 +0200
The Python plugin of "sudo" drag the Python interpreter to the closure of
Guix System. Put it in a separate output.

* gnu/packages/admin.scm (sudo)[arguments]: Add a 'separate-python-output
phase.
---
Hello,

Here's a patch to remove Python from the Guix Sytem closure. As Python
cross-compilation is broken, the "python" output cannot be populated when
cross-compiling. This is not great. An alternative would be not to provide
"python" output when cross-compiling but that requires to turn "output" into a
thunk field, and I been advised not to do that (for performance reasons) in
the past.

WDYT?

Thanks,

Mathieu

 gnu/packages/admin.scm | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 77981e520a..9d9d70c88d 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1375,6 +1375,7 @@ system administrator.")
                   (delete-file-recursively "lib/zlib")
                   #t))))
     (build-system gnu-build-system)
+    (outputs (list "out" "python"))
     (arguments
      `(#:configure-flags
        (list (string-append "--docdir=" (assoc-ref %outputs "out")
@@ -1432,7 +1433,23 @@ system administrator.")
              (substitute* "plugins/sudoers/Makefile.in"
                (("^pre-install:" match)
                 (string-append match "\ndisabled-" match)))
-             #t)))
+             #t))
+         (add-after 'install 'separate-python-output
+           (lambda* (#:key target outputs #:allow-other-keys)
+             (let ((out        (assoc-ref outputs "out"))
+                   (out:python (assoc-ref outputs "python")))
+               ;; Python cross-compilation is not working.
+               (if target
+                   (mkdir-p (string-append out:python "/empty"))
+                   (for-each
+                    (lambda (file)
+                      (let ((old (string-append out "/" file))
+                            (new (string-append out:python "/" file)))
+                        (mkdir-p (dirname new))
+                        (rename-file old new)))
+                    (list "libexec/sudo/python_plugin.so"
+                          "libexec/sudo/python_plugin.la")))
+               #t))))
 
        ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but
        ;; the chroot's /etc/passwd doesn't have it.  Turn off the tests.
-- 
2.26.2




--- End Message ---
--- Begin Message --- Subject: Re: [bug#41734] [PATCH] gnu: sudo: Separate Python output. Date: Mon, 08 Jun 2020 10:56:21 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
Hey Tobias,

> I like it!  In fact I suggest dropping the cross-compilation comment.  IMO
> this doesn't need to be reverted or reconsidered even when that's fixed.

Fixed and pushed, thanks for having a look!

Mathieu


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]