From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/105088 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Krug Newsgroups: gmane.comp.tex.context Subject: OpenBSD install broken Date: Fri, 20 Sep 2019 23:02:58 -0000 Message-ID: <327ab547-be27-47c3-b2fb-796ca42a2d13@me.com> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7461839814979489772==" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="165198"; mail-complaints-to="usenet@blaine.gmane.org" To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sat Sep 21 01:09:32 2019 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iBS1r-000gpo-7g for gctc-ntg-context-518@m.gmane.org; Sat, 21 Sep 2019 01:09:31 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 55E54160EE3; Sat, 21 Sep 2019 01:09:11 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-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 4pxc2hNtjXzP; Sat, 21 Sep 2019 01:09:10 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5E94C164235; Sat, 21 Sep 2019 01:09:10 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 08FEE164235 for ; Sat, 21 Sep 2019 01:09:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-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 zeCkgICi16Py for ; Sat, 21 Sep 2019 01:09:08 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=17.58.38.56; helo=ms11p00im-qufo17281901.me.com; envelope-from=destiny6@mac.com; receiver= X-Greylist: delayed 366 seconds by postgrey-1.36 at zapf.ntg.nl; Sat, 21 Sep 2019 01:09:08 CEST Original-Received: from ms11p00im-qufo17281901.me.com (ms11p00im-qufo17281901.me.com [17.58.38.56]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 89595330 for ; Sat, 21 Sep 2019 01:09:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=1a1hai; t=1569020578; bh=Tmy/L9d85UIOzN73tv8nG8Z0thsePdB/cElcImLdADs=; h=To:From:Subject:Date:Message-id:Content-Type; b=d7cSQ+pQ/HScr8K4T+AlTnapHsQyjmbV2R4DoVvN+p03xWtRPcPgw3O2n4St8Ewqn +rqKgQnihxwhewoEcbXGKDiwyj4GRH8sC5JzCX1QiYuAQNZ40+XlDvWKqQIwuPP0Ks FPRCEibesYSBT6sL9jTTrugZzOLmyG0C6OSdvY6BUdsuBdEidRaFQTDPBONVUc3iJk h5ylMDFfXCetK9fjkw8hJHOOlc1pqkkWMnWJkzMDLy9lMsxY8KkiYt2PWMl0r4fCTN 4MxRRxrEWFEwy7yDmRCcwMyzv9W+YStmovoQtzUUbiDO+BuXXWLOF30hrANTj2zfun oiQCjNO4xDyUA== Original-Received: from localhost (mr36p72im-hyfv09083001.me.com [10.44.95.73]) by ms11p00im-qufo17281901.me.com (Postfix) with ESMTP id B39F7740DD0 for ; Fri, 20 Sep 2019 23:02:58 +0000 (UTC) X-Mailer: iCloud MailClient1917Project69 MailServer.10000-Famine1917-0-7136e28c2133 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-09-20_09:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=990 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1909200192 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:105088 Archived-At: --===============7461839814979489772== Content-Type: multipart/alternative; boundary=Apple-Webmail-42--9b2b6232-c55a-477c-a1eb-a96a7595223a --Apple-Webmail-42--9b2b6232-c55a-477c-a1eb-a96a7595223a Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8; format=flowed Greetings,=0A=0A=0A=0AFirst, thanks for all the wonderful work on context.= =0A=0A=0A=0ANow, to the reason for this note. I recently tries to install = context on an OpenBSD 6.5 AMD64=0A=0Asystem, but the install failed. Thank= s to some helpful emails in the archives from 2017 and 2018,=0A=0AI was ab= le to get this working by editing mtxrun and mtx-update.sh.=0A=0A=0A=0AI i= nclude what I did below.=0A=0A=0A=0AThanks again,=0A=0ARobert=0A=0A=0A=0A1= ) Do the usual:=0A=0A=C2=A0 mkdir context && cd context=0A=C2=A0 rsync -pt= v rsync://contextgarden.net/standalone/setup/first-setup.sh .=0A=C2=A0 ./f= irst-setup.sh=0A=0AThis will silently fail, because=0Abin/mtx-update.lua=0A= bin/mtxrun=0Ado not recognize openbsd.=0A=0A2) Edit bin/mtxrun:=0A=0AWe ne= ed to define a "good" version of resolvers.platform(t,k)=0AAt line 4049, t= here is a default definition. Replace it with:=0A=0A=C2=A0function resolve= rs.platform(t,k)=0A=C2=A0 local platform=3D"openbsd6.5-amd64"=0A=C2=A0 os.= setenv("MTX_PLATFORM",platform)=0A=C2=A0 os.platform=3Dplatform=0A=C2=A0 r= eturn platform=0A=C2=A0end=0A=0A3) Edit bin/mtx-update:=0A=0A3a) In the ta= ble update.platforms add an entry for openbsd:=0A=0A=C2=A0=C2=A0=C2=A0 ["o= penbsd6.5-amd64"]=C2=A0 =3D "openbsd6.5-amd64",=0A=0AI put this at line 19= 8, after the entries for freebsd.=0A=0A3b) In the function update.synchron= ize()=0A=0Areplace line 282:=0A=0A=C2=A0=C2=A0=C2=A0 local platforms=C2=A0= =C2=A0=C2=A0 =3D states.get('platforms') or { }=0A=0Awith:=0A=0A=C2=A0=C2=A0= =C2=A0 local platforms=C2=A0=C2=A0=C2=A0 =3D states.get('platforms') or {"= openbsd6.5-amd64" }=0A=0A3c) At the very start of local function add_colle= ction(collection,platform)=0Aline 417, add:=0A=0A=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 platform =3D "openbsd6.5-amd64"=0A= =0AMaybe something is broken on my system or these last two aren't=0Areall= y needed, but this is what I did,=0A=0A4) Edit first-setup.sh:=0A=0ATo avo= id overwriting the files we just edited, comment out line 146:=0A=0A# rsyn= c -rlptv rsync://contextgarden.net/minimals/setup/$platform/bin .=0A=0AThi= s may interfere with future updates.=0A=0A5) Install for real this time:=0A= =0A=C2=A0 ./first-setup.sh --modules=3Dall=0A=0A6) Finally, the setuptex s= cript gives me an error message:=0A=0A=C2=A0 megaera$ . /home//Conte= xt/tex/setuptex=0A=C2=A0 /bin/ksh: /home//Context/tex/setuptex[163]:= ${.sh.file}": bad substitution=0A=0Abut it is not hard to set the path co= rrectly:=0A=0A=C2=A0 PATH=3D$PATH\:/home//Context/tex/texmf-openbsd6= .5-amd64/bin ; export PATH=0A=0A=0A=0A --Apple-Webmail-42--9b2b6232-c55a-477c-a1eb-a96a7595223a Content-Type: multipart/related; type="text/html"; boundary=Apple-Webmail-86--9b2b6232-c55a-477c-a1eb-a96a7595223a --Apple-Webmail-86--9b2b6232-c55a-477c-a1eb-a96a7595223a Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8;
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 mtx= run 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 silent= ly fail, because
bin/mtx-update.lua
bin/mtxrun
do not recognize o= penbsd.

2) Edit bin/mtxrun:

We need to define a "good" versi= on of resolvers.platform(t,k)
At line 4049, there is a default definiti= on. Replace it with:

 function resolvers.platform(t,k)
&nbs= p; local platform=3D"openbsd6.5-amd64"
  os.setenv("MTX_PLATFORM",= platform)
  os.platform=3Dplatform
  return platform
&n= bsp;end

3) Edit bin/mtx-update:

3a) In the table update.plat= forms add an entry for openbsd:

    ["openbsd6.5-amd= 64"]  =3D "openbsd6.5-amd64",

I put this at line 198, after th= e entries for freebsd.

3b) In the function update.synchronize()
=
replace line 282:

    local platforms  = ;  =3D states.get('platforms') or { }

with:

  = ;  local platforms    =3D states.get('platforms') or {= "openbsd6.5-amd64" }

3c) At the very start of local function add_co= llection(collection,platform)
line 417, add:

   &= nbsp;        platform =3D "openbsd6.5-a= md64"

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 1= 46:

# rsync -rlptv rsync://contextgarden.net/minimals/setup/$platfo= rm/bin .

This may interfere with future updates.

5) Install = for real this time:

  ./first-setup.sh --modules=3Dall

= 6) Finally, the setuptex script gives me an error message:

  m= egaera$ . /home/<name>/Context/tex/setuptex
  /bin/ksh: /hom= e/<name>/Context/tex/setuptex[163]: ${.sh.file}": bad substitution
but it is not hard to set the path correctly:

  PATH=3D$= PATH\:/home/<name>/Context/tex/texmf-openbsd6.5-amd64/bin ; export P= ATH


--Apple-Webmail-86--9b2b6232-c55a-477c-a1eb-a96a7595223a-- --Apple-Webmail-42--9b2b6232-c55a-477c-a1eb-a96a7595223a-- --===============7461839814979489772== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============7461839814979489772==--