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

Remove git gem dependency. #1946

Merged
merged 1 commit into from
Oct 26, 2022
Merged

Remove git gem dependency. #1946

merged 1 commit into from
Oct 26, 2022

Conversation

jordansissel
Copy link
Owner

Folks are reporting that fpm cannot be installed easily (or at all) on older systems because a transitive dependency(1) rejects ruby versions older than 2.6.

(1) rubygem git depends on addressable which depends on public_suffix

Since the git dependency is only used in the gem source when using a git repo as a installation source, and that usage seems pretty simple -- clone a repo, checkout a branch, etc -- it feels safe to remove this dependency while still keeping the same functionality.

Fixes #1923

Folks are reporting that fpm cannot be installed easily (or at all) on
older systems because a transitive dependency(1) rejects ruby versions
older than 2.6.

(1) rubygem git depends on addressable which depends on public_suffix

Since the `git` dependency is only used in the `gem` source when
using a git repo as a installation source, and that usage seems pretty
simple -- clone a repo, checkout a branch, etc -- it feels safe to
remove this dependency while still keeping the same functionality.

Fixes #1923
@jordansissel
Copy link
Owner Author

To test this, I converted the insist gem from a git repo into a .deb package and checksum'd the file listing and package info:

% for i in main issues/1923; do echo Branch: $i; git checkout $i; bundle exec bin/fpm -f -s gem -t deb --gem-git-repo https://github.com/jordansissel/ruby-insist insist; echo -n "File listing: "; dpkg -c rubygem-insist_1.0.0_all.deb  |md5sum; echo -n "Package info: "; dpkg --info rubygem-insist_1.0.0_all.deb| md5sum; done
Branch: main
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
Replacing 'provides' entry rubygem-insist = 1.0.0 with syntax 'name (= version)' {:level=>:warn}
Force flag given. Overwriting package at rubygem-insist_1.0.0_all.deb {:level=>:warn}
Created package {:path=>"rubygem-insist_1.0.0_all.deb"}
File listing: eaba7630b7634593ba180577d3515c9b  -
Package info: 0e52f3e53585cbc06abf859d7304fd86  -
Branch: issues/1923
Switched to branch 'issues/1923'
Replacing 'provides' entry rubygem-insist = 1.0.0 with syntax 'name (= version)' {:level=>:warn}
Force flag given. Overwriting package at rubygem-insist_1.0.0_all.deb {:level=>:warn}
Created package {:path=>"rubygem-insist_1.0.0_all.deb"}
File listing: 46eb53175cf80fce867a9be6f5c27dbf  -
Package info: 1648fee10413723d4c0683be9a4eb17d  -

File listing and package info is the same output on both branches. Using --debug flag shows fpm invoking git clone command on this PR but not on main branch.

@jordansissel
Copy link
Owner Author

@liger1978 This change may impact your work on #1558/#1557. I did some tests to make sure the --gem-git-repo and --gem-git-branch still work correctly, but I might have missed something. Let me know if you run into any issues next time you try this :)

@khagesh
Copy link

khagesh commented Nov 9, 2022

Are we planning to release 1.14.3 on rubygems? How should I install the latest version which has this fix?

@jordansissel
Copy link
Owner Author

@khagesh I'm working on a release. Takes a bit to write the changelog <3

@jordansissel
Copy link
Owner Author

fpm 1.15.0 is released and contains this improvement.

@khagesh
Copy link

khagesh commented Dec 7, 2022

Thank you so much @jordansissel !

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 this pull request may close these issues.

Dependency Error public_suffix requires Ruby version >= 2.6 and breaks installing on Debian 10 / Buster
2 participants