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

Fix gem build including bin/bin/setup #43

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

agrare
Copy link
Member

@agrare agrare commented Oct 21, 2024

adam@workstation:~/src/manageiq/ffi-vix_disk_lib$ gem build
WARNING:  See https://guides.rubygems.org/specification-reference/ for help
ERROR:  While executing gem ... (Gem::InvalidSpecificationException)
    ["bin/bin/setup"] are not files
	/usr/lib/ruby/vendor_ruby/rubygems/specification_policy.rb:500:in `error'
	/usr/lib/ruby/vendor_ruby/rubygems/specification_policy.rb:303:in `validate_non_files'
	/usr/lib/ruby/vendor_ruby/rubygems/specification_policy.rb:75:in `validate_required!'
	/usr/lib/ruby/vendor_ruby/rubygems/specification_policy.rb:46:in `validate'
	/usr/lib/ruby/vendor_ruby/rubygems/specification.rb:2647:in `validate'
	/usr/lib/ruby/vendor_ruby/rubygems/package.rb:299:in `build'
	/usr/lib/ruby/vendor_ruby/rubygems/package.rb:137:in `build'
	/usr/lib/ruby/vendor_ruby/rubygems/commands/build_command.rb:103:in `build_package'
	/usr/lib/ruby/vendor_ruby/rubygems/commands/build_command.rb:93:in `build_gem'
	/usr/lib/ruby/vendor_ruby/rubygems/commands/build_command.rb:73:in `execute'
	/usr/lib/ruby/vendor_ruby/rubygems/command.rb:328:in `invoke_with_build_args'
	/usr/lib/ruby/vendor_ruby/rubygems/command_manager.rb:253:in `invoke_command'
	/usr/lib/ruby/vendor_ruby/rubygems/command_manager.rb:193:in `process_args'
	/usr/lib/ruby/vendor_ruby/rubygems/command_manager.rb:151:in `run'
	/usr/lib/ruby/vendor_ruby/rubygems/gem_runner.rb:52:in `run'
	/usr/bin/gem:12:in `<main>'

With these changes this is the content of spec.files: LICENSE.txt, README.md, lib/ffi-vix_disk_lib.rb, lib/ffi-vix_disk_lib/api.rb, lib/ffi-vix_disk_lib/api_wrapper.rb, lib/ffi-vix_disk_lib/const.rb, lib/ffi-vix_disk_lib/disk_info.rb, lib/ffi-vix_disk_lib/enum.rb, lib/ffi-vix_disk_lib/exceptions.rb, lib/ffi-vix_disk_lib/libc.rb, lib/ffi-vix_disk_lib/safe_connect_params.rb, lib/ffi-vix_disk_lib/safe_create_params.rb, lib/ffi-vix_disk_lib/struct.rb, lib/ffi-vix_disk_lib/version.rb

And gem build is success

$ gem build
WARNING:  description and summary are identical
WARNING:  open-ended dependency on ffi (>= 0) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  open-ended dependency on bundler (>= 0, development) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  open-ended dependency on manageiq-style (>= 0, development) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  open-ended dependency on rake (>= 0, development) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  open-ended dependency on rspec (>= 0, development) is not recommended
  use a bounded requirement, such as '~> x.y'
WARNING:  open-ended dependency on simplecov (>= 0.21.2, development) is not recommended
  if simplecov is semantically versioned, use:
    add_development_dependency 'simplecov', '~> 0.21', '>= 0.21.2'
WARNING:  See https://guides.rubygems.org/specification-reference/ for help
  Successfully built RubyGem
  Name: ffi-vix_disk_lib
  Version: 1.3.1
  File: ffi-vix_disk_lib-1.3.1.gem

@agrare agrare force-pushed the fix_gem_build_bin_bin_setup branch from 9b3557e to f6a1885 Compare October 21, 2024 20:46
@@ -13,10 +13,9 @@ Gem::Specification.new do |spec|
spec.homepage = "http://github.com/ManageIQ/ffi-vix_disk_lib"
spec.license = "Apache-2.0"

spec.files = `git ls-files -- lib/*`.split("\n")
spec.files += %w(README.md LICENSE.txt)
spec.executables = `git ls-files -- bin/*`.split("\n")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we actually wanted to include bin/setup in the published gem so I just left this out

# ls /opt/manageiq/manageiq-gemset/gems/ffi-vix_disk_lib-1.3.1/bin/
setup

@agrare agrare changed the title Fix gem build including bin/bin/setup [WIP] Fix gem build including bin/bin/setup Oct 21, 2024
Fix for gem build failure:

ffi-vix_disk_lib$ gem build
WARNING:  See https://guides.rubygems.org/specification-reference/ for help
ERROR:  While executing gem ... (Gem::InvalidSpecificationException)
    ["bin/bin/setup"] are not files
@agrare agrare force-pushed the fix_gem_build_bin_bin_setup branch from f6a1885 to 0904c27 Compare October 21, 2024 20:52
@agrare agrare changed the title [WIP] Fix gem build including bin/bin/setup Fix gem build including bin/bin/setup Oct 21, 2024
@bdunne bdunne merged commit 464bece into ManageIQ:master Oct 21, 2024
26 checks passed
@bdunne bdunne self-assigned this Oct 21, 2024
@bdunne bdunne added the bug label Oct 21, 2024
@agrare agrare deleted the fix_gem_build_bin_bin_setup branch October 21, 2024 20:57
agrare added a commit that referenced this pull request Oct 21, 2024
Changes:
* Update actions/checkout version to v4 (#33)
* Test with ruby 3.1 and 3.0 (#34)
* Update codeclimate channel to the latest in manageiq-style (#35)
* Configure Renovate (#30)
* Add VDDK v8.0.3 support (#42)
* Fix gem build (#43)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants