From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BFA7F1581E7 for ; Mon, 29 Apr 2024 17:32:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0B750E2A04; Mon, 29 Apr 2024 17:32:01 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E7E9EE2A04 for ; Mon, 29 Apr 2024 17:32:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3AD77335C11 for ; Mon, 29 Apr 2024 17:32:00 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A64481779 for ; Mon, 29 Apr 2024 17:31:58 +0000 (UTC) From: "Florian Schmaus" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Florian Schmaus" Message-ID: <1714225687.a57130b12c6012e9b8a4b0c72e55b1322ed927d5.flow@gentoo> Subject: [gentoo-commits] proj/tex-patches:main commit in: / X-VCS-Repository: proj/tex-patches X-VCS-Files: fix-perl-include-path-of-tlmgr.patch force-tlmgr-into-user-mode.patch X-VCS-Directories: / X-VCS-Committer: flow X-VCS-Committer-Name: Florian Schmaus X-VCS-Revision: a57130b12c6012e9b8a4b0c72e55b1322ed927d5 X-VCS-Branch: main Date: Mon, 29 Apr 2024 17:31:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 09a03403-e39a-407a-ac24-313be33c9490 X-Archives-Hash: ad899f951ffaa150f8f65bfaae0485ab commit: a57130b12c6012e9b8a4b0c72e55b1322ed927d5 Author: Florian Schmaus gentoo org> AuthorDate: Sat Apr 27 13:48:07 2024 +0000 Commit: Florian Schmaus gentoo org> CommitDate: Sat Apr 27 13:48:07 2024 +0000 URL: https://gitweb.gentoo.org/proj/tex-patches.git/commit/?id=a57130b1 Add two tlmgr patches to fix include path and force user mode Signed-off-by: Florian Schmaus gentoo.org> fix-perl-include-path-of-tlmgr.patch | 54 ++++++++++++++++++++++++++++++++++++ force-tlmgr-into-user-mode.patch | 38 +++++++++++++++++++++++++ 2 files changed, 92 insertions(+) diff --git a/fix-perl-include-path-of-tlmgr.patch b/fix-perl-include-path-of-tlmgr.patch new file mode 100644 index 0000000..4b82c1f --- /dev/null +++ b/fix-perl-include-path-of-tlmgr.patch @@ -0,0 +1,54 @@ +From b8566bfdd6a4ed151ece66bf4267dc0f6838449f Mon Sep 17 00:00:00 2001 +From: Florian Schmaus +Date: Sat, 27 Apr 2024 15:32:18 +0200 +Subject: [PATCH 2/2] Fix perl include path of tlmgr + +The texlive-core ebuilds install tlmgr's perl modules under + +/usr/share/tlpkg/TeXLive/ + +however /usr/share/texmf-dist/scripts/texlive/tlmgr.pl fails to find +them + +can't locate TeXLive/TLConfig.pm in @INC (you may need to install the +TeXLive::TLConfig module) (@INC entries checked: +/usr/share/texmf-dist/scripts/texlive/../../texmf-dist/scripts/texlive +/usr/share/texmf-dist/scripts/texlive/../../tlpkg /etc/perl +/usr/local/lib64/perl5/5.38/x86_64-linux-thread-multi +/usr/local/lib64/perl5/5.38 +/usr/lib64/perl5/vendor_perl/5.38/x86_64-linux-thread-multi +/usr/lib64/perl5/vendor_perl/5.38 +/usr/lib64/perl5/5.38/x86_64-linux-thread-multi /usr/lib64/perl5/5.38) +at /usr/share/texmf-dist/scripts/texlive/tlmgr.pl line 92. + +the @INC above is wrong, it includes +/usr/share/texmf-dist/tlpkg (/usr/share/texmf-dist/scripts/texlive/../../tlpkg) +when it should be /usr/share/tlpkg. + +So lets fix the include path. + +Notably, debian also fixes this via patching tlmgr: +https://github.com/debian-tex/texlive-nonbin/blob/e4e5b367d97b26c19998e71da40f203d2403f41b/texlive-base/debian/patches/debian-tlmgr-usermode#L7-L39 + +Bug: https://bugs.gentoo.org/832139 +Bug: https://bugs.gentoo.org/263194 +--- + texk/texlive/linked_scripts/texlive/tlmgr.pl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/texk/texlive/linked_scripts/texlive/tlmgr.pl b/texk/texlive/linked_scripts/texlive/tlmgr.pl +index 47c9f5bfa4af..8d79fd376a11 100755 +--- a/texk/texlive/linked_scripts/texlive/tlmgr.pl ++++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl +@@ -59,7 +59,7 @@ BEGIN { + $Master = __FILE__; + $Master =~ s,/*[^/]*$,,; + $bindir = $Master; +- $Master = "$Master/../.."; ++ $Master = "$Master/../../.."; + # make subprograms (including kpsewhich) have the right path: + $ENV{"PATH"} = "$bindir:$ENV{PATH}"; + $kpsewhichname = "kpsewhich"; +-- +2.43.2 + diff --git a/force-tlmgr-into-user-mode.patch b/force-tlmgr-into-user-mode.patch new file mode 100644 index 0000000..957ba75 --- /dev/null +++ b/force-tlmgr-into-user-mode.patch @@ -0,0 +1,38 @@ +From 9ea30257f3c31924e711f9d32b33017ae8870cf5 Mon Sep 17 00:00:00 2001 +From: Florian Schmaus +Date: Sat, 27 Apr 2024 15:31:14 +0200 +Subject: [PATCH 1/2] Force tlmgr into user mode + +Similar to what debian does [1], we forcefully switch tlmgr into user +mode. + +1: https://github.com/debian-tex/texlive-nonbin/blob/e4e5b367d97b26c19998e71da40f203d2403f41b/texlive-base/debian/patches/debian-tlmgr-usermode#L47-L53 +--- + texk/texlive/linked_scripts/texlive/tlmgr.pl | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/texk/texlive/linked_scripts/texlive/tlmgr.pl b/texk/texlive/linked_scripts/texlive/tlmgr.pl +index 6b7da02192d2..47c9f5bfa4af 100755 +--- a/texk/texlive/linked_scripts/texlive/tlmgr.pl ++++ b/texk/texlive/linked_scripts/texlive/tlmgr.pl +@@ -616,6 +616,6 @@ for the full story.\n"; + } + push @notvalidargs, $k if !$found; + } + if (@notvalidargs) { + my $msg = "The action $action does not support the following option(s):\n"; + for my $c (@notvalidargs) { +@@ -630,6 +631,10 @@ for the full story.\n"; + + # the main tree we will be working on + $::maintree = $Master; ++ if (!$opts{"usermode"} && $action ne "init-usertree") { ++ $opts{"usermode"} = 1; ++ print "Gentoo managed TeXLive, switching tlmgr to user mode.\n"; ++ } + if ($opts{"usermode"}) { + # we could also try to detect that we don't have write permissions + # and switch to user mode automatically +-- +2.43.2 +