GNU bug report logs - #66643
[PATCH] gnu: icedove/wayland: Use wrap-program.

Previous Next

Package: guix-patches;

Reported by: Aleksandr Vityazev <avityazew <at> gmail.com>

Date: Thu, 19 Oct 2023 20:15:01 UTC

Severity: normal

Tags: patch

Done: Clément Lassieur <clement <at> lassieur.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66643 in the body.
You can then email your comments to 66643 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#66643; Package guix-patches. (Thu, 19 Oct 2023 20:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aleksandr Vityazev <avityazew <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 19 Oct 2023 20:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Aleksandr Vityazev <avityazew <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: ivan-p-sokolov <at> ya.ru
Subject: [PATCH] gnu: icedove/wayland: Use wrap-program.
Date: Thu, 19 Oct 2023 23:13:33 +0300
Hi,

When $@ is used in a bash script without escaping, it causes files with
spaces in the name to fail to open. This patch fixes this for
icedove-wayland. You can also see this kind of thing in qemu.

https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/virtualization.scm?h=master#n417
I don't think you should use wrap-program there.
WDYT?



* gnu/packages/gnuzilla (icedove/wayland): Use wrap-program, since
"$@" must be escaped.

Thanks to ivan-p-sokolov <at> ya.ru for noticing the issue!
---
 gnu/packages/gnuzilla.scm | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index a367d7a00f..7a71fc8cb9 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2021 Baptiste Strazzul <bstrazzull <at> hotmail.fr>
 ;;; Copyright © 2022 SeerLite <seerlite <at> disroot.org>
+;;; Copyright © 2023 Aleksandr Vityazev <avityazew <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2076,14 +2077,11 @@ (define-public icedove/wayland
       #~(begin
           (use-modules (guix build utils))
           (let* ((exe (string-append #$output "/bin/icedove")))
-            (mkdir-p (dirname exe))
-            (call-with-output-file exe
-              (lambda (port)
-                (format port "#!~a
- MOZ_ENABLE_WAYLAND=1 exec ~a $@"
-                        #$(file-append bash-minimal "/bin/bash")
-                        #$(file-append icedove "/bin/icedove"))))
-            (chmod exe #o555)
+            (install-file #$(file-append icedove "/bin/icedove")
+                          (string-append #$output "/bin"))
+            (wrap-program exe
+              #:sh #$(file-append bash-minimal "/bin/bash")
+              '("MOZ_ENABLE_WAYLAND" "" = ("1")))
             ;; Provide the manual and .desktop file.
             (copy-recursively (string-append #$icedove "/share")
                               (string-append #$output "/share"))

base-commit: c065da01ff956d3c2bdfc45a33d910e509a211d9
prerequisite-patch-id: ec4a09723b91089c8eb5b5269ae81272bb4d81b4
prerequisite-patch-id: 9680399593e3dcdb5b10ee646023efd1215942d9
prerequisite-patch-id: 66497a0079d0077e7b5001707d8211c525ea7193
prerequisite-patch-id: 4f512542ae5806d47054e063e3dd1df66258c530
prerequisite-patch-id: 48abb1e84ca8d85b23794222f8fa5b4d2dfa4699
prerequisite-patch-id: a7fdd2f87131ad73865389152d4a826df24fcae7
prerequisite-patch-id: 1600413a45a50114906f4390653c3fbb7f536a4c
prerequisite-patch-id: 51e95882782a53eda933e884fb5e80487ba52b9f
prerequisite-patch-id: 177b2873f4e77585c464ac3d24bec78d58f128bd
prerequisite-patch-id: 631a6785018f999fcbf7e22fb8e2aae9329ced55
prerequisite-patch-id: 1bd1b328f9e3c7119fed731ffd7e7d87ac33f0c2
prerequisite-patch-id: 79105270952c22f07255cb315da1db44f505b07b
prerequisite-patch-id: 9c5af3baa3dac6233837fb6eb0b7467b969caff4
prerequisite-patch-id: 1156b461c8622b5071656309b05c026abab0f277
prerequisite-patch-id: 8a5e3746b5092496884d50ef4359148ac9349a83
prerequisite-patch-id: 579e44cb67db2d0d3c6232c7c306457a0b5a1a27
prerequisite-patch-id: f5dc3c2782749512e23becb166db7aafacd0be1f
prerequisite-patch-id: 41717fac7367d7e596c093548408ab4bb7d11575
prerequisite-patch-id: 82761b9bede107314f9e75282e1851da281e1d53
prerequisite-patch-id: 4eaffd8b1788833c76590916476337e55ae234b0
prerequisite-patch-id: b501999eff4662ed2917dba3b934abd1a5e2252a
prerequisite-patch-id: d2b947c72b82c6366d8164f1d732a4d25c6cb4fa
prerequisite-patch-id: e1df80a774d3de676f01f262c68f506b0bc1ed92
prerequisite-patch-id: 1e2e9dfb8051b74814d7711e0247674a20329b1e
prerequisite-patch-id: 3dc346b9df988744c17f4c810753d8afcb00a642
prerequisite-patch-id: e2c517c1181b6b34eda2f660985dd6db280d886f
prerequisite-patch-id: cf256fc20be65ced1f1486423f4bbea768d686ae
prerequisite-patch-id: 4c8c9425dae8a721016c4e0e7ed9c2fbe3556d9e
prerequisite-patch-id: fb5c2f33b0ee041a46c6025d04271c3dbdb53d15
prerequisite-patch-id: c9d2a6a24a622955395ad090a0eb22598c16b23d
prerequisite-patch-id: eeeefc7040171849bdaa2c9cd9f47731c80287ea
prerequisite-patch-id: 56c4e80a78ecd8514c5d96c4492925ad57d4dd14
prerequisite-patch-id: ebee5547a41485f7ca26f93609f53ade60601f3f
prerequisite-patch-id: 9c816f74d4166f1be0964ea0ef27d602495cd9bb
prerequisite-patch-id: faae90b478e36eb4f2f17bde8782032b30e2e4db
prerequisite-patch-id: bf26fe3d5e2082445217490ec635e6e85b65247f
prerequisite-patch-id: 1722a64febdad4cfaff4a22c44d9661fcf0b6a5a
prerequisite-patch-id: a50461c3f84736992a9fdcc23c36920a6555d567
prerequisite-patch-id: 6dec4cc56ec808267f99ac5f1be941fabb28e126
prerequisite-patch-id: 741be4e6b815c817ceedff55ea6da159e5050524
-- 
2.41.0


-- 
Best regards,
Aleksandr Vityazev




Information forwarded to guix-patches <at> gnu.org:
bug#66643; Package guix-patches. (Wed, 29 Nov 2023 14:01:02 GMT) Full text and rfc822 format available.

Message #8 received at 66643 <at> debbugs.gnu.org (full text, mbox):

From: Aleksandr Vityazev <avityazew <at> gmail.com>
To: 66643 <at> debbugs.gnu.org
Subject: Re: [bug#66643] [PATCH] gnu: icedove/wayland: Use wrap-program.
Date: Wed, 29 Nov 2023 17:00:23 +0300
Hello,

just a gentle ping -- could anyone review this patch?  If using
wrap-program isn't quite appropriate, I can fix it another way.

-- 
Best regards,
Aleksandr Vityazev




Information forwarded to guix-patches <at> gnu.org:
bug#66643; Package guix-patches. (Thu, 11 Jan 2024 23:06:02 GMT) Full text and rfc822 format available.

Message #11 received at 66643 <at> debbugs.gnu.org (full text, mbox):

From: Aleksandr Vityazev <avityazew <at> gmail.com>
To: 66643 <at> debbugs.gnu.org
Cc: jonathan.brielmaier <at> web.de, clement <at> lassieur.org
Subject: Re: [bug#66643] [PATCH] gnu: icedove/wayland: Use wrap-program.
Date: Fri, 12 Jan 2024 02:05:09 +0300
[Message part 1 (text/plain, inline)]
Hi,

Another month has passed since the last letter, I am sending another
ping, this time I added members of the mozilla team to the CC. The patch
is still working, but if it’s unnecessary, I can just close the thread.

-- 
Best regards,
Aleksandr Vityazev
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#66643; Package guix-patches. (Fri, 12 Jan 2024 00:49:02 GMT) Full text and rfc822 format available.

Message #14 received at 66643 <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: Aleksandr Vityazev <avityazew <at> gmail.com>
Cc: 66643 <at> debbugs.gnu.org, jonathan.brielmaier <at> web.de
Subject: Re: [bug#66643] [PATCH] gnu: icedove/wayland: Use wrap-program.
Date: Fri, 12 Jan 2024 01:48:39 +0100
On Fri, Jan 12 2024, Aleksandr Vityazev wrote:

> Hi,
>
> Another month has passed since the last letter, I am sending another
> ping, this time I added members of the mozilla team to the CC. The patch
> is still working, but if it’s unnecessary, I can just close the thread.

Hey Aleksandr,

Sorry for not replying earlier.

Wouldn't putting quotes around $@ (like \"$@\") be enough?

Thanks,
Clément




Information forwarded to guix-patches <at> gnu.org:
bug#66643; Package guix-patches. (Fri, 12 Jan 2024 04:16:02 GMT) Full text and rfc822 format available.

Message #17 received at 66643 <at> debbugs.gnu.org (full text, mbox):

From: Aleksandr Vityazev <avityazew <at> gmail.com>
To: Clément Lassieur <clement <at> lassieur.org>
Cc: 66643 <at> debbugs.gnu.org, jonathan.brielmaier <at> web.de
Subject: Re: [bug#66643] [PATCH] gnu: icedove/wayland: Use wrap-program.
Date: Fri, 12 Jan 2024 07:15:23 +0300
On 2024-01-12 01:48, Clément Lassieur wrote:

> On Fri, Jan 12 2024, Aleksandr Vityazev wrote:
>
>> Hi,
>>
>> Another month has passed since the last letter, I am sending another
>> ping, this time I added members of the mozilla team to the CC. The patch
>> is still working, but if it’s unnecessary, I can just close the thread.
>
> Hey Aleksandr,
>
> Sorry for not replying earlier.

there's no need to apologize, it's okay. I often forget to add team
members in the CC field of an email.

>
> Wouldn't putting quotes around $@ (like \"$@\") be enough?
>

both options solve the problem, the proposed one is simpler, so you can
choose this one. I will send v2 patch in the next mail.

-- 
Best regards,
Aleksandr Vityazev




Information forwarded to guix-patches <at> gnu.org:
bug#66643; Package guix-patches. (Fri, 12 Jan 2024 04:33:01 GMT) Full text and rfc822 format available.

Message #20 received at 66643 <at> debbugs.gnu.org (full text, mbox):

From: Aleksandr Vityazev <avityazew <at> gmail.com>
To: 66643 <at> debbugs.gnu.org
Cc: jonathan.brielmaier <at> web.de,
 Clément Lassieur <clement <at> lassieur.org>
Subject: [PATCH v2] gnu: icedove/wayland: Use escaped "$@" in the executable
Date: Fri, 12 Jan 2024 07:32:05 +0300
* gnu/packages/gnuzilla (icedove/wayland): Use escaped "$@" in
the executable script.
---
 gnu/packages/gnuzilla.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 188aa02293..7caa044f83 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -2091,7 +2091,7 @@ (define-public icedove/wayland
             (call-with-output-file exe
               (lambda (port)
                 (format port "#!~a
- MOZ_ENABLE_WAYLAND=1 exec ~a $@"
+MOZ_ENABLE_WAYLAND=1 exec ~a \"$@\""
                         #$(file-append bash-minimal "/bin/bash")
                         #$(file-append icedove "/bin/icedove"))))
             (chmod exe #o555)

-- 
2.41.0

-- 
Best regards,
Aleksandr Vityazev




Reply sent to Clément Lassieur <clement <at> lassieur.org>:
You have taken responsibility. (Fri, 12 Jan 2024 12:01:02 GMT) Full text and rfc822 format available.

Notification sent to Aleksandr Vityazev <avityazew <at> gmail.com>:
bug acknowledged by developer. (Fri, 12 Jan 2024 12:01:02 GMT) Full text and rfc822 format available.

Message #25 received at 66643-done <at> debbugs.gnu.org (full text, mbox):

From: Clément Lassieur <clement <at> lassieur.org>
To: Aleksandr Vityazev <avityazew <at> gmail.com>
Cc: 66643-done <at> debbugs.gnu.org, jonathan.brielmaier <at> web.de
Subject: Re: [bug#66643] [PATCH] gnu: icedove/wayland: Use wrap-program.
Date: Fri, 12 Jan 2024 12:59:46 +0100
On Fri, Jan 12 2024, Aleksandr Vityazev wrote:

> On 2024-01-12 01:48, Clément Lassieur wrote:
>
>> On Fri, Jan 12 2024, Aleksandr Vityazev wrote:
>>
>>> Hi,
>>>
>>> Another month has passed since the last letter, I am sending another
>>> ping, this time I added members of the mozilla team to the CC. The patch
>>> is still working, but if it’s unnecessary, I can just close the thread.
>>
>> Hey Aleksandr,
>>
>> Sorry for not replying earlier.
>
> there's no need to apologize, it's okay. I often forget to add team
> members in the CC field of an email.
>
>>
>> Wouldn't putting quotes around $@ (like \"$@\") be enough?
>>
>
> both options solve the problem, the proposed one is simpler, so you can
> choose this one. I will send v2 patch in the next mail.

Ok, the simpler the better!

Pushed, thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 09 Feb 2024 12:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 89 days ago.

Previous Next


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