From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <guix-patches-bounces+larch=yhetil.org@gnu.org>
Received: from mp2 ([2001:41d0:8:6d80::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms0.migadu.com with LMTPS
	id aLEZGJdC7mBspAAAgWs5BA
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Wed, 14 Jul 2021 03:49:11 +0200
Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp2 with LMTPS
	id GJ/VE5dC7mBlJgAAB5/wlQ
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Wed, 14 Jul 2021 01:49:11 +0000
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by aspmx1.migadu.com (Postfix) with ESMTPS id BF79795EF
	for <larch@yhetil.org>; Wed, 14 Jul 2021 03:49:10 +0200 (CEST)
Received: from localhost ([::1]:53330 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	id 1m3U1N-0000GD-Md
	for larch@yhetil.org; Tue, 13 Jul 2021 21:49:09 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:34900)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1m3U1G-0000G0-Q4
 for guix-patches@gnu.org; Tue, 13 Jul 2021 21:49:02 -0400
Received: from debbugs.gnu.org ([209.51.188.43]:59160)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1m3U1G-0004fD-Ij
 for guix-patches@gnu.org; Tue, 13 Jul 2021 21:49:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1m3U1G-0005j3-FC
 for guix-patches@gnu.org; Tue, 13 Jul 2021 21:49:02 -0400
X-Loop: help-debbugs@gnu.org
Subject: [bug#48443] [PATCH 1/2] gnu: Add texlive-libkpathsea.
Resent-From: Thiago Jung Bauermann <bauermann@kolabnow.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: guix-patches@gnu.org
Resent-Date: Wed, 14 Jul 2021 01:49:02 +0000
Resent-Message-ID: <handler.48443.B48443.162622733822000@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 48443
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Leo Prikler <leo.prikler@student.tugraz.at>
Cc: 48443@debbugs.gnu.org
Received: via spool by 48443-submit@debbugs.gnu.org id=B48443.162622733822000
 (code B ref 48443); Wed, 14 Jul 2021 01:49:02 +0000
Received: (at 48443) by debbugs.gnu.org; 14 Jul 2021 01:48:58 +0000
Received: from localhost ([127.0.0.1]:42473 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1m3U1C-0005il-7s
 for submit@debbugs.gnu.org; Tue, 13 Jul 2021 21:48:58 -0400
Received: from mx.kolabnow.com ([95.128.36.42]:38768)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bauermann@kolabnow.com>) id 1m3U16-0005iU-G3
 for 48443@debbugs.gnu.org; Tue, 13 Jul 2021 21:48:56 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out002.mykolab.com (Postfix) with ESMTP id B5BFE9FF;
 Wed, 14 Jul 2021 03:48:45 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h=
 content-type:content-type:content-transfer-encoding:mime-version
 :references:in-reply-to:message-id:date:date:subject:subject
 :from:from:received:received:received; s=dkim20160331; t=
 1626227325; x=1628041726; bh=tQhQpQWK6VnQFGS3Ita9K9QUGvGCZLuY3Al
 I1MTl2cM=; b=29U69xcYvgrfHcGg+rSyiO4Zj9eHj7y+aVFE3VEaEvKRR/E4ORz
 jy9luAbI2JBd6OeqkLMHsy8rywXkwPgzy2bng6EOUvaFsymyWoXkN8AwdF/JYJg1
 0BpEPNmGHukVA3rjiyh+6wK+mWjUhxq6PmTV6FEbUSbgWQSzBTZBPYpkUxbraaUi
 fVQ0yPaD2g7Hc4PV1yAOoNI+T1OvB5z7FAD6+ZWAgkzpW8PzLyLIkDr79eS1VvHM
 KQNbQiWByjOSvVMuSZC+NQYf38cUVNMY7t6qIH10x9pe0AVJMhBo63BJ8f0g56al
 9Qx8cWTTD7McU0X3eibttCL0rsGti7xvPXmhR3ofUBIZPewHjOdadbW4an5i//OF
 uHfWAdWXZU+u/0j/ASh7i39owhSyYJn0qEwoj08cCJJiPZvwNZ6aDoIk/TpZN7to
 gkS7VGUTvO5fSjSj8YJV4Kgw+iWXXEZCsoHwUhhRsAedbupEwifadzcZR2AXTXDP
 Es5qSh3txZ0Phn2CLzspCu/jdiJZoO+d55mYS0j82I6n3fd2D79Tah5eBH2mE7Qc
 S87bceRii2G6Ct6cXmCJLH0zRUC40VhFpWXAXXnamHLtlCo669iWYXdoh+lenGDa
 7YMDpRaLSXKjKjiwQaalKiOwnby75IMmixAlTufPj/kXDXpC4WhcZzjE=
X-Virus-Scanned: amavisd-new at mykolab.com
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 8f_orkfEB8QR; Wed, 14 Jul 2021 03:48:45 +0200 (CEST)
Received: from int-mx003.mykolab.com (unknown [10.9.13.3])
 by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id ED4A27FC;
 Wed, 14 Jul 2021 03:48:44 +0200 (CEST)
Received: from ext-subm001.mykolab.com (unknown [10.9.6.1])
 by int-mx003.mykolab.com (Postfix) with ESMTPS id DFEC73A7D;
 Wed, 14 Jul 2021 03:48:43 +0200 (CEST)
Date: Tue, 13 Jul 2021 22:48:37 -0300
Message-ID: <2781292.7Eo9FbQQbZ@popigai>
In-Reply-To: <a612b229a3d608833fd735b3a0835776642779cd.camel@student.tugraz.at>
References: <cd5aec2d967863cd640ae493b2c3f9cae0248b4d.camel@student.tugraz.at>
 <7264704.8eCzXKmJsZ@popigai>
 <a612b229a3d608833fd735b3a0835776642779cd.camel@student.tugraz.at>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: guix-patches@gnu.org
List-Id: <guix-patches.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guix-patches>
List-Post: <mailto:guix-patches@gnu.org>
List-Help: <mailto:guix-patches-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=subscribe>
Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org
Sender: "Guix-patches" <guix-patches-bounces+larch=yhetil.org@gnu.org>
Reply-to:  Thiago Jung Bauermann <bauermann@kolabnow.com>
X-ACL-Warn: ,  Thiago Jung Bauermann via Guix-patches <guix-patches@gnu.org>
From:  Thiago Jung Bauermann via Guix-patches via <guix-patches@gnu.org>
X-Migadu-Flow: FLOW_IN
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1626227351;
	h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:cc:mime-version:mime-version:
	 content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:resent-cc:
	 resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to:
	 references:references:list-id:list-help:list-unsubscribe:
	 list-subscribe:list-post:dkim-signature;
	bh=tQhQpQWK6VnQFGS3Ita9K9QUGvGCZLuY3AlI1MTl2cM=;
	b=CGiWumoZ04TtPeTlCWx/kitj32nDPB710Uaf9SjWzvH1nVElR0+6+1k1PfaUTo+eN8vfhd
	KQLSXDPYKTOTausjzGK3MfukhCmJRpm4uIZtxGvyqxH/XqbQCgFBz/PpkBdhy7j+mpSSnT
	TJU57VYHtX7lfXxhrxe9Ndl/Re1XD77LUmAQoPYUt4k6RusQCfpMWj0VX7NFB8HXPC0uwS
	W+wLeoEbro/LCFptlmFdF2GQQWrEzLJfX0Vnj4o+NBlal0sjZD54dNfTjz2cQeCsrubVmk
	Wp+JgMWjjrDMvAoBM4r0zd0WyQ7P8FIsoI3TERGcuCbcNNPZDNFNUgZ2Iw1rIA==
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626227351; a=rsa-sha256; cv=none;
	b=BiOGYmD4qx75ZLHngMx67GgnR+6BL+RiMSuy8v5So8X0OZ6EZwjo5DpIyxcJey0VOtJDX8
	K4m85ml2ICgICRGCsTU9drwFpi7wy3jy7SqJc5cQ9+vIUYwTS6NWDYNlSx+Mx6OSn6iArS
	6vfytxzxkyYOTBOqNab6IrjDaEe0UjNDMLqvOiUUJwhoku+C88SqiiSsodRC5avKS/0L8h
	55BK9uoql9EfxTrCWGjGsdSoUEaAGpt9Uk4HKHi4sNnsDEy44i64lNRbWryAsQrNR+CGCZ
	kxDkAmUA0xeGMVXCSjYclpNXWTEdg8foA75j/1TX98YuC9XdRyEGfHHChddZcQ==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=29U69xcY;
	dmarc=pass (policy=none) header.from=gnu.org;
	spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org
X-Migadu-Spam-Score: -2.40
Authentication-Results: aspmx1.migadu.com;
	dkim=fail ("headers rsa verify failed") header.d=kolabnow.com header.s=dkim20160331 header.b=29U69xcY;
	dmarc=pass (policy=none) header.from=gnu.org;
	spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org
X-Migadu-Queue-Id: BF79795EF
X-Spam-Score: -2.40
X-Migadu-Scanner: scn0.migadu.com
X-TUID: FOKzoVGPXgzm

Hi Leo,

Thank you for your response and your new version of the patches.

Em ter=C3=A7a-feira, 13 de julho de 2021, =C3=A0s 04:58:22 -03, Leo Prikler=
 escreveu:
> Hello Thiago,
>=20
> Am Montag, den 12.07.2021, 21:32 -0300 schrieb Thiago Jung Bauermann:
> > [...]
> >=20
> > > +(define-public texlive-libkpathsea
> > > +  (package/inherit texlive-bin
> >=20
> > According to a recent message from Ludo=C2=B9, =E2=80=98package/inherit=
=E2=80=99 is meant
> > to be
> >=20
> > used in specific situations, and IIUC it doesn=E2=80=99t apply here:
> > > It should also be (package (inherit =E2=80=A6) =E2=80=A6) rather than
> > > (package/inherit =E2=80=A6).  The latter is only useful when defining
> > > variants of a package (same version, same code) where the same
> > > security updates would apply.
>=20
> I'm a little confused here, as that is exactly the rationale I'm
> applying.  When texlive-bin gets grafted due to kpathsea, the graft
> also applies to texlive-libkpathsea.  Granted, there is a large room
> for false positives, that would result in gratuitous grafts for
> texlive-libkpathsea, but I prefer erring on the side of security rather
> than graftlessness here.

My reasoning was that libkpathsea is just a small part of texlive-bin, so=20
in principle a minority of texlive-bin security updates would apply to it.=
=20
But you are right, there may well be some which would apply.

> > I also wonder whether inheriting from texlive-bin is the best option.
> > One disadvantage is that it makes this package too sensitive to
> > changes in texlive-bin. As an example, it doesn=E2=80=99t work anymore =
with
> > the version in core-updates because in the branch, the =E2=80=98postint=
=E2=80=99
> > phase has been renamed to =E2=80=98post-install=E2=80=99. Also, I assum=
e many
> > texlive-bin inputs aren=E2=80=99t needed for texlive-kpathsea, causing
> > unnecessary work when building texlive-libkpathsea and packages
> > depending on it such as evince.
>=20
> The postinst thing was my mistake =E2=80=93 instead of inheriting from
> %standard-phases as I should, I na=C3=AFvely inherited texlive-bin's phas=
es
> instead.  It turns out, I actually don't need any of those (and if I
> did they'd be trivially copyable).

That is nice solution.

> On the part of inputs, sure, we could make libkpathsea smaller, but I
> have little experience with TeX Live and its build system, so I decided
> not to change its inputs for now.  If you have suggestions on how a
> better closure could be achieved, please do bring them forth.

I was able to build the package with an empty input list. I compared a=20
texlive-libkpathsea built with your unchanged patches and one with the=20
empty input list and they are identical, except for the hash of the
/gnu/store directory. Even the binary files, which I compared using=20
hexdump. So my suggestion is to use an empty input list. :-)

> > In addition, if it were a separate package then texlive-bin could be
> > made to use it, rather than shipping its own copy.
>=20
> Perhaps that's an idea worth entertaining, but given the TeX Live build
> system I fear it's not an overwhelmingly practical one.

I can look into that separately, after your patches go in.

> > > +    (name "texlive-libkpathsea")
> > > +    (source
> > > +     (origin
> > > +       (inherit (package-source texlive-bin))
> >=20
> > Perhaps a =E2=80=98texlive-source-src=E2=80=99 variable analogous to =
=E2=80=98texlive-extra-
> > src=E2=80=99 and =E2=80=98texlive-texmf-src=E2=80=99 would be useful?
>=20
> I'm=E2=80=A6 not too sure on this one.  What would texlive-source-src cap=
ture?
> Just the upstream source?  Then we'd have to carefully apply all the
> fitting patches.  The same as (package-source texlive-bin)?  What's the
> point then?

Yes, the point would be just to not duplicate the origin information. There=
=20
would indeed be more work sorting out which security updates apply.

> > > +       (snippet
> > > +        `(begin
> > > +           ,(origin-snippet (package-source texlive-bin))
> > > +           (with-directory-excursion "texk"
> > > +             (let ((preserved-directories '("." ".." "kpathsea")))
> > > +               (for-each
> > > +                delete-file-recursively
> > > +                (scandir "."
> > > +                         (lambda (file)
> > > +                           (and (not (member file
> > > preserved-directories)) +                                (eq?
> > > 'directory
> > > (stat:type (stat file))))))))))))) +    (arguments
> > > +     (substitute-keyword-arguments (package-arguments texlive-bin)
> > > +       ((#:configure-flags flags)
> > > +        `(cons* "--disable-all-pkgs" "--enable-kpathsea"
> > > +                "--enable-shared" ,flags))
> > > +       ((#:phases phases)
> > > +        `(modify-phases ,phases
> > > +           (delete 'configure-ghostscript-executable)
> > > +           (delete 'use-code-for-new-poppler)
> > > +           (delete 'patch-dvisvgm-build-files)
> > > +           (delete 'disable-failing-test)
> > > +           (replace 'postint
> > > +             (lambda* (#:key inputs outputs #:allow-other-keys)
> > > +               (with-directory-excursion "texk/kpathsea"
> > > +                 (invoke "make" "install"))))))))))
> >=20
> > If you decide to continue inheriting from texlive-bin, you=E2=80=99d al=
so
> > need to change the synopsis and description.
>=20
> Fair enough, that's on me.  I've sent a v2 applying some of your
> suggestions.  Please feel free to point out anything I've missed or you
> noticed in addition to what's already discussed.

Thanks!

=2D-=20
Thanks,
Thiago