* Re: OpenBSD install broken
@ 2019-10-08 17:24 Damien Thiriet
0 siblings, 0 replies; 4+ messages in thread
From: Damien Thiriet @ 2019-10-08 17:24 UTC (permalink / raw)
To: ntg-context
Hi Mojca, Hi Robert
I tried to install standalone according to your instructions,
but I failed one more time.
I did the following steps:
mkdir context && cd context
rsync -ptv rsync://contextgarden.net/standalone/setup/first-setup.sh .
./first-setup.sh
Then I changed the line 4049 of bin/mtxrun to
local platform="openbsd6.5-amd64"
but I obviously did not understand what to do next:
calling
env PATH="$PWD/bin:$CONTEXTROOT/texmf-$platform/bin:$PATH"
MTX_PLATFORM="$platform" \
./bin/mtxrun --script ./bin/mtx-update.lua --force --update --make
--engine=luatex --platform="$platform"
--texroot="$CONTEXTROOT" $@
ends quite quickly, with this output
mtx-update | available platforms: freebsd freebsd-amd64 linux linux-64 linux-armhf linuxmusl-64 mswin openbsd6.5 openbsd6.5-amd64 osx-64 solaris-intel solaris-sparc win64
resolvers | tds | no 'texmf-openbsd6.5-6.4' under tree '/home/<name>/context/'
which is the same output as ./first-setup.sh before the change. (changed
my home name to <name>)
What did I do wrong?
Greetings,
Damien Thiriet
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: OpenBSD install broken
@ 2019-09-23 20:38 Robert Krug
0 siblings, 0 replies; 4+ messages in thread
From: Robert Krug @ 2019-09-23 20:38 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Mojca Miklavec
[-- Attachment #1.1: Type: text/plain, Size: 1530 bytes --]
On September 21, 2019 at 4:22 AM, Mojca Miklavec <mojca.miklavec.lists@gmail.com> wrote:
On Sat, 21 Sep 2019 at 01:09, Robert Krug wrote:
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
Shell scripting has always been a mystery to me. For what it is worth,
however, here is what I was able to come up with:
megaera$ cat test
echo "$SHELL"
echo "$KSH_VERSION"
SCRIPTPATH="$_"
OWNPATH=$(cd -P -- "$(dirname -- "$SCRIPTPATH")" && pwd -P)
echo $OWNPATH
megaera$ ./test
/bin/ksh
@(#)PD KSH v5.2.14 99/07/13.2
/home/<name>/Temp
It seems that OpenBSD uses public domain ksh also known as ksh88, as
opposed to the more common ksh93. I also found on the internet the
following code snippet for testing ksh versions:
case "$KSH_VERSION" in
(*MIRBSD*|*PD*|*LEGACY*) printf '%s\n' "$KSH_VERSION" ;;
(*) [ -z "$ERRNO" ] && printf '%s\n' "${.sh.version}" || echo ksh88/86 ;;
esac
All that said however, while it would be nice to have setuptex work on
OpenBSD also, I think anyone using it can set their own paths if they
have to.
Robert
[-- Attachment #1.2.1: Type: text/html, Size: 2475 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: OpenBSD install broken
2019-09-20 23:02 Robert Krug
@ 2019-09-21 11:22 ` Mojca Miklavec
0 siblings, 0 replies; 4+ messages in thread
From: Mojca Miklavec @ 2019-09-21 11:22 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Alan BRASLAU
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.
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* OpenBSD install broken
@ 2019-09-20 23:02 Robert Krug
2019-09-21 11:22 ` Mojca Miklavec
0 siblings, 1 reply; 4+ messages in thread
From: Robert Krug @ 2019-09-20 23:02 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 2286 bytes --]
Greetings,
First, thanks for all the wonderful work on context.
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.
I include what I did below.
Thanks again,
Robert
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
3) Edit bin/mtx-update:
3a) In the table update.platforms add an entry for openbsd:
["openbsd6.5-amd64"] = "openbsd6.5-amd64",
I put this at line 198, after the entries for freebsd.
3b) In the function update.synchronize()
replace line 282:
local platforms = states.get('platforms') or { }
with:
local platforms = states.get('platforms') or {"openbsd6.5-amd64" }
3c) At the very start of local function add_collection(collection,platform)
line 417, add:
platform = "openbsd6.5-amd64"
Maybe something is broken on my system or these last two aren't
really needed, but this is what I did,
4) Edit first-setup.sh:
To avoid overwriting the files we just edited, comment out line 146:
# rsync -rlptv rsync://contextgarden.net/minimals/setup/$platform/bin .
This may interfere with future updates.
5) Install for real this time:
./first-setup.sh --modules=all
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
[-- Attachment #1.2.1: Type: text/html, Size: 3069 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-08 17:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08 17:24 OpenBSD install broken Damien Thiriet
-- strict thread matches above, loose matches on Subject: below --
2019-09-23 20:38 Robert Krug
2019-09-20 23:02 Robert Krug
2019-09-21 11:22 ` Mojca Miklavec
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).