[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
16/48: gnu: hurd: Add rumpkernel.
From: |
guix-commits |
Subject: |
16/48: gnu: hurd: Add rumpkernel. |
Date: |
Sun, 4 Jun 2023 07:43:43 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd
in repository guix.
commit 310999189655eebb18f4bfa15c32835f2002c753
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Mon May 15 11:38:50 2023 +0200
gnu: hurd: Add rumpkernel.
* 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): Use them.
(hurd)[inputs]: Replace util-linux with util-linux:static, add 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 | 16 ++++++---
gnu/packages/patches/hurd-fix-rumpdisk-build.patch | 41 ++++++++++++++++++++++
gnu/packages/patches/hurd-rumpdisk-no-hd.patch | 26 ++++++++++++++
4 files changed, 80 insertions(+), 5 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 73e6c2ba6e..dfdd34a99d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1359,6 +1359,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 8e21e9b7e4..c1b0af9a35 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -34,6 +34,7 @@
#: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)
@@ -323,12 +324,15 @@ Hurd-minimal package which are needed for both glibc and
GCC.")
(define-public hurd
(package
(name "hurd")
- (source (package-source hurd-headers))
+ (source (origin
+ (inherit (package-source hurd-headers))
+ (patches (search-patches "hurd-fix-rumpdisk-build.patch"
+ "hurd-rumpdisk-no-hd.patch"))))
(version (package-version hurd-headers))
(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 "."))
@@ -342,7 +346,7 @@ Hurd-minimal package which are needed for both glibc and
GCC.")
;; 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)
@@ -505,10 +509,10 @@ exec ${system}/rc \"$@\"
#: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"
@@ -529,7 +533,9 @@ exec ${system}/rc \"$@\"
("coreutils" ,coreutils)
("sed" ,sed)
("grep" ,grep)
- ("util-linux" ,util-linux)))
+ ("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 <janneke@gnu.org>
+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)
- 01/48: hurd-boot: Add urandom and default-pager translators., (continued)
- 01/48: hurd-boot: Add urandom and default-pager translators., guix-commits, 2023/06/04
- 03/48: gnu: gnumach-headers: Cross-build without relying on x86., guix-commits, 2023/06/04
- 02/48: gnu: glibc/hurd-headers: Properly cross-build., guix-commits, 2023/06/04
- 20/48: bootloader: grub: Use rumpdisk-style root when booting with "noide"., guix-commits, 2023/06/04
- 25/48: services: static-networking: Support netdde for the Hurd., guix-commits, 2023/06/04
- 41/48: gnu: diffutils: Remove test-perror2 from XFAIL_TESTS for the Hurd., guix-commits, 2023/06/04
- 43/48: gnu: m4: Skip gnulib stack-overflow tests for the Hurd., guix-commits, 2023/06/04
- 38/48: gnu: grep: Update hanging and failing tests for the Hurd., guix-commits, 2023/06/04
- 44/48: hurd: Support system init in /libexec/runsystem., guix-commits, 2023/06/04
- 07/48: gnu: mig: Update to 04bfe7a91223ba15d868f7165e49328b1c6e86c3., guix-commits, 2023/06/04
- 16/48: gnu: hurd: Add rumpkernel.,
guix-commits <=
- 21/48: gnu: gnumach: Support "noide" argument., guix-commits, 2023/06/04
- 42/48: gnu: gettext-minimal: Remove XFAIL_TESTS for the Hurd., guix-commits, 2023/06/04
- 28/48: gnu: commencement: Add automake-boot0., guix-commits, 2023/06/04
- 35/48: Revert "gnu: libunistring: Fix make check for the Hurd.", guix-commits, 2023/06/04
- 39/48: Revert "gnu: sed: Skip failing test on GNU/Hurd.", guix-commits, 2023/06/04
- 12/48: gnu: hurd: Update libpciaccess to 0.17., guix-commits, 2023/06/04
- 19/48: system: hurd: Boot with pci.arbiter and rumpdisk., guix-commits, 2023/06/04
- 23/48: hurd-boot: Cater for netdde., guix-commits, 2023/06/04
- 26/48: gnu: gnumach: Disable builtin networking., guix-commits, 2023/06/04
- 32/48: gnu: commencement: hurd-minimal-boot0: Update to 0.9.git20230216., guix-commits, 2023/06/04