unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Tomas Volf <~@wolfsden.cz>
To: 67557@debbugs.gnu.org
Cc: Tomas Volf <~@wolfsden.cz>
Subject: [bug#67557] [PATCH v2 5/5] gnu: libtorrent-rasterbar: Update to 2.0.9.
Date: Sat,  2 Dec 2023 00:15:17 +0100	[thread overview]
Message-ID: <921fd74462b70786e61ebffea4c4f23d771dc3ef.1701472517.git.~@wolfsden.cz> (raw)
In-Reply-To: <d8b960bb05ea05ac21c44f8511f3bf5ed92cabc8.1701472517.git.~@wolfsden.cz>

Update the package.  Since other packages do depend on the previous
version (and according to their documentation do recommend it), the previous
version is exposed as libtorrent-rasterbar-1.2.

The v2.0.9 requires patching to get tests working.  Sadly one of the changes
is to introduce new binary file, so it is fetched as an input and applied in a
phase.  Snippet is used instead to do the rest of the patching.

* gnu/packages/bittorrent.scm (libtorrent-rasterbar)[version]: Update to
2.0.9.
[source]<snippet>: Patch test/test_copy_file.cpp.
[native-inputs]: Add the missing file (v2_empty_file.torrent).
[arguments]<#:phases>: And add a phase copying it into the correct place.
* gnu/packages/bittorrent.scm (libtorrent-rasterbar-1.2): New variable.
(qbittorrent)[inputs]: Use libtorrent-rasterbar-1.2.
* gnu/packages/enlightenment.scm (epour)[inputs]: Use
libtorrent-rasterbar-1.2.

Change-Id: Ifbbbf02a671f6a3db653499a7a5f2504fd23c255
---
v2:
Drop the patch file and instead do the necessary changes using a substitute* and
a phase copying the test file into the correct place from native-inputs.

 gnu/packages/bittorrent.scm    | 49 +++++++++++++++++++++++++++++-----
 gnu/packages/enlightenment.scm |  2 +-
 2 files changed, 43 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm
index f9098b1a56..7a96ac08eb 100644
--- a/gnu/packages/bittorrent.scm
+++ b/gnu/packages/bittorrent.scm
@@ -80,6 +80,7 @@ (define-module (gnu packages bittorrent)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages ssh)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml))

@@ -416,10 +417,16 @@ (define-public mktorrent
     (license (list l:public-domain      ; sha1.*, used to build without OpenSSL
                    l:gpl2+))))          ; with permission to link with OpenSSL

+(define %v2_empty_file.torrent
+  (origin (method url-fetch)
+          (uri "https://github.com/arvidn/libtorrent/raw/v2.0.9/test/test_torrents/v2_empty_file.torrent")
+          (sha256
+           (base32 "1hydgf0m9193hy9010wl0wrbz4k4cgrqg70jakx68pgi79jcqnrn"))))
+
 (define-public libtorrent-rasterbar
   (package
     (name "libtorrent-rasterbar")
-    (version "1.2.19")
+    (version "2.0.9")
     (source
      (origin
        (method url-fetch)
@@ -428,7 +435,14 @@ (define-public libtorrent-rasterbar
                        "releases/download/v" version "/"
                        "libtorrent-rasterbar-" version ".tar.gz"))
        (sha256
-        (base32 "03p4nvsll568zlyqifid0cn135sg5whbk7g48gkbapnw92ayks7f"))))
+        (base32 "13kry578ifzz4m2f291bbd7v5v9zsi8y3mf38146cnqw0sv95kch"))
+       ;; https://github.com/arvidn/libtorrent/issues/7566
+       ;; Remove when resolved.  I would hope this to be fixed in 2.0.10.
+       (modules '((guix build utils)))
+       (snippet
+        #~(substitute* "test/test_copy_file.cpp"
+            (("EXT4_SUPER_MAGIC, EXT3_SUPER_MAGIC, XFS_SUPER_MAGIC" all)
+             (string-append all ", TMPFS_MAGIC\n"))))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags '("-Dpython-bindings=ON"
@@ -437,6 +451,13 @@ (define-public libtorrent-rasterbar
        #:parallel-tests? #f
        #:phases
        (modify-phases %standard-phases
+         ;; https://github.com/arvidn/libtorrent/issues/7567
+         ;; Remove when resolved.  I would hope this to be fixed in 2.0.10.
+         ;; Do not forget to remove the %v2_empty_file.torrent variable.
+         (add-before 'configure 'copy-v2_empty_file.torrent
+           (lambda* (#:key inputs #:allow-other-keys)
+             (copy-file (assoc-ref inputs "%v2_empty_file.torrent")
+                        "test/test_torrents/v2_empty_file.torrent")))
          (replace 'check
            (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
              (let* ((disabled-tests
@@ -473,10 +494,10 @@ (define-public libtorrent-rasterbar
                          "--timeout" timeout
                          "--output-on-failure"))))))))
     (inputs (list boost openssl))
-    (native-inputs
-     (list libfaketime
-           python-wrapper
-           pkg-config))
+    (native-inputs `(("libfaketime" ,libfaketime)
+                     ("python-wrapper" ,python-wrapper)
+                     ("pkg-config" ,pkg-config)
+                     ("%v2_empty_file.torrent" ,%v2_empty_file.torrent)))
     (home-page "https://www.libtorrent.org/")
     (synopsis "Feature-complete BitTorrent implementation")
     (description
@@ -485,6 +506,20 @@ (define-public libtorrent-rasterbar
 desktops.")
     (license l:bsd-2)))

+(define-public libtorrent-rasterbar-1.2
+  (package
+    (inherit libtorrent-rasterbar)
+    (version "1.2.19")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://github.com/arvidn/libtorrent/"
+                       "releases/download/v" version "/"
+                       "libtorrent-rasterbar-" version ".tar.gz"))
+       (sha256
+        (base32 "03p4nvsll568zlyqifid0cn135sg5whbk7g48gkbapnw92ayks7f"))))))
+
 (define-public qbittorrent
   (package
     (name "qbittorrent")
@@ -506,7 +541,7 @@ (define-public qbittorrent
      (list qttools-5))
     (inputs
      (list boost
-           libtorrent-rasterbar
+           libtorrent-rasterbar-1.2
            openssl
            python-wrapper
            qtsvg-5
diff --git a/gnu/packages/enlightenment.scm b/gnu/packages/enlightenment.scm
index 64d8945f8e..7860c43fef 100644
--- a/gnu/packages/enlightenment.scm
+++ b/gnu/packages/enlightenment.scm
@@ -585,7 +585,7 @@ (define-public epour
     (native-inputs
      (list intltool python-distutils-extra))
     (inputs
-     (list libtorrent-rasterbar python-dbus python-efl python-pyxdg))
+     (list libtorrent-rasterbar-1.2 python-dbus python-efl python-pyxdg))
     (home-page "https://www.enlightenment.org")
     (synopsis "EFL Bittorrent client")
     (description "Epour is a BitTorrent client based on the @dfn{Enlightenment
--
2.41.0




  parent reply	other threads:[~2023-12-01 23:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30 23:19 [bug#67558] [PATCH 0/5] Update libtorrent-rasterbar and dependent programs Tomas Volf
2023-12-01 12:14 ` [bug#67557] [PATCH 1/5] gnu: libtorrent-rasterbar: Update to 1.2.19 Tomas Volf
2023-12-01 12:14 ` [bug#67557] [PATCH 2/5] gnu: deluge: Update to 2.1.1 Tomas Volf
2023-12-01 12:14 ` [bug#67557] [PATCH 3/5] gnu: qbittorrent-enhanced: Update to 4.6.1.10 Tomas Volf
2023-12-01 12:14 ` [bug#67557] [PATCH 4/5] gnu: qbittorrent: Update to 4.6.2 Tomas Volf
2023-12-01 12:14 ` [bug#67557] [PATCH 5/5] gnu: libtorrent-rasterbar: Update to 2.0.9 Tomas Volf
2023-12-01 23:15 ` [bug#67557] [PATCH v2 1/5] gnu: libtorrent-rasterbar: Update to 1.2.19 Tomas Volf
2023-12-01 23:15   ` [bug#67557] [PATCH v2 2/5] gnu: deluge: Update to 2.1.1 Tomas Volf
2023-12-01 23:15   ` [bug#67557] [PATCH v2 3/5] gnu: qbittorrent-enhanced: Update to 4.6.1.10 Tomas Volf
2023-12-01 23:15   ` [bug#67557] [PATCH v2 4/5] gnu: qbittorrent: Update to 4.6.2 Tomas Volf
2023-12-01 23:15   ` Tomas Volf [this message]
2023-12-02  0:28 ` [bug#67557] [PATCH v3 1/5] gnu: libtorrent-rasterbar: Update to 1.2.19 Tomas Volf
2023-12-02  0:28   ` [bug#67557] [PATCH v3 2/5] gnu: deluge: Update to 2.1.1 Tomas Volf
2023-12-02  0:28   ` [bug#67557] [PATCH v3 3/5] gnu: qbittorrent-enhanced: Update to 4.6.1.10 Tomas Volf
2023-12-02  0:28   ` [bug#67557] [PATCH v3 4/5] gnu: qbittorrent: Update to 4.6.2 Tomas Volf
2023-12-02  0:28   ` [bug#67557] [PATCH v3 5/5] gnu: libtorrent-rasterbar: Update to 2.0.9 Tomas Volf
2023-12-06 22:49 ` bug#67557: [PATCH 0/5] Update libtorrent-rasterbar and dependent programs Ludovic Courtès
2023-12-07 15:31   ` [bug#67557] " Tomas Volf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='921fd74462b70786e61ebffea4c4f23d771dc3ef.1701472517.git.~@wolfsden.cz' \
    --to=~@wolfsden.cz \
    --cc=67557@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).