From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=HTML_MESSAGE, MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE,URIBL_SBL_A,WEIRD_QUOTING autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15201 invoked from network); 28 Apr 2023 07:20:18 -0000 Received: from zapf.ntg.nl (5.39.185.232) by inbox.vuxu.org with ESMTPUTF8; 28 Apr 2023 07:20:18 -0000 Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2284F1C2C50; Fri, 28 Apr 2023 09:19:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.ntg.nl Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jPsmBjVuWvOn; Fri, 28 Apr 2023 09:19:51 +0200 (CEST) Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7CBC41C28DB; Fri, 28 Apr 2023 09:19:51 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id ADAE21C29EA for ; Fri, 28 Apr 2023 09:19:50 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.ntg.nl Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sATM815gLXrv for ; Fri, 28 Apr 2023 09:19:48 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=69.60.111.174; helo=mailmanlian.computerisms.ca; envelope-from=lynx@polarcom.com; receiver= Received: from mailmanlian.computerisms.ca (mailmanlian.computerisms.ca [69.60.111.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 85EA81C1029 for ; Fri, 28 Apr 2023 09:19:47 +0200 (CEST) Received: (qmail 21223 invoked from network); 28 Apr 2023 03:20:58 -0400 Received: by simscan 1.4.0 ppid: 21209, pid: 21221, t: 0.0422s scanners: attach: 1.4.0 Received: from unknown (HELO rc.computerisms.ca) (127.0.0.1) by mailmanlian.computerisms.ca with SMTP; 28 Apr 2023 03:20:58 -0400 MIME-Version: 1.0 Date: Fri, 28 Apr 2023 00:20:57 -0700 To: mailing list for ConTeXt users In-Reply-To: <9338ba4d4d69bc3ce633ed9c0eebf116fa473a25.camel@telus.net> References: <9338ba4d4d69bc3ce633ed9c0eebf116fa473a25.camel@telus.net> Message-ID: <2d88e7f2c939db162e1d668a7b848321@polarcom.com> X-Sender: lynx@polarcom.com User-Agent: Roundcube Webmail/1.2.1 Subject: Re: [NTG-context] LuaMetaTeX doesn't find files when symlinked X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.38 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: lynx--- via ntg-context Reply-To: mailing list for ConTeXt users Cc: lynx@polarcom.com Content-Type: multipart/mixed; boundary="===============4328789554425169025==" Errors-To: ntg-context-bounces@ntg.nl Sender: "ntg-context" --===============4328789554425169025== Content-Type: multipart/alternative; boundary="=_18eb52e8eaa6485ac181bddfa607a331" --=_18eb52e8eaa6485ac181bddfa607a331 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Max & Hans: I installed the stand-alone ConTeXt installation just today. It seems like I have my $PATH set correctly now. I have been editing ConTeXt and running it within TeXstudio. I had set up a "user command" to execute arara on LaTeX and ConTeXt files when I did NOT have the "standalone" version installed. It still works correctly. Today, I created a separate "user command" within TeXstudio, and it points to "/usr/local/ConTeXt_Standalone/context-linux-64/bin/mtxrun" This command generates the same log output as the example at https://gitlab.com/islandoftex/images/texlive/-/issues/30. If I understand this correctly, my OLD user command within TeXstudio is still finding the TeXlive version of ConTeXt, and that TeXlive version does have the symlinks mentioned by Max (and BTW, I did NOT create those, they are part of the default TeXlive installation process!). This is because my OLD "arara" command has the path to the March 13 version of TeXlive 2023 version (installed from ISO image, with some updates using tlmgr already installed). Lynx On 2023-04-27 21:00, Max Chernoff via ntg-context wrote: > Hi Hans, > > With the LuaMetaTeX-based ConTeXt wrapper, it's not generally possible > to run ConTeXt from a symlinked binary in another directory. This shows > up if someone makes symlinks in "/usr/bin" so that they can avoid adding > anything to their $PATH. > > If you make run a symlink to the LuaMetaTeX-based ConTeXt wrapper, it > looks for texmfcnf.lua relative to the symlink location, not the symlink > target. With the old LuaTeX/kpse-based wrapper, the script would look > for texmfcnf.lua relative to the symlink target. > > I know that my description above is terrible, so here's a demo: > > $ bin=$(mtxrun --expand-var TEXMFOS | head -1)/* > $ cd $(mktemp -d) > $ ln -s $bin/luatex $bin/luametatex $bin/context $bin/context.lua $bin/mtxrun $bin/mtxrun.lua . > $ ./context --nofile > $ ./context --luatex --nofile > > Running the above commands used to work with the old LuaTeX/kpse-based > wrapper, but it doesn't work any more. I was able to ""fix"" this by > adding the lines > > if os.selfpath then > environment.ownbin = lfs.symlinktarget(os.selfpath .. io.fileseparator .. os.selfname) > environment.ownpath = environment.ownbin:match("^.*" .. io.fileseparator) > else > environment.ownpath = kpse.new("luatex"):var_value("SELFAUTOLOC") > environment.ownbin = environment.ownpath .. io.fileseparator .. (arg[-2] or arg[-1] or arg[0] or "luatex"):match("[^" .. io.fileseparator .. "]*$") > end > > to mtxrun.lua, right below the line > > package.loaded["data-ini"] = package.loaded["data-ini"] or true > > but this is obviously not a very good fix. > > There are some threads with more details at: > > https://tug.org/pipermail/tex-live/2023-March/049028.html > https://gitlab.com/islandoftex/images/texlive/-/issues/30 > > Those links only discuss TL, but I get the same issue if I make a symlink > to the standalone ConTeXt files. > > Thanks, > -- Max > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the Wiki! > > maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___________________________________________________________________________________ --=_18eb52e8eaa6485ac181bddfa607a331 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8

Max & Hans:

I installed the stand-alone ConTeXt installation just today. It seems li= ke I have my $PATH set correctly now.

I have been editing ConTeXt and running it within TeXstudio. I had set u= p a "user command" to execute arara on LaTeX and ConTeXt files when I did N= OT have the "standalone" version installed. It still works correctly.

Today, I created a separate "user command" within TeXstudio, and it poin= ts to "/usr/local/ConTeXt_Standalone/context-linux-64/bin/mtxrun"=C2=A0 Thi= s command generates the same log output as the example at https://gitlab.com/isl= andoftex/images/texlive/-/issues/30.

If I understand this correctly, my OLD user command within TeXstudio is<= span style=3D"background-color: #ffff99;"> still finding the TeXlive= version of ConTeXt, and that TeXlive version does have the symlinks mentio= ned by Max (and BTW, I did NOT create those, they are part of the default T= eXlive installation process!). This is because my OLD "arara" command has t= he path to the March 13 version of TeXlive 2023 version (installed from ISO= image, with some updates using tlmgr already installed).

Lynx





On 2023-04-27 21:00, Max Chernoff via ntg-context wrote:

= Hi Hans,

With the LuaMetaTeX-based ConTeXt wrapper, it's not genera= lly possible
to run ConTeXt from a symlinked binary in another director= y. This shows
up if someone makes symlinks in "/usr/bin" so that they c= an avoid adding
anything to their $PATH.

If you make run a syml= ink to the LuaMetaTeX-based ConTeXt wrapper, it
looks for texmfcnf.lua = relative to the symlink location, not the symlink
target. With the old = LuaTeX/kpse-based wrapper, the script would look
for texmfcnf.lua relat= ive to the symlink target.

I know that my description above is terr= ible, so here's a demo:

=C2=A0=C2=A0=C2=A0$ bin=3D$(mtxrun --expand= -var TEXMFOS | head -1)/*
=C2=A0=C2=A0=C2=A0$ cd $(mktemp -d)
=C2= =A0=C2=A0=C2=A0$ ln -s $bin/luatex $bin/luametatex $bin/context $bin/contex= t.lua $bin/mtxrun $bin/mtxrun.lua .
=C2=A0=C2=A0=C2=A0$ ./context --nof= ile
=C2=A0=C2=A0=C2=A0$ ./context --luatex --nofile
=C2=A0=C2=A0=C2= =A0
Running the above commands used to work with the old LuaTeX/kpse-ba= sed
wrapper, but it doesn't work any more. I was able to ""fix"" this b= y
adding the lines

=C2=A0=C2=A0=C2=A0if os.selfpath then
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0environment.ownbin =3D lfs.symlin= ktarget(os.selfpath .. io.fileseparator .. os.selfname)
=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0environment.ownpath =3D environment.ownbin:match= ("^.*" .. io.fileseparator)
=C2=A0=C2=A0=C2=A0else
=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0environment.ownpath =3D kpse.new("luatex"):var_v= alue("SELFAUTOLOC")
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0environme= nt.ownbin =3D environment.ownpath .. io.fileseparator .. (arg[-2] or arg[-1= ] or arg[0] or "luatex"):match("[^" .. io.fileseparator .. "]*$")
=C2= =A0=C2=A0=C2=A0end
=C2=A0=C2=A0=C2=A0
to mtxrun.lua, right below th= e line

=C2=A0=C2=A0=C2=A0package.loaded["data-ini"] =3D package.loa= ded["data-ini"] or true
=C2=A0=C2=A0=C2=A0
but this is obviously no= t a very good fix.

There are some threads with more details at:
=
=C2=A0=C2=A0=C2=A0https://tug.org/pipermail/tex-live/2023-March/049028.html=
=C2=A0=C2=A0=C2=A0https://gitlab.com/islandoftex/images/texlive/-/issue= s/30
=C2=A0=C2=A0=C2=A0
Those links only discuss TL, but I get = the same issue if I make a symlink
to the standalone ConTeXt files.
Thanks,
-- Max
______________________________________________= _____________________________________
If your question is of interest t= o others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listi= nfo/ntg-context
webpage =C2=A0: https://www.pragma-ade.nl / http://context.aanhet.net
archive =C2=A0: https://bitbucket.org/phg/context-mi= rror/commits/
wiki =C2=A0=C2=A0=C2=A0=C2=A0: https://contextgarden.net
_________________________= __________________________________________________________


--=_18eb52e8eaa6485ac181bddfa607a331-- --===============4328789554425169025== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ --===============4328789554425169025==--