From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UBokF2/gbGRGnQAASxT56A (envelope-from ) for ; Tue, 23 May 2023 17:49:03 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qr4SFm/gbGSMhgEAG6o9tA (envelope-from ) for ; Tue, 23 May 2023 17:49:03 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 111909B0C for ; Tue, 23 May 2023 17:49:03 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1UFD-0007Fi-7M; Tue, 23 May 2023 11:48:15 -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 1q1UF5-00074r-T8 for guix-patches@gnu.org; Tue, 23 May 2023 11:48:09 -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 1q1UF5-0006Fs-1A for guix-patches@gnu.org; Tue, 23 May 2023 11:48:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q1UF4-0007tN-Sj for guix-patches@gnu.org; Tue, 23 May 2023 11:48:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63527] [PATCH v5 06/11] gnu: hurd: Add rumpkernel. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 23 May 2023 15:48:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63527 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63527@debbugs.gnu.org Received: via spool by 63527-submit@debbugs.gnu.org id=B63527.168485688330280 (code B ref 63527); Tue, 23 May 2023 15:48:06 +0000 Received: (at 63527) by debbugs.gnu.org; 23 May 2023 15:48:03 +0000 Received: from localhost ([127.0.0.1]:40232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1UF0-0007rx-8g for submit@debbugs.gnu.org; Tue, 23 May 2023 11:48:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1UEj-0007oF-Co for 63527@debbugs.gnu.org; Tue, 23 May 2023 11:47:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1UEe-000647-6O; Tue, 23 May 2023 11:47:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=HKVhcVErPnQZVQiW5dwfVMk4PSdkHOdTv5Z1kP3Fwxo=; b=RsqDLA9gxj9fXtIssovj 1da1uXmJJqM/EHb+fwtuy+sQIdm1E6f6ob4J4CK0e6CUxY4nzg+RiRPiRlosHnczIrbd1wXLM8tLu CjsUmY4nosx/8i87X5DTNJZd6IHYkWaBA3EVlU1gw02CfFKuRo7OOpOtntLA4VQBIKo+poW16s6Vj ktH23ENpye+pl5MCXWf5K7g7PVYqIVGeiNhvOxtruYSTsuYCkM94I5dP92uqUKrfH+YCPdbmIiDsp 4esInUAhnkiG/W9Dzy3D+JzSwdhvB+WgiigUQ7l8xMDBecWBVOb0vaOHkF7s3b0yOj6EUmzDTpb3x /w5aaIZhJ9QsGg==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1q1UEd-0002jp-PK; Tue, 23 May 2023 11:47:39 -0400 From: Janneke Nieuwenhuizen Date: Tue, 23 May 2023 17:47:27 +0200 Message-Id: <5995550d8ce78db5a5d52198201c256275bbb954.1684855847.git.janneke@gnu.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1684856943; a=rsa-sha256; cv=none; b=IKc7w52+AcciqclcbOH6VkK44IJ0g+XrK+xzxhTxhDJoWNP8SPadGS8R7weLOCbzVnOEmt UhhkAyuI6Q16JSSFNAwUVtrwL8nmJUzg8bcFr/RgrCYRNqgB8rzStxlEjL0rBlhMCp2UKW LXM9eIFkUR9tqgX8wkWe1Xkm0QkRWs3aziF2JOUibOBdqD0MDt979gioLD4X+cXBrfuf+6 1HqCFtp+7aMfG3lRhCmELWoR42Y7loEziXh8uhyx7jqHltMfrX+UIW+pcgsxvuYE4fTuae KCCSO5RtjtNmD9bSVpVafNDACVhf0KLWOlFmc61jM8fIi7AzpeSMYi+s9FfuVQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=RsqDLA9g; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1684856943; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=HKVhcVErPnQZVQiW5dwfVMk4PSdkHOdTv5Z1kP3Fwxo=; b=GWiPTMvOeh9HxrwaN92AgvO93+MkIXUrxs3xLNzsKb4X6v2oLUxaedvnOFhJIs5UM/5vsU UgbSZtp3lSJqQ7qW3Kn2n9nAYRf5IyEW2ZFl0IPnDlFuxw+reSUkyBDn4QShVhNRjSewGU vcgcpE2RsY9drP156LGN7xg2jMV3QzpJM4D2Jm5nmmCjfjBRD3tVBACSGyp4kGzdjOdJ4V lGcJPAeno5LwPlc5jRI65broTvMX1WosYoRx6+umzhi3iCca/qKCU4Tv0f+kKG/0eGC+JS 2hQShZoD/f6TH2yCCZaha2ZvD4e0CcwPreCN3l2gX+IJHxlL5baPUsskpayYHQ== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=RsqDLA9g; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.07 X-Spam-Score: -1.07 X-Migadu-Queue-Id: 111909B0C X-TUID: YXvqPeogj1jT * gnu/packages/patches/hurd-fix-rumpdisk-build.patch, gnu/packages/patches/hurd-rumpdisk-no-hd.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/hurd.scm (hurd-headers): Use them. (hurd)[inputs]: Add util-linux:static, parted, rumpkernel. [arguments]: Rename `prepare-dde' phase to 'prepare-addons'. Add "rumpdisk" directory. Add --enable-static-progs=... option to #:configure-flags, and remove --without-parted. --- gnu/local.mk | 2 + gnu/packages/hurd.scm | 17 +++++--- .../patches/hurd-fix-rumpdisk-build.patch | 41 +++++++++++++++++++ .../patches/hurd-rumpdisk-no-hd.patch | 26 ++++++++++++ 4 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/hurd-fix-rumpdisk-build.patch create mode 100644 gnu/packages/patches/hurd-rumpdisk-no-hd.patch diff --git a/gnu/local.mk b/gnu/local.mk index 2a09d44506..052b76ea7e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1354,6 +1354,8 @@ dist_patch_DATA = \ %D%/packages/patches/hubbub-sort-entities.patch \ %D%/packages/patches/hueplusplus-mbedtls.patch \ %D%/packages/patches/hurd-add-without-rump-configure-option.patch \ + %D%/packages/patches/hurd-fix-rumpdisk-build.patch \ + %D%/packages/patches/hurd-rumpdisk-no-hd.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 \ diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index 9fbca9d5c5..536df96e00 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -34,6 +34,7 @@ (define-module (gnu packages hurd) #:use-module (gnu packages autotools) #:use-module (gnu packages compression) #:use-module (gnu packages cross-base) + #:use-module (gnu packages disk) #:use-module (gnu packages flex) #:use-module (gnu packages gawk) #:use-module (gnu packages gnupg) @@ -157,7 +158,9 @@ (define-public hurd-headers (sha256 (base32 "0jm1dnqkx4kdwmby0z5w0yqp9m5qp4hbxd4jxlyhiqm8nkw9mkvv")) - (file-name (git-file-name name version)))) + (file-name (git-file-name name version)) + (patches (search-patches "hurd-fix-rumpdisk-build.patch" + "hurd-rumpdisk-no-hd.patch")))) (build-system gnu-build-system) (native-inputs (list autoconf @@ -366,7 +369,7 @@ (define-public hurd (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'prepare-dde + (add-after 'unpack 'prepare-addons (lambda* (#:key native-inputs inputs #:allow-other-keys) ;; First we import the things we want from dde. (for-each make-file-writable (find-files ".")) @@ -380,7 +383,7 @@ (define-public hurd ;; Makefile. libdde_linux26 is built later in its own phase. (substitute* "Makefile" (("libbpf ") - "libbpf libmachdevdde libddekit")))) + "libbpf libmachdevdde libddekit rumpdisk")))) (add-after 'unpack 'find-tirpc (lambda* (#:key inputs #:allow-other-keys) (for-each (lambda (var) @@ -543,10 +546,10 @@ (define-public hurd #:configure-flags ,#~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib") + "--enable-static-progs=ext2fs,iso9660fs,rumpdisk,pci-arbiter,acpi" "--disable-ncursesw" "--without-libbz2" "--without-libz" - "--without-parted" ;; This is needed to pass the configure check for ;; clnt_create "ac_func_search_save_LIBS=-ltirpc" @@ -567,7 +570,11 @@ (define-public hurd ("coreutils" ,coreutils) ("sed" ,sed) ("grep" ,grep) - ("util-linux" ,util-linux))) + ("util-linux" ,util-linux) +;; ("util-linux" ,util-linux "lib") ;libuuid.so, for parted + ("util-linux" ,util-linux "static") ;libuuid.a, for parted + ("parted" ,parted) ;for rumpdisk + ("rumpkernel" ,rumpkernel))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) diff --git a/gnu/packages/patches/hurd-fix-rumpdisk-build.patch b/gnu/packages/patches/hurd-fix-rumpdisk-build.patch new file mode 100644 index 0000000000..4ecd5ed0ee --- /dev/null +++ b/gnu/packages/patches/hurd-fix-rumpdisk-build.patch @@ -0,0 +1,41 @@ +Upstream status: taken from upstream. + +From a2b0f721d077fdc5c9decb21b975b58fb51a3e8f Mon Sep 17 00:00:00 2001 +From: Janneke Nieuwenhuizen +Date: Mon, 22 May 2023 19:21:47 +0200 +Subject: [PATCH] rumpdisk: Do not assume FHS /usr/lib, fixes Guix cross-build. + +--- + rumpdisk/Makefile | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/rumpdisk/Makefile b/rumpdisk/Makefile +index 60a209b3..b59aaf9a 100644 +--- a/rumpdisk/Makefile ++++ b/rumpdisk/Makefile +@@ -1,5 +1,5 @@ + # +-# Copyright (C) 2019 Free Software Foundation, Inc. ++# Copyright (C) 2019, 2023 Free Software Foundation, Inc. + # + # This program is free software; you can redistribute it and/or + # modify it under the terms of the GNU General Public License as +@@ -15,7 +15,6 @@ + # along with this program; if not, write to the Free Software + # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +-RUMPPATH=/usr/lib + RUMPLIBS=rump rumpuser rumpdev rumpdev_disk rumpdev_pci rumpvfs rumpdev_ahcisata rumpdev_piixide rumpdev_ata + RUMPEXTRA=rumpdev_scsipi + +@@ -38,6 +37,6 @@ target = rumpdisk + OBJS = $(SRCS:.c=.o) + HURDLIBS = machdev ports trivfs shouldbeinlibc iohelp ihash fshelp + LDLIBS += -lpthread -lpciaccess -ldl +-LDLIBS += -Wl,--whole-archive $(RUMPLIBS:%=$(RUMPPATH)/lib%_pic.a) -Wl,--no-whole-archive $(RUMPEXTRA:%=$(RUMPPATH)/lib%_pic.a) ++LDLIBS += -Wl,--whole-archive $(RUMPLIBS:%=-l%_pic) -Wl,--no-whole-archive $(RUMPEXTRA:%=-l%_pic) + + include ../Makeconf +-- +2.40.1 + diff --git a/gnu/packages/patches/hurd-rumpdisk-no-hd.patch b/gnu/packages/patches/hurd-rumpdisk-no-hd.patch new file mode 100644 index 0000000000..4e5d41917d --- /dev/null +++ b/gnu/packages/patches/hurd-rumpdisk-no-hd.patch @@ -0,0 +1,26 @@ +This avoids rumpdisk crash when booting without "noide". + +Upstream status: Taken from Debian Salsa package git + + https://salsa.debian.org/hurd-team/hurd/-/blob/f40ff84260b5a98bea949013415a1c92c127a43e/debian/patches/rumpdisk-no-hd + +Index: hurd-debian/rumpdisk/block-rump.c +=================================================================== +--- hurd-debian.orig/rumpdisk/block-rump.c ++++ hurd-debian/rumpdisk/block-rump.c +@@ -143,7 +143,6 @@ rumpdisk_device_init (void) + { + device_t device; + +-#if 0 + if (! device_open (device_master, D_READ, "hd0", &device) + || ! device_open (device_master, D_READ, "hd1", &device) + || ! device_open (device_master, D_READ, "hd3", &device) +@@ -154,7 +153,6 @@ rumpdisk_device_init (void) + disabled = 1; + return; + } +-#endif + + if (! device_open (device_master, D_READ, "sd0", &device) + || ! device_open (device_master, D_READ, "sd1", &device) -- 2.40.1