From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Gibbons Subject: Re: 01/01: services: Add =?UTF-8?Q?=E2=80=98=2Fusr=2Fbin=2Fenv=E2=80=99?= special file. Date: Sat, 07 Sep 2019 09:33:55 -0600 Message-ID: <76a6cc31864fabfb4804e91b7f5086b2f59ccbff.camel@gmail.com> References: <20190906102509.28951.2772@vcs0.savannah.gnu.org> <20190906102510.002BE21324@vcs0.savannah.gnu.org> <87d0gdbtji.fsf@cbaines.net> <87mufhwhc6.fsf@nckx> <874l1p80zr.fsf@netris.org> <6384138c4454d584c43e0a6144ed18bf458c551a.camel@gmail.com> <87lfv0wnjw.fsf@nckx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-aRSkkhQ92ucj2edbt6Il" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:44631) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6cjK-0001o5-O0 for guix-devel@gnu.org; Sat, 07 Sep 2019 11:34:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6cix-0003aF-4Q for guix-devel@gnu.org; Sat, 07 Sep 2019 11:34:22 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:43418) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i6ciw-0003SD-02 for guix-devel@gnu.org; Sat, 07 Sep 2019 11:34:02 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d15so6475476pfo.10 for ; Sat, 07 Sep 2019 08:33:59 -0700 (PDT) In-Reply-To: <87lfv0wnjw.fsf@nckx> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Tobias Geerinckx-Rice Cc: guix-devel@gnu.org --=-aRSkkhQ92ucj2edbt6Il Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Hi T-G-R, On Sat, 2019-09-07 at 09:52 +0200, Tobias Geerinckx-Rice wrote: > Jesse, > > Thanks! It was linked from another thread[0] Ludo' pasted to my > patch, though. I've read both. > > Jesse Gibbons 写道: > > Here's a post with what I think is a good argument against > > adding > > /usr/bin/env. I think the standard patch-shebang phase does a > > good job > > at preventing the potential issue, but the argument still > > applies to > > So is the argument here that Guix packages would generate scripts > at run-time that refer to /usr/bin/env? Or just that it's > currently easy to catch packages that install #!/usr/bin/env > scripts? Or something else? > > Neither /bin/sh nor /usr/bin/env are available in the build > environment. Relying on the *likely* run-time non-existence of > /usr/bin/env in *user* environments to catch *packaging* bugs does > not sound acceptable to me. > > > scripts generated by make, as I learned while attempting to port > > pysolfc. > > If you have the time, could you elaborate? It's a bit complicated. Pysolfc has a horrible build system. It doesn't build the required i18n unless you call "make test". Howevver, "make test" runs a script generates python test scripts that use #!/usr/bin/env to find both python and python2. Since they are generated by a shell script, patch- shebangs does not catch them, and it fails to find /usr/bin/env. It's a mess that I don't know how to solve. I've attached my pysolfc.scm so you can observe what I mean. Sorry it's a horrible mess of commented broken code. > > Kind regards, > > T G-R > > [0]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35910 -- -Jesse --=-aRSkkhQ92ucj2edbt6Il Content-Disposition: attachment; filename="pysolfc.scm" Content-Type: text/x-scheme; name="pysolfc.scm"; charset="UTF-8" Content-Transfer-Encoding: base64 Ozs7IEJyb2tlbiBHdWl4Cjs7OyBHdWl4IHBhY2thZ2VzIHRoYXQgYXJlIGluLXByb2dyZXNzLCBi cm9rZW4sIG5vbmZyZWUsIG9yIG90aGVyd2lzZSB3aWxsCjs7OyBub3QgYnVpbGQgYW5kIHJ1biB0 byBteSBzYXRpc2ZhY3Rpb24uCjs7Owo7OzsgQ29weXJpZ2h0IChDKSAyMDE5IEplc3NlIEdpYmJv bnMKOzs7Cjs7OyBUaGlzIHByb2dyYW0gaXMgZ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dGVk LWlucHV0cwogICAgIGAoCiAgICAgICAoInB5dGhvbjItc2l4IiAgLHB5dGhvbjItc2l4KQogICAg ICAgKCJweXRob24yLXRraW50ZXIiICxweXRob24tMiAidGsiKQogICAgICAgKCJweXRob24yLXJh bmRvbTIiICxweXRob24yLXJhbmRvbTIpCiAgICAgICAoInB5dGhvbjIiICxweXRob24tMikKICAg ICAgICgicHl0aG9uLXNpeCIgICxweXRob24tc2l4KQogICAgICAgKCJweXRob24tdGtpbnRlciIg LHB5dGhvbiAidGsiKQogICAgICAgKCJweXRob24tcmFuZG9tMiIgLHB5dGhvbi1yYW5kb20yKSkp CiAgIChhcmd1bWVudHMKICAgIGAoIzpweXRob24gLHB5dGhvbgogICAgICAjOnBoYXNlcyAobW9k aWZ5LXBoYXNlcyAlc3RhbmRhcmQtcGhhc2VzCgkJCSAgICAgIDs7IChhZGQtYmVmb3JlICdwYXRj aC1nZW5lcmF0ZWQtZmlsZS1zaGViYW5ncyAnZ2VuZXJhdGUtdGVzdHMKCQkJICAgICAgOzsgCQkg KGxhbWJkYSBfCgkJCSAgICAgIDs7IAkJICAgKGJlZ2luCgkJCSAgICAgIDs7IAkJICAgICAoaW52 b2tlICJtYWtlIiAicHJldGVzdCIpCgkJCSAgICAgIDs7IAkJICAgICAoc3lzdGVtICJlY2hvID09 PT09PT09PT09PT09PT09IikKCQkJICAgICAgOzsgCQkgICAgIChpbnZva2UgImVjaG8iIChzdHJp bmctYXBwZW5kICIjISIgKHdoaWNoICJlbnYiKSkpCgkJCSAgICAgIDs7IAkJICAgICAoc3Vic3Rp dHV0ZSogKGZpbmQtZmlsZXMgInRlc3RzIiAiXFwucHkkIikKCQkJICAgICAgOzsgCQkJCSAgKCgi IyEvdXNyL2Jpbi9lbnYiKQoJCQkgICAgICA7OyAJCQkJICAgKHN0cmluZy1hcHBlbmQgIiMhIiAo d2hpY2ggImVudiIpKSkpCgkJCSAgICAgIDs7IAkJICAgICApKSkKCQkJICAgICAgOzsgKGFkZC1i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gKHZlcnNpb24gIjEuMC4xIikKICAgKHNvdXJjZQogICAgKG9y aWdpbgogICAgIChtZXRob2QgdXJsLWZldGNoKQogICAgICh1cmkgKHB5cGktdXJpICJyYW5kb20y IiB2ZXJzaW9uICIuemlwIikpCiAgICAgKHNoYTI1NgogICAgICAoYmFzZTMyCiAgICAgICAiMDF5 MHM0NzQ3cGxzeDhmZG54eTBuejgzZHA2OW5hZGR6NThtODFyOWgwczFxZm0zMWI5bCIpKSkpCiAg IChuYXRpdmUtaW5wdXRzCiAgICBgKCgidW56aXAiICx1bnppcCkpKQogICAoYnVpbGQtc3lzdGVt IHB5dGhvbi1idWlsZC1zeXN0ZW0pCiAgIChhcmd1bWVudHMKICAgIGAoIzpweXRob24gLHB5dGhv bgogICAgICAjOnVzZS1zZXR1cHRvb2xzPyAjZikpCiAgIChob21lLXBhZ2UgImh0dHA6Ly9weXBp LnB5dGhvbi5vcmcvcHlwaS9yYW5kb20yIikKICAgKHN5bm9wc2lzCiAgICAiUHl0aG9uIDMgY29t cGF0aWJsZSBQeXRvaG4gMiBgcmFuZG9tYCBNb2R1bGUuIikKICAgKGRlc2NyaXB0aW9uCiAgICAi UHl0aG9uIDMgY29tcGF0aWJsZSBQeXRvaG4gMiBgcmFuZG9tYCBNb2R1bGUuIikKICAgKGxpY2Vu c2UgI2YpKSkKCihkZWZpbmUgcHl0aG9uMi1yYW5kb20yCiAgKHBhY2thZ2UKICAgKG5hbWUgInB5 dGhvbjItcmFuZG9tMiIpCiAgICh2ZXJzaW9uICIxLjAuMSIpCiAgIChzb3VyY2UKICAgIChvcmln aW4KICAgICAobWV0aG9kIHVybC1mZXRjaCkKICAgICAodXJpIChweXBpLXVyaSAicmFuZG9tMiIg dmVyc2lvbiAiLnppcCIpKQogICAgIChzaGEyNTYKICAgICAgKGJhc2UzMgogICAgICAgIjAxeTBz NDc0N3Bsc3g4ZmRueHkwbno4M2RwNjluYWRkejU4bTgxcjloMHMxcWZtMzFiOWwiKSkpKQogICAo bm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