From mboxrd@z Thu Jan 1 00:00:00 1970 From: julien lepiller Subject: Re: broken references in jar manifests Date: Tue, 20 Mar 2018 11:50:51 +0100 Message-ID: <6b4b40b375cc973d19a4ccfa14d011e1@lepiller.eu> References: <87zi3qfwfi.fsf@gnu.org> <20180320112855.33d86b6f@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eyEr7-0005cD-Br for guix-devel@gnu.org; Tue, 20 Mar 2018 06:51:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eyEr4-00071v-7S for guix-devel@gnu.org; Tue, 20 Mar 2018 06:51:01 -0400 Received: from lepiller.eu ([89.234.186.109]:43714) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eyEr3-00070R-UT for guix-devel@gnu.org; Tue, 20 Mar 2018 06:50:58 -0400 Received: from webmail.lepiller.eu (static-176-182-42-79.ncc.abo.bbox.fr [176.182.42.79]) by lepiller.eu (OpenSMTPD) with ESMTPSA id 4a9bce85 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for ; Tue, 20 Mar 2018 10:53:13 +0000 (UTC) In-Reply-To: <20180320112855.33d86b6f@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" To: guix-devel@gnu.org Le 2018-03-20 11:28, Danny Milosavljevic a écrit : > (1) How about adding another file to the META-INF directory which is > just > like manifest - just without the line breaks? > > That could even be automated. > > (2) Also, "jar -i" calculates an index for where which package is > ("INDEX.LIST"). > Is that also hard-word-wrapped? The specification > https://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#JAR%20Index > only mentions the 72 Byte limit for "manifest and signature files" and > then specifies > Index File Specification separately. > > Either would be good enough for the GC retaining the deps, right? The issue is with grafts here: the plain file with full reference to the store gets grafted and contains the new entry. The Manifest will not be updated because of line breaks, and Java will still look for the version in the manifest. The GC will collect it because it doesn't see any reference to the old version in any file (because of line breaks), and the package is broken.