From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 17 16:13:18 2017 Received: (at submit) by debbugs.gnu.org; 17 Sep 2017 20:13:18 +0000 Received: from localhost ([127.0.0.1]:45301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtfwI-0000Cb-4u for submit@debbugs.gnu.org; Sun, 17 Sep 2017 16:13:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dtfw9-0000BG-DX for submit@debbugs.gnu.org; Sun, 17 Sep 2017 16:13:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtfw1-0003C8-UR for submit@debbugs.gnu.org; Sun, 17 Sep 2017 16:13:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56120) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dtfw1-0003Bq-QM for submit@debbugs.gnu.org; Sun, 17 Sep 2017 16:12:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtfvy-0006vl-8U for guix-patches@gnu.org; Sun, 17 Sep 2017 16:12:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtfvt-00038K-4p for guix-patches@gnu.org; Sun, 17 Sep 2017 16:12:54 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtfvs-00038E-Vl; Sun, 17 Sep 2017 16:12:49 -0400 Received: from peder.onsbrabantnet.nl ([88.159.206.46]:60928 helo=localhost.localdomain) by fencepost.gnu.org with esmtpa (Exim 4.82) (envelope-from ) id 1dtfvs-0003Ow-EN; Sun, 17 Sep 2017 16:12:48 -0400 From: Jan Nieuwenhuizen To: guix-patches@gnu.org Subject: [PATCH] cuirass: Add gnu-system build spec. Date: Sun, 17 Sep 2017 22:11:57 +0200 Message-Id: <20170917201157.9802-5-janneke@gnu.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170917201157.9802-1-janneke@gnu.org> References: <20170917201157.9802-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * build-aux/cuirass/gnu-system.scm: New file. Combines build-aux/hydra/gnu-system.scm, guix-cuirass/examples/gnu-system.scm and supports building a named subset. (let ((spec #~((#:name . "guix") (#:url . "git://git.savannah.gnu.org/guix.git") (#:load-path . ".") (#:file . "build-aux/cuirass/gnu-system.scm") (#:proc . hydra-jobs) (#:arguments (subset . ("hello" "grep"))) (#:branch . "master")))) (service cuirass-service-type (cuirass-configuration (specifications #~(list '#$spec))))) --- build-aux/cuirass/gnu-system.scm | 376 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 376 insertions(+) create mode 100644 build-aux/cuirass/gnu-system.scm diff --git a/build-aux/cuirass/gnu-system.scm b/build-aux/cuirass/gnu-system.scm new file mode 100644 index 000000000..15fdd3e31 --- /dev/null +++ b/build-aux/cuirass/gnu-system.scm @@ -0,0 +1,376 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès +;;; Copyright © 2016 Mathieu Lirzin +;;; Copyright © 2017 Jan Nieuwenhuizen +;;; +;;; 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 . + +;;; +;;; This file defines build jobs for the Hydra continuation integration +;;; tool. +;;; + +;; Attempt to use our very own Guix modules. +(eval-when (compile load eval) + + ;; Ignore any available .go, and force recompilation. This is because our + ;; checkout in the store has mtime set to the epoch, and thus .go files look + ;; newer, even though they may not correspond. + (set! %fresh-auto-compile #t) + + (and=> (assoc-ref (current-source-location) 'filename) + (lambda (file) + (let ((dir (string-append (dirname file) "/../.."))) + (format (current-error-port) "prepending ~s to the load path~%" + dir) + (set! %load-path (cons dir %load-path)))))) + +(use-modules (guix config) + (guix store) + (guix grafts) + (guix profiles) + (guix packages) + (guix derivations) + (guix monads) + ((guix licenses) + #:select (gpl3+ license-name license-uri license-comment)) + ((guix utils) #:select (%current-system)) + ((guix scripts system) #:select (read-operating-system)) + ((guix scripts pack) + #:select (lookup-compressor self-contained-tarball)) + (gnu packages) + (gnu packages gcc) + (gnu packages base) + (gnu packages gawk) + (gnu packages guile) + (gnu packages gettext) + (gnu packages compression) + (gnu packages multiprecision) + (gnu packages make-bootstrap) + (gnu packages package-management) + (gnu system) + (gnu system vm) + (gnu system install) + (gnu tests) + (srfi srfi-1) + (srfi srfi-26) + (ice-9 match)) + +;; XXX: Debugging hack: since `hydra-eval-guile-jobs' redirects the output +;; port to the bit bucket, let us write to the error port instead. +(setvbuf (current-error-port) _IOLBF) +(set-current-output-port (current-error-port)) + +(define (license->alist lcs) + "Return LCS object as an alist." + ;; Sometimes 'license' field is a list of licenses. + (if (list? lcs) + (map license->alist lcs) + `((name . ,(license-name lcs)) + (uri . ,(license-uri lcs)) + (comment . ,(license-comment lcs))))) + +(define (package-metadata package) + "Convert PACKAGE to an alist suitable for Hydra." + `((#:description . ,(package-synopsis package)) + (#:long-description . ,(package-description package)) + (#:license . ,(license->alist (package-license package))) + (#:home-page . ,(package-home-page package)) + (#:maintainers . ("bug-guix@gnu.org")) + (#:max-silent-time . ,(or (assoc-ref (package-properties package) + 'max-silent-time) + 3600)) ;1 hour by default + (#:timeout . ,(or (assoc-ref (package-properties package) 'timeout) + 72000)))) ;20 hours by default + +(define (package-job store job-name package system) + "Return a job called JOB-NAME that builds PACKAGE on SYSTEM." + (lambda () + `((#:job-name . ,(string-append (symbol->string job-name) "." system)) + (#:derivation . ,(derivation-file-name + (parameterize ((%graft? #f)) + (package-derivation store package system + #:graft? #f)))) + ,@(package-metadata package)))) + +(define (package-cross-job store job-name package target system) + "Return a job called TARGET.JOB-NAME that cross-builds PACKAGE +for TARGET on SYSTEM." + (lambda () + `((#:job-name . ,(string-join (list target (symbol->string job-name) system) + ".")) + (#:derivation . ,(derivation-file-name + (parameterize ((%graft? #f)) + (package-cross-derivation store package target system + #:graft? #f)))) + ,@(package-metadata package)))) + +(define %core-packages + ;; Note: Don't put the '-final' package variants because (1) that's + ;; implicit, and (2) they cannot be cross-built (due to the explicit input + ;; chain.) + (list gcc-4.8 gcc-4.9 gcc-5 glibc binutils + gmp mpfr mpc coreutils findutils diffutils patch sed grep + gawk gnu-gettext hello guile-2.0 guile-2.2 zlib gzip xz + %bootstrap-binaries-tarball + %binutils-bootstrap-tarball + (%glibc-bootstrap-tarball) + %gcc-bootstrap-tarball + %guile-bootstrap-tarball + %bootstrap-tarballs)) + +(define %packages-to-cross-build + %core-packages) + +(define %cross-targets + '("mips64el-linux-gnu" + "mips64el-linux-gnuabi64" + "arm-linux-gnueabihf" + "aarch64-linux-gnu" + "powerpc-linux-gnu" + "i586-pc-gnu" ;aka. GNU/Hurd + "i686-w64-mingw32")) + +(define %guixsd-supported-systems + '("x86_64-linux" "i686-linux")) + +(define (qemu-jobs store system) + "Return a list of jobs that build QEMU images for SYSTEM." + (define (->alist drv) + `((derivation . ,(derivation-file-name drv)) + (description . "Stand-alone QEMU image of the GNU system") + (long-description . "This is a demo stand-alone QEMU image of the GNU +system.") + (license . ,gpl3+) + (home-page . ,%guix-home-page-url) + (maintainers . ("bug-guix@gnu.org")))) + + (define (->job name drv) + (let ((name (symbol-append name (string->symbol ".") + (string->symbol system)))) + `(,name . ,(lambda () + (parameterize ((%graft? #f)) + (->alist drv)))))) + + (define MiB + (expt 2 20)) + + (if (member system %guixsd-supported-systems) + (list (->job 'usb-image + (run-with-store store + (mbegin %store-monad + (set-guile-for-build (default-guile)) + (system-disk-image installation-os + #:disk-image-size + (* 1024 MiB))))) + (->job 'iso9660-image + (run-with-store store + (mbegin %store-monad + (set-guile-for-build (default-guile)) + (system-disk-image installation-os + #:file-system-type + "iso9660"))))) + '())) + +(define (system-test-jobs store system) + "Return a list of jobs for the system tests." + (define (test->thunk test) + (lambda () + (define drv + (run-with-store store + (mbegin %store-monad + (set-current-system system) + (set-grafting #f) + (set-guile-for-build (default-guile)) + (system-test-value test)))) + + `((derivation . ,(derivation-file-name drv)) + (description . ,(format #f "GuixSD '~a' system test" + (system-test-name test))) + (long-description . ,(system-test-description test)) + (license . ,gpl3+) + (home-page . ,%guix-home-page-url) + (maintainers . ("bug-guix@gnu.org"))))) + + (define (->job test) + (let ((name (string->symbol + (string-append "test." (system-test-name test) + "." system)))) + (cons name (test->thunk test)))) + + (if (member system %guixsd-supported-systems) + (map ->job (all-system-tests)) + '())) + +(define (tarball-jobs store system) + "Return Hydra jobs to build the self-contained Guix binary tarball." + (define (->alist drv) + `((derivation . ,(derivation-file-name drv)) + (description . "Stand-alone binary Guix tarball") + (long-description . "This is a tarball containing binaries of Guix and +all its dependencies, and ready to be installed on non-GuixSD distributions.") + (license . ,gpl3+) + (home-page . ,%guix-home-page-url) + (maintainers . ("bug-guix@gnu.org")))) + + (define (->job name drv) + (let ((name (symbol-append name (string->symbol ".") + (string->symbol system)))) + `(,name . ,(lambda () + (parameterize ((%graft? #f)) + (->alist drv)))))) + + ;; XXX: Add a job for the stable Guix? + (list (->job 'binary-tarball + (run-with-store store + (mbegin %store-monad + (set-guile-for-build (default-guile)) + (>>= (profile-derivation (packages->manifest (list guix))) + (lambda (profile) + (self-contained-tarball "guix-binary" profile + #:localstatedir? #t + #:compressor + (lookup-compressor "xz"))))) + #:system system)))) + +(define job-name + ;; Return the name of a package's job. + (compose string->symbol package-full-name)) + +(define package->job + (let ((base-packages + (delete-duplicates + (append-map (match-lambda + ((_ package _ ...) + (match (package-transitive-inputs package) + (((_ inputs _ ...) ...) + inputs)))) + (%final-inputs))))) + (lambda (store package system) + "Return a job for PACKAGE on SYSTEM, or #f if this combination is not +valid." + (cond ((member package base-packages) + #f) + ((supported-package? package system) + (let ((drv (package-derivation store package system + #:graft? #f))) + (and (substitutable-derivation? drv) + (package-job store (job-name package) + package system)))) + (else + #f))))) + + +;;; +;;; Hydra entry point. +;;; + +(define (hydra-jobs store arguments) + "Return Hydra jobs." + (define subset + (match (assoc-ref arguments 'subset) + ("core" 'core) ; only build core packages + ("hello" 'hello) ; only build hello + (((? string?) (? string?) ...) 'list) ; only build selected list of packages + (_ 'all))) ; build everything + + (define (cross-jobs system) + (define (from-32-to-64? target) + ;; Return true if SYSTEM is 32-bit and TARGET is 64-bit. This hack + ;; prevents known-to-fail cross-builds from i686-linux or armhf-linux to + ;; mips64el-linux-gnuabi64. + (and (or (string-prefix? "i686-" system) + (string-prefix? "i586-" system) + (string-prefix? "armhf-" system)) + (string-contains target "64"))) ;x86_64, mips64el, aarch64, etc. + + (define (same? target) + ;; Return true if SYSTEM and TARGET are the same thing. This is so we + ;; don't try to cross-compile to 'mips64el-linux-gnu' from + ;; 'mips64el-linux'. + (or (string-contains target system) + (and (string-prefix? "armhf" system) ;armhf-linux + (string-prefix? "arm" target)))) ;arm-linux-gnueabihf + + (define (pointless? target) + ;; Return #t if it makes no sense to cross-build to TARGET from SYSTEM. + (and (string-contains target "mingw") + (not (string=? "x86_64-linux" system)))) + + (define (either proc1 proc2 proc3) + (lambda (x) + (or (proc1 x) (proc2 x) (proc3 x)))) + + (append-map (lambda (target) + (map (lambda (package) + (package-cross-job store (job-name package) + package target system)) + %packages-to-cross-build)) + (remove (either from-32-to-64? same? pointless?) + %cross-targets))) + + ;; Turn off grafts. Grafting is meant to happen on the user's machines. + (parameterize ((%graft? #f)) + ;; Return one job for each package, except bootstrap packages. + (append-map (lambda (system) + (case subset + ((all) + ;; Build everything, including replacements. + (let ((all (fold-packages + (lambda (package result) + (cond ((package-replacement package) + (cons* package + (package-replacement package) + result)) + ((package-superseded package) + result) ;don't build it + (else + (cons package result)))) + '())) + (job (lambda (package) + (package->job store package + system)))) + (append (filter-map job all) + (qemu-jobs store system) + (system-test-jobs store system) + (tarball-jobs store system) + (cross-jobs system)))) + ((core) + ;; Build core packages only. + (append (map (lambda (package) + (package-job store (job-name package) + package system)) + %core-packages) + (cross-jobs system))) + ((hello) + ;; Build hello package only. + (if (string=? system (%current-system)) + (let ((hello (specification->package "hello"))) + (list (package-job store (job-name hello) hello system))) + '())) + ((list) + ;; Build selected list of packages only. + (if (string=? system (%current-system)) + (let* ((names (assoc-ref arguments 'subset)) + (packages (map specification->package names))) + (map (lambda (package) + (package-job store (job-name package) + package system)) + packages)) + '())) + (else + (error "unknown subset" subset)))) + %hydra-supported-systems))) -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 26 04:19:14 2017 Received: (at 28487) by debbugs.gnu.org; 26 Sep 2017 08:19:14 +0000 Received: from localhost ([127.0.0.1]:59619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwl5G-0004kG-39 for submit@debbugs.gnu.org; Tue, 26 Sep 2017 04:19:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwl5E-0004k2-RW for 28487@debbugs.gnu.org; Tue, 26 Sep 2017 04:19:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwl58-0000HI-LT for 28487@debbugs.gnu.org; Tue, 26 Sep 2017 04:19:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwl4p-0000AK-NW; Tue, 26 Sep 2017 04:18:47 -0400 Received: from [193.50.110.164] (port=58864 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dwl4p-0003s6-5l; Tue, 26 Sep 2017 04:18:47 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Jan Nieuwenhuizen Subject: Re: [bug#28487] [PATCH] cuirass: Add gnu-system build spec. References: <20170917201157.9802-1-janneke@gnu.org> <20170917201157.9802-5-janneke@gnu.org> Date: Tue, 26 Sep 2017 10:18:44 +0200 In-Reply-To: <20170917201157.9802-5-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Sun, 17 Sep 2017 22:11:57 +0200") Message-ID: <87zi9h27q3.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28487 Cc: Mathieu Othacehe , 28487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hello! Jan Nieuwenhuizen skribis: > * build-aux/cuirass/gnu-system.scm: New file. Combines > build-aux/hydra/gnu-system.scm, guix-cuirass/examples/gnu-system.scm and = supports > building a named subset. > > (let ((spec #~((#:name . "guix") > (#:url . "git://git.savannah.gnu.org/guix.git") > (#:load-path . ".") > (#:file . "build-aux/cuirass/gnu-system.scm") > (#:proc . hydra-jobs) > (#:arguments (subset . ("hello" "grep"))) > (#:branch . "master")))) > (service cuirass-service-type > (cuirass-configuration > (specifications #~(list '#$spec))))) I like this but=E2=80=A6 while we=E2=80=99re at it, could we arrange to hav= e a single file that works for both Hydra and Cuirass? Concretely, we currently have these two files: https://git.savannah.gnu.org/cgit/guix.git/tree/build-aux/hydra/gnu-syste= m.scm https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/hydra/cuirass= -jobs.scm There are very close to one another. The main difference is that one returns an alist with symbols, whereas the other returns an alist with keywords. If we could instead add, say, build-aux/hydra/gnu-system-cuirass.scm, which simply loads gnu-system.scm and =E2=80=9Cconverts=E2=80=9D the result= ing alist appropriately, that would be awesome. I understand this is not quite what you were asking for ;-), but it would achieve the same result. How does that sound? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 26 13:57:10 2017 Received: (at 28487) by debbugs.gnu.org; 26 Sep 2017 17:57:10 +0000 Received: from localhost ([127.0.0.1]:33540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwu6W-0002tD-4B for submit@debbugs.gnu.org; Tue, 26 Sep 2017 13:57:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwu6T-0002sg-Lj for 28487@debbugs.gnu.org; Tue, 26 Sep 2017 13:57:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwu6N-0005X2-80 for 28487@debbugs.gnu.org; Tue, 26 Sep 2017 13:57:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37133) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwu5y-0005ID-Rb; Tue, 26 Sep 2017 13:56:34 -0400 Received: from peder.onsbrabantnet.nl ([88.159.206.46]:53108 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dwu5y-0000lA-Dd; Tue, 26 Sep 2017 13:56:34 -0400 From: Jan Nieuwenhuizen To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [bug#28487] [PATCH] cuirass: Add gnu-system build spec. Organization: AvatarAcademy.nl References: <20170917201157.9802-1-janneke@gnu.org> <20170917201157.9802-5-janneke@gnu.org> <87zi9h27q3.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Tue, 26 Sep 2017 19:56:32 +0200 In-Reply-To: <87zi9h27q3.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 26 Sep 2017 10:18:44 +0200") Message-ID: <87mv5hqr73.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28487 Cc: Mathieu Othacehe , 28487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > I like this but=E2=80=A6 while we=E2=80=99re at it, could we arrange to h= ave a single > file that works for both Hydra and Cuirass? I like that. It bothered me a bit to have similar files (not DRY) but didn't see how that could be easily avoided. > The main difference is that one returns an alist with symbols, whereas > the other returns an alist with keywords. That helps a lot...I kind of vaguely knew this but not well enough to see i= t! > If we could instead add, say, build-aux/hydra/gnu-system-cuirass.scm, > which simply loads gnu-system.scm and =E2=80=9Cconverts=E2=80=9D the resu= lting alist > appropriately, that would be awesome. I opted for build-aux/cuiras/gnu-cuirass.scm. > I understand this is not quite what you were asking for ;-), but it > would achieve the same result. Attached is a new proposal, untested. I will test it tomorrow, please shoot on things that are already visibly foo. One question: Assuming we intend to move to Cuirass and away from Hydra, do we want to reverse the translation: have Cuirass be the untranslated version and keep the translation to Hydra alive for as long as we need to support Hydra? Greetings, janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-cuirass-Add-gnu-system-build-spec.patch Content-Transfer-Encoding: quoted-printable >From 8f10a707b0bbf6949388d85de175ed98974a8df4 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 16 Sep 2017 12:57:37 +0200 Subject: [PATCH] cuirass: Add gnu-system build spec. * build-aux/hydra/gnu-system.scm (hydra-jobs): Add subsets "hello" and list of packages: ("name[@version" ...). * build-aux/cuirass/gnu-system.scm: New file. * doc/guix.texi (Continuous Integration): Update example spec. --- build-aux/cuirass/gnu-system.scm | 36 ++++++++++++++++++++++++++++++++++++ build-aux/hydra/gnu-system.scm | 18 ++++++++++++++++++ doc/guix.texi | 4 ++-- 3 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 build-aux/cuirass/gnu-system.scm diff --git a/build-aux/cuirass/gnu-system.scm b/build-aux/cuirass/gnu-syste= m.scm new file mode 100644 index 000000000..b545323f6 --- /dev/null +++ b/build-aux/cuirass/gnu-system.scm @@ -0,0 +1,36 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2017 Jan Nieuwenhuizen +;;; +;;; 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 . + +;;; +;;; This file defines build jobs for the Cuirass continuation integration +;;; tool. +;;; + +(include-from-path "build-aux/hydra/gnu-system.scm") + +(define (cuirass-jobs store arguments) + "Return Cuirass jobs." + (pk (map hydra-job->cuirass-job (hydra-jobs store arguments)))) + +(define (hydra-job->cuirass-job hydra-job) + (let ((name (car hydra-job)) + (job ((cdr hydra-job)))) + (cons name (lambda _ (map symbol-alist-entry->keyword-alist-entry job)= )))) + +(define (symbol-alist-entry->keyword-alist-entry entry) + (cons (symbol->keyword (car entry)) (cdr entry))) diff --git a/build-aux/hydra/gnu-system.scm b/build-aux/hydra/gnu-system.scm index 73bd566f7..9968fc3da 100644 --- a/build-aux/hydra/gnu-system.scm +++ b/build-aux/hydra/gnu-system.scm @@ -270,6 +270,8 @@ valid." (define subset (match (assoc-ref arguments 'subset) ("core" 'core) ; only build core packag= es + ("hello" 'hello) ; only build hello + (((? string?) (? string?) ...) 'list) ; only build selected li= st of packages (_ 'all))) ; build everything =20 (define (cross-jobs system) @@ -340,6 +342,22 @@ valid." package system)) %core-packages) (cross-jobs system))) + ((hello) + ;; Build hello package only. + (if (string=3D? system (%current-system)) + (let ((hello (specification->package "hello"))) + (list (package-job store (job-name hello) hello= system))) + '())) + ((list) + ;; Build selected list of packages only. + (if (string=3D? system (%current-system)) + (let* ((names (assoc-ref arguments 'subset)) + (packages (map specification->package name= s))) + (map (lambda (package) + (package-job store (job-name package) + package system)) + packages)) + '())) (else (error "unknown subset" subset)))) %hydra-supported-systems))) diff --git a/doc/guix.texi b/doc/guix.texi index fff3fbd5f..c1391ee4b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -15375,8 +15375,8 @@ packages, as prescribed in the @file{gnu-system.scm= } example spec: cuirass "/tests/gnu-system.scm")) =20 - (#:proc . hydra-jobs) - (#:arguments (subset . "hello")) + (#:proc . cuirass-jobs) + (#:arguments (subset . ("hello" "grep"))) (#:branch . "master")))) (service cuirass-service-type (cuirass-configuration --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 26 14:06:32 2017 Received: (at 28487) by debbugs.gnu.org; 26 Sep 2017 18:06:32 +0000 Received: from localhost ([127.0.0.1]:33558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwuFc-0004zx-E4 for submit@debbugs.gnu.org; Tue, 26 Sep 2017 14:06:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwuFb-0004zl-4b for 28487@debbugs.gnu.org; Tue, 26 Sep 2017 14:06:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwuFV-0001Zt-44 for 28487@debbugs.gnu.org; Tue, 26 Sep 2017 14:06:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwuEx-00014O-N9; Tue, 26 Sep 2017 14:05:51 -0400 Received: from peder.onsbrabantnet.nl ([88.159.206.46]:53144 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dwuEx-0006e3-9C; Tue, 26 Sep 2017 14:05:51 -0400 From: Jan Nieuwenhuizen To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [bug#28487] [PATCH] cuirass: Add gnu-system build spec. Organization: AvatarAcademy.nl References: <20170917201157.9802-1-janneke@gnu.org> <20170917201157.9802-5-janneke@gnu.org> <87zi9h27q3.fsf@gnu.org> <87mv5hqr73.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Tue, 26 Sep 2017 20:05:49 +0200 In-Reply-To: <87mv5hqr73.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Tue, 26 Sep 2017 19:56:32 +0200") Message-ID: <87ing5qqrm.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28487 Cc: Mathieu Othacehe , 28487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Jan Nieuwenhuizen writes: >> If we could instead add, say, build-aux/hydra/gnu-system-cuirass.scm, >> which simply loads gnu-system.scm and =E2=80=9Cconverts=E2=80=9D the res= ulting alist >> appropriately, that would be awesome. > > I opted for build-aux/cuiras/gnu-cuirass.scm. ehh.. as the patch shows: build-aux/cuirass/gnu-system.scm. and I'll add add (C) notice for myself to to hydra/gnu-system.scm janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 26 16:29:35 2017 Received: (at 28487) by debbugs.gnu.org; 26 Sep 2017 20:29:36 +0000 Received: from localhost ([127.0.0.1]:33684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwwU3-0008Q9-La for submit@debbugs.gnu.org; Tue, 26 Sep 2017 16:29:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwwU1-0008Pt-8q for 28487@debbugs.gnu.org; Tue, 26 Sep 2017 16:29:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwwTu-0002qS-OA for 28487@debbugs.gnu.org; Tue, 26 Sep 2017 16:29:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwwTm-0002m3-1Z; Tue, 26 Sep 2017 16:29:18 -0400 Received: from [2a01:e0a:1d:7270:6a6c:dc17:fc02:cfda] (port=45920 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dwwTl-0006pl-E8; Tue, 26 Sep 2017 16:29:17 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Jan Nieuwenhuizen Subject: Re: [bug#28487] [PATCH] cuirass: Add gnu-system build spec. References: <20170917201157.9802-1-janneke@gnu.org> <20170917201157.9802-5-janneke@gnu.org> <87zi9h27q3.fsf@gnu.org> <87mv5hqr73.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 5 =?utf-8?Q?Vend=C3=A9miaire?= an 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 26 Sep 2017 22:29:15 +0200 In-Reply-To: <87mv5hqr73.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Tue, 26 Sep 2017 19:56:32 +0200") Message-ID: <87a81hgq5g.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28487 Cc: Mathieu Othacehe , 28487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Jan Nieuwenhuizen skribis: > Ludovic Court=C3=A8s writes: > >> I like this but=E2=80=A6 while we=E2=80=99re at it, could we arrange to = have a single >> file that works for both Hydra and Cuirass? > > I like that. It bothered me a bit to have similar files (not DRY) but > didn't see how that could be easily avoided. > >> The main difference is that one returns an alist with symbols, whereas >> the other returns an alist with keywords. > > That helps a lot...I kind of vaguely knew this but not well enough to see= it! > >> If we could instead add, say, build-aux/hydra/gnu-system-cuirass.scm, >> which simply loads gnu-system.scm and =E2=80=9Cconverts=E2=80=9D the res= ulting alist >> appropriately, that would be awesome. > > I opted for build-aux/cuiras/gnu-cuirass.scm. Sounds good! > Attached is a new proposal, untested. I will test it tomorrow, please > shoot on things that are already visibly foo. > > One question: Assuming we intend to move to Cuirass and away from Hydra, > do we want to reverse the translation: have Cuirass be the untranslated > version and keep the translation to Hydra alive for as long as we need > to support Hydra? > > Greetings, > janneke > > From 8f10a707b0bbf6949388d85de175ed98974a8df4 Mon Sep 17 00:00:00 2001 > From: Jan Nieuwenhuizen > Date: Sat, 16 Sep 2017 12:57:37 +0200 > Subject: [PATCH] cuirass: Add gnu-system build spec. > > * build-aux/hydra/gnu-system.scm (hydra-jobs): Add subsets "hello" > and list of packages: ("name[@version" ...). > * build-aux/cuirass/gnu-system.scm: New file. > * doc/guix.texi (Continuous Integration): Update example spec. > --- > build-aux/cuirass/gnu-system.scm | 36 ++++++++++++++++++++++++++++++++++= ++ > build-aux/hydra/gnu-system.scm | 18 ++++++++++++++++++ > doc/guix.texi | 4 ++-- > 3 files changed, 56 insertions(+), 2 deletions(-) > create mode 100644 build-aux/cuirass/gnu-system.scm > > diff --git a/build-aux/cuirass/gnu-system.scm b/build-aux/cuirass/gnu-sys= tem.scm > new file mode 100644 > index 000000000..b545323f6 > --- /dev/null > +++ b/build-aux/cuirass/gnu-system.scm > @@ -0,0 +1,36 @@ > +;;; GNU Guix --- Functional package management for GNU > +;;; Copyright =C2=A9 2017 Jan Nieuwenhuizen > +;;; > +;;; 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 . > + > +;;; > +;;; This file defines build jobs for the Cuirass continuation integration > +;;; tool. > +;;; > + > +(include-from-path "build-aux/hydra/gnu-system.scm") > + > +(define (cuirass-jobs store arguments) > + "Return Cuirass jobs." > + (pk (map hydra-job->cuirass-job (hydra-jobs store arguments)))) > + > +(define (hydra-job->cuirass-job hydra-job) > + (let ((name (car hydra-job)) > + (job ((cdr hydra-job)))) > + (cons name (lambda _ (map symbol-alist-entry->keyword-alist-entry jo= b))))) > + > +(define (symbol-alist-entry->keyword-alist-entry entry) > + (cons (symbol->keyword (car entry)) (cdr entry))) I *think* that=E2=80=99s correct, though we=E2=80=99ll need to double check. > --- a/build-aux/hydra/gnu-system.scm > +++ b/build-aux/hydra/gnu-system.scm > @@ -270,6 +270,8 @@ valid." > (define subset > (match (assoc-ref arguments 'subset) > ("core" 'core) ; only build core pack= ages > + ("hello" 'hello) ; only build hello > + (((? string?) (? string?) ...) 'list) ; only build selected = list of packages > (_ 'all))) ; build everything This part could be added separately. (It=E2=80=99s not usuable via Hydra since its UIs does not support passing list-of-strings arguments.) Thanks a lot! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 27 14:55:56 2017 Received: (at 28487) by debbugs.gnu.org; 27 Sep 2017 18:55:56 +0000 Received: from localhost ([127.0.0.1]:35348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxHUx-0007aW-Nz for submit@debbugs.gnu.org; Wed, 27 Sep 2017 14:55:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39760) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxHUw-0007aJ-7I for 28487@debbugs.gnu.org; Wed, 27 Sep 2017 14:55:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxHUp-0005AA-HQ for 28487@debbugs.gnu.org; Wed, 27 Sep 2017 14:55:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxHUU-0004xi-PF; Wed, 27 Sep 2017 14:55:26 -0400 Received: from peder.onsbrabantnet.nl ([88.159.206.46]:54362 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dxHUU-000443-AJ; Wed, 27 Sep 2017 14:55:26 -0400 From: Jan Nieuwenhuizen To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [bug#28487] [PATCH] cuirass: Add gnu-system build spec. References: <20170917201157.9802-1-janneke@gnu.org> <20170917201157.9802-5-janneke@gnu.org> <87zi9h27q3.fsf@gnu.org> <87mv5hqr73.fsf@gnu.org> <87a81hgq5g.fsf@gnu.org> Date: Wed, 27 Sep 2017 20:55:23 +0200 In-Reply-To: <87a81hgq5g.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 26 Sep 2017 22:29:15 +0200") Message-ID: <87a81gq8dg.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28487 Cc: Mathieu Othacehe , 28487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: Hey Ludo', >> I opted for build-aux/cuiras/gnu-cuirass.scm. > > Sounds good! Ok, grand. >> +(define (symbol-alist-entry->keyword-alist-entry entry) >> + (cons (symbol->keyword (car entry)) (cdr entry))) > > I *think* that=E2=80=99s correct, though we=E2=80=99ll need to double che= ck. I tested today and there were minor problems. Cuirass actually doesn't take an alist; instead takes a list that includes (#:job-name . "name"). Also, Cuirass performs an sexp-read and thus #< ...> needs to get sexp'ified. Anyway, what I proposed was close and attached is a tested, working version (that may need some work, see below). >> --- a/build-aux/hydra/gnu-system.scm >> +++ b/build-aux/hydra/gnu-system.scm >> @@ -270,6 +270,8 @@ valid." >> (define subset >> (match (assoc-ref arguments 'subset) >> ("core" 'core) ; only build core pac= kages >> + ("hello" 'hello) ; only build hello >> + (((? string?) (? string?) ...) 'list) ; only build selected= list of packages >> (_ 'all))) ; build everything > > This part could be added separately. Yes...it could. Do you mean a separate patch, or ... > (It=E2=80=99s not usuable via Hydra since its UIs does not support passing > list-of-strings arguments.) ...I don't quite understand what you propose here. I appreciate that I'm adding functionality for Cuirass to the hydra file where in itself that does not make much sense... Otoh, I don't see how to move this functionality to cuirass/gnu-system.scm only without duplicating much of `hydra-jobs'; so that's probably not what you mean... / somewhat confused here. ;-) I'd be happy to update or split this patch if once I understand what you want or feel free to do it for me if that's easier for you. Thanks! janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-cuirass-Add-gnu-system-build-spec.patch Content-Transfer-Encoding: quoted-printable >From bb82d85df2380cd0c25de0f659a7010f2d88ee4f Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 16 Sep 2017 12:57:37 +0200 Subject: [PATCH] cuirass: Add gnu-system build spec. * build-aux/hydra/gnu-system.scm (hydra-jobs): Add subsets "hello" and list of packages: ("name[@version" ...). * guix/licenses.scm: Export . * build-aux/cuirass/gnu-system.scm: New file. * doc/guix.texi (Continuous Integration): Update example spec. --- build-aux/cuirass/gnu-system.scm | 45 ++++++++++++++++++++++++++++++++++++= ++++ build-aux/hydra/gnu-system.scm | 19 +++++++++++++++++ doc/guix.texi | 4 ++-- guix/licenses.scm | 3 ++- 4 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 build-aux/cuirass/gnu-system.scm diff --git a/build-aux/cuirass/gnu-system.scm b/build-aux/cuirass/gnu-syste= m.scm new file mode 100644 index 000000000..0028d9d8e --- /dev/null +++ b/build-aux/cuirass/gnu-system.scm @@ -0,0 +1,45 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2017 Jan Nieuwenhuizen +;;; +;;; 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 . + +;;; +;;; This file defines build jobs for the Cuirass continuation integration +;;; tool. +;;; + +(include-from-path "build-aux/hydra/gnu-system.scm") + +(use-modules ((guix licenses) #:select ())) + +(define (cuirass-jobs store arguments) + "Return Cuirass jobs." + (map hydra-job->cuirass-job (hydra-jobs store arguments))) + +(define (hydra-job->cuirass-job hydra-job) + (let ((name (car hydra-job)) + (job ((cdr hydra-job)))) + (lambda _ (acons #:job-name (symbol->string name) + (map symbol-alist-entry->keyword-alist-entry job))))) + +(define (symbol-alist-entry->keyword-alist-entry entry) + (cons (symbol->keyword (car entry)) (entry->sexp-entry (cdr entry)))) + +(define (entry->sexp-entry o) + (match o + (($ name uri comment) + `((name . ,name) (uri . ,uri) (comment . ,comment))) + (_ o))) diff --git a/build-aux/hydra/gnu-system.scm b/build-aux/hydra/gnu-system.scm index 73bd566f7..146d929f9 100644 --- a/build-aux/hydra/gnu-system.scm +++ b/build-aux/hydra/gnu-system.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Court=C3= =A8s +;;; Copyright =C2=A9 2017 Jan Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -270,6 +271,8 @@ valid." (define subset (match (assoc-ref arguments 'subset) ("core" 'core) ; only build core packag= es + ("hello" 'hello) ; only build hello + (((? string?) (? string?) ...) 'list) ; only build selected li= st of packages (_ 'all))) ; build everything =20 (define (cross-jobs system) @@ -340,6 +343,22 @@ valid." package system)) %core-packages) (cross-jobs system))) + ((hello) + ;; Build hello package only. + (if (string=3D? system (%current-system)) + (let ((hello (specification->package "hello"))) + (list (package-job store (job-name hello) hello= system))) + '())) + ((list) + ;; Build selected list of packages only. + (if (string=3D? system (%current-system)) + (let* ((names (assoc-ref arguments 'subset)) + (packages (map specification->package name= s))) + (map (lambda (package) + (package-job store (job-name package) + package system)) + packages)) + '())) (else (error "unknown subset" subset)))) %hydra-supported-systems))) diff --git a/doc/guix.texi b/doc/guix.texi index fff3fbd5f..c1391ee4b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -15375,8 +15375,8 @@ packages, as prescribed in the @file{gnu-system.scm= } example spec: cuirass "/tests/gnu-system.scm")) =20 - (#:proc . hydra-jobs) - (#:arguments (subset . "hello")) + (#:proc . cuirass-jobs) + (#:arguments (subset . ("hello" "grep"))) (#:branch . "master")))) (service cuirass-service-type (cuirass-configuration diff --git a/guix/licenses.scm b/guix/licenses.scm index 6de611da2..144dd06f0 100644 --- a/guix/licenses.scm +++ b/guix/licenses.scm @@ -31,7 +31,8 @@ =20 (define-module (guix licenses) #:use-module (srfi srfi-9) - #:export (license? license-name license-uri license-comment + #:export ( + license? license-name license-uri license-comment agpl1 agpl3 agpl3+ asl1.1 asl2.0 boost1.0 --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 27 15:46:08 2017 Received: (at 28487) by debbugs.gnu.org; 27 Sep 2017 19:46:08 +0000 Received: from localhost ([127.0.0.1]:35416 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxIHY-0000Ua-Dl for submit@debbugs.gnu.org; Wed, 27 Sep 2017 15:46:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxIHW-0000Tw-Ud for 28487@debbugs.gnu.org; Wed, 27 Sep 2017 15:46:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxIHQ-0007l8-JJ for 28487@debbugs.gnu.org; Wed, 27 Sep 2017 15:46:01 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxIHA-0007Rb-H9; Wed, 27 Sep 2017 15:45:44 -0400 Received: from vpn-0-27.aquilenet.fr ([2a01:474:4:27::]:45874 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dxIH9-0002qd-Pp; Wed, 27 Sep 2017 15:45:44 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Jan Nieuwenhuizen Subject: Re: [bug#28487] [PATCH] cuirass: Add gnu-system build spec. References: <20170917201157.9802-1-janneke@gnu.org> <20170917201157.9802-5-janneke@gnu.org> <87zi9h27q3.fsf@gnu.org> <87mv5hqr73.fsf@gnu.org> <87a81hgq5g.fsf@gnu.org> <87a81gq8dg.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 6 =?utf-8?Q?Vend=C3=A9miaire?= an 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 27 Sep 2017 21:45:39 +0200 In-Reply-To: <87a81gq8dg.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Wed, 27 Sep 2017 20:55:23 +0200") Message-ID: <87efqsexi4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28487 Cc: Mathieu Othacehe , 28487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi! Jan Nieuwenhuizen skribis: >>> +(define (symbol-alist-entry->keyword-alist-entry entry) >>> + (cons (symbol->keyword (car entry)) (cdr entry))) >> >> I *think* that=E2=80=99s correct, though we=E2=80=99ll need to double ch= eck. > > I tested today and there were minor problems. Cuirass actually doesn't > take an alist; instead takes a list that includes (#:job-name . "name"). > > Also, Cuirass performs an sexp-read and thus #< ...> needs to > get sexp'ified. > > Anyway, what I proposed was close and attached is a tested, working > version (that may need some work, see below). Oh good points, thanks for testing! BTW, there=E2=80=99s =E2=80=9Cmake hydra-jobs.scm=E2=80=9D, which I occasio= nally use to test gnu-system.scm (it spits a raw alist, which is enough to make sure that it works.) We could similarly add =E2=80=9Cmake cuirass-jobs.scm=E2=80=9D = eventually. >>> --- a/build-aux/hydra/gnu-system.scm >>> +++ b/build-aux/hydra/gnu-system.scm >>> @@ -270,6 +270,8 @@ valid." >>> (define subset >>> (match (assoc-ref arguments 'subset) >>> ("core" 'core) ; only build core pa= ckages >>> + ("hello" 'hello) ; only build hello >>> + (((? string?) (? string?) ...) 'list) ; only build selecte= d list of packages >>> (_ 'all))) ; build everything >> >> This part could be added separately. > > Yes...it could. Do you mean a separate patch, or ... Yes, separate patch for clarity: first patch does the Hydra/Cuirass split, second patch adds the ability to select a list of packages. Would that be OK? >> (It=E2=80=99s not usuable via Hydra since its UIs does not support passi= ng >> list-of-strings arguments.) > > ...I don't quite understand what you propose here. I appreciate that > I'm adding functionality for Cuirass to the hydra file where in itself > that does not make much sense... > > Otoh, I don't see how to move this functionality to > cuirass/gnu-system.scm only without duplicating much of `hydra-jobs'; so > that's probably not what you mean... / somewhat confused here. ;-) Never mind, it *was* confusing. :-) Last nitpicking: > +(define (entry->sexp-entry o) > + (match o > + (($ name uri comment) > + `((name . ,name) (uri . ,uri) (comment . ,comment))) > + (_ o))) [...] > --- a/guix/licenses.scm > +++ b/guix/licenses.scm > @@ -31,7 +31,8 @@ >=20=20 > (define-module (guix licenses) > #:use-module (srfi srfi-9) > - #:export (license? license-name license-uri license-comment > + #:export ( I prefer not to export record type descriptors in general, because that exposes too much of the internals and makes it harder to change the code afterwards. For instance, if we change the layout of , and if is exported, we have to carefully check all users and it=E2=80=99s easy to get it wrong. (There=E2=80=99s also the problem that exposing the = RTD makes records forgeable: we no longer control how objects are created, so we cannot make sure that objects we get are =E2=80=9Cgenuine.=E2=80=9D) Anyway, with this fixed, OK to push. After that we should update the config on berlin.guixsd.org to use this file directly. Thanks a lot! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 27 16:33:35 2017 Received: (at 28487) by debbugs.gnu.org; 27 Sep 2017 20:33:35 +0000 Received: from localhost ([127.0.0.1]:35458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxJ1P-0001bh-3E for submit@debbugs.gnu.org; Wed, 27 Sep 2017 16:33:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxJ1M-0001bT-Ki for 28487@debbugs.gnu.org; Wed, 27 Sep 2017 16:33:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxJ1G-0007m0-DK for 28487@debbugs.gnu.org; Wed, 27 Sep 2017 16:33:23 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_20,HDRS_LCASE, RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59974) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxJ0V-0007W7-0K; Wed, 27 Sep 2017 16:32:35 -0400 Received: from peder.onsbrabantnet.nl ([88.159.206.46]:54480 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dxJ0U-000290-Gg; Wed, 27 Sep 2017 16:32:34 -0400 From: Jan Nieuwenhuizen To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [bug#28487] [PATCH] cuirass: Add gnu-system build spec. References: <20170917201157.9802-1-janneke@gnu.org> <20170917201157.9802-5-janneke@gnu.org> <87zi9h27q3.fsf@gnu.org> <87mv5hqr73.fsf@gnu.org> <87a81hgq5g.fsf@gnu.org> <87a81gq8dg.fsf@gnu.org> <87efqsexi4.fsf@gnu.org> Date: Wed, 27 Sep 2017 22:32:32 +0200 In-Reply-To: <87efqsexi4.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 27 Sep 2017 21:45:39 +0200") Message-ID: <8760c3rifz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28487 Cc: Ricardo Wurmus , Mathieu Othacehe , 28487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Ludovic Court=C3=A8s writes: >> Anyway, what I proposed was close and attached is a tested, working >> version (that may need some work, see below). > > Oh good points, thanks for testing! np...as I'm using this myself it's nice if it works ;-) > BTW, there=E2=80=99s =E2=80=9Cmake hydra-jobs.scm=E2=80=9D, which I occas= ionally use to test > gnu-system.scm (it spits a raw alist, which is enough to make sure that > it works.) We could similarly add =E2=80=9Cmake cuirass-jobs.scm=E2=80= =9D eventually. ...looked into this briefly but this would mean adding some option to evaluate.scm, something like ;; Without further ado... (match (command-line) - ((command file) + ((command file cuirass? ...)) ... - (match ((module-ref %user-module 'hydra-jobs) store '()) + (match ((module-ref %user-module + (if (equal? cuirass? "cuirass") cuirass-jobs 'hydra-jobs) ? store '()) > Yes, separate patch for clarity: first patch does the Hydra/Cuirass > split, second patch adds the ability to select a list of packages. > > Would that be OK? Sure, done. >> + #:export ( > > I prefer not to export record type descriptors in general, because that > exposes too much of the internals Sure, I agree. Using license? and accessors now. As an aside: Interesting, I've been using GOOPS a lot with match and we have standardised on only matching class/record type, like so (match o (($ ) ...) so I was wondering why you didn't export . Now it makes sense: you simply cannot use record destructors if you don't export <..> in the first place. For GOOPS that's a bit different, you don't have class? for each . > Anyway, with this fixed, OK to push. Thanks, pushed with all this fixed to master as 516b53828e90018126b79e7600c= ae9aa531e06d7 > After that we should update the config on berlin.guixsd.org to use this > file directly. Ricardo: ping? > Thanks a lot! Thank you! Most welcome, janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 27 16:52:37 2017 Received: (at 28487) by debbugs.gnu.org; 27 Sep 2017 20:52:37 +0000 Received: from localhost ([127.0.0.1]:35471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxJJn-00024F-MB for submit@debbugs.gnu.org; Wed, 27 Sep 2017 16:52:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43397) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxJJl-000242-Js for 28487@debbugs.gnu.org; Wed, 27 Sep 2017 16:52:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxJJd-00020u-1i for 28487@debbugs.gnu.org; Wed, 27 Sep 2017 16:52:24 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxJJM-0001ws-G6; Wed, 27 Sep 2017 16:52:04 -0400 Received: from peder.onsbrabantnet.nl ([88.159.206.46]:54482 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dxJJM-0002n4-1c; Wed, 27 Sep 2017 16:52:04 -0400 From: Jan Nieuwenhuizen To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [bug#28487] [PATCH] cuirass: Add gnu-system build spec. Organization: AvatarAcademy.nl References: <20170917201157.9802-1-janneke@gnu.org> <20170917201157.9802-5-janneke@gnu.org> <87zi9h27q3.fsf@gnu.org> <87mv5hqr73.fsf@gnu.org> <87a81hgq5g.fsf@gnu.org> <87a81gq8dg.fsf@gnu.org> <87efqsexi4.fsf@gnu.org> <8760c3rifz.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Wed, 27 Sep 2017 22:52:01 +0200 In-Reply-To: <8760c3rifz.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Wed, 27 Sep 2017 22:32:32 +0200") Message-ID: <871smrrhji.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28487 Cc: 28487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Jan Nieuwenhuizen writes: > ...looked into this briefly but this would mean adding some option to > evaluate.scm, something like > > ;; Without further ado... > (match (command-line) > - ((command file) > + ((command file cuirass? ...)) > ... > - (match ((module-ref %user-module 'hydra-jobs) store '()) > + (match ((module-ref %user-module > + (if (equal? cuirass? "cuirass") cuirass-jobs 'hydra-jobs) > ? store '()) Hmm, that could work---actual working prototype attached :-) janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-cuirass-Add-cuirass-jobs.scm-target-to-compute-the-C.patch Content-Transfer-Encoding: quoted-printable >From 8c547d1d6a76dfb5e3b59f7fce404d0b60c6d929 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Wed, 27 Sep 2017 22:44:56 +0200 Subject: [PATCH] cuirass: Add 'cuirass-jobs.scm' target to compute the Cuir= ass jobs. * build-aux/hydra/evaluate.scm: Support "cuirass" command line option. * Makefile.am (cuirass-jobs.scm): New target. --- Makefile.am | 10 ++++++++++ build-aux/hydra/evaluate.scm | 13 +++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index a178d53cb..2c87e4fe3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,6 +7,7 @@ # Copyright =C2=A9 2017 Mathieu Othacehe # Copyright =C2=A9 2017 Leo Famulari # Copyright =C2=A9 2017 Ricardo Wurmus +# Copyright =C2=A9 2017 Jan Nieuwenhuizen # # This file is part of GNU Guix. # @@ -708,6 +709,15 @@ hydra-jobs.scm: $(GOBJECTS) "$(top_srcdir)/build-aux/hydra/gnu-system.scm" > "$@.tmp" $(AM_V_at)mv "$@.tmp" "$@" =20 +# Compute the Cuirass jobs and write them in the target file. +cuirass-jobs.scm: $(GOBJECTS) + $(AM_V_at)$(MKDIR_P) "`dirname "$@"`" + $(AM_V_GEN)$(top_builddir)/pre-inst-env "$(GUILE)" \ + "$(top_srcdir)/build-aux/hydra/evaluate.scm" \ + "$(top_srcdir)/build-aux/cuirass/gnu-system.scm" \ + cuirass > "$@.tmp" + $(AM_V_at)mv "$@.tmp" "$@" + .PHONY: gen-ChangeLog gen-AUTHORS gen-tarball-version .PHONY: assert-no-store-file-names assert-binaries-available .PHONY: assert-final-inputs-self-contained diff --git a/build-aux/hydra/evaluate.scm b/build-aux/hydra/evaluate.scm index cc6a4b949..604022abc 100644 --- a/build-aux/hydra/evaluate.scm +++ b/build-aux/hydra/evaluate.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2016, 2017 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2017 Jan Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -70,7 +71,7 @@ Otherwise return THING." ;; Without further ado... (match (command-line) - ((command file) + ((command file cuirass? ...) ;; Load FILE, a Scheme file that defines Hydra jobs. (let ((port (current-output-port))) (save-module-excursion @@ -96,7 +97,11 @@ Otherwise return THING." =20 ;; Call the entry point of FILE and print the resulting job sexp. (pretty-print - (match ((module-ref %user-module 'hydra-jobs) store '()) + (match ((module-ref %user-module + (if (equal? cuirass? "cuirass") + 'cuirass-jobs + 'hydra-jobs)) + store '()) (((names . thunks) ...) (map (lambda (job thunk) (format (current-error-port) "evaluating '~a'... " job) @@ -107,8 +112,8 @@ Otherwise return THING." names thunks))) port)))) ((command _ ...) - (format (current-error-port) "Usage: ~a FILE -Evaluate the Hydra jobs defined in FILE.~%" + (format (current-error-port) "Usage: ~a FILE [cuirass] +Evaluate the Hydra or Cuirass jobs defined in FILE.~%" command) (exit 1))) =20 --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 28 04:27:01 2017 Received: (at 28487) by debbugs.gnu.org; 28 Sep 2017 08:27:01 +0000 Received: from localhost ([127.0.0.1]:35893 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxU9t-0004ub-B5 for submit@debbugs.gnu.org; Thu, 28 Sep 2017 04:27:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55979) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxU9s-0004uP-3Y for 28487@debbugs.gnu.org; Thu, 28 Sep 2017 04:27:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxU9j-0003sl-Nr for 28487@debbugs.gnu.org; Thu, 28 Sep 2017 04:26:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39635) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxU9a-0003jg-Bj; Thu, 28 Sep 2017 04:26:42 -0400 Received: from [193.50.110.164] (port=42558 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dxU9Y-0006B3-Mx; Thu, 28 Sep 2017 04:26:41 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Jan Nieuwenhuizen Subject: Re: [bug#28487] [PATCH] cuirass: Add gnu-system build spec. References: <20170917201157.9802-1-janneke@gnu.org> <20170917201157.9802-5-janneke@gnu.org> <87zi9h27q3.fsf@gnu.org> <87mv5hqr73.fsf@gnu.org> <87a81hgq5g.fsf@gnu.org> <87a81gq8dg.fsf@gnu.org> <87efqsexi4.fsf@gnu.org> <8760c3rifz.fsf@gnu.org> <871smrrhji.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 7 =?utf-8?Q?Vend=C3=A9miaire?= an 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 28 Sep 2017 10:26:38 +0200 In-Reply-To: <871smrrhji.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Wed, 27 Sep 2017 22:52:01 +0200") Message-ID: <87vak3z0sh.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28487 Cc: 28487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Jan Nieuwenhuizen skribis: > From 8c547d1d6a76dfb5e3b59f7fce404d0b60c6d929 Mon Sep 17 00:00:00 2001 > From: Jan Nieuwenhuizen > Date: Wed, 27 Sep 2017 22:44:56 +0200 > Subject: [PATCH] cuirass: Add 'cuirass-jobs.scm' target to compute the Cu= irass > jobs. > > * build-aux/hydra/evaluate.scm: Support "cuirass" command line option. > * Makefile.am (cuirass-jobs.scm): New target. Perfect, go for it. Thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 28 04:28:36 2017 Received: (at 28487) by debbugs.gnu.org; 28 Sep 2017 08:28:37 +0000 Received: from localhost ([127.0.0.1]:35898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxUBQ-0004xB-OK for submit@debbugs.gnu.org; Thu, 28 Sep 2017 04:28:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxUBP-0004ww-TD for 28487@debbugs.gnu.org; Thu, 28 Sep 2017 04:28:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxUBH-0004uZ-30 for 28487@debbugs.gnu.org; Thu, 28 Sep 2017 04:28:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxUAs-0004bm-98; Thu, 28 Sep 2017 04:28:02 -0400 Received: from [193.50.110.164] (port=42578 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dxUAq-0006GN-I6; Thu, 28 Sep 2017 04:28:01 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Jan Nieuwenhuizen Subject: Re: [bug#28487] [PATCH] cuirass: Add gnu-system build spec. References: <20170917201157.9802-1-janneke@gnu.org> <20170917201157.9802-5-janneke@gnu.org> <87zi9h27q3.fsf@gnu.org> <87mv5hqr73.fsf@gnu.org> <87a81hgq5g.fsf@gnu.org> <87a81gq8dg.fsf@gnu.org> <87efqsexi4.fsf@gnu.org> <8760c3rifz.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 7 =?utf-8?Q?Vend=C3=A9miaire?= an 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 28 Sep 2017 10:27:58 +0200 In-Reply-To: <8760c3rifz.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Wed, 27 Sep 2017 22:32:32 +0200") Message-ID: <87r2urz0q9.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28487 Cc: Ricardo Wurmus , Mathieu Othacehe , 28487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Jan Nieuwenhuizen skribis: > As an aside: Interesting, I've been using GOOPS a lot with match and we h= ave > standardised on only matching class/record type, like so > > (match o > (($ ) ...) I would make it: (match o ((? license?) ...)) > so I was wondering why you didn't export . Now it makes sense: > you simply cannot use record destructors if you don't export <..> in the > first place. For GOOPS that's a bit different, you don't have class? > for each . Yes. I think the =E2=80=9Cspirit of GOOPS=E2=80=9D is that class objects a= re public. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 28 11:41:59 2017 Received: (at 28487-done) by debbugs.gnu.org; 28 Sep 2017 15:41:59 +0000 Received: from localhost ([127.0.0.1]:36931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxawp-0002Wp-5U for submit@debbugs.gnu.org; Thu, 28 Sep 2017 11:41:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxawn-0002Wa-3B for 28487-done@debbugs.gnu.org; Thu, 28 Sep 2017 11:41:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxawd-0002Rz-Tj for 28487-done@debbugs.gnu.org; Thu, 28 Sep 2017 11:41:52 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45384) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxawO-0002Le-5Z; Thu, 28 Sep 2017 11:41:32 -0400 Received: from peder.onsbrabantnet.nl ([88.159.206.46]:55100 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dxawN-0007zJ-MX; Thu, 28 Sep 2017 11:41:31 -0400 From: Jan Nieuwenhuizen To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [bug#28487] [PATCH] cuirass: Add gnu-system build spec. References: <20170917201157.9802-1-janneke@gnu.org> <20170917201157.9802-5-janneke@gnu.org> <87zi9h27q3.fsf@gnu.org> <87mv5hqr73.fsf@gnu.org> <87a81hgq5g.fsf@gnu.org> <87a81gq8dg.fsf@gnu.org> <87efqsexi4.fsf@gnu.org> <8760c3rifz.fsf@gnu.org> <871smrrhji.fsf@gnu.org> <87vak3z0sh.fsf@gnu.org> Date: Thu, 28 Sep 2017 17:41:28 +0200 In-Reply-To: <87vak3z0sh.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 28 Sep 2017 10:26:38 +0200") Message-ID: <87wp4iq193.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28487-done Cc: 28487-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Ludovic Court=C3=A8s writes: > Jan Nieuwenhuizen skribis: > >> From 8c547d1d6a76dfb5e3b59f7fce404d0b60c6d929 Mon Sep 17 00:00:00 2001 >> From: Jan Nieuwenhuizen >> Date: Wed, 27 Sep 2017 22:44:56 +0200 >> Subject: [PATCH] cuirass: Add 'cuirass-jobs.scm' target to compute the C= uirass >> jobs. >> >> * build-aux/hydra/evaluate.scm: Support "cuirass" command line option. >> * Makefile.am (cuirass-jobs.scm): New target. > > Perfect, go for it. Pushed to master as 454caca8e6db34d7777ddb4ba84680d41e381b32 Thanks! janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 28 12:05:13 2017 Received: (at 28487) by debbugs.gnu.org; 28 Sep 2017 16:05:13 +0000 Received: from localhost ([127.0.0.1]:36968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxbJI-0006rw-Rv for submit@debbugs.gnu.org; Thu, 28 Sep 2017 12:05:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxbJH-0006rk-Bn for 28487@debbugs.gnu.org; Thu, 28 Sep 2017 12:05:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxbJ6-0005a8-Gr for 28487@debbugs.gnu.org; Thu, 28 Sep 2017 12:05:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxbIa-0005BT-20; Thu, 28 Sep 2017 12:04:28 -0400 Received: from peder.onsbrabantnet.nl ([88.159.206.46]:55258 helo=dundal.peder.onsbrabantnet.nl) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dxbIZ-0003Za-NH; Thu, 28 Sep 2017 12:04:28 -0400 From: Jan Nieuwenhuizen To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [bug#28487] [PATCH] cuirass: Add gnu-system build spec. Organization: AvatarAcademy.nl References: <20170917201157.9802-1-janneke@gnu.org> <20170917201157.9802-5-janneke@gnu.org> <87zi9h27q3.fsf@gnu.org> <87mv5hqr73.fsf@gnu.org> <87a81hgq5g.fsf@gnu.org> <87a81gq8dg.fsf@gnu.org> <87efqsexi4.fsf@gnu.org> <8760c3rifz.fsf@gnu.org> <87r2urz0q9.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Thu, 28 Sep 2017 18:04:24 +0200 In-Reply-To: <87r2urz0q9.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 28 Sep 2017 10:27:58 +0200") Message-ID: <87shf6q06v.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28487 Cc: Ricardo Wurmus , Mathieu Othacehe , 28487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Ludovic Court=C3=A8s writes: >> (match o >> (($ ) ...) > > I would make it: > > (match o > ((? license?) > ...)) Oops, something like this was already pushed here: > Anyway, with this fixed, OK to push. Thanks, pushed with all this fixed to master as 516b53828e90018126b79e= 7600cae9aa531e06d7 Sure hope I didn't interpret the OK to push too lightly. Mentioned commit above is the second patch, the first is here http://git.savannah.gnu.org/cgit/guix.git/commit/?id=3D66bc1d2aaf74fc7e= b4ef9b3519c69bd37142ffb3 >> so I was wondering why you didn't export . Now it makes sense: >> you simply cannot use record destructors if you don't export <..> in the >> first place. For GOOPS that's a bit different, you don't have class? >> for each . > > Yes. I think the =E2=80=9Cspirit of GOOPS=E2=80=9D is that class objects= are public. Yeah...and then you have to be `careful'; not so nice come to think of it. Greetings, janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com From unknown Sat Sep 06 23:15:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 27 Oct 2017 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator