From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: broken references in jar manifests Date: Fri, 02 Mar 2018 14:18:09 +0100 Message-ID: <87zi3qfwfi.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erkZl-0005zJ-Lh for guix-devel@gnu.org; Fri, 02 Mar 2018 08:18:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erkZh-0004ht-Mn for guix-devel@gnu.org; Fri, 02 Mar 2018 08:18:17 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:53360) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1erkZh-0004hL-Ep for guix-devel@gnu.org; Fri, 02 Mar 2018 08:18:13 -0500 In-Reply-To: (Ricardo Wurmus's message of "Thu, 1 Mar 2018 18:11:59 +0100") 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: Ricardo Wurmus Cc: guix-devel@gnu.org Heya, Ricardo Wurmus skribis: > Manifest-Version: 1.0 > Class-Path: /gnu/store/i28vi94r8z9f0x02zgkrv87w16ibmqkw-java-htsjdk-2. > 10.1/share/java/htsjdk.jar > Created-By: 1.8.0_151 (Oracle Corporation) > Main-Class: picard.cmdline.PicardCommandLine > > Note that the Class-Path property is broken into two lines. This means > that the reference scanner will miss it and grafting will fail. > > Breaking up lines longer than 70 characters is according to the manifest > specification, see > https://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html What would happen if we modified the tool that generates these to no break lines? Buffer overflow in the class loader? > 1) we need to patch the JDK > 2) the jars would not do the right thing when executed with a different > JDK (e.g. on a foreign distro). Does #2 really matter? Those jars won=E2=80=99t work on non-Guix systems a= nyway precisely because they contain references to the store. > An alternative to recording full references in the manifest file is to > install a =E2=80=9Clib=E2=80=9D directory that contains symlinks to depen= dencies. The > manifest can then contain relative paths to these symlinks. Very smart and easy to do, no? To my untrained eye, this looks like the winning option here. :-) Thanks, Ludo=E2=80=99.