From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/100576 Path: news.gmane.org!.POSTED!not-for-mail From: Brian Hunt Newsgroups: gmane.comp.tex.context Subject: Re: Build for Alpine Linux Date: Fri, 13 Apr 2018 10:37:05 +0000 Message-ID: References: <026e5b07-3364-2011-50bf-29a249fb41b7@xs4all.nl> <6a1d4148-1bb5-2633-d9e1-9859c05bb665@gmx.es> <1523235042.18581.29.camel@gmail.com> <20180409193518.GA2842220@phare.normalesup.org> <20180410205530.GD3878032@phare.normalesup.org> <1523488418.18581.52.camel@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8628035490104458014==" X-Trace: blaine.gmane.org 1523615825 2238 195.159.176.226 (13 Apr 2018 10:37:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 13 Apr 2018 10:37:05 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Apr 13 12:37:01 2018 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 esmtp (Exim 4.84_2) (envelope-from ) id 1f6w4i-0000Q9-7R for gctc-ntg-context-518@m.gmane.org; Fri, 13 Apr 2018 12:37:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C4F246262F5; Fri, 13 Apr 2018 12:37:32 +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 j-Z6ABF_2XTc; Fri, 13 Apr 2018 12:37:32 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 3F4386262F6; Fri, 13 Apr 2018 12:37:31 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 0FF486262F1 for ; Fri, 13 Apr 2018 12:37:28 +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 PUiCiLc5N2iO for ; Fri, 13 Apr 2018 12:37:27 +0200 (CEST) Original-Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 1ACFC6262FC for ; Fri, 13 Apr 2018 12:37:17 +0200 (CEST) Original-Received: by mail-wm0-f43.google.com with SMTP id t67so4263274wmt.0 for ; Fri, 13 Apr 2018 03:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=KtW68a40MX8hwp1Bi3twSpVvab1sDBaJTQWgISgn5uQ=; b=ZjkRWQFmXtPU4wF2RkNdLgG5rb51DbtVsfs56aZL4Z1oB6sBVJODONIm4V0jTzFq6C Xu6NQ8GSV7fu7jWGcBDyfWf+ShUoX73DecVyA4WTd2o3i60ybqSuP6YZoHzclgsye9so r8nZyhuyAv9wmWgwKIRtZ0mPKOK9I8KxK/75F/U0g9kmWXGLyck02LAAHPodjhEZeyAp Eq9xEULChfwSZbjQNSkSN+sO+/76DX31gVMWVOKMggra5W50JQniq1pQAjbagjTamdag Twi/mNhzgEzBHBWdmK4njCqPTdP2IbndOM0DE/lS8ALEMsxuM+rt5qDLpxi7eE/sUS8Z 5fXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=KtW68a40MX8hwp1Bi3twSpVvab1sDBaJTQWgISgn5uQ=; b=eDIHpYyqTWESxS0J9h89F1uj6BhGszeb7WrbZUpbZpAWEGbyX6/Dw/IEceTgwA/Mng VWTl3ZfuPyJLdyrwTFCMhA0PVdfK5bMJoEz3kkBBiNtzV6dZSyTXV3wnI+vUAdjl8ExS vo6sH7Ixjy022WawmOz3/fHnF0EqNsfX4cn5JikTJhPJPZI/2Cu1JYZ/QTZpt4sgWfB6 yfHPWup4OdR8aUoQd8MF0YP/IVROqFjnv60GehC4qchBlc7Mf0KHl+rPRgivcic+bFvp z55Dm5DPFg/sLvK4R0IzPBvQWG/bXQBae4h0yCXOPLJbMc61vWhSsTOvvUHCaDK7hNP4 mySQ== X-Gm-Message-State: ALQs6tC1W4csyPkLTBmC+IFy1ZSC2t/t21O1XbkVWzEamUO0bDGnRwvq hjgnviBtJyUvcLHvUHvFNjqn30PU+ox5LMmF71rQ6Q== X-Google-Smtp-Source: AIpwx4/uQvnztXUQdzD/UKQ71jpWjSrGxW/INLWxBblfBPIi2Uo+151sfSx6QNCXM+2Xwc+VRtRpFS2jiaroImjsmd4= X-Received: by 10.80.173.189 with SMTP id a58mr9162543edd.88.1523615836501; Fri, 13 Apr 2018 03:37:16 -0700 (PDT) In-Reply-To: <1523488418.18581.52.camel@gmail.com> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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:100576 Archived-At: --===============8628035490104458014== Content-Type: multipart/alternative; boundary="94eb2c0c3d3cb57d5e0569b87495" --94eb2c0c3d3cb57d5e0569b87495 Content-Type: text/plain; charset="UTF-8" For those interested in reproducing the issues experienced on Alpine, I've published an image that you should be able to start with: $ docker run -ti brianmhunt/context-alpine:demo (You can see the Dockerfile etc here: https://hub.docker.com/r/brianmhunt/context-alpine/) That image applies the TODO/workarounds previously posted (sometimes inelegantly) and brings it to the point where I got stuck, namely luatools and context erroring with "unknown script base.lua" and "unknown script context.lua", respectively. On Wed, 11 Apr 2018 at 19:14 Henri Menke wrote: > On Wed, 2018-04-11 at 20:08 +0000, Brian Hunt wrote: > > So here's what I've got for a TODO so far to get ConTeXt working on > Alpine > > Linux with musl (subject to item #6, mtx-context.lua not being found): > > > > 1. Add the musl test to first-setup.sh > > 2. Add the same musl test to tex/setuptex > > 3. Add texlua (and texluac?) to > > a. the setup rsync bin/ directories > > b. the tex/texmf-linuxmusl(|-ppc|-64) > > 4. Update mtxrun > > > > Here's code that ought to work for detecting musl in mtxrun. Around > line 3721 > > of the mtxrun add: > > > > if find(architecture,"x86_64",1,true) then > > platform="linux-64" > > elseif find(architecture,"ppc",1,true) then > > platform="linux-ppc" > > else > > platform="linux" > > end > > + if resultof("ldd --version 2>&1"):find("musl") ~= nil then > > + platform = platform:gsub("linux", "linuxmusl") > > + end > > > > 5. Note that in tex/setuptex, there's evidently no way to get the current > > script so one has to explicitly provide the TeX directory (appears to be > a > > BusyBox bug). > > Standard POSIX sh has no way to reliably detect sourced invocation of a > script. > BusyBox uses POSIX sh underneath and thus suffers from the same > limitation. See > StackOverflow for detail: > https://stackoverflow.com/questions/29832037 > > > 6. `context` is unable to locate `mtx-context.lua`. Some tracker output > sheds > > some light: > > i. context --trackers=resolvers.expansions is identical > > ii. context --trackers=resolvers.details,resolvers.details differs, > with the > > output attached. Note that to keep the comparison short I removed lines > that > > differed only because `linux` had been changed to `linuxmusl`. > > > > Will keep plugging away to see if I can determine why `mtx-context.lua` > cannot > > be found on Alpine Linux. > > > > Thanks for reading. > > > > Brian > > > > -- > > from the personal account of: > > Brian M Hunt > > Direct: +1-289-684-4677 <(289)%20684-4677> > > LinkedIn: https://linkedin.com/in/brianmhunt > > This e-mail may contain information that is private, privileged, > confidential > > and/or exempt from disclosure. Except as per this notice no waiver of > any kind > > is intended by sending this e-mail, and this email is intended only for > the > > named recipient(s) or the subscribers of a forwarding service the email > is > > sent directly to and to which service you are an authorized recipient. > Use, > > dissemination or copying without authorization is prohibited. Please > notify > > the sender and destroy all copies of this e-mail if you have received > this > > email in error. > > > ______________________________________________________________________________ > > _____ > > 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 > > > ______________________________________________________________________________ > > _____ > > ___________________________________________________________________________________ > 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 > > ___________________________________________________________________________________ -- *from the personal account of:* *Brian M Hunt * Direct: +1-289-684-4677 LinkedIn: https://linkedin.com/in/brianmhunt *This e-mail may contain information that is private, privileged, confidential and/or exempt from disclosure. Except as per this notice no waiver of any kind is intended by sending this e-mail, and this email is intended only for the named recipient(s) or the subscribers of a forwarding service the email is sent directly to and to which service you are an authorized recipient. Use, dissemination or copying without authorization is prohibited. Please notify the sender and destroy all copies of this e-mail if you have received this email in error.* --94eb2c0c3d3cb57d5e0569b87495 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
For those interested in reproducing the issues experienced= on Alpine, I've published an image that you should be able to start wi= th:

$ docker run -ti brianmhunt/context-alpine:demo

(You can see the Dockerfile etc here:=C2=A0https://hub.docker.com= /r/brianmhunt/context-alpine/)

That image appl= ies the TODO/workarounds previously posted (sometimes inelegantly) and brin= gs it to the point where I got stuck, namely luatools and context erroring = with "unknown script base.lua" and "unknown script context.l= ua", respectively.


On Wed, 11 Apr 2018 at 19:14 Henri Menke <henrimenke@gmail.com> wrote:
On Wed, 2018-04-11 at 20:08 +0000, Brian = Hunt wrote:
> So here's what I've got for a TODO so far to get ConTeXt worki= ng on Alpine
> Linux with musl (subject to item #6, mtx-context.lua not being found):=
>
> 1. Add the musl test to first-setup.sh
> 2. Add the same musl test to tex/setuptex
> 3. Add texlua (and texluac?) to
> =C2=A0 a. the setup rsync bin/ directories
> =C2=A0 b. the tex/texmf-linuxmusl(|-ppc|-64)
> 4. Update mtxrun
>
> Here's code that ought to work for detecting musl in mtxrun.=C2=A0= Around line 3721
> of the mtxrun add:
>
> =C2=A0 =C2=A0 if find(architecture,"x86_64",1,true) then
> =C2=A0 =C2=A0 =C2=A0 platform=3D"linux-64"
> =C2=A0 =C2=A0 elseif find(architecture,"ppc",1,true) then > =C2=A0 =C2=A0 =C2=A0 platform=3D"linux-ppc"
> =C2=A0 =C2=A0 else
> =C2=A0 =C2=A0 =C2=A0 platform=3D"linux"
> =C2=A0 =C2=A0 end
> +=C2=A0 =C2=A0if resultof("ldd --version 2>&1"):find(= "musl") ~=3D nil then
> +=C2=A0 =C2=A0 =C2=A0platform =3D platform:gsub("linux", &qu= ot;linuxmusl")
> +=C2=A0 =C2=A0end=C2=A0
>
> 5. Note that in tex/setuptex, there's evidently no way to get the = current
> script so one has to explicitly provide the TeX directory (appears to = be a
> BusyBox bug).

Standard POSIX sh has no way to reliably detect sourced invocation of a scr= ipt.
BusyBox uses POSIX sh underneath and thus suffers from the same limitation.= See
StackOverflow for detail:
https://stackoverflow.com/questions/29832037

> 6. `context` is unable to locate `mtx-context.lua`.=C2=A0 Some tracker= output sheds
> some light:
> =C2=A0 i.=C2=A0context --trackers=3Dresolvers.expansions is identical<= br> > =C2=A0 ii. context --trackers=3Dresolvers.details,resolvers.details di= ffers, with the
> output attached.=C2=A0 Note that to keep the comparison short I remove= d lines that
> differed only=C2=A0because `linux` had been changed to `linuxmusl`. >
> Will keep plugging away to see if I can determine why `mtx-context.lua= ` cannot
> be found on Alpine Linux.
>
> Thanks for reading.
>
> Brian
>
> --=C2=A0
> from the personal account of:
> Brian M Hunt <brianmhunt@gmail.com>
> Direct: +1-289-684-4677
> LinkedIn:=C2=A0https://linkedin.com/in/brianmhunt
> This e-mail may contain information that is private, privileged, confi= dential
> and/or exempt from disclosure. Except as per this notice no waiver of = any kind
> is intended by sending this e-mail, and this email is intended only fo= r the
> named recipient(s) or the subscribers of a forwarding service the emai= l is
> sent directly to and to which service you are an authorized recipient.= Use,
> dissemination or copying without authorization is prohibited. Please n= otify
> the sender and destroy all copies of this e-mail if you have received = this
> email in error.
> ______________________________________________________________________= ________
> _____
> 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/listin= fo/ntg-context
> webpage=C2=A0=C2=A0: http://www.pragma-ade.nl / http://context.aanh= et.net
> archive=C2=A0=C2=A0: https://bitbucket.org/phg= /context-mirror/commits/
> wiki=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0: http://contextgarden.net
> ______________________________________________________________________= ________
> _____
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--

from the personal account of:

Brian M Hunt <brianmhunt@gmail.com>
Direct: += 1-289-684-4677
LinkedIn:=C2=A0https://linkedin.com/in/brianmhunt

This e-mail may contain information that = is private, privileged, confidential and/or exempt from disclosure. Except = as per this notice no waiver of any kind is intended by sending this e-mail= , and this email is intended only for the named recipient(s) or the subscri= bers of a forwarding service the email is sent directly to and to which ser= vice you are an authorized recipient. Use, dissemination or copying without= authorization is prohibited. Please notify the sender and destroy all copi= es of this e-mail if you have received this email in error.
<= /p>

--94eb2c0c3d3cb57d5e0569b87495-- --===============8628035490104458014== 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 X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============8628035490104458014==--