Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] texlive: fix tlmgr.
@ 2021-01-04 11:03 fosslinux
  2021-01-04 11:14 ` texlive: fix tlmgr. [ci skip] fosslinux
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: fosslinux @ 2021-01-04 11:03 UTC (permalink / raw)
  To: ml

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

There is a new 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: 2956 bytes --]

From 94ed5ea34564863ab65d396039a39940147d5606 Mon Sep 17 00:00:00 2001
From: fosslinux <fosslinux@aussies.space>
Date: Mon, 4 Jan 2021 21:49:29 +1100
Subject: [PATCH 1/2] New package: texlive-tlpdb-20210104.

---
 srcpkgs/texlive-tlpdb/template | 23 +++++++++++++++++++++++
 srcpkgs/texlive-tlpdb/update   |  1 +
 2 files changed, 24 insertions(+)
 create mode 100644 srcpkgs/texlive-tlpdb/template
 create mode 100644 srcpkgs/texlive-tlpdb/update

diff --git a/srcpkgs/texlive-tlpdb/template b/srcpkgs/texlive-tlpdb/template
new file mode 100644
index 00000000000..40040b43dcc
--- /dev/null
+++ b/srcpkgs/texlive-tlpdb/template
@@ -0,0 +1,23 @@
+# Template file for 'texlive-tlpdb'
+# Note: update the version=<date> regularly like once/month.
+pkgname=texlive-tlpdb
+version=20210104
+revision=1
+create_wrksrc=yes
+hostmakedepends="xz"
+short_desc="TeX Live - ctan database"
+maintainer="fosslinux <fosslinux@aussies.space>"
+license="GPL-2.0-or-later"
+homepage="https://www.tug.org/texlive/"
+
+do_fetch() {
+	${XBPS_FETCH_CMD} ftp://tug.org/texlive/tlnet/tlpkg/texlive.tlpdb.xz
+}
+
+do_extract() {
+	xz -dkc "${XBPS_BUILDDIR}/texlive.tlpdb.xz" > "${wrksrc}/texlive.tlpdb"
+}
+
+do_install() {
+	vinstall texlive.tlpdb 0644 usr/share/texmf-dist/tlpkg
+}
diff --git a/srcpkgs/texlive-tlpdb/update b/srcpkgs/texlive-tlpdb/update
new file mode 100644
index 00000000000..632ae769a2d
--- /dev/null
+++ b/srcpkgs/texlive-tlpdb/update
@@ -0,0 +1 @@
+pattern=$pkgname'-[\d.]+-\K[\d]+'

From e1fa23b7a909c6d2651403c9853c9838d391ce9a Mon Sep 17 00:00:00 2001
From: fosslinux <fosslinux@aussies.space>
Date: Mon, 4 Jan 2021 21:49:35 +1100
Subject: [PATCH 2/2] texlive: add dependency on texlive-tlpdb (make tlmgr
 work).

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.
---
 srcpkgs/texlive/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index f416e853534..bae453a333e 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
@@ -71,7 +71,8 @@ makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  poppler-devel pixman-devel libteckit-devel zlib-devel zziplib-devel
  libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core xbps-triggers>=0.115_1"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers>=0.115_1
+ texlive-tlpdb"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: texlive: fix tlmgr. [ci skip]
  2021-01-04 11:03 [PR PATCH] texlive: fix tlmgr fosslinux
@ 2021-01-04 11:14 ` fosslinux
  2021-01-04 11:16 ` [PR PATCH] [Updated] texlive: fix tlmgr fosslinux
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: fosslinux @ 2021-01-04 11:14 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/27653#issuecomment-753915589

Comment:
CI often randomly fails to get the texlive sources, I believe there is some ratelimitng going on or something


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Updated] texlive: fix tlmgr.
  2021-01-04 11:03 [PR PATCH] texlive: fix tlmgr fosslinux
  2021-01-04 11:14 ` texlive: fix tlmgr. [ci skip] fosslinux
@ 2021-01-04 11:16 ` fosslinux
  2021-01-04 12:48 ` ericonr
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: fosslinux @ 2021-01-04 11:16 UTC (permalink / raw)
  To: ml

[-- 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: 2956 bytes --]

From 34596fb3225e81ba26f6ed323f5db95c2ea66194 Mon Sep 17 00:00:00 2001
From: fosslinux <fosslinux@aussies.space>
Date: Mon, 4 Jan 2021 21:49:29 +1100
Subject: [PATCH 1/2] New package: texlive-tlpdb-20210104.

---
 srcpkgs/texlive-tlpdb/template | 23 +++++++++++++++++++++++
 srcpkgs/texlive-tlpdb/update   |  1 +
 2 files changed, 24 insertions(+)
 create mode 100644 srcpkgs/texlive-tlpdb/template
 create mode 100644 srcpkgs/texlive-tlpdb/update

diff --git a/srcpkgs/texlive-tlpdb/template b/srcpkgs/texlive-tlpdb/template
new file mode 100644
index 00000000000..40040b43dcc
--- /dev/null
+++ b/srcpkgs/texlive-tlpdb/template
@@ -0,0 +1,23 @@
+# Template file for 'texlive-tlpdb'
+# Note: update the version=<date> regularly like once/month.
+pkgname=texlive-tlpdb
+version=20210104
+revision=1
+create_wrksrc=yes
+hostmakedepends="xz"
+short_desc="TeX Live - ctan database"
+maintainer="fosslinux <fosslinux@aussies.space>"
+license="GPL-2.0-or-later"
+homepage="https://www.tug.org/texlive/"
+
+do_fetch() {
+	${XBPS_FETCH_CMD} ftp://tug.org/texlive/tlnet/tlpkg/texlive.tlpdb.xz
+}
+
+do_extract() {
+	xz -dkc "${XBPS_BUILDDIR}/texlive.tlpdb.xz" > "${wrksrc}/texlive.tlpdb"
+}
+
+do_install() {
+	vinstall texlive.tlpdb 0644 usr/share/texmf-dist/tlpkg
+}
diff --git a/srcpkgs/texlive-tlpdb/update b/srcpkgs/texlive-tlpdb/update
new file mode 100644
index 00000000000..632ae769a2d
--- /dev/null
+++ b/srcpkgs/texlive-tlpdb/update
@@ -0,0 +1 @@
+pattern=$pkgname'-[\d.]+-\K[\d]+'

From a2822b4e8f7b98b641d4e67d426b0a7c5b339cd4 Mon Sep 17 00:00:00 2001
From: fosslinux <fosslinux@aussies.space>
Date: Mon, 4 Jan 2021 21:49:35 +1100
Subject: [PATCH 2/2] texlive: add dependency on texlive-tlpdb (make tlmgr
 work).

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.
---
 srcpkgs/texlive/template | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/texlive/template b/srcpkgs/texlive/template
index f416e853534..bae453a333e 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
@@ -71,7 +71,8 @@ makedepends="cairo-devel freetype-devel gd-devel graphite-devel gmp-devel
  harfbuzz-devel icu-devel libpaper-devel libpng-devel mpfr-devel
  poppler-devel pixman-devel libteckit-devel zlib-devel zziplib-devel
  libXaw-devel"
-depends="dialog ghostscript perl-Tk texlive-core xbps-triggers>=0.115_1"
+depends="dialog ghostscript perl-Tk texlive-core xbps-triggers>=0.115_1
+ texlive-tlpdb"
 short_desc="TeX Live"
 maintainer="fosslinux <fosslinux@aussies.space>"
 license="GPL-2.0-or-later"

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: texlive: fix tlmgr.
  2021-01-04 11:03 [PR PATCH] texlive: fix tlmgr 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
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ericonr @ 2021-01-04 12:48 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27653#issuecomment-753956357

Comment:
This is kind of actively hostile to packaging... Can someone use `tlmgr` in their system texlive for something that they couldn't do with `texlive-bin`?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: texlive: fix tlmgr.
  2021-01-04 11:03 [PR PATCH] texlive: fix tlmgr fosslinux
                   ` (2 preceding siblings ...)
  2021-01-04 12:48 ` ericonr
@ 2021-01-04 21:23 ` fosslinux
  2021-01-04 21:51 ` ericonr
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: fosslinux @ 2021-01-04 21:23 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/27653#issuecomment-754227818

Comment:
There is nothing the system texlive does that cannot be done with `texlive-bin`, apart from integration with other packages. System texlive has a number of advantages anyway. Usecases I see for tlmgr in system texlive include:

1. User-specific packages on a multi-user system.
2. Installing CTAN packages we do not provide (there are a few).
3. Installing parts of packages we provide without pulling in the entire massive package such as fontsextra.

I do not see this being used as a root-wide, i.e. not installing to `/usr/share/texmf-dist`, only for `~/texmf` (user mode). `tlmgr` is also responsible for a couple of configuration options, such as default paper size.

Perhaps we should also patch tlmgr like Debian to only support usermode `tlmgr`, as that is the only usecase we should be supporting. I don't see any way in which that is "actively hostile to packaging".

Either way, we need to make it very clear which way we are going:

- Distributing tlmgr and making it work
- Not distributing tlmgr and not supporting it (move to `texlive-bin` if you want that)

Not in this state of limbo where we have an nonfunctional tlmgr script and people semi-regularly complaining about it.

cc @q66

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: texlive: fix tlmgr.
  2021-01-04 11:03 [PR PATCH] texlive: fix tlmgr fosslinux
                   ` (3 preceding siblings ...)
  2021-01-04 21:23 ` fosslinux
@ 2021-01-04 21:51 ` ericonr
  2021-01-05  8:12 ` [PR PATCH] [Updated] " fosslinux
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ericonr @ 2021-01-04 21:51 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27653#issuecomment-754242340

Comment:
> I don't see any way in which that is "actively hostile to packaging".

I meant the specific new package you're creating, since it doesn't exist as a versioned thing.

Can you install packages with `tlmgr` onto any arch, or does it work only for glibc stuff? Because if it only works for glibc, I'm okay with moving it to texlive-bin entirely. Still, a minimally working program that allows you to control settings and stuff can be nice, so we might just have to make do... I assume we can't fake a tpldb, just for tlmgr to kind of work?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Updated] texlive: fix tlmgr.
  2021-01-04 11:03 [PR PATCH] texlive: fix tlmgr fosslinux
                   ` (4 preceding siblings ...)
  2021-01-04 21:51 ` ericonr
@ 2021-01-05  8:12 ` fosslinux
  2021-01-05  8:13 ` fosslinux
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: fosslinux @ 2021-01-05  8:12 UTC (permalink / raw)
  To: ml

[-- 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: texlive: fix tlmgr.
  2021-01-04 11:03 [PR PATCH] texlive: fix tlmgr fosslinux
                   ` (5 preceding siblings ...)
  2021-01-05  8:12 ` [PR PATCH] [Updated] " fosslinux
@ 2021-01-05  8:13 ` fosslinux
  2021-01-06  4:34 ` ericonr
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: fosslinux @ 2021-01-05  8:13 UTC (permalink / raw)
  To: ml

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

New comment by fosslinux on void-packages repository

https://github.com/void-linux/void-packages/pull/27653#issuecomment-754479436

Comment:
Alternative method, patching from Debian, as discussed in IRC.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: texlive: fix tlmgr.
  2021-01-04 11:03 [PR PATCH] texlive: fix tlmgr fosslinux
                   ` (6 preceding siblings ...)
  2021-01-05  8:13 ` fosslinux
@ 2021-01-06  4:34 ` ericonr
  2021-01-06  4:57 ` [PR REVIEW] " ericonr
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ericonr @ 2021-01-06  4:34 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27653#issuecomment-755072056

Comment:
Would you mind adding `exec` to the tlmgr wrapper as well?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR REVIEW] texlive: fix tlmgr.
  2021-01-04 11:03 [PR PATCH] texlive: fix tlmgr fosslinux
                   ` (7 preceding siblings ...)
  2021-01-06  4:34 ` ericonr
@ 2021-01-06  4:57 ` ericonr
  2021-01-06  8:38 ` [PR PATCH] [Updated] " fosslinux
  2021-01-08 17:35 ` [PR PATCH] [Merged]: " ericonr
  10 siblings, 0 replies; 12+ messages in thread
From: ericonr @ 2021-01-06  4:57 UTC (permalink / raw)
  To: ml

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

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/27653#discussion_r552368954

Comment:
```suggestion
+  # automatically switch to user mode on Void, and warn
```

don't think this matters much, though.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Updated] texlive: fix tlmgr.
  2021-01-04 11:03 [PR PATCH] texlive: fix tlmgr fosslinux
                   ` (8 preceding siblings ...)
  2021-01-06  4:57 ` [PR REVIEW] " ericonr
@ 2021-01-06  8:38 ` fosslinux
  2021-01-08 17:35 ` [PR PATCH] [Merged]: " ericonr
  10 siblings, 0 replies; 12+ messages in thread
From: fosslinux @ 2021-01-06  8:38 UTC (permalink / raw)
  To: ml

[-- 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: 5224 bytes --]

From 082f8f2278f5d986c31731b65611f0304e54938d 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.

Uses Debian's patch to force usermode and disable the use of tlpdb.

Also make the tlmgr wrapper use exec
---
 srcpkgs/texlive/files/tlmgr         |   2 +-
 srcpkgs/texlive/patches/tlmgr.patch | 113 ++++++++++++++++++++++++++++
 srcpkgs/texlive/template            |   2 +-
 3 files changed, 115 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/texlive/patches/tlmgr.patch

diff --git a/srcpkgs/texlive/files/tlmgr b/srcpkgs/texlive/files/tlmgr
index 95bbe227492..ab49facd2d8 100755
--- a/srcpkgs/texlive/files/tlmgr
+++ b/srcpkgs/texlive/files/tlmgr
@@ -1,2 +1,2 @@
 #!/bin/sh
-/usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
+exec /usr/share/texmf-dist/scripts/texlive/tlmgr.pl "$@"
diff --git a/srcpkgs/texlive/patches/tlmgr.patch b/srcpkgs/texlive/patches/tlmgr.patch
new file mode 100644
index 00000000000..0dc69247f41
--- /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 Void, 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PR PATCH] [Merged]: texlive: fix tlmgr.
  2021-01-04 11:03 [PR PATCH] texlive: fix tlmgr fosslinux
                   ` (9 preceding siblings ...)
  2021-01-06  8:38 ` [PR PATCH] [Updated] " fosslinux
@ 2021-01-08 17:35 ` ericonr
  10 siblings, 0 replies; 12+ messages in thread
From: ericonr @ 2021-01-08 17:35 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

texlive: fix tlmgr.
https://github.com/void-linux/void-packages/pull/27653

Description:
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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-01-08 17:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 11:03 [PR PATCH] texlive: fix tlmgr 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 ` [PR PATCH] [Updated] " fosslinux
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

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).