crohr / pkgr

Package any app into deb or rpm packages, using heroku buildpacks
http://crohr.me/pkgr/
MIT License
590 stars 66 forks source link

Failing to build ruby on Centos 7 (LanguagePack::Fetcher::FetchError) #168

Closed openface closed 2 years ago

openface commented 3 years ago

Suddenly started having failures recently but has been working fine up until now.

This is using the https://github.com/pkgr/heroku-buildpack-ruby buildpack on a el7 system.

-----> Ruby app
Traceback (most recent call last):
    5: from /home/vagrant/.pkgr/buildpacks/custom/11a3ee729c1dfd1809e40448360c2cd92bcac7f2/heroku-buildpack-ruby/bin/support/download_ruby:14:in `<main>'
    4: from /home/vagrant/.pkgr/buildpacks/custom/11a3ee729c1dfd1809e40448360c2cd92bcac7f2/heroku-buildpack-ruby/lib/language_pack/installers/heroku_ruby_installer.rb:16:in `fetch_unpack'
    3: from /home/vagrant/.pkgr/buildpacks/custom/11a3ee729c1dfd1809e40448360c2cd92bcac7f2/heroku-buildpack-ruby/lib/language_pack/installers/heroku_ruby_installer.rb:16:in `chdir'
    2: from /home/vagrant/.pkgr/buildpacks/custom/11a3ee729c1dfd1809e40448360c2cd92bcac7f2/heroku-buildpack-ruby/lib/language_pack/installers/heroku_ruby_installer.rb:22:in `block in fetch_unpack'
    1: from /home/vagrant/.pkgr/buildpacks/custom/11a3ee729c1dfd1809e40448360c2cd92bcac7f2/heroku-buildpack-ruby/lib/language_pack/fetcher.rb:24:in `fetch_untar'
/home/vagrant/.pkgr/buildpacks/custom/11a3ee729c1dfd1809e40448360c2cd92bcac7f2/heroku-buildpack-ruby/lib/language_pack/shell_helpers.rb:49:in `run!': Command: 'set -o pipefail; curl -L --get --fail --retry 3 buildcurl.com -d recipe=ruby -d version=2.4.1 -d target=$TARGET -s -o - | tar zxf - ' failed unexpectedly: (LanguagePack::Fetcher::FetchError)

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now

I see the same failure occuring attempting to build ruby binary from buildcurl.com, which seems to be specific to compiling libyaml 0.1.7 on centos 7.

https://buildcurl.com/?recipe=ruby&version=2.4.1&target=el%3A7&prefix=%2Fusr%2Flocal

-> [ruby] -> [libyaml] -> Building libyaml 0.1.7...
-> [ruby] -> [libyaml] /tmp/tmp.WQ9hcvTD75 /app
-> [ruby] -> [libyaml]
-> [ruby] -> [libyaml] gzip: stdin: not in gzip format
-> [ruby] -> [libyaml] tar: Child returned status 1
-> [ruby] -> [libyaml] tar: Error is not recoverable: exiting now
-> [ruby] Build failed
-> [ruby]
-> [ruby] gzip: stdin: unexpected end of file
-> [ruby] tar: Child returned status 1
-> [ruby] tar: Error is not recoverable: exiting now
openface commented 3 years ago

This is still an issue even though the buildcurl.com ruby recipe was fixed.

libyaml 0.1.7 apparently no longer builds on el7 and needs to be updated to 0.2.5.

$ pkgr package . --tmpdir=/var/tmp --buildpack=https://github.com/pkgr/heroku-buildpack-ruby.git
-----> Ruby app
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.6.5
-----> Installing dependencies using bundler 1.15.1
/home/vagrant/.pkgr/buildpacks/custom/c63bb174e4c4221f64348e2f0ef9411fc4dff21d/heroku-buildpack-ruby/lib/language_pack/shell_helpers.rb:49:in `run!': Command: 'set -o pipefail; curl -L --get --fail --retry 3 buildcurl.com -d recipe=libyaml -d version=0.1.7 -d target=$TARGET -s -o - | tar zxf - ' failed unexpectedly: (LanguagePack::Fetcher::FetchError)

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now

Corresponding pull request to bump libyaml version: https://github.com/pkgr/heroku-buildpack-ruby/pull/5

crohr commented 2 years ago

This has been fixed since quite a while. Closing.