From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp26.services.sfr.fr ([93.17.128.211]) by ewsd; Mon Oct 19 14:36:05 -0400 2020 Received: from cauchy.polynum.local (89.121.198.77.rev.sfr.net [77.198.121.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by msfrf2634.sfr.fr (SMTP Server) with ESMTPS id 4F1D41C0019BF for <9front@9front.org>; Mon, 19 Oct 2020 20:35:54 +0200 (CEST) X-mail-filterd: 1.0.0 X-sfr-mailing: LEGIT X-sfr-spamrating: 40 X-sfr-spam: not-spam DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=polynum.com; s=202006; t=1603132554; h=Date:From:To:Subject; bh=ibaue8w5DepBbRiMiLDlwzvWzAcwQ2FLEt5 /VITn2Xs=; b=GW6xARk6XMrhQbMnuxx/SJe5Xvb938fFJmO27sTNpU1ilJ7hEoqoJ22lUQyryhz c4qL78sHyhjL/6q31AuyizduJmJIrTRIYiQpKkgOKXVNiAnjy5WiKFff5CSoW3NOic70IJfUh4Dn VGUUGWSrj8Z3vME7BvaitIOzfJ30ejMHqSFw3E65NODhQ5zeCqAnPePOHJdHtzp0NqvvsHW4PXmf DXPdk4i7n8CTCeMzqxbxzc33MBibw09KCDxL3W4rNfAFc4C2xNoDiCnGvGpmDmbQL3C1Ssuz6ujm p/IW1k5vealh6i8uAwNO0Firleue5zNhatijbzcyPtgegC5CZQg==; Received: from cauchy.polynum.local (89.121.198.77.rev.sfr.net [77.198.121.89]) by msfrf2634.sfr.fr (SMTP Server) with ESMTP id 386781C0019AF for <9front@9front.org>; Mon, 19 Oct 2020 20:35:54 +0200 (CEST) Received: from cauchy.polynum.local (89.121.198.77.rev.sfr.net [77.198.121.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by msfrf2634.sfr.fr (SMTP Server) with ESMTPS for <9front@9front.org>; Mon, 19 Oct 2020 20:35:54 +0200 (CEST) Received: from cauchy.polynum.local (localhost [127.0.0.1]) by cauchy.polynum.local (8.15.2/8.15.2) with ESMTPS id 09JHreVK000517 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for <9front@9front.org>; Mon, 19 Oct 2020 19:53:41 +0200 (CEST) Received: (from tlaronde@localhost) by cauchy.polynum.local (8.15.2/8.14.9/Submit) id 09JHreVB000639 for 9front@9front.org; Mon, 19 Oct 2020 19:53:40 +0200 (CEST) X-Authentication-Warning: cauchy.polynum.local: tlaronde set sender to thierry.laronde@sfr.fr using -f Date: Mon, 19 Oct 2020 19:53:40 +0200 From: tlaronde@polynum.com To: 9front@9front.org Subject: Pb with scripts under APE calling rc scripts Message-ID: <20201019175340.GA109@polynum.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: callback full-stack-oriented interface Hello, Note: I have updated the system to the latest release of today. For kerTeX, since I have to support a myriad of systems, the packaging system uses a small subset of POSIX.2 utilities so that I have only to write one pkg for everybody. There are some utilities that are not POSIX.2 and, by system, some bourne shell code is written to provide the functionnalities (the majority is around getting external data---downloading with ftp or http). In order to be able to more easily correct what is system dependent, the system dependent code is now a separate file, dot'ed in the main shell library file that is also! dot'ed in the pkg building script (in the previous releases, during compilation, the system dependent code was interpolated in the library so there was only one shell library file dot'ed by the pkg script). Now, when invoking utilities that are implemented as rc scripts (namely: ls(1) and hget(1)), these scripts have an environment totally cleared with apparently path unset or set to '.' being, strangely, the directory where the dot'ed chunk is. Thus the scripts don't find anything in /bin. I have circumvanted the problem by implementing ls(1) (for my use) around du(1) and by setting explicitely "path='/bin'" before calling hget(1). Further note: calling rc -c 'rfork E; some_utility ...' does not work either from inside the code. While the same commands work when invoked on the command line (even invoking "/bin/ape/sh some_script" under, already, /bin/ape/sh works...). Does this ring a bell to somebody? Best, -- Thierry Laronde http://www.kergis.com/ http://www.kergis.com/kertex.html http://www.sbfa.fr/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C