Bug 211276 - [PATCH]: www/redmine: Fix error from duplicate net-ldap gem check
Summary: [PATCH]: www/redmine: Fix error from duplicate net-ldap gem check
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Torsten Zuehlsdorff
URL:
Keywords: patch, patch-ready
Depends on:
Blocks:
 
Reported: 2016-07-21 17:54 UTC by Mark Felder
Modified: 2017-01-03 05:11 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (ruby)
feld: maintainer-feedback?
feld: merge-quarterly?


Attachments
patch (2.32 KB, patch)
2016-07-21 17:54 UTC, Mark Felder
no flags Details | Diff
Update to 3.3 and patch (12.81 KB, patch)
2016-09-06 15:28 UTC, Torsten Zuehlsdorff
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Felder freebsd_committer freebsd_triage 2016-07-21 17:54:07 UTC
Created attachment 172791 [details]
patch

On a clean install of Redmine:

App 82673 stdout:
[ 2016-07-21 13:42:03.2952 47178/0x805958800 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /usr/local/www/redmine: An error occurred while starting up the preloader.
  Error ID: 4ae9bdd1
  Error details saved to: /tmp/passenger-error-cZyXLf.html
  Message from application:
[!] There was an error parsing `Gemfile`: You cannot specify the same gem twice with different version requirements.
You specified: net-ldap (>= 0) and net-ldap (>= 0.12.0). Bundler cannot continue.

 #  from /usr/local/www/redmine/Gemfile:94
 #  -------------------------------------------
 #  Dir["#{File.dirname(__FILE__)}/bundler.d/*.rb"].each do |bundle|
 >    self.instance_eval(Bundler.read_file(bundle))
 #  end
 #  -------------------------------------------
 (Bundler::Dsl::DSLError)
  /usr/local/www/redmine/Gemfile:94:in `instance_eval'
  (eval):1:in `block in eval_gemfile'
  /usr/local/www/redmine/Gemfile:94:in `instance_eval'
  /usr/local/www/redmine/Gemfile:94:in `block in eval_gemfile'
  /usr/local/www/redmine/Gemfile:93:in `each'
  /usr/local/www/redmine/Gemfile:93:in `eval_gemfile'
  /usr/local/lib/ruby/gems/2.2/gems/bundler-1.12.1/lib/bundler/dsl.rb:39:in `instance_eval'
  /usr/local/lib/ruby/gems/2.2/gems/bundler-1.12.1/lib/bundler/dsl.rb:39:in `eval_gemfile'
  /usr/local/lib/ruby/gems/2.2/gems/bundler-1.12.1/lib/bundler/dsl.rb:11:in `evaluate'
  /usr/local/lib/ruby/gems/2.2/gems/bundler-1.12.1/lib/bundler/definition.rb:25:in `build'
  /usr/local/lib/ruby/gems/2.2/gems/bundler-1.12.1/lib/bundler.rb:123:in `definition'
  /usr/local/lib/ruby/gems/2.2/gems/bundler-1.12.1/lib/bundler.rb:91:in `setup'
  /usr/local/lib/ruby/gems/2.2/gems/bundler-1.12.1/lib/bundler/setup.rb:19:in `<top (required)>'
  /usr/local/lib/ruby/site_ruby/2.2/rubygems/core_ext/kernel_require.rb:55:in `require'
  /usr/local/lib/ruby/site_ruby/2.2/rubygems/core_ext/kernel_require.rb:55:in `require'
  /usr/local/lib/ruby/gems/2.2/gems/passenger-5.0.28/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:430:in `activate_gem'
  /usr/local/lib/ruby/gems/2.2/gems/passenger-5.0.28/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:297:in `block in run_load_path_setup_code'
  /usr/local/lib/ruby/gems/2.2/gems/passenger-5.0.28/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:435:in `running_bundler'
  /usr/local/lib/ruby/gems/2.2/gems/passenger-5.0.28/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:296:in `run_load_path_setup_code'
  /usr/local/lib/ruby/gems/2.2/gems/passenger-5.0.28//src/helper-scripts/rack-preloader.rb:100:in `preload_app'
  /usr/local/lib/ruby/gems/2.2/gems/passenger-5.0.28//src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
  /usr/local/lib/ruby/gems/2.2/gems/passenger-5.0.28//src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
  /usr/local/lib/ruby/gems/2.2/gems/passenger-5.0.28//src/helper-scripts/rack-preloader.rb:29:in `<main>'

13:48:43 ticketstest:/usr/local/www/redmine > pkg which /usr/local/www/redmine/bundler.d/ldap.rb 
/usr/local/www/redmine/bundler.d/ldap.rb was installed by package redmine-3.2.3
13:48:50 ticketstest:/usr/local/www/redmine > cat /usr/local/www/redmine/bundler.d/ldap.rb
gem "net-ldap", ">= 0.12.0"


So the Gemfile and bundler.d/ldap.rb conflict on this net-ldap gem check. I don't see how bundler.d/* files are being generated, so it seems easiest to just remove it from the main Gemfile.
Comment 1 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2016-07-27 07:49:14 UTC
I will have a look at it, since i wrote the last update ;)
Comment 2 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2016-08-09 15:01:19 UTC
Any objections if i put this together with an update to current release 3.3?
Comment 3 Mark Felder freebsd_committer freebsd_triage 2016-08-12 14:21:48 UTC
(In reply to Torsten Zuehlsdorff from comment #2)

No objections here.
Comment 4 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2016-09-06 15:28:15 UTC
Created attachment 174418 [details]
Update to 3.3 and patch

Sorry for my late response. I'm completely out of time. :/

I write a raw draft to update redmine to 3.3 and try to incorporate a fix for the ldap problem. Beside a simple build-tests i could not test it in anyway - every feedback would be nice. I hopefully find more time until the end of the week.
Comment 5 Steve Wills freebsd_committer freebsd_triage 2016-09-29 15:35:55 UTC
(In reply to Torsten Zuehlsdorff from comment #4)
Sorry, didn't see this when committing the fix for 213085, if it's not too much trouble can you update the patch?
Comment 6 David Demelier 2016-10-25 17:04:11 UTC
I thought this ldap problem was solved years ago, I stambled accross it again.
Comment 7 Steve Wills freebsd_committer freebsd_triage 2017-01-03 05:11:46 UTC
I think this is fixed now, please reopen if not.