[PATCH core-updates 00/15] Update Hurd and fix build failures

  • Done
  • quality assurance status badge
Details
2 participants
  • Josselin Poiret
  • Ludovic Courtès
Owner
unassigned
Submitted by
Josselin Poiret
Severity
normal
J
J
Josselin Poiret wrote on 20 Mar 2023 23:07
(address . guix-patches@gnu.org)(name . Josselin Poiret)(address . dev@jpoiret.xyz)
cover.1679349992.git.dev@jpoiret.xyz
Hello everyone,

Someone convinced me to have a look at Hurd on core-updates, since it was not
building. The reason was a newer libc, as well as a newer gcc which turned
warnings into errors. I figured the best way to resolve this would be to update
our Hurd packages, but it's not as simple as it sounds!

gnumach, mig, hurd and glibc are quite coupled, and even though they have git
tags now, it doesn't mean those tags actually build! I had to pick some tag
from August for Hurd, since anything newer would require some patches for glibc,
and also pick gnumach and mig versions around that time. We also need some
patches for glibc (only when cross-building) and gcc (for cross and native).
For the latter, I added some kludge to only modify the derivation if we're
building for the Hurd, so that it doesn't cause rebuilds. I think it works
fine, but please do tell me if it still causes rebuilds elsewhere.

I've also tried cleaning up the packages, so that building Hurd could be
possible on non-x86 architectures. We had quite a lot of hacks, like building a
32-bit mig that we would then run to generate headers. Now, we should be using
proper cross tools everywhere, even mig.

I've fixed a couple of things as well so that I could build the basic disk image
using `guix system image -t hurd-raw gnu/system/examples/bare-hurd.tmpl` (fixes
to u-boot and opensbi will be sent separately, needed for qemu-minimal). It
boots up to early userspace, but then the image is unable to set the passive
translators for /servers/exec and /servers/socket/1, the setxattr call fails
with ENOTSUP. I guess this will be left as an exercise for the reader...

Best,

Josselin Poiret (15):
gnu: glibc/fix-for-hurd-cross: Add new variant.
gnu-build-system: Sneak fixed glibc when cross-building for Hurd.
gcc-11: Patch libstdc++ libpthread issue for Hurd only.
cross-base: Factor out cross-mig.
cross-base: Add cross arguments to hurd derivatives.
cross-base: Removed useless inputs to xhurd-core-headers.
mig: Update to 1.8+git20220827.
gnumach: Update to 1.8+git20220827.
hurd: Update to 91a51672ff4cfe1f1a0712b4c542ded3081c825b.
hurd: Remove useless glibc/hurd-headers input.
gnumach, hurd-headers, hurd: Switch to using cross-mig.
hurd: Update DDE and use libdde_linux26.
mig/32-bit: Remove.
system: hurd: Use shepherd-0.8 in the package list.
system: pam: Only add linux-pam reference if on Linux.

gnu/local.mk | 10 +-
gnu/packages/base.scm | 13 +-
gnu/packages/commencement.scm | 10 +-
gnu/packages/cross-base.scm | 128 ++-
gnu/packages/gcc.scm | 32 +
gnu/packages/hurd.scm | 294 +++---
.../gcc-11-libstdc++-hurd-libpthread.patch | 62 ++
...-hurd-add-freestanding-for-configure.patch | 87 ++
...bc-hurd-add-freestanding-to-cppflags.patch | 72 ++
...ng-const_mach_port_name_array_t-type.patch | 32 +
...rd-add-without-rump-configure-option.patch | 82 ++
gnu/packages/patches/hurd-cross.patch | 33 -
...f-read-write-and-readables-methods-2.patch | 155 +++
...-of-read-write-and-readables-methods.patch | 891 ++++++++++++++++++
gnu/packages/patches/hurd-xattr.patch | 53 --
...ig-generate-cpu.h-with-ffreestanding.patch | 37 +
gnu/system/hurd.scm | 2 +-
gnu/system/pam.scm | 16 +-
guix/build-system/gnu.scm | 48 +-
19 files changed, 1760 insertions(+), 297 deletions(-)
create mode 100644 gnu/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch
create mode 100644 gnu/packages/patches/glibc-hurd-add-freestanding-for-configure.patch
create mode 100644 gnu/packages/patches/glibc-hurd-add-freestanding-to-cppflags.patch
create mode 100644 gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch
create mode 100644 gnu/packages/patches/hurd-add-without-rump-configure-option.patch
delete mode 100644 gnu/packages/patches/hurd-cross.patch
create mode 100644 gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch
create mode 100644 gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.patch
delete mode 100644 gnu/packages/patches/hurd-xattr.patch
create mode 100644 gnu/packages/patches/mig-generate-cpu.h-with-ffreestanding.patch


base-commit: bfe569e84b539c505e1e432d8ceea91e1481e904
--
2.39.2
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 01/15] gnu: glibc/fix-for-hurd-cross: Add new variant.
6a027350c8639d0c52cdda781abb9f7d304f64ed.1679349992.git.dev@jpoiret.xyz
* gnu/packages/base.scm (glibc/fix-for-hurd-cross): New variable.
(glibc/hurd-headers): Inherit it.
* gnu/packages/patches/glibc-hurd-add-freestanding-for-configure.patch:
* gnu/packages/patches/glibc-hurd-add-freestanding-to-cppflags.patch: New files
* gnu/local.mk (dist_patch_DATA): Register patches.
---
gnu/local.mk | 2 +
gnu/packages/base.scm | 13 ++-
...-hurd-add-freestanding-for-configure.patch | 87 +++++++++++++++++++
...bc-hurd-add-freestanding-to-cppflags.patch | 72 +++++++++++++++
4 files changed, 173 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/glibc-hurd-add-freestanding-for-configure.patch
create mode 100644 gnu/packages/patches/glibc-hurd-add-freestanding-to-cppflags.patch

Toggle diff (211 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index c7a37814d9..0b2c8538c4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1226,6 +1226,8 @@ dist_patch_DATA = \
%D%/packages/patches/glibc-cross-objdump.patch \
%D%/packages/patches/glibc-dl-cache.patch \
%D%/packages/patches/glibc-hidden-visibility-ldconfig.patch \
+ %D%/packages/patches/glibc-hurd-add-freestanding-to-cppflags.patch \
+ %D%/packages/patches/glibc-hurd-add-freestanding-for-configure.patch \
%D%/packages/patches/glibc-hurd-clock_gettime_monotonic.patch \
%D%/packages/patches/glibc-2.31-hurd-clock_gettime_monotonic.patch \
%D%/packages/patches/glibc-hurd-clock_t_centiseconds.patch \
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 041f16b4fc..ffb3f8ac52 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1376,8 +1376,19 @@ (define-public which
command.")
(license gpl3+))) ; some files are under GPLv2+
+;; We need this for now because otherwise the configure phase fails. This
+;; will be fixed with glibc 2.37.
+(define-public glibc/fix-for-hurd-cross
+ (package/inherit glibc
+ (source
+ (origin
+ (inherit (package-source glibc))
+ (patches (append (origin-patches (package-source glibc))
+ (search-patches "glibc-hurd-add-freestanding-for-configure.patch"
+ "glibc-hurd-add-freestanding-to-cppflags.patch")))))))
+
(define-public glibc/hurd-headers
- (package (inherit glibc)
+ (package (inherit glibc/fix-for-hurd-cross)
(name "glibc-hurd-headers")
(outputs '("out"))
(propagated-inputs (list gnumach-headers hurd-headers))
diff --git a/gnu/packages/patches/glibc-hurd-add-freestanding-for-configure.patch b/gnu/packages/patches/glibc-hurd-add-freestanding-for-configure.patch
new file mode 100644
index 0000000000..4b5346f012
--- /dev/null
+++ b/gnu/packages/patches/glibc-hurd-add-freestanding-for-configure.patch
@@ -0,0 +1,87 @@
+From 8b8c768e3c701ed1993789bb46acb8a12c7a93df Mon Sep 17 00:00:00 2001
+From: Flavio Cruz <flaviocruz@gmail.com>
+Date: Sun, 18 Dec 2022 19:46:15 -0500
+Subject: [PATCH] Force use of -ffreestanding when checking for gnumach headers
+
+Without this ./configure assumes that we are in a fully hosted
+environment, which might not be the case. After this patch, we can rely on
+the freestanding header files provided by GCC such as stdint.h.
+Message-Id: <Y5+0V9osFc/zXMq0@mars>
+---
+ sysdeps/mach/configure | 8 +++++++-
+ sysdeps/mach/configure.ac | 6 ++++++
+ 2 files changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/sysdeps/mach/configure b/sysdeps/mach/configure
+index 739f1028a46..36f556a6639 100644
+--- a/sysdeps/mach/configure
++++ b/sysdeps/mach/configure
+@@ -133,6 +133,8 @@ if test -n "$sysheaders"; then
+ fi
+
+ ### Sanity checks for Mach header installation
++old_CFLAGS=$CFLAGS
++CFLAGS="$CFLAGS -ffreestanding"
+
+
+ ac_fn_c_check_header_preproc "$LINENO" "mach/mach_types.h" "ac_cv_header_mach_mach_types_h"
+@@ -143,6 +145,7 @@ else
+ fi
+
+
++CFLAGS=$old_CFLAGS
+ ac_fn_c_check_header_preproc "$LINENO" "mach/mach_types.defs" "ac_cv_header_mach_mach_types_defs"
+ if test "x$ac_cv_header_mach_mach_types_defs" = xyes; then :
+
+@@ -216,7 +219,9 @@ $as_echo_n "checking for creation_time in task_basic_info... " >&6; }
+ if ${libc_cv_mach_task_creation_time+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++ old_CFLAGS=$CFLAGS
++CFLAGS="$CFLAGS -ffreestanding"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+ #include <mach/task_info.h>
+ int
+@@ -242,6 +247,7 @@ $as_echo "$libc_cv_mach_task_creation_time" >&6; }
+ if test $libc_cv_mach_task_creation_time = no; then
+ as_fn_error $? "you need Mach headers supporting task_info.creation_time" "$LINENO" 5
+ fi
++CFLAGS=$old_CFLAGS
+
+ mach_interface_list=
+ for ifc in mach mach4 gnumach \
+diff --git a/sysdeps/mach/configure.ac b/sysdeps/mach/configure.ac
+index 61b00d66b10..5816c3d4ad4 100644
+--- a/sysdeps/mach/configure.ac
++++ b/sysdeps/mach/configure.ac
+@@ -12,8 +12,11 @@ if test -n "$sysheaders"; then
+ fi
+
+ ### Sanity checks for Mach header installation
++old_CFLAGS=$CFLAGS
++CFLAGS="$CFLAGS -ffreestanding"
+ AC_CHECK_HEADER(mach/mach_types.h,,
+ [AC_MSG_ERROR([cannot find Mach headers])], -)
++CFLAGS=$old_CFLAGS
+ AC_CHECK_HEADER(mach/mach_types.defs,, [dnl
+ AC_MSG_ERROR([cannot find Mach .defs files])], -)
+
+@@ -42,6 +45,8 @@ dnl The creation_time field is a GNU Mach addition the other variants lack.
+ dnl
+ AC_CACHE_CHECK(for creation_time in task_basic_info,
+ libc_cv_mach_task_creation_time, [dnl
++old_CFLAGS=$CFLAGS
++CFLAGS="$CFLAGS -ffreestanding"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mach/task_info.h>]], [[
+ extern struct task_basic_info *i;
+ long s = i->creation_time.seconds;
+@@ -49,6 +54,7 @@ long s = i->creation_time.seconds;
+ if test $libc_cv_mach_task_creation_time = no; then
+ AC_MSG_ERROR([you need Mach headers supporting task_info.creation_time])
+ fi
++CFLAGS=$old_CFLAGS
+
+ dnl
+ dnl The Darwin variant no longer has <mach/mach.defs>
diff --git a/gnu/packages/patches/glibc-hurd-add-freestanding-to-cppflags.patch b/gnu/packages/patches/glibc-hurd-add-freestanding-to-cppflags.patch
new file mode 100644
index 0000000000..14ed3f2a78
--- /dev/null
+++ b/gnu/packages/patches/glibc-hurd-add-freestanding-to-cppflags.patch
@@ -0,0 +1,72 @@
+From 7685630b98ca2a3f5de86eadf130993e6cf998a0 Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Mon, 19 Dec 2022 02:34:55 +0100
+Subject: [PATCH] mach: Fix passing -ffreestanding when checking for gnumach
+ headers
+
+8b8c768e3c70 ("Force use of -ffreestanding when checking for gnumach
+headers") was passing -ffreestanding to CFLAGS only, but headers checks are
+performed with the preprocessor, so we rather need to pass it to CPPFLAGS.
+---
+ sysdeps/mach/configure | 9 +++------
+ sysdeps/mach/configure.ac | 9 +++------
+ 2 files changed, 6 insertions(+), 12 deletions(-)
+
+diff --git a/sysdeps/mach/configure b/sysdeps/mach/configure
+index 36f556a663..ba6371cd3f 100644
+--- a/sysdeps/mach/configure
++++ b/sysdeps/mach/configure
+@@ -127,14 +127,13 @@ fi
+ config_vars="$config_vars
+ MIG = $MIG"
+
++OLD_CPPFLAGS=$CPPFLAGS
+ if test -n "$sysheaders"; then
+- OLD_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
+ fi
+
+ ### Sanity checks for Mach header installation
+-old_CFLAGS=$CFLAGS
+-CFLAGS="$CFLAGS -ffreestanding"
++CPPFLAGS="$CPPFLAGS -ffreestanding"
+
+
+ ac_fn_c_check_header_preproc "$LINENO" "mach/mach_types.h" "ac_cv_header_mach_mach_types_h"
+@@ -527,6 +526,4 @@ if test $hurd_cv_mig_retcode = yes; then
+
+ fi
+
+-if test -n "$sysheaders"; then
+- CPPFLAGS=$OLD_CPPFLAGS
+-fi
++CPPFLAGS=$OLD_CPPFLAGS
+diff --git a/sysdeps/mach/configure.ac b/sysdeps/mach/configure.ac
+index 5816c3d4ad..900e5445c5 100644
+--- a/sysdeps/mach/configure.ac
++++ b/sysdeps/mach/configure.ac
+@@ -6,14 +6,13 @@ if test "x$MIG" = xMISSING; then
+ fi
+ LIBC_CONFIG_VAR([MIG], [$MIG])
+
++OLD_CPPFLAGS=$CPPFLAGS
+ if test -n "$sysheaders"; then
+- OLD_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
+ fi
+
+ ### Sanity checks for Mach header installation
+-old_CFLAGS=$CFLAGS
+-CFLAGS="$CFLAGS -ffreestanding"
++CPPFLAGS="$CPPFLAGS -ffreestanding"
+ AC_CHECK_HEADER(mach/mach_types.h,,
+ [AC_MSG_ERROR([cannot find Mach headers])], -)
+ CFLAGS=$old_CFLAGS
+@@ -136,6 +135,4 @@ fi])
+
+ hurd_MIG_RETCODE
+
+-if test -n "$sysheaders"; then
+- CPPFLAGS=$OLD_CPPFLAGS
+-fi
++CPPFLAGS=$OLD_CPPFLAGS
--
2.39.2
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 02/15] gnu-build-system: Sneak fixed glibc when cross-building for Hurd.
7ff5ecb1b11b068bb68a0fd3d0e1b4ade986b08b.1679349992.git.dev@jpoiret.xyz
* guix/build-system/gnu.scm (standard-cross-packages): Do it.
---
guix/build-system/gnu.scm | 48 +++++++++++++++++++++++----------------
1 file changed, 28 insertions(+), 20 deletions(-)

Toggle diff (65 lines)
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index 3308302472..98cf272726 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -442,30 +442,38 @@ (define standard-cross-packages
(mlambda (target kind)
"Return the list of name/package tuples to cross-build for TARGET. KIND
is one of `host' or `target'."
- (let* ((cross (resolve-interface '(gnu packages cross-base)))
- (gcc (module-ref cross 'cross-gcc))
- (binutils (module-ref cross 'cross-binutils))
- (libc (module-ref cross 'cross-libc)))
+ (let* ((cross (resolve-interface '(gnu packages cross-base)))
+ (cross-gcc (module-ref cross 'cross-gcc))
+ (cross-binutils (module-ref cross 'cross-binutils))
+ (cross-libc (module-ref cross 'cross-libc))
+ (libc (match target
+ ;; FIXME Remove this once the fix is in our glibc
+ ("i586-pc-gnu"
+ (cross-libc target
+ #:libc
+ (module-ref
+ (resolve-interface '(gnu packages base))
+ 'glibc/fix-for-hurd-cross)))
+ (_ (cross-libc target)))))
(case kind
((host)
;; Cross-GCC appears once here, so that it's in $PATH...
- `(("cross-gcc" ,(gcc target
- #:xbinutils (binutils target)
- #:libc (libc target)))
- ("cross-binutils" ,(binutils target))))
+ `(("cross-gcc" ,(cross-gcc target
+ #:xbinutils (cross-binutils target)
+ #:libc libc))
+ ("cross-binutils" ,(cross-binutils target))))
((target)
- (let ((libc (libc target)))
- ;; ... and once here, so that libstdc++ & co. are in
- ;; CROSS_CPLUS_INCLUDE_PATH, etc.
- `(("cross-gcc" ,(gcc target
- #:xbinutils (binutils target)
- #:libc libc))
- ("cross-libc" ,libc)
-
- ;; MinGW's libc doesn't have a "static" output.
- ,@(if (member "static" (package-outputs libc))
- `(("cross-libc:static" ,libc "static"))
- '()))))))))
+ ;; ... and once here, so that libstdc++ & co. are in
+ ;; CROSS_CPLUS_INCLUDE_PATH, etc.
+ `(("cross-gcc" ,(cross-gcc target
+ #:xbinutils (cross-binutils target)
+ #:libc libc))
+ ("cross-libc" ,libc)
+
+ ;; MinGW's libc doesn't have a "static" output.
+ ,@(if (member "static" (package-outputs libc))
+ `(("cross-libc:static" ,libc "static"))
+ '())))))))
(define* (gnu-cross-build name
#:key
--
2.39.2
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 03/15] gcc-11: Patch libstdc++ libpthread issue for Hurd only.
479a095a315dc959fc63e26c24d7cb8843b947be.1679349992.git.dev@jpoiret.xyz
* gnu/packages/gcc.scm (gcc-11): Add ugly conditional patching, to avoid a
world-rebuild.
* gnu/packages/cross-base.scm (cross-gcc):
* gnu/packages/commencement.scm (gcc-boot0): Pass the patch there as well.
* gnu/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/commencement.scm | 10 ++-
gnu/packages/cross-base.scm | 21 ++++---
gnu/packages/gcc.scm | 32 ++++++++++
.../gcc-11-libstdc++-hurd-libpthread.patch | 62 +++++++++++++++++++
5 files changed, 118 insertions(+), 8 deletions(-)
create mode 100644 gnu/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch

Toggle diff (179 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 0b2c8538c4..d0f89ace6c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1181,6 +1181,7 @@ dist_patch_DATA = \
%D%/packages/patches/gcc-9-strmov-store-file-names.patch \
%D%/packages/patches/gcc-12-strmov-store-file-names.patch \
%D%/packages/patches/gcc-10-cross-environment-variables.patch \
+ %D%/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch \
%D%/packages/patches/gcc-12-cross-environment-variables.patch \
%D%/packages/patches/gcc-10-tree-sra-union-handling.patch \
%D%/packages/patches/gcolor3-update-libportal-usage.patch \
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 24cffc4252..2d947ea911 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2452,7 +2452,15 @@ (define gcc-boot0
,@(alist-delete "libc" (%boot0-inputs))))
;; No need for the native-inputs to build the documentation at this stage.
- (native-inputs `())))
+ (native-inputs
+ (cond
+ ;; FIXME This patch is not in the origin because it is conditionally
+ ;; applied, to avoid rebuilds at the end of the core-updates cycle.
+ ;; Move to gcc-11's origin ASAP.
+ ((target-hurd? (or (%current-target-system)
+ (%current-system)))
+ (list patch-boot0 (search-patch "gcc-11-libstdc++-hurd-libpthread.patch")))
+ (#t '())))))
(define perl-boot0
(package
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 2959616af6..30bf1c6bd0 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -319,14 +319,21 @@ (define* (cross-gcc target
("libc" ,libc))
`(,@inputs
("mingw-source" ,(package-source mingw-w64)))))
- (libc
+ (else
`(,@inputs
- ("libc" ,libc)
- ("libc:static" ,libc "static")
- ("xkernel-headers" ;the target headers
- ,@(assoc-ref (package-propagated-inputs libc)
- "kernel-headers"))))
- (else inputs)))))
+ ;; FIXME Kludge to only apply the patch for hurd to avoid rebuilds
+ ;; remove ASAP, along with the accompanying changes.
+ ,@(if (target-hurd? target)
+ `(("patch" ,patch)
+ ("_" ,(search-patch "gcc-11-libstdc++-hurd-libpthread.patch")))
+ '())
+ ,@(if libc
+ `(("libc" ,libc)
+ ("libc:static" ,libc "static")
+ ("xkernel-headers" ;the target headers
+ ,@(assoc-ref (package-propagated-inputs libc)
+ "kernel-headers")))
+ '())))))))
(inputs '())
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index ce6e3e7a83..55d0f7a162 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -707,6 +707,38 @@ (define-public gcc-11
(modules '((guix build utils)))
(snippet gcc-canadian-cross-objdump-snippet)))
+ (arguments
+ (cond
+ ;; FIXME We conditionally apply a patch passed in native-inputs, to avoid
+ ;; rebuilds at the end of the core-updates cycle. Move this to a regular
+ ;; patch ASAP.
+ ((target-hurd? (or (%current-target-system)
+ (%current-system)))
+ (substitute-keyword-arguments (package-arguments gcc-8)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'patch-libpthread-hurd
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (define patch (search-input-file (or native-inputs inputs) "/bin/patch"))
+ (define the-patch
+ (cdr
+ (car
+ (filter (lambda (input)
+ (string-suffix? "gcc-11-libstdc++-hurd-libpthread.patch"
+ (cdr input)))
+ (or native-inputs inputs)))))
+ (invoke patch "--verbose"
+ "--force" "--no-backup-if-mismatch"
+ "-p1" "--input" the-patch)))))))
+ (#t (package-arguments gcc-8))))
+ (native-inputs
+ (cond
+ ((target-hurd? (or (%current-target-system)
+ (%current-system)))
+ (modify-inputs (package-native-inputs gcc-8)
+ (prepend (module-ref (resolve-interface '(gnu packages base)) 'patch)
+ (search-patch "gcc-11-libstdc++-hurd-libpthread.patch"))))
+ (#t (package-native-inputs gcc-8))))
(properties
`((compiler-cpu-architectures
("aarch64" ,@%gcc-11-aarch64-micro-architectures)
diff --git a/gnu/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch b/gnu/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch
new file mode 100644
index 0000000000..1845583ac5
--- /dev/null
+++ b/gnu/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch
@@ -0,0 +1,62 @@
+From f0065f207cf19cd960b33d961472c6d69514336f Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault@gnu.org>
+Date: Fri, 7 Oct 2022 22:45:06 +0200
+Subject: [PATCH] libstdc++: Mark pieces of gnu-linux/os_support.h
+ linux-specific
+
+This is notably needed because in glibc 2.34, the move of pthread functions
+into libc.so happened for Linux only, not GNU/Hurd.
+
+The pthread_self() function can also always be used fine as it is on
+GNU/Hurd.
+
+libstdc++-v3/ChangeLog:
+
+ * config/os/gnu-linux/os_defines.h [!__linux__]
+ (_GLIBCXX_NATIVE_THREAD_ID, _GLIBCXX_GTHREAD_USE_WEAK): Do not define.
+
+Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
+---
+ libstdc++-v3/config/os/gnu-linux/os_defines.h | 22 +++++++++++--------
+ 1 file changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/libstdc++-v3/config/os/gnu-linux/os_defines.h b/libstdc++-v3/config/os/gnu-linux/os_defines.h
+index 3064f8d908ac2..87317031fcd71 100644
+--- a/libstdc++-v3/config/os/gnu-linux/os_defines.h
++++ b/libstdc++-v3/config/os/gnu-linux/os_defines.h
+@@ -60,22 +60,26 @@
+ # define _GLIBCXX_HAVE_FLOAT128_MATH 1
+ #endif
+
+-#if __GLIBC_PREREQ(2, 27)
++#ifdef __linux__
++// The following libpthread properties only apply to Linux, not GNU/Hurd.
++
++# if __GLIBC_PREREQ(2, 27)
+ // Since glibc 2.27 pthread_self() is usable without linking to libpthread.
+-# define _GLIBCXX_NATIVE_THREAD_ID pthread_self()
+-#else
++# define _GLIBCXX_NATIVE_THREAD_ID pthread_self()
++# else
+ // Before then it was in libc.so.6 but not libc.a, and always returns 0,
+ // which breaks the invariant this_thread::get_id() != thread::id{}.
+ // So only use it if we know the libpthread version is available.
+ // Otherwise use (__gthread_t)1 as the ID of the main (and only) thread.
+-# define _GLIBCXX_NATIVE_THREAD_ID \
+- (__gthread_active_p() ? __gthread_self() : (__gthread_t)1)
+-#endif
++# define _GLIBCXX_NATIVE_THREAD_ID \
++ (__gthread_active_p() ? __gthread_self() : (__gthread_t)1)
++# endif
+
+-#if __GLIBC_PREREQ(2, 34)
++# if __GLIBC_PREREQ(2, 34)
+ // Since glibc 2.34 all pthreads functions are usable without linking to
+ // libpthread.
+-# define _GLIBCXX_GTHREAD_USE_WEAK 0
+-#endif
++# define _GLIBCXX_GTHREAD_USE_WEAK 0
++# endif
++#endif // __linux__
+
+ #endif
--
2.39.2
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 04/15] cross-base: Factor out cross-mig.
71f4570e88dab2b16a501c08b0df523d5c1e41ca.1679349992.git.dev@jpoiret.xyz
* gnu/packages/cross-base.scm (cross-mig): New exported procedure.
(cross-gnumach-headers): New procedure.
(cross-kernel-headers*): Factor them out.
(cross-libc*): Use them there.
---
gnu/packages/cross-base.scm | 87 ++++++++++++++++++++++---------------
1 file changed, 53 insertions(+), 34 deletions(-)

Toggle diff (123 lines)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 30bf1c6bd0..5c9ae86d52 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -46,6 +46,7 @@ (define-module (gnu packages cross-base)
#:export (cross-binutils
cross-libc
cross-gcc
+ cross-mig
cross-kernel-headers))
(define-syntax %xgcc
@@ -372,6 +373,52 @@ (define* (cross-kernel-headers/deprecated target
#:xgcc xgcc
#:xbinutils xbinutils))
+(define* (cross-gnumach-headers target
+ #:key
+ (xgcc (cross-gcc target))
+ (xbinutils (cross-binutils target)))
+ (package
+ (inherit gnumach-headers)
+ (name (string-append (package-name gnumach-headers)
+ "-cross-" target))
+ (native-inputs
+ (modify-inputs (package-native-inputs gnumach-headers)
+ (prepend xgcc xbinutils)))))
+
+(define* (cross-mig target
+ #:key
+ (xgcc (cross-gcc target))
+ (xbinutils (cross-binutils target)))
+ "Return a cross-mig for TARGET, where TARGET is a GNU triplet. Use XGCC as
+the base compiler. Use XBINUTILS as the associated cross-Binutils."
+ (define xgnumach-headers
+ (cross-gnumach-headers target
+ #:xgcc xgcc
+ #:xbinutils xbinutils))
+ (package
+ (inherit mig)
+ (name (string-append "mig-cross"))
+ (arguments
+ (substitute-keyword-arguments (package-arguments mig)
+ ((#:configure-flags flags #~'())
+ #~(list #$(string-append "--target=" target)))
+ ((#:tests? _ #f)
+ #f)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-before 'configure 'set-cross-headers-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((mach #+xgnumach-headers)
+ (cpath (string-append mach "/include")))
+ (for-each (lambda (variable)
+ (setenv variable cpath))
+ '#$%gcc-cross-include-paths))))))))
+ (propagated-inputs
+ (list xgnumach-headers))
+ (native-inputs
+ (modify-inputs (package-native-inputs mig)
+ (prepend xgcc xbinutils)))))
+
(define* (cross-kernel-headers* target
#:key
(linux-headers linux-libre-headers)
@@ -406,40 +453,11 @@ (define xlinux-headers
("cross-binutils" ,xbinutils)
,@(package-native-inputs linux-headers)))))
- (define xgnumach-headers-name
- (string-append (package-name gnumach-headers) "-cross-" target))
+ (define xmig
+ (cross-mig target #:xgcc xgcc #:xbinutils xbinutils))
(define xgnumach-headers
- (package
- (inherit gnumach-headers)
- (name xgnumach-headers-name)
- (native-inputs
- (modify-inputs (package-native-inputs gnumach-headers)
- (prepend xgcc xbinutils)))))
-
- (define xmig
- (package
- (inherit mig)
- (name (string-append "mig-cross"))
- (arguments
- (substitute-keyword-arguments (package-arguments mig)
- ((#:configure-flags flags #~'())
- #~(list #$(string-append "--target=" target)))
- ((#:tests? _ #f)
- #f)
- ((#:phases phases #~%standard-phases)
- #~(modify-phases #$phases
- (add-before 'configure 'set-cross-headers-path
- (lambda* (#:key inputs #:allow-other-keys)
- (let* ((mach #+(this-package-input xgnumach-headers-name))
- (cpath (string-append mach "/include")))
- (for-each (lambda (variable)
- (setenv variable cpath))
- '#$%gcc-cross-include-paths))))))))
- (propagated-inputs (list xgnumach-headers))
- (native-inputs
- (modify-inputs (package-native-inputs mig)
- (prepend xgcc xbinutils)))))
+ (cross-gnumach-headers target #:xgcc xgcc #:xbinutils xbinutils))
(define xhurd-headers
(package
@@ -616,8 +634,9 @@ (define* (cross-libc* target
("cross-binutils" ,xbinutils)
,@(if (target-hurd? target)
`(("cross-mig"
- ,@(assoc-ref (package-native-inputs xheaders)
- "cross-mig")))
+ ,(cross-mig target
+ #:xgcc xgcc
+ #:xbinutils xbinutils)))
'())
,@(package-inputs libc) ;FIXME: static-bash
,@(package-native-inputs libc))))))
--
2.39.2
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 05/15] cross-base: Add cross arguments to hurd derivatives.
98e07033c57ba2adcbb347b6c0081e78e745dd98.1679349992.git.dev@jpoiret.xyz
* gnu/packages/cross-base.scm (cross-kernel-headers*): Add --build and --host to
xhurd-headers and xhurd-minimal.
---
gnu/packages/cross-base.scm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

Toggle diff (36 lines)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 5c9ae86d52..217b83d077 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -465,10 +465,17 @@ (define xhurd-headers
(name (string-append (package-name hurd-headers)
"-cross-" target))
+ (arguments
+ (substitute-keyword-arguments (package-arguments hurd-headers)
+ ((#:configure-flags flags)
+ `(cons* ,(string-append "--build=" (%current-system))
+ ,(string-append "--host=" target)
+ ,flags))))
+
(native-inputs `(("cross-gcc" ,xgcc)
("cross-binutils" ,xbinutils)
("cross-mig" ,xmig)
- ,@(alist-delete "mig"(package-native-inputs hurd-headers))))))
+ ,@(alist-delete "mig" (package-native-inputs hurd-headers))))))
(define xglibc/hurd-headers
(package
@@ -513,6 +520,10 @@ (define xhurd-minimal
(guix build utils)
(srfi srfi-26))
,@(package-arguments hurd-minimal))
+ ((#:configure-flags flags)
+ `(cons* ,(string-append "--build=" (%current-system))
+ ,(string-append "--host=" target)
+ ,flags))
((#:phases phases)
`(modify-phases ,phases
(add-before 'configure 'set-cross-headers-path
--
2.39.2
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 06/15] cross-base: Removed useless inputs to xhurd-core-headers.
a0e592e2c34ce81623e660c907e98b17afa33165.1679349992.git.dev@jpoiret.xyz
* gnu/packages/cross-base.scm (cross-kernel-headers*): Remove them.
---
gnu/packages/cross-base.scm | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

Toggle diff (20 lines)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 217b83d077..b50ba879ff 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -549,12 +549,7 @@ (define xhurd-core-headers
(inputs `(("gnumach-headers" ,xgnumach-headers)
("hurd-headers" ,xhurd-headers)
- ("hurd-minimal" ,xhurd-minimal)))
-
- (native-inputs `(("cross-gcc" ,xgcc)
- ("cross-binutils" ,xbinutils)
- ("cross-mig" ,xmig)
- ,@(package-native-inputs hurd-core-headers)))))
+ ("hurd-minimal" ,xhurd-minimal)))))
(match target
((or "i586-pc-gnu" "i586-gnu") xhurd-core-headers)
--
2.39.2
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 07/15] mig: Update to 1.8+git20220827.
fd02d1938a57c266f7276c19479b0bcbe5cb82bd.1679349992.git.dev@jpoiret.xyz
* gnu/packages/hurd.scm (mig): Do it. Also add patch so that it builds
properly.

* gnu/packages/patches/mig-generate-cpu.h-with-ffreestanding.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/hurd.scm | 19 ++++++----
...ig-generate-cpu.h-with-ffreestanding.patch | 37 +++++++++++++++++++
3 files changed, 49 insertions(+), 8 deletions(-)
create mode 100644 gnu/packages/patches/mig-generate-cpu.h-with-ffreestanding.patch

Toggle diff (92 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index d0f89ace6c..43537d1d36 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1544,6 +1544,7 @@ dist_patch_DATA = \
%D%/packages/patches/mia-vtk9.patch \
%D%/packages/patches/mia-vtk92.patch \
%D%/packages/patches/mia-vtk-version.patch \
+ %D%/packages/patches/mig-generate-cpu.h-with-ffreestanding.patch \
%D%/packages/patches/mingw-w64-6.0.0-gcc.patch \
%D%/packages/patches/mingw-w64-dlltool-temp-prefix.patch \
%D%/packages/patches/mingw-w64-reproducible-gendef.patch \
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 7f02e6141d..8c33087dc5 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -111,19 +111,22 @@ (define-public gnumach-headers
(define-public mig
(package
(name "mig")
- (version "1.8")
+ (version "1.8+git20220827")
(source
(origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/mig/mig-"
- version ".tar.gz"))
- (sha256
- (base32
- "1gyda8sq6b379nx01hkpbd85lz39irdvz2b9wbr63gicicx8i706"))))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/hurd/mig.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name "mig" version))
+ (sha256
+ (base32
+ "14fx23056wzc87v5kp01xpfvhvn533xij0naimqriz0vi1z75nxy"))
+ (patches (search-patches "mig-generate-cpu.h-with-ffreestanding.patch"))))
(build-system gnu-build-system)
;; Flex is needed both at build and run time.
(inputs (list gnumach-headers flex))
- (native-inputs (list flex bison))
+ (native-inputs (list flex bison autoconf automake))
(arguments
(list #:tests? #f
#:phases
diff --git a/gnu/packages/patches/mig-generate-cpu.h-with-ffreestanding.patch b/gnu/packages/patches/mig-generate-cpu.h-with-ffreestanding.patch
new file mode 100644
index 0000000000..6656d41f13
--- /dev/null
+++ b/gnu/packages/patches/mig-generate-cpu.h-with-ffreestanding.patch
@@ -0,0 +1,37 @@
+From 73fbf2504ae606dda81372701a67dad6fee0865e Mon Sep 17 00:00:00 2001
+Message-Id: <73fbf2504ae606dda81372701a67dad6fee0865e.1678744619.git.dev@jpoiret.xyz>
+From: Josselin Poiret <dev@jpoiret.xyz>
+Date: Sun, 18 Dec 2022 17:38:23 -0500
+Subject: [PATCH] Generate cpu.h with -ffreestanding
+
+From: Flavio Cruz <flaviocruz@gmail.com>
+
+During a system bootstrap, it is preferable that we don't require a full
+hosted environment. For all other cases, we also do not need libc since
+mach headers are self contained.
+Message-Id: <Y5+WXzOwGkyvcDI0@mars>
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 918efa1..35c91bc 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -27,7 +27,7 @@ SUFFIXES = .h .symo .symc .sym
+ .sym.symc:
+ $(AWK_V) $(AWK) -f $(srcdir)/gensym.awk $< > $@
+ .symc.symo:
+- $(AM_V_CC) $(TARGET_CC) -S $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -x c -o $@ $<
++ $(AM_V_CC) $(TARGET_CC) -S $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -ffreestanding -x c -o $@ $<
+ .symo.h:
+ $(AM_V_GEN) sed -e '/^[^*].*$$/d' -e 's/^[*]/#define/' -e 's/mAgIc[^-0-9]*//' \
+ $< > $@
+
+base-commit: 68b3d8fe3a9595b7a5cb2bb6bc5973ba26139704
+prerequisite-patch-id: 4987b46e52d924507662a60d7dd6fe92a8d28de5
+prerequisite-patch-id: 35c41cc86edb975795b5779d89702245306289d1
+prerequisite-patch-id: ccfb452f7cd419515c13991e03633b0868d46e5e
+--
+2.39.1
+
--
2.39.2
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 08/15] gnumach: Update to 1.8+git20220827.
96301ae81e0c67b596b911307c4b448806f70d48.1679349992.git.dev@jpoiret.xyz
* gnu/packages/hurd.scm (gnumach-headers): Do it.

* gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/hurd.scm | 77 +++++++++----------
...ng-const_mach_port_name_array_t-type.patch | 32 ++++++++
3 files changed, 71 insertions(+), 39 deletions(-)
create mode 100644 gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch

Toggle diff (142 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 43537d1d36..c24649935d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1253,6 +1253,7 @@ dist_patch_DATA = \
%D%/packages/patches/gnome-settings-daemon-gc.patch \
%D%/packages/patches/gnome-session-support-elogind.patch \
%D%/packages/patches/gnome-tweaks-search-paths.patch \
+ %D%/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch \
%D%/packages/patches/gnupg-default-pinentry.patch \
%D%/packages/patches/gnupg-1-build-with-gcc10.patch \
%D%/packages/patches/gnutls-skip-trust-store-test.patch \
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 8c33087dc5..89d92afcf8 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -66,47 +66,46 @@ (define (hurd-source-url version)
version ".tar.gz"))
(define-public gnumach-headers
- (let ((commit "097f9cf735ffa1212b828682ad92f0f6c5f1c552")
- (revision "1"))
- (package
- (name "gnumach-headers")
- (version (git-version "1.8" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://git.savannah.gnu.org/git/hurd/gnumach.git")
- (commit commit)))
- (file-name (git-file-name "gnumach" version))
- (sha256
- (base32
- "0q36z7k02bykrld90zaxbhyzxlmwlqqs4divgir6ix38zsp6icqk"))))
- (build-system gnu-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'install
- (lambda _
- (invoke "make" "install-data")))
- (delete 'build))
+ (package
+ (name "gnumach-headers")
+ (version "1.8+git20220827") ;; This is an upstream tag
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/hurd/gnumach.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name "gnumach" version))
+ (sha256
+ (base32
+ "07qlaf8vw029y7xdnhjyiiyn788zjzwmyzj79inz7idpswqsnyhf"))
+ (patches (search-patches "gnumach-add-missing-const_mach_port_name_array_t-type.patch"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (lambda _
+ (invoke "make" "install-data")))
+ (delete 'build))
- ;; GNU Mach supports only IA32 currently, so cheat so that we can at
- ;; least install its headers.
- ,@(if (%current-target-system)
- '()
- ;; See <http://lists.gnu.org/archive/html/bug-hurd/2015-06/msg00042.html>
- ;; <http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00716.html>
- '(#:configure-flags '("--build=i586-pc-gnu"
- "--host=i686-linux-gnu")))
+ ;; GNU Mach supports only IA32 currently, so cheat so that we can at
+ ;; least install its headers.
+ ,@(if (%current-target-system)
+ '()
+ ;; See <http://lists.gnu.org/archive/html/bug-hurd/2015-06/msg00042.html>
+ ;; <http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00716.html>
+ '(#:configure-flags '("--build=i586-pc-gnu"
+ "--host=i686-linux-gnu")))
- #:tests? #f))
- (native-inputs
- (list autoconf automake texinfo-4))
- (home-page "https://www.gnu.org/software/hurd/microkernel/mach/gnumach.html")
- (synopsis "GNU Mach kernel headers")
- (description
- "Headers of the GNU Mach kernel.")
- (license gpl2+))))
+ #:tests? #f))
+ (native-inputs
+ (list autoconf automake texinfo-4))
+ (home-page "https://www.gnu.org/software/hurd/microkernel/mach/gnumach.html")
+ (synopsis "GNU Mach kernel headers")
+ (description
+ "Headers of the GNU Mach kernel.")
+ (license gpl2+)))
(define-public mig
(package
diff --git a/gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch b/gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch
new file mode 100644
index 0000000000..73c99ade23
--- /dev/null
+++ b/gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch
@@ -0,0 +1,32 @@
+From 17335d49a3c9e866a81abc051420d73a59d669bf Mon Sep 17 00:00:00 2001
+Message-Id: <17335d49a3c9e866a81abc051420d73a59d669bf.1678745341.git.dev@jpoiret.xyz>
+From: Josselin Poiret <dev@jpoiret.xyz>
+Date: Sun, 28 Aug 2022 01:17:34 +0200
+Subject: [PATCH] Add missing const_mach_port_name_array_t type
+
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+---
+ include/mach/port.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/mach/port.h b/include/mach/port.h
+index 3c226f6c..d25eb0b4 100644
+--- a/include/mach/port.h
++++ b/include/mach/port.h
+@@ -43,6 +43,7 @@
+ */
+ typedef unsigned int mach_port_name_t;
+ typedef mach_port_name_t *mach_port_name_array_t;
++typedef const mach_port_name_t *const_mach_port_name_array_t;
+
+ /*
+ * A port is represented
+
+base-commit: 3e1702a65fb3caf50c8d09a1b383b0056a5efc82
+prerequisite-patch-id: 4688654277aef235ccd1797a72dce27d52b04616
+prerequisite-patch-id: 8f1e7dd6429c15cc8ed1d411dba0a75b6e745236
+prerequisite-patch-id: 605553ee086473ad9bc24e59c91d49a12dbf8631
+--
+2.39.1
+
--
2.39.2
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 10/15] hurd: Remove useless glibc/hurd-headers input.
bdc03697219ee888bad1e004738a856cee41bd56.1679349992.git.dev@jpoiret.xyz
* gnu/packages/hurd.scm (hurd): Do it.
---
gnu/packages/hurd.scm | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 81d787d934..866a9a7ac1 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -509,9 +509,7 @@ (define-public hurd
"CFLAGS=-fcommon")))
(build-system gnu-build-system)
(inputs
- `(("glibc-hurd-headers" ,glibc/hurd-headers)
-
- ("libgcrypt" ,libgcrypt) ;for /hurd/random
+ `(("libgcrypt" ,libgcrypt) ;for /hurd/random
("libdaemon" ,libdaemon) ;for /bin/console --daemonize
("unifont" ,unifont)
("libpciaccess" ,libpciaccess)
--
2.39.2
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 11/15] gnumach, hurd-headers, hurd: Switch to using cross-mig.
dc0398e6b0d66ff7c848be80ca0245917ff1d79b.1679349992.git.dev@jpoiret.xyz
* gnu/packages/hurd.scm (gnumach, hurd-headers, hurd): Switch to cross-mig when
cross-building.
---
gnu/packages/hurd.scm | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)

Toggle diff (55 lines)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 866a9a7ac1..be5eb25fee 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -183,7 +183,13 @@ (define-public hurd-headers
"hurd-fix-types-of-read-write-and-readables-methods-2.patch"))))
(build-system gnu-build-system)
(native-inputs
- (list autoconf automake mig))
+ (list autoconf
+ automake
+ (if (%current-target-system)
+ (let* ((cross-base (resolve-interface '(gnu packages cross-base)))
+ (cross-mig (module-ref cross-base 'cross-mig)))
+ (cross-mig (%current-target-system)))
+ mig)))
(arguments
`(#:phases
(modify-phases %standard-phases
@@ -307,7 +313,15 @@ (define-public gnumach
(invoke "make" "gnumach.gz")
(install-file "gnumach.gz" boot))))))))
(native-inputs
- (list mig perl autoconf automake texinfo-4))
+ (list autoconf
+ automake
+ (if (%current-target-system)
+ (let* ((cross-base (resolve-interface '(gnu packages cross-base)))
+ (cross-mig (module-ref cross-base 'cross-mig)))
+ (cross-mig (%current-target-system)))
+ mig)
+ perl
+ texinfo-4))
(supported-systems (cons "i686-linux" %hurd-systems))
(synopsis "Microkernel of the GNU system")
(description
@@ -527,12 +541,12 @@ (define-public hurd
`(("autoconf" ,autoconf)
("automake" ,automake)
("libgcrypt" ,libgcrypt) ;for 'libgcrypt-config'
- ("pkg-config" ,pkg-config)
("mig" ,(if (%current-target-system)
- ;; XXX: When targeting i586-pc-gnu, we need a 32-bit MiG,
- ;; hence this hack.
- mig/32-bit
+ (let* ((cross-base (resolve-interface '(gnu packages cross-base)))
+ (cross-mig (module-ref cross-base 'cross-mig)))
+ (cross-mig (%current-target-system)))
mig))
+ ("pkg-config" ,pkg-config)
("perl" ,perl)
("texinfo" ,texinfo-4)
("dde-sources" ,dde-sources)))
--
2.39.2
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 11/15] gnumach, hurd: Switch to using cross-mig.
ef5d5ce5ee68f73d7bebc74c6bbe87973a859fca.1679349100.git.dev@jpoiret.xyz
* gnu/packages/hurd.scm (gnumach, hurd): Switch to cross-mig when
cross-building.
---
gnu/packages/hurd.scm | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)

Toggle diff (40 lines)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 2a823f6576..be5eb25fee 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -313,7 +313,15 @@ (define-public gnumach
(invoke "make" "gnumach.gz")
(install-file "gnumach.gz" boot))))))))
(native-inputs
- (list mig perl autoconf automake texinfo-4))
+ (list autoconf
+ automake
+ (if (%current-target-system)
+ (let* ((cross-base (resolve-interface '(gnu packages cross-base)))
+ (cross-mig (module-ref cross-base 'cross-mig)))
+ (cross-mig (%current-target-system)))
+ mig)
+ perl
+ texinfo-4))
(supported-systems (cons "i686-linux" %hurd-systems))
(synopsis "Microkernel of the GNU system")
(description
@@ -533,12 +541,12 @@ (define-public hurd
`(("autoconf" ,autoconf)
("automake" ,automake)
("libgcrypt" ,libgcrypt) ;for 'libgcrypt-config'
- ("pkg-config" ,pkg-config)
("mig" ,(if (%current-target-system)
- ;; XXX: When targeting i586-pc-gnu, we need a 32-bit MiG,
- ;; hence this hack.
- mig/32-bit
+ (let* ((cross-base (resolve-interface '(gnu packages cross-base)))
+ (cross-mig (module-ref cross-base 'cross-mig)))
+ (cross-mig (%current-target-system)))
mig))
+ ("pkg-config" ,pkg-config)
("perl" ,perl)
("texinfo" ,texinfo-4)
("dde-sources" ,dde-sources)))
--
2.39.2
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 13/15] mig/32-bit: Remove.
d56598dbf983781790d77951ae8c5f7b98b6a468.1679349992.git.dev@jpoiret.xyz
* gnu/packages/hurd.scm (mig/32-bit): Remove unneeded variant.
---
gnu/packages/hurd.scm | 11 -----------
1 file changed, 11 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 4f85d10237..ed08418e94 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -150,17 +150,6 @@ (define-public mig
communication.")
(license gpl2+)))
-(define-public mig/32-bit
- ;; When cross-compiling from x86_64-linux to i586-gnu, we need this 32-bit
- ;; native MIG.
- (package
- (inherit mig)
- (arguments
- (substitute-keyword-arguments (package-arguments mig)
- ((#:system _ #f)
- "i686-linux")))
- (properties `((hidden? . #t)))))
-
(define-public hurd-headers
;; This commit is now slightly behind 0.9.git20220818 as this one needs a
;; newer glibc
--
2.39.2
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 12/15] hurd: Update DDE and use libdde_linux26.
e954f34db1a43727c862efc87f140acd8861ced0.1679349992.git.dev@jpoiret.xyz
* gnu/packages/hurd.scm (dde-sources): Update.
(hurd): Build libdde_linux26 and install it.
---
gnu/packages/hurd.scm | 46 +++++++++++++++++++++++++++++++++++--------
1 file changed, 38 insertions(+), 8 deletions(-)

Toggle diff (93 lines)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index be5eb25fee..4f85d10237 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -340,7 +340,7 @@ (define unifont
(define dde-sources
;; This is the current tip of the dde branch
- (let ((commit "ac1c7eb7a8b24b7469bed5365be38a968d59a136"))
+ (let ((commit "ce8810277fa3584eb36ecb23da58394153fabe6f"))
(origin
(method git-fetch)
(uri (git-reference
@@ -348,9 +348,15 @@ (define dde-sources
(commit commit)))
(sha256
(base32
- "1vryinbg75xpydfrv9dbgfnds6knlh8l8bk2rxp32y9dc58z0692"))
+ "0ygk7jm4jmhpvh0zzi5bk638242z7sbcab2i57fkb4y2mmdkjjbw"))
(file-name (git-file-name "dde" commit)))))
+(define %import-from-dde
+ (list "libmachdevdde" "libddekit" "libdde_linux26"))
+
+(define %add-to-hurd-subdirs
+ (list "libmachdevdde" "libddekit"))
+
(define-public hurd
(package
(name "hurd")
@@ -361,17 +367,19 @@ (define-public hurd
(modify-phases %standard-phases
(add-after 'unpack 'prepare-dde
(lambda* (#:key native-inputs inputs #:allow-other-keys)
- (substitute* "Makefile"
- (("libbpf ")
- "libbpf libmachdev libmachdevdde libddekit"))
+ ;; First we import the things we want from dde.
(for-each make-file-writable (find-files "."))
(let ((dde (or (assoc-ref inputs "dde-sources")
(assoc-ref native-inputs "dde-sources"))))
(for-each (lambda (dir)
(copy-recursively
(string-append dde "/" dir ) dir))
- '("libmachdev" "libmachdevdde" "libddekit")))
- #t))
+ '("libmachdevdde" "libddekit" "libdde_linux26")))
+ ;; And we add some as subdirs so that they're built by the main
+ ;; Makefile. libdde_linux26 is built later in its own phase.
+ (substitute* "Makefile"
+ (("libbpf ")
+ "libbpf libmachdevdde libddekit"))))
(add-after 'unpack 'find-tirpc
(lambda* (#:key inputs #:allow-other-keys)
(for-each (lambda (var)
@@ -490,12 +498,34 @@ (define-public hurd
(patch-shebang file path))
(find-files (string-append out "/libexec")))
#t)))
+ (add-after 'build 'build-libdde-linux
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (invoke (string-append (assoc-ref native-inputs "make")
+ "/bin/make")
+ ;; XXX There can be a race condition because subdirs
+ ;; aren't interdependent targets in the Makefile.
+ "-j1" "-C" "libdde_linux26"
+ (string-append "SHELL="
+ (assoc-ref native-inputs "bash")
+ "/bin/bash")
+ (string-append "CC="
+ ,(cc-for-target)))))
(add-after 'install 'install-goodies
- (lambda* (#:key inputs outputs #:allow-other-keys)
+ (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
;; Install additional goodies.
;; TODO: Build & install *.msgids for rpctrace.
(let* ((out (assoc-ref outputs "out"))
(datadir (string-append out "/share/hurd")))
+ ;; Install libdde_linux26.
+ (invoke (string-append (assoc-ref native-inputs "make")
+ "/bin/make")
+ "-C" "libdde_linux26" "install"
+ (string-append "SHELL="
+ (assoc-ref native-inputs "bash")
+ "/bin/bash")
+ (string-append "INSTALLDIR="
+ out
+ "/share/libdde_linux26/build/include"))
;; Install the fancy UTF-8 motd.
(mkdir-p (string-append out "/etc"))
(copy-file "console/motd.UTF8"
--
2.39.2
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 09/15] hurd: Update to 91a51672ff4cfe1f1a0712b4c542ded3081c825b.
5b0e20646232824b4099ab996087a8ed8df9aaee.1679349992.git.dev@jpoiret.xyz
* gnu/packages/hurd.scm (hurd-headers): Do it. Also backport some patches to
make it build, and remove older patches. Also stop pretending we're on
i586-pc-gnu.

(hurd): Remove unneeded patches.

* gnu/packages/patches/hurd-add-without-rump-configure-option.patch:
* gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch:
* gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.patch:
New files.
* gnu/packages/patches/hurd-cross.patch:
* gnu/packages/patches/hurd-xattr.patch: Delete files.
* gnu/local.mk (dist_patch_DATA): Register and unregister them.
---
gnu/local.mk | 5 +-
gnu/packages/hurd.scm | 113 ++-
...rd-add-without-rump-configure-option.patch | 82 ++
gnu/packages/patches/hurd-cross.patch | 33 -
...f-read-write-and-readables-methods-2.patch | 155 +++
...-of-read-write-and-readables-methods.patch | 891 ++++++++++++++++++
gnu/packages/patches/hurd-xattr.patch | 53 --
7 files changed, 1186 insertions(+), 146 deletions(-)
create mode 100644 gnu/packages/patches/hurd-add-without-rump-configure-option.patch
delete mode 100644 gnu/packages/patches/hurd-cross.patch
create mode 100644 gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch
create mode 100644 gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.patch
delete mode 100644 gnu/packages/patches/hurd-xattr.patch

Toggle diff (488 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index c24649935d..058b23c683 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1327,8 +1327,9 @@ dist_patch_DATA = \
%D%/packages/patches/htslib-for-stringtie.patch \
%D%/packages/patches/hubbub-sort-entities.patch \
%D%/packages/patches/hueplusplus-mbedtls.patch \
- %D%/packages/patches/hurd-cross.patch \
- %D%/packages/patches/hurd-xattr.patch \
+ %D%/packages/patches/hurd-add-without-rump-configure-option.patch \
+ %D%/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch \
+ %D%/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.patch \
%D%/packages/patches/hwloc-1-test-btrfs.patch \
%D%/packages/patches/i7z-gcc-10.patch \
%D%/packages/patches/icecat-makeicecat.patch \
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 89d92afcf8..81d787d934 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -162,65 +162,64 @@ (define-public mig/32-bit
(properties `((hidden? . #t)))))
(define-public hurd-headers
- ;; Resort to a post-0.9 snapshot that provides the 'file_utimens' and
- ;; 'file_exec_paths' RPCs that glibc 2.28 expects.
- (let ((revision "1")
- (commit "91a51672ff4cfe1f1a0712b4c542ded3081c825b"))
- (package
- (name "hurd-headers")
- (version (git-version "0.9" revision commit))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://git.savannah.gnu.org/git/hurd/hurd.git")
- (commit commit)))
- (sha256
- (base32
- "16k9wkahz9wasviijz53n6i13nmiwa9fs64ikf1jqh8rl60hw7cz"))
- (file-name (git-file-name name version))))
- (build-system gnu-build-system)
- (native-inputs
- (list mig autoconf automake))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'install
- (lambda _
- (invoke "make" "install-headers" "no_deps=t")))
- (delete 'build))
-
- #:configure-flags '( ;; Pretend we're on GNU/Hurd; 'configure' wants
- ;; that.
- ,@(if (%current-target-system)
- '()
- '("--host=i586-pc-gnu"))
+ ;; This commit is now slightly behind 0.9.git20220818 as this one needs a
+ ;; newer glibc
+ (let ((revision "2")
+ (commit "3ff70531ee672f431dbb0c11f286bfe85dce98fc"))
+ (package
+ (name "hurd-headers")
+ (version (git-version "0.9" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/hurd/hurd.git")
+ (commit commit)))
+ (sha256
+ (base32
+ "1jb9f2h2v4lf6acsji1c12aqg3pixkvjdyb4q6axkd8jp22fdgc0"))
+ (file-name (git-file-name name version))
+ (patches (search-patches "hurd-add-without-rump-configure-option.patch"
+ "hurd-fix-types-of-read-write-and-readables-methods.patch"
+ "hurd-fix-types-of-read-write-and-readables-methods-2.patch"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ (list autoconf automake mig))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (lambda _
+ (invoke "make" "install-headers" "no_deps=t")))
+ (delete 'build))
- ;; Reduce set of dependencies.
- "--without-parted"
- "--disable-ncursesw"
- "--disable-test"
- "--without-libbz2"
- "--without-libcrypt"
- "--without-libz"
- ;; Skip the clnt_create check because it expects
- ;; a working glibc causing a circular dependency.
- "ac_cv_search_clnt_create=no"
+ #:configure-flags '( ;; Reduce set of dependencies.
+ "--without-parted"
+ "--disable-ncursesw"
+ "--disable-test"
+ "--without-libbz2"
+ "--without-libcrypt"
+ "--without-libz"
+ "--without-rump"
+ ;; Skip the clnt_create check because it expects
+ ;; a working glibc causing a circular dependency.
+ "ac_cv_search_clnt_create=no"
- ;; Annihilate the checks for the 'file_exec_paths'
- ;; & co. libc functions to avoid "link tests are
- ;; not allowed after AC_NO_EXECUTABLES" error.
- "ac_cv_func_file_exec_paths=no"
- "ac_cv_func_exec_exec_paths=no"
- "ac_cv_func__hurd_exec_paths=no"
- "ac_cv_func_file_futimens=no")
+ ;; Annihilate the checks for the 'file_exec_paths'
+ ;; & co. libc functions to avoid "link tests are
+ ;; not allowed after AC_NO_EXECUTABLES" error.
+ "ac_cv_func_file_exec_paths=no"
+ "ac_cv_func_exec_exec_paths=no"
+ "ac_cv_func__hurd_exec_paths=no"
+ "ac_cv_func__hurd_libc_proc_init=no"
+ "ac_cv_func_file_futimens=no")
- #:tests? #f))
- (home-page "https://www.gnu.org/software/hurd/hurd.html")
- (synopsis "GNU Hurd headers")
- (description
- "This package provides C headers of the GNU Hurd, used to build the GNU C
+ #:tests? #f))
+ (home-page "https://www.gnu.org/software/hurd/hurd.html")
+ (synopsis "GNU Hurd headers")
+ (description
+ "This package provides C headers of the GNU Hurd, used to build the GNU C
Library and other user programs.")
- (license gpl2+))))
+ (license gpl2+))))
(define-public hurd-minimal
(package (inherit hurd-headers)
@@ -342,9 +341,7 @@ (define-public hurd
(package
(name "hurd")
(version (package-version hurd-headers))
- (source (origin (inherit (package-source hurd-headers))
- (patches (search-patches "hurd-cross.patch"
- "hurd-xattr.patch"))))
+ (source (origin (inherit (package-source hurd-headers))))
(arguments
`(#:phases
(modify-phases %standard-phases
diff --git a/gnu/packages/patches/hurd-add-without-rump-configure-option.patch b/gnu/packages/patches/hurd-add-without-rump-configure-option.patch
new file mode 100644
index 0000000000..14cefdeac1
--- /dev/null
+++ b/gnu/packages/patches/hurd-add-without-rump-configure-option.patch
@@ -0,0 +1,82 @@
+From 80bc1678b7b859decae536e726a3e5870cbe84eb Mon Sep 17 00:00:00 2001
+Message-Id: <80bc1678b7b859decae536e726a3e5870cbe84eb.1678657122.git.dev@jpoiret.xyz>
+In-Reply-To: <c9b816085272dd07ed762c5ae775a994fa77df56.1678657122.git.dev@jpoiret.xyz>
+References: <c9b816085272dd07ed762c5ae775a994fa77df56.1678657122.git.dev@jpoiret.xyz>
+From: Josselin Poiret <dev@jpoiret.xyz>
+Date: Mon, 31 Oct 2022 13:39:28 +0100
+Subject: [PATCH 2/2] Add --without-rump configure option
+
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+To allow cross-builds which cannot use AC_LINK_IFELSE at all.
+---
+ configure.ac | 47 ++++++++++++++++++++++++++---------------------
+ 1 file changed, 26 insertions(+), 21 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0c1bf9b2..849b5fad 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -234,33 +234,38 @@ AS_IF([test "x$with_libz" != xno], [
+ ])
+ AC_SUBST([HAVE_LIBZ])
+
+-# Save
+-oldLIBS="$LIBS"
++AC_ARG_WITH([rump],
++ [AS_HELP_STRING([--without-rump], [disable rump])], , [with_rump=yes])
+
+-LIBS="$oldLIBS -lrump"
+-AC_LINK_IFELSE(
+- [AC_LANG_PROGRAM(
+- [[#include <hurd.h>
++AS_IF([test "x$with_rump" != xno], [
++ # Save
++ oldLIBS="$LIBS"
++
++ LIBS="$oldLIBS -lrump"
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM(
++ [[#include <hurd.h>
+ #define _STANDALONE
+ #include <rump/rump.h>]],
+- [])],
+- [HAVE_LIBRUMP=yes],
+- [HAVE_LIBRUMP=no])
+-AC_SUBST([HAVE_LIBRUMP])
+-
+-LIBS="$oldLIBS -lrumpvfs_nofifofs_pic"
+-AC_LINK_IFELSE(
+- [AC_LANG_PROGRAM(
+- [[#include <hurd.h>
++ [])],
++ [HAVE_LIBRUMP=yes],
++ [HAVE_LIBRUMP=no])
++ AC_SUBST([HAVE_LIBRUMP])
++
++ LIBS="$oldLIBS -lrumpvfs_nofifofs_pic"
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM(
++ [[#include <hurd.h>
+ #define _STANDALONE
+ #include <rump/rump.h>]],
+- [])],
+- [HAVE_LIBRUMP_VFSNOFIFO=yes],
+- [HAVE_LIBRUMP_VFSNOFIFO=no])
+-AC_SUBST([HAVE_LIBRUMP_VFSNOFIFO])
++ [])],
++ [HAVE_LIBRUMP_VFSNOFIFO=yes],
++ [HAVE_LIBRUMP_VFSNOFIFO=no])
++ AC_SUBST([HAVE_LIBRUMP_VFSNOFIFO])
+
+-# Reset
+-LIBS="$oldLIBS"
++ # Reset
++ LIBS="$oldLIBS"
++])
+
+ AC_ARG_ENABLE(boot-store-types,
+ [ --enable-boot-store-types=TYPES...
+--
+2.39.1
+
diff --git a/gnu/packages/patches/hurd-cross.patch b/gnu/packages/patches/hurd-cross.patch
deleted file mode 100644
index cc95dddccc..0000000000
--- a/gnu/packages/patches/hurd-cross.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-This fixes linking libfstest/test-fcntl (and others).
-
-As discussed with upstream: https://lists.gnu.org/archive/html/bug-hurd/2020-03/msg00018.html
-
-From 96a9f67a8685e713f25259c18306797d54cc27a5 Mon Sep 17 00:00:00 2001
-From: Jan Nieuwenhuizen <janneke@gnu.org>
-Date: Sat, 14 Mar 2020 11:28:31 +0100
-Subject: [PATCH] build: Fix cross build on Guix.
-
-As discussed in https://lists.gnu.org/archive/html/bug-hurd/2020-03/msg00018.html.
-
-* Makeconf (lpath): Add -Wl,-rpath-link=<dir> next to -L<dir>.
----
- Makeconf | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/Makeconf b/Makeconf
-index 67f7ab1c..f68ff6e3 100644
---- a/Makeconf
-+++ b/Makeconf
-@@ -325,7 +325,8 @@ _libsubst=${libsubst$(patsubst %,-override,${libsubst-override})}
-
- # Direct the linker where to find shared objects specified in the
- # dependencies of other shared objects it encounters.
--lpath := -L. $(patsubst %,-L%,$(dir $(wildcard ../lib*/lib*.so)))
-+lib_dirs := $(dir $(wildcard ../lib*/lib*.so))
-+lpath := -L. $(lib_dirs:%=-L%) $(lib_dirs:%=-Wl,-rpath-link=%)
-
- # Main rule to link executables
- #
---
-2.24.0
-
diff --git a/gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch b/gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch
new file mode 100644
index 0000000000..dda95fb3d5
--- /dev/null
+++ b/gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch
@@ -0,0 +1,155 @@
+From eb1b2057d839249c955189c2cba8bc37c66d4151 Mon Sep 17 00:00:00 2001
+Message-Id: <eb1b2057d839249c955189c2cba8bc37c66d4151.1678793830.git.dev@jpoiret.xyz>
+In-Reply-To: <f0cacda83293e4d792b8d12665fcb795dc11d6fc.1678793830.git.dev@jpoiret.xyz>
+References: <f0cacda83293e4d792b8d12665fcb795dc11d6fc.1678793830.git.dev@jpoiret.xyz>
+From: Josselin Poiret <dev@jpoiret.xyz>
+Date: Tue, 30 Aug 2022 00:59:59 +0200
+Subject: [PATCH 2/2] Fix types of read write and readables methods
+
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+This completes 5adb4b834b1e
+---
+ hurd/pci.defs | 2 +-
+ lwip/io-ops.c | 6 +++---
+ lwip/port/netif/hurdtunif.c | 6 +++---
+ lwip/socket-ops.c | 4 ++--
+ pci-arbiter/pci-ops.c | 4 ++--
+ storeio/open.c | 2 +-
+ 6 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/hurd/pci.defs b/hurd/pci.defs
+index 23c90334..e258f5ce 100644
+--- a/hurd/pci.defs
++++ b/hurd/pci.defs
+@@ -51,7 +51,7 @@ routine pci_conf_write(
+ */
+ routine pci_get_ndevs(
+ master: pci_t;
+- out ndevs: vm_size_t
++ out ndevs: mach_msg_type_number_t
+ );
+
+ /*
+diff --git a/lwip/io-ops.c b/lwip/io-ops.c
+index 5461d695..6cc724ce 100644
+--- a/lwip/io-ops.c
++++ b/lwip/io-ops.c
+@@ -36,7 +36,7 @@ error_t
+ lwip_S_io_write (struct sock_user *user,
+ const_data_t data,
+ size_t datalen,
+- off_t offset, mach_msg_type_number_t * amount)
++ off_t offset, vm_size_t * amount)
+ {
+ int sent;
+ int sockflags;
+@@ -59,7 +59,7 @@ lwip_S_io_write (struct sock_user *user,
+ error_t
+ lwip_S_io_read (struct sock_user * user,
+ data_t *data,
+- size_t * datalen, off_t offset, mach_msg_type_number_t amount)
++ size_t * datalen, off_t offset, vm_size_t amount)
+ {
+ error_t err;
+ int alloced = 0;
+@@ -112,7 +112,7 @@ lwip_S_io_seek (struct sock_user * user,
+ }
+
+ error_t
+-lwip_S_io_readable (struct sock_user * user, mach_msg_type_number_t * amount)
++lwip_S_io_readable (struct sock_user * user, vm_size_t * amount)
+ {
+ error_t err;
+ if (!user)
+diff --git a/lwip/port/netif/hurdtunif.c b/lwip/port/netif/hurdtunif.c
+index 79a082cf..c976703f 100644
+--- a/lwip/port/netif/hurdtunif.c
++++ b/lwip/port/netif/hurdtunif.c
+@@ -348,7 +348,7 @@ error_t
+ trivfs_S_io_read (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+ data_t *data, mach_msg_type_number_t * data_len,
+- loff_t offs, size_t amount)
++ loff_t offs, vm_size_t amount)
+ {
+ struct hurdtunif *tunif;
+ struct pbuf *p;
+@@ -423,7 +423,7 @@ trivfs_S_io_write (struct trivfs_protid * cred,
+ mach_msg_type_name_t replytype,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+- off_t offset, mach_msg_type_number_t * amount)
++ off_t offset, vm_size_t * amount)
+ {
+ struct netif *netif;
+ struct pbuf *p, *q;
+@@ -482,7 +482,7 @@ trivfs_S_io_write (struct trivfs_protid * cred,
+ kern_return_t
+ trivfs_S_io_readable (struct trivfs_protid * cred,
+ mach_port_t reply, mach_msg_type_name_t replytype,
+- mach_msg_type_number_t * amount)
++ vm_size_t * amount)
+ {
+ struct hurdtunif *tunif;
+
+diff --git a/lwip/socket-ops.c b/lwip/socket-ops.c
+index 5b50f58c..d5e3cb07 100644
+--- a/lwip/socket-ops.c
++++ b/lwip/socket-ops.c
+@@ -342,7 +342,7 @@ lwip_S_socket_send (struct sock_user * user,
+ const mach_port_t * ports,
+ size_t nports,
+ const char *control,
+- size_t controllen, mach_msg_type_number_t * amount)
++ size_t controllen, vm_size_t * amount)
+ {
+ int sent;
+ int sockflags;
+@@ -392,7 +392,7 @@ lwip_S_socket_recv (struct sock_user * user,
+ size_t * nports,
+ char **control,
+ size_t * controllen,
+- int *outflags, mach_msg_type_number_t amount)
++ int *outflags, vm_size_t amount)
+ {
+ error_t err;
+ union { struct sockaddr_storage storage; struct sockaddr sa; } addr;
+diff --git a/pci-arbiter/pci-ops.c b/pci-arbiter/pci-ops.c
+index ef27a3cd..d721f368 100644
+--- a/pci-arbiter/pci-ops.c
++++ b/pci-arbiter/pci-ops.c
+@@ -80,7 +80,7 @@ calculate_ndevs (struct iouser *user)
+ */
+ error_t
+ S_pci_conf_read (struct protid * master, int reg, char **data,
+- size_t * datalen, mach_msg_type_number_t amount)
++ size_t * datalen, vm_size_t amount)
+ {
+ error_t err;
+ pthread_mutex_t *lock;
+@@ -129,7 +129,7 @@ S_pci_conf_read (struct protid * master, int reg, char **data,
+ /* Write `datalen' bytes from `data'. `amount' is updated. */
+ error_t
+ S_pci_conf_write (struct protid * master, int reg, const char *data, size_t datalen,
+- mach_msg_type_number_t * amount)
++ vm_size_t * amount)
+ {
+ error_t err;
+ pthread_mutex_t *lock;
+diff --git a/storeio/open.c b/storeio/open.c
+index f8eb6ce0..74902520 100644
+--- a/storeio/open.c
++++ b/storeio/open.c
+@@ -75,7 +75,7 @@ open_write (struct open *open, off_t offs, const void *buf, size_t len,
+ otherwise the error code is returned. */
+ error_t
+ open_read (struct open *open, off_t offs, vm_size_t amount,
+- void **buf, size_t *len)
++ void **buf, vm_size_t *len)
+ {
+ error_t err;
+ if (offs < 0)
+--
+2.39.1
+
diff --git a/gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.patch b/gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.patch
new file mode 100644
index 0000000000..aebe8d6847
--- /dev/null
+++ b/gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.patch
@@ -0,0 +1,891 @@
+From 5adb4b834b1eba82b7f3eca6324bed0355cae0af Mon Sep 17 00:00:00 2001
+Message-Id: <5adb4b834b1eba82b7f3eca6324bed0355cae0af.1678815112.git.dev@jpoiret.xyz>
+From: Josselin Poiret <dev@jpoiret.xyz>
+Date: Mon, 29 Aug 2022 21:36:17 +0200
+Subject: [PATCH] Fix types of read write and readables methods
+
+From: Etienne Brateau <etienne.brateau@gmail.com>
+
+Message-Id: <20220829193617.13481-1-etienne.brateau@gmail.com>
+---
+ boot/boot.c | 6 +++---
+ console-client/trans.c | 4 ++--
+ libdiskfs/io-read.c | 2 +-
+ libdiskfs/io-readable.c | 2 +-
+ libdiskfs/io-write.c | 2 +-
+ libnetfs/io-read.c | 2 +-
+ libnetfs/io-readable.c | 2 +-
+ libnetfs/io-write.c | 2 +-
+ libpager/data-return.c | 2 +-
+ libstore/nbd.c | 6 +++---
+ libstore/rdwr.c | 4 ++--
+ libtrivfs/io-read.c | 2 +-
+ libtrivfs/io-readable.c | 2 +-
+ libtrivfs/io-write.c | 2 +-
+ mach-defpager/default_pager.c | 4 ++--
+ pfinet/io-ops.c | 10 +++++-----
+ pfinet/socket-ops.c | 16 ++++++++--------
+ pfinet/tunnel.c | 6 +++---
+ pflocal/io.c | 6 +++---
+ pflocal/socket.c | 14 +++++++-------
+ storeio/io.c | 8 ++++----
+ storeio/open.c | 4 ++--
+ storeio/open.h | 6 +++---
+ term/ptyio.c | 4 ++--
+ term/term.h | 4 ++--
+ term/users.c | 14 +++++++-------
+ trans/fifo.c | 10 +++++-----
+ trans/firmlink.c | 4 ++--
+ trans/hello-mt.c | 2 +-
+ trans/hello.c | 2 +-
+ trans/mtab.c | 4 ++--
+ trans/new-fifo.c | 10 +++++-----
+ trans/null.c | 8
This message was truncated. Download the full message here.
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 14/15] system: hurd: Use shepherd-0.8 in the package list.
469a8f4aa07cae461dee2ecefc3ff696cdfaf200.1679349992.git.dev@jpoiret.xyz
* gnu/system/hurd.scm (%base-packages/hurd): Change shepherd to shepherd-0.8,
since the former uses fibers, and thus conflicts with the shepherd-0.8 we use in
the default essential services.
---
gnu/system/hurd.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index 20dc4ae735..558d1ee9e3 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -68,7 +68,7 @@ (define %base-packages/hurd
;; Note: the Shepherd comes before the Hurd, not just because its duty is to
;; shepherd the herd, but also because we want its 'halt' and 'reboot'
;; commands to take precedence.
- (list shepherd hurd bash coreutils file findutils grep sed
+ (list shepherd-0.8 hurd bash coreutils file findutils grep sed
diffutils patch gawk tar gzip bzip2 xz lzip
guile-3.0-latest guile-colorized guile-readline
net-base inetutils less shadow sudo which
--
2.39.2
J
J
Josselin Poiret wrote on 20 Mar 2023 23:10
[PATCH core-updates 15/15] system: pam: Only add linux-pam reference if on Linux.
7b96d7bffdcdc7e3afea5c089200c8542ec12400.1679349992.git.dev@jpoiret.xyz
* gnu/system/pam.scm (pam-root-service-type): Do it.
---
gnu/system/pam.scm | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

Toggle diff (36 lines)
diff --git a/gnu/system/pam.scm b/gnu/system/pam.scm
index b635681642..8408e33c3f 100644
--- a/gnu/system/pam.scm
+++ b/gnu/system/pam.scm
@@ -20,6 +20,7 @@ (define-module (gnu system pam)
#:use-module (guix records)
#:use-module (guix derivations)
#:use-module (guix gexp)
+ #:use-module (guix utils)
#:use-module (gnu services)
#:use-module (gnu system setuid)
#:use-module (ice-9 match)
@@ -377,12 +378,15 @@ (define (extend-configuration initial extensions)
(define pam-root-service-type
(service-type (name 'pam)
(extensions
- (list (service-extension
- setuid-program-service-type
- (lambda (_)
- (list (file-like->setuid-program
- (file-append linux-pam "/sbin/unix_chkpwd")))))
- (service-extension etc-service-type /etc-entry)))
+ (cons (service-extension etc-service-type /etc-entry)
+ (if (target-linux? (or (%current-target-system)
+ (%current-system)))
+ (list (service-extension
+ setuid-program-service-type
+ (lambda (_)
+ (list (file-like->setuid-program
+ (file-append linux-pam "/sbin/unix_chkpwd"))))))
+ '())))
;; Arguments include <pam-service> as well as procedures.
(compose concatenate)
--
2.39.2
L
L
Ludovic Courtès wrote on 22 Mar 2023 15:54
Re: bug#62307: [PATCH core-updates 00/15] Update Hurd and fix build failures
(name . Josselin Poiret)(address . dev@jpoiret.xyz)(address . 62307@debbugs.gnu.org)
87pm90bzva.fsf_-_@gnu.org
Hi,

Josselin Poiret <dev@jpoiret.xyz> skribis:

Toggle quote (6 lines)
> * gnu/packages/base.scm (glibc/fix-for-hurd-cross): New variable.
> (glibc/hurd-headers): Inherit it.
> * gnu/packages/patches/glibc-hurd-add-freestanding-for-configure.patch:
> * gnu/packages/patches/glibc-hurd-add-freestanding-to-cppflags.patch: New files
> * gnu/local.mk (dist_patch_DATA): Register patches.

I’d like to keep this approach (defining a package variant and carrying
Hurd-specific patches) as a last resort.

If I’m not mistaken, we should be able to achieve the same result with a
patch like this one (untested):
Toggle diff (26 lines)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 2959616af6..9db12bcf9f 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -577,7 +577,20 @@ (define* (cross-libc* target
((#:configure-flags flags)
`(cons ,(string-append "--host=" target)
,(if (target-hurd? target)
- `(cons "--disable-werror" ,flags)
+ `(cons* "--disable-werror"
+
+ ;; 'configure' in glibc 2.35 omits to pass
+ ;; '-ffreestanding' when detecting Mach
+ ;; headers. This is fixed in glibc commits
+ ;; 8b8c768e3c701ed1993789bb46acb8a12c7a93df
+ ;; and
+ ;; 7685630b98ca2a3f5de86eadf130993e6cf998a0;
+ ;; as a workaround, bypass those tests.
+ "ac_cv_header_mach_mach_types_defs=yes"
+ "ac_cv_header_mach_mach_types_h=yes"
+ "ac_cv_header_mach_machine_ndr_def_h=yes"
+ "libc_cv_mach_task_creation_time=yes"
+ ,flags)
flags)))
((#:phases phases)
`(modify-phases ,phases
How does that sound?

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 22 Mar 2023 17:28
(name . Josselin Poiret)(address . dev@jpoiret.xyz)(address . 62307@debbugs.gnu.org)
87jzz8bvig.fsf_-_@gnu.org
Josselin Poiret <dev@jpoiret.xyz> skribis:

Toggle quote (7 lines)
> * gnu/packages/gcc.scm (gcc-11): Add ugly conditional patching, to avoid a
> world-rebuild.
> * gnu/packages/cross-base.scm (cross-gcc):
> * gnu/packages/commencement.scm (gcc-boot0): Pass the patch there as well.
> * gnu/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Register it.

[...]

Toggle quote (41 lines)
> + ;; FIXME This patch is not in the origin because it is conditionally
> + ;; applied, to avoid rebuilds at the end of the core-updates cycle.
> + ;; Move to gcc-11's origin ASAP.
> + ((target-hurd? (or (%current-target-system)
> + (%current-system)))
> + (list patch-boot0 (search-patch "gcc-11-libstdc++-hurd-libpthread.patch")))
> + (#t '())))))
>
> (define perl-boot0
> (package
> diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
> index 2959616af6..30bf1c6bd0 100644
> --- a/gnu/packages/cross-base.scm
> +++ b/gnu/packages/cross-base.scm
> @@ -319,14 +319,21 @@ (define* (cross-gcc target
> ("libc" ,libc))
> `(,@inputs
> ("mingw-source" ,(package-source mingw-w64)))))
> - (libc
> + (else
> `(,@inputs
> - ("libc" ,libc)
> - ("libc:static" ,libc "static")
> - ("xkernel-headers" ;the target headers
> - ,@(assoc-ref (package-propagated-inputs libc)
> - "kernel-headers"))))
> - (else inputs)))))
> + ;; FIXME Kludge to only apply the patch for hurd to avoid rebuilds
> + ;; remove ASAP, along with the accompanying changes.
> + ,@(if (target-hurd? target)
> + `(("patch" ,patch)
> + ("_" ,(search-patch "gcc-11-libstdc++-hurd-libpthread.patch")))
> + '())
> + ,@(if libc
> + `(("libc" ,libc)
> + ("libc:static" ,libc "static")
> + ("xkernel-headers" ;the target headers
> + ,@(assoc-ref (package-propagated-inputs libc)
> + "kernel-headers")))


[...]

Toggle quote (31 lines)
> + ;; FIXME We conditionally apply a patch passed in native-inputs, to avoid
> + ;; rebuilds at the end of the core-updates cycle. Move this to a regular
> + ;; patch ASAP.
> + ((target-hurd? (or (%current-target-system)
> + (%current-system)))
> + (substitute-keyword-arguments (package-arguments gcc-8)
> + ((#:phases phases)
> + `(modify-phases ,phases
> + (add-after 'unpack 'patch-libpthread-hurd
> + (lambda* (#:key inputs native-inputs #:allow-other-keys)
> + (define patch (search-input-file (or native-inputs inputs) "/bin/patch"))
> + (define the-patch
> + (cdr
> + (car
> + (filter (lambda (input)
> + (string-suffix? "gcc-11-libstdc++-hurd-libpthread.patch"
> + (cdr input)))
> + (or native-inputs inputs)))))
> + (invoke patch "--verbose"
> + "--force" "--no-backup-if-mismatch"
> + "-p1" "--input" the-patch)))))))
> + (#t (package-arguments gcc-8))))
> + (native-inputs
> + (cond
> + ((target-hurd? (or (%current-target-system)
> + (%current-system)))
> + (modify-inputs (package-native-inputs gcc-8)
> + (prepend (module-ref (resolve-interface '(gnu packages base)) 'patch)
> + (search-patch "gcc-11-libstdc++-hurd-libpthread.patch"))))
> + (#t (package-native-inputs gcc-8))))

So, we should discuss with others whether we can instead do another
round of rebuilds. I know, I know, but this is really quite complicated
and better avoided.

Side note: please use ‘if’ rather than ‘cond’ when there are only two
possibilities.

Ludo’.
L
L
Ludovic Courtès wrote on 22 Mar 2023 17:30
(name . Josselin Poiret)(address . dev@jpoiret.xyz)(address . 62307@debbugs.gnu.org)
87ilesbvfn.fsf_-_@gnu.org
Hi!

Josselin Poiret <dev@jpoiret.xyz> skribis:

Toggle quote (2 lines)
> * gnu/system/pam.scm (pam-root-service-type): Do it.

[...]

Toggle quote (4 lines)
> + (cons (service-extension etc-service-type /etc-entry)
> + (if (target-linux? (or (%current-target-system)
> + (%current-system)))

Unfortunately this isn’t quite correct: the value of these two
parameters will be checked at a time when their value could be anything;
it could be different from the actual system.

But hmm… I don’t have a better idea right now, so maybe we can do that
and add a FIXME.

Ludo’.
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 02/20] gnu: cross-base: Use gexps for 'cross-gcc-arguments'.
(address . 62307@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20230328142852.26635-3-ludo@gnu.org
* gnu/packages/cross-base.scm (cross-gcc-arguments): Switch to gexps.
---
gnu/packages/cross-base.scm | 104 ++++++++++++++++++------------------
1 file changed, 52 insertions(+), 52 deletions(-)

Toggle diff (128 lines)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index f86e8005c4..adead3206a 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -147,69 +147,69 @@ (define (cross-gcc-arguments target xgcc libc)
,@(package-arguments xgcc))))
(substitute-keyword-arguments args
((#:configure-flags flags)
- `(append (list ,(string-append "--target=" target)
- ,@(if libc
- `( ;; Disable libcilkrts because it is not
- ;; ported to GNU/Hurd.
- "--disable-libcilkrts"
- ;; When building a cross compiler, --with-sysroot is
- ;; implicitly set to "$gcc_tooldir/sys-root". This does
- ;; not work for us, because --with-native-system-header-dir
- ;; is searched for relative to this location. Thus, we set
- ;; it to "/" so GCC is able to find the target libc headers.
- ;; This is safe because in practice GCC uses CROSS_CPATH
- ;; & co to separate target and host libraries.
- "--with-sysroot=/")
- `( ;; Disable features not needed at this stage.
- "--disable-shared" "--enable-static"
- "--enable-languages=c,c++"
+ #~(append (list #$(string-append "--target=" target)
+ #$@(if libc
+ #~( ;; Disable libcilkrts because it is not
+ ;; ported to GNU/Hurd.
+ "--disable-libcilkrts"
+ ;; When building a cross compiler, --with-sysroot is
+ ;; implicitly set to "$gcc_tooldir/sys-root". This does
+ ;; not work for us, because --with-native-system-header-dir
+ ;; is searched for relative to this location. Thus, we set
+ ;; it to "/" so GCC is able to find the target libc headers.
+ ;; This is safe because in practice GCC uses CROSS_CPATH
+ ;; & co to separate target and host libraries.
+ "--with-sysroot=/")
+ #~( ;; Disable features not needed at this stage.
+ "--disable-shared" "--enable-static"
+ "--enable-languages=c,c++"
- ;; libstdc++ cannot be built at this stage
- ;; ("Link tests are not allowed after
- ;; GCC_NO_EXECUTABLES.").
- "--disable-libstdc++-v3"
+ ;; libstdc++ cannot be built at this stage
+ ;; ("Link tests are not allowed after
+ ;; GCC_NO_EXECUTABLES.").
+ "--disable-libstdc++-v3"
- "--disable-threads" ;libgcc, would need libc
- "--disable-libatomic"
- "--disable-libmudflap"
- "--disable-libgomp"
- "--disable-libmpx"
- "--disable-libssp"
- "--disable-libquadmath"
- "--disable-decimal-float" ;would need libc
- "--disable-libcilkrts"
+ "--disable-threads" ;libgcc, would need libc
+ "--disable-libatomic"
+ "--disable-libmudflap"
+ "--disable-libgomp"
+ "--disable-libmpx"
+ "--disable-libssp"
+ "--disable-libquadmath"
+ "--disable-decimal-float" ;would need libc
+ "--disable-libcilkrts"
- ;; When target is any OS other than 'none' these
- ;; libraries will fail if there is no libc
- ;; present. See
- ;; <https://lists.gnu.org/archive/html/guix-devel/2016-02/msg01311.html>
- "--disable-libitm"
- "--disable-libvtv"
- "--disable-libsanitizer"
- ))
+ ;; When target is any OS other than 'none' these
+ ;; libraries will fail if there is no libc
+ ;; present. See
+ ;; <https://lists.gnu.org/archive/html/guix-devel/2016-02/msg01311.html>
+ "--disable-libitm"
+ "--disable-libvtv"
+ "--disable-libsanitizer"
+ ))
- ;; Install cross-built libraries such as libgcc_s.so in
- ;; the "lib" output.
- ,@(if libc
- `((string-append "--with-toolexeclibdir="
- (assoc-ref %outputs "lib")
- "/" ,target "/lib"))
- '()))
+ ;; Install cross-built libraries such as libgcc_s.so in
+ ;; the "lib" output.
+ #$@(if libc
+ #~((string-append "--with-toolexeclibdir="
+ (assoc-ref %outputs "lib")
+ "/" #$target "/lib"))
+ #~()))
- ,(if libc
- flags
- `(remove (cut string-match "--enable-languages.*" <>)
- ,flags))))
+ #$(if libc
+ flags
+ #~(remove (cut string-match "--enable-languages.*" <>)
+ #$flags))))
((#:make-flags flags)
(if libc
- `(let ((libc (assoc-ref %build-inputs "libc")))
+ #~(let ((libc (assoc-ref %build-inputs "libc")))
;; FLAGS_FOR_TARGET are needed for the target libraries to receive
;; the -Bxxx for the startfiles.
- (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib")
- ,flags))
+ (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib")
+ #$flags))
flags))
((#:phases phases)
- `(cross-gcc-build-phases ,target ,phases))))))
+ #~(cross-gcc-build-phases #$target #$phases))))))
(define (cross-gcc-patches xgcc target)
"Return GCC patches needed for XGCC and TARGET."
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 01/20] gnu: glibc: Work around broken GNU Mach header detection.
(address . 62307@debbugs.gnu.org)
20230328142852.26635-2-ludo@gnu.org
* gnu/packages/base.scm (%glibc/hurd-configure-flags): New variable.
(glibc)[arguments]: Use it.
(glibc/hurd-headers)[arguments]: likewise.
* gnu/packages/cross-base.scm (cross-libc*): Likewise.

Co-authored-by: Josselin Poiret <dev@jpoiret.xyz>
---
gnu/packages/base.scm | 19 ++++++++++++++++---
gnu/packages/cross-base.scm | 4 +++-
2 files changed, 19 insertions(+), 4 deletions(-)

Toggle diff (62 lines)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 041f16b4fc..520c2093f3 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -755,6 +755,17 @@ (define* (make-ld-wrapper name #:key
(home-page "https://www.gnu.org/software/guix//")
(license gpl3+)))
+(define-public %glibc/hurd-configure-flags
+ ;; 'configure' in glibc 2.35 omits to pass '-ffreestanding' when detecting
+ ;; Mach headers. This is fixed in glibc commits
+ ;; 8b8c768e3c701ed1993789bb46acb8a12c7a93df and
+ ;; 7685630b98ca2a3f5de86eadf130993e6cf998a0; as a workaround, bypass those
+ ;; tests.
+ '("ac_cv_header_mach_mach_types_defs=yes"
+ "ac_cv_header_mach_mach_types_h=yes"
+ "ac_cv_header_mach_machine_ndr_def_h=no"
+ "libc_cv_mach_task_creation_time=yes"))
+
(define-public glibc
;; This is the GNU C Library, used on GNU/Linux and GNU/Hurd. Prior to
;; version 2.28, GNU/Hurd used a different glibc branch.
@@ -854,7 +865,8 @@ (define-public glibc
;; On GNU/Hurd we get discarded-qualifiers warnings for
;; 'device_write_inband' among other things. Ignore them.
,@(if (hurd-target?)
- '("--disable-werror")
+ `("--disable-werror"
+ ,@%glibc/hurd-configure-flags)
'()))
#:tests? #f ; XXX
@@ -1392,9 +1404,10 @@ (define-public glibc/hurd-headers
(arguments
(substitute-keyword-arguments (package-arguments glibc)
;; We just pass the flags really needed to build the headers.
- ((#:configure-flags _)
+ ((#:configure-flags flags)
`(list "--enable-add-ons"
- "--host=i586-pc-gnu"))
+ "--host=i586-pc-gnu"
+ ,@%glibc/hurd-configure-flags))
((#:phases _)
'(modify-phases %standard-phases
(replace 'install
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 2959616af6..f86e8005c4 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -577,7 +577,9 @@ (define* (cross-libc* target
((#:configure-flags flags)
`(cons ,(string-append "--host=" target)
,(if (target-hurd? target)
- `(cons "--disable-werror" ,flags)
+ `(append (list "--disable-werror"
+ ,@%glibc/hurd-configure-flags)
+ ,flags)
flags)))
((#:phases phases)
`(modify-phases ,phases
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 03/20] gnu: gcc@11: Patch libpthread on GNU/Hurd.
(address . 62307@debbugs.gnu.org)
20230328142852.26635-4-ludo@gnu.org
From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/gcc.scm (gcc-11)[arguments]: Add 'patch-hurd-libpthread'
phase.
* gnu/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/local.mk | 1 +
gnu/packages/gcc.scm | 13 +++-
.../gcc-11-libstdc++-hurd-libpthread.patch | 62 +++++++++++++++++++
3 files changed, 75 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch

Toggle diff (106 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index d211db22c9..c44ad3aab3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1181,6 +1181,7 @@ dist_patch_DATA = \
%D%/packages/patches/gcc-9-strmov-store-file-names.patch \
%D%/packages/patches/gcc-12-strmov-store-file-names.patch \
%D%/packages/patches/gcc-10-cross-environment-variables.patch \
+ %D%/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch \
%D%/packages/patches/gcc-12-cross-environment-variables.patch \
%D%/packages/patches/gcc-10-tree-sra-union-handling.patch \
%D%/packages/patches/gcolor3-update-libportal-usage.patch \
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index ce6e3e7a83..a511cdbc45 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -706,7 +706,18 @@ (define-public gcc-11
"gcc-10-tree-sra-union-handling.patch"))
(modules '((guix build utils)))
(snippet gcc-canadian-cross-objdump-snippet)))
-
+ (arguments
+ (substitute-keyword-arguments (package-arguments gcc-8)
+ ((#:phases phases #~%standard-phases)
+ (if (target-hurd?)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'patch-hurd-libpthread
+ (lambda _
+ (define patch
+ #$(local-file
+ (search-patch "gcc-11-libstdc++-hurd-libpthread.patch")))
+ (invoke "patch" "--force" "-p1" "-i" patch))))
+ phases))))
(properties
`((compiler-cpu-architectures
("aarch64" ,@%gcc-11-aarch64-micro-architectures)
diff --git a/gnu/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch b/gnu/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch
new file mode 100644
index 0000000000..1845583ac5
--- /dev/null
+++ b/gnu/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch
@@ -0,0 +1,62 @@
+From f0065f207cf19cd960b33d961472c6d69514336f Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault@gnu.org>
+Date: Fri, 7 Oct 2022 22:45:06 +0200
+Subject: [PATCH] libstdc++: Mark pieces of gnu-linux/os_support.h
+ linux-specific
+
+This is notably needed because in glibc 2.34, the move of pthread functions
+into libc.so happened for Linux only, not GNU/Hurd.
+
+The pthread_self() function can also always be used fine as it is on
+GNU/Hurd.
+
+libstdc++-v3/ChangeLog:
+
+ * config/os/gnu-linux/os_defines.h [!__linux__]
+ (_GLIBCXX_NATIVE_THREAD_ID, _GLIBCXX_GTHREAD_USE_WEAK): Do not define.
+
+Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
+---
+ libstdc++-v3/config/os/gnu-linux/os_defines.h | 22 +++++++++++--------
+ 1 file changed, 13 insertions(+), 9 deletions(-)
+
+diff --git a/libstdc++-v3/config/os/gnu-linux/os_defines.h b/libstdc++-v3/config/os/gnu-linux/os_defines.h
+index 3064f8d908ac2..87317031fcd71 100644
+--- a/libstdc++-v3/config/os/gnu-linux/os_defines.h
++++ b/libstdc++-v3/config/os/gnu-linux/os_defines.h
+@@ -60,22 +60,26 @@
+ # define _GLIBCXX_HAVE_FLOAT128_MATH 1
+ #endif
+
+-#if __GLIBC_PREREQ(2, 27)
++#ifdef __linux__
++// The following libpthread properties only apply to Linux, not GNU/Hurd.
++
++# if __GLIBC_PREREQ(2, 27)
+ // Since glibc 2.27 pthread_self() is usable without linking to libpthread.
+-# define _GLIBCXX_NATIVE_THREAD_ID pthread_self()
+-#else
++# define _GLIBCXX_NATIVE_THREAD_ID pthread_self()
++# else
+ // Before then it was in libc.so.6 but not libc.a, and always returns 0,
+ // which breaks the invariant this_thread::get_id() != thread::id{}.
+ // So only use it if we know the libpthread version is available.
+ // Otherwise use (__gthread_t)1 as the ID of the main (and only) thread.
+-# define _GLIBCXX_NATIVE_THREAD_ID \
+- (__gthread_active_p() ? __gthread_self() : (__gthread_t)1)
+-#endif
++# define _GLIBCXX_NATIVE_THREAD_ID \
++ (__gthread_active_p() ? __gthread_self() : (__gthread_t)1)
++# endif
+
+-#if __GLIBC_PREREQ(2, 34)
++# if __GLIBC_PREREQ(2, 34)
+ // Since glibc 2.34 all pthreads functions are usable without linking to
+ // libpthread.
+-# define _GLIBCXX_GTHREAD_USE_WEAK 0
+-#endif
++# define _GLIBCXX_GTHREAD_USE_WEAK 0
++# endif
++#endif // __linux__
+
+ #endif
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 00/20] Update Hurd and fix build failures
(address . 62307@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20230328142852.26635-1-ludo@gnu.org
Hello Guix!

I have good news and bad news.

The bad news is that an image built with:

./pre-inst-env guix system image -t hurd-qcow2 \
gnu/system/examples/bare-hurd.tmpl

fails to boot: it hangs right at:

(system* "/hurd/mach-defpager")

Basically, ‘system*’ doesn’t work at the early-boot REPL. This
was not surprising given https://issues.guix.gnu.org/61095, but
it is now that I’ve fixed it. I’ve also confirmed that the same
binary works on a “current” (master) childhurd, which means it
could be something with the new ‘exec’ server or anything in between.
I think we can keep investigating that separately.

The good news is that ‘--target=i586-pc-gnu’ is back to life. :-)
Compared to Josselin’s initial patch set, I made the following changes:

• MiG is built from a tarball (which I’ll upload to
ftp.gnu.org/gnu/guix/mirror after review); building from
Git introduces a circular dependency in native i586-gnu builds,
hence the tarball.

• The glibc ‘configure’ issue is worked around in a less invasive
way as I proposed earlier.

• The GCC/libstdc++ patch application is likewise simplified,
without introducing a world rebuild.

• ‘system*’ in Guile is fixed.

• ‘linux-pam’ builds again on GNU/Hurd.

If there are no objections I’d like to push that soonish so we can
move on with the branch.

Thoughts?

Ludo’.

Josselin Poiret (12):
gnu: gcc@11: Patch libpthread on GNU/Hurd.
gnu: cross-base: Factor out cross-mig.
gnu: cross-base: Add cross arguments to hurd derivatives.
gnu: cross-base: Removed useless inputs to xhurd-core-headers.
gnu: mig: Update to 1.8+git20220827.
gnu: gnumach: Update to 1.8+git20220827.
gnu: hurd: Update to 3ff7053.
gnu: hurd: Remove useless glibc/hurd-headers input.
gnu: gnumach, hurd-headers, hurd: Switch to using cross-mig.
gnu: hurd: Update DDE and use libdde_linux26.
gnu: mig/32-bit: Remove.
system: hurd: Use shepherd-0.8 in the package list.

Ludovic Courtès (8):
gnu: glibc: Work around broken GNU Mach header detection.
gnu: cross-base: Use gexps for 'cross-gcc-arguments'.
gnu: linux-pam: Switch to gexps.
gnu: linux-pam: Allow compilation on GNU/Hurd.
gnu: guile-static: Switch to gexps.
gnu: guile: Switch to gexps.
gnu: guile-readline: Switch to gexps.
gnu: guile: Fix 'posix_spawn' usage for GNU/Hurd.

gnu/local.mk | 9 +-
gnu/packages/base.scm | 19 +-
gnu/packages/cross-base.scm | 217 +++--
gnu/packages/gcc.scm | 13 +-
gnu/packages/guile.scm | 190 ++--
gnu/packages/hurd.scm | 307 +++---
gnu/packages/linux.scm | 51 +-
gnu/packages/make-bootstrap.scm | 58 +-
.../gcc-11-libstdc++-hurd-libpthread.patch | 62 ++
...ng-const_mach_port_name_array_t-type.patch | 32 +
.../patches/guile-hurd-posix-spawn.patch | 44 +
...rd-add-without-rump-configure-option.patch | 82 ++
gnu/packages/patches/hurd-cross.patch | 33 -
...f-read-write-and-readables-methods-2.patch | 155 +++
...-of-read-write-and-readables-methods.patch | 891 ++++++++++++++++++
gnu/packages/patches/hurd-xattr.patch | 53 --
.../patches/mig-cpu.h-generation.patch | 16 +
gnu/system/hurd.scm | 2 +-
18 files changed, 1773 insertions(+), 461 deletions(-)
create mode 100644 gnu/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch
create mode 100644 gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch
create mode 100644 gnu/packages/patches/guile-hurd-posix-spawn.patch
create mode 100644 gnu/packages/patches/hurd-add-without-rump-configure-option.patch
delete mode 100644 gnu/packages/patches/hurd-cross.patch
create mode 100644 gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch
create mode 100644 gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.patch
delete mode 100644 gnu/packages/patches/hurd-xattr.patch
create mode 100644 gnu/packages/patches/mig-cpu.h-generation.patch


base-commit: 68793b702e4295d011c89e72826fd15ce18e0b95
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 04/20] gnu: cross-base: Factor out cross-mig.
(address . 62307@debbugs.gnu.org)
20230328142852.26635-5-ludo@gnu.org
From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/cross-base.scm (cross-mig): New exported procedure.
(cross-gnumach-headers): New procedure.
(cross-kernel-headers*): Factor them out.
(cross-libc*): Use them there.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/cross-base.scm | 89 ++++++++++++++++++++++---------------
1 file changed, 54 insertions(+), 35 deletions(-)

Toggle diff (124 lines)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index adead3206a..2a7c4d8011 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -46,6 +46,7 @@ (define-module (gnu packages cross-base)
#:export (cross-binutils
cross-libc
cross-gcc
+ cross-mig
cross-kernel-headers))
(define-syntax %xgcc
@@ -365,6 +366,52 @@ (define* (cross-kernel-headers/deprecated target
#:xgcc xgcc
#:xbinutils xbinutils))
+(define* (cross-gnumach-headers target
+ #:key
+ (xgcc (cross-gcc target))
+ (xbinutils (cross-binutils target)))
+ (package
+ (inherit gnumach-headers)
+ (name (string-append (package-name gnumach-headers)
+ "-cross-" target))
+ (native-inputs
+ (modify-inputs (package-native-inputs gnumach-headers)
+ (prepend xgcc xbinutils)))))
+
+(define* (cross-mig target
+ #:key
+ (xgcc (cross-gcc target))
+ (xbinutils (cross-binutils target)))
+ "Return a cross-mig for TARGET, where TARGET is a GNU triplet. Use XGCC as
+the base compiler. Use XBINUTILS as the associated cross-Binutils."
+ (define xgnumach-headers
+ (cross-gnumach-headers target
+ #:xgcc xgcc
+ #:xbinutils xbinutils))
+ (package
+ (inherit mig)
+ (name (string-append "mig-cross"))
+ (arguments
+ (substitute-keyword-arguments (package-arguments mig)
+ ((#:configure-flags flags #~'())
+ #~(list #$(string-append "--target=" target)))
+ ((#:tests? _ #f)
+ #f)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-before 'configure 'set-cross-headers-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((mach #+xgnumach-headers)
+ (cpath (string-append mach "/include")))
+ (for-each (lambda (variable)
+ (setenv variable cpath))
+ '#$%gcc-cross-include-paths))))))))
+ (propagated-inputs
+ (list xgnumach-headers))
+ (native-inputs
+ (modify-inputs (package-native-inputs mig)
+ (prepend xgcc xbinutils)))))
+
(define* (cross-kernel-headers* target
#:key
(linux-headers linux-libre-headers)
@@ -399,40 +446,11 @@ (define xlinux-headers
("cross-binutils" ,xbinutils)
,@(package-native-inputs linux-headers)))))
- (define xgnumach-headers-name
- (string-append (package-name gnumach-headers) "-cross-" target))
-
- (define xgnumach-headers
- (package
- (inherit gnumach-headers)
- (name xgnumach-headers-name)
- (native-inputs
- (modify-inputs (package-native-inputs gnumach-headers)
- (prepend xgcc xbinutils)))))
-
(define xmig
- (package
- (inherit mig)
- (name (string-append "mig-cross"))
- (arguments
- (substitute-keyword-arguments (package-arguments mig)
- ((#:configure-flags flags #~'())
- #~(list #$(string-append "--target=" target)))
- ((#:tests? _ #f)
- #f)
- ((#:phases phases #~%standard-phases)
- #~(modify-phases #$phases
- (add-before 'configure 'set-cross-headers-path
- (lambda* (#:key inputs #:allow-other-keys)
- (let* ((mach #+(this-package-input xgnumach-headers-name))
- (cpath (string-append mach "/include")))
- (for-each (lambda (variable)
- (setenv variable cpath))
- '#$%gcc-cross-include-paths))))))))
- (propagated-inputs (list xgnumach-headers))
- (native-inputs
- (modify-inputs (package-native-inputs mig)
- (prepend xgcc xbinutils)))))
+ (cross-mig target #:xgcc xgcc #:xbinutils xbinutils))
+
+ (define xgnumach-headers
+ (cross-gnumach-headers target #:xgcc xgcc #:xbinutils xbinutils))
(define xhurd-headers
(package
@@ -611,8 +629,9 @@ (define* (cross-libc* target
("cross-binutils" ,xbinutils)
,@(if (target-hurd? target)
`(("cross-mig"
- ,@(assoc-ref (package-native-inputs xheaders)
- "cross-mig")))
+ ,(cross-mig target
+ #:xgcc xgcc
+ #:xbinutils xbinutils)))
'())
,@(package-inputs libc) ;FIXME: static-bash
,@(package-native-inputs libc))))))
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 05/20] gnu: cross-base: Add cross arguments to hurd derivatives.
(address . 62307@debbugs.gnu.org)
20230328142852.26635-6-ludo@gnu.org
From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/cross-base.scm (cross-kernel-headers*): Add --build and --host to
xhurd-headers and xhurd-minimal.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/cross-base.scm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

Toggle diff (36 lines)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 2a7c4d8011..bda494fd02 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -458,10 +458,17 @@ (define xhurd-headers
(name (string-append (package-name hurd-headers)
"-cross-" target))
+ (arguments
+ (substitute-keyword-arguments (package-arguments hurd-headers)
+ ((#:configure-flags flags)
+ `(cons* ,(string-append "--build=" (%current-system))
+ ,(string-append "--host=" target)
+ ,flags))))
+
(native-inputs `(("cross-gcc" ,xgcc)
("cross-binutils" ,xbinutils)
("cross-mig" ,xmig)
- ,@(alist-delete "mig"(package-native-inputs hurd-headers))))))
+ ,@(alist-delete "mig" (package-native-inputs hurd-headers))))))
(define xglibc/hurd-headers
(package
@@ -506,6 +513,10 @@ (define xhurd-minimal
(guix build utils)
(srfi srfi-26))
,@(package-arguments hurd-minimal))
+ ((#:configure-flags flags)
+ `(cons* ,(string-append "--build=" (%current-system))
+ ,(string-append "--host=" target)
+ ,flags))
((#:phases phases)
`(modify-phases ,phases
(add-before 'configure 'set-cross-headers-path
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 06/20] gnu: cross-base: Removed useless inputs to xhurd-core-headers.
(address . 62307@debbugs.gnu.org)
20230328142852.26635-7-ludo@gnu.org
From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/cross-base.scm (cross-kernel-headers*): Remove them.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/cross-base.scm | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

Toggle diff (20 lines)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index bda494fd02..8d0b41180b 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -542,12 +542,7 @@ (define xhurd-core-headers
(inputs `(("gnumach-headers" ,xgnumach-headers)
("hurd-headers" ,xhurd-headers)
- ("hurd-minimal" ,xhurd-minimal)))
-
- (native-inputs `(("cross-gcc" ,xgcc)
- ("cross-binutils" ,xbinutils)
- ("cross-mig" ,xmig)
- ,@(package-native-inputs hurd-core-headers)))))
+ ("hurd-minimal" ,xhurd-minimal)))))
(match target
((or "i586-pc-gnu" "i586-gnu") xhurd-core-headers)
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 07/20] gnu: mig: Update to 1.8+git20220827.
(address . 62307@debbugs.gnu.org)
20230328142852.26635-8-ludo@gnu.org
From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/hurd.scm (mig): Do it.
* gnu/packages/patches/mig-cpu.h-generation.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/local.mk | 1 +
gnu/packages/hurd.scm | 26 ++++++++++++-------
.../patches/mig-cpu.h-generation.patch | 16 ++++++++++++
3 files changed, 34 insertions(+), 9 deletions(-)
create mode 100644 gnu/packages/patches/mig-cpu.h-generation.patch

Toggle diff (73 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index c44ad3aab3..10a55164e7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1542,6 +1542,7 @@ dist_patch_DATA = \
%D%/packages/patches/mia-vtk9.patch \
%D%/packages/patches/mia-vtk92.patch \
%D%/packages/patches/mia-vtk-version.patch \
+ %D%/packages/patches/mig-cpu.h-generation.patch \
%D%/packages/patches/mingw-w64-6.0.0-gcc.patch \
%D%/packages/patches/mingw-w64-dlltool-temp-prefix.patch \
%D%/packages/patches/mingw-w64-reproducible-gendef.patch \
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 7f02e6141d..078d495c87 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -111,15 +111,23 @@ (define-public gnumach-headers
(define-public mig
(package
(name "mig")
- (version "1.8")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/mig/mig-"
- version ".tar.gz"))
- (sha256
- (base32
- "1gyda8sq6b379nx01hkpbd85lz39irdvz2b9wbr63gicicx8i706"))))
+ (version "1.8+git20220827")
+ (source (origin
+ (method url-fetch)
+ ;; FIXME: Use permanent URL at ftp.gnu.org.
+
+ ;; XXX: Version 2.35 of glibc can only be built with an
+ ;; unreleased version of MiG:
+ ;; <https://lists.gnu.org/archive/html/bug-hurd/2023-03/msg00025.html>.
+ ;; It cannot be fetched from Git though, as the extra dependency
+ ;; on Autoconf/Automake would complicate bootstrapping.
+ (uri (string-append
+ "https://people.bordeaux.inria.fr/lcourtes/tmp/mig-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "163d37s9lscd6zxyfng421m9nl857464mgjj90xsrcl5ykbng5p2"))
+ (patches (search-patches "mig-cpu.h-generation.patch"))))
(build-system gnu-build-system)
;; Flex is needed both at build and run time.
(inputs (list gnumach-headers flex))
diff --git a/gnu/packages/patches/mig-cpu.h-generation.patch b/gnu/packages/patches/mig-cpu.h-generation.patch
new file mode 100644
index 0000000000..3030eaeaa6
--- /dev/null
+++ b/gnu/packages/patches/mig-cpu.h-generation.patch
@@ -0,0 +1,16 @@
+Backport MiG commit 73fbf2504ae606dda81372701a67dad6fee0865e:
+
+ From: Flavio Cruz <flaviocruz@gmail.com>
+ Subject: Generate cpu.h with -ffreestanding
+
+--- a/Makefile.in 2023-03-26 23:02:51.384318331 +0200
++++ b/Makefile.in 2023-03-26 23:03:03.300329369 +0200
+@@ -1051,7 +1051,7 @@ uninstall-am: uninstall-binSCRIPTS unins
+ .sym.symc:
+ $(AWK_V) $(AWK) -f $(srcdir)/gensym.awk $< > $@
+ .symc.symo:
+- $(AM_V_CC) $(TARGET_CC) -S $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -x c -o $@ $<
++ $(AM_V_CC) $(TARGET_CC) -S $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -ffreestanding -x c -o $@ $<
+ .symo.h:
+ $(AM_V_GEN) sed -e '/^[^*].*$$/d' -e 's/^[*]/#define/' -e 's/mAgIc[^-0-9]*//' \
+ $< > $@
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 08/20] gnu: gnumach: Update to 1.8+git20220827.
(address . 62307@debbugs.gnu.org)
20230328142852.26635-9-ludo@gnu.org
From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/hurd.scm (gnumach-headers): Do it.

* gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Register it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/local.mk | 1 +
gnu/packages/hurd.scm | 77 +++++++++----------
...ng-const_mach_port_name_array_t-type.patch | 32 ++++++++
3 files changed, 71 insertions(+), 39 deletions(-)
create mode 100644 gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch

Toggle diff (142 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 10a55164e7..6c029db944 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1251,6 +1251,7 @@ dist_patch_DATA = \
%D%/packages/patches/gnome-settings-daemon-gc.patch \
%D%/packages/patches/gnome-session-support-elogind.patch \
%D%/packages/patches/gnome-tweaks-search-paths.patch \
+ %D%/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch \
%D%/packages/patches/gnupg-default-pinentry.patch \
%D%/packages/patches/gnupg-1-build-with-gcc10.patch \
%D%/packages/patches/gnutls-skip-trust-store-test.patch \
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 078d495c87..dbbe4d4cc6 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -66,47 +66,46 @@ (define (hurd-source-url version)
version ".tar.gz"))
(define-public gnumach-headers
- (let ((commit "097f9cf735ffa1212b828682ad92f0f6c5f1c552")
- (revision "1"))
- (package
- (name "gnumach-headers")
- (version (git-version "1.8" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://git.savannah.gnu.org/git/hurd/gnumach.git")
- (commit commit)))
- (file-name (git-file-name "gnumach" version))
- (sha256
- (base32
- "0q36z7k02bykrld90zaxbhyzxlmwlqqs4divgir6ix38zsp6icqk"))))
- (build-system gnu-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'install
- (lambda _
- (invoke "make" "install-data")))
- (delete 'build))
+ (package
+ (name "gnumach-headers")
+ (version "1.8+git20220827") ;; This is an upstream tag
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/hurd/gnumach.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name "gnumach" version))
+ (sha256
+ (base32
+ "07qlaf8vw029y7xdnhjyiiyn788zjzwmyzj79inz7idpswqsnyhf"))
+ (patches (search-patches "gnumach-add-missing-const_mach_port_name_array_t-type.patch"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (lambda _
+ (invoke "make" "install-data")))
+ (delete 'build))
- ;; GNU Mach supports only IA32 currently, so cheat so that we can at
- ;; least install its headers.
- ,@(if (%current-target-system)
- '()
- ;; See <http://lists.gnu.org/archive/html/bug-hurd/2015-06/msg00042.html>
- ;; <http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00716.html>
- '(#:configure-flags '("--build=i586-pc-gnu"
- "--host=i686-linux-gnu")))
+ ;; GNU Mach supports only IA32 currently, so cheat so that we can at
+ ;; least install its headers.
+ ,@(if (%current-target-system)
+ '()
+ ;; See <http://lists.gnu.org/archive/html/bug-hurd/2015-06/msg00042.html>
+ ;; <http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00716.html>
+ '(#:configure-flags '("--build=i586-pc-gnu"
+ "--host=i686-linux-gnu")))
- #:tests? #f))
- (native-inputs
- (list autoconf automake texinfo-4))
- (home-page "https://www.gnu.org/software/hurd/microkernel/mach/gnumach.html")
- (synopsis "GNU Mach kernel headers")
- (description
- "Headers of the GNU Mach kernel.")
- (license gpl2+))))
+ #:tests? #f))
+ (native-inputs
+ (list autoconf automake texinfo-4))
+ (home-page "https://www.gnu.org/software/hurd/microkernel/mach/gnumach.html")
+ (synopsis "GNU Mach kernel headers")
+ (description
+ "Headers of the GNU Mach kernel.")
+ (license gpl2+)))
(define-public mig
(package
diff --git a/gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch b/gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch
new file mode 100644
index 0000000000..73c99ade23
--- /dev/null
+++ b/gnu/packages/patches/gnumach-add-missing-const_mach_port_name_array_t-type.patch
@@ -0,0 +1,32 @@
+From 17335d49a3c9e866a81abc051420d73a59d669bf Mon Sep 17 00:00:00 2001
+Message-Id: <17335d49a3c9e866a81abc051420d73a59d669bf.1678745341.git.dev@jpoiret.xyz>
+From: Josselin Poiret <dev@jpoiret.xyz>
+Date: Sun, 28 Aug 2022 01:17:34 +0200
+Subject: [PATCH] Add missing const_mach_port_name_array_t type
+
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+---
+ include/mach/port.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/mach/port.h b/include/mach/port.h
+index 3c226f6c..d25eb0b4 100644
+--- a/include/mach/port.h
++++ b/include/mach/port.h
+@@ -43,6 +43,7 @@
+ */
+ typedef unsigned int mach_port_name_t;
+ typedef mach_port_name_t *mach_port_name_array_t;
++typedef const mach_port_name_t *const_mach_port_name_array_t;
+
+ /*
+ * A port is represented
+
+base-commit: 3e1702a65fb3caf50c8d09a1b383b0056a5efc82
+prerequisite-patch-id: 4688654277aef235ccd1797a72dce27d52b04616
+prerequisite-patch-id: 8f1e7dd6429c15cc8ed1d411dba0a75b6e745236
+prerequisite-patch-id: 605553ee086473ad9bc24e59c91d49a12dbf8631
+--
+2.39.1
+
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 10/20] gnu: hurd: Remove useless glibc/hurd-headers input.
(address . 62307@debbugs.gnu.org)
20230328142852.26635-11-ludo@gnu.org
From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/hurd.scm (hurd): Do it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/hurd.scm | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index bf252cb6e6..375e8af76a 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -514,9 +514,7 @@ (define-public hurd
"CFLAGS=-fcommon")))
(build-system gnu-build-system)
(inputs
- `(("glibc-hurd-headers" ,glibc/hurd-headers)
-
- ("libgcrypt" ,libgcrypt) ;for /hurd/random
+ `(("libgcrypt" ,libgcrypt) ;for /hurd/random
("libdaemon" ,libdaemon) ;for /bin/console --daemonize
("unifont" ,unifont)
("libpciaccess" ,libpciaccess)
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 11/20] gnu: gnumach, hurd-headers, hurd: Switch to using cross-mig.
(address . 62307@debbugs.gnu.org)
20230328142852.26635-12-ludo@gnu.org
From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/hurd.scm (gnumach, hurd-headers, hurd): Switch to cross-mig when
cross-building.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/hurd.scm | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)

Toggle diff (55 lines)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 375e8af76a..7ad893380c 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -188,7 +188,13 @@ (define-public hurd-headers
"hurd-fix-types-of-read-write-and-readables-methods-2.patch"))))
(build-system gnu-build-system)
(native-inputs
- (list autoconf automake mig))
+ (list autoconf
+ automake
+ (if (%current-target-system)
+ (let* ((cross-base (resolve-interface '(gnu packages cross-base)))
+ (cross-mig (module-ref cross-base 'cross-mig)))
+ (cross-mig (%current-target-system)))
+ mig)))
(arguments
`(#:phases
(modify-phases %standard-phases
@@ -312,7 +318,15 @@ (define-public gnumach
(invoke "make" "gnumach.gz")
(install-file "gnumach.gz" boot))))))))
(native-inputs
- (list mig perl autoconf automake texinfo-4))
+ (list autoconf
+ automake
+ (if (%current-target-system)
+ (let* ((cross-base (resolve-interface '(gnu packages cross-base)))
+ (cross-mig (module-ref cross-base 'cross-mig)))
+ (cross-mig (%current-target-system)))
+ mig)
+ perl
+ texinfo-4))
(supported-systems (cons "i686-linux" %hurd-systems))
(synopsis "Microkernel of the GNU system")
(description
@@ -532,12 +546,12 @@ (define-public hurd
`(("autoconf" ,autoconf)
("automake" ,automake)
("libgcrypt" ,libgcrypt) ;for 'libgcrypt-config'
- ("pkg-config" ,pkg-config)
("mig" ,(if (%current-target-system)
- ;; XXX: When targeting i586-pc-gnu, we need a 32-bit MiG,
- ;; hence this hack.
- mig/32-bit
+ (let* ((cross-base (resolve-interface '(gnu packages cross-base)))
+ (cross-mig (module-ref cross-base 'cross-mig)))
+ (cross-mig (%current-target-system)))
mig))
+ ("pkg-config" ,pkg-config)
("perl" ,perl)
("texinfo" ,texinfo-4)
("dde-sources" ,dde-sources)))
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 12/20] gnu: hurd: Update DDE and use libdde_linux26.
(address . 62307@debbugs.gnu.org)
20230328142852.26635-13-ludo@gnu.org
From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/hurd.scm (dde-sources): Update.
(hurd): Build libdde_linux26 and install it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/hurd.scm | 46 +++++++++++++++++++++++++++++++++++--------
1 file changed, 38 insertions(+), 8 deletions(-)

Toggle diff (93 lines)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 7ad893380c..be9e7a9071 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -345,7 +345,7 @@ (define unifont
(define dde-sources
;; This is the current tip of the dde branch
- (let ((commit "ac1c7eb7a8b24b7469bed5365be38a968d59a136"))
+ (let ((commit "ce8810277fa3584eb36ecb23da58394153fabe6f"))
(origin
(method git-fetch)
(uri (git-reference
@@ -353,9 +353,15 @@ (define dde-sources
(commit commit)))
(sha256
(base32
- "1vryinbg75xpydfrv9dbgfnds6knlh8l8bk2rxp32y9dc58z0692"))
+ "0ygk7jm4jmhpvh0zzi5bk638242z7sbcab2i57fkb4y2mmdkjjbw"))
(file-name (git-file-name "dde" commit)))))
+(define %import-from-dde
+ (list "libmachdevdde" "libddekit" "libdde_linux26"))
+
+(define %add-to-hurd-subdirs
+ (list "libmachdevdde" "libddekit"))
+
(define-public hurd
(package
(name "hurd")
@@ -366,17 +372,19 @@ (define-public hurd
(modify-phases %standard-phases
(add-after 'unpack 'prepare-dde
(lambda* (#:key native-inputs inputs #:allow-other-keys)
- (substitute* "Makefile"
- (("libbpf ")
- "libbpf libmachdev libmachdevdde libddekit"))
+ ;; First we import the things we want from dde.
(for-each make-file-writable (find-files "."))
(let ((dde (or (assoc-ref inputs "dde-sources")
(assoc-ref native-inputs "dde-sources"))))
(for-each (lambda (dir)
(copy-recursively
(string-append dde "/" dir ) dir))
- '("libmachdev" "libmachdevdde" "libddekit")))
- #t))
+ '("libmachdevdde" "libddekit" "libdde_linux26")))
+ ;; And we add some as subdirs so that they're built by the main
+ ;; Makefile. libdde_linux26 is built later in its own phase.
+ (substitute* "Makefile"
+ (("libbpf ")
+ "libbpf libmachdevdde libddekit"))))
(add-after 'unpack 'find-tirpc
(lambda* (#:key inputs #:allow-other-keys)
(for-each (lambda (var)
@@ -495,12 +503,34 @@ (define-public hurd
(patch-shebang file path))
(find-files (string-append out "/libexec")))
#t)))
+ (add-after 'build 'build-libdde-linux
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (invoke (string-append (assoc-ref native-inputs "make")
+ "/bin/make")
+ ;; XXX There can be a race condition because subdirs
+ ;; aren't interdependent targets in the Makefile.
+ "-j1" "-C" "libdde_linux26"
+ (string-append "SHELL="
+ (assoc-ref native-inputs "bash")
+ "/bin/bash")
+ (string-append "CC="
+ ,(cc-for-target)))))
(add-after 'install 'install-goodies
- (lambda* (#:key inputs outputs #:allow-other-keys)
+ (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
;; Install additional goodies.
;; TODO: Build & install *.msgids for rpctrace.
(let* ((out (assoc-ref outputs "out"))
(datadir (string-append out "/share/hurd")))
+ ;; Install libdde_linux26.
+ (invoke (string-append (assoc-ref native-inputs "make")
+ "/bin/make")
+ "-C" "libdde_linux26" "install"
+ (string-append "SHELL="
+ (assoc-ref native-inputs "bash")
+ "/bin/bash")
+ (string-append "INSTALLDIR="
+ out
+ "/share/libdde_linux26/build/include"))
;; Install the fancy UTF-8 motd.
(mkdir-p (string-append out "/etc"))
(copy-file "console/motd.UTF8"
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 13/20] gnu: mig/32-bit: Remove.
(address . 62307@debbugs.gnu.org)
20230328142852.26635-14-ludo@gnu.org
From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/hurd.scm (mig/32-bit): Remove unneeded variant.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/hurd.scm | 11 -----------
1 file changed, 11 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index be9e7a9071..4e56f48b89 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -155,17 +155,6 @@ (define-public mig
communication.")
(license gpl2+)))
-(define-public mig/32-bit
- ;; When cross-compiling from x86_64-linux to i586-gnu, we need this 32-bit
- ;; native MIG.
- (package
- (inherit mig)
- (arguments
- (substitute-keyword-arguments (package-arguments mig)
- ((#:system _ #f)
- "i686-linux")))
- (properties `((hidden? . #t)))))
-
(define-public hurd-headers
;; This commit is now slightly behind 0.9.git20220818 as this one needs a
;; newer glibc
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 09/20] gnu: hurd: Update to 3ff7053.
(address . 62307@debbugs.gnu.org)
20230328142852.26635-10-ludo@gnu.org
From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/packages/hurd.scm (hurd-headers): Do it. Also backport some patches to
make it build, and remove older patches. Also stop pretending we're on
i586-pc-gnu.
(hurd): Remove unneeded patches.
* gnu/packages/patches/hurd-add-without-rump-configure-option.patch:
* gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch:
* gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.patch:
New files.
* gnu/packages/patches/hurd-cross.patch:
* gnu/packages/patches/hurd-xattr.patch: Delete files.
* gnu/local.mk (dist_patch_DATA): Register and unregister them.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/local.mk | 5 +-
gnu/packages/hurd.scm | 113 ++-
...rd-add-without-rump-configure-option.patch | 82 ++
gnu/packages/patches/hurd-cross.patch | 33 -
...f-read-write-and-readables-methods-2.patch | 155 +++
...-of-read-write-and-readables-methods.patch | 891 ++++++++++++++++++
gnu/packages/patches/hurd-xattr.patch | 53 --
7 files changed, 1186 insertions(+), 146 deletions(-)
create mode 100644 gnu/packages/patches/hurd-add-without-rump-configure-option.patch
delete mode 100644 gnu/packages/patches/hurd-cross.patch
create mode 100644 gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch
create mode 100644 gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.patch
delete mode 100644 gnu/packages/patches/hurd-xattr.patch

Toggle diff (487 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 6c029db944..b0483b4692 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1325,8 +1325,9 @@ dist_patch_DATA = \
%D%/packages/patches/htslib-for-stringtie.patch \
%D%/packages/patches/hubbub-sort-entities.patch \
%D%/packages/patches/hueplusplus-mbedtls.patch \
- %D%/packages/patches/hurd-cross.patch \
- %D%/packages/patches/hurd-xattr.patch \
+ %D%/packages/patches/hurd-add-without-rump-configure-option.patch \
+ %D%/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch \
+ %D%/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.patch \
%D%/packages/patches/hwloc-1-test-btrfs.patch \
%D%/packages/patches/i7z-gcc-10.patch \
%D%/packages/patches/icecat-makeicecat.patch \
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index dbbe4d4cc6..bf252cb6e6 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -167,65 +167,64 @@ (define-public mig/32-bit
(properties `((hidden? . #t)))))
(define-public hurd-headers
- ;; Resort to a post-0.9 snapshot that provides the 'file_utimens' and
- ;; 'file_exec_paths' RPCs that glibc 2.28 expects.
- (let ((revision "1")
- (commit "91a51672ff4cfe1f1a0712b4c542ded3081c825b"))
- (package
- (name "hurd-headers")
- (version (git-version "0.9" revision commit))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://git.savannah.gnu.org/git/hurd/hurd.git")
- (commit commit)))
- (sha256
- (base32
- "16k9wkahz9wasviijz53n6i13nmiwa9fs64ikf1jqh8rl60hw7cz"))
- (file-name (git-file-name name version))))
- (build-system gnu-build-system)
- (native-inputs
- (list mig autoconf automake))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'install
- (lambda _
- (invoke "make" "install-headers" "no_deps=t")))
- (delete 'build))
+ ;; This commit is now slightly behind 0.9.git20220818 as this one needs a
+ ;; newer glibc
+ (let ((revision "2")
+ (commit "3ff70531ee672f431dbb0c11f286bfe85dce98fc"))
+ (package
+ (name "hurd-headers")
+ (version (git-version "0.9" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.savannah.gnu.org/git/hurd/hurd.git")
+ (commit commit)))
+ (sha256
+ (base32
+ "1jb9f2h2v4lf6acsji1c12aqg3pixkvjdyb4q6axkd8jp22fdgc0"))
+ (file-name (git-file-name name version))
+ (patches (search-patches "hurd-add-without-rump-configure-option.patch"
+ "hurd-fix-types-of-read-write-and-readables-methods.patch"
+ "hurd-fix-types-of-read-write-and-readables-methods-2.patch"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ (list autoconf automake mig))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (lambda _
+ (invoke "make" "install-headers" "no_deps=t")))
+ (delete 'build))
- #:configure-flags '( ;; Pretend we're on GNU/Hurd; 'configure' wants
- ;; that.
- ,@(if (%current-target-system)
- '()
- '("--host=i586-pc-gnu"))
+ #:configure-flags '( ;; Reduce set of dependencies.
+ "--without-parted"
+ "--disable-ncursesw"
+ "--disable-test"
+ "--without-libbz2"
+ "--without-libcrypt"
+ "--without-libz"
+ "--without-rump"
+ ;; Skip the clnt_create check because it expects
+ ;; a working glibc causing a circular dependency.
+ "ac_cv_search_clnt_create=no"
- ;; Reduce set of dependencies.
- "--without-parted"
- "--disable-ncursesw"
- "--disable-test"
- "--without-libbz2"
- "--without-libcrypt"
- "--without-libz"
- ;; Skip the clnt_create check because it expects
- ;; a working glibc causing a circular dependency.
- "ac_cv_search_clnt_create=no"
+ ;; Annihilate the checks for the 'file_exec_paths'
+ ;; & co. libc functions to avoid "link tests are
+ ;; not allowed after AC_NO_EXECUTABLES" error.
+ "ac_cv_func_file_exec_paths=no"
+ "ac_cv_func_exec_exec_paths=no"
+ "ac_cv_func__hurd_exec_paths=no"
+ "ac_cv_func__hurd_libc_proc_init=no"
+ "ac_cv_func_file_futimens=no")
- ;; Annihilate the checks for the 'file_exec_paths'
- ;; & co. libc functions to avoid "link tests are
- ;; not allowed after AC_NO_EXECUTABLES" error.
- "ac_cv_func_file_exec_paths=no"
- "ac_cv_func_exec_exec_paths=no"
- "ac_cv_func__hurd_exec_paths=no"
- "ac_cv_func_file_futimens=no")
-
- #:tests? #f))
- (home-page "https://www.gnu.org/software/hurd/hurd.html")
- (synopsis "GNU Hurd headers")
- (description
- "This package provides C headers of the GNU Hurd, used to build the GNU C
+ #:tests? #f))
+ (home-page "https://www.gnu.org/software/hurd/hurd.html")
+ (synopsis "GNU Hurd headers")
+ (description
+ "This package provides C headers of the GNU Hurd, used to build the GNU C
Library and other user programs.")
- (license gpl2+))))
+ (license gpl2+))))
(define-public hurd-minimal
(package (inherit hurd-headers)
@@ -346,10 +345,8 @@ (define dde-sources
(define-public hurd
(package
(name "hurd")
+ (source (package-source hurd-headers))
(version (package-version hurd-headers))
- (source (origin (inherit (package-source hurd-headers))
- (patches (search-patches "hurd-cross.patch"
- "hurd-xattr.patch"))))
(arguments
`(#:phases
(modify-phases %standard-phases
diff --git a/gnu/packages/patches/hurd-add-without-rump-configure-option.patch b/gnu/packages/patches/hurd-add-without-rump-configure-option.patch
new file mode 100644
index 0000000000..14cefdeac1
--- /dev/null
+++ b/gnu/packages/patches/hurd-add-without-rump-configure-option.patch
@@ -0,0 +1,82 @@
+From 80bc1678b7b859decae536e726a3e5870cbe84eb Mon Sep 17 00:00:00 2001
+Message-Id: <80bc1678b7b859decae536e726a3e5870cbe84eb.1678657122.git.dev@jpoiret.xyz>
+In-Reply-To: <c9b816085272dd07ed762c5ae775a994fa77df56.1678657122.git.dev@jpoiret.xyz>
+References: <c9b816085272dd07ed762c5ae775a994fa77df56.1678657122.git.dev@jpoiret.xyz>
+From: Josselin Poiret <dev@jpoiret.xyz>
+Date: Mon, 31 Oct 2022 13:39:28 +0100
+Subject: [PATCH 2/2] Add --without-rump configure option
+
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+To allow cross-builds which cannot use AC_LINK_IFELSE at all.
+---
+ configure.ac | 47 ++++++++++++++++++++++++++---------------------
+ 1 file changed, 26 insertions(+), 21 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0c1bf9b2..849b5fad 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -234,33 +234,38 @@ AS_IF([test "x$with_libz" != xno], [
+ ])
+ AC_SUBST([HAVE_LIBZ])
+
+-# Save
+-oldLIBS="$LIBS"
++AC_ARG_WITH([rump],
++ [AS_HELP_STRING([--without-rump], [disable rump])], , [with_rump=yes])
+
+-LIBS="$oldLIBS -lrump"
+-AC_LINK_IFELSE(
+- [AC_LANG_PROGRAM(
+- [[#include <hurd.h>
++AS_IF([test "x$with_rump" != xno], [
++ # Save
++ oldLIBS="$LIBS"
++
++ LIBS="$oldLIBS -lrump"
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM(
++ [[#include <hurd.h>
+ #define _STANDALONE
+ #include <rump/rump.h>]],
+- [])],
+- [HAVE_LIBRUMP=yes],
+- [HAVE_LIBRUMP=no])
+-AC_SUBST([HAVE_LIBRUMP])
+-
+-LIBS="$oldLIBS -lrumpvfs_nofifofs_pic"
+-AC_LINK_IFELSE(
+- [AC_LANG_PROGRAM(
+- [[#include <hurd.h>
++ [])],
++ [HAVE_LIBRUMP=yes],
++ [HAVE_LIBRUMP=no])
++ AC_SUBST([HAVE_LIBRUMP])
++
++ LIBS="$oldLIBS -lrumpvfs_nofifofs_pic"
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM(
++ [[#include <hurd.h>
+ #define _STANDALONE
+ #include <rump/rump.h>]],
+- [])],
+- [HAVE_LIBRUMP_VFSNOFIFO=yes],
+- [HAVE_LIBRUMP_VFSNOFIFO=no])
+-AC_SUBST([HAVE_LIBRUMP_VFSNOFIFO])
++ [])],
++ [HAVE_LIBRUMP_VFSNOFIFO=yes],
++ [HAVE_LIBRUMP_VFSNOFIFO=no])
++ AC_SUBST([HAVE_LIBRUMP_VFSNOFIFO])
+
+-# Reset
+-LIBS="$oldLIBS"
++ # Reset
++ LIBS="$oldLIBS"
++])
+
+ AC_ARG_ENABLE(boot-store-types,
+ [ --enable-boot-store-types=TYPES...
+--
+2.39.1
+
diff --git a/gnu/packages/patches/hurd-cross.patch b/gnu/packages/patches/hurd-cross.patch
deleted file mode 100644
index cc95dddccc..0000000000
--- a/gnu/packages/patches/hurd-cross.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-This fixes linking libfstest/test-fcntl (and others).
-
-As discussed with upstream: https://lists.gnu.org/archive/html/bug-hurd/2020-03/msg00018.html
-
-From 96a9f67a8685e713f25259c18306797d54cc27a5 Mon Sep 17 00:00:00 2001
-From: Jan Nieuwenhuizen <janneke@gnu.org>
-Date: Sat, 14 Mar 2020 11:28:31 +0100
-Subject: [PATCH] build: Fix cross build on Guix.
-
-As discussed in https://lists.gnu.org/archive/html/bug-hurd/2020-03/msg00018.html.
-
-* Makeconf (lpath): Add -Wl,-rpath-link=<dir> next to -L<dir>.
----
- Makeconf | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/Makeconf b/Makeconf
-index 67f7ab1c..f68ff6e3 100644
---- a/Makeconf
-+++ b/Makeconf
-@@ -325,7 +325,8 @@ _libsubst=${libsubst$(patsubst %,-override,${libsubst-override})}
-
- # Direct the linker where to find shared objects specified in the
- # dependencies of other shared objects it encounters.
--lpath := -L. $(patsubst %,-L%,$(dir $(wildcard ../lib*/lib*.so)))
-+lib_dirs := $(dir $(wildcard ../lib*/lib*.so))
-+lpath := -L. $(lib_dirs:%=-L%) $(lib_dirs:%=-Wl,-rpath-link=%)
-
- # Main rule to link executables
- #
---
-2.24.0
-
diff --git a/gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch b/gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch
new file mode 100644
index 0000000000..dda95fb3d5
--- /dev/null
+++ b/gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch
@@ -0,0 +1,155 @@
+From eb1b2057d839249c955189c2cba8bc37c66d4151 Mon Sep 17 00:00:00 2001
+Message-Id: <eb1b2057d839249c955189c2cba8bc37c66d4151.1678793830.git.dev@jpoiret.xyz>
+In-Reply-To: <f0cacda83293e4d792b8d12665fcb795dc11d6fc.1678793830.git.dev@jpoiret.xyz>
+References: <f0cacda83293e4d792b8d12665fcb795dc11d6fc.1678793830.git.dev@jpoiret.xyz>
+From: Josselin Poiret <dev@jpoiret.xyz>
+Date: Tue, 30 Aug 2022 00:59:59 +0200
+Subject: [PATCH 2/2] Fix types of read write and readables methods
+
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+This completes 5adb4b834b1e
+---
+ hurd/pci.defs | 2 +-
+ lwip/io-ops.c | 6 +++---
+ lwip/port/netif/hurdtunif.c | 6 +++---
+ lwip/socket-ops.c | 4 ++--
+ pci-arbiter/pci-ops.c | 4 ++--
+ storeio/open.c | 2 +-
+ 6 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/hurd/pci.defs b/hurd/pci.defs
+index 23c90334..e258f5ce 100644
+--- a/hurd/pci.defs
++++ b/hurd/pci.defs
+@@ -51,7 +51,7 @@ routine pci_conf_write(
+ */
+ routine pci_get_ndevs(
+ master: pci_t;
+- out ndevs: vm_size_t
++ out ndevs: mach_msg_type_number_t
+ );
+
+ /*
+diff --git a/lwip/io-ops.c b/lwip/io-ops.c
+index 5461d695..6cc724ce 100644
+--- a/lwip/io-ops.c
++++ b/lwip/io-ops.c
+@@ -36,7 +36,7 @@ error_t
+ lwip_S_io_write (struct sock_user *user,
+ const_data_t data,
+ size_t datalen,
+- off_t offset, mach_msg_type_number_t * amount)
++ off_t offset, vm_size_t * amount)
+ {
+ int sent;
+ int sockflags;
+@@ -59,7 +59,7 @@ lwip_S_io_write (struct sock_user *user,
+ error_t
+ lwip_S_io_read (struct sock_user * user,
+ data_t *data,
+- size_t * datalen, off_t offset, mach_msg_type_number_t amount)
++ size_t * datalen, off_t offset, vm_size_t amount)
+ {
+ error_t err;
+ int alloced = 0;
+@@ -112,7 +112,7 @@ lwip_S_io_seek (struct sock_user * user,
+ }
+
+ error_t
+-lwip_S_io_readable (struct sock_user * user, mach_msg_type_number_t * amount)
++lwip_S_io_readable (struct sock_user * user, vm_size_t * amount)
+ {
+ error_t err;
+ if (!user)
+diff --git a/lwip/port/netif/hurdtunif.c b/lwip/port/netif/hurdtunif.c
+index 79a082cf..c976703f 100644
+--- a/lwip/port/netif/hurdtunif.c
++++ b/lwip/port/netif/hurdtunif.c
+@@ -348,7 +348,7 @@ error_t
+ trivfs_S_io_read (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+ data_t *data, mach_msg_type_number_t * data_len,
+- loff_t offs, size_t amount)
++ loff_t offs, vm_size_t amount)
+ {
+ struct hurdtunif *tunif;
+ struct pbuf *p;
+@@ -423,7 +423,7 @@ trivfs_S_io_write (struct trivfs_protid * cred,
+ mach_msg_type_name_t replytype,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+- off_t offset, mach_msg_type_number_t * amount)
++ off_t offset, vm_size_t * amount)
+ {
+ struct netif *netif;
+ struct pbuf *p, *q;
+@@ -482,7 +482,7 @@ trivfs_S_io_write (struct trivfs_protid * cred,
+ kern_return_t
+ trivfs_S_io_readable (struct trivfs_protid * cred,
+ mach_port_t reply, mach_msg_type_name_t replytype,
+- mach_msg_type_number_t * amount)
++ vm_size_t * amount)
+ {
+ struct hurdtunif *tunif;
+
+diff --git a/lwip/socket-ops.c b/lwip/socket-ops.c
+index 5b50f58c..d5e3cb07 100644
+--- a/lwip/socket-ops.c
++++ b/lwip/socket-ops.c
+@@ -342,7 +342,7 @@ lwip_S_socket_send (struct sock_user * user,
+ const mach_port_t * ports,
+ size_t nports,
+ const char *control,
+- size_t controllen, mach_msg_type_number_t * amount)
++ size_t controllen, vm_size_t * amount)
+ {
+ int sent;
+ int sockflags;
+@@ -392,7 +392,7 @@ lwip_S_socket_recv (struct sock_user * user,
+ size_t * nports,
+ char **control,
+ size_t * controllen,
+- int *outflags, mach_msg_type_number_t amount)
++ int *outflags, vm_size_t amount)
+ {
+ error_t err;
+ union { struct sockaddr_storage storage; struct sockaddr sa; } addr;
+diff --git a/pci-arbiter/pci-ops.c b/pci-arbiter/pci-ops.c
+index ef27a3cd..d721f368 100644
+--- a/pci-arbiter/pci-ops.c
++++ b/pci-arbiter/pci-ops.c
+@@ -80,7 +80,7 @@ calculate_ndevs (struct iouser *user)
+ */
+ error_t
+ S_pci_conf_read (struct protid * master, int reg, char **data,
+- size_t * datalen, mach_msg_type_number_t amount)
++ size_t * datalen, vm_size_t amount)
+ {
+ error_t err;
+ pthread_mutex_t *lock;
+@@ -129,7 +129,7 @@ S_pci_conf_read (struct protid * master, int reg, char **data,
+ /* Write `datalen' bytes from `data'. `amount' is updated. */
+ error_t
+ S_pci_conf_write (struct protid * master, int reg, const char *data, size_t datalen,
+- mach_msg_type_number_t * amount)
++ vm_size_t * amount)
+ {
+ error_t err;
+ pthread_mutex_t *lock;
+diff --git a/storeio/open.c b/storeio/open.c
+index f8eb6ce0..74902520 100644
+--- a/storeio/open.c
++++ b/storeio/open.c
+@@ -75,7 +75,7 @@ open_write (struct open *open, off_t offs, const void *buf, size_t len,
+ otherwise the error code is returned. */
+ error_t
+ open_read (struct open *open, off_t offs, vm_size_t amount,
+- void **buf, size_t *len)
++ void **buf, vm_size_t *len)
+ {
+ error_t err;
+ if (offs < 0)
+--
+2.39.1
+
diff --git a/gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.patch b/gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.patch
new file mode 100644
index 0000000000..aebe8d6847
--- /dev/null
+++ b/gnu/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.patch
@@ -0,0 +1,891 @@
+From 5adb4b834b1eba82b7f3eca6324bed0355cae0af Mon Sep 17 00:00:00 2001
+Message-Id: <5adb4b834b1eba82b7f3eca6324bed0355cae0af.1678815112.git.dev@jpoiret.xyz>
+From: Josselin Poiret <dev@jpoiret.xyz>
+Date: Mon, 29 Aug 2022 21:36:17 +0200
+Subject: [PATCH] Fix types of read write and readables methods
+
+From: Etienne Brateau <etienne.brateau@gmail.com>
+
+Message-Id: <20220829193617.13481-1-etienne.brateau@gmail.com>
+---
+ boot/boot.c | 6 +++---
+ console-client/trans.c | 4 ++--
+ libdiskfs/io-read.c | 2 +-
+ libdiskfs/io-readable.c | 2 +-
+ libdiskfs/io-write.c | 2 +-
+ libnetfs/io-read.c | 2 +-
+ libnetfs/io-readable.c | 2 +-
+ libnetfs/io-write.c | 2 +-
+ libpager/data-return.c | 2 +-
+ libstore/nbd.c | 6 +++---
+ libstore/rdwr.c | 4 ++--
+ libtrivfs/io-read.c | 2 +-
+ libtrivfs/io-readable.c | 2 +-
+ libtrivfs/io-write.c | 2 +-
+ mach-defpager/default_pager.c | 4 ++--
+ pfinet/io-ops.c | 10 +++++-----
+ pfinet/socket-ops.c | 16 ++++++++--------
+ pfinet/tunnel.c | 6 +++---
+ pflocal/io.c | 6 +++---
+ pflocal/socket.c | 14 +++++++-------
+ storeio/io.c | 8 ++++----
+ storeio/open.c | 4 ++--
+ storeio/open.h | 6 +++---
+ term/ptyio.c | 4 ++--
+ term/term.h | 4 ++--
+ term/users.c | 14 +++++++-------
+ trans/fifo.c | 10 +++++-----
+ trans/firmlink.c | 4 ++--
+ trans/hello-mt.c | 2 +-
+ trans/hello.c | 2 +-
+ trans/mtab.c | 4 +
This message was truncated. Download the full message here.
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 14/20] system: hurd: Use shepherd-0.8 in the package list.
(address . 62307@debbugs.gnu.org)
20230328142852.26635-15-ludo@gnu.org
From: Josselin Poiret <dev@jpoiret.xyz>

* gnu/system/hurd.scm (%base-packages/hurd): Change shepherd to shepherd-0.8,
since the former uses fibers, and thus conflicts with the shepherd-0.8 we use in
the default essential services.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/system/hurd.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index 20dc4ae735..558d1ee9e3 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -68,7 +68,7 @@ (define %base-packages/hurd
;; Note: the Shepherd comes before the Hurd, not just because its duty is to
;; shepherd the herd, but also because we want its 'halt' and 'reboot'
;; commands to take precedence.
- (list shepherd hurd bash coreutils file findutils grep sed
+ (list shepherd-0.8 hurd bash coreutils file findutils grep sed
diffutils patch gawk tar gzip bzip2 xz lzip
guile-3.0-latest guile-colorized guile-readline
net-base inetutils less shadow sudo which
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 15/20] gnu: linux-pam: Switch to gexps.
(address . 62307@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20230328142852.26635-16-ludo@gnu.org
* gnu/packages/linux.scm (linux-pam)[arguments]: Switch to gexps.
---
gnu/packages/linux.scm | 41 +++++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 20 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index b39b0637c5..1c770bf9ba 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1804,28 +1804,29 @@ (define-public linux-pam
;; ("cracklib" ,cracklib)
))
(arguments
- `(;; Most users, such as `shadow', expect the headers to be under
- ;; `security'.
- #:configure-flags (list (string-append "--includedir="
- (assoc-ref %outputs "out")
- "/include/security")
- ;; explicit libdir for pkgconfig files
- ;; drop with 1.5.3, which fixes
- ;; https://github.com/linux-pam/linux-pam/issues/466
- (string-append "--libdir="
- (assoc-ref %outputs "out")
- "/lib")
+ (list
+ ;; Most users, such as `shadow', expect the headers to be under
+ ;; `security'.
+ #:configure-flags #~(list (string-append "--includedir="
+ (assoc-ref %outputs "out")
+ "/include/security")
+ ;; explicit libdir for pkgconfig files
+ ;; drop with 1.5.3, which fixes
+ ;; https://github.com/linux-pam/linux-pam/issues/466
+ (string-append "--libdir="
+ (assoc-ref %outputs "out")
+ "/lib")
- ;; XXX: <rpc/rpc.h> is missing from glibc when
- ;; cross-compiling, so we have to disable NIS
- ;; support altogether.
- ,@(if (%current-target-system)
- '("--disable-nis")
- '()))
+ ;; XXX: <rpc/rpc.h> is missing from glibc when
+ ;; cross-compiling, so we have to disable NIS
+ ;; support altogether.
+ #$@(if (%current-target-system)
+ #~("--disable-nis")
+ #~()))
- ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
- ;; isn't available.
- #:tests? #f))
+ ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
+ ;; isn't available.
+ #:tests? #f))
(home-page "http://www.linux-pam.org/")
(synopsis "Pluggable authentication modules for Linux")
(description
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 16/20] gnu: linux-pam: Allow compilation on GNU/Hurd.
(address . 62307@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20230328142852.26635-17-ludo@gnu.org
* gnu/packages/linux.scm (linux-pam)[arguments]: Add #:phases.
---
gnu/packages/linux.scm | 10 ++++++++++
1 file changed, 10 insertions(+)

Toggle diff (23 lines)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1c770bf9ba..a63eeeb706 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1824,6 +1824,16 @@ (define-public linux-pam
#~("--disable-nis")
#~()))
+ #:phases (if (target-hurd?)
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'skip-pam-limits
+ (lambda _
+ ;; 'pam_limits.c' uses <sys/prctl.h>, which is
+ ;; Linux-specific. Skip it on GNU/Hurd.
+ (substitute* "modules/Makefile.in"
+ (("pam_limits") "")))))
+ #~%standard-phases)
+
;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
;; isn't available.
#:tests? #f))
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 17/20] gnu: guile-static: Switch to gexps.
(address . 62307@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20230328142852.26635-18-ludo@gnu.org
* gnu/packages/make-bootstrap.scm (make-guile-static): Switch to gexps.
---
gnu/packages/make-bootstrap.scm | 58 ++++++++++++++++-----------------
1 file changed, 29 insertions(+), 29 deletions(-)

Toggle diff (80 lines)
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 2eed01ece8..6bafc5697c 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -613,44 +613,44 @@ (define* (make-guile-static guile patches)
(replace "libgc" libgc/static-libs)))
(arguments
(substitute-keyword-arguments (package-arguments guile)
- ((#:configure-flags flags '())
+ ((#:configure-flags flags #~'())
;; When `configure' checks for ltdl availability, it
;; doesn't try to link using libtool, and thus fails
;; because of a missing -ldl. Work around that.
- `(list "LDFLAGS=-ldl" "--enable-mini-gmp"
+ #~(list "LDFLAGS=-ldl" "--enable-mini-gmp"
- ;; Guile does an LTO build by default, but in 3.0.9 it
- ;; wrongfully picks 'ar' instead of 'gcc-ar', so work around
- ;; it (see <https://issues.guix.gnu.org/61086>).
- ,@(if (version-prefix? "3.0" (package-version guile))
- '("AR=gcc-ar" "RANLIB=gcc-ranlib")
- '())
+ ;; Guile does an LTO build by default, but in 3.0.9 it
+ ;; wrongfully picks 'ar' instead of 'gcc-ar', so work around
+ ;; it (see <https://issues.guix.gnu.org/61086>).
+ #$@(if (version-prefix? "3.0" (package-version guile))
+ #~("AR=gcc-ar" "RANLIB=gcc-ranlib")
+ #~())
- ,@(if (hurd-target?)
- '("--disable-jit")
- '())))
+ #$@(if (hurd-target?)
+ #~("--disable-jit")
+ #~())))
((#:phases phases '%standard-phases)
- `(modify-phases ,phases
+ #~(modify-phases #$phases
- ;; Do not record the absolute file name of 'sh' in
- ;; (ice-9 popen). This makes 'open-pipe' unusable in
- ;; a build chroot ('open-pipe*' is fine) but avoids
- ;; keeping a reference to Bash.
- (delete 'pre-configure)
+ ;; Do not record the absolute file name of 'sh' in
+ ;; (ice-9 popen). This makes 'open-pipe' unusable in
+ ;; a build chroot ('open-pipe*' is fine) but avoids
+ ;; keeping a reference to Bash.
+ (delete 'pre-configure)
- (add-before 'configure 'static-guile
- (lambda _
- (substitute* "libguile/Makefile.in"
- ;; Create a statically-linked `guile'
- ;; executable.
- (("^guile_LDFLAGS =")
- "guile_LDFLAGS = -all-static")
+ (add-before 'configure 'static-guile
+ (lambda _
+ (substitute* "libguile/Makefile.in"
+ ;; Create a statically-linked `guile'
+ ;; executable.
+ (("^guile_LDFLAGS =")
+ "guile_LDFLAGS = -all-static")
- ;; Add `-ldl' *after* libguile-2.0.la.
- (("^guile_LDADD =(.*)$" _ ldadd)
- (string-append "guile_LDADD = "
- (string-trim-right ldadd)
- " -ldl\n")))))))
+ ;; Add `-ldl' *after* libguile-2.0.la.
+ (("^guile_LDADD =(.*)$" _ ldadd)
+ (string-append "guile_LDADD = "
+ (string-trim-right ldadd)
+ " -ldl\n")))))))
((#:tests? _ #f)
;; There are uses of `dynamic-link' in
;; {foreign,coverage}.test that don't fly here.
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 18/20] gnu: guile: Switch to gexps.
(address . 62307@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20230328142852.26635-19-ludo@gnu.org
* gnu/packages/guile.scm (guile-3.0)[arguments]: Switch to gexps.
(guile-next)[arguments]: Likewise.
---
gnu/packages/guile.scm | 113 +++++++++++++++++++++--------------------
1 file changed, 57 insertions(+), 56 deletions(-)

Toggle diff (143 lines)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 2adf271d07..d18c155ab3 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -58,6 +58,7 @@ (define-module (gnu packages guile)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages version-control)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -344,51 +345,51 @@ (define-public guile-3.0
;; cross-compiling.
((#:parallel-build? _ #f)
(not (%current-target-system)))
- ((#:configure-flags flags ''())
+ ((#:configure-flags flags #~'())
;; XXX: JIT-enabled Guile crashes in obscure ways on GNU/Hurd.
- `(cons* ,@(if (hurd-target?)
- '("--disable-jit")
- '())
- ;; -fexcess-precision=standard is required when compiling for
- ;; i686-linux, otherwise "numbers.test" will fail
- ;; (see <https://issues.guix.gnu.org/49368> and
- ;; <https://issues.guix.gnu.org/49659>).
- ;; TODO: Keep this in GUILE-2.2 and remove from here on next
- ;; rebuild cycle.
- ,@(if (target-x86-32?)
- '("CFLAGS=-g -O2 -fexcess-precision=standard")
- '())
- "--enable-mini-gmp"
- '("--disable-static")))
+ #~(cons* #$@(if (hurd-target?)
+ #~("--disable-jit")
+ #~())
+ ;; -fexcess-precision=standard is required when compiling for
+ ;; i686-linux, otherwise "numbers.test" will fail
+ ;; (see <https://issues.guix.gnu.org/49368> and
+ ;; <https://issues.guix.gnu.org/49659>).
+ ;; TODO: Keep this in GUILE-2.2 and remove from here on next
+ ;; rebuild cycle.
+ #$@(if (target-x86-32?)
+ #~("CFLAGS=-g -O2 -fexcess-precision=standard")
+ #~())
+ "--enable-mini-gmp"
+ '("--disable-static")))
((#:phases phases)
- `(modify-phases ,phases
- (add-before 'check 'disable-stack-overflow-test
- (lambda _
- ;; This test can invoke the "OOM killer", especially when
- ;; running on emulated hardware (QEMU). Skip it.
- (substitute* "test-suite/standalone/test-stack-overflow"
- (("!#")
- "!#\n(exit 77)\n"))))
+ #~(modify-phases #$phases
+ (add-before 'check 'disable-stack-overflow-test
+ (lambda _
+ ;; This test can invoke the "OOM killer", especially when
+ ;; running on emulated hardware (QEMU). Skip it.
+ (substitute* "test-suite/standalone/test-stack-overflow"
+ (("!#")
+ "!#\n(exit 77)\n"))))
- ,@(if (target-ppc32?)
- `((add-after 'unpack 'adjust-bootstrap-flags
- (lambda _
- ;; Upstream knows about suggested solution.
- ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214
- ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977223#46
- (substitute* "stage0/Makefile.in"
- (("^GUILE_OPTIMIZATIONS.*")
- "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n")))))
- '())
- ,@(if (or (target-ppc32?)
- (target-riscv64?))
- `((add-after 'unpack 'skip-failing-fdes-test
- (lambda _
- ;; ERROR: ((system-error "seek" "~A" ("Bad file descriptor") (9)))
- (substitute* "test-suite/tests/ports.test"
- (("fdes not closed\"" all) (string-append all "(exit 77)")))
- #t)))
- '())))))
+ #$@(if (target-ppc32?)
+ #~((add-after 'unpack 'adjust-bootstrap-flags
+ (lambda _
+ ;; Upstream knows about suggested solution.
+ ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214
+ ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977223#46
+ (substitute* "stage0/Makefile.in"
+ (("^GUILE_OPTIMIZATIONS.*")
+ "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n")))))
+ #~())
+ #$@(if (or (target-ppc32?)
+ (target-riscv64?))
+ #~((add-after 'unpack 'skip-failing-fdes-test
+ (lambda _
+ ;; ERROR: ((system-error "seek" "~A" ("Bad file descriptor") (9)))
+ (substitute* "test-suite/tests/ports.test"
+ (("fdes not closed\"" all) (string-append all "(exit 77)")))
+ #t)))
+ #~())))))
(native-search-paths
(list (search-path-specification
@@ -436,20 +437,20 @@ (define-public guile-next
(arguments
(substitute-keyword-arguments (package-arguments guile-3.0)
((#:phases phases '%standard-phases)
- `(modify-phases ,phases
- (add-before 'bootstrap 'set-version
- (lambda _
- ;; Tell 'git-version-gen' what version this is, or it will
- ;; just pick "UNKNOWN", making it unusable as a replacement
- ;; for 'guile-3.0'. XXX: This is inaccurate when using
- ;; '--with-branch' but using (package-version this-package)
- ;; wouldn't give us a valid version string.
- (call-with-output-file ".tarball-version"
- (lambda (port)
- (display ,version port)))))
- (add-before 'check 'skip-failing-tests
- (lambda _
- (delete-file "test-suite/tests/version.test")))))))
+ #~(modify-phases ,phases
+ (add-before 'bootstrap 'set-version
+ (lambda _
+ ;; Tell 'git-version-gen' what version this is, or it will
+ ;; just pick "UNKNOWN", making it unusable as a replacement
+ ;; for 'guile-3.0'. XXX: This is inaccurate when using
+ ;; '--with-branch' but using (package-version this-package)
+ ;; wouldn't give us a valid version string.
+ (call-with-output-file ".tarball-version"
+ (lambda (port)
+ (display #$version port)))))
+ (add-before 'check 'skip-failing-tests
+ (lambda _
+ (delete-file "test-suite/tests/version.test")))))))
(native-inputs
(modify-inputs (package-native-inputs guile-3.0)
(prepend autoconf
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 19/20] gnu: guile-readline: Switch to gexps.
(address . 62307@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20230328142852.26635-20-ludo@gnu.org
* gnu/packages/guile.scm (make-guile-readline): Switch to gexps.
---
gnu/packages/guile.scm | 67 ++++++++++++++++++++++--------------------
1 file changed, 35 insertions(+), 32 deletions(-)

Toggle diff (84 lines)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index d18c155ab3..8e52448d36 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -470,42 +470,45 @@ (define* (make-guile-readline guile #:optional (name "guile-readline"))
(source (package-source guile))
(build-system gnu-build-system)
(arguments
- '(#:configure-flags '("--disable-silent-rules"
- "--enable-mini-gmp") ;for Guile >= 3.0.6
- #:phases (modify-phases %standard-phases
- (add-before 'build 'chdir
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke "make" "-C" "libguile" "scmconfig.h")
- (invoke "make" "-C" "lib")
- (chdir "guile-readline")
+ (list #:configure-flags
+ #~'("--disable-silent-rules"
+ "--enable-mini-gmp") ;for Guile >= 3.0.6
- (substitute* "Makefile"
- (("../libguile/libguile-[[:graph:]]+\\.la")
- ;; Remove dependency on libguile-X.Y.la.
- "")
- (("^READLINE_LIBS = (.*)$" _ libs)
- ;; Link against the provided libguile.
- (string-append "READLINE_LIBS = "
- "-lguile-$(GUILE_EFFECTIVE_VERSION) "
- libs "\n"))
- (("\\$\\(top_builddir\\)/meta/build-env")
- ;; Use the provided Guile, not the one from
- ;; $(builddir).
- "")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'build 'chdir
+ (lambda* (#:key outputs #:allow-other-keys)
+ (invoke "make" "-C" "libguile" "scmconfig.h")
+ (invoke "make" "-C" "lib")
+ (chdir "guile-readline")
- ;; Install modules to the 'site' directories.
- (("^moddir = .*$")
- "moddir = $(pkgdatadir)/site/$(GUILE_EFFECTIVE_VERSION)\n")
- (("^ccachedir = .*$")
- "ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache\n"))
+ (substitute* "Makefile"
+ (("../libguile/libguile-[[:graph:]]+\\.la")
+ ;; Remove dependency on libguile-X.Y.la.
+ "")
+ (("^READLINE_LIBS = (.*)$" _ libs)
+ ;; Link against the provided libguile.
+ (string-append "READLINE_LIBS = "
+ "-lguile-$(GUILE_EFFECTIVE_VERSION) "
+ libs "\n"))
+ (("\\$\\(top_builddir\\)/meta/build-env")
+ ;; Use the provided Guile, not the one from
+ ;; $(builddir).
+ "")
- ;; Load 'guile-readline.so' from the right place.
- (substitute* "ice-9/readline.scm"
- (("load-extension \"guile-readline\"")
- (format #f "load-extension \
+ ;; Install modules to the 'site' directories.
+ (("^moddir = .*$")
+ "moddir = $(pkgdatadir)/site/$(GUILE_EFFECTIVE_VERSION)\n")
+ (("^ccachedir = .*$")
+ "ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/site-ccache\n"))
+
+ ;; Load 'guile-readline.so' from the right place.
+ (substitute* "ice-9/readline.scm"
+ (("load-extension \"guile-readline\"")
+ (format #f "load-extension \
(string-append ~s \"/lib/guile/\" (effective-version) \"/extensions/guile-readline\")"
- (assoc-ref outputs "out"))))
- #t)))))
+ (assoc-ref outputs "out"))))
+ #t)))))
(home-page (package-home-page guile))
(native-inputs (package-native-inputs guile))
(propagated-inputs (package-propagated-inputs guile))
--
2.39.2
L
L
Ludovic Courtès wrote on 28 Mar 2023 16:28
[PATCH core-updates v2 20/20] gnu: guile: Fix 'posix_spawn' usage for GNU/Hurd.
(address . 62307@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20230328142852.26635-21-ludo@gnu.org
* gnu/packages/guile.scm (guile-3.0)[arguments]: Add
'patch-posix-spawn-usage' phase.
* gnu/packages/patches/guile-hurd-posix-spawn.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/guile.scm | 10 +++++
.../patches/guile-hurd-posix-spawn.patch | 44 +++++++++++++++++++
3 files changed, 55 insertions(+)
create mode 100644 gnu/packages/patches/guile-hurd-posix-spawn.patch

Toggle diff (85 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index b0483b4692..fdc307f540 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1293,6 +1293,7 @@ dist_patch_DATA = \
%D%/packages/patches/guile-fibers-wait-for-io-readiness.patch \
%D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \
%D%/packages/patches/guile-git-adjust-for-libgit2-1.2.0.patch \
+ %D%/packages/patches/guile-hurd-posix-spawn.patch \
%D%/packages/patches/guile-present-coding.patch \
%D%/packages/patches/guile-rsvg-pkgconfig.patch \
%D%/packages/patches/guile-emacs-fix-configure.patch \
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 8e52448d36..8d25614e3a 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -371,6 +371,16 @@ (define-public guile-3.0
(("!#")
"!#\n(exit 77)\n"))))
+ #$@(if (target-hurd?)
+ #~((add-before 'build 'patch-posix-spawn-usage
+ (lambda _
+ ;; TODO: Move patch to 'source' on next rebuild
+ ;; cycle.
+ (define patch
+ #$(local-file
+ (search-patch "guile-hurd-posix-spawn.patch")))
+ (invoke "patch" "--force" "-p1" "-i" patch))))
+ #~())
#$@(if (target-ppc32?)
#~((add-after 'unpack 'adjust-bootstrap-flags
(lambda _
diff --git a/gnu/packages/patches/guile-hurd-posix-spawn.patch b/gnu/packages/patches/guile-hurd-posix-spawn.patch
new file mode 100644
index 0000000000..7cf600b4c2
--- /dev/null
+++ b/gnu/packages/patches/guile-hurd-posix-spawn.patch
@@ -0,0 +1,44 @@
+Fix <https://issues.guix.gnu.org/61095>, which affects GNU/Hurd.
+
+diff --git a/libguile/posix.c b/libguile/posix.c
+index 3a8be94e4..f5fdc544c 100644
+--- a/libguile/posix.c
++++ b/libguile/posix.c
+@@ -1326,7 +1326,14 @@ static void
+ close_inherited_fds_slow (posix_spawn_file_actions_t *actions, int max_fd)
+ {
+ while (--max_fd > 2)
+- posix_spawn_file_actions_addclose (actions, max_fd);
++ {
++ /* Adding invalid file descriptors to an 'addclose' action leads
++ to 'posix_spawn' failures on some operating systems:
++ <https://bugs.gnu.org/61095>. Hence the extra check. */
++ int flags = fcntl (max_fd, F_GETFD, NULL);
++ if ((flags >= 0) && ((flags & FD_CLOEXEC) == 0))
++ posix_spawn_file_actions_addclose (actions, max_fd);
++ }
+ }
+
+ static void
+
+Fix <https://issues.guix.gnu.org/62501>.
+
+diff --git a/test-suite/tests/posix.test b/test-suite/tests/posix.test
+index f20e04453..d5cf47cda 100644
+--- a/test-suite/tests/posix.test
++++ b/test-suite/tests/posix.test
+@@ -431,7 +431,13 @@
+ (let ((str (get-string-all (car input+output))))
+ (close-port (car input+output))
+ (waitpid pid)
+- str)))
++
++ ;; On GNU/Hurd, the exec server prepends 'LD_ORIGIN_PATH' for
++ ;; every program: <https://bugs.gnu.org/62501>. Strip it.
++ (if (and (string=? "GNU" (utsname:sysname (uname)))
++ (string-prefix? "LD_ORIGIN_PATH=" str))
++ (string-drop str (+ 1 (string-index str #\newline)))
++ str))))
+
+ (pass-if-equal "ls /proc/self/fd"
+ "0\n1\n2\n3\n" ;fourth FD is for /proc/self/fd
--
2.39.2
J
J
Josselin Poiret wrote on 28 Mar 2023 19:07
Re: [bug#62307] [PATCH core-updates v2 00/20] Update Hurd and fix build failures
(name . Ludovic Courtès)(address . ludo@gnu.org)
87r0t8st3f.fsf@jpoiret.xyz
Hi Ludo,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (43 lines)
> Hello Guix!
>
> I have good news and bad news.
>
> The bad news is that an image built with:
>
> ./pre-inst-env guix system image -t hurd-qcow2 \
> gnu/system/examples/bare-hurd.tmpl
>
> fails to boot: it hangs right at:
>
> (system* "/hurd/mach-defpager")
>
> Basically, ‘system*’ doesn’t work at the early-boot REPL. This
> was not surprising given <https://issues.guix.gnu.org/61095>, but
> it is now that I’ve fixed it. I’ve also confirmed that the same
> binary works on a “current” (master) childhurd, which means it
> could be something with the new ‘exec’ server or anything in between.
> I think we can keep investigating that separately.
>
> The good news is that ‘--target=i586-pc-gnu’ is back to life. :-)
> Compared to Josselin’s initial patch set, I made the following changes:
>
> • MiG is built from a tarball (which I’ll upload to
> ftp.gnu.org/gnu/guix/mirror after review); building from
> Git introduces a circular dependency in native i586-gnu builds,
> hence the tarball.
>
> • The glibc ‘configure’ issue is worked around in a less invasive
> way as I proposed earlier.
>
> • The GCC/libstdc++ patch application is likewise simplified,
> without introducing a world rebuild.
>
> • ‘system*’ in Guile is fixed.
>
> • ‘linux-pam’ builds again on GNU/Hurd.
>
> If there are no objections I’d like to push that soonish so we can
> move on with the branch.
>
> Thoughts?

Just had a look and built locally. LGTM! Great work (even though it's
still unfinished, but that's for another day).

Best,
--
Josselin Poiret
-----BEGIN PGP SIGNATURE-----

iQHEBAEBCAAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmQjHrQQHGRldkBqcG9p
cmV0Lnh5egAKCRBQXkC5FhcainPDC/9W4f8rMyv0Oh8z3sj8/NnYm/PQRMrIKngl
7TMe8/3vxS78nYvqCYRRp9yDaHRE0V/0OBhfNNzYEwn1y1h11N2cjsLrnwgcVSPV
KidzK7NEmRciwcYZvlR4naxo3ys34kIZd0uvBESm+hz4DtQ2m8Seiia/iMU/o5mc
p0jP3FLxKprDsMmeZOYwAL7wPg0f3LUw7mEkFzSFeF/XFBn4B7M4QrYggR+PmLsT
86oQA0H2tPvQeWZRW0P7t/REr1laWCy2BynRXVfteCONUs7aQrsqo9+MzFFCfN5F
HE71Lb84PYiRLhkrUWbGn6CwjOj0vmRKIj+Xw4DOYzW4vOrcN78UZ87tkfeDv+7m
AvmtuBDUlS72ZneNahPzWixyl5jsB86tImam+pqi7ua6fQOxPWGygrMO6/6RcISF
CnIICb34soDCVqmG7YweC6vwp5wR42RISV4RZnGLZ5swseENGH13zeBQfIxcY8cd
z6uI9zt3wbOqPXjlJ2Jp4CFGIRn3MyQ=
=8O4o
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 30 Mar 2023 12:48
(name . Josselin Poiret)(address . dev@jpoiret.xyz)(address . 62307-done@debbugs.gnu.org)
87h6u2o6qh.fsf@gnu.org
Hi Josselin,

Josselin Poiret <dev@jpoiret.xyz> skribis:

Toggle quote (3 lines)
> Just had a look and built locally. LGTM! Great work (even though it's
> still unfinished, but that's for another day).

Thanks for testing! Pushed as 14cd517e0cb8829b06b5a49f91c762c4a0e52eb5.
I uploaded the MiG tarball to ftp.gnu.org/gnu/guix and adjusted the URL
accordingly.

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 62307@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 62307
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch