guix_mirror_bot pushed a commit to branch core-packages-team
in repository guix.

commit c4966b73f0cc9d00c43479d80f3e05f7d7109cad
Author: Yelninei <[email protected]>
AuthorDate: Mon Jun 8 06:45:36 2026 +0000

    gnu: glibc: Enable pt_chown on the Hurd.
    
    Fixes https://issues.guix.gnu.org/59616.
    
    * gnu/packages/base.scm (glibc)[#:configure-flags]: Enable pt_chown.
    [#:phases]: Add phase to patch path to suid pt_chown.
    
    Change-Id: Iaf6b851874cd94ffd6df269fc56c97910a5dee0d
---
 gnu/packages/base.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 5474a910dab..3d4598a123c 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1031,11 +1031,23 @@ the store.")
              ;; 'device_write_inband' among other things.  Ignore them.
              #$@(if (target-hurd?)
                     #~("--disable-werror")
+                    #~())
+             #$@(if (target-hurd?)
+                    #~("--enable-pt_chown") ; build pt_chown for 
openpty/grantpt
                     #~()))
 
      #:tests? #f ; XXX
      #:phases
      #~(modify-phases %standard-phases
+         #$@(if (target-hurd?)
+                #~((add-before 'configure 'pt-chown
+                     (lambda _
+                       (substitute* "login/Makefile"
+                         (("-o root") ""))
+                       ;; Adjust the file name to the 'pt_chown' setuid 
program.
+                       (substitute* "sysdeps/generic/pty-private.h"
+                         (("LIBEXECDIR") "\"/run/privileged/bin\"")))))
+                #~())
          (add-before 'configure 'pre-configure
            (lambda* (#:key inputs native-inputs #:allow-other-keys)
              (let* ((bin (string-append #$output "/bin"))

Reply via email to