Subject: Re: [PATCH] gnu: java-snakeyaml: Fix the source URI

From: "Artyom V. Poptsov" <[email-masked]>
Date: Mon, 10 Jan 2022 00:13:26 +0300

Oh wait, I forgot to update the patch.  My bad.

Here's the right version of it.

- Artyom
From 10dfd488945fff5d0032a2f58ef0e5cf0005132e Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <[email-masked]>
Date: Sun, 9 Jan 2022 23:20:35 +0300
Subject: [PATCH] gnu: java-snakeyaml: Fix the source URI

* gnu/packages/java.scm (java-snakeyaml): Use the GitHub mirror instead of
  BitBucket repository as BitBucket redirects to the login page.
---
 gnu/packages/java.scm | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index e54d2ed0cb..774db85271 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2021 Mike Gerwitz <[email-masked]>
 ;;; Copyright © 2021 Pierre Langlois <[email-masked]>
 ;;; Copyright © 2021 Guillaume Le Vaillant <[email-masked]>
+;;; Copyright © 2022 Artyom V. Poptsov <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -9916,13 +9917,21 @@ of deserialization.")
     (name "java-snakeyaml")
     (version "1.18")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
-                                  version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                    ;; NOTE: This git repository is not official, but contains
+                    ;; the source code that is in the tarball from BitBucket
+                    ;; repository.  Downloading the tarball from BitBucket
+                    ;; requires authentication in BitBucket.
+                    ;;
+                    ;; NOTE: Official repository lives here:
+                    ;; https://bitbucket.org/asomov/snakeyaml
+                    (url "https://github.com/snakeyaml/snakeyaml")
+                    (commit "9f21bfb21b5f4de7369504641b32184c1b23b7f3")))
+              (file-name (string-append name "-" version))
               (sha256
                (base32
-                "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
+                "1xjd3c2r2yziygw1lrrnibwbalcqir6ic934qp5sq9j1bmzzyy8y"))))
     (build-system ant-build-system)
     (arguments
      `(#:jar-name "java-snakeyaml.jar"
@@ -9930,7 +9939,10 @@ of deserialization.")
        ;; Tests require velocity, a cyclic dependency, and
        ;; java-spring-framework-context which is not packaged.
        #:tests? #f))
-    (home-page "https://bitbucket.org/asomov/snakeyaml")
+    ;; NOTE: 'guix lint' complains about the lack of upstream releases because
+    ;; there's no git tags for each release.  It's really unfortunate
+    ;; situation but that's how the project's upstream is organized.
+    (home-page "https://github.com/snakeyaml/snakeyaml")
     (synopsis "YAML processor")
     (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
     (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
-- 
2.25.1

-- 
Artyom "avp" Poptsov <[email-masked]>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F