GNU bug report logs - #41734
[PATCH] gnu: sudo: Separate Python output.

Previous Next

Package: guix-patches;

Reported by: Mathieu Othacehe <m.othacehe <at> gmail.com>

Date: Sat, 6 Jun 2020 09:01:01 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <m.othacehe <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41734 in the body.
You can then email your comments to 41734 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#41734; Package guix-patches. (Sat, 06 Jun 2020 09:01:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mathieu Othacehe <m.othacehe <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 06 Jun 2020 09:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <m.othacehe <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Mathieu Othacehe <othacehe <at> gnu.org>
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





Information forwarded to guix-patches <at> gnu.org:
bug#41734; Package guix-patches. (Sat, 06 Jun 2020 09:21:01 GMT) Full text and rfc822 format available.

Message #8 received at 41734 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Mathieu Othacehe <m.othacehe <at> gmail.com>
Cc: 41734 <at> debbugs.gnu.org
Subject: Re: [bug#41734] [PATCH] gnu: sudo: Separate Python output.
Date: Sat, 06 Jun 2020 11:20:34 +0200
[Message part 1 (text/plain, inline)]
Mathieu,

Mathieu Othacehe 写道:
> * gnu/packages/admin.scm (sudo)[arguments]: Add a 
> 'separate-python-output
> phase.

Missing [outputs] entry.

> WDYT?

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.

Thanks,

T G-R
[signature.asc (application/pgp-signature, inline)]

Reply sent to Mathieu Othacehe <m.othacehe <at> gmail.com>:
You have taken responsibility. (Mon, 08 Jun 2020 08:57:01 GMT) Full text and rfc822 format available.

Notification sent to Mathieu Othacehe <m.othacehe <at> gmail.com>:
bug acknowledged by developer. (Mon, 08 Jun 2020 08:57:01 GMT) Full text and rfc822 format available.

Message #13 received at 41734-done <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <m.othacehe <at> gmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 41734-done <at> debbugs.gnu.org
Subject: Re: [bug#41734] [PATCH] gnu: sudo: Separate Python output.
Date: Mon, 08 Jun 2020 10:56:21 +0200
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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 06 Jul 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 288 days ago.

Previous Next


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