Github messages for voidlinux
 help / color / mirror / Atom feed
From: fosslinux <fosslinux@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] texlive: fix tlmgr.
Date: Tue, 05 Jan 2021 09:12:59 +0100	[thread overview]
Message-ID: <20210105081259.HjJwmJ6f7Ovnzu5X4kJkGn8tM959q4MJV8XK0yBqInM@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27653@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 875 bytes --]

There is an updated pull request by fosslinux against master on the void-packages repository

https://github.com/fosslinux/void-packages tlpdb-new
https://github.com/void-linux/void-packages/pull/27653

texlive: fix tlmgr.
This PR adds a package texlive-tlpdb that is in the same vein as the foomatic-db* family, where there is no checksum as it packages a volatile database updated roughly daily that should be bumped regularly to ensure operation of tlmgr.

tlmgr requires the use of /usr/share/texmf-dist/tlpkg/texlive.tlpdb to
work correctly. We don't distribute this currently, but now we do, in
the package texlive-tlpdb. It is split out because it is very volatile
and we don't want to have to continously bump the full texlive package.

This finally! makes tlmgr work.

A patch file from https://github.com/void-linux/void-packages/pull/27653.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-tlpdb-new-27653.patch --]
[-- Type: text/x-diff, Size: 4758 bytes --]

From 672d0884115044b8e44c767f42cdffde2494a773 Mon Sep 17 00:00:00 2001
From: fosslinux <fosslinux@aussies.space>
Date: Tue, 5 Jan 2021 19:12:23 +1100
Subject: [PATCH] texlive: fix tlmgr.

---
 srcpkgs/texlive/patches/tlmgr.patch | 113 ++++++++++++++++++++++++++++
 srcpkgs/texlive/template            |   2 +-
 2 files changed, 114 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
new file mode 100644
index 00000000000..9d8f07099d6
--- /dev/null
+++ b/srcpkgs/texlive/patches/tlmgr.patch
@@ -0,0 +1,113 @@
+Modified from Debian's tlmgr patch.
+Src: https://raw.githubusercontent.com/debian-tex/texlive-nonbin/9767c8ba4ea64d671eb98ddff550498cd2ac3d51/texlive-base/debian/patches/debian-tlmgr-usermode.
+
+Modifications:
+
+* Drop Debian specific wording.
+* Drop unnessecary manpage changes.
+* Change /usr/share path to what we use.
+
+Modified by fosslinux.
+
+--- texk/texlive/linked_scripts/texlive/tlmgr.pl
++++ texk/texlive/linked_scripts/texlive/tlmgr.pl
+@@ -21,7 +21,7 @@
+ $tlmgrversion = "$tlmgrrevision ($datrev)";
+ 
+ our $Master;
+-our $ismain;
++our $ismain = 1;
+ our $loadmediasrcerror;
+ our $packagelogfile;
+ our $packagelogged;
+@@ -41,50 +41,8 @@
+ 
+ BEGIN {
+   $^W = 1;
+-  $ismain = (__FILE__ eq $0);
+-  # WARNING
+-  # The only use anticipated for tlmgr.pl as library for the 2009 release
+-  # is the Windows w32client prototype script.
+-  # Unix-specific problems with use as library will probably go undetected.
+-
+-  # make subprograms (including kpsewhich) have the right path:
+-  my $kpsewhichname;
+-  if ($^O =~ /^MSWin/i) {
+-    # on w32 $0 and __FILE__ point directly to tlmgr.pl; they can be relative
+-    $Master = __FILE__;
+-    $Master =~ s!\\!/!g;
+-    $Master =~ s![^/]*$!../../..!
+-      unless ($Master =~ s!/texmf-dist/scripts/texlive/tlmgr\.pl$!!i);
+-    $bindir = "$Master/bin/win32";
+-    $kpsewhichname = "kpsewhich.exe";
+-    # path already set by wrapper batchfile
+-  } else {
+-    $Master = __FILE__;
+-    $Master =~ s,/*[^/]*$,,;
+-    if ($ismain) {
+-      $bindir = $Master;
+-      $Master = "$Master/../..";
+-    } else {
+-      # for the time being, this code will not be used or tested
+-      $Master = "$Master/../../..";
+-      # no code yet for $bindir; would have to detect platform
+-    }
+-    # make subprograms (including kpsewhich) have the right path:
+-    $ENV{"PATH"} = "$bindir:$ENV{PATH}";
+-    $kpsewhichname = "kpsewhich";
+-  }
+-  if (-r "$bindir/$kpsewhichname") {
+-    # if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
+-    chomp($Master = `kpsewhich -var-value=SELFAUTOPARENT`);
+-  }
+-
+-  # if we have no directory in which to find our modules,
+-  # no point in going on.
+-  if (! $Master) {
+-    die ("Could not determine directory of tlmgr executable, "
+-         . "maybe shared library woes?\nCheck for error messages above");
+-  }
+-
++  
++  $Master = "/usr/share/texmf-dist";
+   $::installerdir = $Master;  # for config.guess et al., see TLUtils.pm
+ 
+   # make Perl find our packages first:
+@@ -621,6 +579,13 @@
+     tldie("$prg: Try --help if you need it.\n");
+   }
+ 
++  # automatically switch to user mode on Debian, and warn
++  if (!$opts{"usermode"} && $action ne "init-usertree") {
++    $opts{"usermode"} = 1;
++    print "WARNING: switching to user mode!\n";
++    print "WARNING: normal mode unsupported on Void Linux.\n";
++  }
++
+   #
+   # the main tree we will be working on
+   $::maintree = $Master;
+@@ -6099,7 +6064,9 @@
+ # sets up the user tree for tlmgr in user mode
+ sub action_init_usertree {
+   # init_local_db but do not die if localtlpdb is not found!
+-  init_local_db(2);
++  # we don't ship tlpdb in the system, so don't even
++  # try to initialize it.
++  # init_local_db(2);
+   my $tlpdb = TeXLive::TLPDB->new;
+   my $usertree;
+   if ($opts{"usertree"}) {
+@@ -6739,7 +6706,11 @@
+     if ($should_i_die == 2) {
+       return undef;
+     } else {
+-      die("cannot setup TLPDB in $::maintree");
++      if ($opts{'usermode'}) {
++        die("$prg: user mode not initialized, please run `tlmgr init-usertree`\n");
++      } else {
++        die("cannot setup TLPDB in $::maintree");
++      }
+     }
+   }
+   # setup the programs, for w32 we need the shipped wget/xz etc, so we
diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index f416e853534..ac5dc0db13b 100644
--- a/srcpkgs/texlive/template
+++ b/srcpkgs/texlive/template
@@ -1,7 +1,7 @@
 # Template file for 'texlive'
 pkgname=texlive
 version=20200406
-revision=5
+revision=6
 wrksrc="texlive-${version}-source"
 build_wrksrc="build"
 build_style=gnu-configure

  parent reply	other threads:[~2021-01-05  8:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 11:03 [PR PATCH] " fosslinux
2021-01-04 11:14 ` texlive: fix tlmgr. [ci skip] fosslinux
2021-01-04 11:16 ` [PR PATCH] [Updated] texlive: fix tlmgr fosslinux
2021-01-04 12:48 ` ericonr
2021-01-04 21:23 ` fosslinux
2021-01-04 21:51 ` ericonr
2021-01-05  8:12 ` fosslinux [this message]
2021-01-05  8:13 ` fosslinux
2021-01-06  4:34 ` ericonr
2021-01-06  4:57 ` [PR REVIEW] " ericonr
2021-01-06  8:38 ` [PR PATCH] [Updated] " fosslinux
2021-01-08 17:35 ` [PR PATCH] [Merged]: " ericonr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210105081259.HjJwmJ6f7Ovnzu5X4kJkGn8tM959q4MJV8XK0yBqInM@z \
    --to=fosslinux@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).