From: v.ondruch@... Date: 2019-01-08T12:20:30+00:00 Subject: [ruby-core:90928] [Ruby trunk Bug#15516] Ruby 2.6: `gem build` requires files located in gemspec directory Issue #15516 has been updated by vo.x (Vit Ondruch). This is the original PR changing the behavior https://github.com/rubygems/rubygems/pull/2204 I cannot imagine features like this are accepted without any comparison with other build systems etc. ---------------------------------------- Bug #15516: Ruby 2.6: `gem build` requires files located in gemspec directory https://bugs.ruby-lang.org/issues/15516#change-76126 * Author: pvalena (Pavel Valena) * Status: Third Party's Issue * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux] * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- The `gem build` command requires gem files located in the directory where .gemspec file is. Introduced with Merge RubyGems 3.0.0.beta1[1], specifically ` Dir.chdir(File.dirname(gemspec)) do`. On Fedora[2], this results in package build breakages, like so: ``` $ ls COPYING GPLv2 GPLv3 Gemfile LICENSE Rakefile lib pdf-core.gemspec $ ls .. pdf-core-0.8.1 pdf-core-0.8.1.gem pdf-core.gemspec $ gem build ../*.gemspec WARNING: See http://guides.rubygems.org/specification-reference/ for help ERROR: While executing gem ... (Gem::InvalidSpecificationException) ["COPYING", "GPLv2", "GPLv3", "Gemfile", "LICENSE", "Rakefile"] are not files ``` [1] https://github.com/ruby/ruby/commit/8da8d4b043c37b53a69803c71ff36b478d4776d0#diff-37b494f6a2069b46989f30ab226a5e1e [2] https://copr-be.cloud.fedoraproject.org/results/pvalena/rubygems/fedora-rawhide-x86_64/00842405-rubygem-pdf-core/build.log.gz -- https://bugs.ruby-lang.org/ Unsubscribe: