From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yAstBNNH7WBfMQAAgWs5BA (envelope-from ) for ; Tue, 13 Jul 2021 09:59:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id qJh0O9JH7WAaOQAA1q6Kng (envelope-from ) for ; Tue, 13 Jul 2021 07:59:14 +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 A88FB29A4F for ; Tue, 13 Jul 2021 09:59:14 +0200 (CEST) Received: from localhost ([::1]:40996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3DJx-0007C6-Sr for larch@yhetil.org; Tue, 13 Jul 2021 03:59:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3DJm-0007AT-PL for guix-patches@gnu.org; Tue, 13 Jul 2021 03:59:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3DJm-0001zG-Hw for guix-patches@gnu.org; Tue, 13 Jul 2021 03:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m3DJm-0000XI-H1 for guix-patches@gnu.org; Tue, 13 Jul 2021 03:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48443] [PATCH 1/2] gnu: Add texlive-libkpathsea. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Jul 2021 07:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48443 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Thiago Jung Bauermann Cc: 48443@debbugs.gnu.org Received: via spool by 48443-submit@debbugs.gnu.org id=B48443.16261631072020 (code B ref 48443); Tue, 13 Jul 2021 07:59:02 +0000 Received: (at 48443) by debbugs.gnu.org; 13 Jul 2021 07:58:27 +0000 Received: from localhost ([127.0.0.1]:39341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3DJC-0000WV-U3 for submit@debbugs.gnu.org; Tue, 13 Jul 2021 03:58:27 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:44266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3DJB-0000WN-5h for 48443@debbugs.gnu.org; Tue, 13 Jul 2021 03:58:25 -0400 Received: from nijino.local (80-121-26-175.adsl.highway.telekom.at [80.121.26.175]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GPCgM1qDtz3wmc; Tue, 13 Jul 2021 09:58:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1626163103; bh=KWcNa2P18lOxVVVoscaZ82esy2RKzovSVmaYNPTxQqo=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=KHhdN6JP7BkfAzr84u+EDSKMiaXtIQXnJ6kOoO63CsxhF9N9/IQUGpBWMj6jBRKib Et91Jvr7Wy/vlJQLO01efqLPyIBbiO1/IuK3+PpseMOtFpoIHdqhtTZCwZ/05dwhS2 qOCrhiDf8C4PVR3sJRwybPoA4E5CORLT5RRRO4P8= Message-ID: From: Leo Prikler Date: Tue, 13 Jul 2021 09:58:22 +0200 In-Reply-To: <7264704.8eCzXKmJsZ@popigai> References: <20210515144230.22035-1-leo.prikler@student.tugraz.at> <7264704.8eCzXKmJsZ@popigai> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626163154; h=from:from:sender:sender: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=KWcNa2P18lOxVVVoscaZ82esy2RKzovSVmaYNPTxQqo=; b=nsDaoBqHkL1wtd7r3lZLql8BlT9Hmoj6K9hXRmbRjSejCti/nmZikEYSiACgW+FhEMNHdh q6DgQRVtH6RSOjUotl45ma5tLUrFQN1LJea/qMAAZpbHLfQZzHF1+bsdbxXUj8y8LhnHV5 DIiGWU1lGuArBQwzOYwoKMfO1MwIx0mktUs+G8rEELlGJ8sPoOLLRlM5Klsxuy3yB75yZo w+ez1PZAyM4a4P07my9GhLg0oHDqGzCkvVnWG1WpwjzIBOB8j6D6rVl6GHufC9oK1mGDQp U/K1zpUiAbtJSWpCTt+YySQ97i+faecZv5YLwlXqdKs4pcKYHS4ejgZNwTuv0g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626163154; a=rsa-sha256; cv=none; b=qg5eLOh3GcJPYVIKo7sqW3V+NvioYFPbjfC128xcC2K5ziTrnOKK/PhjL07kLudRQDEVbp 3mDrBUAGJ+tV7J14eUx8LfGiv7JtR/ZKCD9w/YzQiOo2rJEYIN6luI2NCeFo08jG/DI7m6 k30VC1dd14/DsnAuYnbfB8kB4Vzf/g25vzxBIAr0gAqmptxBFmhfiEJWv4MciIV0wH9ZcH KC4plHiTJcrBWc1WgTu8wxiLNx1PomdPJc5n0Ph21/2B30j3OUB9sBqhU0dbl3Mo0MkSzH A5Z59NhODjIyhOIlEWod5TmFIEe3yWEuAWqcgJCD1LAx+aNeZEFtxFqdRwTAjA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=KHhdN6JP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); 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: -1.30 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=KHhdN6JP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); 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: A88FB29A4F X-Spam-Score: -1.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: jAKICftW4iap Hello Thiago, Am Montag, den 12.07.2021, 21:32 -0300 schrieb Thiago Jung Bauermann: > [...] > > +(define-public texlive-libkpathsea > > + (package/inherit texlive-bin > > According to a recent message from Ludo¹, ‘package/inherit’ is meant > to be > used in specific situations, and IIUC it doesn’t apply here: > > > It should also be (package (inherit …) …) rather than > > (package/inherit …). The latter is only useful when defining > > variants of a package (same version, same code) where the same > > security updates would apply. 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. > 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’t work anymore with > the version in core-updates because in the branch, the ‘postint’ > phase has been renamed to ‘post-install’. Also, I assume many > texlive-bin inputs aren’t needed for texlive-kpathsea, causing > unnecessary work when building texlive-libkpathsea and packages > depending on it such as evince. The postinst thing was my mistake – instead of inheriting from %standard-phases as I should, I naïvely inherited texlive-bin's phases instead. It turns out, I actually don't need any of those (and if I did they'd be trivially copyable). 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. > In addition, if it were a separate package then texlive-bin could be > made to use it, rather than shipping its own copy. Perhaps that's an idea worth entertaining, but given the TeX Live build system I fear it's not an overwhelmingly practical one. > > + (name "texlive-libkpathsea") > > + (source > > + (origin > > + (inherit (package-source texlive-bin)) > > Perhaps a ‘texlive-source-src’ variable analogous to ‘texlive-extra- > src’ and ‘texlive-texmf-src’ would be useful? I'm… not too sure on this one. What would texlive-source-src capture? 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? > > + (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")))))))))) > > If you decide to continue inheriting from texlive-bin, you’d also > need to change the synopsis and description. 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. Regards, Leo