GNU bug report logs - #39807
[PATCH] guix: pack: Only wrap executable files.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Eric Bavier <bavier@HIDDEN>; Keywords: patch; dated Thu, 27 Feb 2020 04:55:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 39807 <at> debbugs.gnu.org:


Received: (at 39807) by debbugs.gnu.org; 30 Mar 2020 02:35:38 +0000
From ludo@HIDDEN Sun Mar 29 10:39:38 2020
Received: from eggs.gnu.org ([209.51.188.92]:49176)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jIZ69-0003ge-Fr
 for 39807 <at> debbugs.gnu.org; Sun, 29 Mar 2020 10:39:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52042)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1jIZ64-0002y2-9A; Sun, 29 Mar 2020 10:39:32 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=49786 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jIZ63-00026I-QE; Sun, 29 Mar 2020 10:39:32 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Eric Bavier <bavier@HIDDEN>
Cc: 39807 <at> debbugs.gnu.org
Subject: Re: [bug#39807] [PATCH] guix: pack: Only wrap executable files.
References: <20200227043604.13102-1-bavier@HIDDEN>
 <87d09pohrj.fsf@HIDDEN> <8d8a2e1209d82e136d36222683967956@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 10 Germinal an 228 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Sun, 29 Mar 2020 16:39:30 +0200
In-Reply-To: <8d8a2e1209d82e136d36222683967956@HIDDEN> (Eric Bavier's
 message of "Thu, 26 Mar 2020 21:27:14 -0500")
Message-ID: <87a73z1azh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39807
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 29 Mar 2020 14:39:38 -0000

Hi Eric,

Eric Bavier <bavier@HIDDEN> skribis:

> On 06.03.2020 05:16, Ludovic Court=C3=A8s wrote:

[...]

>>> I feel like a test should be added to
>>> tests/guix-pack-relocatable.sh, but
>>> I'm not sure how to do that while keeping the test lightweight.
>>> Suggestions
>>> welcome.
>>
>> Not sure how to do that.  Since =E2=80=98guix pack=E2=80=99 accepts mani=
fests, you
>> could
>> have a manifest containing a =E2=80=98computed-file=E2=80=99 with a file=
 that shouldn=E2=80=99t
>> be wrapped, and then you could ensure that=E2=80=99s indeed the case.  O=
r you
>> could try with =E2=80=98git-minimal=E2=80=99 or some other package that =
exhibits the
>> problem?
>
> I almost have a working test using 'git-minimal', but I'm not happy
> with the quantity of code needed to setup, and I'm worried now that
> that test would be relying on an implementation detail that could
> change in the future without us noticing (e.g. a git subcommand that's
> currently a shell script is subsumed into git so the test no longer
> checks what we want).
>
> So I think I'll try going the manifest/computed-file route instead.

OK.

>>> -          (for-each build-wrapper
>>> -                    (append (find-files (string-append input "/bin"))
>>> -                            (find-files (string-append input
>>> "/sbin"))
>>> -                            (find-files (string-append input
>>> "/libexec")))))))
>>> +          (receive (executables others)
>>
>> I=E2=80=99d prefer srfi-11 =E2=80=98let-values=E2=80=99.  :-)
>
> I tried let-values to begin with, but I found 'receive' to be much
> easier on the eyes.  For the case of binding values from a single
> expression, does let-values offer benefits?  And there are no other
> uses of let-values in this module, so precedent/consistency doesn't
> seem to have weight.

OK, no big deal.

There are probably more uses of =E2=80=98let-values=E2=80=99 than =E2=80=98=
receive=E2=80=99 overall.
That said, I think we can start switching to srfi-71, which is nicer
than both of these.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#39807; Package guix-patches. Full text available.

Message received at 39807 <at> debbugs.gnu.org:


Received: (at 39807) by debbugs.gnu.org; 27 Mar 2020 02:53:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 26 22:53:37 2020
Received: from localhost ([127.0.0.1]:60428 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jHf7h-0003lk-VQ
	for submit <at> debbugs.gnu.org; Thu, 26 Mar 2020 22:53:37 -0400
Received: from mout01.posteo.de ([185.67.36.65]:53421)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bavier@HIDDEN>) id 1jHf7e-0003lS-JO
 for 39807 <at> debbugs.gnu.org; Thu, 26 Mar 2020 22:53:27 -0400
Received: from submission (posteo.de [89.146.220.130]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 9FB2E16005C
 for <39807 <at> debbugs.gnu.org>; Fri, 27 Mar 2020 03:53:19 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1585277599; bh=Oxh0KUm3tGUsBCRL6c4eUM1jZtHu7r227HpOdSNVxmc=;
 h=Date:From:To:Subject:From;
 b=BikptcPR1cJg6EDoMkJeowxo/DsF5PGuO5u37iOpgKdsKyKp11Iefps0sGQXkYRx5
 QCMuU2YvBxjIYHbeZsExJpnOXQTU/r7G1FDJsMh7DJU249QjzyZBrQqmo/yEe8HRoS
 XMIAgIbXP7g2F/hRszDFWB0kdVoyatJTH3gTWlUCqf/lCK7ZJm+9X3f664f8wAiMUU
 /gAqhKqH1cvphj76k8YeBXkqA8FIxrEOXnfp5BuV6Vpi9RwQb5NjV+glkZO4hSynAc
 AQjy5/oc8dI2rblT3uhEmExl+zPyoeIl13KbzWdaFe60+GdeKKbHfVTUdXL73vl/Rx
 0RnBp2SJkwNWw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 48pRHg0V03z6tmD
 for <39807 <at> debbugs.gnu.org>; Fri, 27 Mar 2020 03:53:18 +0100 (CET)
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="=_cb8bb2e850f8bafef4813125ab63d049"
Date: Thu, 26 Mar 2020 21:53:18 -0500
From: Eric Bavier <bavier@HIDDEN>
To: 39807 <39807 <at> debbugs.gnu.org>
Subject: Re: [bug#39807] [PATCH] guix: pack: Only wrap executable files.
In-Reply-To: <87h7ydljyv.fsf@HIDDEN>
References: <20200227043604.13102-1-bavier@HIDDEN>
 <87d09pohrj.fsf@HIDDEN> <87h7ydljyv.fsf@HIDDEN>
Message-ID: <9929712b169123d7f35169919dfaaa9c@HIDDEN>
X-Sender: bavier@HIDDEN
User-Agent: Posteo Webmail
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 39807
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=_cb8bb2e850f8bafef4813125ab63d049
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII;
 format=flowed

Latest patch attached.
-- 
`~Eric
--=_cb8bb2e850f8bafef4813125ab63d049
Content-Transfer-Encoding: base64
Content-Type: text/x-diff;
 name=0001-wip-guix-pack-Only-wrap-executable-files.patch
Content-Disposition: attachment;
 filename=0001-wip-guix-pack-Only-wrap-executable-files.patch;
 size=5512

RnJvbSA1YjljMGExNDA4MzcxMzg3NDBiMmI0ZjA3MzM4OTAxOTQ4ZjA4NTE1IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBFcmljIEJhdmllciA8YmF2aWVyQG1lbWJlci5mc2Yub3JnPgpE
YXRlOiBNb24sIDI0IEZlYiAyMDIwIDIzOjQ3OjAyIC0wNjAwClN1YmplY3Q6IFtQQVRDSF0gd2lw
OiBndWl4OiBwYWNrOiBPbmx5IHdyYXAgZXhlY3V0YWJsZSBmaWxlcy4KCiogZ3VpeC9zY3JpcHR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zIGZp
bGUgaXMgcGFydCBvZiBHTlUgR3VpeC4KIDs7OwpAQCAtNjkwLDkgKzY5MSwxMSBAQCBsYXN0IHJl
c29ydCBmb3IgcmVsb2NhdGlvbi4iCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZ3Vp
eCBidWlsZCB1bmlvbikpKQogICAgICAgI34oYmVnaW4KICAgICAgICAgICAodXNlLW1vZHVsZXMg
KGd1aXggYnVpbGQgdXRpbHMpCi0gICAgICAgICAgICAgICAgICAgICAgICgoZ3VpeCBidWlsZCB1
bmlvbikgIzpzZWxlY3QgKHJlbGF0aXZlLWZpbGUtbmFtZSkpCisgICAgICAgICAgICAgICAgICAg
ICAgICgoZ3VpeCBidWlsZCB1bmlvbikgIzpzZWxlY3QgKHN5bWxpbmstcmVsYXRpdmUpKQorICAg
ICAgICAgICAgICAgICAgICAgICAoc3JmaSBzcmZpLTEpCiAgICAgICAgICAgICAgICAgICAgICAg
IChpY2UtOSBmdHcpCi0gICAgICAgICAgICAgICAgICAgICAgIChpY2UtOSBtYXRjaCkpCisgICAg
ICAgICAgICAgICAgICAgICAgIChpY2UtOSBtYXRjaCkKKyAgICAgICAgICAgICAgICAgICAgICAg
KGljZS05IHJlY2VpdmUpKQogCiAgICAgICAgICAgKGRlZmluZSBpbnB1dAogICAgICAgICAgICAg
OzsgVGhlIE9VVFBVVCogb3V0cHV0IG9mIFBBQ0tBR0UuCkBAIC03NDMsMTUgKzc0NiwyNiBAQCBs
YXN0IHJlc29ydCBmb3IgcmVsb2NhdGlvbi4iCiAgICAgICAgICAgKG1rZGlyIHRhcmdldCkKICAg
ICAgICAgICAoZm9yLWVhY2ggKGxhbWJkYSAoZmlsZSkKICAgICAgICAgICAgICAgICAgICAgICAo
dW5sZXNzIChtZW1iZXIgZmlsZSAnKCIuIiAiLi4iICJiaW4iICJzYmluIiAibGliZXhlYyIpKQot
ICAgICAgICAgICAgICAgICAgICAgICAgKGxldCAoKGZpbGUqIChzdHJpbmctYXBwZW5kIGlucHV0
ICIvIiBmaWxlKSkpCi0gICAgICAgICAgICAgICAgICAgICAgICAgIChzeW1saW5rIChyZWxhdGl2
ZS1maWxlLW5hbWUgdGFyZ2V0IGZpbGUqKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAoc3RyaW5nLWFwcGVuZCB0YXJnZXQgIi8iIGZpbGUpKSkpKQorICAgICAgICAgICAgICAg
ICAgICAgICAgKHN5bWxpbmstcmVsYXRpdmUgKHN0cmluZy1hcHBlbmQgaW5wdXQgICIvIiBmaWxl
KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHN0cmluZy1hcHBl
bmQgdGFyZ2V0ICIvIiBmaWxlKSkpKQogICAgICAgICAgICAgICAgICAgICAoc2NhbmRpciBpbnB1
dCkpCiAKLSAgICAgICAgICAoZm9yLWVhY2ggYnVpbGQtd3JhcHBlcgotICAgICAgICAgICAgICAg
ICAgICAoYXBwZW5kIChmaW5kLWZpbGVzIChzdHJpbmctYXBwZW5kIGlucHV0ICIvYmluIikpCi0g
ICAgICAgICAgICAgICAgICAgICAgICAgICAgKGZpbmQtZmlsZXMgKHN0cmluZy1hcHBlbmQgaW5w
dXQgIi9zYmluIikpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGZpbmQtZmlsZXMgKHN0
cmluZy1hcHBlbmQgaW5wdXQgIi9saWJleGVjIikpKSkpKSkKKyAgICAgICAgICAocmVjZWl2ZSAo
ZXhlY3V0YWJsZXMgb3RoZXJzKQorICAgICAgICAgICAgICAocGFydGl0aW9uIGV4ZWN1dGFibGUt
ZmlsZT8KKyAgICAgICAgICAgICAgICAgICAgICAgICAoYXBwZW5kIChmaW5kLWZpbGVzIChzdHJp
bmctYXBwZW5kIGlucHV0ICIvYmluIikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAoZmluZC1maWxlcyAoc3RyaW5nLWFwcGVuZCBpbnB1dCAiL3NiaW4iKSkKKyAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIChmaW5kLWZpbGVzIChzdHJpbmctYXBwZW5kIGlucHV0ICIv
bGliZXhlYyIpKSkpCisgICAgICAgICAgICA7OyBXcmFwIG9ubHkgZXhlY3V0YWJsZXMsIHNpbmNl
IHRoZSB3cmFwcGVyIHdpbGwgZXZlbnR1YWxseSBuZWVkCisgICAgICAgICAgICA7OyB0byBleGVj
dmUgdGhlbS4gIEUuZy4gZ2l0J3MgImxpYmV4ZWMiIGRpcmVjdG9yeSBjb250YWlucyBtYW55Cisg
ICAgICAgICAgICA7OyBzaGVsbCBzY3JpcHRzIHRoYXQgYXJlIHNvdXJjZSdkIGZyb20gZWxzZXdo
ZXJlLCB3aGljaCBmYWlscyBpZgorICAgICAgICAgICAgOzsgdGhleSBhcmUgd3JhcHBlZC4KKyAg
ICAgICAgICAgIChmb3ItZWFjaCBidWlsZC13cmFwcGVyIGV4ZWN1dGFibGVzKQorICAgICAgICAg
ICAgOzsgTGluayBhbnkgb3RoZXIgbm9uLWV4ZWN1dGFibGUgZmlsZXMKKyAgICAgICAgICAgIChm
b3ItZWFjaCAobGFtYmRhIChvbGQpCisgICAgICAgICAgICAgICAgICAgICAgICAobGV0ICgobmV3
IChzdHJpbmctYXBwZW5kIHRhcmdldCAoc3RyaXAtc3RvcmUtcHJlZml4IG9sZCkpKSkKKyAgICAg
ICAgICAgICAgICAgICAgICAgICAgKG1rZGlyLXAgKGRpcm5hbWUgbmV3KSkKKyAgICAgICAgICAg
ICAgICAgICAgICAgICAgKHN5bWxpbmstcmVsYXRpdmUgb2xkIG5ldykpKQorICAgICAgICAgICAg
ICAgICAgICAgIG90aGVycykpKSkpCiAKICAgKGNvbXB1dGVkLWZpbGUgKHN0cmluZy1hcHBlbmQK
ICAgICAgICAgICAgICAgICAgIChjb25kICgocGFja2FnZT8gcGFja2FnZSkKZGlmZiAtLWdpdCBh
L3Rlc3RzL2d1aXgtcGFjay1yZWxvY2F0YWJsZS5zaCBiL3Rlc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
K2lmIHVuc2hhcmUgLXIgdHJ1ZQkJIyBBcmUgdXNlciBuYW1lc3BhY2VzIHN1cHBvcnRlZD8KK3Ro
ZW4KKyAgICB1bnNoYXJlIC1tcmYgXAorCSAgICBzaCAtYyAnbW91bnQgLXQgdG1wZnMgbm9uZSAi
JEhPTUUiOyAjIEZvcmJpZCBnaXQgdG8gcmVhZCB1c2VyIGNvbmZpZ3MKKyAgICAgICAgICAgICAg
ICAgICBtb3VudCAtdCB0bXBmcyBub25lICIkU1RPUkVfUEFSRU5UIjsgXAorICAgICAgICAgICAg
ICAgICAgJyIkZG9fdGVzdCIKKyAgICBjZCAtCitlbHNlCisgICAgKCAkZG9fdGVzdCApCitmaQor
Z3JlcCAnZ2l0IHZlcnNpb24nICIkdGVzdF9kaXJlY3Rvcnkvb3V0cHV0IgorZ3JlcCAnb2N0b3B1
cycgIiR0ZXN0X2RpcmVjdG9yeS9vdXRwdXQiCi0tIAoyLjI1LjIKCg==
--=_cb8bb2e850f8bafef4813125ab63d049--





Information forwarded to guix-patches@HIDDEN:
bug#39807; Package guix-patches. Full text available.

Message received at 39807 <at> debbugs.gnu.org:


Received: (at 39807) by debbugs.gnu.org; 27 Mar 2020 02:30:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 26 22:30:05 2020
Received: from localhost ([127.0.0.1]:60421 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jHel2-000388-TF
	for submit <at> debbugs.gnu.org; Thu, 26 Mar 2020 22:30:05 -0400
Received: from mout01.posteo.de ([185.67.36.65]:57279)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bavier@HIDDEN>) id 1jHel0-00037D-Cx
 for 39807 <at> debbugs.gnu.org; Thu, 26 Mar 2020 22:30:03 -0400
Received: from submission (posteo.de [89.146.220.130]) 
 by mout01.posteo.de (Postfix) with ESMTPS id B13E316005C
 for <39807 <at> debbugs.gnu.org>; Fri, 27 Mar 2020 03:29:56 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1585276196; bh=CwsPafNU9ye0P/iuivWIMsjnMapMKh/DcNz6P1i79Uk=;
 h=Date:From:To:Subject:From;
 b=JnBYfSKBAuH/oXmHqeGVo1vHz9bTbATYByZmURj5LwIE6vaLhcxTRqJUSk6qhLm8f
 s5oULx37lNavTKWyd/NsmvRzBslnxQV6pemMIRrXYNVXgQliVrH9uyrFSD0XKNneEL
 wsE96Fv0xIq3Vo7S2DMkg3pLAxG2TeNckPoDz63ab+QEVkbiPCapn5Mf89bVrAU31a
 e97Tf6qu6isxFCtbyrTdDTtEapDCxZReByjgL1i7xwY4d9k9zspPA+SZ9fqz5XS+hf
 RGDT+9esELQ7Dd2dG28c68hUz9lyETLnLnoAJLfeQE3LVUSWhxs4p0JQvWNqrkMje/
 UyuvaVDLFHDUA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 48pQmh1k73z6tmD
 for <39807 <at> debbugs.gnu.org>; Fri, 27 Mar 2020 03:29:56 +0100 (CET)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: quoted-printable
Date: Thu, 26 Mar 2020 21:29:56 -0500
From: Eric Bavier <bavier@HIDDEN>
To: 39807 <at> debbugs.gnu.org
Subject: Re: [bug#39807] [PATCH] guix: pack: Only wrap executable files.
In-Reply-To: <87d09pohrj.fsf@HIDDEN>
References: <20200227043604.13102-1-bavier@HIDDEN> <87d09pohrj.fsf@HIDDEN>
Message-ID: <9e3d0e2f06b5d7994d35d10d687773ac@HIDDEN>
X-Sender: bavier@HIDDEN
User-Agent: Posteo Webmail
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 39807
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

On 06.03.2020 05:16, Ludovic Court=C3=A8s wrote:
> Hi,
>=20
> Eric Bavier <bavier@HIDDEN> skribis:
>=20
>> From: Eric Bavier <bavier@HIDDEN>
>>=20
>> I feel like a test should be added to tests/guix-pack-relocatable.sh,=20
>> but
>> I'm not sure how to do that while keeping the test lightweight. =20
>> Suggestions
>> welcome.
>=20
> Not sure how to do that.  Since =E2=80=98guix pack=E2=80=99 accepts manif=
ests, you=20
> could
> have a manifest containing a =E2=80=98computed-file=E2=80=99 with a file =
that shouldn=E2=80=99t
> be wrapped, and then you could ensure that=E2=80=99s indeed the case.  Or=
 you
> could try with =E2=80=98git-minimal=E2=80=99 or some other package that e=
xhibits the
> problem?

I almost have a working test using 'git-minimal', but I'm not happy with=20
the quantity of code needed to setup, and I'm worried now that that test=20
would be relying on an implementation detail that could change in the=20
future without us noticing (e.g. a git subcommand that's currently a=20
shell script is subsumed into git so the test no longer checks what we=20
want).

So I think I'll try going the manifest/computed-file route instead.

>=20
>> * guix/scripts/pack.scm (wrapped-package)<build>: Build wrappers for
>> executable files and symlink others.
>=20
> [...]
>=20
>> -          (for-each build-wrapper
>> -                    (append (find-files (string-append input "/bin"))
>> -                            (find-files (string-append input=20
>> "/sbin"))
>> -                            (find-files (string-append input=20
>> "/libexec")))))))
>> +          (receive (executables others)
>=20
> I=E2=80=99d prefer srfi-11 =E2=80=98let-values=E2=80=99.  :-)

I tried let-values to begin with, but I found 'receive' to be much=20
easier on the eyes.  For the case of binding values from a single=20
expression, does let-values offer benefits?  And there are no other uses=20
of let-values in this module, so precedent/consistency doesn't seem to=20
have weight.

> Otherwise LGTM, thanks!

Thanks for review (and ping)!

--=20
`~Eric




Information forwarded to guix-patches@HIDDEN:
bug#39807; Package guix-patches. Full text available.

Message received at 39807 <at> debbugs.gnu.org:


Received: (at 39807) by debbugs.gnu.org; 24 Mar 2020 17:51:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 24 13:51:45 2020
Received: from localhost ([127.0.0.1]:55569 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jGniL-0008UN-3I
	for submit <at> debbugs.gnu.org; Tue, 24 Mar 2020 13:51:45 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44856)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jGniJ-0008UB-BO
 for 39807 <at> debbugs.gnu.org; Tue, 24 Mar 2020 13:51:43 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51880)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1jGniE-0002Ag-4P; Tue, 24 Mar 2020 13:51:38 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=46982 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jGniD-0007My-Jo; Tue, 24 Mar 2020 13:51:37 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Eric Bavier <bavier@HIDDEN>
Subject: Re: [bug#39807] [PATCH] guix: pack: Only wrap executable files.
References: <20200227043604.13102-1-bavier@HIDDEN> <87d09pohrj.fsf@HIDDEN>
Date: Tue, 24 Mar 2020 18:51:36 +0100
In-Reply-To: <87d09pohrj.fsf@HIDDEN> ("Ludovic
 \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\=
 \=\?utf-8\?Q\?s\?\= message of "Fri, 06 Mar 2020 12:16:32 +0100")
Message-ID: <87h7ydljyv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39807
Cc: 39807 <at> debbugs.gnu.org, Eric Bavier <bavier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Ping!  :-)

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> Hi,
>
> Eric Bavier <bavier@HIDDEN> skribis:
>
>> From: Eric Bavier <bavier@HIDDEN>
>>
>> Hello Guix,
>>
>> This patch fixes some uses of relocatable git (e.g.  octopus merge).=20
>> Previously, guix pack would wrap all files in "bin", "sbin", and "libexe=
c",
>> even non-executable files.  This would cause issues for git when its she=
ll
>> scripts in libexec would try to source other shell files that had been
>> wrapped and were no longer a valid shell file.
>
> Good catch!
>
>> I feel like a test should be added to tests/guix-pack-relocatable.sh, but
>> I'm not sure how to do that while keeping the test lightweight.  Suggest=
ions
>> welcome.
>
> Not sure how to do that.  Since =E2=80=98guix pack=E2=80=99 accepts manif=
ests, you could
> have a manifest containing a =E2=80=98computed-file=E2=80=99 with a file =
that shouldn=E2=80=99t
> be wrapped, and then you could ensure that=E2=80=99s indeed the case.  Or=
 you
> could try with =E2=80=98git-minimal=E2=80=99 or some other package that e=
xhibits the
> problem?
>
>> * guix/scripts/pack.scm (wrapped-package)<build>: Build wrappers for
>> executable files and symlink others.
>
> [...]
>
>> -          (for-each build-wrapper
>> -                    (append (find-files (string-append input "/bin"))
>> -                            (find-files (string-append input "/sbin"))
>> -                            (find-files (string-append input "/libexec"=
)))))))
>> +          (receive (executables others)
>
> I=E2=80=99d prefer srfi-11 =E2=80=98let-values=E2=80=99.  :-)
>
> Otherwise LGTM, thanks!
>
> Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#39807; Package guix-patches. Full text available.

Message received at 39807 <at> debbugs.gnu.org:


Received: (at 39807) by debbugs.gnu.org; 6 Mar 2020 11:16:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 06 06:16:43 2020
Received: from localhost ([127.0.0.1]:44182 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jAAyA-0008IP-RX
	for submit <at> debbugs.gnu.org; Fri, 06 Mar 2020 06:16:43 -0500
Received: from eggs.gnu.org ([209.51.188.92]:34507)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jAAy9-0008ID-1a
 for 39807 <at> debbugs.gnu.org; Fri, 06 Mar 2020 06:16:41 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39580)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>)
 id 1jAAy3-0000Or-Ol; Fri, 06 Mar 2020 06:16:35 -0500
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=59930 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jAAy3-00089k-7I; Fri, 06 Mar 2020 06:16:35 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Eric Bavier <bavier@HIDDEN>
Subject: Re: [bug#39807] [PATCH] guix: pack: Only wrap executable files.
References: <20200227043604.13102-1-bavier@HIDDEN>
Date: Fri, 06 Mar 2020 12:16:32 +0100
In-Reply-To: <20200227043604.13102-1-bavier@HIDDEN> (Eric Bavier's message
 of "Wed, 26 Feb 2020 22:36:04 -0600")
Message-ID: <87d09pohrj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39807
Cc: 39807 <at> debbugs.gnu.org, Eric Bavier <bavier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi,

Eric Bavier <bavier@HIDDEN> skribis:

> From: Eric Bavier <bavier@HIDDEN>
>
> Hello Guix,
>
> This patch fixes some uses of relocatable git (e.g.  octopus merge).=20
> Previously, guix pack would wrap all files in "bin", "sbin", and "libexec=
",
> even non-executable files.  This would cause issues for git when its shell
> scripts in libexec would try to source other shell files that had been
> wrapped and were no longer a valid shell file.

Good catch!

> I feel like a test should be added to tests/guix-pack-relocatable.sh, but
> I'm not sure how to do that while keeping the test lightweight.  Suggesti=
ons
> welcome.

Not sure how to do that.  Since =E2=80=98guix pack=E2=80=99 accepts manifes=
ts, you could
have a manifest containing a =E2=80=98computed-file=E2=80=99 with a file th=
at shouldn=E2=80=99t
be wrapped, and then you could ensure that=E2=80=99s indeed the case.  Or y=
ou
could try with =E2=80=98git-minimal=E2=80=99 or some other package that exh=
ibits the
problem?

> * guix/scripts/pack.scm (wrapped-package)<build>: Build wrappers for
> executable files and symlink others.

[...]

> -          (for-each build-wrapper
> -                    (append (find-files (string-append input "/bin"))
> -                            (find-files (string-append input "/sbin"))
> -                            (find-files (string-append input "/libexec")=
))))))
> +          (receive (executables others)

I=E2=80=99d prefer srfi-11 =E2=80=98let-values=E2=80=99.  :-)

Otherwise LGTM, thanks!

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#39807; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Feb 2020 04:54:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 26 23:54:52 2020
Received: from localhost ([127.0.0.1]:58598 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1j7BCG-00025U-Im
	for submit <at> debbugs.gnu.org; Wed, 26 Feb 2020 23:54:52 -0500
Received: from lists.gnu.org ([209.51.188.17]:42279)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bavier@HIDDEN>) id 1j7Arl-0001Wx-5w
 for submit <at> debbugs.gnu.org; Wed, 26 Feb 2020 23:33:41 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:33586)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <bavier@HIDDEN>) id 1j7Arj-0005mL-KC
 for guix-patches@HIDDEN; Wed, 26 Feb 2020 23:33:40 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_20,RCVD_IN_DNSWL_MED,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <bavier@HIDDEN>) id 1j7Ari-0007Za-4A
 for guix-patches@HIDDEN; Wed, 26 Feb 2020 23:33:39 -0500
Received: from mout02.posteo.de ([185.67.36.66]:41839)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <bavier@HIDDEN>) id 1j7Arh-0007X4-Hd
 for guix-patches@HIDDEN; Wed, 26 Feb 2020 23:33:38 -0500
Received: from submission (posteo.de [89.146.220.130]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 0FABA2400FB
 for <guix-patches@HIDDEN>; Thu, 27 Feb 2020 05:33:33 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1582778014; bh=q+iJ2lX/xsMcP9Gn/FWrba8ZD+x5WzfkaK5tK1WeS2w=;
 h=From:To:Cc:Subject:Date:From;
 b=NC6MZE1WTtcL+tRffS6zJfdeYhVYnf5CHZSEGWRfA8T0NIWrO5GWkQh2zbyPXh4Fz
 L+MVy7Qepb0fe0PwXSbrr6kIfXuj07FmPO19ZqovRycIJGDnJV7A0KqC1DYnJJvg8g
 5ivSx4fu7tO/+rVRMTdQ/qHvXstqSf9/nk80im7DiafenTbEY4NuLPP4LtK07dzn5s
 jLsXWdSe3wtTJapJLUj+BzcE//7bYevTxyCqtXPxhgQxz0d03DzVgpQhtWJmN8P488
 gZTbcC+QUHV+jZRhBEbcwGuvdmftPvimr2Y6W4KGBKNOswi3D0+pA+twwBS1tFvKGU
 +hDAgn9doPypA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 48Sfth4mq0z9rxK;
 Thu, 27 Feb 2020 05:33:32 +0100 (CET)
From: Eric Bavier <bavier@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] guix: pack: Only wrap executable files.
Date: Wed, 26 Feb 2020 22:36:04 -0600
Message-Id: <20200227043604.13102-1-bavier@HIDDEN>
X-Mailer: git-send-email 2.25.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 185.67.36.66
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 26 Feb 2020 23:54:50 -0500
Cc: Eric Bavier <bavier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

From: Eric Bavier <bavier@HIDDEN>

Hello Guix,

This patch fixes some uses of relocatable git (e.g.  octopus merge).=20
Previously, guix pack would wrap all files in "bin", "sbin", and "libexec=
",
even non-executable files.  This would cause issues for git when its shel=
l
scripts in libexec would try to source other shell files that had been
wrapped and were no longer a valid shell file.

I feel like a test should be added to tests/guix-pack-relocatable.sh, but
I'm not sure how to do that while keeping the test lightweight.  Suggesti=
ons
welcome.

Cheers,
`~Eric


* guix/scripts/pack.scm (wrapped-package)<build>: Build wrappers for
executable files and symlink others.
---
 guix/scripts/pack.scm | 32 +++++++++++++++++++++++---------
 1 file changed, 23 insertions(+), 9 deletions(-)

diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index c8d8546e29..3634326102 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -4,6 +4,7 @@
 ;;; Copyright =C2=A9 2018 Konrad Hinsen <konrad.hinsen@HIDDEN>
 ;;; Copyright =C2=A9 2018 Chris Marusich <cmmarusich@HIDDEN>
 ;;; Copyright =C2=A9 2018 Efraim Flashner <efraim@HIDDEN>
+;;; Copyright =C2=A9 2020 Eric Bavier <bavier@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -673,9 +674,11 @@ last resort for relocation."
                               (guix build union)))
       #~(begin
           (use-modules (guix build utils)
-                       ((guix build union) #:select (relative-file-name)=
)
+                       ((guix build union) #:select (symlink-relative))
+                       (srfi srfi-1)
                        (ice-9 ftw)
-                       (ice-9 match))
+                       (ice-9 match)
+                       (ice-9 receive))
=20
           (define input
             ;; The OUTPUT* output of PACKAGE.
@@ -726,15 +729,26 @@ last resort for relocation."
           (mkdir target)
           (for-each (lambda (file)
                       (unless (member file '("." ".." "bin" "sbin" "libe=
xec"))
-                        (let ((file* (string-append input "/" file)))
-                          (symlink (relative-file-name target file*)
-                                   (string-append target "/" file)))))
+                        (symlink-relative (string-append input  "/" file=
)
+                                          (string-append target "/" file=
))))
                     (scandir input))
=20
-          (for-each build-wrapper
-                    (append (find-files (string-append input "/bin"))
-                            (find-files (string-append input "/sbin"))
-                            (find-files (string-append input "/libexec")=
))))))
+          (receive (executables others)
+              (partition executable-file?
+                         (append (find-files (string-append input "/bin"=
))
+                                 (find-files (string-append input "/sbin=
"))
+                                 (find-files (string-append input "/libe=
xec"))))
+            ;; Wrap only executables, since the wrapper will eventually =
need
+            ;; to execve them.  E.g. git's "libexec" directory contains =
many
+            ;; shell scripts that are source'd from elsewhere, which fai=
ls if
+            ;; they are wrapped.
+            (for-each build-wrapper executables)
+            ;; Link any other non-executable files
+            (for-each (lambda (old)
+                        (let ((new (string-append target (strip-store-pr=
efix old))))
+                          (mkdir-p (dirname new))
+                          (symlink-relative old new)))
+                      others)))))
=20
   (computed-file (string-append
                   (cond ((package? package)
--=20
2.25.1





Acknowledgement sent to Eric Bavier <bavier@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#39807; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 30 Mar 2020 02:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.