summaryrefslogtreecommitdiff
path: root/gnu/packages/commencement.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/commencement.scm')
-rw-r--r--gnu/packages/commencement.scm917
1 files changed, 186 insertions, 731 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index e8b47fbeab..9d6ed5fd08 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -7,7 +7,7 @@
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
-;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com>
+;;; Copyright © 2020, 2022 Timothy Sample <samplet@ngyro.com>
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
@@ -92,7 +92,7 @@
(define bootar
(package
(name "bootar")
- (version "1a")
+ (version "1b")
(source (origin
(method url-fetch)
(uri (list (string-append
@@ -102,7 +102,7 @@
version ".ses")))
(sha256
(base32
- "0mvp6vgx0q316fvy3z2lddlc5xgq5np3bm1fypgvj6dnayibg9np"))))
+ "0cf5vj5yxfvkgzvjvh2l7b2nz5ji5l534n9g4mfp8f5jsjqdrqjc"))))
(build-system gnu-build-system)
(arguments
`(#:implicit-inputs? #f
@@ -121,9 +121,10 @@
(guile (string-append guile-dir "/bin/guile")))
(invoke guile "--no-auto-compile" source)
(chdir "bootar"))))
- (replace 'configure (bootstrap-configure ,version "." "scripts"))
- (replace 'build (bootstrap-build "."))
- (replace 'install (bootstrap-install "." "scripts"))))))
+ (replace 'configure (bootstrap-configure "Bootar" ,version
+ '(".") "scripts"))
+ (replace 'build (bootstrap-build '(".")))
+ (replace 'install (bootstrap-install '(".") "scripts"))))))
(inputs `(("guile" ,%bootstrap-guile)))
(home-page "https://git.ngyro.com/bootar")
(synopsis "Tar decompression and extraction in Guile Scheme")
@@ -143,9 +144,6 @@ pure Scheme to Tar and decompression in one easy step.")
(package
(inherit gash)
(name "gash-boot")
- (source (origin
- (inherit (package-source gash))
- (snippet #f))) ;discard snippet for Guile 3.0 support
(arguments
`(#:implicit-inputs? #f
#:tests? #f
@@ -157,9 +155,10 @@ pure Scheme to Tar and decompression in one easy step.")
(use-modules (guix build gnu-bootstrap))
(modify-phases %standard-phases
(replace 'configure
- (bootstrap-configure ,(package-version gash) "gash" "scripts"))
- (replace 'build (bootstrap-build "gash"))
- (replace 'install (bootstrap-install "gash" "scripts"))
+ (bootstrap-configure "Gash" ,(package-version gash)
+ '("gash") "scripts"))
+ (replace 'build (bootstrap-build '("gash")))
+ (replace 'install (bootstrap-install '("gash") "scripts"))
(add-after 'install 'install-symlinks
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
@@ -174,10 +173,6 @@ pure Scheme to Tar and decompression in one easy step.")
(package
(inherit gash-utils)
(name "gash-utils-boot")
- (source (origin
- (inherit (package-source gash-utils))
- (patches '())
- (snippet #f))) ;discard snippet for Guile 3.0 support
(arguments
`(#:implicit-inputs? #f
#:tests? #f
@@ -209,9 +204,9 @@ pure Scheme to Tar and decompression in one easy step.")
(substitute* target
(("@UTILITY@") script))))
'("awk" "basename" "cat" "chmod" "cmp" "command"
- "compress" "cp" "cut" "diff" "dirname" "expr"
- "false" "find" "grep" "head" "ln" "ls" "mkdir"
- "mv" "printf" "pwd" "reboot" "rm" "rmdir"
+ "compress" "cp" "cut" "diff" "dirname" "env"
+ "expr" "false" "find" "grep" "head" "ln" "ls"
+ "mkdir" "mv" "printf" "pwd" "reboot" "rm" "rmdir"
"sed" "sleep" "sort" "tar" "test" "touch" "tr"
"true" "uname" "uniq" "wc" "which"))
(format #t "Creating scripts/[.in~%")
@@ -220,10 +215,11 @@ pure Scheme to Tar and decompression in one easy step.")
(("@UTILITY@") "testb"))
(delete-file "scripts/template.in")))
(replace 'configure
- (bootstrap-configure ,(package-version gash-utils)
- "gash" "scripts"))
- (replace 'build (bootstrap-build "gash"))
- (replace 'install (bootstrap-install "gash" "scripts"))
+ (bootstrap-configure "Gash-Utils" ,(package-version gash-utils)
+ '("gash" "gash-utils") "scripts"))
+ (replace 'build (bootstrap-build '("gash" "gash-utils")))
+ (replace 'install
+ (bootstrap-install '("gash" "gash-utils") "scripts"))
;; XXX: The scripts should add Gash to their load paths and
;; this phase should not exist.
(add-after 'install 'copy-gash
@@ -247,7 +243,19 @@ pure Scheme to Tar and decompression in one easy step.")
(copy-file (string-append gash-godir "/gash/compat.go")
(string-append godir "/gash/compat.go"))
(copy-recursively (string-append gash-godir "/gash/compat")
- (string-append godir "/gash/compat")))))))))
+ (string-append godir "/gash/compat")))))
+ ;; We need an external echo.
+ (add-after 'install 'make-echo
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (gash (assoc-ref inputs "gash")))
+ (with-output-to-file (string-append out "/bin/echo")
+ (lambda ()
+ (display (string-append "#!" gash "/bin/gash\n"))
+ (newline)
+ (display "echo \"$@\"")
+ (newline)))
+ (chmod (string-append out "/bin/echo") #o755))))))))
(inputs `(("gash" ,gash-boot)
("guile" ,%bootstrap-guile)))
(native-inputs `(("bootar" ,bootar)))))
@@ -655,152 +663,6 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
("tcc" ,tcc-boot0)
,@(%boot-gash-inputs)))
-(define bzip2-mesboot
- ;; The initial bzip2
- (package
- (inherit bzip2)
- (name "bzip2-mesboot")
- (version (package-version bzip2))
- (source (bootstrap-origin (package-source bzip2)))
- (supported-systems '("i686-linux" "x86_64-linux"))
- (inputs '())
- (propagated-inputs '())
- (native-inputs (%boot-tcc0-inputs))
- (outputs '("out"))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:parallel-build? #f
- #:tests? #f ; check is naive, also checks non-built PROGRAMS
- #:strip-binaries? #f ; no strip yet
- #:make-flags (list "CC=tcc -I ." "AR=tcc -ar" "bzip2"
- (string-append "PREFIX="
- (assoc-ref %outputs "out")))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'scripted-patch
- (lambda _
- (substitute* "Makefile"
- (("\tln " all)
- (string-append "\t#" all)))
- (substitute* "bzip2.c"
- (("struct utimbuf uTimBuf;" all)
- (string-append "// " all))
- (("uTimBuf[.]" all)
- (string-append "// " all))
- (("retVal = utime [(] dstName, &uTimBuf [)];" all)
- (string-append "retVal = 0; // " all)))))
- (replace 'configure
- (lambda _
- (with-output-to-file "utime.h"
- (lambda _ (display "
-#define fchown(filedes, owner, group) 0
-#define fchmod(filedes, mode) 0
-")))))
- (replace 'check
- (lambda _
- (invoke "./bzip2" "--help")))
- ;; FIXME: no compressing gzip yet
- (delete 'compress-documentation))))))
-
-(define bash-mesboot0
- ;; The initial Bash
- (package
- (inherit static-bash)
- (name "bash-mesboot0")
- (version "2.05b")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/bash/bash-"
- version ".tar.gz"))
- (sha256
- (base32
- "1r1z2qdw3rz668nxrzwa14vk2zcn00hw7mpjn384picck49d80xs"))))
- (inputs '())
- (propagated-inputs '())
- (native-inputs (%boot-tcc0-inputs))
- (outputs '("out"))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:parallel-build? #f
- #:strip-binaries? #f ; no strip yet
- #:configure-flags
- (list "--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
-
- "--without-bash-malloc"
- "--disable-readline"
- "--disable-history"
- "--disable-help-builtin"
- "--disable-progcomp"
- "--disable-net-redirections"
- "--disable-nls"
-
- ;; Pretend 'dlopen' is missing so we don't build loadable
- ;; modules and related code.
- "ac_cv_func_dlopen=no")
- #:make-flags '("bash")
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'setenv
- (lambda _
- (let* ((gash (assoc-ref %build-inputs "bash"))
- (shell (string-append gash "/bin/gash")))
- (setenv "CONFIG_SHELL" shell)
- (setenv "SHELL" shell)
- (setenv "CC" "tcc")
- (setenv "LD" "tcc")
- (setenv "AR" "tcc -ar")
- (setenv "CFLAGS" "-D _POSIX_VERSION=1"))))
- (add-after 'unpack 'scripted-patch
- (lambda _
- (substitute* "Makefile.in"
- (("mksyntax\\.c\n") "mksyntax.c -lgetopt\n")
- (("buildversion[.]o\n") "buildversion.o -lgetopt\n")
- ;; No size in Gash
- (("\tsize ") "#\tsize"))
- (substitute* "lib/sh/oslib.c"
- (("int name, namelen;") "char *name; int namelen;"))
- (substitute* "lib/sh/snprintf.c"
- (("^#if (defined [(]HAVE_LOCALE_H[)])" all define) (string-append "#if 0 //" define)))
- (substitute* "configure"
- ((" egrep") " grep"))))
- (replace 'configure
- (lambda* (#:key configure-flags #:allow-other-keys)
- (let ((configure-flags (filter (lambda (x)
- (and (not (string-prefix? "CONFIG_SHELL=" x))
- (not (string-prefix? "SHELL=" x))))
- configure-flags)))
- (format (current-error-port)
- "running ./configure ~a\n" (string-join configure-flags)))
- (apply invoke (cons "./configure" configure-flags))))
- (add-after 'configure 'configure-fixups
- (lambda _
- (substitute* "config.h"
- (("#define GETCWD_BROKEN 1") "#undef GETCWD_BROKEN"))
- (let ((config.h (open-file "config.h" "a")))
- (display "
-// tcc: error: undefined symbol 'enable_hostname_completion'
-#define enable_hostname_completion(on_or_off) 0
-
-// /gnu/store/…-tcc-boot0-0.9.26-6.c004e9a/lib/libc.a: error: 'sigprocmask' defined twice
-#define HAVE_POSIX_SIGNALS 1
-#define endpwent(x) 0
-"
- config.h)
- (close config.h))))
- (replace 'check
- (lambda _
- (invoke "./bash" "--version")))
- (replace 'install
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (bin (string-append out "/bin")))
- (mkdir-p bin)
- (copy-file "bash" (string-append bin "/bash"))
- (copy-file "bash" (string-append bin "/sh"))))))))))
-
(define tcc-boot
;; The final tcc.
(package
@@ -811,8 +673,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(build-system gnu-build-system)
(inputs '())
(propagated-inputs '())
- (native-inputs `(("bzip2" ,bzip2-mesboot)
- ,@(%boot-tcc0-inputs)))
+ (native-inputs (%boot-tcc0-inputs))
(arguments
`(#:implicit-inputs? #f
#:guile ,%bootstrap-guile
@@ -820,14 +681,6 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
#:strip-binaries? #f ; no strip yet
#:phases
(modify-phases %standard-phases
- ;; tar xvf ..bz2 gives
- ;; bzip2: PANIC -- internal consistency error
- (replace 'unpack
- (lambda* (#:key source #:allow-other-keys)
- (copy-file source "tarball.tar.bz2")
- (invoke "bzip2" "-d" "tarball.tar.bz2")
- (invoke "tar" "xvf" "tarball.tar")
- (chdir (string-append "tcc-" ,version))))
(add-after 'unpack 'scripted-patch
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "libtcc.c"
@@ -931,56 +784,9 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
;; FIXME: no compressing gzip yet
(delete 'compress-documentation))))))
-(define sed-mesboot0
- ;; The initial sed.
- (package
- (inherit sed)
- (name "sed-mesboot0")
- (version "1.18")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/sed/sed-"
- version ".tar.gz"))
- (sha256
- (base32
- "1hyv7i82jd0q18xcql51ylc8jwadp3gb3irgcqlis3v61p35jsv2"))))
- (supported-systems '("i686-linux" "x86_64-linux"))
- (inputs '())
- (propagated-inputs '())
- (native-inputs (%boot-tcc0-inputs))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:parallel-build? #f
- #:configure-flags '("CC=tcc")
- #:make-flags '("CC=tcc" "extra_objs=" "DEFS=-D HAVE_BCOPY")
- #:strip-binaries? #f ; no strip yet
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'scripted-patch
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash")))
- (substitute* "configure"
- (("/bin/sh") shell)))))
- (replace 'check
- (lambda _
- (invoke "./sed" "--version")))
- (replace 'install
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (bin (string-append out "/bin")))
- (install-file "sed" bin)))))))))
-
(define (%boot-tcc-inputs)
- `(("bash" ,bash-mesboot0)
- ("bzip2" ,bzip2-mesboot)
- ("gzip" ,gzip-mesboot)
+ `(("gzip" ,gzip-mesboot)
("patch" ,patch-mesboot)
- ("sed" ,sed-mesboot0)
- ;; Place lower than sed so we don't override it.
- ("gash-utils" ,gash-utils-boot)
("tcc" ,tcc-boot)
,@(alist-delete "tcc" (%boot-tcc0-inputs))))
@@ -989,14 +795,17 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(package
(inherit binutils)
(name "binutils-mesboot0")
- (version "2.14")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/binutils/binutils-"
- version ".tar.gz"))
- (sha256
- (base32
- "1w8xp7k44bkijr974x9918i4p1sw4g2fcd5mxvspkjpg38m214ds"))))
+ (version "2.20.1a")
+ (source (bootstrap-origin
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/binutils/binutils-"
+ version ".tar.bz2"))
+ (patches (search-patches "binutils-boot-2.20.1a.patch"))
+ (patch-guile %bootstrap-guile)
+ (sha256
+ (base32
+ "0r7dr0brfpchh5ic0z9r4yxqn4ybzmlh25sbp30cacqk8nb7rlvi")))))
(inputs '())
(propagated-inputs '())
(native-inputs (%boot-tcc-inputs))
@@ -1008,40 +817,21 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
#:parallel-build? #f
#:strip-binaries? #f ; no strip yet
#:configure-flags
- (let ((out (assoc-ref %outputs "out")))
- `("--disable-nls"
+ (let ((cppflags (string-append " -D __GLIBC_MINOR__=6"
+ " -D MES_BOOTSTRAP=1"))
+ (bash (assoc-ref %build-inputs "bash")))
+ `(,(string-append "CONFIG_SHELL=" bash "/bin/sh")
+ ,(string-append "CPPFLAGS=" cppflags)
+ "AR=tcc -ar"
+ "CXX=false"
+ "RANLIB=true"
+ ,(string-append "CC=tcc" cppflags)
+ "--disable-nls"
"--disable-shared"
"--disable-werror"
- "--build=i386-unknown-linux"
- "--host=i386-unknown-linux"
- "--target=i386-unknown-linux"
- "--with-sysroot=/"
- ,(string-append "--prefix=" out)))
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'setenv
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash")))
- (setenv "CONFIG_SHELL" shell)
- (setenv "SHELL" shell)
- (setenv "AR" "tcc -ar")
- (setenv "RANLIB" "true")
- (setenv "CC" "tcc -D __GLIBC_MINOR__=6"))))
- (add-after 'unpack 'scripted-patch
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "bfd/configure"
- (("^sed -e '/SRC-POTFILES.*" all)
- "echo -e 'all:\\n\\ttrue\\n\\ninstall:\\n\\ttrue\\n' > po/Makefile\n"))))
- (replace 'configure ; needs classic invocation of configure
- (lambda* (#:key configure-flags #:allow-other-keys)
- (format (current-error-port)
- "running ./configure ~a\n" (string-join configure-flags))
- (apply system* "./configure" configure-flags)
- (substitute* "config.status"
- (("[.]//dev/null") "/dev/null"))
- (invoke "sh" "./config.status"))))))))
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ "--with-sysroot=/"))))))
(define gcc-core-mesboot0
;; Gcc-2.95.3 is the most recent GCC that is supported by what the Mes C
@@ -1168,7 +958,6 @@ ac_cv_c_float_format='IEEE (little-endian)'
(define (%boot-mesboot-core-inputs)
`(("binutils" ,binutils-mesboot0)
- ("gawk" ,gawk-mesboot0)
("gcc" ,gcc-core-mesboot0)
,@(alist-delete "tcc" (%boot-tcc-inputs))))
@@ -1199,72 +988,6 @@ ac_cv_c_float_format='IEEE (little-endian)'
(copy-recursively "include" out)
(copy-recursively headers out)))))))))
-(define gawk-mesboot0
- ;; The initial Gawk.
- (package
- (inherit gawk)
- (name "gawk-mesboot0")
- (version "3.0.0")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/gawk/gawk-"
- version ".tar.gz"))
- (sha256
- (base32
- "087s7vpc8zawn3l7bwv9f44bf59rc398hvaiid63klw6fkbvabr3"))))
- (supported-systems '("i686-linux" "x86_64-linux"))
- (inputs '())
- (propagated-inputs '())
- (native-inputs (%boot-tcc-inputs))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:configure-flags '("--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
- "--disable-nls")
- #:make-flags '("gawk")
- #:parallel-build? #f
- #:parallel-tests? #f
- #:strip-binaries? #f ; no strip yet
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'scripted-patch
- (lambda _
- (substitute* "Makefile.in"
- (("date ") "echo today ")
- ((" autoheader") "true")
- ((" -lm ") " "))
- (substitute* "test/Makefile.in"
- (("^bigtest:.*") "bigtest: basic\n")
- (("( |\t)(childin|convfmt|fflush|longwrds|math|negexp)" all sep) sep))))
- (add-before 'configure 'setenv
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash")))
- (setenv "CONFIG_SHELL" shell)
- (setenv "SHELL" shell)
- (setenv "CC" "tcc")
- (setenv "CPP" "tcc -E")
- (setenv "LD" "tcc")
- (setenv "ac_cv_func_getpgrp_void" "yes")
- (setenv "ac_cv_func_tzset" "yes"))))
- (replace 'configure ; needs classic invocation of configure
- (lambda* (#:key configure-flags #:allow-other-keys)
- (let* ((out (assoc-ref %outputs "out"))
- (configure-flags
- `(,@configure-flags
- ,(string-append "--prefix=" out))))
- (format (current-error-port) "running ./configure ~a\n" (string-join configure-flags))
- (system* "touch" "configure") ; aclocal.m4 is newer than configure
- (apply invoke (cons "./configure" configure-flags)))))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin")))
- (install-file "gawk" bin)
- (symlink "gawk" (string-append bin "/awk"))))))))))
-
(define glibc-mesboot0
;; GNU C Library 2.2.5 is the most recent glibc that we managed to build
;; using gcc-2.95.3. Newer versions (2.3.x, 2.6, 2.1x) seem to need a newer
@@ -1409,97 +1132,6 @@ ac_cv_c_float_format='IEEE (little-endian)'
("libc" ,glibc-mesboot0)
,@(alist-delete "gcc" (%boot-mesboot-core-inputs))))
-(define tar-mesboot
- ;; Initial tar with support for xz compression.
- (package
- (inherit tar)
- (name "tar-mesboot")
- (version "1.22")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/tar/tar-"
- version ".tar.gz"))
- (sha256
- (base32
- "19nvix64y95n5v6rr5g9g3fn08zz85cb5anzd7csfv4a4sz9lw4y"))))
- (supported-systems '("i686-linux" "x86_64-linux"))
- (inputs '())
- (propagated-inputs '())
- (native-inputs (%boot-mesboot0-inputs))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:parallel-build? #f
- #:tests? #f ; check is naive, also checks non-built PROGRAMS
- #:strip-binaries? #f ; no strip yet
- #:configure-flags '("--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
- "--disable-nls")
- #:phases
- (modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key configure-flags #:allow-other-keys)
- (let* ((out (assoc-ref %outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash")))
- (setenv "CONFIG_SHELL" shell)
- (setenv "SHELL" shell)
- (setenv "LIBS" "-lc -lnss_files -lnss_dns -lresolv")
- (setenv "gl_cv_func_rename_dest_works" "yes")
- (format (current-error-port)
- "running ./configure ~a\n" (string-join configure-flags))
- (apply invoke (cons "./configure" configure-flags)))))
- (add-after 'unpack 'scripted-patch
- (lambda _
- (let* ((bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash")))
- (substitute* "configure"
- ((" /bin/sh") shell)))
- (substitute* "Makefile.in"
- (("^SUBDIRS = doc") "SUBDIRS ="))))
- (replace 'install
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (bin (string-append out "/bin")))
- (install-file "src/tar" bin)))))))))
-
-(define grep-mesboot
- ;; The initial grep.
- (package
- (inherit grep)
- (name "grep-mesboot")
- (version "2.0")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/grep/grep-"
- version ".tar.gz"))
- (sha256
- (base32
- "1w862l80lgc5mxvpiy4cfwk761d6xxavn0m3xd2l7xs2kmzvp6lq"))))
- (supported-systems '("i686-linux" "x86_64-linux"))
- (inputs '())
- (propagated-inputs '())
- (native-inputs (%boot-mesboot0-inputs))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:parallel-build? #f
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'patch-configure
- (lambda _
- (let* ((bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash")))
- (substitute* "configure"
- ((" [|][|] ./config.status") " || sh ./config.status")))))
- (replace 'install
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (bin (string-append out "/bin")))
- (install-file "grep" bin)
- (symlink "grep" (string-append bin "/egrep"))
- (symlink "grep" (string-append bin "/fgrep"))))))))))
-
(define binutils-mesboot1
(package
(inherit binutils-mesboot0)
@@ -1515,46 +1147,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
"--build=i686-unknown-linux-gnu"
"--host=i686-unknown-linux-gnu"
"--with-sysroot=/"
- ,(string-append "--prefix=" out))))
- ((#:phases phases)
- `(modify-phases ,phases
- (replace 'setenv
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash")))
- (setenv "CONFIG_SHELL" shell))))))))))
-
-(define coreutils-mesboot0
- (package
- (inherit coreutils)
- (name "coreutils-mesboot0")
- ;; The latest .gz release of Coreutils is 8.13; which does not build with gcc-2.95.3:
- ;; randperm.c: In function `sparse_swap':
- ;; randperm.c:117: invalid lvalue in unary `&'
- (version "5.0") ; 2003-04
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/coreutils/coreutils-"
- version ".tar.gz"))
- (sha256
- (base32
- "10wq6k66i8adr4k08p0xmg87ff4ypiazvwzlmi7myib27xgffz62"))))
- (native-inputs (%boot-mesboot0-inputs))
- (supported-systems '("i686-linux" "x86_64-linux"))
- (inputs '())
- (propagated-inputs '())
- (arguments
- `(#:implicit-inputs? #f
- #:tests? #f ; WARNING: `perl' is needed, ...
- #:parallel-build? #f
- #:strip-binaries? #f ; strip: unrecognized option `--only-keep-debug'
- #:guile ,%bootstrap-guile
- #:configure-flags
- '("--disable-doc"
- "LIBS=-lc -lnss_files -lnss_dns -lresolv"
- "ac_cv_func_gethostbyname=no"
- "gl_cv_func_rename_dest_works=yes")))))
+ ,(string-append "--prefix=" out))))))))
(define gnu-make-mesboot
(package
@@ -1588,150 +1181,11 @@ ac_cv_c_float_format='IEEE (little-endian)'
(bin (string-append out "/bin")))
(install-file "make" bin)))))))))
-(define gawk-mesboot
- (package
- (inherit gawk)
- (name "gawk-mesboot")
- (version "3.1.8")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/gawk/gawk-"
- version ".tar.gz"))
- (sha256
- (base32
- "03d5y7jabq7p2s7ys9alay9446mm7i5g2wvy8nlicardgb6b6ii1"))))
- (native-inputs `(,@(%boot-mesboot0-inputs)
- ("mesboot-headers" ,mesboot-headers)))
- (supported-systems '("i686-linux" "x86_64-linux"))
- (inputs '())
- (propagated-inputs '())
- (arguments
- `(#:implicit-inputs? #f
- #:parallel-build? #f
- #:guile ,%bootstrap-guile
- #:configure-flags '("ac_cv_func_connect=no")
- #:make-flags '("gawk")
- #:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (invoke "./gawk" "--version")))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin")))
- (install-file "gawk" bin)
- (symlink "gawk" (string-append bin "/awk"))))))))))
-
-(define sed-mesboot
- (package
- (inherit sed)
- (name "sed-mesboot")
- (version "4.0.6") ; 2003-04
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/sed/sed-"
- version ".tar.gz"))
- (sha256
- (base32
- "0861ij94cqc4vaaki6r2wlapwcmhpx4ggp4r70f46mb21a8fkvf1"))))
- (native-inputs (%boot-mesboot0-inputs))
- (supported-systems '("i686-linux" "x86_64-linux"))
- (inputs '())
- (propagated-inputs '())
- (arguments
- `(#:implicit-inputs? #f
- #:parallel-build? #f
- #:guile ,%bootstrap-guile
- #:tests? #f ; 8to7 fails
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack '/bin/sh
- (lambda _
- (let* ((bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash")))
- (substitute* "testsuite/Makefile.tests"
- (("^SHELL = /bin/sh")
- (string-append "SHELL = " shell)))))))))))
-
-(define bash-mesboot
- (package
- (inherit bash-mesboot0)
- (version "4.4")
- (name "bash-mesboot")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/bash/bash-"
- version ".tar.gz"))
- (sha256
- (base32
- "1jyz6snd63xjn6skk7za6psgidsd53k05cr3lksqybi0q6936syq"))))
- (inputs '())
- (propagated-inputs '())
- (native-inputs (%boot-mesboot0-inputs))
- (outputs '("out"))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:parallel-build? #f
- #:configure-flags
- '("--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
-
- "--without-bash-malloc"
- "--disable-readline"
- "--disable-history"
- "--disable-help-builtin"
- "--disable-progcomp"
- "--disable-net-redirections"
- "--disable-nls"
-
- ;; Pretend 'dlopen' is missing so we don't build loadable
- ;; modules and related code.
- "ac_cv_func_dlopen=no")
- #:make-flags '("bash")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'scripted-patch
- (lambda _
- (substitute* "shell.c"
- ((";;") ";"))))
- (add-before 'configure 'setenv
- (lambda _
- (setenv "AWK" "gawk")
- (setenv "LIBS" "-lc -lnss_files -lnss_dns -lresolv")
- (setenv "gl_cv_func_rename_dest_works" "yes")))
- (add-after 'configure 'configure-fixups
- (lambda _
- (let ((config.h (open-file "config.h" "a")))
- (display (string-append "
-#define enable_hostname_completion(on_or_off) 0
-")
- config.h)
- (close config.h))))
- (replace 'check
- (lambda _
- (invoke "./bash" "--version")))
- (replace 'install
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (bin (string-append out "/bin")))
- (mkdir-p bin)
- (copy-file "bash" (string-append bin "/bash"))
- (copy-file "bash" (string-append bin "/sh"))))))))))
-
(define (%boot-mesboot1-inputs)
- `(("bash" ,bash-mesboot)
- ("binutils" ,binutils-mesboot1)
- ("coreutils" ,coreutils-mesboot0)
- ("gawk" ,gawk-mesboot)
- ("grep" ,grep-mesboot)
+ `(("binutils" ,binutils-mesboot1)
("make" ,gnu-make-mesboot)
- ("sed" ,sed-mesboot)
- ("tar" ,tar-mesboot)
,@(fold alist-delete (%boot-mesboot0-inputs)
- '("bash" "binutils" "bootar" "coreutils" "gash"
- "gawk" "grep" "guile" "make" "sed" "tar"))))
+ '("binutils" "make"))))
(define gmp-boot
(let ((version "4.3.2"))
@@ -1925,57 +1379,22 @@ ac_cv_c_float_format='IEEE (little-endian)'
`(("gcc" ,gcc-mesboot1)
,@(alist-delete "gcc" (%boot-mesboot1-inputs))))
-(define xz-mesboot
- ;; Finally, we can build xz.
- (package
- (inherit xz)
- (name "xz-mesboot")
- (version "5.0.0")
- (source (bootstrap-origin
- (origin
- (method url-fetch)
- (uri (list (string-append "http://tukaani.org/xz/xz-" version
- ".tar.gz")
- (string-append "http://multiprecision.org/guix/xz-"
- version ".tar.gz")))
- (sha256
- (base32
- "0kf40ggbs1vaaj5s9k4csycahzqcf65n20pa6lngqhm6j0cj3agb")))))
- (supported-systems '("i686-linux" "x86_64-linux"))
- (inputs '())
- (outputs '("out"))
- (propagated-inputs '())
- (native-inputs (%boot-mesboot2-inputs))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:parallel-build? #f
- #:configure-flags
- `("--disable-assembler"
- "--disable-shared"
- "--enable-small"
- "--disable-threads"
- "--disable-xzdec"
- "--disable-lzmadec"
- "--disable-lzmainfo"
- "--disable-lzma-links"
- "--disable-scripts"
- "--disable-doc"
- "--disable-nls"
- "--disable-symbol-versions"
- ;; configure disqualifies BASH, CPP, GCC and GREP
- ;; all of which seem fine for the build
- "ac_cv_prog_cc_c99=-std=gnu9x"
- "ac_cv_path_GREP=grep"
- "gl_cv_posix_shell=bash"
- "ac_cv_have_decl_optreset=no"
- "CPPFLAGS=-D__GNUC__=1")))))
-
(define hello-mesboot
- ;; Check for Scheme-only bootstrap.
+ ;; Check for Scheme-only bootstrap. Note that newer versions of Hello
+ ;; break due to the way that newer versions of Gnulib handle
+ ;; "limits.h". Hence, we stick to 2.10.
(package
(inherit hello)
(name "hello-mesboot")
+ (version "2.10")
+ (source
+ (origin
+ (inherit (package-source hello))
+ (uri (string-append "mirror://gnu/hello/hello-" version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
(supported-systems '("i686-linux" "x86_64-linux"))
(inputs '())
(propagated-inputs '())
@@ -1995,76 +1414,51 @@ ac_cv_c_float_format='IEEE (little-endian)'
(define binutils-mesboot
(package
- (inherit binutils)
+ (inherit binutils-mesboot1)
(name "binutils-mesboot")
- (version "2.20.1a")
- (source (bootstrap-origin
- (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/binutils/binutils-"
- version ".tar.bz2"))
- (patches (search-patches "binutils-boot-2.20.1a.patch"))
- (sha256
- (base32
- "0r7dr0brfpchh5ic0z9r4yxqn4ybzmlh25sbp30cacqk8nb7rlvi")))))
+ (native-inputs (%boot-mesboot2-inputs))))
+
+;; Sadly we have to introduce Gawk here. The "versions.awk" script of
+;; glibc 2.16.0 is too complicated for Gash-Utils. This is the version
+;; of Gawk used previously during bootstrap. It's possible that a newer
+;; version would work, too, but this one was already ready to go.
+(define gawk-mesboot
+ (package
+ (inherit gawk)
+ (name "gawk-mesboot")
+ (version "3.1.8")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gawk/gawk-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "03d5y7jabq7p2s7ys9alay9446mm7i5g2wvy8nlicardgb6b6ii1"))))
+ (native-inputs (%boot-mesboot2-inputs))
+ (supported-systems '("i686-linux" "x86_64-linux"))
(inputs '())
(propagated-inputs '())
- (native-inputs `(("xz" ,xz-mesboot)
- ,@(%boot-mesboot2-inputs)))
- (supported-systems '("i686-linux" "x86_64-linux"))
(arguments
`(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:tests? #f ; runtest: command not found
#:parallel-build? #f
- #:strip-binaries? #f ; no strip yet
- #:configure-flags
- `("CC=gcc"
- "CXX=false"
- "RANLIB=true"
- "--disable-doc"
- "--disable-nls"
- "--disable-shared"
- "--disable-werror"
- "--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
- "--with-sysroot=/"
- ;; checking for grep that handles long lines and -e
- "ac_cv_path_GREP=grep")
- ;; FIXME: ac_cv_path_GREP=grep doesn't seem to be forwarded to
- ;; cascading configure's?
- #:make-flags '("ac_cv_path_GREP=grep")
+ #:guile ,%bootstrap-guile
+ #:configure-flags '("ac_cv_func_connect=no")
+ #:make-flags '("gawk")
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'scripted-patch
+ (replace 'check
(lambda _
- ;; sed-mesboot0 cannot build these
- (copy-file "binutils/Makefile.in" "binutils/Makefile.in.orig")
- (substitute* "binutils/Makefile.in"
- ;; binutils/binutils uses an amazingly complex install
- ;; command, using FOR, SED, READ, IF, ECHO, SED, SED, AWK,
- ;; READ, and then LIBTOOL (to do something like
- ;; `mkdir $DESTDIR$bindir; cp readline $DESTDIR$bindir ...')
-
- ;; Some tool [debugme!] cannot handle two escaped newlines
- ;; (bash?), and the install stops after $(am__EXEEXT_11)
- ;; ("objcopy"), so $(am__EXEEXT_13) ("readelf") and others do
- ;; not get installed. Remove the stray newline:
- (("^\t@BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ .*") ""))
- (substitute* "opcodes/Makefile.in"
- (("^SUBDIRS = [.] po") "SUBDIRS = ."))
- (substitute* "binutils/Makefile.in"
- (("^SUBDIRS = doc po") "SUBDIRS ="))
- (substitute* "gas/Makefile.in"
- (("^SUBDIRS = doc po") "SUBDIRS ="))
- (substitute* "gprof/Makefile.in"
- (("^SUBDIRS = po") "SUBDIRS ="))
- (substitute* "ld/Makefile.in"
- (("^SUBDIRS = po") "SUBDIRS =")))))))))
+ (invoke "./gawk" "--version")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "gawk" bin)
+ (symlink "gawk" (string-append bin "/awk"))))))))))
(define (%boot-mesboot3-inputs)
`(("binutils" ,binutils-mesboot)
- ("xz" ,xz-mesboot)
+ ("gawk" ,gawk-mesboot)
,@(alist-delete "binutils" (%boot-mesboot2-inputs))))
(define glibc-headers-mesboot
@@ -2141,6 +1535,11 @@ ac_cv_c_float_format='IEEE (little-endian)'
(out (assoc-ref outputs "out")))
(apply invoke "make" make-flags)
(copy-recursively kernel-headers out))))
+ (add-before 'configure 'remove-bashism
+ (lambda _
+ (substitute* "sysdeps/unix/make-syscalls.sh"
+ (("\\$[{]vdso_symver//\\./_[}]")
+ "$(echo $vdso_symver | sed -e 's/\\./_/g')"))))
(replace 'configure
(lambda* (#:key configure-flags #:allow-other-keys)
(format (current-error-port) "running ../configure ~a\n"
@@ -2186,6 +1585,17 @@ SHELL := " shell "
(list (string-append "SHELL=" bash "/bin/sh"))))
((#:phases phases)
#~(modify-phases #$phases
+ (add-after 'unpack 'simplify-intl-tests
+ (lambda _
+ ;; The bootstrap Guile (2.0.9) crashes trying to
+ ;; perform a regex on non-ASCII text. This gets
+ ;; triggered by 'intl/po2test.sed' running over
+ ;; 'po/de.po'. If we ever remove the bootstrap
+ ;; Guile or add pure-Scheme regex to Gash, this can
+ ;; be removed.
+ (substitute* '("catgets/Makefile"
+ "intl/Makefile")
+ (("de\\.po") "en_GB.po"))))
(replace 'install
(lambda* (#:key outputs make-flags #:allow-other-keys)
(let* ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
@@ -2207,8 +1617,8 @@ SHELL := " shell "
(name "gcc-mesboot1-wrapper")
(source #f)
(inputs '())
- (native-inputs `(("bash" ,bash-mesboot)
- ("coreutils" ,coreutils-mesboot0)
+ (native-inputs `(("bash" ,gash-boot)
+ ("coreutils" ,gash-utils-boot)
("libc" ,glibc-mesboot)
("gcc" ,gcc-mesboot1)))
(arguments
@@ -2346,8 +1756,8 @@ exec " gcc "/bin/" program
(version (package-version gcc-mesboot))
(source #f)
(inputs '())
- (native-inputs `(("bash" ,bash-mesboot)
- ("coreutils" ,coreutils-mesboot0)
+ (native-inputs `(("bash" ,gash-boot)
+ ("coreutils" ,gash-utils-boot)
("libc" ,glibc-mesboot)
("gcc" ,gcc-mesboot)))))
@@ -2356,24 +1766,59 @@ exec " gcc "/bin/" program
("gcc" ,gcc-mesboot)
,@(fold alist-delete (%boot-mesboot4-inputs) '("gcc" "gcc-wrapper"))))
-(define coreutils-mesboot
+(define (mesboot-package name pkg)
(package
- (inherit coreutils)
- (name "coreutils-mesboot")
- (source (bootstrap-origin (package-source coreutils)))
+ (inherit pkg)
+ (name name)
+ (source (bootstrap-origin (package-source pkg)))
(native-inputs (%boot-mesboot5-inputs))
(supported-systems '("i686-linux" "x86_64-linux"))
(inputs '())
(propagated-inputs '())
(arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:tests? #f))))
+ (ensure-keyword-arguments (package-arguments pkg)
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:tests? #f)))))
+
+;; These packages are needed to complete the rest of the bootstrap.
+;; In the future, Gash et al. could handle it directly, but it's not
+;; ready yet.
+(define bash-mesboot (mesboot-package "bash-mesboot" static-bash))
+(define coreutils-mesboot (mesboot-package "coreutils-mesboot" coreutils))
+(define grep-mesboot (mesboot-package "grep-mesboot" grep))
+(define sed-mesboot (mesboot-package "sed-mesboot" sed))
+
+;; The XZ implementation in Bootar cannot decompress 'tar'.
+(define xz-mesboot
+ (let ((pkg (mesboot-package "xz-mesboot" xz)))
+ (package
+ (inherit pkg)
+ (arguments
+ (ensure-keyword-arguments (package-arguments pkg)
+ ;; XXX: This fails even though the
+ ;; actual runpaths seem fine.
+ `(#:validate-runpath? #f))))))
+
+;; We don't strictly need Tar here, but it allows us to get rid of
+;; Bootar and Gash-Utils and continue with the standard GNU tools.
+(define tar-mesboot
+ (let ((pkg (mesboot-package "tar-mesboot" tar)))
+ (package
+ (inherit pkg)
+ (native-inputs
+ `(("xz" ,xz-mesboot)
+ ,@(package-native-inputs pkg))))))
(define (%boot-mesboot6-inputs)
- `(("coreutils" ,coreutils-mesboot)
+ `(("bash" ,bash-mesboot)
+ ("coreutils" ,coreutils-mesboot)
+ ("grep" ,grep-mesboot)
+ ("sed" ,sed-mesboot)
+ ("tar" ,tar-mesboot)
+ ("xz" ,xz-mesboot)
,@(fold alist-delete (%boot-mesboot5-inputs)
- '("coreutils" "kernel-headers"))))
+ '("bash" "coreutils" "bootar" "kernel-headers"))))
(define (%bootstrap-inputs+toolchain)
;; The traditional bootstrap-inputs. For the i686-linux, x86_64-linux
@@ -2544,6 +1989,7 @@ exec " gcc "/bin/" program
#:implicit-inputs? #f
#:guile ,%bootstrap-guile
#:configure-flags '("--disable-bzlib")
+ #:make-flags '("CFLAGS+=-std=c11")
#:strip-binaries? #f
#:validate-runpath? #f
,@(package-arguments file)))))
@@ -3147,8 +2593,7 @@ memoized as a function of '%current-system'."
`(,@(%boot0-inputs)
("expat" ,expat-sans-tests))) ;remove OpenSSL, zlib, etc.
(native-inputs ;and pkg-config
- `(("sitecustomize.py" ,(local-file (search-auxiliary-file
- "python/sitecustomize.py")))))
+ `())
(arguments
`(#:implicit-inputs? #f
#:guile ,%bootstrap-guile
@@ -3174,6 +2619,13 @@ memoized as a function of '%current-system'."
;; Prevent the 'ossaudiodev' extension from being
;; built, since it requires Linux headers.
(("'linux', ") ""))))
+ (add-after 'install 'remove-tests
+ (lambda* (#:key outputs #:allow-other-keys)
+ (delete-file-recursively
+ (string-append (assoc-ref outputs "out")
+ "/lib/python"
+ ,(version-major+minor version)
+ "/test"))))
,@(if (hurd-system?)
`((add-before 'build 'fix-regen
(lambda* (#:key inputs #:allow-other-keys)
@@ -3181,11 +2633,14 @@ memoized as a function of '%current-system'."
(substitute* "Lib/plat-generic/regen"
(("/usr/include/")
(string-append libc "/include/")))))))
- '())
- (add-after 'install 'install-sitecustomize.py
- ,(customize-site version)))))
+ '()))))
(native-search-paths
- (list (guix-pythonpath-search-path version)))))
+ (list (search-path-specification
+ (variable "PYTHONPATH")
+ (files (list (string-append
+ "lib/python"
+ (version-major+minor version)
+ "/site-packages"))))))))
(define/system-dependent ld-wrapper-boot0
;; The first 'ld' wrapper, defined with 'define/system-dependent' because