From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: [PATCH] Create INDEX.LIST; Was: Fix references in jar manifests Date: Mon, 02 Apr 2018 00:12:42 +0200 Message-ID: <87lge6y3s5.fsf@gmail.com> References: <87zi3qfwfi.fsf@gnu.org> <20180320112855.33d86b6f@scratchpost.org> <6b4b40b375cc973d19a4ccfa14d011e1@lepiller.eu> <20180320131418.70989741@scratchpost.org> <20180321220731.4cfc7ea7@scratchpost.org> <20180325121918.4243938c@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2lDa-0004Fu-KN for guix-devel@gnu.org; Sun, 01 Apr 2018 18:12:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f2lDV-0007Tb-IS for guix-devel@gnu.org; Sun, 01 Apr 2018 18:12:54 -0400 Received: from mail-pf0-x233.google.com ([2607:f8b0:400e:c00::233]:33942) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f2lDV-0007TI-BY for guix-devel@gnu.org; Sun, 01 Apr 2018 18:12:49 -0400 Received: by mail-pf0-x233.google.com with SMTP id q9so8289169pff.1 for ; Sun, 01 Apr 2018 15:12:49 -0700 (PDT) In-Reply-To: <20180325121918.4243938c@scratchpost.org> (Danny Milosavljevic's message of "Sun, 25 Mar 2018 12:19:18 +0200") 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: Danny Milosavljevic Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Danny, Thank you for writing a patch! It looks good to me. We will need to apply this to the core-updates branch, right? I think that changes to the ant-build-system will cause all packages that use it to be rebuilt. Danny Milosavljevic writes: > +(define* (generate-jar-indices #:key outputs #:allow-other-keys) > + "Generate file \"META-INF/INDEX.LIST\". This file does not use word w= raps > +and is preferred over \"META-INF/MAINFEST.MF\", which does use word wrap= s, > +by Java when resolving dependencies. So we make sure to create it so th= at > +grafting works." Is that the only reason? My understanding is that we want to generate the JAR indices not only (1) to ensure that grafting will work properly, but also (2) to ensure that the reference scanner will find all the store paths produced in the output JAR. Goal (2) is important because if a store path is used at run-time by the installed software, but the path is treated as "dead" by the garbage collector, then the path may be removed during garbage collection, which would break the software. If you agree, then could you update the docstring with a little more info? > + (define (generate-index jar) > + (invoke "jar" "-i" jar)) > + (every (match-lambda > + ((output . directory) > + (every generate-index (find-files directory "\\.jar$")))) > + outputs)) Does the jar program find the classes here via the CLASSPATH environment variable, which was set earlier during the configure phase by the generate-classpath procedure? =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlrBWVoACgkQ3UCaFdgi Rp2TIxAAnRYX/EPPBFvCA+FK/cu+1vt84aLh4bWdcOnFN1MJ6kY3gv5NcifVrxgD EI3eRUHeMZNsoI+vhqD/N1YpjoNiAIEDNhRkVaMVbyDyh1oNwbQRRyE6/UJ5B5HR R5vDyFLCBlO8idvlxfQ8J9pZLpSObqcVtgMm15iZUDXDPhGuHnmtUdVc4YuUYr8e qM5CDtb+Vyp7g7x01aAh87QVkU1sU9ElcqpCZB52N3oXBprAQWwXhmjEa7brYMs/ A4sc5DB4aHsR317MY9yvNR/8x/t64lvXg+K/o0KEnYRoj3g2y+f5JF83Sdi/u7Wy 134Wnd4RSGT+6iuLohrZT34mDPWwKErsBiZ/DmYdryg1rgn0sTAzIRFIfPG5iMl1 hkiwkVw/I6mgNDkc3qxqdhY1lx2o4E0eUGLIp6/BPSLOiLBdgHpghpV4QdwL25sl 2+UPyBaIZc/fXUeOzFWZoEVfAof1VwrqwaMyD5IqSP9xhgz5JSjAMdu9quftoLzz g6ryfSDOm5hqyr1nwPQb0SA94XtskIz+7dTRHd/LkqwfpxmU2xHPa+MLBCM009Sg d17DWP6Q9D5f7zz9IPUz0u58/WfcGjye8IVI8o3KRmRZY5dSc3dUzGU95N9P27gu y979mM82ZY3XCEWtlFMGQVzztH7ySGw7RTMNBbpJN1Gq+3aZEeM= =XFTL -----END PGP SIGNATURE----- --=-=-=--