From patchwork Mon Mar 20 22:10:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 48458 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EA87E16F32; Mon, 20 Mar 2023 22:12:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9B4A016F13 for ; Mon, 20 Mar 2023 22:12:16 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNjX-0003kp-9I; Mon, 20 Mar 2023 18:12:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNjW-0003kU-F4 for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNjW-0003Fz-6c for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNjW-0007Mg-2p for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates 01/15] gnu: glibc/fix-for-hurd-cross: Add new variant. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 22:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org, Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.167935026328052 (code B ref 62307); Mon, 20 Mar 2023 22:12:02 +0000 Received: (at 62307) by debbugs.gnu.org; 20 Mar 2023 22:11:03 +0000 Received: from localhost ([127.0.0.1]:56979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNiZ-0007IL-2H for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:03 -0400 Received: from jpoiret.xyz ([206.189.101.64]:46548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNiW-0007Hb-U5 for 62307@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:01 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id BCEA2184D6B; Mon, 20 Mar 2023 22:10:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1679350259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2IIV1EkO1F+Nz1dx7NJyqOg0YYNUfv0nw4r6iKO5OFI=; b=oecIeP8NRm2eTM+UIOh0czH0W9vlu4TsSbM1e1/S9PgfnfEKU/bh33ZLzt4VGfSn4foKkg onKlIVD4ILV/dBCUuaTbaFEC8jqz6YQufUNdCHZWdaHHWzC3pfc2aABjFJbrQKg5T0UdKB CQ6FZyxkB/uj6f4HFCDWHnyzRTe4esbGHY0nPc640zZC4m+iIYu0xOR9NBtI8p7Qu31reB aoYZJuQ9EkiP23DwKQGjXef1izA/Ath3cpitiZIeEP3sGocOC7cgwUAvDN8b/VDsQB8q0J WAwYZNjVa5+fgBYQeLW8Gmmae94OZLQJN1Qs9NZi+JFCCZ4xYrZsDTRlpTTOgw== Date: Mon, 20 Mar 2023 23:10:36 +0100 Message-Id: <6a027350c8639d0c52cdda781abb9f7d304f64ed.1679349992.git.dev@jpoiret.xyz> In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 +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: +--- + 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 + 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 ]], [[ + 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 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 +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 From patchwork Mon Mar 20 22:10:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 48457 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 07CBD16F34; Mon, 20 Mar 2023 22:12:13 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 508D416F13 for ; Mon, 20 Mar 2023 22:12:12 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNjb-0003nG-1k; Mon, 20 Mar 2023 18:12:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNjX-0003kf-01 for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNjW-0003G8-MI for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNjW-0007Mn-I1 for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates 02/15] gnu-build-system: Sneak fixed glibc when cross-building for Hurd. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 22:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org, Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.167935026428065 (code B ref 62307); Mon, 20 Mar 2023 22:12:02 +0000 Received: (at 62307) by debbugs.gnu.org; 20 Mar 2023 22:11:04 +0000 Received: from localhost ([127.0.0.1]:56983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNiZ-0007IP-QT for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:04 -0400 Received: from jpoiret.xyz ([206.189.101.64]:46622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNiX-0007Hd-N7 for 62307@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:02 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id EA2F8185328; Mon, 20 Mar 2023 22:11:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1679350261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nTMMXo8jWgLVsVw0wMfuVmBah5AB+UIVtUEoAg3rrkE=; b=GHCyAZAjF4c7/umnNByD7g0HZAePVVp2HDBK9J+t57HB42hWxX31XKj/F8PfnP8Y/1bZ+D xeAMmmkR0IT3ij3k/OB4fNiuzR165FHODa+livjYK/eEhhorbWhE0NO363+qHFwfPJMHcn YwHYPjXcN1f8+JcjkwwHFyXmX2/m/i0c8PWOa7eI9eBn8el+vMl6keZNh2YhpNlO7eY7vW C0lcVl4AoFIuwufdTmsdkN6E0fp5elAkTHD7WAxZiiOFn77XmZOPOoMuorxq8n4Q6n+83q 5jbNNfBjaHPoYvfkeu1iLzbfaBuMGwPBxldxf4LD+nc8YQRl2wES0gefJTniPQ== Date: Mon, 20 Mar 2023 23:10:37 +0100 Message-Id: <7ff5ecb1b11b068bb68a0fd3d0e1b4ade986b08b.1679349992.git.dev@jpoiret.xyz> In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 From patchwork Mon Mar 20 22:10:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 48461 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CA1CC16F2D; Mon, 20 Mar 2023 22:12:25 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DA04716F13 for ; Mon, 20 Mar 2023 22:12:22 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNjZ-0003mA-Kv; Mon, 20 Mar 2023 18:12:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNjX-0003lA-Cu for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNjX-0003GF-3X for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNjW-0007Mw-V7 for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates 03/15] gcc-11: Patch libstdc++ libpthread issue for Hurd only. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 22:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org, Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.167935027128122 (code B ref 62307); Mon, 20 Mar 2023 22:12:02 +0000 Received: (at 62307) by debbugs.gnu.org; 20 Mar 2023 22:11:11 +0000 Received: from localhost ([127.0.0.1]:56999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNig-0007JK-Bk for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:11 -0400 Received: from jpoiret.xyz ([206.189.101.64]:46686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNiZ-0007IM-Bi for 62307@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:04 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id CC69E184D6B; Mon, 20 Mar 2023 22:11:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1679350262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lqklnJd6jyi9M9PpKKcfuZdLkJx2Xlye32NyDUz8aUI=; b=ibNbT8YMFwgem7r9hJ120d9q4zJ/pmsu9EFZvgYjUUv09zO/smQfEKdxbxz1dZKUqarH9H RelimEtpvdCVQCfGKBsHTpKCAOnIMFZanifdO90fe6uR+jilc8lOLfCSlxIS01qOuGRE2n O2pKhKt70xU93cboe76tmKi7RDTThjABa2zP1Mc+nSuUBZmAAkmCp2G7zDJaXOVprxIjPi IlsHoxNYKm79Hi4lmRFu3L59DDk4clye/TLIdu0jJs/U+ZMbZPyrpcIaxd6m7dh5yNLiet ITQIg1OL5Simk++aoTkHz/gCu8dOqFD00ydnwVBHZ0nX3Qty6W0Pn6ach+Jg4A== Date: Mon, 20 Mar 2023 23:10:38 +0100 Message-Id: <479a095a315dc959fc63e26c24d7cb8843b947be.1679349992.git.dev@jpoiret.xyz> In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: ++++++++ X-Spam: Yes X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 +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 +--- + 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 From patchwork Mon Mar 20 22:10:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 48462 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 5013816F34; Mon, 20 Mar 2023 22:12:35 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5DC9216F13 for ; Mon, 20 Mar 2023 22:12:34 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNjZ-0003m9-IR; Mon, 20 Mar 2023 18:12:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNjX-0003lJ-QC for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNjX-0003GQ-Hs for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNjX-0007N3-DZ for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates 04/15] cross-base: Factor out cross-mig. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 22:12:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org, Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.167935027228136 (code B ref 62307); Mon, 20 Mar 2023 22:12:03 +0000 Received: (at 62307) by debbugs.gnu.org; 20 Mar 2023 22:11:12 +0000 Received: from localhost ([127.0.0.1]:57003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNih-0007JV-5R for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:11 -0400 Received: from jpoiret.xyz ([206.189.101.64]:46754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNia-0007IU-31 for 62307@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:04 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 78801185328; Mon, 20 Mar 2023 22:11:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1679350263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zPwj4kbEIadwci75v8R1Dhtn0xHNrKw1U5lie4QrvEQ=; b=KJLK42sALTJ8Q5YleDg1OHDARJi9NbdiwO90ivbotnzWxXpGI8O3A79pJY+esrxAiTE8WU EV1C4JW84AZ7QH8RU1j0NcxHc4BXmLYPbkbKVLvtr8yQpvc94HBLDOzEMG7fFqOIa3xZ8I p4uoVctFke0s5y13P3v32RsAW0iGAtkL+8BTtakHTgAmjEwO4IN1UFfC2ldW/cY6nOQHun wvzd6i8sjyLk4q3w0PceshMc1a9CiAgsleI5mrVeOAJA4Bk/iTUXB76fbWanqDTDBGzb3l TMK3QOVDFAgX608FO0RXY5oEaUdGVkvmA+1avjYQvjRDwH1kZZbZveQuCVjGHQ== Date: Mon, 20 Mar 2023 23:10:39 +0100 Message-Id: <71f4570e88dab2b16a501c08b0df523d5c1e41ca.1679349992.git.dev@jpoiret.xyz> In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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)))))) From patchwork Mon Mar 20 22:10:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 48464 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3D4D316F13; Mon, 20 Mar 2023 22:12:42 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CD76016F13 for ; Mon, 20 Mar 2023 22:12:41 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNjf-0003sN-Pk; Mon, 20 Mar 2023 18:12:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNjY-0003lT-70 for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNjX-0003GW-Ua for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNjX-0007NC-QX for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates 05/15] cross-base: Add cross arguments to hurd derivatives. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 22:12:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org, Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.167935027228148 (code B ref 62307); Mon, 20 Mar 2023 22:12:03 +0000 Received: (at 62307) by debbugs.gnu.org; 20 Mar 2023 22:11:12 +0000 Received: from localhost ([127.0.0.1]:57007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNii-0007Jl-0S for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:12 -0400 Received: from jpoiret.xyz ([206.189.101.64]:46822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNia-0007Ii-SC for 62307@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:05 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 32B8D184D6B; Mon, 20 Mar 2023 22:11:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1679350264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+XfaKQtUvDfrJWyuTH80mZEq58A937nj/iEV9ER9lSo=; b=cvMg4L6CvYs0GCGM3uKhsP2EGvo2xBgAEDGzN8vH1l/Zb5eg1up3qsGGhYYcrZDLWMk5dF XqONA2H1ChnKDTB6dHVOz06LdE8xBH7ld+boPL3Qw6b/1uWp7tYQg6DLjyMbK8uOYhPIMr W6XUu82NgJDLi50jGPlmWWhJoM2vFlXPwzMiIsQeMd3OiMdtn3hPx9cJy/OeCoYBoMzeDP iLmAQwFpja9E03d5OEOyzP4Gsn6x55bh9rXahv9bLSTPfp0UP47kgnw8p7EvcEIC6DxUEc cqpiiRcXIZV8eZ+G8DLOldbITRSl7nn+op+3ohvKWt3dWJ5UYLrccofP2Gr/KA== Date: Mon, 20 Mar 2023 23:10:40 +0100 Message-Id: <98e07033c57ba2adcbb347b6c0081e78e745dd98.1679349992.git.dev@jpoiret.xyz> In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 From patchwork Mon Mar 20 22:10:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 48467 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9A1FF16F32; Mon, 20 Mar 2023 22:12:55 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 31C4A16F13 for ; Mon, 20 Mar 2023 22:12:55 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNjf-0003rV-7a; Mon, 20 Mar 2023 18:12:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNjZ-0003ln-1M for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNjY-0003Gg-Ah for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNjY-0007NJ-67 for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates 06/15] cross-base: Removed useless inputs to xhurd-core-headers. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 22:12:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org, Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.167935027328156 (code B ref 62307); Mon, 20 Mar 2023 22:12:04 +0000 Received: (at 62307) by debbugs.gnu.org; 20 Mar 2023 22:11:13 +0000 Received: from localhost ([127.0.0.1]:57011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNii-0007K1-HU for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:12 -0400 Received: from jpoiret.xyz ([206.189.101.64]:46822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNib-0007Ii-Ch for 62307@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:05 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 08385185328; Mon, 20 Mar 2023 22:11:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1679350265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1LZpI0oxOHbwSsMztz60pOp/eMUDtwW0WWLcW74mGRw=; b=bD/F3BXpza3+FzIAhpu4bpu1pE4Asn4M9MLMWa9CZSODJohCzJxtA3eju5tuSQCUAwDF5F l+9Q8wqiJlNsXzrMw8SJP2prb9orDpm4c+8OSg6nTZQDZecYWewzcvrOro2/2lJ4tbb4WX pgef0S768CjptO2a0eaodMsgFMRpzBxXc9mm/2RgA6RyAgb16+QruDlZErAxBNTYQtOCHg 6SS+lkozdVa05oqxo8EBnFPEs5Jw5VYiWIatcmOzmVjmcPGoQvITtPeTzvQb+MkkuXFSf7 KWLr1QysBQN4L7dmSCs3JdHI/vQj6skUc/vJEtTByaxzzSxjzkx7mhB4XFDNVQ== Date: Mon, 20 Mar 2023 23:10:41 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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) From patchwork Mon Mar 20 22:10:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 48460 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CD81C16F36; Mon, 20 Mar 2023 22:12:24 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9046616F1F for ; Mon, 20 Mar 2023 22:12:22 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNjg-0003t3-2s; Mon, 20 Mar 2023 18:12:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNjZ-0003lo-AX for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNjY-0003Gi-Lc for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNjY-0007NQ-Hk for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates 07/15] mig: Update to 1.8+git20220827. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 22:12:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org, Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.167935027428181 (code B ref 62307); Mon, 20 Mar 2023 22:12:04 +0000 Received: (at 62307) by debbugs.gnu.org; 20 Mar 2023 22:11:14 +0000 Received: from localhost ([127.0.0.1]:57015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNij-0007K5-0f for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:14 -0400 Received: from jpoiret.xyz ([206.189.101.64]:46960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNic-0007J0-Sa for 62307@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:07 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id C2170184D6B; Mon, 20 Mar 2023 22:11:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1679350266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IH5RtzZCm3GNHo4kRX/OhP6+lpX76uO6HknhgFTSqrs=; b=Z0MEBIh85gPJvayuesdaFYrf3WEuWoopOu2h+aHzDf4TuaYUKhncouUefWwxN2f3Q7RW8p tfLapsDPgQJ4gO4iGQue0RqH4S4D0vHWD0fPLggaYVr8jXe4thXXRRQvUvbbzWsB3d9djK iagib4Lo1yex3Up93ZPBVgZOn++sqq/zKTrGQGyQRcWaBtumDR0XsfjHTMbQCDeN92t4vT //N0NAdj/DMHk9NviCOhx38O2fV9gtFJC5r3CFimuRKHLOldKdAt0yPeizAGydioicU05m nOG02sVL+G9wfiouHE7+rCMDYDjkGUEoXGJjO9EQOJDvSLHFwwPEzoX9tSQWMw== Date: Mon, 20 Mar 2023 23:10:42 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 +Date: Sun, 18 Dec 2022 17:38:23 -0500 +Subject: [PATCH] Generate cpu.h with -ffreestanding + +From: Flavio Cruz + +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: +--- + 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 + From patchwork Mon Mar 20 22:10:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 48463 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 51A5B16F32; Mon, 20 Mar 2023 22:12:39 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 351AE16F13 for ; Mon, 20 Mar 2023 22:12:38 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNjg-0003tm-R3; Mon, 20 Mar 2023 18:12:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNjZ-0003ly-C2 for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNjZ-0003Gv-2n for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNjY-0007NZ-Uj for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates 08/15] gnumach: Update to 1.8+git20220827. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 22:12:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org, Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.167935027528200 (code B ref 62307); Mon, 20 Mar 2023 22:12:04 +0000 Received: (at 62307) by debbugs.gnu.org; 20 Mar 2023 22:11:15 +0000 Received: from localhost ([127.0.0.1]:57019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNik-0007KU-4u for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:14 -0400 Received: from jpoiret.xyz ([206.189.101.64]:47030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNie-0007J7-20 for 62307@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:08 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 0B35D185328; Mon, 20 Mar 2023 22:11:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1679350267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/z5PortZCTuUkwNyc67cTnV2ETYFHEL3sCgK46tgAWM=; b=ZglX5E1kcl/NQqkDJZZ/zKErnJVq2nyRZ6LHA+Fh2jytxYsv0MYgQkOv7+TWnpjh3H4nLY 5C1qZD6wroYP/EYJ0bRyUVgi5UyvXEOYlEO9aKl71ANRFaGX7YyLeXpKubusNNhzMxWnO5 CeJPe6wcAgU3blrdYdJC8WDc4acKWZw7Nuhc8j9kdU/lk1X5ni+0q1/PW9LqM97Xuj6wOq HAuLhFPz+q+7v1n0HvsyvvXB40wDXTvfBwHphamkowTqAiBhyknSNXnct5pTxRmACGpnKQ 705ZuiY9bWK2wcohjfhtDyDh4RH8/RLPk5np41/tm3YC3G1GYnKYLEXj37HUhA== Date: Mon, 20 Mar 2023 23:10:43 +0100 Message-Id: <96301ae81e0c67b596b911307c4b448806f70d48.1679349992.git.dev@jpoiret.xyz> In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 - ;; - '(#: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 + ;; + '(#: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 +Date: Sun, 28 Aug 2022 01:17:34 +0200 +Subject: [PATCH] Add missing const_mach_port_name_array_t type + +From: Samuel Thibault + +--- + 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 + From patchwork Mon Mar 20 22:10:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 48472 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 48A1516F32; Mon, 20 Mar 2023 22:13:12 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D994216F13 for ; Mon, 20 Mar 2023 22:13:06 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNjg-0003tB-7R; Mon, 20 Mar 2023 18:12:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNjb-0003nX-NT for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNjb-0003Hf-8y for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNjb-0007P9-4v for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates 09/15] hurd: Update to 91a51672ff4cfe1f1a0712b4c542ded3081c825b. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 22:12:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org, Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.167935029728266 (code B ref 62307); Mon, 20 Mar 2023 22:12:07 +0000 Received: (at 62307) by debbugs.gnu.org; 20 Mar 2023 22:11:37 +0000 Received: from localhost ([127.0.0.1]:57033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNj4-0007Lg-Lf for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:36 -0400 Received: from jpoiret.xyz ([206.189.101.64]:47096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNif-0007JF-4F for 62307@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:13 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 3AD8A184D6B; Mon, 20 Mar 2023 22:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1679350268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=srPQvqt8g3Exr+/FvTgph77ReuCdntJhLr0rxJP/ves=; b=MZhkkexhVRHw42fZzpCvlF4mHXPvdnJi3iYtnSYgdkhqA4zAVNErr5A1veGJKkhHfW96Ws E+BNvi8nzTLrab4dXaq6Z8j3X40zKbCWJkBVdrP8GbyuEG7HToGJPD/QKozWyDqC+zeDqm bHfSRkRERIUB2FkELGXCJZTjIINNNNkSRjPyq3UCWeldq8dmLJY6+ecykEJdQR220kCYps UTZ47+kgu+g8sh66HSa7h5oWzw8uGhbDtO8cmPn0FzE6SJLMJZ6ow4cIBGiN/K375nz/An pn2d4l/5NWCxnyy2iVdsF8WkOW+LO2U3QK1ssNdrYVjoOA0/qEeWli11qm7Xrg== Date: Mon, 20 Mar 2023 23:10:44 +0100 Message-Id: <5b0e20646232824b4099ab996087a8ed8df9aaee.1679349992.git.dev@jpoiret.xyz> In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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: +References: +From: Josselin Poiret +Date: Mon, 31 Oct 2022 13:39:28 +0100 +Subject: [PATCH 2/2] Add --without-rump configure option + +From: Samuel Thibault + +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 ++AS_IF([test "x$with_rump" != xno], [ ++ # Save ++ oldLIBS="$LIBS" ++ ++ LIBS="$oldLIBS -lrump" ++ AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM( ++ [[#include + #define _STANDALONE + #include ]], +- [])], +- [HAVE_LIBRUMP=yes], +- [HAVE_LIBRUMP=no]) +-AC_SUBST([HAVE_LIBRUMP]) +- +-LIBS="$oldLIBS -lrumpvfs_nofifofs_pic" +-AC_LINK_IFELSE( +- [AC_LANG_PROGRAM( +- [[#include ++ [])], ++ [HAVE_LIBRUMP=yes], ++ [HAVE_LIBRUMP=no]) ++ AC_SUBST([HAVE_LIBRUMP]) ++ ++ LIBS="$oldLIBS -lrumpvfs_nofifofs_pic" ++ AC_LINK_IFELSE( ++ [AC_LANG_PROGRAM( ++ [[#include + #define _STANDALONE + #include ]], +- [])], +- [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 -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= next to -L. ---- - 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: +In-Reply-To: +References: +From: Josselin Poiret +Date: Tue, 30 Aug 2022 00:59:59 +0200 +Subject: [PATCH 2/2] Fix types of read write and readables methods + +From: Samuel Thibault + +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 +Date: Mon, 29 Aug 2022 21:36:17 +0200 +Subject: [PATCH] Fix types of read write and readables methods + +From: Etienne Brateau + +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 . */ + 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" -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 - and Shengyu Zhang -@@ -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 - From patchwork Mon Mar 20 22:10:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 48470 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 651C316F2D; Mon, 20 Mar 2023 22:13:01 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E90F816F13 for ; Mon, 20 Mar 2023 22:13:00 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNjg-0003tQ-Df; Mon, 20 Mar 2023 18:12:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNjZ-0003mI-Nv for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNjZ-0003H5-Fk for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNjZ-0007Ng-BB for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates 10/15] hurd: Remove useless glibc/hurd-headers input. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 22:12:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org, Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.167935027528207 (code B ref 62307); Mon, 20 Mar 2023 22:12:05 +0000 Received: (at 62307) by debbugs.gnu.org; 20 Mar 2023 22:11:15 +0000 Received: from localhost ([127.0.0.1]:57023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNik-0007Ko-Vd for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:15 -0400 Received: from jpoiret.xyz ([206.189.101.64]:47164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNif-0007JI-Tw for 62307@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:10 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 48D76185328; Mon, 20 Mar 2023 22:11:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1679350269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f0dRHA8PHdSm3SSi3nNQehWMEwxXBCtUARNXNcPAebA=; b=MN9W5ek47AUayCH4PNIlLTv6dDYuCfVUPjJqNQvteycCN19jy/uaR6xPggLpBz7SAfQ0hs fMZiwWCtspQ6PdYzcPHuNEvCyNQLLIUpWzEz+MepI+0MGXt/DnVDpoZcgCbV9hhR31wLrb hQR6RMwAdf69DZvLRq9iGSSQnkr7N1z9pTm+qCNhpOF7e0NZ1qsrGCOQcnBZD3l2J/jjyF ZmAWgB1aGJrsvZliA6JVTiiaW+ccmBnV0bP6/lnQds2xAXHkHiU4nAcsml5CQbIthdgz50 7mbfMAtMtdwA69xE//ET4lZk7tYwKQrhqD1YBcffzxrPB61uSZgOIs1iaJo49w== Date: Mon, 20 Mar 2023 23:10:45 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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) From patchwork Mon Mar 20 22:10:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 48465 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 84FF216F39; Mon, 20 Mar 2023 22:12:44 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id F3FAA16F13 for ; Mon, 20 Mar 2023 22:12:43 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNjf-0003rm-Gk; Mon, 20 Mar 2023 18:12:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNja-0003mr-2g for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNjZ-0003HF-QT for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNjZ-0007Nn-MR for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates 11/15] gnumach, hurd-headers, hurd: Switch to using cross-mig. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 22:12:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org, Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.167935027528213 (code B ref 62307); Mon, 20 Mar 2023 22:12:05 +0000 Received: (at 62307) by debbugs.gnu.org; 20 Mar 2023 22:11:15 +0000 Received: from localhost ([127.0.0.1]:57025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNil-0007Ku-9h for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:15 -0400 Received: from jpoiret.xyz ([206.189.101.64]:47242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNig-0007JT-Ng for 62307@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:11 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 15DEF18532A; Mon, 20 Mar 2023 22:11:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1679350270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ugltOrMHe/epam7qqUe3vWboLSesgwj608C/1hg7tBA=; b=XTzwt0zS99ztwTZeGeHp+Yj6HVTMtkqKOnxsfYWUhSfgzNIV27jYaCj9LTxLWAHmVHWzMZ 1tpa/jIalRDqcQMOONC7rTx2Bjla/Qr04vdr/L8A9WR4JG/Jhfh88Wbz5Ebey3YPUciZow f0HcGpVO8AhKf0ahR8H2JeDvWHm0LUHaxYKckH9184EzGniFK9lkSSYKdHd/jpVZDmwWwj xmHHL5qmoi114vLTtwR+TIH7D05VhVa4XnEI4RJWXs0q3L5XP7Mgcc/oaMD9Q2VF9Urc5G IkxEM8dBCyTlftFJnAqVsb+UkbNGPv5uesNxz+kQNAD3pUaOkEsVDe2fqJbnJg== Date: Mon, 20 Mar 2023 23:10:46 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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))) From patchwork Mon Mar 20 22:10:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 48468 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0147A16F34; Mon, 20 Mar 2023 22:12:57 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E485916F13 for ; Mon, 20 Mar 2023 22:12:55 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNjh-0003uj-FE; Mon, 20 Mar 2023 18:12:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNjb-0003nM-5p for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNja-0003HW-Sz for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNja-0007P0-Of for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates 12/15] hurd: Update DDE and use libdde_linux26. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 22:12:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org, Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.167935029428256 (code B ref 62307); Mon, 20 Mar 2023 22:12:06 +0000 Received: (at 62307) by debbugs.gnu.org; 20 Mar 2023 22:11:34 +0000 Received: from localhost ([127.0.0.1]:57031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNj4-0007LZ-8k for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:34 -0400 Received: from jpoiret.xyz ([206.189.101.64]:47374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNii-0007Jm-8D for 62307@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:13 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 9BC9E185326; Mon, 20 Mar 2023 22:11:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1679350271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iho8jAAAVXtJCc3TfpxN2+sGo+phw7Kr5q6anliUKkk=; b=aiC5UhhFOkYYL/EHVCdHoWsv3CpLM3ZWaS46LMehcoIToC5qU9szRLSImYy4tEOeje1LxB +pTweqWV7EiY+ZhO6vIuAaZ0XXbLAY4oaJ6nuaqhvo1wYslxsfUBNzUm+Vp9CGWSFBMX9p vTlbZNwzyLZTbN01W/X+fVNkZ4IjYoDoALsDgZKZDND14HoqxXd4/T0gJppWIfh7MJLJ4B W442dW5+3Eq4DDxCK/WYxX42iHMuS80dcsHWfCEWusejRj8b2mKbhvDf3WcVylFS6wNqRB Xvi5ZuNg648ZkOBQbsdSEh7IlAsMaaenrrxIqj+0QuK6Yvbh7Kz7n86EFrKw0Q== Date: Mon, 20 Mar 2023 23:10:48 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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" From patchwork Mon Mar 20 22:10:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 48459 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6AD5B16F13; Mon, 20 Mar 2023 22:12:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E511616F13 for ; Mon, 20 Mar 2023 22:12:21 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNjh-0003u0-5O; Mon, 20 Mar 2023 18:12:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNja-0003nC-QP for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNja-0003HR-Hi for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNja-0007O1-DG for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates 13/15] mig/32-bit: Remove. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 22:12:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org, Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.167935029428248 (code B ref 62307); Mon, 20 Mar 2023 22:12:06 +0000 Received: (at 62307) by debbugs.gnu.org; 20 Mar 2023 22:11:34 +0000 Received: from localhost ([127.0.0.1]:57029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNj3-0007LS-UZ for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:34 -0400 Received: from jpoiret.xyz ([206.189.101.64]:47306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNii-0007JZ-Nd for 62307@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:13 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 5C7B5185328; Mon, 20 Mar 2023 22:11:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1679350272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SgYM1MAaApuGx6718z62O8/Tu2DefsUdnhveOUV2VMM=; b=AyJIb1qr1i4tkKwx+h64OUJoGPquKf2baOawTq+8tx/KLcxKY0fO6uscvBu9LNXdSpfSrt GoaK3uvWCrR9GII7FZCNVgpMqDEG6QoWAEZVAIQHouuB4bhP66swJAqFx2W44il3ngmpml TOd0SSm8VBYXTiT+6mJHElYUoEQi979kvqIvDSmbDI0s2ILwsQyT4ttXHUd0USQ3BjQyJJ /U5AIBJVt71EmpVFx3mwS/vOo3DsrWDuop8aio7TPxZR/7CvnDAYgOy6q0Ew/2g3a4kDpp 48rmlTI8cUFFJpRVIloQIvzcuxiyTM75mZZenBY6iWnnUsv8e9Z05RtxMxteaA== Date: Mon, 20 Mar 2023 23:10:49 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 From patchwork Mon Mar 20 22:10:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 48471 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6E60216F13; Mon, 20 Mar 2023 22:13:06 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C641916F13 for ; Mon, 20 Mar 2023 22:13:05 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNji-0003w8-Ay; Mon, 20 Mar 2023 18:12:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNjb-0003ng-W6 for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNjb-0003Hq-Mf for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNjb-0007PG-Hf for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates 14/15] system: hurd: Use shepherd-0.8 in the package list. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 22:12:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org, Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.167935029728273 (code B ref 62307); Mon, 20 Mar 2023 22:12:07 +0000 Received: (at 62307) by debbugs.gnu.org; 20 Mar 2023 22:11:37 +0000 Received: from localhost ([127.0.0.1]:57035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNj6-0007Lr-Vr for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:37 -0400 Received: from jpoiret.xyz ([206.189.101.64]:47512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNij-0007KM-Nf for 62307@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:14 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 18C9D18532A; Mon, 20 Mar 2023 22:11:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1679350273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DZm+ZJVG9hk1iRFkgRkgPgTfnp0x+wu3j5bsNbEMYaQ=; b=psoWnXCMbif/bDGY4n0Wbcfss19+J6bb064iXue1PnaZJXGha/1b2VG/5myWm2Sbn+gb2/ GBLjM5uqZ4s8USCmmIkYpZgfG3gkuYYlnKJfWolsrdmnRVm7tM6D5TSdHPdUp3+DYpVdPu tS/ZmfEA7MZtDQaVzx5QAF0V1Ft1QA4AIswBebX1TcVA3A9HKUHGMScBK6zrGQHujeWFT1 DaVF/PbUItBAjNzkYz7zyajXgduTKfy3ypoCwklfuHUh0DQj0hh6mhiDcLURvoOwm22jT+ nXj7tET5NVsuI9cHPSEqqXjHIKQdCu1kmno1ebVxkC71+HjuyDu9Y4TsvL1BKg== Date: Mon, 20 Mar 2023 23:10:50 +0100 Message-Id: <469a8f4aa07cae461dee2ecefc3ff696cdfaf200.1679349992.git.dev@jpoiret.xyz> In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 From patchwork Mon Mar 20 22:10:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josselin Poiret X-Patchwork-Id: 48469 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 945C916F32; Mon, 20 Mar 2023 22:12:59 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4BBFD16F13 for ; Mon, 20 Mar 2023 22:12:59 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peNjg-0003tj-QJ; Mon, 20 Mar 2023 18:12:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peNjc-0003oc-GX for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peNjc-0003II-7N for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peNjc-0007PN-3Y for guix-patches@gnu.org; Mon, 20 Mar 2023 18:12:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates 15/15] system: pam: Only add linux-pam reference if on Linux. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Mar 2023 22:12:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org, Josselin Poiret Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.167935029728279 (code B ref 62307); Mon, 20 Mar 2023 22:12:08 +0000 Received: (at 62307) by debbugs.gnu.org; 20 Mar 2023 22:11:37 +0000 Received: from localhost ([127.0.0.1]:57037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNj7-0007Ly-9X for submit@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:37 -0400 Received: from jpoiret.xyz ([206.189.101.64]:47374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peNik-0007Jm-7R for 62307@debbugs.gnu.org; Mon, 20 Mar 2023 18:11:14 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id C9BDC184D6B; Mon, 20 Mar 2023 22:11:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1679350274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NguPpRZq/YgnFpoKq7byrYgbRESVWQpvhGipdFGPT04=; b=QorYuksEqVvUbf7naOtEwY1kYiVwgg5QypQKVTXcGEq+MHgJMUKyQCdm6qND1z57MV8TkP +yb+oKssnF3mVWZw0EWV41EWjfP7wdGzTxzurOyOYjE9p+h9C7DD0TVy09J3p9WVM0knEA GyWNTGKJvKABAZBZC7RNOHbLe2b2hECvy6fQY9p4Sk+iI7tDYI82UzmImiI/8hYS18w7zV ckwDVQUuqbGhyiNJMZShMBl9cJh04mNojvSUOprW7VzQxmXZJVDK1DSeTBsbr7KvpTBAui E+aEkrDzrJAJ5BLeqb+zqq2GBa0hJP+LkelB4krqsWy6adDOqW8+7/wTAogsOg== Date: Mon, 20 Mar 2023 23:10:51 +0100 Message-Id: <7b96d7bffdcdc7e3afea5c089200c8542ec12400.1679349992.git.dev@jpoiret.xyz> In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches X-Patchwork-Original-From: Josselin Poiret via Guix-patches via From: Josselin Poiret Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 as well as procedures. (compose concatenate)