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

  • Open
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Maxime Devos
  • Artyom V. Poptsov
Owner
unassigned
Submitted by
Artyom V. Poptsov
Severity
normal
A
A
Artyom V. Poptsov wrote on 9 Jan 2022 21:53
(address . guix-patches@gnu.org)
87czl0ljgu.fsf@gmail.com
Hello,

I found that BitBucket redirects to the login page:

Toggle snippet (18 lines)
$ ./pre-inst-env guix build --no-substitutes java-snakeyaml
[...]
Starting download of /gnu/store/j4isfqwkfx1c8nhr3jry0rkdq8r39ckc-java-snakeyaml-1.18.tar.gz
From https://bitbucket.org/asomov/snakeyaml/get/v1.18.tar.gz...
following redirection to `https://bitbucket.org/account/signin/?next=/asomov/snakeyaml/get/v1.18.tar.gz'...
following redirection to `https://id.atlassian.com/login?application=bitbucket&continue=https%3A%2F%2Fbitbucket.org%2Faccount%2Fsignin%2F%3FredirectCount%3D1%26next%3D%252Fasomov%252Fsnakeyaml%252Fget%252Fv1.18.tar.gz'...
downloading from https://bitbucket.org/asomov/snakeyaml/get/v1.18.tar.gz ...

sha256 hash mismatch for /gnu/store/j4isfqwkfx1c8nhr3jry0rkdq8r39ckc-java-snakeyaml-1.18.tar.gz:
expected hash: 0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh
actual hash: 11x0dw0l9a7kj55qzr8hzc0fzh44xwwpcjarik10wxyg446wra1j
hash mismatch for store item '/gnu/store/j4isfqwkfx1c8nhr3jry0rkdq8r39ckc-java-snakeyaml-1.18.tar.gz'
build of /gnu/store/f5h57jakhnray2iivbviih8hhyr8far8-java-snakeyaml-1.18.tar.gz.drv failed
View build log at '/var/log/guix/drvs/f5/h57jakhnray2iivbviih8hhyr8far8-java-snakeyaml-1.18.tar.gz.drv.bz2'.
cannot build derivation `/gnu/store/da59l9m79qxqqlhp7z9r7yvh4ysdvgpg-java-snakeyaml-1.18.drv': 1 dependencies couldn't be built
guix build: error: build of `/gnu/store/da59l9m79qxqqlhp7z9r7yvh4ysdvgpg-java-snakeyaml-1.18.drv' failed

So I replaced the BitBucket URI with GitHub mirror URI.

'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. :-/

Thanks,

- Artyom
From 40b56fbd66226f891e36a5114993660676065b36 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index e54d2ed0cb..b091ca8874 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -9917,7 +9917,7 @@ of deserialization.")
(version "1.18")
(source (origin
(method url-fetch)
- (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
+ (uri (string-append "https://github.com/snakeyaml/snakeyaml"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
--
2.25.1
--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmHbSzEACgkQ6cWi2QiY
oC+i5Qf/TNDmJ5nLzCqZTWqG3sw+X7mcpEX3tiwhiuIeBqIbVbP1y0+DFTpqVVcO
d40hLQvTYWjlwohiaK/1JSouUxutEjCyt7mRLcFicPmTG9G9n6DMF21vOsZ0ykOk
31o848VHsaiUNZlJHQmloJGQXyCSrcTOW1d4OFGZ+Q88FrWkqYgMnlsLgjel8IAW
eAvtdgK0WHfqlPyw61C0QGsP9H9hYuvtZFPDlgo3eBdgK2dlc9oNaF+6duKvK7wG
FtdmFsI4apkM+jKA3IFyzNAECcBdq0rEi3qsvtg88OU22BJFVzp90F9wVnJabJ/2
wG6WM2nCGXEM1wi01j8YxMzSfc9X8Q==
=urpA
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 9 Jan 2022 21:57
ed9e4e08c2d6a1bb41eabdfb4924f165fb760564.camel@telenet.be
Artyom V. Poptsov schreef op zo 09-01-2022 om 23:53 [+0300]:
Toggle quote (6 lines)
> -              (uri (string-append
> "https://bitbucket.org/asomov/snakeyaml/get/v"
> +              (uri (string-append
> "https://github.com/snakeyaml/snakeyaml"
>                                    version ".tar.gz"))

When I visit

I get a 404. Are you sure about the URI?
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYdtMQhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7v+TAQDYAU8SJJDHKwm6d9QtnlFzQiHz
gOeJTFFxbjfc0nB6GgEA/yUWWHWlbDqpiFVA5HXnJ23SdBUvCeOD5jO0xoKVLwg=
=/g4T
-----END PGP SIGNATURE-----


A
A
Artyom V. Poptsov wrote on 9 Jan 2022 22:13
Re: [PATCH] gnu: java-snakeyaml: Fix the source URI
(address . guix-patches@gnu.org)
878rvoliix.fsf@gmail.com
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" <poptsov.artyom@gmail.com>
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(-)

Toggle diff (53 lines)
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 <mtg@gnu.org>
;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; 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 <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmHbT/YACgkQ6cWi2QiY
oC+3UQf/dkJVOUSYbYbgPAKJdR6zOVBhtVYi+ZBBms1LZyCHni5+lSXr6Zmhf87v
dS3gY6Apx6vydLITqgKa+qvT9e98uJxmUA3w5l05Uuq52PiP9GNABYV+RTE+Xy2Q
LktBlt7QHs0e5IhylQ/TVtM8lB9pCmvdKGRn1MQCUSkAvCwEWfaLqshVxiu9IW6V
Nx1hVGDwxNYEYT5OGPY8GQyCvfiDYB4w5OB8eNrSI/6o+9oIBQKT4JQ5nbxwc3uc
rQZEZfZUKUiPiM6PVZzjCq6fqM69PSeg+Ak1Zq5MP857QEaabyAiiGUNbsCd1P1+
bn9vS7kIZ6q6w7B7Q4wMEvLBhpr4pw==
=D42b
-----END PGP SIGNATURE-----

A
A
Artyom V. Poptsov wrote on 9 Jan 2022 22:37
(address . guix-patches@gnu.org)
874k6clhek.fsf@gmail.com
As lilyp pointed out in IRC the project is just moved to the new
location; the official repo is still on BitBucket:

I've updated the patch accordingly.

- Artyom
From fc99292c63df22b01f6c65a6098e0bbdc1d7e3e0 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Sun, 9 Jan 2022 23:20:35 +0300
Subject: [PATCH] gnu: java-snakeyaml: Fix the source URI

* gnu/packages/java.scm (java-snakeyaml): The project seems to be moved from
https://bitbucket.org/snakeyaml/snakeyaml; update the URI to match the
actual one.
---
gnu/packages/java.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index e54d2ed0cb..278fdc9f18 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -18,6 +18,7 @@
;;; Copyright © 2021 Mike Gerwitz <mtg@gnu.org>
;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -9917,7 +9918,7 @@ of deserialization.")
(version "1.18")
(source (origin
(method url-fetch)
- (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
+ (uri (string-append "https://bitbucket.org/snakeyaml/snakeyaml/get/v"
version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
@@ -9930,7 +9931,7 @@ 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")
+ (home-page "https://bitbucket.org/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 <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmHbVaMACgkQ6cWi2QiY
oC/yvgf+MJi6eEqI7Vr6dwlL2uDYbxaBkxa8HCW2ivyY/yDSagEhC3yV7S+RbFVJ
PX8tzvwTNRYhImJi88SflhoiNLnou08EBzYCtkVwXSGkyxk/ho+5s6MVEXVpcdJk
cygmyR9cVedIQPC92H59QPH5tF7JTKJgcN5QxAIxchCbeprdK2xC9HRvcGQB44ox
Ddo12dtKnES11RvADxNabstHJnmOgy+j7/5AJEcZ36mBrx8ahgq8/nsmp8KHjdD8
oUxJaxyL1cLcPcFcgC3BAVvPlbC1Ykh0fVkbHbD+JMP/tLyRwpb5Uu/JBI3qWxAf
roXnomw/iR7MeJ3yfGQUkofEkI2i3A==
=J7mm
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 9 Jan 2022 23:06
Re: [bug#53148] [PATCH] gnu: java-snakeyaml: Fix the source URI
954ad66792b4088c44ef20091e30037d4ef955a4.camel@telenet.be
Artyom V. Poptsov schreef op ma 10-01-2022 om 00:37 [+0300]:
Toggle quote (8 lines)
>                (method url-fetch)
> -              (uri (string-append
> "https://bitbucket.org/asomov/snakeyaml/get/v"
> +              (uri (string-append
> "https://bitbucket.org/snakeyaml/snakeyaml/get/v"
>                                    version ".tar.gz"))
>                (file-name (string-append name "-" version ".tar.gz"))

I compared the result of "guix build --source java-snakeyaml"
before this change with

There are some small differences in the tarball:

? ?? Files identical despite different names
? ? --- asomov-snakeyaml-
97aa6dd6be26/src/test/resources/recursive/with-children-as-set.yaml
? ??? +++ snakeyaml-snakeyaml-
97aa6dd6be26/src/test/resources/recursive/with-children-as-set.yaml

So it seems like these tarballs are autogenerated.
Seems like we need to switch to git-fetch, and investigate
other tarballs from bitbucket.org as well?
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYdtccRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7oKsAQDK+7QvKHUg9eT7IXDwEmaJLtgU
5DJdZHHlZtCMJzcTxwD5AQR6EmURum/VZZaVSkB3dsHsUBSRToZfGRU1NQYCkgI=
=ZNvw
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 7 Mar 2022 21:58
control message for bug #53148
(address . control@debbugs.gnu.org)
87tuc9a396.fsf@gnu.org
tags 53148 + moreinfo
quit
?