summaryrefslogtreecommitdiff
path: root/gnu/packages/hurd.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/hurd.scm')
-rw-r--r--gnu/packages/hurd.scm298
1 files changed, 165 insertions, 133 deletions
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 7f02e6141d..34c7c00f2d 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -66,60 +66,64 @@ GNU/Hurd."
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 <http://lists.gnu.org/archive/html/bug-hurd/2015-06/msg00042.html>
- ;; <http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00716.html>
- '(#: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 <http://lists.gnu.org/archive/html/bug-hurd/2015-06/msg00042.html>
+ ;; <http://lists.gnu.org/archive/html/guix-devel/2015-06/msg00716.html>
+ '(#: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
(name "mig")
- (version "1.8")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/mig/mig-"
- version ".tar.gz"))
- (sha256
- (base32
- "1gyda8sq6b379nx01hkpbd85lz39irdvz2b9wbr63gicicx8i706"))))
+ (version "1.8+git20220827")
+ (source (origin
+ (method url-fetch)
+ ;; XXX: Version 2.35 of glibc can only be built with an
+ ;; unreleased version of MiG:
+ ;; <https://lists.gnu.org/archive/html/bug-hurd/2023-03/msg00025.html>.
+ ;; It cannot be fetched from Git though, as the extra dependency
+ ;; on Autoconf/Automake would complicate bootstrapping.
+ (uri (string-append "mirror://gnu/guix/mirror/mig-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "163d37s9lscd6zxyfng421m9nl857464mgjj90xsrcl5ykbng5p2"))
+ (patches (search-patches "mig-cpu.h-generation.patch"))))
(build-system gnu-build-system)
;; Flex is needed both at build and run time.
(inputs (list gnumach-headers flex))
@@ -148,77 +152,71 @@ for other software in the GNU system that uses Mach-based inter-process
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
- ;; 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
+ (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
+ (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)
@@ -306,7 +304,15 @@ Hurd-minimal package which are needed for both glibc and GCC.")
(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
@@ -325,7 +331,7 @@ Hurd-minimal package which are needed for both glibc and GCC.")
(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
@@ -333,32 +339,38 @@ Hurd-minimal package which are needed for both glibc and GCC.")
(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")
+ (source (package-source hurd-headers))
(version (package-version hurd-headers))
- (source (origin (inherit (package-source hurd-headers))
- (patches (search-patches "hurd-cross.patch"
- "hurd-xattr.patch"))))
(arguments
`(#:phases
(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)
@@ -477,12 +489,34 @@ exec ${system}/rc \"$@\"
(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"
@@ -510,9 +544,7 @@ exec ${system}/rc \"$@\"
"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)
@@ -530,12 +562,12 @@ exec ${system}/rc \"$@\"
`(("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)))