[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
18/52: gnu: cross-libc: Add patch to allow 'gettyent' reading store file
From: |
guix-commits |
Subject: |
18/52: gnu: cross-libc: Add patch to allow 'gettyent' reading store file names. |
Date: |
Thu, 9 Apr 2020 13:29:06 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit f10d0e7addf347f164af0cfe4fa8fad31ea65dc0
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Sun Apr 5 16:45:18 2020 +0200
gnu: cross-libc: Add patch to allow 'gettyent' reading store file names.
* gnu/packages/patches/glibc-hurd-gettyent.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/cross-base.scm (cross-libc): Add it in 'patch-libc/hurd'
phase
when 'hurd-target?' is true.
---
gnu/local.mk | 1 +
gnu/packages/cross-base.scm | 15 +++++++++---
gnu/packages/patches/glibc-hurd-gettyent.patch | 34 ++++++++++++++++++++++++++
3 files changed, 46 insertions(+), 4 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index e8409a9..56bac23 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -976,6 +976,7 @@ dist_patch_DATA =
\
%D%/packages/patches/glibc-hidden-visibility-ldconfig.patch \
%D%/packages/patches/glibc-hurd-clock_gettime_monotonic.patch \
%D%/packages/patches/glibc-hurd-clock_t_centiseconds.patch \
+ %D%/packages/patches/glibc-hurd-gettyent.patch \
%D%/packages/patches/glibc-hurd-mach-print.patch \
%D%/packages/patches/glibc-hurd-magic-pid.patch \
%D%/packages/patches/glibc-hurd-signal-sa-siginfo.patch \
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 820a0bc..1161d02 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -523,11 +523,15 @@ and the cross tool chain."
(string-append out "/lib/libc.so.0.3"
" libmachuser.so
libhurduser.so"))))
#t))
+ ;; TODO: move to glibc in the next rebuild cycle
(add-after 'unpack 'patch-libc/hurd
(lambda* (#:key inputs #:allow-other-keys)
- (let ((patch (assoc-ref inputs
- "hurd-mach-print.patch")))
- (invoke "patch" "-p1" "--force" "-i" patch)))))
+ (for-each
+ (lambda (name)
+ (let ((patch (assoc-ref inputs name)))
+ (invoke "patch" "-p1" "--force" "-i" patch)))
+ '("hurd-mach-print.patch"
+ "hurd-gettyent.patch")))))
'())))))
;; Shadow the native "kernel-headers" because glibc's recipe expects
the
@@ -544,8 +548,11 @@ and the cross tool chain."
`(("cross-mig"
,@(assoc-ref (package-native-inputs xheaders)
"cross-mig"))
+ ;; TODO: move to glibc in the next rebuild
cycle
("hurd-mach-print.patch"
- ,@(search-patches
"glibc-hurd-mach-print.patch")))
+ ,@(search-patches
"glibc-hurd-mach-print.patch"))
+ ("hurd-gettyent.patch"
+ ,@(search-patches
"glibc-hurd-gettyent.patch")))
'())
,@(package-inputs libc) ;FIXME: static-bash
,@(package-native-inputs libc))))))
diff --git a/gnu/packages/patches/glibc-hurd-gettyent.patch
b/gnu/packages/patches/glibc-hurd-gettyent.patch
new file mode 100644
index 0000000..721a8d4
--- /dev/null
+++ b/gnu/packages/patches/glibc-hurd-gettyent.patch
@@ -0,0 +1,34 @@
+From d6d2caef3e44d0713bb6625f697a1ec615abae70 Mon Sep 17 00:00:00 2001
+From: "Jan (janneke) Nieuwenhuizen" <address@hidden>
+Date: Sun, 5 Apr 2020 16:29:54 +0200
+Subject: [PATCH 4/4] misc: Choose a longer arbitrary line length.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This allows running specifying a `getty' in the GNU Guix store.
+
+* misc/getttyent.c (MAXLINELENGTH): Use 512 (instead of 100) as
+another "great" arbitrary limit.
+
+Co-Authored-By: Ludovic Courtès <address@hidden>
+---
+ misc/getttyent.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/misc/getttyent.c b/misc/getttyent.c
+index 92d92b026f..508d296291 100644
+--- a/misc/getttyent.c
++++ b/misc/getttyent.c
+@@ -66,7 +66,7 @@ __getttyent (void)
+ static struct ttyent tty;
+ int c;
+ char *p;
+-#define MAXLINELENGTH 100
++#define MAXLINELENGTH 512
+ static char line[MAXLINELENGTH];
+
+ if (!tf && !__setttyent())
+--
+2.26.0
+
- 12/52: gnu: hurd: Add coreutils to startup scripts., (continued)
- 12/52: gnu: hurd: Add coreutils to startup scripts., guix-commits, 2020/04/09
- 06/52: gnu: cross-libc: Add patch to add 'mach_print' symbol on GNU/Hurd., guix-commits, 2020/04/09
- 14/52: system: hurd: Add "/etc/fstab"., guix-commits, 2020/04/09
- 08/52: DRAFT: Add (gnu system hurd)., guix-commits, 2020/04/09
- 03/52: vm: 'qemu-image' can pass options to the 'mkfs' command., guix-commits, 2020/04/09
- 13/52: gnu: hurd: Add util-linux to startup scripts., guix-commits, 2020/04/09
- 10/52: gnu: hurd: Ensure startup scripts refer to the right programs., guix-commits, 2020/04/09
- 11/52: gnu: guile@3: Disable JIT on GNU/Hurd., guix-commits, 2020/04/09
- 17/52: system: hurd: Add "/etc/passwd"., guix-commits, 2020/04/09
- 15/52: gnu: hurd: Add "hurd/sbin" to PATH., guix-commits, 2020/04/09
- 18/52: gnu: cross-libc: Add patch to allow 'gettyent' reading store file names.,
guix-commits <=
- 20/52: system: hurd: Add "/etc/shadow"., guix-commits, 2020/04/09
- 24/52: vm: Preserve file permissions on /dev., guix-commits, 2020/04/09
- 25/52: linux-boot: 'make-essential-device-nodes' root parameter is optional., guix-commits, 2020/04/09
- 19/52: system: hurd: Add "/bin/sh" symlink., guix-commits, 2020/04/09
- 16/52: system: hurd: Add ttys symlink in "/etc/ttys"., guix-commits, 2020/04/09
- 30/52: vm: Make the device node procedure a parameter., guix-commits, 2020/04/09
- 26/52: gnu: libgcrypt: Fix cross-compilation., guix-commits, 2020/04/09
- 23/52: database: 'reset-timestamps' can optionally preserve permissions., guix-commits, 2020/04/09
- 22/52: system: hurd: Create /etc/{hostname,motd,login} and /root., guix-commits, 2020/04/09
- 29/52: linux-boot: Add 'make-hurd-device-nodes'., guix-commits, 2020/04/09