GNU bug report logs -
#52486
[PATCH] gnu: deluge: Move librsvg to native inputs.
Previous Next
Reported by: Josselin Poiret <dev <at> jpoiret.xyz>
Date: Tue, 14 Dec 2021 17:22:01 UTC
Severity: normal
Tags: patch
Done: Brice Waegeneire <brice <at> waegenei.re>
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 52486 in the body.
You can then email your comments to 52486 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#52486
; Package
guix-patches
.
(Tue, 14 Dec 2021 17:22:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Josselin Poiret <dev <at> jpoiret.xyz>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 14 Dec 2021 17:22:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Grepping the source code shows that librsvg is run by the
builder, and not by deluge itself. This fixes propagation conflicting
with gtk+'s librsvg. For now, use the C variant to build on all archs.
-- >8 --
* gnu/packages/bittorrent.scm (deluge): Do it.
---
gnu/packages/bittorrent.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index 0dcb1ee991..5513878fc0 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -528,7 +528,6 @@ (define-public deluge
(build-system python-build-system)
(propagated-inputs
`(("gtk+" ,gtk+)
- ("librsvg" ,librsvg)
("libtorrent" ,libtorrent-rasterbar)
("python-pycairo" ,python-pycairo)
("python-chardet" ,python-chardet)
@@ -545,7 +544,7 @@ (define-public deluge
("python-twisted" ,python-twisted)
("python-zope-interface" ,python-zope-interface)))
(native-inputs
- (list intltool python-wheel))
+ (list intltool python-wheel librsvg-2.40))
;; TODO: Enable tests.
;; After "pytest-twisted" is packaged, HOME is set, and an X server is
;; started, some of the tests still fail. There are likely some tests
--
2.34.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#52486
; Package
guix-patches
.
(Tue, 14 Dec 2021 17:57:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
On Tue, Dec 14, 2021 at 06:21:51PM +0100, Josselin Poiret via Guix-patches via wrote:
> Grepping the source code shows that librsvg is run by the
> builder, and not by deluge itself. This fixes propagation conflicting
> with gtk+'s librsvg. For now, use the C variant to build on all archs.
> -- >8 --
I applied your patch and built Deluge. Then, I checked what packages it
keeps a reference to:
------
$ guix gc --references $(./pre-inst-env guix build deluge) | grep librsvg
/gnu/store/2dza2psfbrrbvsni8jjqzzqx3hmm8kw8-librsvg-2.50.7
/gnu/store/zxpbc78z40x7dr3ls4dgclkq7i4agx7a-librsvg-2.40.21
------
So, Guix already records a run-time dependency on the Rust variant of
librsvg (likely via GTK+), as well as the C variant if we apply your
patch.
I agree that, if Deluge does not use librsvg at run-time, we should make
it a non-propagated-input. But, we should use the Rust variant on
platforms where it is supported. Check the package definition of GTK+
for an example.
And we should also make it a 'regular' input, because the package does
keep a run-time reference to it.
We are phasing out the C variant because it is abandoned upstream and no
longer receiving security updates.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#52486
; Package
guix-patches
.
(Tue, 14 Dec 2021 17:57:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#52486
; Package
guix-patches
.
(Tue, 14 Dec 2021 19:18:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 52486 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/bittorrent.scm (deluge): Do it.
---
gnu/packages/bittorrent.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index 0dcb1ee991..6c6d01991a 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -528,7 +528,6 @@ (define-public deluge
(build-system python-build-system)
(propagated-inputs
`(("gtk+" ,gtk+)
- ("librsvg" ,librsvg)
("libtorrent" ,libtorrent-rasterbar)
("python-pycairo" ,python-pycairo)
("python-chardet" ,python-chardet)
@@ -545,7 +544,10 @@ (define-public deluge
("python-twisted" ,python-twisted)
("python-zope-interface" ,python-zope-interface)))
(native-inputs
- (list intltool python-wheel))
+ (list intltool python-wheel
+ (if (string-prefix? "x86_64-" (%current-system))
+ librsvg-bootstrap
+ librsvg-2.40)))
;; TODO: Enable tests.
;; After "pytest-twisted" is packaged, HOME is set, and an X server is
;; started, some of the tests still fail. There are likely some tests
--
2.34.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#52486
; Package
guix-patches
.
(Tue, 14 Dec 2021 19:18:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 52486 <at> debbugs.gnu.org (full text, mbox):
Hello again,
This time, a modified patch that selects the proper librsvg as is done
in the gtk definition, but adapted for native-inputs, as well as
another that removes the reference to the librsvg needed at build
time.
`guix size /gnu/store/azyp0avyr91jzwwdb3q82al44r3a8g1h-deluge-2.0.3`
reports only one librsvg, that of GTK.
I've tested this by adding a torrent, checking that it does in fact
download. The UI looks ok, so I guess it should work.
Best,
Josselin
Josselin Poiret (2):
gnu: deluge: Move librsvg to native inputs
gnu: deluge: Remove reference of build-time librsvg
gnu/packages/bittorrent.scm | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
--
2.34.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#52486
; Package
guix-patches
.
(Tue, 14 Dec 2021 19:18:03 GMT)
Full text and
rfc822 format available.
Message #20 received at 52486 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/bittorrent.scm (deluge): Do it.
---
gnu/packages/bittorrent.scm | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index 6c6d01991a..2a59b94f92 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -564,9 +564,19 @@ (define-public deluge
(("names='ngettext'") "names=['ngettext']"))
#t))
(add-after 'install 'wrap
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
- (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
+ (gi-typelib-path
+ (string-join (filter
+ (lambda (x) (not (string-prefix?
+ (assoc-ref
+ (or native-inputs inputs)
+ "librsvg")
+ x)))
+ (string-split
+ (getenv "GI_TYPELIB_PATH")
+ #\:))
+ ":")))
(for-each
(lambda (program)
(wrap-program program
--
2.34.0
Reply sent
to
Brice Waegeneire <brice <at> waegenei.re>
:
You have taken responsibility.
(Sun, 16 Jan 2022 10:53:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Josselin Poiret <dev <at> jpoiret.xyz>
:
bug acknowledged by developer.
(Sun, 16 Jan 2022 10:53:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 52486-done <at> debbugs.gnu.org (full text, mbox):
Hello Josselin
Josselin Poiret <dev <at> jpoiret.xyz> writes:
> Josselin Poiret (2):
> gnu: deluge: Move librsvg to native inputs
> gnu: deluge: Remove reference of build-time librsvg
Thanks for the patch, it fixes the issue with librsvg as expected. Pushed as
1471219a8aabd2d8ad1f6bf1216c734ce73ae175, I've added your copyright to it.
Cheers,
- Brice
Information forwarded
to
guix-patches <at> gnu.org
:
bug#52486
; Package
guix-patches
.
(Sun, 16 Jan 2022 10:54:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 52486-done <at> debbugs.gnu.org (full text, mbox):
Hello Josselin
Josselin Poiret <dev <at> jpoiret.xyz> writes:
> Josselin Poiret (2):
> gnu: deluge: Move librsvg to native inputs
> gnu: deluge: Remove reference of build-time librsvg
Thanks for the patch, it fixes the issue with librsvg as expected. Pushed as
1471219a8aabd2d8ad1f6bf1216c734ce73ae175, I've added your copyright to it.
Cheers,
- Brice
Information forwarded
to
guix-patches <at> gnu.org
:
bug#52486
; Package
guix-patches
.
(Sun, 16 Jan 2022 17:59:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 52486 <at> debbugs.gnu.org (full text, mbox):
On Tue, Dec 14, 2021 at 08:17:13PM +0100, Josselin Poiret wrote:
> * gnu/packages/bittorrent.scm (deluge): Do it.
Thanks for working on this!
Can you send a followup patch adding a code comment that explains the
change? It's good practice to explain code that does strange things,
especially in packages. Otherwise later package maintainers may feel
free to remove it.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#52486
; Package
guix-patches
.
(Sun, 16 Jan 2022 21:42:02 GMT)
Full text and
rfc822 format available.
Message #34 received at 52486 <at> debbugs.gnu.org (full text, mbox):
Hi Leo,
It didn't came into my mind to ask for such explanation to be added as a
commentary, even tho I asked Josselin about it on IRC. I have subbmited a patch
adding such comment in <https://issues.guix.gnu.org/53308>.
Cheers,
- Brice
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 14 Feb 2022 12:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 126 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.