From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: [PATCH] Create INDEX.LIST; Was: Fix references in jar manifests Date: Sun, 25 Mar 2018 12:19:18 +0200 Message-ID: <20180325121918.4243938c@scratchpost.org> References: <87zi3qfwfi.fsf@gnu.org> <20180320112855.33d86b6f@scratchpost.org> <6b4b40b375cc973d19a4ccfa14d011e1@lepiller.eu> <20180320131418.70989741@scratchpost.org> <20180321220731.4cfc7ea7@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/TLl2_0mL3w73xwF/wzW8iqT"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f02kM-0005Iv-MQ for guix-devel@gnu.org; Sun, 25 Mar 2018 06:19:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f02kJ-0006ZS-Hl for guix-devel@gnu.org; Sun, 25 Mar 2018 06:19:30 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:56482) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f02kJ-0006YX-9T for guix-devel@gnu.org; Sun, 25 Mar 2018 06:19:27 -0400 Received: from localhost (77.118.213.79.wireless.dyn.drei.com [77.118.213.79]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 529143360860 for ; Sun, 25 Mar 2018 12:19:25 +0200 (CEST) In-Reply-To: <20180321220731.4cfc7ea7@scratchpost.org> 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" Cc: guix-devel@gnu.org --Sig_/TLl2_0mL3w73xwF/wzW8iqT Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-system.= scm index 6ce813a00..d09062625 100644 --- a/guix/build/ant-build-system.scm +++ b/guix/build/ant-build-system.scm @@ -172,6 +172,18 @@ to the default GNU unpack strategy." #:allow-other-keys) (zero? (apply system* `("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 +and is preferred over \"META-INF/MAINFEST.MF\", which does use word wraps, +by Java when resolving dependencies. So we make sure to create it so that +grafting works." + (define (generate-index jar) + (invoke "jar" "-i" jar)) + (every (match-lambda + ((output . directory) + (every generate-index (find-files directory "\\.jar$")))) + outputs)) + (define* (strip-jar-timestamps #:key outputs #:allow-other-keys) "Unpack all jar archives, reset the timestamp of all contained files, and @@ -232,7 +244,9 @@ repack them. This is necessary to ensure that archives= are reproducible." (replace 'build build) (replace 'check check) (replace 'install install) - (add-after 'install 'strip-jar-timestamps strip-jar-timestamps))) + (add-after 'install 'generate-jar-indices generate-jar-indices) + (add-after 'generate-jar-indices 'strip-jar-timestamps + strip-jar-timestamps))) =20 (define* (ant-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) --Sig_/TLl2_0mL3w73xwF/wzW8iqT Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlq3d6YACgkQ5xo1VCww uqUx3wgAjiCISTGR6SIvPUyZac0YPxcO9p/Afhk3GRNDnLw6kda/tDhWYii8F/rb CggO6cd8rm5EbKEbNWd3ruqNaPb+e2SjPJWSAELnS6BetA3Gv3bK+Y6hoaxE2SMh W0GjRpnP5YY5IkmeycHP8ENtFBPASGKUtYInUbxAyCOYDfyNulH0Lsy1qnganurT W1XZw3LRg0U8/E1mjc1E/zuM5RZ3GVEmqOuQH5Wb9+olwp50Yyh40+FjHmQly3Rr Ce8ko1HdpMRpbAlzs2xMDSOnv9lLmUIl5LzKF+3R6ILOAMwoE1kCyoAwT3ee6aTW NXCktWwneXVMQG+CJDiqNTec0UViEg== =gQcG -----END PGP SIGNATURE----- --Sig_/TLl2_0mL3w73xwF/wzW8iqT--