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

Use relative path for Gem::Specification#files #51

Merged
merged 1 commit into from Oct 31, 2019

Conversation

pocke
Copy link
Member

@pocke pocke commented Oct 31, 2019

Problem

It cannot be installed with Ruby master.

$ ruby -v
ruby 2.7.0dev (2019-10-30T15:38:16Z master 5f8795a07b) [x86_64-linux]

$ gem install pkg/ruby-signature-0.1.0.gem
ERROR:  While executing gem ... (Gem::Package::PathError)
    installing into parent path /home/pocke/ghq/github.com/ruby/ruby-signature/lib/ruby/signature/parser.rb of /home/pocke/.rbenv/versions/trunk/lib/ruby/gems/2.7.0/gems/ruby-signature-0.1.0 is not allowed

I guess the cause is this commit of rubygems. rubygems/rubygems@e2b5c58
It makes symlink checking restrict, and the check disallows the absolute path.

Solution

Use a relative path instead of the absolute path.

I'm not sure it is a rubygems's matter, or not.
But absolute path is meaningless for Gem::Specification#files. So I think this change is meaningful even if rubygems is fixed.

Thanks! @hanachin

@soutaro soutaro merged commit 05515c3 into ruby:master Oct 31, 2019
@pocke pocke deleted the relative-path-for-files branch October 31, 2019 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants