Bug 215905

Summary: sysutils/vagrant -- requires older version of ruby_dep
Product: Ports & Packages Reporter: Matthew Seaman <matthew>
Component: Individual Port(s)Assignee: Nikolai Lifanov <lifanov>
Status: Closed FIXED    
Severity: Affects Only Me CC: joe, lifanov, nate.wheeler
Priority: --- Flags: joe: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
unrestrict ruby_dep version, fix patch-bin_vagrant
none
unrestrict ruby_dep version, fix patch-bin_vagrant matthew: maintainer-approval?

Description Matthew Seaman freebsd_committer freebsd_triage 2017-01-09 11:15:09 UTC
We're getting:
```
$ vagrant status
/usr/local/lib/ruby/site_ruby/2.2/rubygems/specification.rb:1436:in `block in activate_dependencies': can't satisfy 'ruby_dep (<= 1.3.1)', already activated 'ruby_dep-1.5.0' (Gem::LoadError)
        from /usr/local/lib/ruby/site_ruby/2.2/rubygems/specification.rb:1428:in `each'
        from /usr/local/lib/ruby/site_ruby/2.2/rubygems/specification.rb:1428:in `activate_dependencies'
        from /usr/local/lib/ruby/site_ruby/2.2/rubygems/specification.rb:1410:in `activate'
        from /usr/local/lib/ruby/site_ruby/2.2/rubygems.rb:299:in `block in activate_bin_path'
        from /usr/local/lib/ruby/site_ruby/2.2/rubygems.rb:299:in `synchronize'
        from /usr/local/lib/ruby/site_ruby/2.2/rubygems.rb:299:in `activate_bin_path'
        from /usr/local/bin/vagrant:22:in `<main>'
```

# pkg info -x vagrant ruby_dep 
vagrant-1.8.7
rubygem-ruby_dep-1.5.0

Looks like vagrant needs an older version of rubygem-ruby_dep than is currently available in ports.
Comment 1 Matthew Seaman freebsd_committer freebsd_triage 2017-01-09 11:19:16 UTC
From https://github.com/mitchellh/vagrant/blob/master/vagrant.gemspec

```
  # NOTE: The ruby_dep gem is an implicit dependency from the listen gem. Later versions
  # of the ruby_dep gem impose an aggressive constraint on the required ruby version (>= 2.2.5).
  # Explicit constraint is defined to provide required dependency to listen without imposing
  # tighter restrictions on valid ruby versions
  s.add_dependency "ruby_dep", "<= 1.3.1"

```

Looks like we need a rubygem-ruby_dep-1.30 port.
Comment 2 Matthew Seaman freebsd_committer freebsd_triage 2017-01-09 11:23:17 UTC
(In reply to Matthew Seaman from comment #1)

Although given that ruby in ports is already newer than 2.2.5
then perhaps we could just fix the gemspec to allow more recent
ruby_dep
Comment 3 Matthew Seaman freebsd_committer freebsd_triage 2017-01-09 12:06:05 UTC
Created attachment 178665 [details]
unrestrict ruby_dep version, fix patch-bin_vagrant

Patch gemspec to allow any version of ruby_dep -- the upstream restriction to 1.3.1 is because later version of ruby_dep require ruby >= 2.2.5

However the default version in ports is already ruby-2.2.6

Regenerate patches by 'make makepatch'

Reinstate the '@PREFIX@' token in patch-bin_vagrant lost during the previous update of this port.
Comment 4 nahun 2017-01-11 21:48:03 UTC
(In reply to Matthew Seaman from comment #3)
Thanks for the patch Matthew, works for me. Hopefully it gets committed soon.
Comment 5 Po-Chuan Hsieh freebsd_committer freebsd_triage 2017-01-17 18:30:55 UTC
FYI, we always use "patch-gemspec" for XXX.gemspec patch, instead of patch-vagrant.gemspec in this case.
Comment 6 Matthew Seaman freebsd_committer freebsd_triage 2017-01-18 08:13:24 UTC
Created attachment 179024 [details]
unrestrict ruby_dep version, fix patch-bin_vagrant

Address comments by sunpoet -- it's always patch-gemspec rather than patch-vagrant_gemspec
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-01-18 17:50:16 UTC
A commit references this bug:

Author: lifanov
Date: Wed Jan 18 17:49:23 UTC 2017
New revision: 431819
URL: https://svnweb.freebsd.org/changeset/ports/431819

Log:
  fix sysutils/vagrant by relaxing ruby_dep requirement

  PR:		215905
  Submitted by:	matthew
  Reviewed by:	matthew
  Approved by:	matthew (mentor), joe@thrallingpenguin.com (maintainer)
  Differential Revision:	https://reviews.freebsd.org/D9232

Changes:
  head/sysutils/vagrant/Makefile
  head/sysutils/vagrant/files/patch-bin_vagrant
  head/sysutils/vagrant/files/patch-gemspec
Comment 8 Nikolai Lifanov freebsd_committer freebsd_triage 2017-01-18 17:52:07 UTC
Committed, thanks!