* [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures
@ 2023-03-20 22:07 Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 01/15] gnu: glibc/fix-for-hurd-cross: Add new variant Josselin Poiret via Guix-patches via
` (15 more replies)
0 siblings, 16 replies; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:07 UTC (permalink / raw)
To: 62307; +Cc: Josselin Poiret
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
^ permalink raw reply [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 01/15] gnu: glibc/fix-for-hurd-cross: Add new variant.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-22 14:54 ` [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Ludovic Courtès
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 02/15] gnu-build-system: Sneak fixed glibc when cross-building for Hurd Josselin Poiret via Guix-patches via
` (14 subsequent siblings)
15 siblings, 1 reply; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* 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
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 02/15] gnu-build-system: Sneak fixed glibc when cross-building for Hurd.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 01/15] gnu: glibc/fix-for-hurd-cross: Add new variant Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 03/15] gcc-11: Patch libstdc++ libpthread issue for Hurd only Josselin Poiret via Guix-patches via
` (13 subsequent siblings)
15 siblings, 0 replies; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* guix/build-system/gnu.scm (standard-cross-packages): Do it.
---
guix/build-system/gnu.scm | 48 +++++++++++++++++++++++----------------
1 file changed, 28 insertions(+), 20 deletions(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 03/15] gcc-11: Patch libstdc++ libpthread issue for Hurd only.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 01/15] gnu: glibc/fix-for-hurd-cross: Add new variant Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 02/15] gnu-build-system: Sneak fixed glibc when cross-building for Hurd Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-22 16:28 ` [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Ludovic Courtès
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 04/15] cross-base: Factor out cross-mig Josselin Poiret via Guix-patches via
` (12 subsequent siblings)
15 siblings, 1 reply; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* 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
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 04/15] cross-base: Factor out cross-mig.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
` (2 preceding siblings ...)
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 03/15] gcc-11: Patch libstdc++ libpthread issue for Hurd only Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 05/15] cross-base: Add cross arguments to hurd derivatives Josselin Poiret via Guix-patches via
` (11 subsequent siblings)
15 siblings, 0 replies; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* 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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 05/15] cross-base: Add cross arguments to hurd derivatives.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
` (3 preceding siblings ...)
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 04/15] cross-base: Factor out cross-mig Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 06/15] cross-base: Removed useless inputs to xhurd-core-headers Josselin Poiret via Guix-patches via
` (10 subsequent siblings)
15 siblings, 0 replies; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* 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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 06/15] cross-base: Removed useless inputs to xhurd-core-headers.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
` (4 preceding siblings ...)
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 05/15] cross-base: Add cross arguments to hurd derivatives Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 07/15] mig: Update to 1.8+git20220827 Josselin Poiret via Guix-patches via
` (9 subsequent siblings)
15 siblings, 0 replies; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* gnu/packages/cross-base.scm (cross-kernel-headers*): Remove them.
---
gnu/packages/cross-base.scm | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 07/15] mig: Update to 1.8+git20220827.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
` (5 preceding siblings ...)
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 06/15] cross-base: Removed useless inputs to xhurd-core-headers Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 08/15] gnumach: " Josselin Poiret via Guix-patches via
` (8 subsequent siblings)
15 siblings, 0 replies; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* 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
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 08/15] gnumach: Update to 1.8+git20220827.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
` (6 preceding siblings ...)
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 07/15] mig: Update to 1.8+git20220827 Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 09/15] hurd: Update to 91a51672ff4cfe1f1a0712b4c542ded3081c825b Josselin Poiret via Guix-patches via
` (7 subsequent siblings)
15 siblings, 0 replies; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* 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
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 09/15] hurd: Update to 91a51672ff4cfe1f1a0712b4c542ded3081c825b.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
` (7 preceding siblings ...)
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 08/15] gnumach: " Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 10/15] hurd: Remove useless glibc/hurd-headers input Josselin Poiret via Guix-patches via
` (6 subsequent siblings)
15 siblings, 0 replies; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* 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
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 ++++----
+ trans/proxy-defpager.c | 6 +++---
+ trans/random.c | 6 +++---
+ trans/streamio.c | 6 +++---
+ 36 files changed, 97 insertions(+), 97 deletions(-)
+
+diff --git a/boot/boot.c b/boot/boot.c
+index 1b10c86b..f326e5b2 100644
+--- a/boot/boot.c
++++ b/boot/boot.c
+@@ -1412,7 +1412,7 @@ S_io_write (mach_port_t object,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+ off_t offset,
+- mach_msg_type_number_t *amtwritten)
++ vm_size_t *amtwritten)
+ {
+ if (object != pseudo_console)
+ return EOPNOTSUPP;
+@@ -1437,7 +1437,7 @@ S_io_read (mach_port_t object,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+ off_t offset,
+- mach_msg_type_number_t amount)
++ vm_size_t amount)
+ {
+ mach_msg_type_number_t avail;
+
+@@ -1489,7 +1489,7 @@ kern_return_t
+ S_io_readable (mach_port_t object,
+ mach_port_t reply_port,
+ mach_msg_type_name_t reply_type,
+- mach_msg_type_number_t *amt)
++ vm_size_t *amt)
+ {
+ if (object != pseudo_console)
+ return EOPNOTSUPP;
+diff --git a/console-client/trans.c b/console-client/trans.c
+index fe4b9ca4..49e30a61 100644
+--- a/console-client/trans.c
++++ b/console-client/trans.c
+@@ -578,7 +578,7 @@ netfs_S_io_read (struct protid *user,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+ off_t offset,
+- mach_msg_type_number_t amount)
++ vm_size_t amount)
+ {
+ struct node *np;
+
+@@ -597,7 +597,7 @@ netfs_S_io_write (struct protid *user,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+ off_t offset,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ struct node *np;
+
+diff --git a/libdiskfs/io-read.c b/libdiskfs/io-read.c
+index 71803517..a706d677 100644
+--- a/libdiskfs/io-read.c
++++ b/libdiskfs/io-read.c
+@@ -25,7 +25,7 @@ diskfs_S_io_read (struct protid *cred,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+ off_t offset,
+- mach_msg_type_number_t maxread)
++ vm_size_t maxread)
+ {
+ struct node *np;
+ int err;
+diff --git a/libdiskfs/io-readable.c b/libdiskfs/io-readable.c
+index c3debac3..03218bf3 100644
+--- a/libdiskfs/io-readable.c
++++ b/libdiskfs/io-readable.c
+@@ -22,7 +22,7 @@
+ /* Implement io_readable as described in <hurd/io.defs>. */
+ kern_return_t
+ diskfs_S_io_readable (struct protid *cred,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ struct node *np;
+
+diff --git a/libdiskfs/io-write.c b/libdiskfs/io-write.c
+index 154bc887..9efed88f 100644
+--- a/libdiskfs/io-write.c
++++ b/libdiskfs/io-write.c
+@@ -25,7 +25,7 @@ diskfs_S_io_write (struct protid *cred,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+ off_t offset,
+- mach_msg_type_number_t *amt)
++ vm_size_t *amt)
+ {
+ struct node *np;
+ error_t err;
+diff --git a/libnetfs/io-read.c b/libnetfs/io-read.c
+index 2427ce6c..688da1f6 100644
+--- a/libnetfs/io-read.c
++++ b/libnetfs/io-read.c
+@@ -28,7 +28,7 @@ netfs_S_io_read (struct protid *user,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+ off_t offset,
+- mach_msg_type_number_t amount)
++ vm_size_t amount)
+ {
+ error_t err;
+ off_t start;
+diff --git a/libnetfs/io-readable.c b/libnetfs/io-readable.c
+index 07becf66..7c365484 100644
+--- a/libnetfs/io-readable.c
++++ b/libnetfs/io-readable.c
+@@ -25,7 +25,7 @@
+
+ error_t
+ netfs_S_io_readable (struct protid *user,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ error_t err;
+
+diff --git a/libnetfs/io-write.c b/libnetfs/io-write.c
+index 482b45fc..2306d1f0 100644
+--- a/libnetfs/io-write.c
++++ b/libnetfs/io-write.c
+@@ -27,7 +27,7 @@ netfs_S_io_write (struct protid *user,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+ off_t offset,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ error_t err;
+ off_t off = offset;
+diff --git a/libpager/data-return.c b/libpager/data-return.c
+index c0f5aaf7..4c4affe8 100644
+--- a/libpager/data-return.c
++++ b/libpager/data-return.c
+@@ -258,7 +258,7 @@ _pager_S_memory_object_data_return (struct pager *p,
+ mach_port_t control,
+ vm_offset_t offset,
+ pointer_t data,
+- vm_size_t length,
++ mach_msg_type_number_t length,
+ int dirty,
+ int kcopy)
+ {
+diff --git a/libstore/nbd.c b/libstore/nbd.c
+index 3138af01..8e0892e3 100644
+--- a/libstore/nbd.c
++++ b/libstore/nbd.c
+@@ -119,7 +119,7 @@ nbd_write (struct store *store,
+ type: htonl (1), /* WRITE */
+ };
+ error_t err;
+- mach_msg_type_number_t cc;
++ vm_size_t cc;
+
+ addr <<= store->log2_block_size;
+ *amount = 0;
+@@ -178,7 +178,7 @@ nbd_read (struct store *store,
+ requested can be found in CHUNK. */
+ inline error_t request_chunk (char **buf, size_t *len)
+ {
+- mach_msg_type_number_t cc;
++ vm_size_t cc;
+
+ chunk = (amount - ofs) < NBD_IO_MAX ? (amount - ofs) : NBD_IO_MAX;
+
+@@ -435,7 +435,7 @@ nbdclose (struct store *store)
+ magic: NBD_REQUEST_MAGIC,
+ type: htonl (2), /* disconnect */
+ };
+- mach_msg_type_number_t cc;
++ vm_size_t cc;
+ (void) io_write (store->port, (char *) &req, sizeof req, -1, &cc);
+
+ /* Close the socket. */
+diff --git a/libstore/rdwr.c b/libstore/rdwr.c
+index 9737c515..f443ad9f 100644
+--- a/libstore/rdwr.c
++++ b/libstore/rdwr.c
+@@ -120,7 +120,7 @@ store_write (struct store *store,
+ else
+ /* ARGH, we've got to split up the write ... */
+ {
+- mach_msg_type_number_t try, written;
++ vm_size_t try, written;
+
+ /* Write the initial bit in the first run. Errors here are returned. */
+ try = (run->length - addr) << block_shift;
+@@ -138,7 +138,7 @@ store_write (struct store *store,
+ && run->start >= 0) /* Check for holes. */
+ /* Ok, we can write in this run, at least a bit. */
+ {
+- mach_msg_type_number_t seg_written;
++ vm_size_t seg_written;
+
+ if ((len >> block_shift) <= run->length)
+ try = len;
+diff --git a/libtrivfs/io-read.c b/libtrivfs/io-read.c
+index a911f778..4d3302e4 100644
+--- a/libtrivfs/io-read.c
++++ b/libtrivfs/io-read.c
+@@ -26,7 +26,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+ off_t off,
+- mach_msg_type_number_t amt)
++ vm_size_t amt)
+ {
+ assert_backtrace (!trivfs_support_read);
+ return EOPNOTSUPP;
+diff --git a/libtrivfs/io-readable.c b/libtrivfs/io-readable.c
+index de4d32b8..acb3fa52 100644
+--- a/libtrivfs/io-readable.c
++++ b/libtrivfs/io-readable.c
+@@ -23,7 +23,7 @@ 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)
+ {
+ assert_backtrace (!trivfs_support_read);
+ return EOPNOTSUPP;
+diff --git a/libtrivfs/io-write.c b/libtrivfs/io-write.c
+index 74cbb32b..787b2544 100644
+--- a/libtrivfs/io-write.c
++++ b/libtrivfs/io-write.c
+@@ -27,7 +27,7 @@ trivfs_S_io_write (struct trivfs_protid *cred,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+ off_t off,
+- mach_msg_type_number_t *amt)
++ vm_size_t *amt)
+ {
+ if (!(trivfs_allow_open & O_WRITE))
+ return EBADF;
+diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c
+index fd3a7b22..5c1352f4 100644
+--- a/mach-defpager/default_pager.c
++++ b/mach-defpager/default_pager.c
+@@ -2572,7 +2572,7 @@ seqnos_memory_object_data_initialize(ds, seqno, pager_request,
+ vm_offset_t offset;
+ register
+ pointer_t addr;
+- vm_size_t data_cnt;
++ mach_msg_type_number_t data_cnt;
+ {
+ vm_offset_t amount_sent;
+ static char here[] = "%sdata_initialize";
+@@ -2631,7 +2631,7 @@ seqnos_memory_object_data_return(ds, seqno, pager_request,
+ mach_port_t pager_request;
+ vm_offset_t offset;
+ pointer_t addr;
+- vm_size_t data_cnt;
++ mach_msg_type_number_t data_cnt;
+ boolean_t dirty;
+ boolean_t kernel_copy;
+ {
+diff --git a/pfinet/io-ops.c b/pfinet/io-ops.c
+index fa6350c3..6269743d 100644
+--- a/pfinet/io-ops.c
++++ b/pfinet/io-ops.c
+@@ -37,9 +37,9 @@
+ error_t
+ S_io_write (struct sock_user *user,
+ const_data_t data,
+- size_t datalen,
++ mach_msg_type_number_t datalen,
+ off_t offset,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ error_t err;
+ struct iovec iov = { (void*) data, datalen };
+@@ -70,9 +70,9 @@ S_io_write (struct sock_user *user,
+ error_t
+ S_io_read (struct sock_user *user,
+ data_t *data,
+- size_t *datalen,
++ mach_msg_type_number_t *datalen,
+ off_t offset,
+- mach_msg_type_number_t amount)
++ vm_size_t amount)
+ {
+ error_t err;
+ int alloced = 0;
+@@ -135,7 +135,7 @@ S_io_seek (struct sock_user *user,
+
+ error_t
+ S_io_readable (struct sock_user *user,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ struct sock *sk;
+ error_t err;
+diff --git a/pfinet/socket-ops.c b/pfinet/socket-ops.c
+index db1b92cd..8d27c383 100644
+--- a/pfinet/socket-ops.c
++++ b/pfinet/socket-ops.c
+@@ -431,12 +431,12 @@ S_socket_send (struct sock_user *user,
+ struct sock_addr *addr,
+ int flags,
+ const_data_t data,
+- size_t datalen,
++ mach_msg_type_number_t datalen,
+ const mach_port_t *ports,
+- size_t nports,
++ mach_msg_type_number_t nports,
+ const_data_t control,
+- size_t controllen,
+- mach_msg_type_number_t *amount)
++ mach_msg_type_number_t controllen,
++ vm_size_t *amount)
+ {
+ int sent;
+ struct iovec iov = { (void*) data, datalen };
+@@ -478,14 +478,14 @@ S_socket_recv (struct sock_user *user,
+ mach_msg_type_name_t *addrporttype,
+ int flags,
+ data_t *data,
+- size_t *datalen,
++ mach_msg_type_number_t *datalen,
+ mach_port_t **ports,
+ mach_msg_type_name_t *portstype,
+- size_t *nports,
++ mach_msg_type_number_t *nports,
+ data_t *control,
+- size_t *controllen,
++ mach_msg_type_number_t *controllen,
+ int *outflags,
+- mach_msg_type_number_t amount)
++ vm_size_t amount)
+ {
+ error_t err;
+ union { struct sockaddr_storage storage; struct sockaddr sa; } addr;
+diff --git a/pfinet/tunnel.c b/pfinet/tunnel.c
+index 1082404e..e11ab670 100644
+--- a/pfinet/tunnel.c
++++ b/pfinet/tunnel.c
+@@ -291,7 +291,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)
++ off_t offs, vm_size_t amount)
+ {
+ struct tunnel_device *tdev;
+ struct sk_buff *skb;
+@@ -372,7 +372,7 @@ trivfs_S_io_write (struct trivfs_protid *cred,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+ off_t offset,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ struct tunnel_device *tdev;
+ struct sk_buff *skb;
+@@ -415,7 +415,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 tunnel_device *tdev;
+ struct sk_buff *skb;
+diff --git a/pflocal/io.c b/pflocal/io.c
+index 96b2fc48..06749756 100644
+--- a/pflocal/io.c
++++ b/pflocal/io.c
+@@ -44,7 +44,7 @@
+ error_t
+ S_io_read (struct sock_user *user,
+ data_t *data, mach_msg_type_number_t *data_len,
+- off_t offset, mach_msg_type_number_t amount)
++ off_t offset, vm_size_t amount)
+ {
+ error_t err;
+ struct pipe *pipe;
+@@ -80,7 +80,7 @@ S_io_read (struct sock_user *user,
+ error_t
+ S_io_write (struct sock_user *user,
+ const_data_t data, mach_msg_type_number_t data_len,
+- off_t offset, mach_msg_type_number_t *amount)
++ off_t offset, vm_size_t *amount)
+ {
+ error_t err;
+ struct pipe *pipe;
+@@ -119,7 +119,7 @@ S_io_write (struct sock_user *user,
+ a "long time" (this should be the same meaning of "long time" used
+ by the nonblocking flag. */
+ error_t
+-S_io_readable (struct sock_user *user, mach_msg_type_number_t *amount)
++S_io_readable (struct sock_user *user, vm_size_t *amount)
+ {
+ error_t err;
+ struct pipe *pipe;
+diff --git a/pflocal/socket.c b/pflocal/socket.c
+index 8c1ee3e9..8c240e09 100644
+--- a/pflocal/socket.c
++++ b/pflocal/socket.c
+@@ -287,10 +287,10 @@ S_socket_peername (struct sock_user *user,
+ /* Send data over a socket, possibly including Mach ports. */
+ error_t
+ S_socket_send (struct sock_user *user, struct addr *dest_addr, int flags,
+- const_data_t data, size_t data_len,
+- const mach_port_t *ports, size_t num_ports,
+- const_data_t control, size_t control_len,
+- size_t *amount)
++ const_data_t data, mach_msg_type_number_t data_len,
++ const mach_port_t *ports, mach_msg_type_number_t num_ports,
++ const_data_t control, mach_msg_type_number_t control_len,
++ vm_size_t *amount)
+ {
+ error_t err = 0;
+ int noblock;
+@@ -378,11 +378,11 @@ error_t
+ S_socket_recv (struct sock_user *user,
+ mach_port_t *addr, mach_msg_type_name_t *addr_type,
+ int in_flags,
+- data_t *data, size_t *data_len,
++ data_t *data, mach_msg_type_name_t *data_len,
+ mach_port_t **ports, mach_msg_type_name_t *ports_type,
+ size_t *num_ports,
+- data_t *control, size_t *control_len,
+- int *out_flags, size_t amount)
++ data_t *control, mach_msg_type_name_t *control_len,
++ int *out_flags, vm_size_t amount)
+ {
+ error_t err;
+ unsigned flags;
+diff --git a/storeio/io.c b/storeio/io.c
+index 634185f7..3c4cb9ff 100644
+--- a/storeio/io.c
++++ b/storeio/io.c
+@@ -83,8 +83,8 @@ trivfs_S_io_map (struct trivfs_protid *cred,
+ 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, mach_msg_type_number_t amount)
++ data_t *data, mach_msg_type_name_t *data_len,
++ off_t offs, vm_size_t amount)
+ {
+ if (! cred)
+ return EOPNOTSUPP;
+@@ -101,7 +101,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_readable (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ if (! cred)
+ return EOPNOTSUPP;
+@@ -126,7 +126,7 @@ error_t
+ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+ const_data_t data, mach_msg_type_number_t data_len,
+- loff_t offs, mach_msg_type_number_t *amount)
++ off_t offs, vm_size_t *amount)
+ {
+ if (! cred)
+ return EOPNOTSUPP;
+diff --git a/storeio/open.c b/storeio/open.c
+index 4c2870c6..f8eb6ce0 100644
+--- a/storeio/open.c
++++ b/storeio/open.c
+@@ -74,8 +74,8 @@ open_write (struct open *open, off_t offs, const void *buf, size_t len,
+ standard mach out-array convention. If no error occurs, zero is returned,
+ otherwise the error code is returned. */
+ error_t
+-open_read (struct open *open, off_t offs, size_t amount,
+- void **buf, vm_size_t *len)
++open_read (struct open *open, off_t offs, vm_size_t amount,
++ void **buf, size_t *len)
+ {
+ error_t err;
+ if (offs < 0)
+diff --git a/storeio/open.h b/storeio/open.h
+index 6be930a6..ad2678ff 100644
+--- a/storeio/open.h
++++ b/storeio/open.h
+@@ -51,13 +51,13 @@ void open_free (struct open *open);
+ and returns the number of bytes written in AMOUNT. If no error occurs,
+ zero is returned, otherwise the error code is returned. */
+ error_t open_write (struct open *open, off_t offs, const void *buf, size_t len,
+- size_t *amount);
++ vm_size_t *amount);
+
+ /* Reads up to AMOUNT bytes from the device into BUF and BUF_LEN using the
+ standard mach out-array convention. If no error occurs, zero is returned,
+ otherwise the error code is returned. */
+-error_t open_read (struct open *open, off_t offs, size_t amount,
+- void **buf, size_t *buf_len);
++error_t open_read (struct open *open, off_t offs, vm_size_t amount,
++ void **buf, vm_size_t *buf_len);
+
+ /* Set OPEN's location to OFFS, interpreted according to WHENCE as by seek.
+ The new absolute location is returned in NEW_OFFS (and may not be the same
+diff --git a/term/ptyio.c b/term/ptyio.c
+index 928ae0ac..acd1015a 100644
+--- a/term/ptyio.c
++++ b/term/ptyio.c
+@@ -302,7 +302,7 @@ error_t
+ pty_io_read (struct trivfs_protid *cred,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+- mach_msg_type_number_t amount)
++ vm_size_t amount)
+ {
+ int size;
+
+@@ -386,7 +386,7 @@ error_t
+ pty_io_write (struct trivfs_protid *cred,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ int i, flush;
+ int cancel = 0;
+diff --git a/term/term.h b/term/term.h
+index efe27ffa..1e6be5f2 100644
+--- a/term/term.h
++++ b/term/term.h
+@@ -387,9 +387,9 @@ extern dev_t rdev;
+ /* kludge--these are pty versions of trivfs_S_io_* functions called by
+ the real functions in users.c to do work for ptys. */
+ error_t pty_io_write (struct trivfs_protid *, const char *,
+- mach_msg_type_number_t, mach_msg_type_number_t *);
++ mach_msg_type_number_t, vm_size_t *);
+ error_t pty_io_read (struct trivfs_protid *, char **,
+- mach_msg_type_number_t *, mach_msg_type_number_t);
++ mach_msg_type_number_t *, vm_size_t);
+ error_t pty_io_readable (size_t *);
+ error_t pty_io_select (struct trivfs_protid *, mach_port_t,
+ struct timespec *, int *);
+diff --git a/term/users.c b/term/users.c
+index 72f5507d..59f02b66 100644
+--- a/term/users.c
++++ b/term/users.c
+@@ -562,9 +562,9 @@ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_port_t reply,
+ mach_msg_type_name_t replytype,
+ const_data_t data,
+- size_t datalen,
+- loff_t offset,
+- size_t *amt)
++ mach_msg_type_name_t datalen,
++ off_t offset,
++ vm_size_t *amt)
+ {
+ int i;
+ int cancel;
+@@ -640,9 +640,9 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ mach_port_t reply,
+ mach_msg_type_name_t replytype,
+ data_t *data,
+- size_t *datalen,
+- loff_t offset,
+- size_t amount)
++ mach_msg_type_name_t *datalen,
++ off_t offset,
++ vm_size_t amount)
+ {
+ int cancel;
+ int i, max;
+@@ -820,7 +820,7 @@ error_t
+ trivfs_S_io_readable (struct trivfs_protid *cred,
+ mach_port_t reply,
+ mach_msg_type_name_t replytype,
+- size_t *amt)
++ vm_size_t *amt)
+ {
+ if (!cred)
+ return EOPNOTSUPP;
+diff --git a/trans/fifo.c b/trans/fifo.c
+index ce7c7729..894565f6 100644
+--- a/trans/fifo.c
++++ b/trans/fifo.c
+@@ -339,8 +339,8 @@ trivfs_S_io_map (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_read (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- data_t *data, size_t *data_len,
+- off_t offs, size_t amount)
++ data_t *data, mach_msg_type_name_t *data_len,
++ off_t offs, vm_size_t amount)
+ {
+ error_t err;
+
+@@ -368,7 +368,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_readable (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- size_t *amount)
++ vm_size_t *amount)
+ {
+ error_t err;
+
+@@ -502,8 +502,8 @@ trivfs_S_io_select_timeout (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- const_data_t data, size_t data_len,
+- off_t offs, size_t *amount)
++ const_data_t data, mach_msg_type_name_t data_len,
++ off_t offs, vm_size_t *amount)
+ {
+ error_t err;
+
+diff --git a/trans/firmlink.c b/trans/firmlink.c
+index 8a5d01a8..e216146a 100644
+--- a/trans/firmlink.c
++++ b/trans/firmlink.c
+@@ -207,7 +207,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, mach_msg_type_number_t amount)
++ off_t offs, vm_size_t amount)
+ {
+ error_t err = 0;
+
+@@ -244,7 +244,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_readable (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ if (! cred)
+ return EOPNOTSUPP;
+diff --git a/trans/hello-mt.c b/trans/hello-mt.c
+index 92f814d6..e99ba754 100644
+--- a/trans/hello-mt.c
++++ b/trans/hello-mt.c
+@@ -125,7 +125,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, mach_msg_type_number_t amount)
++ off_t offs, vm_size_t amount)
+ {
+ struct open *op;
+
+diff --git a/trans/hello.c b/trans/hello.c
+index f8f9e7ab..0405fad3 100644
+--- a/trans/hello.c
++++ b/trans/hello.c
+@@ -116,7 +116,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, mach_msg_type_number_t amount)
++ off_t offs, vm_size_t amount)
+ {
+ struct open *op;
+
+diff --git a/trans/mtab.c b/trans/mtab.c
+index caff3385..a2feee7d 100644
+--- a/trans/mtab.c
++++ b/trans/mtab.c
+@@ -657,7 +657,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, mach_msg_type_number_t amount)
++ off_t offs, vm_size_t amount)
+ {
+ error_t err = 0;
+ struct mtab *op;
+@@ -774,7 +774,7 @@ void (*trivfs_peropen_destroy_hook) (struct trivfs_peropen *) = close_hook;
+ 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)
+ {
+ error_t err = 0;
+ if (!cred)
+diff --git a/trans/new-fifo.c b/trans/new-fifo.c
+index 9a959a39..3e9a886c 100644
+--- a/trans/new-fifo.c
++++ b/trans/new-fifo.c
+@@ -524,8 +524,8 @@ trivfs_S_io_map (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_read (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- data_t *data, size_t *data_len,
+- off_t offs, size_t amount)
++ data_t *data, mach_msg_type_name_t *data_len,
++ off_t offs, vm_size_t amount)
+ {
+ error_t err;
+
+@@ -554,7 +554,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_readable (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- size_t *amount)
++ vm_size_t *amount)
+ {
+ error_t err;
+
+@@ -689,8 +689,8 @@ trivfs_S_io_select_timeout (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- const_data_t data, size_t data_len,
+- off_t offs, size_t *amount)
++ const_data_t data, mach_msg_type_name_t data_len,
++ off_t offs, vm_size_t *amount)
+ {
+ error_t err;
+
+diff --git a/trans/null.c b/trans/null.c
+index 034bb103..f4ba5582 100644
+--- a/trans/null.c
++++ b/trans/null.c
+@@ -149,8 +149,8 @@ trivfs_S_io_read(struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t replytype,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+- loff_t offs,
+- mach_msg_type_number_t amt)
++ off_t offs,
++ vm_size_t amt)
+ {
+ if (!cred)
+ return EOPNOTSUPP;
+@@ -169,7 +169,7 @@ trivfs_S_io_read(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)
+ {
+ if (!cred)
+ return EOPNOTSUPP;
+@@ -228,7 +228,7 @@ kern_return_t
+ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t replytype,
+ const_data_t data, mach_msg_type_number_t datalen,
+- loff_t offs, mach_msg_type_number_t *amt)
++ off_t offs, vm_size_t *amt)
+ {
+ if (!cred)
+ return EOPNOTSUPP;
+diff --git a/trans/proxy-defpager.c b/trans/proxy-defpager.c
+index 8ca25b72..bfeda063 100644
+--- a/trans/proxy-defpager.c
++++ b/trans/proxy-defpager.c
+@@ -169,8 +169,8 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t replytype,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+- loff_t offs,
+- mach_msg_type_number_t amt)
++ off_t offs,
++ vm_size_t amt)
+ {
+ if (!cred)
+ return EOPNOTSUPP;
+@@ -181,7 +181,7 @@ kern_return_t
+ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t replytype,
+ const_data_t data, mach_msg_type_number_t datalen,
+- loff_t offs, mach_msg_type_number_t *amt)
++ loff_t offs, vm_size_t *amt)
+ {
+ if (!cred)
+ return EOPNOTSUPP;
+diff --git a/trans/random.c b/trans/random.c
+index c230280a..297253e4 100644
+--- a/trans/random.c
++++ b/trans/random.c
+@@ -318,7 +318,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, mach_msg_type_number_t amount)
++ off_t offs, vm_size_t amount)
+ {
+ error_t err;
+ void *buf = NULL;
+@@ -377,8 +377,8 @@ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_msg_type_name_t replytype,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+- loff_t offset,
+- mach_msg_type_number_t *amount)
++ off_t offset,
++ vm_size_t *amount)
+ {
+ /* Deny access if they have bad credentials. */
+ if (! cred)
+diff --git a/trans/streamio.c b/trans/streamio.c
+index 30b8b20e..acd5d674 100644
+--- a/trans/streamio.c
++++ b/trans/streamio.c
+@@ -482,7 +482,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, mach_msg_type_number_t amount)
++ off_t offs, vm_size_t amount)
+ {
+ error_t err;
+
+@@ -501,7 +501,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_readable (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ error_t err;
+
+@@ -521,7 +521,7 @@ error_t
+ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+ const_data_t data, mach_msg_type_number_t data_len,
+- loff_t offs, mach_msg_type_number_t *amount)
++ off_t offs, vm_size_t *amount)
+ {
+ error_t err;
+
+
+base-commit: b6509385bb1dd2a6d47401465bfb98b6339c5c2b
+prerequisite-patch-id: 33c640aa0fcf19d49fff88cc58cecd3be8f7892d
+prerequisite-patch-id: 411256b31780cf9ea0b24efe9f2b20f82c6ce9c1
+prerequisite-patch-id: 830470d11762c6c5e09488a2b834dff0f4f6e434
+prerequisite-patch-id: 1a1293bebf97550d54d9dba3a1817f20a3ef6a2a
+prerequisite-patch-id: f12e5842dea12ed7b0ff4ae3fa2afe78f3647288
+prerequisite-patch-id: 4436fa0181c5e21580e6656634e35febf251dc5b
+prerequisite-patch-id: a938f788841d96151e9e4cc134114dc7652e4f27
+prerequisite-patch-id: bfc7264e11d3ca2dbc520f221cf8bf13857d4732
+prerequisite-patch-id: 50393cc222a3e9de9cfab0762f5acf10e394c9f0
+--
+2.39.1
+
diff --git a/gnu/packages/patches/hurd-xattr.patch b/gnu/packages/patches/hurd-xattr.patch
deleted file mode 100644
index 0a922c91b5..0000000000
--- a/gnu/packages/patches/hurd-xattr.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 75cb948c575fca3962c4cce115d31dd178bc389f Mon Sep 17 00:00:00 2001
-From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
-Date: Tue, 12 May 2020 07:39:59 +0200
-Subject: [PATCH] ext2fs: Update to upstream Hurd-reserved xattr index for
- "gnu.*".
-
-See
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3980bd3b406addb327d858aebd19e229ea340b9a
-
-This supports setting (and reading) of passive trasnlators from
-GNU/Linux, e.g.
-
- dd if=/dev/zero of=file bs=1k count=1000
- losetup /dev/loop0 file
- mke2fs -t ext2 -o hurd -O ext_attr /dev/loop0
- mount -t ext2 -o x-xattr-translator-records /dev/loop0 /mnt
- mkdir -p /mnt/servers/socket
- touch /mnt/servers/socket/1
- setfattr --name=gnu.translator --value='/hurd/pflocal\0' /mnt/servers/socket/1
- getfattr --name=gnu.translator /mnt/servers/socket/1
- # file: 1
- gnu.translator="/hurd/pflocal"
-
-* ext2fs/xattr.c (struct _xattr_prefix): For "gnu.*", use index for
-the Hurd (10).
----
- ext2fs/xattr.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/ext2fs/xattr.c b/ext2fs/xattr.c
-index f6ea0f39..78458214 100644
---- a/ext2fs/xattr.c
-+++ b/ext2fs/xattr.c
-@@ -1,6 +1,6 @@
- /* Ext2 support for extended attributes
-
-- Copyright (C) 2006, 2016 Free Software Foundation, Inc.
-+ Copyright (C) 2006, 2016, 2020 Free Software Foundation, Inc.
-
- Written by Thadeu Lima de Souza Cascardo <cascardo@dcc.ufmg.br>
- and Shengyu Zhang <lastavengers@outlook.com>
-@@ -39,7 +39,7 @@ xattr_prefixes[] =
- {
- 1, "user.", sizeof "user." - 1},
- {
-- 7, "gnu.", sizeof "gnu." - 1},
-+ 10, "gnu.", sizeof "gnu." - 1},
- {
- 0, NULL, 0}
- };
---
-2.26.0
-
--
2.39.2
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 10/15] hurd: Remove useless glibc/hurd-headers input.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
` (8 preceding siblings ...)
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 09/15] hurd: Update to 91a51672ff4cfe1f1a0712b4c542ded3081c825b Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 11/15] gnumach, hurd-headers, hurd: Switch to using cross-mig Josselin Poiret via Guix-patches via
` (5 subsequent siblings)
15 siblings, 0 replies; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* gnu/packages/hurd.scm (hurd): Do it.
---
gnu/packages/hurd.scm | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 11/15] gnumach, hurd-headers, hurd: Switch to using cross-mig.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
` (9 preceding siblings ...)
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 10/15] hurd: Remove useless glibc/hurd-headers input Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 11/15] gnumach, " Josselin Poiret via Guix-patches via
` (4 subsequent siblings)
15 siblings, 0 replies; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* 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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 11/15] gnumach, hurd: Switch to using cross-mig.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
` (10 preceding siblings ...)
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 11/15] gnumach, hurd-headers, hurd: Switch to using cross-mig Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 12/15] hurd: Update DDE and use libdde_linux26 Josselin Poiret via Guix-patches via
` (3 subsequent siblings)
15 siblings, 0 replies; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* 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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 12/15] hurd: Update DDE and use libdde_linux26.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
` (11 preceding siblings ...)
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 11/15] gnumach, " Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 13/15] mig/32-bit: Remove Josselin Poiret via Guix-patches via
` (2 subsequent siblings)
15 siblings, 0 replies; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* 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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 13/15] mig/32-bit: Remove.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
` (12 preceding siblings ...)
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 12/15] hurd: Update DDE and use libdde_linux26 Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 14/15] system: hurd: Use shepherd-0.8 in the package list Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 15/15] system: pam: Only add linux-pam reference if on Linux Josselin Poiret via Guix-patches via
15 siblings, 0 replies; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* gnu/packages/hurd.scm (mig/32-bit): Remove unneeded variant.
---
gnu/packages/hurd.scm | 11 -----------
1 file changed, 11 deletions(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 14/15] system: hurd: Use shepherd-0.8 in the package list.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
` (13 preceding siblings ...)
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 13/15] mig/32-bit: Remove Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 15/15] system: pam: Only add linux-pam reference if on Linux Josselin Poiret via Guix-patches via
15 siblings, 0 replies; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* 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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 15/15] system: pam: Only add linux-pam reference if on Linux.
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
` (14 preceding siblings ...)
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 14/15] system: hurd: Use shepherd-0.8 in the package list Josselin Poiret via Guix-patches via
@ 2023-03-20 22:10 ` Josselin Poiret via Guix-patches via
2023-03-22 16:30 ` [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Ludovic Courtès
15 siblings, 1 reply; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-20 22:10 UTC (permalink / raw)
To: 62307, Josselin Poiret
* gnu/system/pam.scm (pam-root-service-type): Do it.
---
gnu/system/pam.scm | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 01/15] gnu: glibc/fix-for-hurd-cross: Add new variant Josselin Poiret via Guix-patches via
@ 2023-03-22 14:54 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
0 siblings, 1 reply; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-22 14:54 UTC (permalink / raw)
To: Josselin Poiret; +Cc: 62307
[-- Attachment #1: Type: text/plain, Size: 604 bytes --]
Hi,
Josselin Poiret <dev@jpoiret.xyz> skribis:
> * 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):
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1404 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 45 bytes --]
How does that sound?
Thanks,
Ludo’.
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 03/15] gcc-11: Patch libstdc++ libpthread issue for Hurd only Josselin Poiret via Guix-patches via
@ 2023-03-22 16:28 ` Ludovic Courtès
0 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-22 16:28 UTC (permalink / raw)
To: Josselin Poiret; +Cc: 62307
Josselin Poiret <dev@jpoiret.xyz> skribis:
> * 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.
[...]
> + ;; 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")))
[...]
> + ;; 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’.
^ permalink raw reply [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 15/15] system: pam: Only add linux-pam reference if on Linux Josselin Poiret via Guix-patches via
@ 2023-03-22 16:30 ` Ludovic Courtès
0 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-22 16:30 UTC (permalink / raw)
To: Josselin Poiret; +Cc: 62307
Hi!
Josselin Poiret <dev@jpoiret.xyz> skribis:
> * gnu/system/pam.scm (pam-root-service-type): Do it.
[...]
> + (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’.
^ permalink raw reply [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 00/20] Update Hurd and fix build failures
2023-03-22 14:54 ` [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 01/20] gnu: glibc: Work around broken GNU Mach header detection Ludovic Courtès
` (20 more replies)
0 siblings, 21 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Ludovic Courtès, Josselin Poiret
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
^ permalink raw reply [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 01/20] gnu: glibc: Work around broken GNU Mach header detection.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 02/20] gnu: cross-base: Use gexps for 'cross-gcc-arguments' Ludovic Courtès
` (19 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Ludovic Courtès, Josselin Poiret
* 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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 02/20] gnu: cross-base: Use gexps for 'cross-gcc-arguments'.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 01/20] gnu: glibc: Work around broken GNU Mach header detection Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 03/20] gnu: gcc@11: Patch libpthread on GNU/Hurd Ludovic Courtès
` (18 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Ludovic Courtès
* gnu/packages/cross-base.scm (cross-gcc-arguments): Switch to gexps.
---
gnu/packages/cross-base.scm | 104 ++++++++++++++++++------------------
1 file changed, 52 insertions(+), 52 deletions(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 03/20] gnu: gcc@11: Patch libpthread on GNU/Hurd.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 01/20] gnu: glibc: Work around broken GNU Mach header detection Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 02/20] gnu: cross-base: Use gexps for 'cross-gcc-arguments' Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 04/20] gnu: cross-base: Factor out cross-mig Ludovic Courtès
` (17 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Josselin Poiret, Ludovic Courtès
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
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 04/20] gnu: cross-base: Factor out cross-mig.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (2 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 03/20] gnu: gcc@11: Patch libpthread on GNU/Hurd Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 05/20] gnu: cross-base: Add cross arguments to hurd derivatives Ludovic Courtès
` (16 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Josselin Poiret, Ludovic Courtès
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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 05/20] gnu: cross-base: Add cross arguments to hurd derivatives.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (3 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 04/20] gnu: cross-base: Factor out cross-mig Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 06/20] gnu: cross-base: Removed useless inputs to xhurd-core-headers Ludovic Courtès
` (15 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Josselin Poiret, Ludovic Courtès
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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 06/20] gnu: cross-base: Removed useless inputs to xhurd-core-headers.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (4 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 05/20] gnu: cross-base: Add cross arguments to hurd derivatives Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 07/20] gnu: mig: Update to 1.8+git20220827 Ludovic Courtès
` (14 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Josselin Poiret, Ludovic Courtès
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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 07/20] gnu: mig: Update to 1.8+git20220827.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (5 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 06/20] gnu: cross-base: Removed useless inputs to xhurd-core-headers Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 08/20] gnu: gnumach: " Ludovic Courtès
` (13 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Josselin Poiret, Ludovic Courtès
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
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 08/20] gnu: gnumach: Update to 1.8+git20220827.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (6 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 07/20] gnu: mig: Update to 1.8+git20220827 Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 09/20] gnu: hurd: Update to 3ff7053 Ludovic Courtès
` (12 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Josselin Poiret, Ludovic Courtès
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
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 09/20] gnu: hurd: Update to 3ff7053.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (7 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 08/20] gnu: gnumach: " Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 10/20] gnu: hurd: Remove useless glibc/hurd-headers input Ludovic Courtès
` (11 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Josselin Poiret, Ludovic Courtès
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
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 ++--
+ trans/new-fifo.c | 10 +++++-----
+ trans/null.c | 8 ++++----
+ trans/proxy-defpager.c | 6 +++---
+ trans/random.c | 6 +++---
+ trans/streamio.c | 6 +++---
+ 36 files changed, 97 insertions(+), 97 deletions(-)
+
+diff --git a/boot/boot.c b/boot/boot.c
+index 1b10c86b..f326e5b2 100644
+--- a/boot/boot.c
++++ b/boot/boot.c
+@@ -1412,7 +1412,7 @@ S_io_write (mach_port_t object,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+ off_t offset,
+- mach_msg_type_number_t *amtwritten)
++ vm_size_t *amtwritten)
+ {
+ if (object != pseudo_console)
+ return EOPNOTSUPP;
+@@ -1437,7 +1437,7 @@ S_io_read (mach_port_t object,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+ off_t offset,
+- mach_msg_type_number_t amount)
++ vm_size_t amount)
+ {
+ mach_msg_type_number_t avail;
+
+@@ -1489,7 +1489,7 @@ kern_return_t
+ S_io_readable (mach_port_t object,
+ mach_port_t reply_port,
+ mach_msg_type_name_t reply_type,
+- mach_msg_type_number_t *amt)
++ vm_size_t *amt)
+ {
+ if (object != pseudo_console)
+ return EOPNOTSUPP;
+diff --git a/console-client/trans.c b/console-client/trans.c
+index fe4b9ca4..49e30a61 100644
+--- a/console-client/trans.c
++++ b/console-client/trans.c
+@@ -578,7 +578,7 @@ netfs_S_io_read (struct protid *user,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+ off_t offset,
+- mach_msg_type_number_t amount)
++ vm_size_t amount)
+ {
+ struct node *np;
+
+@@ -597,7 +597,7 @@ netfs_S_io_write (struct protid *user,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+ off_t offset,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ struct node *np;
+
+diff --git a/libdiskfs/io-read.c b/libdiskfs/io-read.c
+index 71803517..a706d677 100644
+--- a/libdiskfs/io-read.c
++++ b/libdiskfs/io-read.c
+@@ -25,7 +25,7 @@ diskfs_S_io_read (struct protid *cred,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+ off_t offset,
+- mach_msg_type_number_t maxread)
++ vm_size_t maxread)
+ {
+ struct node *np;
+ int err;
+diff --git a/libdiskfs/io-readable.c b/libdiskfs/io-readable.c
+index c3debac3..03218bf3 100644
+--- a/libdiskfs/io-readable.c
++++ b/libdiskfs/io-readable.c
+@@ -22,7 +22,7 @@
+ /* Implement io_readable as described in <hurd/io.defs>. */
+ kern_return_t
+ diskfs_S_io_readable (struct protid *cred,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ struct node *np;
+
+diff --git a/libdiskfs/io-write.c b/libdiskfs/io-write.c
+index 154bc887..9efed88f 100644
+--- a/libdiskfs/io-write.c
++++ b/libdiskfs/io-write.c
+@@ -25,7 +25,7 @@ diskfs_S_io_write (struct protid *cred,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+ off_t offset,
+- mach_msg_type_number_t *amt)
++ vm_size_t *amt)
+ {
+ struct node *np;
+ error_t err;
+diff --git a/libnetfs/io-read.c b/libnetfs/io-read.c
+index 2427ce6c..688da1f6 100644
+--- a/libnetfs/io-read.c
++++ b/libnetfs/io-read.c
+@@ -28,7 +28,7 @@ netfs_S_io_read (struct protid *user,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+ off_t offset,
+- mach_msg_type_number_t amount)
++ vm_size_t amount)
+ {
+ error_t err;
+ off_t start;
+diff --git a/libnetfs/io-readable.c b/libnetfs/io-readable.c
+index 07becf66..7c365484 100644
+--- a/libnetfs/io-readable.c
++++ b/libnetfs/io-readable.c
+@@ -25,7 +25,7 @@
+
+ error_t
+ netfs_S_io_readable (struct protid *user,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ error_t err;
+
+diff --git a/libnetfs/io-write.c b/libnetfs/io-write.c
+index 482b45fc..2306d1f0 100644
+--- a/libnetfs/io-write.c
++++ b/libnetfs/io-write.c
+@@ -27,7 +27,7 @@ netfs_S_io_write (struct protid *user,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+ off_t offset,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ error_t err;
+ off_t off = offset;
+diff --git a/libpager/data-return.c b/libpager/data-return.c
+index c0f5aaf7..4c4affe8 100644
+--- a/libpager/data-return.c
++++ b/libpager/data-return.c
+@@ -258,7 +258,7 @@ _pager_S_memory_object_data_return (struct pager *p,
+ mach_port_t control,
+ vm_offset_t offset,
+ pointer_t data,
+- vm_size_t length,
++ mach_msg_type_number_t length,
+ int dirty,
+ int kcopy)
+ {
+diff --git a/libstore/nbd.c b/libstore/nbd.c
+index 3138af01..8e0892e3 100644
+--- a/libstore/nbd.c
++++ b/libstore/nbd.c
+@@ -119,7 +119,7 @@ nbd_write (struct store *store,
+ type: htonl (1), /* WRITE */
+ };
+ error_t err;
+- mach_msg_type_number_t cc;
++ vm_size_t cc;
+
+ addr <<= store->log2_block_size;
+ *amount = 0;
+@@ -178,7 +178,7 @@ nbd_read (struct store *store,
+ requested can be found in CHUNK. */
+ inline error_t request_chunk (char **buf, size_t *len)
+ {
+- mach_msg_type_number_t cc;
++ vm_size_t cc;
+
+ chunk = (amount - ofs) < NBD_IO_MAX ? (amount - ofs) : NBD_IO_MAX;
+
+@@ -435,7 +435,7 @@ nbdclose (struct store *store)
+ magic: NBD_REQUEST_MAGIC,
+ type: htonl (2), /* disconnect */
+ };
+- mach_msg_type_number_t cc;
++ vm_size_t cc;
+ (void) io_write (store->port, (char *) &req, sizeof req, -1, &cc);
+
+ /* Close the socket. */
+diff --git a/libstore/rdwr.c b/libstore/rdwr.c
+index 9737c515..f443ad9f 100644
+--- a/libstore/rdwr.c
++++ b/libstore/rdwr.c
+@@ -120,7 +120,7 @@ store_write (struct store *store,
+ else
+ /* ARGH, we've got to split up the write ... */
+ {
+- mach_msg_type_number_t try, written;
++ vm_size_t try, written;
+
+ /* Write the initial bit in the first run. Errors here are returned. */
+ try = (run->length - addr) << block_shift;
+@@ -138,7 +138,7 @@ store_write (struct store *store,
+ && run->start >= 0) /* Check for holes. */
+ /* Ok, we can write in this run, at least a bit. */
+ {
+- mach_msg_type_number_t seg_written;
++ vm_size_t seg_written;
+
+ if ((len >> block_shift) <= run->length)
+ try = len;
+diff --git a/libtrivfs/io-read.c b/libtrivfs/io-read.c
+index a911f778..4d3302e4 100644
+--- a/libtrivfs/io-read.c
++++ b/libtrivfs/io-read.c
+@@ -26,7 +26,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+ off_t off,
+- mach_msg_type_number_t amt)
++ vm_size_t amt)
+ {
+ assert_backtrace (!trivfs_support_read);
+ return EOPNOTSUPP;
+diff --git a/libtrivfs/io-readable.c b/libtrivfs/io-readable.c
+index de4d32b8..acb3fa52 100644
+--- a/libtrivfs/io-readable.c
++++ b/libtrivfs/io-readable.c
+@@ -23,7 +23,7 @@ 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)
+ {
+ assert_backtrace (!trivfs_support_read);
+ return EOPNOTSUPP;
+diff --git a/libtrivfs/io-write.c b/libtrivfs/io-write.c
+index 74cbb32b..787b2544 100644
+--- a/libtrivfs/io-write.c
++++ b/libtrivfs/io-write.c
+@@ -27,7 +27,7 @@ trivfs_S_io_write (struct trivfs_protid *cred,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+ off_t off,
+- mach_msg_type_number_t *amt)
++ vm_size_t *amt)
+ {
+ if (!(trivfs_allow_open & O_WRITE))
+ return EBADF;
+diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c
+index fd3a7b22..5c1352f4 100644
+--- a/mach-defpager/default_pager.c
++++ b/mach-defpager/default_pager.c
+@@ -2572,7 +2572,7 @@ seqnos_memory_object_data_initialize(ds, seqno, pager_request,
+ vm_offset_t offset;
+ register
+ pointer_t addr;
+- vm_size_t data_cnt;
++ mach_msg_type_number_t data_cnt;
+ {
+ vm_offset_t amount_sent;
+ static char here[] = "%sdata_initialize";
+@@ -2631,7 +2631,7 @@ seqnos_memory_object_data_return(ds, seqno, pager_request,
+ mach_port_t pager_request;
+ vm_offset_t offset;
+ pointer_t addr;
+- vm_size_t data_cnt;
++ mach_msg_type_number_t data_cnt;
+ boolean_t dirty;
+ boolean_t kernel_copy;
+ {
+diff --git a/pfinet/io-ops.c b/pfinet/io-ops.c
+index fa6350c3..6269743d 100644
+--- a/pfinet/io-ops.c
++++ b/pfinet/io-ops.c
+@@ -37,9 +37,9 @@
+ error_t
+ S_io_write (struct sock_user *user,
+ const_data_t data,
+- size_t datalen,
++ mach_msg_type_number_t datalen,
+ off_t offset,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ error_t err;
+ struct iovec iov = { (void*) data, datalen };
+@@ -70,9 +70,9 @@ S_io_write (struct sock_user *user,
+ error_t
+ S_io_read (struct sock_user *user,
+ data_t *data,
+- size_t *datalen,
++ mach_msg_type_number_t *datalen,
+ off_t offset,
+- mach_msg_type_number_t amount)
++ vm_size_t amount)
+ {
+ error_t err;
+ int alloced = 0;
+@@ -135,7 +135,7 @@ S_io_seek (struct sock_user *user,
+
+ error_t
+ S_io_readable (struct sock_user *user,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ struct sock *sk;
+ error_t err;
+diff --git a/pfinet/socket-ops.c b/pfinet/socket-ops.c
+index db1b92cd..8d27c383 100644
+--- a/pfinet/socket-ops.c
++++ b/pfinet/socket-ops.c
+@@ -431,12 +431,12 @@ S_socket_send (struct sock_user *user,
+ struct sock_addr *addr,
+ int flags,
+ const_data_t data,
+- size_t datalen,
++ mach_msg_type_number_t datalen,
+ const mach_port_t *ports,
+- size_t nports,
++ mach_msg_type_number_t nports,
+ const_data_t control,
+- size_t controllen,
+- mach_msg_type_number_t *amount)
++ mach_msg_type_number_t controllen,
++ vm_size_t *amount)
+ {
+ int sent;
+ struct iovec iov = { (void*) data, datalen };
+@@ -478,14 +478,14 @@ S_socket_recv (struct sock_user *user,
+ mach_msg_type_name_t *addrporttype,
+ int flags,
+ data_t *data,
+- size_t *datalen,
++ mach_msg_type_number_t *datalen,
+ mach_port_t **ports,
+ mach_msg_type_name_t *portstype,
+- size_t *nports,
++ mach_msg_type_number_t *nports,
+ data_t *control,
+- size_t *controllen,
++ mach_msg_type_number_t *controllen,
+ int *outflags,
+- mach_msg_type_number_t amount)
++ vm_size_t amount)
+ {
+ error_t err;
+ union { struct sockaddr_storage storage; struct sockaddr sa; } addr;
+diff --git a/pfinet/tunnel.c b/pfinet/tunnel.c
+index 1082404e..e11ab670 100644
+--- a/pfinet/tunnel.c
++++ b/pfinet/tunnel.c
+@@ -291,7 +291,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)
++ off_t offs, vm_size_t amount)
+ {
+ struct tunnel_device *tdev;
+ struct sk_buff *skb;
+@@ -372,7 +372,7 @@ trivfs_S_io_write (struct trivfs_protid *cred,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+ off_t offset,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ struct tunnel_device *tdev;
+ struct sk_buff *skb;
+@@ -415,7 +415,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 tunnel_device *tdev;
+ struct sk_buff *skb;
+diff --git a/pflocal/io.c b/pflocal/io.c
+index 96b2fc48..06749756 100644
+--- a/pflocal/io.c
++++ b/pflocal/io.c
+@@ -44,7 +44,7 @@
+ error_t
+ S_io_read (struct sock_user *user,
+ data_t *data, mach_msg_type_number_t *data_len,
+- off_t offset, mach_msg_type_number_t amount)
++ off_t offset, vm_size_t amount)
+ {
+ error_t err;
+ struct pipe *pipe;
+@@ -80,7 +80,7 @@ S_io_read (struct sock_user *user,
+ error_t
+ S_io_write (struct sock_user *user,
+ const_data_t data, mach_msg_type_number_t data_len,
+- off_t offset, mach_msg_type_number_t *amount)
++ off_t offset, vm_size_t *amount)
+ {
+ error_t err;
+ struct pipe *pipe;
+@@ -119,7 +119,7 @@ S_io_write (struct sock_user *user,
+ a "long time" (this should be the same meaning of "long time" used
+ by the nonblocking flag. */
+ error_t
+-S_io_readable (struct sock_user *user, mach_msg_type_number_t *amount)
++S_io_readable (struct sock_user *user, vm_size_t *amount)
+ {
+ error_t err;
+ struct pipe *pipe;
+diff --git a/pflocal/socket.c b/pflocal/socket.c
+index 8c1ee3e9..8c240e09 100644
+--- a/pflocal/socket.c
++++ b/pflocal/socket.c
+@@ -287,10 +287,10 @@ S_socket_peername (struct sock_user *user,
+ /* Send data over a socket, possibly including Mach ports. */
+ error_t
+ S_socket_send (struct sock_user *user, struct addr *dest_addr, int flags,
+- const_data_t data, size_t data_len,
+- const mach_port_t *ports, size_t num_ports,
+- const_data_t control, size_t control_len,
+- size_t *amount)
++ const_data_t data, mach_msg_type_number_t data_len,
++ const mach_port_t *ports, mach_msg_type_number_t num_ports,
++ const_data_t control, mach_msg_type_number_t control_len,
++ vm_size_t *amount)
+ {
+ error_t err = 0;
+ int noblock;
+@@ -378,11 +378,11 @@ error_t
+ S_socket_recv (struct sock_user *user,
+ mach_port_t *addr, mach_msg_type_name_t *addr_type,
+ int in_flags,
+- data_t *data, size_t *data_len,
++ data_t *data, mach_msg_type_name_t *data_len,
+ mach_port_t **ports, mach_msg_type_name_t *ports_type,
+ size_t *num_ports,
+- data_t *control, size_t *control_len,
+- int *out_flags, size_t amount)
++ data_t *control, mach_msg_type_name_t *control_len,
++ int *out_flags, vm_size_t amount)
+ {
+ error_t err;
+ unsigned flags;
+diff --git a/storeio/io.c b/storeio/io.c
+index 634185f7..3c4cb9ff 100644
+--- a/storeio/io.c
++++ b/storeio/io.c
+@@ -83,8 +83,8 @@ trivfs_S_io_map (struct trivfs_protid *cred,
+ 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, mach_msg_type_number_t amount)
++ data_t *data, mach_msg_type_name_t *data_len,
++ off_t offs, vm_size_t amount)
+ {
+ if (! cred)
+ return EOPNOTSUPP;
+@@ -101,7 +101,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_readable (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ if (! cred)
+ return EOPNOTSUPP;
+@@ -126,7 +126,7 @@ error_t
+ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+ const_data_t data, mach_msg_type_number_t data_len,
+- loff_t offs, mach_msg_type_number_t *amount)
++ off_t offs, vm_size_t *amount)
+ {
+ if (! cred)
+ return EOPNOTSUPP;
+diff --git a/storeio/open.c b/storeio/open.c
+index 4c2870c6..f8eb6ce0 100644
+--- a/storeio/open.c
++++ b/storeio/open.c
+@@ -74,8 +74,8 @@ open_write (struct open *open, off_t offs, const void *buf, size_t len,
+ standard mach out-array convention. If no error occurs, zero is returned,
+ otherwise the error code is returned. */
+ error_t
+-open_read (struct open *open, off_t offs, size_t amount,
+- void **buf, vm_size_t *len)
++open_read (struct open *open, off_t offs, vm_size_t amount,
++ void **buf, size_t *len)
+ {
+ error_t err;
+ if (offs < 0)
+diff --git a/storeio/open.h b/storeio/open.h
+index 6be930a6..ad2678ff 100644
+--- a/storeio/open.h
++++ b/storeio/open.h
+@@ -51,13 +51,13 @@ void open_free (struct open *open);
+ and returns the number of bytes written in AMOUNT. If no error occurs,
+ zero is returned, otherwise the error code is returned. */
+ error_t open_write (struct open *open, off_t offs, const void *buf, size_t len,
+- size_t *amount);
++ vm_size_t *amount);
+
+ /* Reads up to AMOUNT bytes from the device into BUF and BUF_LEN using the
+ standard mach out-array convention. If no error occurs, zero is returned,
+ otherwise the error code is returned. */
+-error_t open_read (struct open *open, off_t offs, size_t amount,
+- void **buf, size_t *buf_len);
++error_t open_read (struct open *open, off_t offs, vm_size_t amount,
++ void **buf, vm_size_t *buf_len);
+
+ /* Set OPEN's location to OFFS, interpreted according to WHENCE as by seek.
+ The new absolute location is returned in NEW_OFFS (and may not be the same
+diff --git a/term/ptyio.c b/term/ptyio.c
+index 928ae0ac..acd1015a 100644
+--- a/term/ptyio.c
++++ b/term/ptyio.c
+@@ -302,7 +302,7 @@ error_t
+ pty_io_read (struct trivfs_protid *cred,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+- mach_msg_type_number_t amount)
++ vm_size_t amount)
+ {
+ int size;
+
+@@ -386,7 +386,7 @@ error_t
+ pty_io_write (struct trivfs_protid *cred,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ int i, flush;
+ int cancel = 0;
+diff --git a/term/term.h b/term/term.h
+index efe27ffa..1e6be5f2 100644
+--- a/term/term.h
++++ b/term/term.h
+@@ -387,9 +387,9 @@ extern dev_t rdev;
+ /* kludge--these are pty versions of trivfs_S_io_* functions called by
+ the real functions in users.c to do work for ptys. */
+ error_t pty_io_write (struct trivfs_protid *, const char *,
+- mach_msg_type_number_t, mach_msg_type_number_t *);
++ mach_msg_type_number_t, vm_size_t *);
+ error_t pty_io_read (struct trivfs_protid *, char **,
+- mach_msg_type_number_t *, mach_msg_type_number_t);
++ mach_msg_type_number_t *, vm_size_t);
+ error_t pty_io_readable (size_t *);
+ error_t pty_io_select (struct trivfs_protid *, mach_port_t,
+ struct timespec *, int *);
+diff --git a/term/users.c b/term/users.c
+index 72f5507d..59f02b66 100644
+--- a/term/users.c
++++ b/term/users.c
+@@ -562,9 +562,9 @@ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_port_t reply,
+ mach_msg_type_name_t replytype,
+ const_data_t data,
+- size_t datalen,
+- loff_t offset,
+- size_t *amt)
++ mach_msg_type_name_t datalen,
++ off_t offset,
++ vm_size_t *amt)
+ {
+ int i;
+ int cancel;
+@@ -640,9 +640,9 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ mach_port_t reply,
+ mach_msg_type_name_t replytype,
+ data_t *data,
+- size_t *datalen,
+- loff_t offset,
+- size_t amount)
++ mach_msg_type_name_t *datalen,
++ off_t offset,
++ vm_size_t amount)
+ {
+ int cancel;
+ int i, max;
+@@ -820,7 +820,7 @@ error_t
+ trivfs_S_io_readable (struct trivfs_protid *cred,
+ mach_port_t reply,
+ mach_msg_type_name_t replytype,
+- size_t *amt)
++ vm_size_t *amt)
+ {
+ if (!cred)
+ return EOPNOTSUPP;
+diff --git a/trans/fifo.c b/trans/fifo.c
+index ce7c7729..894565f6 100644
+--- a/trans/fifo.c
++++ b/trans/fifo.c
+@@ -339,8 +339,8 @@ trivfs_S_io_map (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_read (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- data_t *data, size_t *data_len,
+- off_t offs, size_t amount)
++ data_t *data, mach_msg_type_name_t *data_len,
++ off_t offs, vm_size_t amount)
+ {
+ error_t err;
+
+@@ -368,7 +368,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_readable (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- size_t *amount)
++ vm_size_t *amount)
+ {
+ error_t err;
+
+@@ -502,8 +502,8 @@ trivfs_S_io_select_timeout (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- const_data_t data, size_t data_len,
+- off_t offs, size_t *amount)
++ const_data_t data, mach_msg_type_name_t data_len,
++ off_t offs, vm_size_t *amount)
+ {
+ error_t err;
+
+diff --git a/trans/firmlink.c b/trans/firmlink.c
+index 8a5d01a8..e216146a 100644
+--- a/trans/firmlink.c
++++ b/trans/firmlink.c
+@@ -207,7 +207,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, mach_msg_type_number_t amount)
++ off_t offs, vm_size_t amount)
+ {
+ error_t err = 0;
+
+@@ -244,7 +244,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_readable (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ if (! cred)
+ return EOPNOTSUPP;
+diff --git a/trans/hello-mt.c b/trans/hello-mt.c
+index 92f814d6..e99ba754 100644
+--- a/trans/hello-mt.c
++++ b/trans/hello-mt.c
+@@ -125,7 +125,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, mach_msg_type_number_t amount)
++ off_t offs, vm_size_t amount)
+ {
+ struct open *op;
+
+diff --git a/trans/hello.c b/trans/hello.c
+index f8f9e7ab..0405fad3 100644
+--- a/trans/hello.c
++++ b/trans/hello.c
+@@ -116,7 +116,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, mach_msg_type_number_t amount)
++ off_t offs, vm_size_t amount)
+ {
+ struct open *op;
+
+diff --git a/trans/mtab.c b/trans/mtab.c
+index caff3385..a2feee7d 100644
+--- a/trans/mtab.c
++++ b/trans/mtab.c
+@@ -657,7 +657,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, mach_msg_type_number_t amount)
++ off_t offs, vm_size_t amount)
+ {
+ error_t err = 0;
+ struct mtab *op;
+@@ -774,7 +774,7 @@ void (*trivfs_peropen_destroy_hook) (struct trivfs_peropen *) = close_hook;
+ 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)
+ {
+ error_t err = 0;
+ if (!cred)
+diff --git a/trans/new-fifo.c b/trans/new-fifo.c
+index 9a959a39..3e9a886c 100644
+--- a/trans/new-fifo.c
++++ b/trans/new-fifo.c
+@@ -524,8 +524,8 @@ trivfs_S_io_map (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_read (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- data_t *data, size_t *data_len,
+- off_t offs, size_t amount)
++ data_t *data, mach_msg_type_name_t *data_len,
++ off_t offs, vm_size_t amount)
+ {
+ error_t err;
+
+@@ -554,7 +554,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_readable (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- size_t *amount)
++ vm_size_t *amount)
+ {
+ error_t err;
+
+@@ -689,8 +689,8 @@ trivfs_S_io_select_timeout (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- const_data_t data, size_t data_len,
+- off_t offs, size_t *amount)
++ const_data_t data, mach_msg_type_name_t data_len,
++ off_t offs, vm_size_t *amount)
+ {
+ error_t err;
+
+diff --git a/trans/null.c b/trans/null.c
+index 034bb103..f4ba5582 100644
+--- a/trans/null.c
++++ b/trans/null.c
+@@ -149,8 +149,8 @@ trivfs_S_io_read(struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t replytype,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+- loff_t offs,
+- mach_msg_type_number_t amt)
++ off_t offs,
++ vm_size_t amt)
+ {
+ if (!cred)
+ return EOPNOTSUPP;
+@@ -169,7 +169,7 @@ trivfs_S_io_read(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)
+ {
+ if (!cred)
+ return EOPNOTSUPP;
+@@ -228,7 +228,7 @@ kern_return_t
+ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t replytype,
+ const_data_t data, mach_msg_type_number_t datalen,
+- loff_t offs, mach_msg_type_number_t *amt)
++ off_t offs, vm_size_t *amt)
+ {
+ if (!cred)
+ return EOPNOTSUPP;
+diff --git a/trans/proxy-defpager.c b/trans/proxy-defpager.c
+index 8ca25b72..bfeda063 100644
+--- a/trans/proxy-defpager.c
++++ b/trans/proxy-defpager.c
+@@ -169,8 +169,8 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t replytype,
+ data_t *data,
+ mach_msg_type_number_t *datalen,
+- loff_t offs,
+- mach_msg_type_number_t amt)
++ off_t offs,
++ vm_size_t amt)
+ {
+ if (!cred)
+ return EOPNOTSUPP;
+@@ -181,7 +181,7 @@ kern_return_t
+ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t replytype,
+ const_data_t data, mach_msg_type_number_t datalen,
+- loff_t offs, mach_msg_type_number_t *amt)
++ loff_t offs, vm_size_t *amt)
+ {
+ if (!cred)
+ return EOPNOTSUPP;
+diff --git a/trans/random.c b/trans/random.c
+index c230280a..297253e4 100644
+--- a/trans/random.c
++++ b/trans/random.c
+@@ -318,7 +318,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, mach_msg_type_number_t amount)
++ off_t offs, vm_size_t amount)
+ {
+ error_t err;
+ void *buf = NULL;
+@@ -377,8 +377,8 @@ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_msg_type_name_t replytype,
+ const_data_t data,
+ mach_msg_type_number_t datalen,
+- loff_t offset,
+- mach_msg_type_number_t *amount)
++ off_t offset,
++ vm_size_t *amount)
+ {
+ /* Deny access if they have bad credentials. */
+ if (! cred)
+diff --git a/trans/streamio.c b/trans/streamio.c
+index 30b8b20e..acd5d674 100644
+--- a/trans/streamio.c
++++ b/trans/streamio.c
+@@ -482,7 +482,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, mach_msg_type_number_t amount)
++ off_t offs, vm_size_t amount)
+ {
+ error_t err;
+
+@@ -501,7 +501,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
+ error_t
+ trivfs_S_io_readable (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+- mach_msg_type_number_t *amount)
++ vm_size_t *amount)
+ {
+ error_t err;
+
+@@ -521,7 +521,7 @@ error_t
+ trivfs_S_io_write (struct trivfs_protid *cred,
+ mach_port_t reply, mach_msg_type_name_t reply_type,
+ const_data_t data, mach_msg_type_number_t data_len,
+- loff_t offs, mach_msg_type_number_t *amount)
++ off_t offs, vm_size_t *amount)
+ {
+ error_t err;
+
+
+base-commit: b6509385bb1dd2a6d47401465bfb98b6339c5c2b
+prerequisite-patch-id: 33c640aa0fcf19d49fff88cc58cecd3be8f7892d
+prerequisite-patch-id: 411256b31780cf9ea0b24efe9f2b20f82c6ce9c1
+prerequisite-patch-id: 830470d11762c6c5e09488a2b834dff0f4f6e434
+prerequisite-patch-id: 1a1293bebf97550d54d9dba3a1817f20a3ef6a2a
+prerequisite-patch-id: f12e5842dea12ed7b0ff4ae3fa2afe78f3647288
+prerequisite-patch-id: 4436fa0181c5e21580e6656634e35febf251dc5b
+prerequisite-patch-id: a938f788841d96151e9e4cc134114dc7652e4f27
+prerequisite-patch-id: bfc7264e11d3ca2dbc520f221cf8bf13857d4732
+prerequisite-patch-id: 50393cc222a3e9de9cfab0762f5acf10e394c9f0
+--
+2.39.1
+
diff --git a/gnu/packages/patches/hurd-xattr.patch b/gnu/packages/patches/hurd-xattr.patch
deleted file mode 100644
index 0a922c91b5..0000000000
--- a/gnu/packages/patches/hurd-xattr.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 75cb948c575fca3962c4cce115d31dd178bc389f Mon Sep 17 00:00:00 2001
-From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
-Date: Tue, 12 May 2020 07:39:59 +0200
-Subject: [PATCH] ext2fs: Update to upstream Hurd-reserved xattr index for
- "gnu.*".
-
-See
- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3980bd3b406addb327d858aebd19e229ea340b9a
-
-This supports setting (and reading) of passive trasnlators from
-GNU/Linux, e.g.
-
- dd if=/dev/zero of=file bs=1k count=1000
- losetup /dev/loop0 file
- mke2fs -t ext2 -o hurd -O ext_attr /dev/loop0
- mount -t ext2 -o x-xattr-translator-records /dev/loop0 /mnt
- mkdir -p /mnt/servers/socket
- touch /mnt/servers/socket/1
- setfattr --name=gnu.translator --value='/hurd/pflocal\0' /mnt/servers/socket/1
- getfattr --name=gnu.translator /mnt/servers/socket/1
- # file: 1
- gnu.translator="/hurd/pflocal"
-
-* ext2fs/xattr.c (struct _xattr_prefix): For "gnu.*", use index for
-the Hurd (10).
----
- ext2fs/xattr.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/ext2fs/xattr.c b/ext2fs/xattr.c
-index f6ea0f39..78458214 100644
---- a/ext2fs/xattr.c
-+++ b/ext2fs/xattr.c
-@@ -1,6 +1,6 @@
- /* Ext2 support for extended attributes
-
-- Copyright (C) 2006, 2016 Free Software Foundation, Inc.
-+ Copyright (C) 2006, 2016, 2020 Free Software Foundation, Inc.
-
- Written by Thadeu Lima de Souza Cascardo <cascardo@dcc.ufmg.br>
- and Shengyu Zhang <lastavengers@outlook.com>
-@@ -39,7 +39,7 @@ xattr_prefixes[] =
- {
- 1, "user.", sizeof "user." - 1},
- {
-- 7, "gnu.", sizeof "gnu." - 1},
-+ 10, "gnu.", sizeof "gnu." - 1},
- {
- 0, NULL, 0}
- };
---
-2.26.0
-
--
2.39.2
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 10/20] gnu: hurd: Remove useless glibc/hurd-headers input.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (8 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 09/20] gnu: hurd: Update to 3ff7053 Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 11/20] gnu: gnumach, hurd-headers, hurd: Switch to using cross-mig Ludovic Courtès
` (10 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Josselin Poiret, Ludovic Courtès
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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 11/20] gnu: gnumach, hurd-headers, hurd: Switch to using cross-mig.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (9 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 10/20] gnu: hurd: Remove useless glibc/hurd-headers input Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 12/20] gnu: hurd: Update DDE and use libdde_linux26 Ludovic Courtès
` (9 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Josselin Poiret, Ludovic Courtès
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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 12/20] gnu: hurd: Update DDE and use libdde_linux26.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (10 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 11/20] gnu: gnumach, hurd-headers, hurd: Switch to using cross-mig Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 13/20] gnu: mig/32-bit: Remove Ludovic Courtès
` (8 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Josselin Poiret, Ludovic Courtès
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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 13/20] gnu: mig/32-bit: Remove.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (11 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 12/20] gnu: hurd: Update DDE and use libdde_linux26 Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 14/20] system: hurd: Use shepherd-0.8 in the package list Ludovic Courtès
` (7 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Josselin Poiret, Ludovic Courtès
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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 14/20] system: hurd: Use shepherd-0.8 in the package list.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (12 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 13/20] gnu: mig/32-bit: Remove Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 15/20] gnu: linux-pam: Switch to gexps Ludovic Courtès
` (6 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Josselin Poiret, Ludovic Courtès
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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 15/20] gnu: linux-pam: Switch to gexps.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (13 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 14/20] system: hurd: Use shepherd-0.8 in the package list Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 16/20] gnu: linux-pam: Allow compilation on GNU/Hurd Ludovic Courtès
` (5 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Ludovic Courtès
* gnu/packages/linux.scm (linux-pam)[arguments]: Switch to gexps.
---
gnu/packages/linux.scm | 41 +++++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 20 deletions(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 16/20] gnu: linux-pam: Allow compilation on GNU/Hurd.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (14 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 15/20] gnu: linux-pam: Switch to gexps Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 17/20] gnu: guile-static: Switch to gexps Ludovic Courtès
` (4 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Ludovic Courtès
* gnu/packages/linux.scm (linux-pam)[arguments]: Add #:phases.
---
gnu/packages/linux.scm | 10 ++++++++++
1 file changed, 10 insertions(+)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 17/20] gnu: guile-static: Switch to gexps.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (15 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 16/20] gnu: linux-pam: Allow compilation on GNU/Hurd Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 18/20] gnu: guile: " Ludovic Courtès
` (3 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Ludovic Courtès
* gnu/packages/make-bootstrap.scm (make-guile-static): Switch to gexps.
---
gnu/packages/make-bootstrap.scm | 58 ++++++++++++++++-----------------
1 file changed, 29 insertions(+), 29 deletions(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 18/20] gnu: guile: Switch to gexps.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (16 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 17/20] gnu: guile-static: Switch to gexps Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 19/20] gnu: guile-readline: " Ludovic Courtès
` (2 subsequent siblings)
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Ludovic Courtès
* 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(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 19/20] gnu: guile-readline: Switch to gexps.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (17 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 18/20] gnu: guile: " Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 20/20] gnu: guile: Fix 'posix_spawn' usage for GNU/Hurd Ludovic Courtès
2023-03-28 17:07 ` [bug#62307] [PATCH core-updates v2 00/20] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Ludovic Courtès
* gnu/packages/guile.scm (make-guile-readline): Switch to gexps.
---
gnu/packages/guile.scm | 67 ++++++++++++++++++++++--------------------
1 file changed, 35 insertions(+), 32 deletions(-)
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 20/20] gnu: guile: Fix 'posix_spawn' usage for GNU/Hurd.
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (18 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 19/20] gnu: guile-readline: " Ludovic Courtès
@ 2023-03-28 14:28 ` Ludovic Courtès
2023-03-28 17:07 ` [bug#62307] [PATCH core-updates v2 00/20] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
20 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-28 14:28 UTC (permalink / raw)
To: 62307; +Cc: Ludovic Courtès
* 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
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [bug#62307] [PATCH core-updates v2 00/20] Update Hurd and fix build failures
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
` (19 preceding siblings ...)
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 20/20] gnu: guile: Fix 'posix_spawn' usage for GNU/Hurd Ludovic Courtès
@ 2023-03-28 17:07 ` Josselin Poiret via Guix-patches via
2023-03-30 10:48 ` bug#62307: " Ludovic Courtès
20 siblings, 1 reply; 43+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2023-03-28 17:07 UTC (permalink / raw)
To: Ludovic Courtès, 62307; +Cc: Ludovic Courtès
[-- Attachment #1: Type: text/plain, Size: 1735 bytes --]
Hi Ludo,
Ludovic Courtès <ludo@gnu.org> writes:
> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#62307: [PATCH core-updates v2 00/20] Update Hurd and fix build failures
2023-03-28 17:07 ` [bug#62307] [PATCH core-updates v2 00/20] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
@ 2023-03-30 10:48 ` Ludovic Courtès
0 siblings, 0 replies; 43+ messages in thread
From: Ludovic Courtès @ 2023-03-30 10:48 UTC (permalink / raw)
To: Josselin Poiret; +Cc: 62307-done
Hi Josselin,
Josselin Poiret <dev@jpoiret.xyz> skribis:
> 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’.
^ permalink raw reply [flat|nested] 43+ messages in thread
end of thread, other threads:[~2023-03-30 10:49 UTC | newest]
Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-20 22:07 [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 01/15] gnu: glibc/fix-for-hurd-cross: Add new variant Josselin Poiret via Guix-patches via
2023-03-22 14:54 ` [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 00/20] " Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 01/20] gnu: glibc: Work around broken GNU Mach header detection Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 02/20] gnu: cross-base: Use gexps for 'cross-gcc-arguments' Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 03/20] gnu: gcc@11: Patch libpthread on GNU/Hurd Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 04/20] gnu: cross-base: Factor out cross-mig Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 05/20] gnu: cross-base: Add cross arguments to hurd derivatives Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 06/20] gnu: cross-base: Removed useless inputs to xhurd-core-headers Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 07/20] gnu: mig: Update to 1.8+git20220827 Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 08/20] gnu: gnumach: " Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 09/20] gnu: hurd: Update to 3ff7053 Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 10/20] gnu: hurd: Remove useless glibc/hurd-headers input Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 11/20] gnu: gnumach, hurd-headers, hurd: Switch to using cross-mig Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 12/20] gnu: hurd: Update DDE and use libdde_linux26 Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 13/20] gnu: mig/32-bit: Remove Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 14/20] system: hurd: Use shepherd-0.8 in the package list Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 15/20] gnu: linux-pam: Switch to gexps Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 16/20] gnu: linux-pam: Allow compilation on GNU/Hurd Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 17/20] gnu: guile-static: Switch to gexps Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 18/20] gnu: guile: " Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 19/20] gnu: guile-readline: " Ludovic Courtès
2023-03-28 14:28 ` [bug#62307] [PATCH core-updates v2 20/20] gnu: guile: Fix 'posix_spawn' usage for GNU/Hurd Ludovic Courtès
2023-03-28 17:07 ` [bug#62307] [PATCH core-updates v2 00/20] Update Hurd and fix build failures Josselin Poiret via Guix-patches via
2023-03-30 10:48 ` bug#62307: " Ludovic Courtès
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 02/15] gnu-build-system: Sneak fixed glibc when cross-building for Hurd Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 03/15] gcc-11: Patch libstdc++ libpthread issue for Hurd only Josselin Poiret via Guix-patches via
2023-03-22 16:28 ` [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Ludovic Courtès
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 04/15] cross-base: Factor out cross-mig Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 05/15] cross-base: Add cross arguments to hurd derivatives Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 06/15] cross-base: Removed useless inputs to xhurd-core-headers Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 07/15] mig: Update to 1.8+git20220827 Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 08/15] gnumach: " Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 09/15] hurd: Update to 91a51672ff4cfe1f1a0712b4c542ded3081c825b Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 10/15] hurd: Remove useless glibc/hurd-headers input Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 11/15] gnumach, hurd-headers, hurd: Switch to using cross-mig Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 11/15] gnumach, " Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 12/15] hurd: Update DDE and use libdde_linux26 Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 13/15] mig/32-bit: Remove Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 14/15] system: hurd: Use shepherd-0.8 in the package list Josselin Poiret via Guix-patches via
2023-03-20 22:10 ` [bug#62307] [PATCH core-updates 15/15] system: pam: Only add linux-pam reference if on Linux Josselin Poiret via Guix-patches via
2023-03-22 16:30 ` [bug#62307] [PATCH core-updates 00/15] Update Hurd and fix build failures Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.