diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-03-13 17:30:15 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-03-13 17:33:38 +0100 |
commit | f292c5019111f92b6850afdca4b59f4146b9be3b (patch) | |
tree | f1bed037a60b6d4e47ae42c27e1882ee34ea2c26 | |
parent | 24fb0dc0ab34ebb49509a3d5b4d84d8488670807 (diff) | |
download | guix-f292c5019111f92b6850afdca4b59f4146b9be3b.tar guix-f292c5019111f92b6850afdca4b59f4146b9be3b.tar.gz |
maint: Add 'etc/release-manifest.scm'.
* etc/release-manifest.scm: New file.
* gnu/ci.scm (%cross-targets): Export.
* build-aux/check-available-binaries.scm: Remove.
* Makefile.am (EXTRA_DIST): Add 'etc/release-manifest.scm' and remove
'build-aux/check-available-binaries.scm'.
(assert-binaries-available): Rewrite using 'guix weather -m'.
-rw-r--r-- | Makefile.am | 7 | ||||
-rw-r--r-- | build-aux/check-available-binaries.scm | 78 | ||||
-rw-r--r-- | etc/release-manifest.scm | 108 | ||||
-rw-r--r-- | gnu/ci.scm | 3 |
4 files changed, 114 insertions, 82 deletions
diff --git a/Makefile.am b/Makefile.am index 3b951be7f5..d5829f3633 100644 --- a/Makefile.am +++ b/Makefile.am @@ -541,6 +541,7 @@ EXTRA_DIST += \ scripts/guix.in \ etc/guix-install.sh \ etc/news.scm \ + etc/release-manifest.scm \ etc/system-tests.scm \ build-aux/build-self.scm \ build-aux/compile-all.scm \ @@ -551,7 +552,6 @@ EXTRA_DIST += \ build-aux/cuirass/gnu-system.scm \ build-aux/cuirass/guix-modular.scm \ build-aux/cuirass/hydra-to-cuirass.scm \ - build-aux/check-available-binaries.scm \ build-aux/check-final-inputs-self-contained.scm \ build-aux/compile-as-derivation.scm \ build-aux/generate-authors.scm \ @@ -851,8 +851,9 @@ assert-no-store-file-names: # Make sure important substitutes are available. assert-binaries-available: $(GOBJECTS) - $(AM_V_at)$(top_builddir)/pre-inst-env "$(GUILE)" \ - "$(top_srcdir)/build-aux/check-available-binaries.scm" + $(AM_V_at)$(top_builddir)/pre-inst-env \ + guix weather -m "$(top_srcdir)/etc/release-manifest.scm" \ + --display-missing # Make sure the final inputs don't refer to bootstrap tools. assert-final-inputs-self-contained: $(GOBJECTS) diff --git a/build-aux/check-available-binaries.scm b/build-aux/check-available-binaries.scm deleted file mode 100644 index f39874ab71..0000000000 --- a/build-aux/check-available-binaries.scm +++ /dev/null @@ -1,78 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. - -;;; -;;; Check whether important binaries are available. -;;; - -(use-modules (guix store) - (guix grafts) - (guix packages) - (guix derivations) - (gnu packages) - (gnu packages certs) - (gnu packages emacs) - (gnu packages make-bootstrap) - (gnu packages ssh) - (srfi srfi-1) - (srfi srfi-26) - (ice-9 format)) - -(define (packages-for-system system) - "Return the list of packages to check for SYSTEM." - (let ((base (list %bootstrap-tarballs emacs nss-certs openssh))) - ;; On Intel systems, make sure key packages proposed by the installer are - ;; available. - (if (member system '("x86_64-linux" "i686-linux")) - (append (map specification->package - '("xfce" "gnome" "mate" "enlightenment" - "openbox" "awesome" "i3-wm" "ratpoison" - "network-manager-applet" "xlockmore" - "linux-libre" "grub-hybrid" "xorg-server" - "libreoffice" - ;; FIXME: Add IceCat when Rust is available on i686. - #;"icecat")) - base) - base))) - -(with-store store - (parameterize ((%graft? #f)) - (let* ((native (append-map (lambda (system) - (map (cut package-derivation store <> system) - (packages-for-system system))) - %hydra-supported-systems)) - (cross (map (cut package-cross-derivation store - %bootstrap-tarballs <>) - '("mips64el-linux-gnu" - "arm-linux-gnueabihf"))) - (total (append native cross))) - - (set-build-options store - #:use-substitutes? #t - #:substitute-urls %default-substitute-urls) - (let* ((total (map derivation->output-path total)) - (available (substitutable-paths store total)) - (missing (lset-difference string=? total available))) - (if (null? missing) - (format (current-error-port) - "~a packages found substitutable on~{ ~a~}~%" - (length total) %hydra-supported-systems) - (format (current-error-port) - "~a packages are not substitutable:~%~{ ~a~%~}~%" - (length missing) missing)) - (exit (null? missing)))))) diff --git a/etc/release-manifest.scm b/etc/release-manifest.scm new file mode 100644 index 0000000000..67b92c3921 --- /dev/null +++ b/etc/release-manifest.scm @@ -0,0 +1,108 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +;;; This file returns a manifest containing release-critical bit, for all the +;;; supported architectures and cross-compilation targets. + +(use-modules (gnu packages) + (guix packages) + (guix profiles) + ((gnu ci) #:select (%cross-targets)) + (srfi srfi-1) + (srfi srfi-26)) + +(define* (package->manifest-entry* package system + #:key target) + "Return a manifest entry for PACKAGE on SYSTEM, optionally cross-compiled to +TARGET." + (manifest-entry + (inherit (package->manifest-entry package)) + (name (string-append (package-name package) "." system + (if target + (string-append "." target) + "'"))) + (item (with-parameters ((%current-system system) + (%current-target-system target)) + package)))) + +(define %base-packages + ;; Packages that must be substitutable on all the platforms Guix supports. + (map specification->package + '("bootstrap-tarballs" "gcc-toolchain" "nss-certs" + "openssh" "emacs" "vim" "python" "guile" "guix"))) + +(define %system-packages + ;; Key packages proposed by the Guix System installer. + (map specification->package + '("xorg-server" "xfce" "gnome" "mate" "enlightenment" + "openbox" "awesome" "i3-wm" "ratpoison" + "xlockmore" "slock" "libreoffice" + "connman" "network-manager" "network-manager-applet" + "openssh" "ntp" "tor" + "linux-libre" "grub-hybrid" + ;; FIXME: Add IceCat when Rust is available on i686. + ;;"icecat" + ))) + +(define %packages-to-cross-build + ;; Packages that must be cross-buildable from x86_64-linux. + (cons (@ (gnu packages gcc) gcc) + (map specification->package + '("coreutils" "grep" "sed" "findutils" "diffutils" "patch" + "gawk" "gettext" "gzip" "xz" + "hello" "guile@2.2" "zlib")))) + +(define %cross-bootstrap-targets + ;; Cross-compilation triplets for which 'bootstrap-tarballs' must be + ;; buildable. + '("i586-pc-gnu" + "arm-linux-gnueabihf" + "aarch64-linux-gnu")) + + +;;; +;;; Manifests. +;;; + +(define %base-manifest + (manifest + (append-map (lambda (system) + (map (cut package->manifest-entry* <> system) + %base-packages)) + %hydra-supported-systems))) + +(define %cross-manifest + (manifest + (append-map (lambda (target) + (map (cut package->manifest-entry* <> "x86_64-linux" + #:target target) + %packages-to-cross-build)) + %cross-targets))) + +(define %cross-bootstrap-manifest + (manifest + (map (lambda (target) + (package->manifest-entry* + (specification->package "bootstrap-tarballs") + "x86_64-linux" #:target target)) + %cross-bootstrap-targets))) + +;; Return the union of all three manifests. +(concatenate-manifests (list %base-manifest + %cross-manifest + %cross-bootstrap-manifest)) diff --git a/gnu/ci.scm b/gnu/ci.scm index e024c09ebc..44a6a87e1a 100644 --- a/gnu/ci.scm +++ b/gnu/ci.scm @@ -55,7 +55,8 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (ice-9 match) - #:export (channel-source->package + #:export (%cross-targets + channel-source->package hydra-jobs)) ;;; Commentary: |