[tlbuild] Support for musl

Norbert Preining norbert at preining.info
Tue Jan 30 05:29:09 CET 2018


Hi Karl,

> So should we for now go with Karl's suggestion and use
>   x86_64-linuxmusl
> as arch name and adjust the perl scripts to work with it? In this case
> the net installer could be used on these platforms.

What about that for a start:

diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 5fa568e01be..f97acd82e05 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -298,6 +298,14 @@ sub platform_name {
     #   solaris2 is matched.
     $OS = $os if $guessed_platform =~ /\b$os/;
   }
+
+  if ($OS eq "linux") {
+    # deal with the special case of musl based distributions
+    # config.guess returns
+    #   x86_64-pc-linux-musl
+    #   i386-pc-linux-musl
+    $OS = "linuxmusl" if $guessed_platform =~ /\blinux-musl/;
+  }
   
   if ($OS eq "darwin") {
     # We have a variety of Mac binary sets.
@@ -375,6 +383,7 @@ sub platform_desc {
     'i386-freebsd'     => 'FreeBSD on Intel x86',
     'i386-kfreebsd'    => 'GNU/kFreeBSD on Intel x86',
     'i386-linux'       => 'GNU/Linux on Intel x86',
+    'i386-linuxmusl'   => 'GNU/Linux on Intel x86 with musl',
     'i386-netbsd'      => 'NetBSD on Intel x86',
     'i386-openbsd'     => 'OpenBSD on Intel x86',
     'i386-solaris'     => 'Solaris on Intel x86',
@@ -391,6 +400,7 @@ sub platform_desc {
     'x86_64-darwin'    => 'MacOSX current on x86_64',
     'x86_64-darwinlegacy' => 'MacOSX legacy (10.6-10.9) on x86_64',
     'x86_64-linux'     => 'GNU/Linux on x86_64',
+    'x86_64-linuxmusl' => 'GNU/Linux on x86_64 with musl',
     'x86_64-solaris'   => 'Solaris on x86_64',
   );
 
diff --git a/Master/tlpkg/bin/tl-update-bindir b/Master/tlpkg/bin/tl-update-bindir
index 061c384f768..a59c7fac385 100755
--- a/Master/tlpkg/bin/tl-update-bindir
+++ b/Master/tlpkg/bin/tl-update-bindir
@@ -144,6 +144,10 @@ for tlplat in $tlplats; do
     #default_bin_loc=/tmp/lin32.tgz;;
     default_bin_loc=$download_loc
     $grab http://dl.contextgarden.net/build/texlive/$tlplat.tar.xz;;
+   i386-linuxmusl)
+    default_bin_loc=$download_loc
+    remurl=`curl -s https://api.github.com/repos/TeX-Live/texlive-source/releases/latest | grep browser_download_url | grep texlive-bin-i386-musl.tar.gz | cut -d : -f 2,3 | tr -d \"`
+    $grab $remurl;;
    i386-netbsd)
     download_loc=$tmpdir/tl.$tlplat.tar.xz
     default_bin_loc=$download_loc
@@ -185,6 +189,10 @@ for tlplat in $tlplats; do
    x86_64-linux)
     # local: default_bin_loc=/home/texlive/karl/Build/source/inst/bin/x86_64-pc-linux-gnu;;
     ;; # updated by Norbert.
+   x86_64-linuxmusl)
+    default_bin_loc=$download_loc
+    remurl=`curl -s https://api.github.com/repos/TeX-Live/texlive-source/releases/latest | grep browser_download_url | grep texlive-bin-x86_64-musl.tar.gz | cut -d : -f 2,3 | tr -d \"`
+    $grab $remurl;;
    x86_64-solaris)
     default_bin_loc=$download_loc
     $grab http://dl.contextgarden.net/build/texlive/$tlplat.tar.xz;;



--
PREINING Norbert                               http://www.preining.info
Accelia Inc.     +    JAIST     +    TeX Live     +    Debian Developer
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13


More information about the tlbuild mailing list