[NTG-context] OpenBSD install broken
Mojca Miklavec
mojca.miklavec.lists at gmail.com
Sat Sep 21 13:22:31 CEST 2019
Dear Robert,
On Sat, 21 Sep 2019 at 01:09, Robert Krug wrote:
>
> Now, to the reason for this note. I recently tries to install context on an OpenBSD 6.5 AMD64
> system, but the install failed. Thanks to some helpful emails in the archives from 2017 and 2018,
> I was able to get this working by editing mtxrun and mtx-update.sh.
This would be really nice to fix eventually.
Hans, we do have all the required files:
https://distribution.contextgarden.net/setup/openbsd6.5/
https://distribution.contextgarden.net/setup/openbsd6.5-amd64/
...
https://distribution.contextgarden.net/current/bin/luatex/openbsd6.5-amd64/
...
but the problem is that mtxrun knows the platform under the name of
"openbsd-amd64" rather than "openbsd6.5-amd64".
The first-setup.sh script already correctly recognizes the name by
doing the following:
system=`uname -s`
case "$system" in
OpenBSD)
version=`uname -r`
platform="openbsd${version}-amd64" ;; # for 64-bit one; a
separate call for 32-bit of course
while mtxrun "ignores" the version name, but also ignores the
parameter being passed as
mtxrun --script bin/mtx-update.lua --platform=openbsd6.5-amd64
> I include what I did below.
Thanks.
> 1) Do the usual:
>
> mkdir context && cd context
> rsync -ptv rsync://contextgarden.net/standalone/setup/first-setup.sh .
> ./first-setup.sh
>
> This will silently fail, because
> bin/mtx-update.lua
> bin/mtxrun
> do not recognize openbsd.
>
> 2) Edit bin/mtxrun:
>
> We need to define a "good" version of resolvers.platform(t,k)
> At line 4049, there is a default definition. Replace it with:
>
> function resolvers.platform(t,k)
> local platform="openbsd6.5-amd64"
> os.setenv("MTX_PLATFORM",platform)
> os.platform=platform
> return platform
> end
It would be ideal to fix this properly instead, for everyone else.
This is a good recipe for a workaround, but we need something better.
In my opinion this might be best to maybe even fix inside luatex
sources themselves.
> 6) Finally, the setuptex script gives me an error message:
>
> megaera$ . /home/<name>/Context/tex/setuptex
> /bin/ksh: /home/<name>/Context/tex/setuptex[163]: ${.sh.file}": bad substitution
>
> but it is not hard to set the path correctly:
>
> PATH=$PATH\:/home/<name>/Context/tex/texmf-openbsd6.5-amd64/bin ; export PATH
This is something that I need to fix independently in the installation
script. Do you have any clue what could be done to make it work
properly on OpenBSD?
Mojca
PS: Hans, for some reason the 32-bit virtual machine for OpenBSD 6.5
seems broken in a bad way (I doesn't even reach the login screen), no
clue what's wrong, and I don't have extensive experience with OpenBSD
either. I could keep investigating, but I'll probably simply end up
setting up a fresh one. It would be helpful to maybe do some disk
health checks on the server, just in case.
More information about the ntg-context
mailing list