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.master
parent
ad3bbeadb4
commit
1c4268e414
|
@ -977,6 +977,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/glibc-hidden-visibility-ldconfig.patch \
|
%D%/packages/patches/glibc-hidden-visibility-ldconfig.patch \
|
||||||
%D%/packages/patches/glibc-hurd-clock_gettime_monotonic.patch \
|
%D%/packages/patches/glibc-hurd-clock_gettime_monotonic.patch \
|
||||||
%D%/packages/patches/glibc-hurd-clock_t_centiseconds.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-mach-print.patch \
|
||||||
%D%/packages/patches/glibc-hurd-magic-pid.patch \
|
%D%/packages/patches/glibc-hurd-magic-pid.patch \
|
||||||
%D%/packages/patches/glibc-hurd-signal-sa-siginfo.patch \
|
%D%/packages/patches/glibc-hurd-signal-sa-siginfo.patch \
|
||||||
|
|
|
@ -522,11 +522,15 @@ and the cross tool chain."
|
||||||
(string-append out "/lib/libc.so.0.3"
|
(string-append out "/lib/libc.so.0.3"
|
||||||
" libmachuser.so libhurduser.so"))))
|
" libmachuser.so libhurduser.so"))))
|
||||||
#t))
|
#t))
|
||||||
|
;; TODO: move to glibc in the next rebuild cycle
|
||||||
(add-after 'unpack 'patch-libc/hurd
|
(add-after 'unpack 'patch-libc/hurd
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let ((patch (assoc-ref inputs
|
(for-each
|
||||||
"hurd-mach-print.patch")))
|
(lambda (name)
|
||||||
(invoke "patch" "-p1" "--force" "-i" patch)))))
|
(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
|
;; Shadow the native "kernel-headers" because glibc's recipe expects the
|
||||||
|
@ -543,8 +547,11 @@ and the cross tool chain."
|
||||||
`(("cross-mig"
|
`(("cross-mig"
|
||||||
,@(assoc-ref (package-native-inputs xheaders)
|
,@(assoc-ref (package-native-inputs xheaders)
|
||||||
"cross-mig"))
|
"cross-mig"))
|
||||||
|
;; TODO: move to glibc in the next rebuild cycle
|
||||||
("hurd-mach-print.patch"
|
("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-inputs libc) ;FIXME: static-bash
|
||||||
,@(package-native-inputs libc))))))
|
,@(package-native-inputs libc))))))
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
From d6d2caef3e44d0713bb6625f697a1ec615abae70 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
|
||||||
|
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 <ludo@gnu.org>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
Reference in New Issue