From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: git-fetch origin output is read-only - and reproducibility Date: Thu, 22 Aug 2019 23:41:59 +0200 Message-ID: <87tva8j2s8.fsf@gnu.org> References: <20190729165743.04e6a516@scratchpost.org> <87k1c07sdf.fsf@elephly.net> <87ftmo7reo.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:41271) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0uqI-0006P6-UM for guix-devel@gnu.org; Thu, 22 Aug 2019 17:42:03 -0400 In-Reply-To: (Robert Vollmert's message of "Tue, 30 Jul 2019 09:37:14 +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: Robert Vollmert Cc: guix-devel@gnu.org Hi, Robert Vollmert skribis: > On 29. Jul 2019, at 18:10, Ricardo Wurmus wrote: >> Most build systems inherit from the gnu-build-system, so they=E2=80=99ll= get to >> reuse the =E2=80=9Cunpack=E2=80=9D phase, which conveniently checks if t= he source is a >> tarball. In the case of Java archives it doesn=E2=80=99t do the right t= hing, >> because it doesn=E2=80=99t know about Jars, so the ant-build-system over= rides >> that phase, etc. >>=20 >> Dealing with sources sometimes requires special knowledge and the build >> system might be best equipped to employ that knowledge. >>=20 >> What would you suggest the fetchers implement to guarantee that the >> sources will always be of some expected form? > > I would suggest that they specify the archive type, and either > > - repack the archive to a standard format, e.g. .tar.gz (this should then= also > apply to sources that are local directory trees) > - unpack the archive to a directory tree Note that =E2=80=98git-fetch=E2=80=99 & co. currently produced fixed-output= derivations. If =E2=80=98git-fetch=E2=80=99 were to systematically repack to a tarball, = we=E2=80=99d introduce a dependency on tar + some compressor, which is not always desirable. > An alternative change that would make the whole setup a bit less confusing > would be to factor all the =E2=80=9Cstandard=E2=80=9D build system stuff = out of gnu-build-system > and into a base-build-system that provides source unpacking and phase han= dling > and nothing else. I agree that this would be an improvement. Ludo=E2=80=99.