From bd4761e01e27fa38b9c5eab6d9337d6f2e8d0bc1 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 24 Sep 2023 02:00:00 +0200 Subject: gnu: qemu: Update to 8.1.1. * gnu/packages/virtualization.scm (qemu): Update to 8.1.1. --- gnu/packages/virtualization.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index f5bdedd45e..6efebd41bf 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -164,14 +164,14 @@ (define-public qemu (package (name "qemu") - (version "8.1.0") + (version "8.1.1") (source (origin (method url-fetch) (uri (string-append "https://download.qemu.org/qemu-" version ".tar.xz")) (sha256 - (base32 "0m8fbyr3xv6gi95ma0sksxfqmyj3pi4zcrgg5rvd8d73k08i033i")) + (base32 "1vvxmd7xbkl083anpqm797m070qi8n5wc5qid0ppbyq0wpsjxkip")) (patches (search-patches "qemu-disable-some-qtests-tests.patch" "qemu-fix-agent-paths.patch")) (modules '((guix build utils))) -- cgit v1.2.3 From d7abe56433fea376d39c2cbec16df7e562714475 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 24 Sep 2023 02:00:00 +0200 Subject: gnu: xen: Version the mini-os checkout. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/virtualization.scm (xen)[native-inputs]: Add the Xen name and version to the ‘…-mini-os-git-checkout’ store file name. --- gnu/packages/virtualization.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 6efebd41bf..a1524d49be 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -2467,7 +2467,7 @@ override CC = " (assoc-ref inputs "cross-gcc") "/bin/i686-linux-gnu-gcc")) (commit "0b4b7897e08b967a09bed2028a79fabff82342dd"))) (sha256 (base32 "1i8pcl19n60i2m9vlg79q3nknpj209c9ic5x10wxaicx45kc107f")) - (file-name "mini-os-git-checkout"))) + (file-name (string-append name "-" version "-mini-os-git-checkout")))) ("perl" ,perl) ; TODO: markdown ("pkg-config" ,pkg-config) -- cgit v1.2.3 From 11f1d72dd8b0cac83cf73156abce909008cd7cdf Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 24 Sep 2023 02:00:00 +0200 Subject: gnu: xen: Update to 4.14.6. * gnu/packages/virtualization.scm (xen): Update to 4.14.6. [arguments]: Remove obsolete quoting work-around for old bug. Don't explicitly return #t from phases. --- gnu/packages/virtualization.scm | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index a1524d49be..7ab3354e64 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -2279,7 +2279,7 @@ DOS or Microsoft Windows.") (define-public xen (package (name "xen") - (version "4.14.1") ; please update the mini-os input as well + (version "4.14.6") ; please update the mini-os input as well (source (origin (method git-fetch) (uri (git-reference @@ -2288,7 +2288,7 @@ DOS or Microsoft Windows.") (file-name (git-file-name name version)) (sha256 (base32 - "1r90rvypw76ya9clqw5p02gm1k8hxz73f7gr95ca778nnzvb7xjw")))) + "1cdzpxbihkdn4za8ly0lgkbxrafjzbxjflhfn83kyg4bam1vv7mn")))) (build-system gnu-build-system) (arguments `(#:configure-flags @@ -2340,8 +2340,7 @@ DOS or Microsoft Windows.") (modify-phases %standard-phases (add-after 'unpack 'unpack-mini-os (lambda* (#:key inputs #:allow-other-keys) - (copy-recursively (assoc-ref inputs "mini-os") "extras/mini-os") - #t)) + (copy-recursively (assoc-ref inputs "mini-os") "extras/mini-os"))) (add-after 'unpack-mini-os 'patch (lambda* (#:key inputs outputs #:allow-other-keys) (substitute* "tools/firmware/Rules.mk" @@ -2374,13 +2373,7 @@ override CC = " (assoc-ref inputs "cross-gcc") "/bin/i686-linux-gnu-gcc")) ; TODO: extra_link_args = ['-Wl,-rpath=/opt/foo'], (string-append "runtime_library_dirs = ['" (assoc-ref outputs "out") - "/lib'],\nlibrary_dirs ="))) - - ;; This needs to be quoted: - ;; . - (substitute* "xen/arch/x86/xen.lds.S" - ((".note.gnu.build-id") - "\".note.gnu.build-id\"")))) + "/lib'],\nlibrary_dirs ="))))) (add-before 'configure 'patch-xen-script-directory (lambda* (#:key outputs #:allow-other-keys) (substitute* '("configure" @@ -2389,8 +2382,7 @@ override CC = " (assoc-ref inputs "cross-gcc") "/bin/i686-linux-gnu-gcc")) (("XEN_SCRIPT_DIR=.*") (string-append "XEN_SCRIPT_DIR=" (assoc-ref outputs "out") - "/etc/xen/scripts"))) - #t)) + "/etc/xen/scripts"))))) (add-before 'configure 'set-environment-up (lambda* (#:key make-flags #:allow-other-keys) (define (cross? x) @@ -2425,8 +2417,7 @@ override CC = " (assoc-ref inputs "cross-gcc") "/bin/i686-linux-gnu-gcc")) "mini-os-git-checkout"))) '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" "LIBRARY_PATH")) - (setenv "EFI_VENDOR" "guix") - #t)) + (setenv "EFI_VENDOR" "guix"))) (replace 'build (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "make" "world" make-flags)))))) @@ -2463,10 +2454,11 @@ override CC = " (assoc-ref inputs "cross-gcc") "/bin/i686-linux-gnu-gcc")) (url "https://xenbits.xen.org/git-http/mini-os.git") ;; This corresponds to (string-append "xen-RELEASE-" version)) ;; at time of packaging, but upstream has unfortunately modified - ;; existing tags in the past. - (commit "0b4b7897e08b967a09bed2028a79fabff82342dd"))) + ;; existing tags in the past. Also, not all Xen releases get a + ;; new tag. See . + (commit "f57858b7e8ef8dd48394dd08cec2bef3c9fb92f5"))) (sha256 - (base32 "1i8pcl19n60i2m9vlg79q3nknpj209c9ic5x10wxaicx45kc107f")) + (base32 "04y7grxs47amvjcq1rq4jgk174rhid5m2z9w8wrv7rfd2xhazxy1")) (file-name (string-append name "-" version "-mini-os-git-checkout")))) ("perl" ,perl) ; TODO: markdown -- cgit v1.2.3 From 91097713eecefa10c8a04b5c152adb2e7b8c36bb Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 24 Sep 2023 02:00:00 +0200 Subject: gnu: xen: Update package style. * gnu/packages/virtualization.scm (xen) [arguments]: Rewrite as G-expressions. Use SEARCH-INPUT-FILE whenever possible. Put SUBSTITUTE* features to use. [native-inputs, inputs]: Remove input labels. --- gnu/packages/virtualization.scm | 320 +++++++++++++++++++--------------------- 1 file changed, 153 insertions(+), 167 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 7ab3354e64..777c372f9e 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -2291,164 +2291,150 @@ DOS or Microsoft Windows.") "1cdzpxbihkdn4za8ly0lgkbxrafjzbxjflhfn83kyg4bam1vv7mn")))) (build-system gnu-build-system) (arguments - `(#:configure-flags - (list "--enable-rpath" - "--disable-qemu-traditional" ; It tries to do "git clone" - "--disable-rombios" ; would try to "git clone" via etherboot. - ;; TODO: Re-enable stubdom (it's "more secure" to use it). - "--disable-stubdom" ; tries to "git clone" old patched newlib. - (string-append "--with-initddir=" - (assoc-ref %outputs "out") - "/etc/init.d") - (string-append "--with-system-qemu=" - (assoc-ref %build-inputs "qemu") - "/bin/qemu-system-i386") - (string-append "--with-system-seabios=" - (assoc-ref %build-inputs "seabios") - "/share/firmware/bios.bin") - (string-append "--with-system-ovmf=" - (assoc-ref %build-inputs "ovmf") - "/share/firmware/ovmf_ia32.bin")) - #:make-flags (list "-j" "1" - "XEN_BUILD_DATE=Thu Jan 1 01:00:01 CET 1970" - "XEN_BUILD_TIME=01:00:01" - "XEN_BUILD_HOST=" - "ETHERBOOT_NICS=" - "SMBIOS_REL_DATE=01/01/1970" - "VGABIOS_REL_DATE=01 Jan 1970" - ; QEMU_TRADITIONAL_LOC - ; QEMU_UPSTREAM_LOC - "SYSCONFIG_DIR=/tmp/etc/default" - (string-append "BASH_COMPLETION_DIR=" - (assoc-ref %outputs "out") - "/etc/bash_completion.d") - (string-append "BOOT_DIR=" - (assoc-ref %outputs "out") - "/boot") - (string-append "DEBUG_DIR=" - (assoc-ref %outputs "out") - "/lib/debug") - (string-append "EFI_DIR=" - (assoc-ref %outputs "out") - "/lib/efi") ; TODO lib64 ? - "MINIOS_UPSTREAM_URL=" - ;(string-append "DISTDIR=" - ; (assoc-ref %outputs "out")) -) - #:test-target "test" - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'unpack-mini-os - (lambda* (#:key inputs #:allow-other-keys) - (copy-recursively (assoc-ref inputs "mini-os") "extras/mini-os"))) - (add-after 'unpack-mini-os 'patch - (lambda* (#:key inputs outputs #:allow-other-keys) - (substitute* "tools/firmware/Rules.mk" - (("override XEN_TARGET_ARCH = x86_32") - (string-append "override XEN_TARGET_ARCH = x86_32 -override CC = " (assoc-ref inputs "cross-gcc") "/bin/i686-linux-gnu-gcc")) - (("^CFLAGS =$") - (string-append "CFLAGS=-I" (assoc-ref inputs "cross-libc") - "/include\n"))) - (substitute* "config/x86_32.mk" - (("CFLAGS += -m32 -march=i686") - (string-append "CFLAGS += -march=i686 -I" - (assoc-ref inputs "cross-libc") - "/include"))) - ;; /var is not in /gnu/store , so don't try to create it. - (substitute* '("tools/Makefile" - "tools/xenstore/Makefile" - "tools/xenpaging/Makefile") - (("\\$\\(INSTALL_DIR\\) .*XEN_(DUMP|LOG|RUN|LIB|PAGING)_DIR.*") - "\n") - (("\\$\\(INSTALL_DIR\\) .*XEN_(RUN|LIB)_STORED.*") - "\n")) - ;; Prevent xen from creating /etc . - (substitute* "tools/examples/Makefile" - ((" install-readmes") "") - ((" install-configs") "")) - ;; Set rpath. - (substitute* "tools/pygrub/setup.py" - (("library_dirs =") - ; TODO: extra_link_args = ['-Wl,-rpath=/opt/foo'], - (string-append "runtime_library_dirs = ['" - (assoc-ref outputs "out") - "/lib'],\nlibrary_dirs ="))))) - (add-before 'configure 'patch-xen-script-directory - (lambda* (#:key outputs #:allow-other-keys) - (substitute* '("configure" - "tools/configure" - "docs/configure") - (("XEN_SCRIPT_DIR=.*") - (string-append "XEN_SCRIPT_DIR=" - (assoc-ref outputs "out") - "/etc/xen/scripts"))))) - (add-before 'configure 'set-environment-up - (lambda* (#:key make-flags #:allow-other-keys) - (define (cross? x) - (string-contains x "cross-i686-linux")) - (define (filter-environment! filter-predicate - environment-variable-names) - (for-each - (lambda (env-name) - (let* ((env-value (getenv env-name)) - (search-path (search-path-as-string->list env-value)) - (new-search-path (filter filter-predicate - search-path)) - (new-env-value (list->search-path-as-string - new-search-path ":"))) - (setenv env-name new-env-value))) - environment-variable-names)) - (setenv "CROSS_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH")) - (setenv "CROSS_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH")) - (setenv "CROSS_LIBRARY_PATH" (getenv "LIBRARY_PATH")) - (filter-environment! cross? - '("CROSS_C_INCLUDE_PATH" "CROSS_CPLUS_INCLUDE_PATH" - "CROSS_LIBRARY_PATH")) - (filter-environment! (lambda (e) (not (cross? e))) - '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" - "LIBRARY_PATH")) - ;; Guix tries to be helpful and automatically adds - ;; mini-os-git-checkout/include to the include path, - ;; but actually we don't want it to be there (yet). - (filter-environment! (lambda (e) - (not - (string-contains e - "mini-os-git-checkout"))) - '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" - "LIBRARY_PATH")) - (setenv "EFI_VENDOR" "guix"))) - (replace 'build - (lambda* (#:key make-flags #:allow-other-keys) - (apply invoke "make" "world" make-flags)))))) + (list + #:configure-flags + #~(list "--enable-rpath" + "--disable-qemu-traditional" ; tries to "git clone" + "--disable-rombios" ; tries to "git clone" via etherboot + ;; TODO: Re-enable stubdom (it's "more secure" to use it). + "--disable-stubdom" ; tries to "git clone" old patched newlib + (string-append "--with-initddir=" #$output "/etc/init.d") + (string-append "--with-system-qemu=" + (search-input-file %build-inputs + "bin/qemu-system-i386")) + (string-append "--with-system-seabios=" + (search-input-file %build-inputs + "share/firmware/bios.bin")) + (string-append "--with-system-ovmf=" + (search-input-file %build-inputs + "share/firmware/ovmf_ia32.bin"))) + #:make-flags + #~(list "-j" "1" + "XEN_BUILD_DATE=Thu Jan 1 01:00:01 CET 1970" + "XEN_BUILD_TIME=01:00:01" + "XEN_BUILD_HOST=" + "ETHERBOOT_NICS=" + "SMBIOS_REL_DATE=01/01/1970" + "VGABIOS_REL_DATE=01 Jan 1970" + ;; QEMU_TRADITIONAL_LOC + ;; QEMU_UPSTREAM_LOC + "SYSCONFIG_DIR=/tmp/etc/default" + (string-append "BASH_COMPLETION_DIR=" #$output + "/etc/bash_completion.d") + (string-append "BOOT_DIR=" #$output "/boot") + (string-append "DEBUG_DIR=" #$output "/lib/debug") + (string-append "EFI_DIR=" #$output "/lib/efi") + "MINIOS_UPSTREAM_URL=") + #:test-target "test" + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'unpack-mini-os + (lambda* (#:key inputs #:allow-other-keys) + (let ((mini-os (dirname (search-input-file inputs "minios.mk")))) + (copy-recursively mini-os "extras/mini-os")))) + (add-after 'unpack-mini-os 'patch + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "tools/firmware/Rules.mk" + (("override XEN_TARGET_ARCH = x86_32" match) + (string-append match "\noverride CC = " + (search-input-file inputs + "bin/i686-linux-gnu-gcc"))) + (("^CFLAGS =$" match) + (string-append match " -I" (assoc-ref inputs "cross-libc") + "/include\n"))) + (substitute* "config/x86_32.mk" + (("(CFLAGS += )-m32 -march=i686" _ match) + (string-append match "-march=i686 -I" + (assoc-ref inputs "cross-libc") "/include"))) + ;; /var is not in /gnu/store, so don't try to create it. + (substitute* '("tools/Makefile" + "tools/xenstore/Makefile" + "tools/xenpaging/Makefile") + (("\\$\\(INSTALL_DIR\\) .*XEN_(DUMP|LOG|RUN|LIB|PAGING)_DIR.*") + "\n") + (("\\$\\(INSTALL_DIR\\) .*XEN_(RUN|LIB)_STORED.*") "\n")) + ;; Prevent xen from creating /etc. + (substitute* "tools/examples/Makefile" + ((" install-(configs|readmes)") "")) + ;; Set rpath. + (substitute* "tools/pygrub/setup.py" + (("library_dirs =" match) + ;; TODO: extra_link_args = ['-Wl,-rpath=/opt/foo'], + (string-append "runtime_library_dirs = ['" #$output "/lib']," + "\n" match))))) + (add-before 'configure 'patch-xen-script-directory + (lambda _ + (substitute* '("configure" + "tools/configure" + "docs/configure") + (("(XEN_SCRIPT_DIR=).*" _ match) + (string-append match #$output "/etc/xen/scripts"))))) + (add-before 'configure 'set-environment-up + (lambda* (#:key make-flags #:allow-other-keys) + (define (cross? x) + (string-contains x "cross-i686-linux")) + (define (filter-environment! filter-predicate + environment-variable-names) + (for-each + (lambda (env-name) + (let* ((env-value (getenv env-name)) + (search-path (search-path-as-string->list env-value)) + (new-search-path (filter filter-predicate + search-path)) + (new-env-value (list->search-path-as-string + new-search-path ":"))) + (setenv env-name new-env-value))) + environment-variable-names)) + (setenv "CROSS_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH")) + (setenv "CROSS_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_PATH")) + (setenv "CROSS_LIBRARY_PATH" (getenv "LIBRARY_PATH")) + (filter-environment! cross? + '("CROSS_C_INCLUDE_PATH" + "CROSS_CPLUS_INCLUDE_PATH" + "CROSS_LIBRARY_PATH")) + (filter-environment! (lambda (e) (not (cross? e))) + '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" + "LIBRARY_PATH")) + ;; Guix tries to be helpful and automatically adds + ;; mini-os-git-checkout/include to the include path, + ;; but actually we don't want it to be there (yet). + (filter-environment! (lambda (e) + (not + (string-contains e + "mini-os-git-checkout"))) + '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" + "LIBRARY_PATH")) + (setenv "EFI_VENDOR" "guix"))) + (replace 'build + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "world" make-flags)))))) (inputs - `(("acpica" ,acpica) ; TODO: patch iasl invocation. - ("bridge-utils" ,bridge-utils) ; TODO: patch invocations. - ("glib" ,glib) - ("iproute" ,iproute) ; TODO: patch invocations. - ("libaio" ,libaio) - ("libx11" ,libx11) - ("yajl" ,yajl) - ("ncurses" ,ncurses) - ("openssl" ,openssl) - ("ovmf" ,ovmf) - ("pixman" ,pixman) - ("qemu" ,qemu-minimal) - ("seabios" ,seabios) - ("util-linux" ,util-linux "lib") ; uuid - ; TODO: ocaml-findlib, ocaml-nox. - ("xz" ,xz) ; for liblzma - ("zlib" ,zlib))) + (list acpica ; TODO: patch iasl invocation + bridge-utils ; TODO: patch invocations + glib + iproute ; TODO: patch invocations + libaio + libx11 + yajl + ncurses + openssl + ovmf + pixman + qemu-minimal + seabios + `(,util-linux "lib") ; uuid + ;; TODO: ocaml-findlib, ocaml-nox. + xz ; for liblzma + zlib)) (native-inputs - `(("dev86" ,dev86) - ("bison" ,bison) - ("cmake" ,cmake-minimal) - ("figlet" ,figlet) - ("flex" ,flex) - ("gettext" ,gettext-minimal) - ("libnl" ,libnl) - ("mini-os" - ,(origin + (list dev86 + bison + cmake-minimal + figlet + flex + gettext-minimal + libnl + (origin (method git-fetch) (uri (git-reference (url "https://xenbits.xen.org/git-http/mini-os.git") @@ -2459,17 +2445,17 @@ override CC = " (assoc-ref inputs "cross-gcc") "/bin/i686-linux-gnu-gcc")) (commit "f57858b7e8ef8dd48394dd08cec2bef3c9fb92f5"))) (sha256 (base32 "04y7grxs47amvjcq1rq4jgk174rhid5m2z9w8wrv7rfd2xhazxy1")) - (file-name (string-append name "-" version "-mini-os-git-checkout")))) - ("perl" ,perl) - ; TODO: markdown - ("pkg-config" ,pkg-config) - ("python" ,python-2) - ("wget" ,wget) - ("cross-gcc" ,(cross-gcc "i686-linux-gnu" - #:xbinutils (cross-binutils "i686-linux-gnu") - #:libc (cross-libc "i686-linux-gnu"))) - ("cross-libc" ,(cross-libc "i686-linux-gnu")) ; header files - ("cross-libc-static" ,(cross-libc "i686-linux-gnu") "static"))) + (file-name (string-append name "-" version "-mini-os-git-checkout"))) + perl + ;; TODO: markdown. + pkg-config + python-2 + wget + (cross-gcc "i686-linux-gnu" + #:xbinutils (cross-binutils "i686-linux-gnu") + #:libc (cross-libc "i686-linux-gnu")) + (cross-libc "i686-linux-gnu") ; header files + `(,(cross-libc "i686-linux-gnu") "static"))) (home-page "https://xenproject.org/") (synopsis "Xen Virtual Machine Monitor") (description "This package provides the Xen Virtual Machine Monitor -- cgit v1.2.3 From d47146562445c75a386d00471f6d2ab483d65fcb Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 24 Sep 2023 02:00:00 +0200 Subject: gnu: xen: Build in parallel. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I was unable to trigger any additional irreproducibility. If you can, please disable PARRALLEL-BUILD? instead. * gnu/packages/virtualization.scm (xen)[arguments]: Remove hard-coded ‘-j 1’ from the #:make-flags. Honour PARALLEL-BUILD? in the 'build phase. --- gnu/packages/virtualization.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 777c372f9e..9097355e4e 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -2309,8 +2309,7 @@ DOS or Microsoft Windows.") (search-input-file %build-inputs "share/firmware/ovmf_ia32.bin"))) #:make-flags - #~(list "-j" "1" - "XEN_BUILD_DATE=Thu Jan 1 01:00:01 CET 1970" + #~(list "XEN_BUILD_DATE=Thu Jan 1 01:00:01 CET 1970" "XEN_BUILD_TIME=01:00:01" "XEN_BUILD_HOST=" "ETHERBOOT_NICS=" @@ -2406,8 +2405,11 @@ DOS or Microsoft Windows.") "LIBRARY_PATH")) (setenv "EFI_VENDOR" "guix"))) (replace 'build - (lambda* (#:key make-flags #:allow-other-keys) - (apply invoke "make" "world" make-flags)))))) + (lambda* (#:key make-flags parallel-build? #:allow-other-keys) + (apply invoke "make" "world" + "-j" (number->string + (if parallel-build? (parallel-job-count) 1)) + make-flags)))))) (inputs (list acpica ; TODO: patch iasl invocation bridge-utils ; TODO: patch invocations -- cgit v1.2.3 From 1b0ec97bce2db93ec4159a13fb0a184f012df4fe Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 24 Sep 2023 02:00:00 +0200 Subject: gnu: xen: Build reproducibly * gnu/packages/virtualization.scm (xen)[source]: Add patches. [arguments]: Add a new 'remove-cruft phase. * gnu/packages/patches/xen-docs-use-predictable-ordering.patch, * gnu/packages/patches/xen-remove-config.gz-timestamp.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them both. --- gnu/local.mk | 2 ++ .../xen-docs-use-predictable-ordering.patch | 34 ++++++++++++++++++++ .../patches/xen-remove-config.gz-timestamp.patch | 37 ++++++++++++++++++++++ gnu/packages/virtualization.scm | 13 ++++++-- 4 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/xen-docs-use-predictable-ordering.patch create mode 100644 gnu/packages/patches/xen-remove-config.gz-timestamp.patch (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 491638899b..c4215cd59a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2121,6 +2121,8 @@ dist_patch_DATA = \ %D%/packages/patches/wpa-supplicant-dbus-group-policy.patch \ %D%/packages/patches/x265-arm-flags.patch \ %D%/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch\ + %D%/packages/patches/xen-docs-use-predictable-ordering.patch \ + %D%/packages/patches/xen-remove-config.gz-timestamp.patch \ %D%/packages/patches/xf86-video-ark-remove-mibstore.patch \ %D%/packages/patches/xf86-video-nouveau-fixup-ABI.patch \ %D%/packages/patches/xf86-video-savage-xorg-compat.patch \ diff --git a/gnu/packages/patches/xen-docs-use-predictable-ordering.patch b/gnu/packages/patches/xen-docs-use-predictable-ordering.patch new file mode 100644 index 0000000000..557da5775a --- /dev/null +++ b/gnu/packages/patches/xen-docs-use-predictable-ordering.patch @@ -0,0 +1,34 @@ +From: Tobias Geerinckx-Rice +Date: Sun Sep 24 02:00:00 2023 +0200 +Subject: xen: docs: Use predictable ordering. + +What follows was taken verbatim from Debian. See: +https://sources.debian.org/patches/xen/4.14.5%2B94-ge49571868d-1/ + +From: Maximilian Engelhardt +Date: Fri, 18 Dec 2020 21:42:34 +0100 +Subject: docs: use predictable ordering in generated documentation + +When the seq number is equal, sort by the title to get predictable +output ordering. This is useful for reproducible builds. + +Signed-off-by: Maximilian Engelhardt +Acked-by: Andrew Cooper +(cherry picked from commit e18dadc5b709290b8038a1cacb52bc3b3b69cf21) +--- + docs/xen-headers | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/xen-headers b/docs/xen-headers +index 5415563..8c434d7 100755 +--- a/docs/xen-headers ++++ b/docs/xen-headers +@@ -331,7 +331,7 @@ sub output_index () { +

Starting points

+
    + END +- foreach my $ic (sort { $a->{Seq} <=> $b->{Seq} } @incontents) { ++ foreach my $ic (sort { $a->{Seq} <=> $b->{Seq} or $a->{Title} cmp $b->{Title} } @incontents) { + $o .= "
  • {Href}\">$ic->{Title}
  • \n"; + } + $o .= "
\n"; diff --git a/gnu/packages/patches/xen-remove-config.gz-timestamp.patch b/gnu/packages/patches/xen-remove-config.gz-timestamp.patch new file mode 100644 index 0000000000..a7396c564d --- /dev/null +++ b/gnu/packages/patches/xen-remove-config.gz-timestamp.patch @@ -0,0 +1,37 @@ +From: Tobias Geerinckx-Rice +Date: Sun Sep 24 02:00:00 2023 +0200 +Subject: xen: docs: Use predictable ordering. + +What follows was taken verbatim from Debian. See: +https://sources.debian.org/patches/xen/4.14.5%2B94-ge49571868d-1/ + +From: =?utf-8?b?IkZyw6lkw6lyaWMgUGllcnJldCAoZmVwaXRyZSki?= + +Date: Wed, 4 Nov 2020 09:24:40 +0100 +Subject: xen: don't have timestamp inserted in config.gz +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit + +This is for improving reproducible builds. + +Signed-off-by: Frédéric Pierret (fepitre) +Acked-by: Jan Beulich +(cherry picked from commit 5816d327e44ab37ae08730f4c54a80835998f31f) +--- + xen/common/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xen/common/Makefile b/xen/common/Makefile +index 06881d0..32cd650 100644 +--- a/xen/common/Makefile ++++ b/xen/common/Makefile +@@ -77,7 +77,7 @@ obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/ + + CONF_FILE := $(if $(patsubst /%,,$(KCONFIG_CONFIG)),$(XEN_ROOT)/xen/)$(KCONFIG_CONFIG) + config.gz: $(CONF_FILE) +- gzip -c $< >$@ ++ gzip -n -c $< >$@ + + config_data.o: config.gz + diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 9097355e4e..779164c53f 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -2288,7 +2288,10 @@ DOS or Microsoft Windows.") (file-name (git-file-name name version)) (sha256 (base32 - "1cdzpxbihkdn4za8ly0lgkbxrafjzbxjflhfn83kyg4bam1vv7mn")))) + "1cdzpxbihkdn4za8ly0lgkbxrafjzbxjflhfn83kyg4bam1vv7mn")) + (patches + (search-patches "xen-docs-use-predictable-ordering.patch" + "xen-remove-config.gz-timestamp.patch")))) (build-system gnu-build-system) (arguments (list @@ -2409,7 +2412,13 @@ DOS or Microsoft Windows.") (apply invoke "make" "world" "-j" (number->string (if parallel-build? (parallel-job-count) 1)) - make-flags)))))) + make-flags))) + (add-after 'install 'remove-cruft + (lambda _ + (with-directory-excursion #$output + ;; Delete useless (and irreproducible) build-time left-overs. + (for-each delete-file + (find-files "share/doc" "^\\.deps$")))))))) (inputs (list acpica ; TODO: patch iasl invocation bridge-utils ; TODO: patch invocations -- cgit v1.2.3