#31 Use official URL for Source0.
Merged 5 years ago by jaruga. Opened 5 years ago by jaruga.
Unknown source feature/src-url  into  master

file modified
+1 -1
@@ -82,7 +82,7 @@

  # UCD: some of enc/trans/**/*.src

  License: (Ruby or BSD) and Public Domain and MIT and CC0 and zlib and UCD

  URL: http://ruby-lang.org/

- Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.xz

+ Source0: https://cache.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.xz

  Source1: operating_system.rb

  # TODO: Try to push SystemTap support upstream.

  Source2: libruby.stp

The Source0 URL does not work now.
I am not sure when the URL was outdated.
But shall we change it to URL in the official download page?
https://www.ruby-lang.org/en/news/2018/10/18/ruby-2-5-3-released/

https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.xz

$ wget ftp://ftp.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.xz
--2018-10-26 19:16:29--  ftp://ftp.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.xz
           => ‘ruby-2.5.3.tar.xz’
Resolving ftp.ruby-lang.org (ftp.ruby-lang.org)... 151.101.37.178, 2a04:4e42:9::434
Connecting to ftp.ruby-lang.org (ftp.ruby-lang.org)|151.101.37.178|:21... ^C

And fedpkg lint also outputs the warning.

$ fedpkg lint
No rpm found
/home/jaruga/git/fedora-packages/ruby/ruby.spec:217: W: unversioned-explicit-provides bundled(ccan-build_assert)
/home/jaruga/git/fedora-packages/ruby/ruby.spec:218: W: unversioned-explicit-provides bundled(ccan-check_type)
/home/jaruga/git/fedora-packages/ruby/ruby.spec:219: W: unversioned-explicit-provides bundled(ccan-container_of)
/home/jaruga/git/fedora-packages/ruby/ruby.spec:220: W: unversioned-explicit-provides bundled(ccan-list)
/home/jaruga/git/fedora-packages/ruby/ruby.spec: W: invalid-url Source0: ftp://ftp.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.xz <urlopen error ftp error: timeout('timed out',)>
ruby.src:217: W: unversioned-explicit-provides bundled(ccan-build_assert)
ruby.src:218: W: unversioned-explicit-provides bundled(ccan-check_type)
ruby.src:219: W: unversioned-explicit-provides bundled(ccan-container_of)
ruby.src:220: W: unversioned-explicit-provides bundled(ccan-list)
ruby.src: W: invalid-url Source0: ftp://ftp.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.xz <urlopen error ftp error: timeout('timed out',)>
1 packages and 1 specfiles checked; 0 errors, 10 warnings.

After this modification, rpmlint is ok like this.

$ fedpkg --release master lint
No rpm found
/home/jaruga/git/fedora-packages/ruby/ruby.spec:217: W: unversioned-explicit-provides bundled(ccan-build_assert)
/home/jaruga/git/fedora-packages/ruby/ruby.spec:218: W: unversioned-explicit-provides bundled(ccan-check_type)
/home/jaruga/git/fedora-packages/ruby/ruby.spec:219: W: unversioned-explicit-provides bundled(ccan-container_of)
/home/jaruga/git/fedora-packages/ruby/ruby.spec:220: W: unversioned-explicit-provides bundled(ccan-list)
ruby.src:217: W: unversioned-explicit-provides bundled(ccan-build_assert)
ruby.src:218: W: unversioned-explicit-provides bundled(ccan-check_type)
ruby.src:219: W: unversioned-explicit-provides bundled(ccan-container_of)
ruby.src:220: W: unversioned-explicit-provides bundled(ccan-list)
1 packages and 1 specfiles checked; 0 errors, 8 warnings.

Scratch build: running.
https://koji.fedoraproject.org/koji/taskinfo?taskID=30476953

https://ftp.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.xz

How did you know the latter URL? Is there an official page to mention the URL?

Not sure if we should go with:

I'd go with what Ruby downloads page says, IOW:

https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.gz

Is there any reason not to?

https://bugs.ruby-lang.org/issues/14842#note-2

Thanks for the info. I did read it.
I would prefer below URL because I think the URL with official download page is less confusing people than the another short URL, even the short URL.

https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.gz

Pull-Request has been merged by jaruga

5 years ago