Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 904318 - www-apps/redmine: upgrade to 5.0.5 fails
Summary: www-apps/redmine: upgrade to 5.0.5 fails
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Azamat H. Hackimov
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-14 08:54 UTC by Dirk Gouders
Modified: 2023-04-22 12:43 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
My environment: emerge --info '=www-apps/redmine-5.0.5::gentoo' (einfo.out,7.00 KB, text/plain)
2023-04-14 09:03 UTC, Dirk Gouders
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Gouders 2023-04-14 08:54:34 UTC
After an upgrade to 5.0.5 redmine stops working.

The recommended command to finish the upgrade already fails:

```
LOG: postinst
Execute the following command to upgrade environment:

# emerge --config "=www-apps/redmine-5.0.5"

Configuring pkg...

 * 
 * Upgrading database.
 * 
 * Generating secret token.
Could not find gem 'redmine_crm' in locally installed gems.
Run `bundle install` to install missing gems.
 * ERROR: www-apps/redmine-5.0.5::gentoo failed (config phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line 136:  Called pkg_config
 *   environment, line 1856:  Called die
 * The specific snippet of code:
 *           RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake generate_secret_token || die;
 * 
 * If you need support, post the output of `emerge --info '=www-apps/redmine-5.0.5::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-apps/redmine-5.0.5::gentoo'`.
 * The complete build log is located at '/home/portage/tmp/portage/www-apps/redmine-5.0.5/temp/build.log'.
 * The ebuild environment file is located at '/home/portage/tmp/portage/www-apps/redmine-5.0.5/temp/environment'.
 * Working directory: '/var/lib/redmine'
 * S: '/home/portage/tmp/portage/www-apps/redmine-5.0.5/work/redmine-5.0.5'


Reproducible: Always




I tried to completely uninstall redmine and the start with a fresh install but without success.
Comment 1 Dirk Gouders 2023-04-14 09:03:25 UTC
Created attachment 860095 [details]
My environment: emerge --info '=www-apps/redmine-5.0.5::gentoo'
Comment 2 Azamat H. Hackimov 2023-04-15 09:26:16 UTC
Hello.
Seems you got third-party redmine_crm plugin. You need to follow this plugin installation instructions in order to upgrade current installation.
Comment 3 Dirk Gouders 2023-04-15 10:10:47 UTC
Oh yes, thank you for the hint.

I installed a checkbox plugin that I hadn't on my focus.
Will see if I can now solve the problem and report the result.




Side note: the the message

Could not find gem 'redmine_crm' in locally installed gems.
Run `bundle install` to install missing gems.

is not really helpful, because I have no idea how to run `bundle install';
root shouldn't do that and the redmine account also can't do it...
Comment 4 Dirk Gouders 2023-04-15 10:31:07 UTC
Some more detail:

I installed checkbox plugin and that plugin seems to have a
dependency 'redmine_crm':

# grep -r crm /var/lib/redmine/
...
/var/lib/redmine/plugins/redmine_checklists/Gemfile:gem 'redmine_crm'
...


Still, I don't know how to run `bundle install` or other ways to
solve the redmine_crm conflict.  

What helps is to move the plugin directory 
/var/lib/redmine/plugins/redmine_checklists to some other place (out of
redmine's reach) and then the upgrade can be finished and redmine starts.
Comment 5 Dirk Gouders 2023-04-15 11:06:41 UTC
I now tried to re-install the checklist plugin but that did not work either:

# bundle install --without development test --no-deployment
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local without 'development test'`, and stop using this flag
[DEPRECATED] The `--no-deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set --local deployment 'false'`, and stop using this flag
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all
non-root users on this machine.
Fetching gem metadata from https://rubygems.org/..........

[snip]

Using actiontext 6.1.7.3
Using roadie-rails 3.0.0
Installing rails 6.1.7.3
Bundler::GemNotFound: Could not find rails-6.1.7.3.gem for installation
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/source/rubygems.rb:181:in `install'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/installer/gem_installer.rb:54:in `install'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/installer/parallel_installer.rb:186:in `do_install'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/worker.rb:62:in `apply_func'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/worker.rb:57:in `block in process_queue'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/worker.rb:54:in `loop'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/worker.rb:54:in `process_queue'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'

An error occurred while installing rails (6.1.7.3), and Bundler cannot continue.

In Gemfile:
  redmine_crm was resolved to 0.0.59, which depends on
    rails
Comment 6 Azamat H. Hackimov 2023-04-20 18:07:25 UTC
According to https://www.redmine.org/plugins/redmine_checklists, you need:

* Unarchive plugin to folder redmine/plugins
* run bundle exec rake redmine:plugins NAME=redmine_checklists RAILS_ENV=production
Comment 7 Dirk Gouders 2023-04-21 18:45:24 UTC
Tried it but that shows the same problem, still no success:

# bundle exec rake redmine:plugins NAME=redmine_checklists RAILS_ENV=production
Could not find gem 'redmine_crm' in locally installed gems.
Run `bundle install` to install missing gems.
Comment 8 Dirk Gouders 2023-04-21 18:59:34 UTC
What I find irritating: when I run `bundler install' it fails with:

...
Installing rails 6.1.7.3
Bundler::GemNotFound: Could not find rails-6.1.7.3.gem for installation
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/source/rubygems.rb:181:in `install'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/installer/gem_installer.rb:54:in `install'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/installer/parallel_installer.rb:186:in `do_install'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/installer/parallel_installer.rb:177:in `block in worker_pool'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/worker.rb:62:in `apply_func'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/worker.rb:57:in `block in process_queue'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/worker.rb:54:in `loop'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/worker.rb:54:in `process_queue'
  /usr/lib64/ruby/gems/3.0.0/gems/bundler-2.2.33/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads'

An error occurred while installing rails (6.1.7.3), and Bundler cannot continue.

But that rails version is already installed:

# equery list rails
 * Searching for rails ...
[IP-] [  ] dev-ruby/rails-6.1.7.3:6.1
Comment 9 Dirk Gouders 2023-04-21 21:40:43 UTC
It could be that the problems I notice results from ruby was upgraded from
2.7.0 to 3.0.0; there is an old directory 
/usr/lib64/ruby/gems/2.7.0/gems/redmine_crm-0.0.58/ on my machine.
Comment 10 Dirk Gouders 2023-04-22 12:43:53 UTC
One question: is it possible (for testing) to switch back to ruby27, even if it is now masked?

I wonder if I had to do a "gracefull" switch from ruby27 to ruby30.  Actually I never cared
about the ruby version and let portage handle that all...


Therefore, I now wanted to see how redmine behaves if I switch back to ruby27 but here I'm also struggling.  I did some settings in /etc/portage:

./package.unmask\01:dev-lang/ruby:2.7
./make.conf\037:RUBY_TARGETS="ruby27 ruby30"
./package.accept_keywords\02:# Enable ruby-2.7 temporarily to solve redmine problems
./package.accept_keywords\04:=dev-lang/ruby-2.7.8-r3 ~amd64

But that doesn't seem to work.  `emerge --info` doesn't notice my RUBY_TARGETS setting:

# emerge --info | grep -i ruby
[snip]
RUBY_TARGETS="ruby30"
[snip]

And emerging ruby27 also doesn't work:

# emerge -av =dev-lang/ruby-2.7.8-r3

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 1.29 s.


emerge: there are no ebuilds to satisfy ">=dev-ruby/minitest-5.13.0[ruby_targets_ruby27(-)]".
(dependency required by "dev-lang/ruby-2.7.8-r3::gentoo" [ebuild])
(dependency required by "=dev-lang/ruby-2.7.8-r3" [argument])