Opened 9 years ago

Closed 9 years ago

#49286 closed defect (fixed)

ruby20 sitting on the servers must be either tampered or corrupted

Reported by: atma@… Owned by: kimuraw (kimura wataru)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: ruby20

Description

There is a problem with ruby20 package on the mirrors. I had to download the same version from ruby's website to build ruby20. The file is either tampered (worst case scenario) or corrupted (probably):

$ sudo port build ruby20
--->  Computing dependencies for ruby20
--->  Fetching distfiles for ruby20
--->  Attempting to fetch ruby-2.0.0-p647.tar.bz2 from http://her.gr.distfiles.macports.org/mirrors/macports/mpdistfiles/ruby20
--->  Verifying checksums for ruby20
Error: Checksum (md5) mismatch for ruby-2.0.0-p647.tar.bz2
Error: Checksum (rmd160) mismatch for ruby-2.0.0-p647.tar.bz2
Error: Checksum (sha1) mismatch for ruby-2.0.0-p647.tar.bz2
Error: Checksum (sha256) mismatch for ruby-2.0.0-p647.tar.bz2
Error: org.macports.checksum for port ruby20 returned: Unable to verify file checksums
Please see the log file for port ruby20 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_ruby20/ruby20/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port ruby20 failed
$ sudo su -
root# cd /opt/local/var/macports/distfiles/ruby20
root# curl -O https://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p647.tar.bz2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10.2M  100 10.2M    0     0   487k      0  0:00:21  0:00:21 --:--:--  505k
root# shasum ruby-2.0.0-p647.tar.bz2
537f0e212e337022f28ead8e67ffc834fcd468c6  ruby-2.0.0-p647.tar.bz2
root# md5 ruby-2.0.0-p647.tar.bz2
MD5 (ruby-2.0.0-p647.tar.bz2) = 27a3ea1a8b8bca1a6de43a7d08e88b69
gauss:ruby20 root# exit
logout
$ sudo port build ruby20
--->  Computing dependencies for ruby20
--->  Verifying checksums for ruby20
--->  Extracting ruby20
[....]

Change History (4)

comment:1 Changed 9 years ago by mf2k (Frank Schima)

Keywords: ruby macports removed
Owner: changed from macports-tickets@… to kimuraw@…

comment:2 Changed 9 years ago by kimuraw (kimura wataru)

Status: newassigned

Thanks. I confirmed ruby-2.0.0-p647.tar.bz2 from her.gr.distfiles.macports.org looks to broken. I'll ask administrators of the mirror site to solve this problem.

I believe the file from cache.ruby-lang.org is a valid file. The release announce from ruby-lang.org contains checksums.

https://www.ruby-lang.org/en/news/2015/08/18/ruby-2-0-0-p647-released/

https://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p647.tar.bz2

SIZE:   10785285 bytes
SHA1:   537f0e212e337022f28ead8e67ffc834fcd468c6
SHA256: 3c3782e313d1ec3ed06c104eafd133cc54ff5183b991786ece9e957fd6cf1cb9
SHA512: 3416af771ebb0b27ceacf23d309bd2a1ede832c2edf48a5ca46f0b0b84b2ab94fb6362a0c7fe4f77b21253539db8161ae26d23a78d1ba729bf03812454d93d04

Those checksums are same value in MacPorts' portfile.

$ port distfiles ruby20 | head
--->  Distfiles for ruby20
[ruby-2.0.0-p647.tar.bz2] /opt/local/var/macports/distfiles/ruby20/ruby-2.0.0-p647.tar.bz2
 md5: 27a3ea1a8b8bca1a6de43a7d08e88b69
 rmd160: c9b520ff1e5cc2c3c55a39b7cd3ce31317f52d0e
 sha1: 537f0e212e337022f28ead8e67ffc834fcd468c6
 sha256: 3c3782e313d1ec3ed06c104eafd133cc54ff5183b991786ece9e957fd6cf1cb9
  http://mirrors.ibiblio.org/ruby/2.0/ruby-2.0.0-p647.tar.bz2

As a temporary solution, you can get a valid file with master_sites option.

$ sudo rm /opt/local/var/macports/distfiles/ruby20/ruby-2.0.0-p647.tar.bz2
$ sudo port build ruby20 master_sites=https://cache.ruby-lang.org/pub/ruby/2.0/

comment:3 Changed 9 years ago by atma@…

Nice, thanks!

comment:4 Changed 9 years ago by kimuraw (kimura wataru)

Resolution: fixed
Status: assignedclosed

I believe this problem has been solved.

$ curl -O http://her.gr.distfiles.macports.org/mirrors/macports/mpdistfiles/ruby20/ruby-2.0.0-p647.tar.bz2
  :
$ gmd5sum ruby-2.0.0-p647.tar.bz2
27a3ea1a8b8bca1a6de43a7d08e88b69  ruby-2.0.0-p647.tar.bz2
$ openssl dgst -sha256 ruby-2.0.0-p647.tar.bz2
SHA256(ruby-2.0.0-p647.tar.bz2)= 3c3782e313d1ec3ed06c104eafd133cc54ff5183b991786ece9e957fd6cf1cb9
$
Note: See TracTickets for help on using tickets.