GNU bug report logs -
#44595
[PATCH 0/1] gnu: transmission: Move remaining GUI-related files to "gui" output.
Previous Next
Reported by: Simon South <simon <at> simonsouth.net>
Date: Thu, 12 Nov 2020 16:25:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.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 44595 in the body.
You can then email your comments to 44595 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#44595
; Package
guix-patches
.
(Thu, 12 Nov 2020 16:25:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Simon South <simon <at> simonsouth.net>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 12 Nov 2020 16:25:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This patch updates the package for Transmission, a BitTorrent client, to more
completely separate its GUI from the rest of the package's output.
Specifically, it moves the AppData, localization files and man page for the
"transmission-gtk" application to the package's "gui" output. These had
inadvertently been left in the main output, as you can see (before applying
the patch) with
find `guix build transmission` -type f | grep gtk
Note I've also removed a comment from the package definition, as it is now
outdated and I see no reason to be continually expanding it when I feel it is
clear from the phase's name, the preceding comment and the code itself what is
being done and why.
--
Simon South
simon <at> simonsouth.net
Simon South (1):
gnu: transmission: Move remaining GUI-related files to "gui" output.
gnu/packages/bittorrent.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--
2.29.2
Information forwarded
to
guix-patches <at> gnu.org
:
bug#44595
; Package
guix-patches
.
(Thu, 12 Nov 2020 16:28:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 44595 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/bittorrent.scm (transmission)[arguments]<phases>: Expand
"move-gui" phase to move remaining GUI-related files (AppData file,
localization files, man page) to "gui" output.
---
gnu/packages/bittorrent.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index 2a4339fda0..c2ac44a267 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -93,14 +93,18 @@
(rename-file (string-append out "/bin/transmission-gtk")
(string-append gui "/bin/transmission-gtk"))
- ;; Move the '.desktop' and icon files as well.
(mkdir (string-append gui "/share"))
(for-each
(lambda (dir)
(rename-file (string-append out "/share/" dir)
(string-append gui "/share/" dir)))
- '("applications" "icons" "pixmaps")))
- #t)))))
+ '("appdata" "applications" "icons" "locale" "pixmaps"))
+
+ (mkdir-p (string-append gui "/share/man/man1"))
+ (rename-file
+ (string-append out "/share/man/man1/transmission-gtk.1")
+ (string-append gui "/share/man/man1/transmission-gtk.1"))
+ #t))))))
(inputs
`(("libevent" ,libevent)
("curl" ,curl)
--
2.29.2
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Wed, 18 Nov 2020 22:48:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Simon South <simon <at> simonsouth.net>
:
bug acknowledged by developer.
(Wed, 18 Nov 2020 22:48:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 44595-done <at> debbugs.gnu.org (full text, mbox):
Simon South <simon <at> simonsouth.net> skribis:
> * gnu/packages/bittorrent.scm (transmission)[arguments]<phases>: Expand
> "move-gui" phase to move remaining GUI-related files (AppData file,
> localization files, man page) to "gui" output.
Applied, thanks!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#44595
; Package
guix-patches
.
(Sun, 22 Nov 2020 00:04:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 44595 <at> debbugs.gnu.org (full text, mbox):
Hi,
I believe this patch inadvertently broke localization for transmission-
gtk – or at least I'm recently seeing the English version despite the
localization files being present and my locale not being set to English
. There is probably a bindtextdomain call somewhere, that is not
accurately patched and hence refers to "out" instead of "gui".
Regards, Leo
Information forwarded
to
guix-patches <at> gnu.org
:
bug#44595
; Package
guix-patches
.
(Sun, 22 Nov 2020 13:38:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 44595 <at> debbugs.gnu.org (full text, mbox):
Leo Prikler <leo.prikler <at> student.tugraz.at> writes:
> I believe this patch inadvertently broke localization for transmission-
> gtk – or at least I'm recently seeing the English version despite the
> localization files being present and my locale not being set to
> English.
Thanks for pointing this out, Leo. I'll look into it.
--
Simon South
simon <at> simonsouth.net
Information forwarded
to
guix-patches <at> gnu.org
:
bug#44595
; Package
guix-patches
.
(Fri, 27 Nov 2020 21:36:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 44595 <at> debbugs.gnu.org (full text, mbox):
Leo Prikler <leo.prikler <at> student.tugraz.at> writes:
> I believe this patch inadvertently broke localization for transmission-
> gtk – or at least I'm recently seeing the English version despite the
> localization files being present and my locale not being set to English
I think I have this fixed now; I'll reply to this email with a patch
that corrects this by
- Patching Transmission to honour the "localedir" option to its
configure script, and
- Using this option to specify the "gui" output as the location for the
(GTK-specific) localization data.
With the patch applied I can now run transmission-gtk en français, which
really did not work before.
Leo, thanks for mentioning "bindtextdomain" as that was indeed the
source of the problem. If you have a few moments, could you test the
patch please to make sure it fixes the problem you're seeing?
--
Simon South
simon <at> simonsouth.net
Information forwarded
to
guix-patches <at> gnu.org
:
bug#44595
; Package
guix-patches
.
(Fri, 27 Nov 2020 21:42:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 44595 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/bittorrent.scm (transmission)[source]: Add patch to make
Transmission honor the "localedir" option to its configure script.
[arguments]<configure-flags>: Use "localedir" to set the "gui" output as the
location for (GTK-specific) localization data.
[arguments]<phases>: Update "move-gui" to remove a now-superfluous call to
"mkdir" and omit "share/locale" from the list of directories needing to be
moved between outputs.
* gnu/packages/patches/transmission-honor-localedir.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/bittorrent.scm | 12 ++++---
.../transmission-honor-localedir.patch | 34 +++++++++++++++++++
3 files changed, 43 insertions(+), 4 deletions(-)
create mode 100644 gnu/packages/patches/transmission-honor-localedir.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 289f510c11..fe94bcfc2e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1656,6 +1656,7 @@ dist_patch_DATA = \
%D%/packages/patches/tipp10-remove-license-code.patch \
%D%/packages/patches/tk-find-library.patch \
%D%/packages/patches/transcode-ffmpeg.patch \
+ %D%/packages/patches/transmission-honor-localedir.patch \
%D%/packages/patches/ttf2eot-cstddef.patch \
%D%/packages/patches/tup-unbundle-dependencies.patch \
%D%/packages/patches/tuxpaint-stamps-path.patch \
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index ab44caa06a..08e61d7ba2 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -75,12 +75,17 @@
version ".tar.xz"))
(sha256
(base32
- "1wjmn96zrvmk8j1yz2ysmqd7a2x6ilvnwwapcvfzgxs2wwpnai4i"))))
+ "1wjmn96zrvmk8j1yz2ysmqd7a2x6ilvnwwapcvfzgxs2wwpnai4i"))
+ (patches (search-patches "transmission-honor-localedir.patch"))))
(build-system glib-or-gtk-build-system)
(outputs '("out" ; library and command-line interface
"gui")) ; graphical user interface
(arguments
- '(#:glib-or-gtk-wrap-excluded-outputs '("out")
+ '(#:configure-flags
+ (list (string-append "--localedir="
+ (assoc-ref %outputs "gui")
+ "/share/locale"))
+ #:glib-or-gtk-wrap-excluded-outputs '("out")
#:phases
(modify-phases %standard-phases
(add-after 'install 'move-gui
@@ -93,12 +98,11 @@
(rename-file (string-append out "/bin/transmission-gtk")
(string-append gui "/bin/transmission-gtk"))
- (mkdir (string-append gui "/share"))
(for-each
(lambda (dir)
(rename-file (string-append out "/share/" dir)
(string-append gui "/share/" dir)))
- '("appdata" "applications" "icons" "locale" "pixmaps"))
+ '("appdata" "applications" "icons" "pixmaps"))
(mkdir-p (string-append gui "/share/man/man1"))
(rename-file
diff --git a/gnu/packages/patches/transmission-honor-localedir.patch b/gnu/packages/patches/transmission-honor-localedir.patch
new file mode 100644
index 0000000000..70c66bfb2b
--- /dev/null
+++ b/gnu/packages/patches/transmission-honor-localedir.patch
@@ -0,0 +1,34 @@
+This patch modifies Transmission so it honors the "localedir" option
+passed to its configure script, allowing GTK-specific localization
+data to be placed in the package's "gui" output.
+
+Without this patch, localization of transmission-gtk can break as the
+application will expect to find this data in the package's default
+output (as a result of the call to bindtextdomain in gtk/main.c).
+
+diff --git a/configure b/configure
+index a29e24f..3ae8ef4 100755
+--- a/configure
++++ b/configure
+@@ -21305,7 +21305,7 @@ $as_echo "$LINGUAS" >&6; }
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+
+- transmissionlocaledir='${prefix}/${DATADIRNAME}/locale'
++ transmissionlocaledir='${localedir}'
+
+ fi
+
+diff --git a/configure.ac b/configure.ac
+index 57d3cae..ab62093 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -563,7 +563,7 @@ if test "x$enable_nls" = "xyes" ; then
+ AC_SUBST(GETTEXT_PACKAGE)
+ AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
+ AM_GLIB_GNU_GETTEXT
+- transmissionlocaledir='${prefix}/${DATADIRNAME}/locale'
++ transmissionlocaledir='${localedir}'
+ AC_SUBST(transmissionlocaledir)
+ fi
+ AC_SUBST(INTLLIBS)
--
2.29.2
Information forwarded
to
guix-patches <at> gnu.org
:
bug#44595
; Package
guix-patches
.
(Fri, 27 Nov 2020 22:36:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 44595 <at> debbugs.gnu.org (full text, mbox):
Am Freitag, den 27.11.2020, 16:30 -0500 schrieb Simon South:
> With the patch applied I can now run transmission-gtk en français,
> which
> really did not work before.
>
> Leo, thanks for mentioning "bindtextdomain" as that was indeed the
> source of the problem. If you have a few moments, could you test the
> patch please to make sure it fixes the problem you're seeing?
LGTM, it now displays perfektes Alman as before :)
Information forwarded
to
guix-patches <at> gnu.org
:
bug#44595
; Package
guix-patches
.
(Sat, 28 Nov 2020 04:43:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 44595-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Nov 27, 2020 at 11:35:24PM +0100, Leo Prikler wrote:
> Am Freitag, den 27.11.2020, 16:30 -0500 schrieb Simon South:
> > With the patch applied I can now run transmission-gtk en français,
> > which
> > really did not work before.
> >
> > Leo, thanks for mentioning "bindtextdomain" as that was indeed the
> > source of the problem. If you have a few moments, could you test the
> > patch please to make sure it fixes the problem you're seeing?
> LGTM, it now displays perfektes Alman as before :)
Great! Pushed as 1d63445168d0102adf08637ed3be4609a044c9e6
Simon, do you think the patch should be sent upstream? Is the fix
generically useful? Or is it really a weird corner case from Guix?
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#44595
; Package
guix-patches
.
(Sat, 28 Nov 2020 18:10:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 44595-done <at> debbugs.gnu.org (full text, mbox):
Leo Famulari <leo <at> famulari.name> writes:
> Great! Pushed as 1d63445168d0102adf08637ed3be4609a044c9e6
Nice, thank you.
> Simon, do you think the patch should be sent upstream?
This occurred to me but it turns out a recent commit rips out the
Autotools-based build system altogether, so the change no longer has any
context upstream. This also means we may need to devise a new solution
for the next version of Transmission when it releases.
--
Simon South
simon <at> simonsouth.net
Information forwarded
to
guix-patches <at> gnu.org
:
bug#44595
; Package
guix-patches
.
(Sun, 29 Nov 2020 01:12:01 GMT)
Full text and
rfc822 format available.
Message #37 received at 44595-done <at> debbugs.gnu.org (full text, mbox):
On Sat, Nov 28, 2020 at 01:03:49PM -0500, Simon South wrote:
> This occurred to me but it turns out a recent commit rips out the
> Autotools-based build system altogether, so the change no longer has any
> context upstream. This also means we may need to devise a new solution
> for the next version of Transmission when it releases.
Good to know... looks like they are going to use CMake.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 27 Dec 2020 12:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 232 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.