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