[PATCH] gnu: icecat: Fix GTK 3 file chooser crash.

  • Done
  • quality assurance status badge
Details
2 participants
  • Clément Lassieur
  • Pjotr Prins
Owner
unassigned
Submitted by
Clément Lassieur
Severity
normal
C
C
Clément Lassieur wrote on 21 Apr 2017 19:55
(address . guix-patches@gnu.org)
20170421175540.19672-1-clement@lassieur.org
* gnu/packages/gnuzilla.scm (icecat)[arguments]: Add a 'wrap-xdgdatadirs'
phase to set XDG_DATA_DIRS.
---
gnu/packages/gnuzilla.scm | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 91bb0a6a7..3b8c80d2c 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -750,7 +750,16 @@ standards.")
(copy-file file (string-append icons "/icecat.png"))))
'("default16.png" "default22.png" "default24.png"
"default32.png" "default48.png" "content/icon64.png"
- "mozicon128.png" "default256.png")))))))))
+ "mozicon128.png" "default256.png"))))))
+ ;; This fixes the file chooser crash that happens with GTK 3.
+ (add-after 'install 'wrap-xdgdatadirs
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib"))
+ (gtk (assoc-ref inputs "gtk+"))
+ (gtk-share (string-append gtk "/share")))
+ (wrap-program (car (find-files lib "^icecat$"))
+ `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))))))))
(home-page "https://www.gnu.org/software/gnuzilla/")
(synopsis "Entirely free browser derived from Mozilla Firefox")
(description
--
2.12.2
C
C
Clément Lassieur wrote on 21 Apr 2017 20:18
(address . 26593@debbugs.gnu.org)
87o9vpzkso.fsf@lassieur.org
Clément Lassieur <clement@lassieur.org> writes:

Toggle quote (18 lines)
> * gnu/packages/gnuzilla.scm (icecat)[arguments]: Add a 'wrap-xdgdatadirs'
> phase to set XDG_DATA_DIRS.
> ---
> gnu/packages/gnuzilla.scm | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
> index 91bb0a6a7..3b8c80d2c 100644
> --- a/gnu/packages/gnuzilla.scm
> +++ b/gnu/packages/gnuzilla.scm
> @@ -750,7 +750,16 @@ standards.")
> (copy-file file (string-append icons "/icecat.png"))))
> '("default16.png" "default22.png" "default24.png"
> "default32.png" "default48.png" "content/icon64.png"
> - "mozicon128.png" "default256.png")))))))))
> + "mozicon128.png" "default256.png"))))))
> + ;; This fixes the file chooser crash that happens with GTK 3.
> + (add-after 'install 'wrap-xdgdatadirs
^
I guess I should rename it to 'wrap-program, and update changelog
accordingly.

Toggle quote (10 lines)
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (lib (string-append out "/lib"))
> + (gtk (assoc-ref inputs "gtk+"))
> + (gtk-share (string-append gtk "/share")))
> + (wrap-program (car (find-files lib "^icecat$"))
> + `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))))))))
> (home-page "https://www.gnu.org/software/gnuzilla/")
> (synopsis "Entirely free browser derived from Mozilla Firefox")
> (description
C
C
Clément Lassieur wrote on 22 Apr 2017 01:02
control message for bug #26593
(address . control@debbugs.gnu.org)
87mvb9z7mx.fsf@lassieur.org
tags 26593 fixed
close 26593
P
P
Pjotr Prins wrote on 22 Apr 2017 07:20
Re: Icecat 52 crashing in file dialogues
(name . Clément Lassieur)(address . clement@lassieur.org)
20170422052019.GA15011@mail.thebird.nl
On Fri, Apr 21, 2017 at 08:03:51PM +0200, Cl�ment Lassieur wrote:
Toggle quote (15 lines)
> ng0 <contact.ng0@cryptolab.net> writes:
>
> > Hi,
> >
> > has someone else experienced crashes since the icecat update?
> >
> > My system state isn't that old, but a week older than my profile state.
> > File dialgues (save file) cause random crashes, Open file dialogues (change profile picture, etc) cause reproducible crashes all the time.
>
> Yes, I did experience the same thing. I wrote a small patch that fixes
> it, see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26593.
>
> I'm not a GTK expert, there might be a cleaner way deal with
> XDG_DATA_DIRS.

Looks like we can use similar wrappers for all GTK tools, including
gnumeric, geeqie, gnucash etc. Those are the ones that crash on me
without XDG_DATA_DIRS. At this point I use alias on my Debian based
system:

alias gnucash='env XDG_DATA_DIRS=/usr/local/share:/usr/share gnucash'
alias gnumeric='env XDG_DATA_DIRS=/usr/local/share:/usr/share gnumeric'


--
C
C
Clément Lassieur wrote on 22 Apr 2017 09:49
(name . Pjotr Prins)(address . pjotr.public12@thebird.nl)
87k26czxtf.fsf@lassieur.org
Pjotr Prins <pjotr.public12@thebird.nl> writes:

Toggle quote (24 lines)
> On Fri, Apr 21, 2017 at 08:03:51PM +0200, Clément Lassieur wrote:
>> ng0 <contact.ng0@cryptolab.net> writes:
>>
>> > Hi,
>> >
>> > has someone else experienced crashes since the icecat update?
>> >
>> > My system state isn't that old, but a week older than my profile state.
>> > File dialgues (save file) cause random crashes, Open file dialogues (change profile picture, etc) cause reproducible crashes all the time.
>>
>> Yes, I did experience the same thing. I wrote a small patch that fixes
>> it, see https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26593.
>>
>> I'm not a GTK expert, there might be a cleaner way deal with
>> XDG_DATA_DIRS.
>
> Looks like we can use similar wrappers for all GTK tools, including
> gnumeric, geeqie, gnucash etc. Those are the ones that crash on me
> without XDG_DATA_DIRS. At this point I use alias on my Debian based
> system:
>
> alias gnucash='env XDG_DATA_DIRS=/usr/local/share:/usr/share gnucash'
> alias gnumeric='env XDG_DATA_DIRS=/usr/local/share:/usr/share gnumeric'

There is also a 'glib-or-gtk-build-system' (extension of
'gnu-build-system'), that does some more advanced wrapping. For some
reason, I couldn't get it to work, but if that is the cleaner way, I
could try to dig into it.
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 26593
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch