[PATCH] gnome: gnome-desktop: Add bubblewrap as an input.

DoneSubmitted by Christopher Baines.
Details
2 participants
  • Ludovic Courtès
  • Christopher Baines
Owner
unassigned
Severity
normal
C
C
Christopher Baines wrote on 7 Jun 2020 22:22
(address . guix-patches@gnu.org)
20200607202226.15637-1-mail@cbaines.net
This is expected to be available, oddly as libseccomp is available. These
changes fix thumbnails for Nautilus.

* gnu/packages/gnome.scm (gnome-desktop)[arguments]: Add 'patch-bubblewrap
phase.
[inputs]: Add bubblewrap.
---
gnu/packages/gnome.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 592cab0b49..92411fb698 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -1286,6 +1286,20 @@ offline sources, providing a centralized place for managing your contacts.")
                  (("\"locale\"")
                   (string-append "\"" libc "/bin/locale\"")))
                #t)))
+         (add-before 'configure 'patch-bubblewrap
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "libgnome-desktop/gnome-desktop-thumbnail-script.c"
+               (("\"bwrap\",")
+                (string-append "\"" (which "bwrap") "\","))
+               (("\"--ro-bind\", \"/usr\", \"/usr\",")
+                (string-append "\"--ro-bind\", \""
+                               (%store-directory)
+                               "\", \""
+                               (%store-directory)
+                               "\","))
+               (("\"--ro-bind\", \"/etc/ld.so.cache\", \"/etc/ld.so.cache\",")
+                "\"--ro-bind\", \"/run/current-system\", \"/run/current-system\","))
+             #t))
          (add-before 'check 'pre-check
            (lambda* (#:key inputs #:allow-other-keys)
              ;; Tests require a running X server and locales.
@@ -1315,6 +1329,7 @@ offline sources, providing a centralized place for managing your contacts.")
     (inputs
      `(("gdk-pixbuf" ,gdk-pixbuf)
        ("glib" ,glib)
+       ("bubblewrap" ,bubblewrap)
        ("libxext" ,libxext)
        ("libxkbfile" ,libxkbfile)
        ("libxrandr" ,libxrandr)))
-- 
2.26.2
L
L
Ludovic Courtès wrote on 9 Jun 2020 09:36
(name . Christopher Baines)(address . mail@cbaines.net)(address . 41756@debbugs.gnu.org)
87r1uoofl0.fsf@gnu.org
Hi!

(There’s a typo in the subject prefix.)

Christopher Baines <mail@cbaines.net> skribis:

Toggle quote (7 lines)
> This is expected to be available, oddly as libseccomp is available. These
> changes fix thumbnails for Nautilus.
>
> * gnu/packages/gnome.scm (gnome-desktop)[arguments]: Add 'patch-bubblewrap
> phase.
> [inputs]: Add bubblewrap.

Nice, I didn’t know the thumbnailer would do that.

Toggle quote (14 lines)
> + (add-before 'configure 'patch-bubblewrap
> + (lambda* (#:key inputs #:allow-other-keys)
> + (substitute* "libgnome-desktop/gnome-desktop-thumbnail-script.c"
> + (("\"bwrap\",")
> + (string-append "\"" (which "bwrap") "\","))
> + (("\"--ro-bind\", \"/usr\", \"/usr\",")
> + (string-append "\"--ro-bind\", \""
> + (%store-directory)
> + "\", \""
> + (%store-directory)
> + "\","))
> + (("\"--ro-bind\", \"/etc/ld.so.cache\", \"/etc/ld.so.cache\",")
> + "\"--ro-bind\", \"/run/current-system\", \"/run/current-system\","))

Perhaps we can replace this second --ro-bind with the empty string?

Otherwise LGTM!

Ludo’.
C
C
Christopher Baines wrote on 13 Jun 2020 13:04
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 41756-done@debbugs.gnu.org)
87r1uj8bw9.fsf@cbaines.net
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (33 lines)
> Hi!
>
> (There’s a typo in the subject prefix.)
>
> Christopher Baines <mail@cbaines.net> skribis:
>
>> This is expected to be available, oddly as libseccomp is available. These
>> changes fix thumbnails for Nautilus.
>>
>> * gnu/packages/gnome.scm (gnome-desktop)[arguments]: Add 'patch-bubblewrap
>> phase.
>> [inputs]: Add bubblewrap.
>
> Nice, I didn’t know the thumbnailer would do that.
>
>> + (add-before 'configure 'patch-bubblewrap
>> + (lambda* (#:key inputs #:allow-other-keys)
>> + (substitute* "libgnome-desktop/gnome-desktop-thumbnail-script.c"
>> + (("\"bwrap\",")
>> + (string-append "\"" (which "bwrap") "\","))
>> + (("\"--ro-bind\", \"/usr\", \"/usr\",")
>> + (string-append "\"--ro-bind\", \""
>> + (%store-directory)
>> + "\", \""
>> + (%store-directory)
>> + "\","))
>> + (("\"--ro-bind\", \"/etc/ld.so.cache\", \"/etc/ld.so.cache\",")
>> + "\"--ro-bind\", \"/run/current-system\", \"/run/current-system\","))
>
> Perhaps we can replace this second --ro-bind with the empty string?
>
> Otherwise LGTM!

Great, I've replaced the second --ro-bind as you suggested, that seems
not to be necessary. I've pushed as
3857aba7ab25c50d64a6d7468d2b5b09bc4f5d60.

Thanks,

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

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl7kssZfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XdYMw/7BA1FB/HwTxiDW/t71BEeDjcMMsgRoc9m9sYc2tjPZny524ay8GT3y0hD
AX7ozd/S4KXJIhwMLVTZVr2WNCL2m2vcoI0QK7koVbYemyEqsRT14+5wj9OmfUpt
JDubZzBYOglr8tdFDrX/fAdvKZTWZiCUCFo9+CZX+Kcj/pCrt4jVnIXc48GbHHRu
MS3SdUChetBylgQAV2zd/xsSZliUzRGN19cwJbSYRrTuAHJnHupn0SDfEUJylkFI
rAucdoQ6w4GqLvHfHzoUtaRmRUlqBhpO+IHHSqC4XuboeNhNxfthcq+mGst5wxE8
J9vIbYxQEqnlGcgphv1GngP0t9N64gjH8zQN2sIamlY9i15uPzXRFuwZlOjTh2Ru
/EcsjOIfHzsSX5ns9kKU//qPqxVrjUfDXzCp+9XF7CQNq/HsmpGTAZHqCUxRfxhL
ZyLhe+REumtKW3Yyy5++VNZWfxuN2/YgKsOtxIMp4GPw/6ClqALa01PUHqRjSnkq
KUsHKJpGE5KtTslhmjnbyueaPW4yiIwk8lCmgQ3HXMB0uN1odhTX32jegwX9MjqW
IjnrXJLkGAuZY+ItLs6NggDzC4I+FRU7cwzCGyfAPKN0UpbV2oH9h05DLv3S8vUZ
hzkYu3fn4pe81VjwWughIoR8RtrqSc1zOdEGqvmHQjCXc0+g0kM=
=ns+d
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 41756@debbugs.gnu.org