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. Signed-off-by: Josselin Poiret <dev@jpoiret.xyz>
parent
451b2db3df
commit
5981e99f0a
|
@ -1366,6 +1366,8 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/hubbub-maybe-uninitialized.patch \
|
%D%/packages/patches/hubbub-maybe-uninitialized.patch \
|
||||||
%D%/packages/patches/hueplusplus-mbedtls.patch \
|
%D%/packages/patches/hueplusplus-mbedtls.patch \
|
||||||
%D%/packages/patches/hurd-add-without-rump-configure-option.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-2.patch \
|
||||||
%D%/packages/patches/hurd-fix-types-of-read-write-and-readables-methods.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/hwloc-1-test-btrfs.patch \
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#:use-module (gnu packages autotools)
|
#:use-module (gnu packages autotools)
|
||||||
#:use-module (gnu packages compression)
|
#:use-module (gnu packages compression)
|
||||||
#:use-module (gnu packages cross-base)
|
#:use-module (gnu packages cross-base)
|
||||||
|
#:use-module (gnu packages disk)
|
||||||
#:use-module (gnu packages flex)
|
#:use-module (gnu packages flex)
|
||||||
#:use-module (gnu packages gawk)
|
#:use-module (gnu packages gawk)
|
||||||
#:use-module (gnu packages gnupg)
|
#:use-module (gnu packages gnupg)
|
||||||
|
@ -312,12 +313,15 @@ Hurd-minimal package which are needed for both glibc and GCC.")
|
||||||
(define-public hurd
|
(define-public hurd
|
||||||
(package
|
(package
|
||||||
(name "hurd")
|
(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))
|
(version (package-version hurd-headers))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'prepare-dde
|
(add-after 'unpack 'prepare-addons
|
||||||
(lambda* (#:key native-inputs inputs #:allow-other-keys)
|
(lambda* (#:key native-inputs inputs #:allow-other-keys)
|
||||||
;; First we import the things we want from dde.
|
;; First we import the things we want from dde.
|
||||||
(for-each make-file-writable (find-files "."))
|
(for-each make-file-writable (find-files "."))
|
||||||
|
@ -331,7 +335,7 @@ Hurd-minimal package which are needed for both glibc and GCC.")
|
||||||
;; Makefile. libdde_linux26 is built later in its own phase.
|
;; Makefile. libdde_linux26 is built later in its own phase.
|
||||||
(substitute* "Makefile"
|
(substitute* "Makefile"
|
||||||
(("libbpf ")
|
(("libbpf ")
|
||||||
"libbpf libmachdevdde libddekit"))))
|
"libbpf libmachdevdde libddekit rumpdisk"))))
|
||||||
(add-after 'unpack 'find-tirpc
|
(add-after 'unpack 'find-tirpc
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(for-each (lambda (var)
|
(for-each (lambda (var)
|
||||||
|
@ -494,10 +498,10 @@ exec ${system}/rc \"$@\"
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
,#~(list (string-append "LDFLAGS=-Wl,-rpath="
|
,#~(list (string-append "LDFLAGS=-Wl,-rpath="
|
||||||
#$output "/lib")
|
#$output "/lib")
|
||||||
|
"--enable-static-progs=ext2fs,iso9660fs,rumpdisk,pci-arbiter,acpi"
|
||||||
"--disable-ncursesw"
|
"--disable-ncursesw"
|
||||||
"--without-libbz2"
|
"--without-libbz2"
|
||||||
"--without-libz"
|
"--without-libz"
|
||||||
"--without-parted"
|
|
||||||
;; This is needed to pass the configure check for
|
;; This is needed to pass the configure check for
|
||||||
;; clnt_create
|
;; clnt_create
|
||||||
"ac_func_search_save_LIBS=-ltirpc"
|
"ac_func_search_save_LIBS=-ltirpc"
|
||||||
|
@ -518,7 +522,9 @@ exec ${system}/rc \"$@\"
|
||||||
("coreutils" ,coreutils)
|
("coreutils" ,coreutils)
|
||||||
("sed" ,sed)
|
("sed" ,sed)
|
||||||
("grep" ,grep)
|
("grep" ,grep)
|
||||||
("util-linux" ,util-linux)))
|
("util-linux" ,util-linux "static") ;libuuid.a, for parted
|
||||||
|
("parted" ,parted) ;for rumpdisk
|
||||||
|
("rumpkernel" ,rumpkernel)))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("autoconf" ,autoconf)
|
`(("autoconf" ,autoconf)
|
||||||
("automake" ,automake)
|
("automake" ,automake)
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)
|
Reference in New Issue