GNU bug report logs - #43367
[core-updates]: [PATCH 0/5]: Prevent wrap-progam from double-wrapping.

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: Brendan Tildesley <mail@HIDDEN>; Keywords: patch; dated Sun, 13 Sep 2020 05:40:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

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


Received: (at 43367) by debbugs.gnu.org; 13 Sep 2020 12:30:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 13 08:30:54 2020
Received: from localhost ([127.0.0.1]:49629 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kHR9h-0006t9-OQ
	for submit <at> debbugs.gnu.org; Sun, 13 Sep 2020 08:30:54 -0400
Received: from mout-p-202.mailbox.org ([80.241.56.172]:57644)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1kHR9f-0006sv-5P
 for 43367 <at> debbugs.gnu.org; Sun, 13 Sep 2020 08:30:53 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org
 [IPv6:2001:67c:2050:105:465:1:2:0])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4Bq83S4hDrzQlCD;
 Sun, 13 Sep 2020 14:30:44 +0200 (CEST)
X-Virus-Scanned: amavisd-new at heinlein-support.de
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot;
 s=MBO0001; t=1600000242;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=tRuW+V+WefVEkxjDfu+DweLR/5Jyoz7XaiAb6acE2Sw=;
 b=dus1NkkC/2yLgF+9Ub3SSYHylmzGHhQlHSf5ZCSErc63ZIriovArDDvHI2ckBgFVMqjolg
 eleyXAgssodq1JUxmEjMJHWEocw8p1j5OoSYNUcI3lX4yv7tBXnSuM44qY6ofuBJvTvEyK
 BwzfQp2jHMf++jIdQ/5RGTmNsHHDQHIFgWNK5X0n18rlXEWsj/GqcYSfH2KlBaXfBVth7H
 SuFZ61P1UbdOwoHezpjkTF/IwFP8tTpVEWYlM97DimGmkbhiGcKBGpnNJL/WuAP9p/9MCM
 MQT1kOMO57Ha1rQh1KmxaP/7DMS2R2S/PBw1qUnEwIFkcOsRy61eoEbRD/MKeQ==
Received: from smtp2.mailbox.org ([80.241.60.241])
 by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173])
 (amavisd-new, port 10030)
 with ESMTP id q8l3pfA_tjvK; Sun, 13 Sep 2020 14:30:40 +0200 (CEST)
Subject: Re: [bug#43367] [core-updates]: [PATCH 0/5]: Prevent wrap-progam from
 double-wrapping.
To: Danny Milosavljevic <dannym@HIDDEN>
References: <83311dc4-6e9b-e70b-e379-9993bfcd0554@HIDDEN>
 <20200913114019.58a6bda0@HIDDEN>
From: Brendan Tildesley <mail@HIDDEN>
Message-ID: <6c55ad27-6661-c84f-53ec-0baaa9c9ce91@HIDDEN>
Date: Sun, 13 Sep 2020 22:30:50 +1000
MIME-Version: 1.0
In-Reply-To: <20200913114019.58a6bda0@HIDDEN>
Content-Type: multipart/alternative;
 boundary="------------04BF2234FA3FE86895F88359"
Content-Language: en-US
X-MBO-SPAM-Probability: 
X-Rspamd-Score: -5.24 / 15.00 / 15.00
X-Rspamd-Queue-Id: 49290274
X-Rspamd-UID: b38f96
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 43367
Cc: 43367 <at> debbugs.gnu.org
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 (-)

This is a multi-part message in MIME format.
--------------04BF2234FA3FE86895F88359
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit

On 13/9/20 7:40 pm, Danny Milosavljevic wrote:
> On Sun, 13 Sep 2020 15:39:15 +1000
> Brendan Tildesley <mail@HIDDEN> wrote:
>
>> I'm attempting to fix a bug where wrap-program produces ..X-real-real
>> files by mistakenly wrapping already wrapped files. I haven't fully
>> tested these because it requires rebuilding everything which takes hours
>> to days and core-updates is stuck on mesa now anyway. Perhaps I'll try
>> testing on master. Also there may be other places where .X-real files
>> are accidentally wrapped, which will now error.
> But can't a thing be wrapped once for one reason and another time for another
> reason and that should be fine?

Yes, perhaps I should have explained that this is still possible and 
works fine. When a program is wrapped a second time, it will append to 
the existed wrapper, rather than creating a new file and moving the old 
one. repeated applications of wrap-program after the first one simply 
append. I'll illustrate how this can go wrong though: suppose we have 
/bin/foo and we we are in a repl and run:

(wrap-program "/bin/foo" `("BAR" = ("baz")) => /bin/.foo-real doesn't 
exist so /bin/foo is moved to /bin/.foo-real, a new /bin/foo is created 
that is a wrapper that then launches /bin.foo-real.

(wrap-program "/bin/foo" `("BAR" = ("baz")) => /bin/.foo-real exists so 
/bin/foo is assumed to already be a wrapper so variables are appended to 
/bin/foo.

(wrap-program "/bin/foo" `("BAR" = ("baz")) => same thing again, 
variables are appended

; Now suppose we then run:

(wrap-program "/bin/.foo-real" `("BAR" = ("baz")) => 
/bin/..foo-real-real doesn't exist, so /bin/.foo-real is moved to 
/bin/..foo-real-real and /bin/.foo-real is created again as another wrapper.

This should never be done intentionally I think, but sometimes there is 
code that uses (find-files dir ".") to find binaries to wrap, and this 
is run after a previous existing wrap phase, so the both /bin/foo and 
/bin/.foo-real are wrapped again. Generally everything will continue 
working though despite all this though.

You run this to find some of these double wrapped packages:

find /gnu/ -maxdepth 4 -iname '.*-real-real'

So I thought it best to error whenever this happens instead of allowing it.

An example of this causing an issue is when Prafulla Giri posted a 
patch[0] to fix a bug with Calibre. Their code ought to be correct, but 
it resulted in double wrapping. I created my own patch by overwriting 
the python-build-systems wrap phase and duplicating some code. Andreas 
ended up accepting my patch instead.

... Actually I just realised Prafulla's patch could have been fixed in a 
much simpler way by adjusting the (find-files ...) bit and avoided 
duplication. ...

Anyway, with these patches, Prafulla's patch would have caused an error 
and forced them to fix it, for example, by changing

(find-files "." ".")

to

(find-files "." (lambda (file stat) (not (wrapper? file))))
or
(find-files "." (lambda (file stat) (not (string-prefix "." (basename file))))

----------

So, the main change here is making (wrap-program ".foo-real") an error. 
If you cannot think of a good reason why that should ever be run, I 
think its good to block it. bugs that can slip through easily and lurk 
in the background usually not causing problems are not good in my 
opinion. After that has been decided we need to ensure all build systems 
don't misuse wrap-program that way. I notice some build systems actually 
only pass 'regular files, others allow symlinks or any file. I'm not 
really sure what the exact find-files filter should be.

[0] https://lists.gnu.org/archive/html/guix-patches/2020-09/msg00219.html


--------------04BF2234FA3FE86895F88359
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: 7bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <div class="moz-cite-prefix">On 13/9/20 7:40 pm, Danny Milosavljevic
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20200913114019.58a6bda0@HIDDEN">
      <pre class="moz-quote-pre" wrap="">On Sun, 13 Sep 2020 15:39:15 +1000
Brendan Tildesley <a class="moz-txt-link-rfc2396E" href="mailto:mail@HIDDEN">&lt;mail@HIDDEN&gt;</a> wrote:

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">I'm attempting to fix a bug where wrap-program produces ..X-real-real 
files by mistakenly wrapping already wrapped files. I haven't fully 
tested these because it requires rebuilding everything which takes hours 
to days and core-updates is stuck on mesa now anyway. Perhaps I'll try 
testing on master. Also there may be other places where .X-real files 
are accidentally wrapped, which will now error.
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
But can't a thing be wrapped once for one reason and another time for another
reason and that should be fine?
</pre>
    </blockquote>
    <p>Yes, perhaps I should have explained that this is still possible
      and works fine. When a program is wrapped a second time, it will
      append to the existed wrapper, rather than creating a new file and
      moving the old one. repeated applications of wrap-program after
      the first one simply append. I'll illustrate how this can go wrong
      though: suppose we have /bin/foo and we we are in a repl and run:<br>
    </p>
    <p>(wrap-program "/bin/foo" `("BAR" = ("baz")) =&gt; /bin/.foo-real
      doesn't exist so /bin/foo is moved to /bin/.foo-real, a new
      /bin/foo is created that is a wrapper that then launches
      /bin.foo-real.</p>
    <p>(wrap-program "/bin/foo" `("BAR" = ("baz")) =&gt; /bin/.foo-real
      exists so /bin/foo is assumed to already be a wrapper so variables
      are appended to /bin/foo.</p>
    <p>(wrap-program "/bin/foo" `("BAR" = ("baz")) =&gt; same thing
      again, variables are appended</p>
    <p>; Now suppose we then run:</p>
    <p>(wrap-program "/bin/.foo-real" `("BAR" = ("baz")) =&gt;
      /bin/..foo-real-real doesn't exist, so /bin/.foo-real is moved to
      /bin/..foo-real-real and /bin/.foo-real is created again as
      another wrapper.</p>
    <p>This should never be done intentionally I think, but sometimes
      there is code that uses (find-files dir ".") to find binaries to
      wrap, and this is run after a previous existing wrap phase, so the
      both /bin/foo and /bin/.foo-real are wrapped again. Generally
      everything will continue working though despite all this though.</p>
    <p>You run this to find some of these double wrapped packages:</p>
    <p>find /gnu/ -maxdepth 4 -iname '.*-real-real'</p>
    <p>So I thought it best to error whenever this happens instead of
      allowing it.</p>
    <p>An example of this causing an issue is when Prafulla Giri posted
      a patch[0] to fix a bug with Calibre. Their code ought to be
      correct, but it resulted in double wrapping. I created my own
      patch by overwriting the python-build-systems wrap phase and
      duplicating some code. Andreas ended up accepting my patch
      instead. <br>
    </p>
    <p>... Actually I just realised Prafulla's patch could have been
      fixed in a much simpler way by adjusting the (find-files ...) bit
      and avoided duplication. ...</p>
    <p>Anyway, with these patches, Prafulla's patch would have caused an
      error and forced them to fix it, for example, by changing</p>
    <pre>(find-files "." ".")</pre>
    <p>
      to</p>
    <pre>(find-files "." (lambda (file stat) (not (wrapper? file))))
or 
(find-files "." (lambda (file stat) (not (string-prefix "." (basename file))))
</pre>
    <p>----------</p>
    <p>So, the main change here is making (wrap-program ".foo-real") an
      error. If you cannot think of a good reason why that should ever
      be run, I think its good to block it. bugs that can slip through
      easily and lurk in the background usually not causing problems are
      not good in my opinion. After that has been decided we need to
      ensure all build systems don't misuse wrap-program that way. I
      notice some build systems actually only pass 'regular files,
      others allow symlinks or any file. I'm not really sure what the
      exact find-files filter should be.<br>
    </p>
    <p>[0]
      <a class="moz-txt-link-freetext" href="https://lists.gnu.org/archive/html/guix-patches/2020-09/msg00219.html">https://lists.gnu.org/archive/html/guix-patches/2020-09/msg00219.html</a><br>
    </p>
    <pre>
</pre>
  </body>
</html>

--------------04BF2234FA3FE86895F88359--




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

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


Received: (at 43367) by debbugs.gnu.org; 13 Sep 2020 09:40:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 13 05:40:24 2020
Received: from localhost ([127.0.0.1]:49450 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kHOUi-0006fs-Fp
	for submit <at> debbugs.gnu.org; Sun, 13 Sep 2020 05:40:24 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:34212)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1kHOUg-0006fj-PZ
 for 43367 <at> debbugs.gnu.org; Sun, 13 Sep 2020 05:40:23 -0400
Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at
 [80.110.126.103])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id DF12F336893E;
 Sun, 13 Sep 2020 11:40:20 +0200 (CEST)
Date: Sun, 13 Sep 2020 11:40:19 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: Brendan Tildesley <mail@HIDDEN>
Subject: Re: [bug#43367] [core-updates]: [PATCH 0/5]: Prevent wrap-progam
 from double-wrapping.
Message-ID: <20200913114019.58a6bda0@HIDDEN>
In-Reply-To: <83311dc4-6e9b-e70b-e379-9993bfcd0554@HIDDEN>
References: <83311dc4-6e9b-e70b-e379-9993bfcd0554@HIDDEN>
X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/aX31ISni.LNImQXOfUzPM5X";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 43367
Cc: 43367 <at> debbugs.gnu.org
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 (-)

--Sig_/aX31ISni.LNImQXOfUzPM5X
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

On Sun, 13 Sep 2020 15:39:15 +1000
Brendan Tildesley <mail@HIDDEN> wrote:

> I'm attempting to fix a bug where wrap-program produces ..X-real-real=20
> files by mistakenly wrapping already wrapped files. I haven't fully=20
> tested these because it requires rebuilding everything which takes hours=
=20
> to days and core-updates is stuck on mesa now anyway. Perhaps I'll try=20
> testing on master. Also there may be other places where .X-real files=20
> are accidentally wrapped, which will now error.

But can't a thing be wrapped once for one reason and another time for anoth=
er
reason and that should be fine?

--Sig_/aX31ISni.LNImQXOfUzPM5X
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9d6QMACgkQ5xo1VCww
uqXYBAf/SYsAR5A4AYq/DdVDnV1V2ZqmOEBgR2bBwvk65kl2ZFJuFr5AzXvhw59O
DVVVhDUtx4I+yk8oq3o/ySovtnOUDEwIaukAsxWZekQt2/+6fAE3iFI3lVZCvO5x
LQdpIIGJpqIBPgPyZqaxF/pMM7MpVkKi3MmHYk1+QoAgYKhv/Hz1lUdZ/BPoDs5Z
+EoJq8vOsmm9c5zLn+SXO5R5bPEvWrItRxVeWXHaulbR/T5j8hJLBSLoR3do55og
47tdFZDZ8wrk+KfLrUQ358XoycB+vcfhE7204XRzd9i4zjY4taoggnGg+Y13WDS5
gpbrAvic3KNROJ/QfmADkVgkkukjfA==
=G/xm
-----END PGP SIGNATURE-----

--Sig_/aX31ISni.LNImQXOfUzPM5X--




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

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


Received: (at 43367) by debbugs.gnu.org; 13 Sep 2020 05:46:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 13 01:46:32 2020
Received: from localhost ([127.0.0.1]:49348 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kHKqO-0000uy-A9
	for submit <at> debbugs.gnu.org; Sun, 13 Sep 2020 01:46:32 -0400
Received: from mout-p-102.mailbox.org ([80.241.56.152]:50640)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1kHKqL-0000u8-7t
 for 43367 <at> debbugs.gnu.org; Sun, 13 Sep 2020 01:46:29 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org
 [IPv6:2001:67c:2050:105:465:1:2:0])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4Bpz4v5mN1zKmV1
 for <43367 <at> debbugs.gnu.org>; Sun, 13 Sep 2020 07:46:23 +0200 (CEST)
X-Virus-Scanned: amavisd-new at heinlein-support.de
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot;
 s=MBO0001; t=1599975982;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=qORu6FXXehCXwr9WEUG2YpCClc1TBn/W+Bm2zKyYZwo=;
 b=X6FKTJmscx+ZLs7NaKn1DUo7GVKe6xgCcrydCbASkaqpMTozWk5kxUUL32UAJbUG9OZrj+
 Y5xY05TD8Ip/ju3XExXh8FyyLQAah5zabvo4WUgTlH558Uw64Cl6Zfvl1jZIlA/jp3vWY1
 R5Yn7iK23yNrdjs9w3S83lZFwSJa083zGwjZ/h/GqO2SVXwp39KRNFJ05TcHb/BJ45kFdp
 016MnGB/1MfxfDfEUUIzW04OdGC0lEmvHnpws7cLhmP+qXaMi9kvXpn5P8kvo/QEfJZTie
 Mb05NxcsAJGuUNR2gLWQWCAkh3dpnzR+1l5OCuRbdvE8qPtIXiwAZfnlerTTcA==
Received: from smtp2.mailbox.org ([80.241.60.241])
 by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de
 [80.241.56.122]) (amavisd-new, port 10030)
 with ESMTP id S3JG-BPHjXm3 for <43367 <at> debbugs.gnu.org>;
 Sun, 13 Sep 2020 07:46:20 +0200 (CEST)
From: Brendan Tildesley <mail@HIDDEN>
To: 43367 <at> debbugs.gnu.org
Subject: [PATCH 5/5] qt-build-system: Don't double wrap programs.
Date: Sun, 13 Sep 2020 15:45:57 +1000
Message-Id: <20200913054557.12911-5-mail@HIDDEN>
In-Reply-To: <20200913054557.12911-1-mail@HIDDEN>
References: <83311dc4-6e9b-e70b-e379-9993bfcd0554@HIDDEN>
 <20200913054557.12911-1-mail@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-MBO-SPAM-Probability: *
X-Rspamd-Score: 0.56 / 15.00 / 15.00
X-Rspamd-Queue-Id: C99D126C
X-Rspamd-UID: d90505
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 43367
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 (-)

* guix/build/qt-build-system.scm (wrap-all-programs): Excluded wrapped
programs from the list of files to wrap if they exist to avoid double
wrapping.
---
 guix/build/qt-build-system.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/guix/build/qt-build-system.scm b/guix/build/qt-build-system.scm
index 005157b0a4..4738ca09c9 100644
--- a/guix/build/qt-build-system.scm
+++ b/guix/build/qt-build-system.scm
@@ -83,7 +83,10 @@ add a dependency of that output on Qt."
   (define (find-files-to-wrap directory)
     (append-map
      (lambda (dir)
-       (if (directory-exists? dir) (find-files dir ".*") (list)))
+       (if (directory-exists? dir)
+           (find-files dir (lambda (file stat)
+                             (not (wrapped-program? file))))
+           '()))
      (list (string-append directory "/bin")
            (string-append directory "/sbin")
            (string-append directory "/libexec")
-- 
2.28.0





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

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


Received: (at 43367) by debbugs.gnu.org; 13 Sep 2020 05:46:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 13 01:46:32 2020
Received: from localhost ([127.0.0.1]:49346 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kHKqO-0000uw-3H
	for submit <at> debbugs.gnu.org; Sun, 13 Sep 2020 01:46:32 -0400
Received: from mout-p-101.mailbox.org ([80.241.56.151]:64818)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1kHKqJ-0000u0-HV
 for 43367 <at> debbugs.gnu.org; Sun, 13 Sep 2020 01:46:27 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org
 [IPv6:2001:67c:2050:105:465:1:2:0])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Bpz4s4XxhzKmc3
 for <43367 <at> debbugs.gnu.org>; Sun, 13 Sep 2020 07:46:21 +0200 (CEST)
X-Virus-Scanned: amavisd-new at heinlein-support.de
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot;
 s=MBO0001; t=1599975979;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=ur2jpyG4b+NO01Y6UbYtAKyVgRPbQrk9jUkfdt5VRyA=;
 b=dgQT1JIrK3d47hACEwzTZwbHDYTUkRdiM0Rnamz9w8rVAvHwAYc6yau/uZ1OVTHVQfzP/C
 T5IdA2I46qbplD1vlZwkFQwql/uFt6ofxnYIYZoUh5imub4byaRLbi9xple9zgSNq5kTaC
 dGid1t4hB/KAZink6hVPOFKmp4P0NCg1RbW5Cnute6BhWjPih4zlGHkxuWjhciIJdeIFkc
 LlXBVDrSIrqbrdFxSVIrPbHT8YU2CqOQGxKLpUvuDp0V8e1aVCxW+GkVuTMY5c1WCcKzHh
 CZDbnadKsZfSlju1BqtEm+lKU8BQyLXYYIroP+G/6CoLjmB9ypV5W1XaqmcyEA==
Received: from smtp2.mailbox.org ([80.241.60.241])
 by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de
 [80.241.56.116]) (amavisd-new, port 10030)
 with ESMTP id c5Ix7i6P-ZDh for <43367 <at> debbugs.gnu.org>;
 Sun, 13 Sep 2020 07:46:19 +0200 (CEST)
From: Brendan Tildesley <mail@HIDDEN>
To: 43367 <at> debbugs.gnu.org
Subject: [PATCH 4/5] rakudo-build-system: Don't double wrap programs.
Date: Sun, 13 Sep 2020 15:45:56 +1000
Message-Id: <20200913054557.12911-4-mail@HIDDEN>
In-Reply-To: <20200913054557.12911-1-mail@HIDDEN>
References: <83311dc4-6e9b-e70b-e379-9993bfcd0554@HIDDEN>
 <20200913054557.12911-1-mail@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-MBO-SPAM-Probability: *
X-Rspamd-Score: 0.15 / 15.00 / 15.00
X-Rspamd-Queue-Id: 9F05326E
X-Rspamd-UID: 6cc3e5
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 43367
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 (-)

* guix/build/rakudo-build-system.scm (wrap): Don't return any potential
already wrapped-programs in the list-of-files to wrap.
---
 guix/build/rakudo-build-system.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/guix/build/rakudo-build-system.scm b/guix/build/rakudo-build-system.scm
index dbdeb1ccd2..b2c090f946 100644
--- a/guix/build/rakudo-build-system.scm
+++ b/guix/build/rakudo-build-system.scm
@@ -97,7 +97,8 @@
     (map (cut string-append dir "/" <>)
          (or (scandir dir (lambda (f)
                             (let ((s (stat (string-append dir "/" f))))
-                              (eq? 'regular (stat:type s)))))
+                              (and (eq? 'regular (stat:type s))
+                                   (not (wrapped-program? f))))))
              '())))
 
   (define bindirs
-- 
2.28.0





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

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


Received: (at 43367) by debbugs.gnu.org; 13 Sep 2020 05:46:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 13 01:46:28 2020
Received: from localhost ([127.0.0.1]:49343 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kHKqJ-0000uW-Q5
	for submit <at> debbugs.gnu.org; Sun, 13 Sep 2020 01:46:28 -0400
Received: from mout-p-201.mailbox.org ([80.241.56.171]:31064)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1kHKqI-0000ty-EN
 for 43367 <at> debbugs.gnu.org; Sun, 13 Sep 2020 01:46:26 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org
 [IPv6:2001:67c:2050:105:465:1:2:0])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Bpz4r2WVCzQkkJ
 for <43367 <at> debbugs.gnu.org>; Sun, 13 Sep 2020 07:46:20 +0200 (CEST)
X-Virus-Scanned: amavisd-new at heinlein-support.de
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot;
 s=MBO0001; t=1599975978;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=GDXmgOMbs3D4zP72xGN8NM0+tHTbLwgy8rtz/dY09vc=;
 b=Q3wAc9i6clSohE6FlxhTwVtb5fhf1WjqlYPWrbSVWIQROUV0Ml+HilP/NSJKkAqPClpuuX
 yMfjhxQZFbqI/4tWNQOQtRQ95a+fmnb0tJlde25Ah6Y2gcVoMOR5CAu11ijTWR8KMh1iif
 R4S0XeIVOAj+GUhzkduqhFSx9t2slSgL0R5MWla+jBjzhGsL1jlyVr5NHPHpXlMHzu/jBS
 OpiCk4LxjHZiKGY7QMGdH2HIj9L1lU0EFjzNCKIOLiCdUiaiFTLj3XyQRkg8CxWzceksmE
 KciWrR9MflDrbNvZOjtvSDG3RJwrljevigkrPF/Mhy2595VQji0EGueN9TlpNQ==
Received: from smtp2.mailbox.org ([80.241.60.241])
 by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de
 [80.241.56.122]) (amavisd-new, port 10030)
 with ESMTP id SavwKnaseiS0 for <43367 <at> debbugs.gnu.org>;
 Sun, 13 Sep 2020 07:46:17 +0200 (CEST)
From: Brendan Tildesley <mail@HIDDEN>
To: 43367 <at> debbugs.gnu.org
Subject: [PATCH 3/5] glib-or-gtk-build-system: Don't double wrap programs.
Date: Sun, 13 Sep 2020 15:45:55 +1000
Message-Id: <20200913054557.12911-3-mail@HIDDEN>
In-Reply-To: <20200913054557.12911-1-mail@HIDDEN>
References: <83311dc4-6e9b-e70b-e379-9993bfcd0554@HIDDEN>
 <20200913054557.12911-1-mail@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-MBO-SPAM-Probability: *
X-Rspamd-Score: 0.53 / 15.00 / 15.00
X-Rspamd-Queue-Id: 631E8271
X-Rspamd-UID: 6ce4ee
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 43367
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 (-)

* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): If a
package definition was modified to insert an additional wrap phase
before glib-or-gtk...'s wrap phase instead of after, glib-or-gtk...'s
wrap phase will double wrap the .X-real file from the earlier wrap
phase. Filtering out such wrapped programs means these .X-real files
should fix this and mean packagers don't have to worry about ensuring
their wrap phases are put afterwards.
---
 guix/build/glib-or-gtk-build-system.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/guix/build/glib-or-gtk-build-system.scm b/guix/build/glib-or-gtk-build-system.scm
index ba680fd1a9..ccb3138fe2 100644
--- a/guix/build/glib-or-gtk-build-system.scm
+++ b/guix/build/glib-or-gtk-build-system.scm
@@ -142,8 +142,9 @@ add a dependency of that output on GLib and GTK+."
       (unless (member output glib-or-gtk-wrap-excluded-outputs)
         (let* ((bindir       (string-append directory "/bin"))
                (libexecdir   (string-append directory "/libexec"))
-               (bin-list     (append (find-files bindir ".*")
-                                     (find-files libexecdir ".*")))
+               (bin-list     (filter (negate wrapped-program?)
+                                     (append (find-files bindir ".*")
+                                             (find-files libexecdir ".*"))))
                (datadirs     (data-directories
                               (alist-cons output directory inputs)))
                (gtk-mod-dirs (gtk-module-directories
-- 
2.28.0





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

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


Received: (at 43367) by debbugs.gnu.org; 13 Sep 2020 05:46:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 13 01:46:27 2020
Received: from localhost ([127.0.0.1]:49340 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kHKqJ-0000uT-Fm
	for submit <at> debbugs.gnu.org; Sun, 13 Sep 2020 01:46:27 -0400
Received: from mout-p-202.mailbox.org ([80.241.56.172]:50346)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1kHKqG-0000tw-Sc
 for 43367 <at> debbugs.gnu.org; Sun, 13 Sep 2020 01:46:25 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org
 [IPv6:2001:67c:2050:105:465:1:2:0])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4Bpz4p5cWPzQkmG
 for <43367 <at> debbugs.gnu.org>; Sun, 13 Sep 2020 07:46:18 +0200 (CEST)
X-Virus-Scanned: amavisd-new at heinlein-support.de
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot;
 s=MBO0001; t=1599975976;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=z2gxQwUEosdiIO6kGilY/BWyNTtagfYFScxJn3j9RLI=;
 b=ej51wAzD3S9Y6lmXVEAlZuO1ky4K4Gqvw54vvoLTAyRYbq4I9XL25CBlp9iIGCqCA/dmjv
 tDEcNncMwdCGT+9HsEX0Hvcy1DU+gOVoQhLYBtjbwWF1NTDobVnfXhzFMmaDfhdXkEagth
 O9NcWvHf5kN5S9ZXBtQIqReYBkfZva3CUO5pYiSjIem3fIeDkKzR7x1m5268RuDUxuqQgp
 rDCVWsEqQYy5CQkOfTFo4AoPd+qcfhiSOe1S6aIMdJiDY4ExDRDOsKavNyB+MSu81ZnqxU
 BbY3+4CIJeGbLbrgyXkeo66cKAtp0VeDe9WdsIEVyS+O54UypIqa3v5mtm+izQ==
Received: from smtp2.mailbox.org ([80.241.60.241])
 by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173])
 (amavisd-new, port 10030)
 with ESMTP id LJcBWiW7319K for <43367 <at> debbugs.gnu.org>;
 Sun, 13 Sep 2020 07:46:15 +0200 (CEST)
From: Brendan Tildesley <mail@HIDDEN>
To: 43367 <at> debbugs.gnu.org
Subject: [PATCH 2/5] utils: Rename wrapper? to wrapped-program?.
Date: Sun, 13 Sep 2020 15:45:54 +1000
Message-Id: <20200913054557.12911-2-mail@HIDDEN>
In-Reply-To: <20200913054557.12911-1-mail@HIDDEN>
References: <83311dc4-6e9b-e70b-e379-9993bfcd0554@HIDDEN>
 <20200913054557.12911-1-mail@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-MBO-SPAM-Probability: *
X-Rspamd-Score: 0.80 / 15.00 / 15.00
X-Rspamd-Queue-Id: CC504273
X-Rspamd-UID: 42e5da
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 43367
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 (-)

* guix/build/utils.scm (wrap-program): The wrapper? procedure is
incorrectly named as it actually checks to see if prog is the
original program that was moved, not the wrapper.

* guix/build/python-build-system: (wrap): Use renamed wrapped-program?.
---
 guix/build/python-build-system.scm | 2 +-
 guix/build/utils.scm               | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index 62e7a7b305..d1dbbc1de2 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -196,7 +196,7 @@ when running checks after installing the package."
   (define (list-of-files dir)
     (find-files dir (lambda (file stat)
                       (and (eq? 'regular (stat:type stat))
-                           (not (wrapper? file))))))
+                           (not (wrapped-program? file))))))
 
   (define bindirs
     (append-map (match-lambda
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 822191f4de..4cd227a668 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -90,7 +90,7 @@
             patch-/usr/bin/file
             fold-port-matches
             remove-store-references
-            wrapper?
+            wrapped-program?
             wrap-program
             wrap-script
 
@@ -1118,8 +1118,8 @@ known as `nuke-refs' in Nixpkgs."
   (program    wrap-error-program)
   (type       wrap-error-type))
 
-(define (wrapper? prog)
-  "Return #t if PROG is a wrapper as produced by 'wrap-program'."
+(define (wrapped-program? prog)
+  "Return #t if PROG is a program that was moved and wrapped by 'wrap-program'."
   (and (file-exists? prog)
        (let ((base (basename prog)))
          (and (string-prefix? "." base)
-- 
2.28.0





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

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


Received: (at 43367) by debbugs.gnu.org; 13 Sep 2020 05:46:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 13 01:46:24 2020
Received: from localhost ([127.0.0.1]:49336 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kHKqG-0000u9-5z
	for submit <at> debbugs.gnu.org; Sun, 13 Sep 2020 01:46:24 -0400
Received: from mout-p-102.mailbox.org ([80.241.56.152]:50636)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1kHKqF-0000ts-0Y
 for 43367 <at> debbugs.gnu.org; Sun, 13 Sep 2020 01:46:23 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org
 [IPv6:2001:67c:2050:105:465:1:2:0])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4Bpz4m6Tr2zKmV1
 for <43367 <at> debbugs.gnu.org>; Sun, 13 Sep 2020 07:46:16 +0200 (CEST)
X-Virus-Scanned: amavisd-new at heinlein-support.de
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot;
 s=MBO0001; t=1599975975;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=FSlbc1KMo1TRSTALdnQ1FHgRvX/spQIlHUx6WcN6IYk=;
 b=kOovU+aZdX//4Vk1Pw3vzi1l2PRsTnRO3arVDVg7Xj+pOsPeJ1kT5ELreqgBHajjM2ybwD
 /f3tCbhAzCZKDu6HdJ0NVEcTeir1/SrC7P/CD+XUiHHRYzBuoKaQ21XUn+43YnB1FZhtJD
 nIOuTtqt8uuqO9kyoyPpLpJexZQrp65QJQcbO3k3ohk/hcYCQu0PgeoWoMpaFIKe5uAR7U
 /+nyBZ2Od7d/CDDr7m9Z9czLGIKWPJX2Rrm+L07/e82b9KqLf/62NJc8iX7xUS1A0OZiuf
 lxzLfNLNFTldt38JJR99h006D1pmf67QMTTRZFT1fr88qqbhE6x26g4+5VLLug==
Received: from smtp2.mailbox.org ([80.241.60.241])
 by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172])
 (amavisd-new, port 10030)
 with ESMTP id OD_Vp6VVa-P1 for <43367 <at> debbugs.gnu.org>;
 Sun, 13 Sep 2020 07:46:13 +0200 (CEST)
From: Brendan Tildesley <mail@HIDDEN>
To: 43367 <at> debbugs.gnu.org
Subject: [PATCH 1/5] utils: wrap-program: Refuse to wrap .X-real files.
Date: Sun, 13 Sep 2020 15:45:53 +1000
Message-Id: <20200913054557.12911-1-mail@HIDDEN>
In-Reply-To: <83311dc4-6e9b-e70b-e379-9993bfcd0554@HIDDEN>
References: <83311dc4-6e9b-e70b-e379-9993bfcd0554@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-MBO-SPAM-Probability: *
X-Rspamd-Score: 1.48 / 15.00 / 15.00
X-Rspamd-Queue-Id: D85C0271
X-Rspamd-UID: 9d3abe
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 43367
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 (-)

*    guix/build/utils.scm: (wrap-program): Error if wrap-program was
mistakenly passed a .X-real file. This prevents and forces us to fix
cases where a double wrapped ..X-real-real file is created, such as can
be seen with:

find /gnu/ -iname '.*-real-real'
---
 guix/build/utils.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index e872cfffd3..822191f4de 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -1194,6 +1194,9 @@ with definitions for VARS."
        (format #f "export ~a=\"$~a${~a:+:}~a\""
                var var var (string-join rest ":")))))
 
+  (when (wrapped-program? prog)
+    (error (string-append prog " is a wrapper. Refusing to wrap.")))
+
   (if already-wrapped?
 
       ;; PROG is already a wrapper: add the new "export VAR=VALUE" lines just
-- 
2.28.0





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

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


Received: (at submit) by debbugs.gnu.org; 13 Sep 2020 05:39:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 13 01:39:19 2020
Received: from localhost ([127.0.0.1]:49331 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kHKjP-0000jG-Ax
	for submit <at> debbugs.gnu.org; Sun, 13 Sep 2020 01:39:19 -0400
Received: from lists.gnu.org ([209.51.188.17]:56400)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@HIDDEN>) id 1kHKjN-0000j8-1p
 for submit <at> debbugs.gnu.org; Sun, 13 Sep 2020 01:39:17 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:57590)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>) id 1kHKjM-0002qj-O3
 for guix-patches@HIDDEN; Sun, 13 Sep 2020 01:39:16 -0400
Received: from mout-p-101.mailbox.org ([2001:67c:2050::465:101]:33964)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <mail@HIDDEN>) id 1kHKjJ-00014e-LP
 for guix-patches@HIDDEN; Sun, 13 Sep 2020 01:39:15 -0400
Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest
 SHA256) (No client certificate requested)
 by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4BpywX2SL2zKmdk
 for <guix-patches@HIDDEN>; Sun, 13 Sep 2020 07:39:08 +0200 (CEST)
X-Virus-Scanned: amavisd-new at heinlein-support.de
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot;
 s=MBO0001; t=1599975546;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding;
 bh=2em40IVmbfEHVWi79TgETN7K0WHFJ5BZjilFTOfCeGc=;
 b=VCASaj/CTKTqmseGAIoikTfnaT1I0apjFuRq4gRy+Ok0at0w362EYsplG6aBTWjvMOBtui
 IBFwjzaYXM6NiGmnZf/7RIdMx9ukl0ZwufDHkn2jtmt19HvMNjhRQ0PdGh1kLPwaUZ/AUp
 OMuBPwK99aU/DLaKDx5XIGSXX8cRo86hJpUgzBYiNUNCPtpnHfTZyFX55Chx2/j2ypeIOQ
 KOeOuvquALv1cm6W3caJZCbwtObxg9AEv+tgTwJsjSO6o7R6YzW/cv3rcHbxXA05j2ZKLr
 MFoux157J+4cZmMxZpft9TjTcU+kg3JKl8ve3nsyxyjTBfYDjUeJYERaSSFzEw==
Received: from smtp2.mailbox.org ([80.241.60.241])
 by spamfilter06.heinlein-hosting.de (spamfilter06.heinlein-hosting.de
 [80.241.56.125]) (amavisd-new, port 10030)
 with ESMTP id 5-z45EysO_Fb for <guix-patches@HIDDEN>;
 Sun, 13 Sep 2020 07:39:05 +0200 (CEST)
To: guix-patches@HIDDEN
From: Brendan Tildesley <mail@HIDDEN>
Subject: [core-updates]: [PATCH 0/5]: Prevent wrap-progam from double-wrapping.
Message-ID: <83311dc4-6e9b-e70b-e379-9993bfcd0554@HIDDEN>
Date: Sun, 13 Sep 2020 15:39:15 +1000
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Content-Language: en-US
X-MBO-SPAM-Probability: 
X-Rspamd-Score: -3.36 / 15.00 / 15.00
X-Rspamd-Queue-Id: 593BF26E
X-Rspamd-UID: 6838be
Received-SPF: pass client-ip=2001:67c:2050::465:101;
 envelope-from=mail@HIDDEN; helo=mout-p-101.mailbox.org
X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache.
 That's all we know.
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
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: -2.6 (--)

I'm attempting to fix a bug where wrap-program produces ..X-real-real 
files by mistakenly wrapping already wrapped files. I haven't fully 
tested these because it requires rebuilding everything which takes hours 
to days and core-updates is stuck on mesa now anyway. Perhaps I'll try 
testing on master. Also there may be other places where .X-real files 
are accidentally wrapped, which will now error.





Acknowledgement sent to Brendan Tildesley <mail@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#43367; 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: Sun, 13 Sep 2020 12:45:01 UTC

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