From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Restarting 'staging' Date: Sat, 16 Jun 2018 12:24:40 +0200 Message-ID: <87lgbf58rb.fsf@elephly.net> References: <87zhzzqyys.fsf@fastmail.com> <877en0uvz7.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fU8d7-00011b-Sn for guix-devel@gnu.org; Sat, 16 Jun 2018 06:40:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fU8d4-0000zB-Nq for guix-devel@gnu.org; Sat, 16 Jun 2018 06:40:25 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21111) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fU8d3-0000tU-V9 for guix-devel@gnu.org; Sat, 16 Jun 2018 06:40:22 -0400 In-reply-to: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?utf-8?Q?G=C3=A1bor?= Boskovits Cc: Guix-devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi G=C3=A1bor, > Ricardo Wurmus ezt =C3=ADrta (id=C5=91pont: 2018. j= =C3=BAn. 15., P > 21:20): > >> >> Hi Marius, >> >> > Now that 'core-updates' is merged, it's time to get 'staging' rolling >> > again. We have lots of minor updates this round, mostly on the >> > graphical side. Is there anything we're missing that's eligible (<1200 >> > rebuilds)? >> >> The ant-build-system needs to be modified to raise an exception on test >> failures. Currently it uses the old (zero? (system* =E2=80=A6)) idiom, = which >> causes failing tests to be ignored. >> >> This will cause all Java packages and packages depending on them to be >> rebuilt. [=E2=80=A6] > > I intend to have a look at that. I've already figured out how to modify t= he > timestamps phase, the rest should be similar. I'm under the impression > however that this could be done on master. All java is around 160 package= s. I have just made these changes to the ant-build-system (see attached patch). Can you combine this with your changes and push them to =E2=80=9Cstaging=E2=80=9D? It is true that all of Java in Guix is only about 160 packages, but this affects the three JDK packages, which take a long time to build. It also re-enables tests for packages whose test failures were previously ignored by accident. So I expect some minor breakage, which I would like to leave out of master. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-build-system-ant-Unconditionally-return-t-in-build-p.patch Content-Transfer-Encoding: quoted-printable >From 781768e88f2c90cfccce20d484225e71e019d456 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 16 Jun 2018 12:20:32 +0200 Subject: [PATCH] build-system/ant: Unconditionally return #t in build phase= s. * guix/build/ant-build-system.scm (unpack, build, strip-jar-timestamps, che= ck, install): Use invoke. --- guix/build/ant-build-system.scm | 76 ++++++++++++++++----------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-system.= scm index d081a2b31..3ed12b9f4 100644 --- a/guix/build/ant-build-system.scm +++ b/guix/build/ant-build-system.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright =C2=A9 2016 Ricardo Wurmus +;;; Copyright =C2=A9 2016, 2018 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -150,7 +150,8 @@ to the default GNU unpack strategy." (begin (mkdir "src") (with-directory-excursion "src" - (zero? (system* "jar" "-xf" source)))) + (invoke "jar" "-xf" source)) + #t) ;; Use GNU unpack strategy for things that aren't jar archives. ((assq-ref gnu:%standard-phases 'unpack) #:source source))) =20 @@ -171,7 +172,7 @@ to the default GNU unpack strategy." =20 (define* (build #:key (make-flags '()) (build-target "jar") #:allow-other-keys) - (zero? (apply system* `("ant" ,build-target ,@make-flags)))) + (apply invoke `("ant" ,build-target ,@make-flags))) =20 (define* (generate-jar-indices #:key outputs #:allow-other-keys) "Generate file \"META-INF/INDEX.LIST\". This file does not use word wra= ps @@ -194,50 +195,49 @@ repack them. This is necessary to ensure that archiv= es are reproducible." (format #t "repacking ~a\n" jar) (let* ((dir (mkdtemp! "jar-contents.XXXXXX")) (manifest (string-append dir "/META-INF/MANIFEST.MF"))) - (and (with-directory-excursion dir - (zero? (system* "jar" "xf" jar))) - (delete-file jar) - ;; XXX: copied from (gnu build install) - (for-each (lambda (file) - (let ((s (lstat file))) - (unless (eq? (stat:type s) 'symlink) - (utime file 0 0 0 0)))) - (find-files dir #:directories? #t)) + (with-directory-excursion dir + (invoke "jar" "xf" jar)) + (delete-file jar) + ;; XXX: copied from (gnu build install) + (for-each (lambda (file) + (let ((s (lstat file))) + (unless (eq? (stat:type s) 'symlink) + (utime file 0 0 0 0)))) + (find-files dir #:directories? #t)) =20 - ;; The jar tool will always set the timestamp on the manifest f= ile - ;; and the containing directory to the current time, even when = we - ;; reuse an existing manifest file. To avoid this we use "zip" - ;; instead of "jar". It is important that the manifest appears - ;; first. - (with-directory-excursion dir - (let* ((files (find-files "." ".*" #:directories? #t)) - ;; To ensure that the reference scanner can detect all - ;; store references in the jars we disable compression - ;; with the "-0" option. - (command (if (file-exists? manifest) - `("zip" "-0" "-X" ,jar ,manifest ,@files) - `("zip" "-0" "-X" ,jar ,@files)))) - (unless (zero? (apply system* command)) - (error "'zip' failed")))) - (utime jar 0 0) - #t))) + ;; The jar tool will always set the timestamp on the manifest file + ;; and the containing directory to the current time, even when we + ;; reuse an existing manifest file. To avoid this we use "zip" + ;; instead of "jar". It is important that the manifest appears + ;; first. + (with-directory-excursion dir + (let* ((files (find-files "." ".*" #:directories? #t)) + ;; To ensure that the reference scanner can detect all + ;; store references in the jars we disable compression + ;; with the "-0" option. + (command (if (file-exists? manifest) + `("zip" "-0" "-X" ,jar ,manifest ,@files) + `("zip" "-0" "-X" ,jar ,@files)))) + (apply invoke command))) + (utime jar 0 0) + #t)) =20 - (every (match-lambda - ((output . directory) - (every repack-archive (find-files directory "\\.jar$")))) - outputs)) + (for-each (match-lambda + ((output . directory) + (for-each repack-archive (find-files directory "\\.jar$")))) + outputs) + #t) =20 (define* (check #:key target (make-flags '()) (tests? (not target)) (test-target "check") #:allow-other-keys) (if tests? - (zero? (apply system* `("ant" ,test-target ,@make-flags))) - (begin - (format #t "test suite not run~%") - #t))) + (apply invoke `("ant" ,test-target ,@make-flags)) + (format #t "test suite not run~%")) + #t) =20 (define* (install #:key (make-flags '()) #:allow-other-keys) - (zero? (apply system* `("ant" "install" ,@make-flags)))) + (apply invoke `("ant" "install" ,@make-flags))) =20 (define %standard-phases (modify-phases gnu:%standard-phases --=20 2.17.1 --=-=-= Content-Type: text/plain -- Ricardo --=-=-=--