all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#52486] [PATCH] gnu: deluge: Move librsvg to native inputs.
@ 2021-12-14 17:21 Josselin Poiret via Guix-patches via
  2021-12-14 17:56 ` Leo Famulari
  0 siblings, 1 reply; 9+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2021-12-14 17:21 UTC (permalink / raw)
  To: 52486; +Cc: Josselin Poiret

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





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#52486] [PATCH] gnu: deluge: Move librsvg to native inputs.
  2021-12-14 17:21 [bug#52486] [PATCH] gnu: deluge: Move librsvg to native inputs Josselin Poiret via Guix-patches via
@ 2021-12-14 17:56 ` Leo Famulari
  2021-12-14 19:17   ` [bug#52486] [PATCH v2 0/2] Fix deluge propagating a librsvg incompatible with that of gtk+ Josselin Poiret via Guix-patches via
  0 siblings, 1 reply; 9+ messages in thread
From: Leo Famulari @ 2021-12-14 17:56 UTC (permalink / raw)
  To: 52486; +Cc: dev

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.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#52486] [PATCH v2 0/2] Fix deluge propagating a librsvg incompatible with that of gtk+
  2021-12-14 17:56 ` Leo Famulari
@ 2021-12-14 19:17   ` Josselin Poiret via Guix-patches via
  2021-12-14 19:17     ` [bug#52486] [PATCH v2 1/2] gnu: deluge: Move librsvg to native inputs Josselin Poiret via Guix-patches via
                       ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2021-12-14 19:17 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 52486, Josselin Poiret

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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#52486] [PATCH v2 1/2] gnu: deluge: Move librsvg to native inputs
  2021-12-14 19:17   ` [bug#52486] [PATCH v2 0/2] Fix deluge propagating a librsvg incompatible with that of gtk+ Josselin Poiret via Guix-patches via
@ 2021-12-14 19:17     ` Josselin Poiret via Guix-patches via
  2021-12-14 19:17     ` [bug#52486] [PATCH v2 2/2] gnu: deluge: Remove reference of build-time librsvg Josselin Poiret via Guix-patches via
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2021-12-14 19:17 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 52486, Josselin Poiret

* 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





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#52486] [PATCH v2 2/2] gnu: deluge: Remove reference of build-time librsvg
  2021-12-14 19:17   ` [bug#52486] [PATCH v2 0/2] Fix deluge propagating a librsvg incompatible with that of gtk+ Josselin Poiret via Guix-patches via
  2021-12-14 19:17     ` [bug#52486] [PATCH v2 1/2] gnu: deluge: Move librsvg to native inputs Josselin Poiret via Guix-patches via
@ 2021-12-14 19:17     ` Josselin Poiret via Guix-patches via
  2022-01-16 17:58       ` Leo Famulari
  2022-01-16 10:52     ` bug#52486: " Brice Waegeneire
  2022-01-16 10:52     ` [bug#52486] " Brice Waegeneire
  3 siblings, 1 reply; 9+ messages in thread
From: Josselin Poiret via Guix-patches via @ 2021-12-14 19:17 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 52486, Josselin Poiret

* 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





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* bug#52486: [PATCH] gnu: deluge: Move librsvg to native inputs.
  2021-12-14 19:17   ` [bug#52486] [PATCH v2 0/2] Fix deluge propagating a librsvg incompatible with that of gtk+ Josselin Poiret via Guix-patches via
  2021-12-14 19:17     ` [bug#52486] [PATCH v2 1/2] gnu: deluge: Move librsvg to native inputs Josselin Poiret via Guix-patches via
  2021-12-14 19:17     ` [bug#52486] [PATCH v2 2/2] gnu: deluge: Remove reference of build-time librsvg Josselin Poiret via Guix-patches via
@ 2022-01-16 10:52     ` Brice Waegeneire
  2022-01-16 10:52     ` [bug#52486] " Brice Waegeneire
  3 siblings, 0 replies; 9+ messages in thread
From: Brice Waegeneire @ 2022-01-16 10:52 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: 52486-done, Leo Famulari

Hello Josselin

Josselin Poiret <dev@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




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#52486] [PATCH] gnu: deluge: Move librsvg to native inputs.
  2021-12-14 19:17   ` [bug#52486] [PATCH v2 0/2] Fix deluge propagating a librsvg incompatible with that of gtk+ Josselin Poiret via Guix-patches via
                       ` (2 preceding siblings ...)
  2022-01-16 10:52     ` bug#52486: " Brice Waegeneire
@ 2022-01-16 10:52     ` Brice Waegeneire
  3 siblings, 0 replies; 9+ messages in thread
From: Brice Waegeneire @ 2022-01-16 10:52 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: 52486-done, Leo Famulari

Hello Josselin

Josselin Poiret <dev@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




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#52486] [PATCH v2 2/2] gnu: deluge: Remove reference of build-time librsvg
  2021-12-14 19:17     ` [bug#52486] [PATCH v2 2/2] gnu: deluge: Remove reference of build-time librsvg Josselin Poiret via Guix-patches via
@ 2022-01-16 17:58       ` Leo Famulari
  2022-01-16 21:41         ` [bug#52486] [PATCH] gnu: deluge: Move librsvg to native inputs Brice Waegeneire
  0 siblings, 1 reply; 9+ messages in thread
From: Leo Famulari @ 2022-01-16 17:58 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: 52486

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.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#52486] [PATCH] gnu: deluge: Move librsvg to native inputs.
  2022-01-16 17:58       ` Leo Famulari
@ 2022-01-16 21:41         ` Brice Waegeneire
  0 siblings, 0 replies; 9+ messages in thread
From: Brice Waegeneire @ 2022-01-16 21:41 UTC (permalink / raw)
  To: Leo Famulari; +Cc: Josselin Poiret, 52486

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




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-01-16 21:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 17:21 [bug#52486] [PATCH] gnu: deluge: Move librsvg to native inputs Josselin Poiret via Guix-patches via
2021-12-14 17:56 ` Leo Famulari
2021-12-14 19:17   ` [bug#52486] [PATCH v2 0/2] Fix deluge propagating a librsvg incompatible with that of gtk+ Josselin Poiret via Guix-patches via
2021-12-14 19:17     ` [bug#52486] [PATCH v2 1/2] gnu: deluge: Move librsvg to native inputs Josselin Poiret via Guix-patches via
2021-12-14 19:17     ` [bug#52486] [PATCH v2 2/2] gnu: deluge: Remove reference of build-time librsvg Josselin Poiret via Guix-patches via
2022-01-16 17:58       ` Leo Famulari
2022-01-16 21:41         ` [bug#52486] [PATCH] gnu: deluge: Move librsvg to native inputs Brice Waegeneire
2022-01-16 10:52     ` bug#52486: " Brice Waegeneire
2022-01-16 10:52     ` [bug#52486] " Brice Waegeneire

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.