Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recently broken build #1748

Open
CameronNemo opened this issue Jan 20, 2021 · 1 comment
Open

Recently broken build #1748

CameronNemo opened this issue Jan 20, 2021 · 1 comment

Comments

@CameronNemo
Copy link
Contributor

CameronNemo commented Jan 20, 2021

Hello,

Somewhere between b1e956e and d50f756 my build started failing.

Any help or tips would be appreciated.

This is the log:

$ apk add --no-cache ruby ruby-dev ruby-etc gcc libffi-dev make libc-dev rpm
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
(1/45) Installing libgcc (9.3.0-r2)
(2/45) Installing libstdc++ (9.3.0-r2)
(3/45) Installing binutils (2.34-r1)
(4/45) Installing gmp (6.2.0-r0)
(5/45) Installing isl (0.18-r0)
(6/45) Installing libgomp (9.3.0-r2)
(7/45) Installing libatomic (9.3.0-r2)
(8/45) Installing libgphobos (9.3.0-r2)
(9/45) Installing mpfr4 (4.0.2-r4)
(10/45) Installing mpc1 (1.1.0-r1)
(11/45) Installing gcc (9.3.0-r2)
(12/45) Installing musl-dev (1.1.24-r10)
(13/45) Installing libc-dev (0.7.2-r3)
(14/45) Installing linux-headers (5.4.5-r1)
(15/45) Installing libffi (3.3-r2)
(16/45) Installing pkgconf (1.7.2-r0)
(17/45) Installing libffi-dev (3.3-r2)
(18/45) Installing make (4.3-r0)
(19/45) Installing libacl (2.2.53-r0)
(20/45) Installing libbz2 (1.0.8-r1)
(21/45) Installing expat (2.2.9-r1)
(22/45) Installing lz4-libs (1.9.2-r0)
(23/45) Installing xz-libs (5.2.5-r0)
(24/45) Installing zstd-libs (1.4.5-r0)
(25/45) Installing libarchive (3.4.3-r1)
(26/45) Installing libcap (2.27-r0)
(27/45) Installing db (5.3.28-r1)
(28/45) Installing libintl (0.20.2-r0)
(29/45) Installing libmagic (5.38-r0)
(30/45) Installing nspr (4.27-r0)
(31/45) Installing sqlite-libs (3.32.1-r0)
(32/45) Installing nss (3.60-r0)
(33/45) Installing popt (1.16-r7)
(34/45) Installing rpm (4.15.1-r2)
(35/45) Installing ca-certificates (20191127-r4)
(36/45) Installing ncurses-terminfo-base (6.2_p20200523-r0)
(37/45) Installing ncurses-libs (6.2_p20200523-r0)
(38/45) Installing readline (8.0.4-r0)
(39/45) Installing yaml (0.2.4-r1)
(40/45) Installing ruby-libs (2.7.2-r0)
(41/45) Installing ruby (2.7.2-r0)
(42/45) Installing libgmpxx (6.2.0-r0)
(43/45) Installing gmp-dev (6.2.0-r0)
(44/45) Installing ruby-dev (2.7.2-r0)
(45/45) Installing ruby-etc (2.7.2-r0)
Executing busybox-1.31.1-r19.trigger
Executing ca-certificates-20191127-r4.trigger
OK: 182 MiB in 59 packages
$ gem install --no-document fpm
Building native extensions. This could take a while...
Successfully installed json-2.5.1
Successfully installed cabin-0.9.0
Successfully installed backports-3.20.1
Successfully installed arr-pm-0.0.10
Successfully installed clamp-1.0.1
Building native extensions. This could take a while...
Successfully installed ffi-1.12.2
Successfully installed childprocess-0.9.0
Successfully installed io-like-0.3.1
Successfully installed ruby-xz-0.2.3
Successfully installed stud-0.0.23
Successfully installed mustache-0.99.8
Successfully installed insist-1.0.0
Successfully installed dotenv-2.7.6
Successfully installed pleaserun-0.0.31
Successfully installed rchardet-1.8.0
Successfully installed git-1.8.1
Successfully installed fpm-1.12.0
17 gems installed
$ fpm -s dir -t rpm -n my-pkgname --version "$CI_BUILD_TAG" --prefix /opt/myorg "$BASE_FILENAME"
/usr/lib/ruby/gems/2.7.0/gems/git-1.8.1/lib/git/lib.rb:1097:in `command': git '-c' 'color.ui=false' version   2>&1:sh: git: not found (Git::GitExecuteError)
	from /usr/lib/ruby/gems/2.7.0/gems/git-1.8.1/lib/git/lib.rb:990:in `current_command_version'
	from /usr/lib/ruby/gems/2.7.0/gems/git-1.8.1/lib/git/lib.rb:1000:in `meets_required_version?'
	from /usr/lib/ruby/gems/2.7.0/gems/git-1.8.1/lib/git.rb:28:in `<top (required)>'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	from /usr/lib/ruby/gems/2.7.0/gems/fpm-1.12.0/lib/fpm/package/gem.rb:7:in `<top (required)>'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	from /usr/lib/ruby/gems/2.7.0/gems/fpm-1.12.0/lib/fpm.rb:5:in `<top (required)>'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
	from /usr/lib/ruby/gems/2.7.0/gems/fpm-1.12.0/bin/fpm:4:in `<top (required)>'
	from /usr/bin/fpm:23:in `load'
	from /usr/bin/fpm:23:in `<main>'
ERROR: Job failed: exit code 1
@jordansissel
Copy link
Owner

Looks like something I probably missed in the changelog and the test suite doesn't cover.

#1558

Looks like the git rubygem is trying to execute git when the library is loaded, and it throws an exception
For a workaround, installing git (the program) should solve this.

ruby-git/ruby-git#311

As a more permanent fix, fpm could be modified (in a pull request) to require "git" only when Git is needed.

jordansissel added a commit that referenced this issue Jan 20, 2021
This is necessary because `require "git"` (at time of writing) will
error if the `git` program is not available.

Upstream (ruby git) issue:
ruby-git/ruby-git#311

Related fpm issues: #1748, #1751
jordansissel added a commit that referenced this issue Jun 19, 2021
This is necessary because `require "git"` (at time of writing) will
error if the `git` program is not available.

Upstream (ruby git) issue:
ruby-git/ruby-git#311

Related fpm issues: #1748, #1751
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants