Bug 210657 - Missing rubygem-mysql2 after www/redmine upgrade (removed by pkg autoremove)
Summary: Missing rubygem-mysql2 after www/redmine upgrade (removed by pkg autoremove)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Torsten Zuehlsdorff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-28 11:48 UTC by Miroslav Lachman
Modified: 2016-07-04 10:46 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Lachman 2016-06-28 11:48:30 UTC
I got very similar error as in PR #205351.

I upgraded from 3.2.0 to 3.2.3. 

# pkg autoremove
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 3 packages:

Installed packages to be REMOVED:
        python27-2.7.11_3
        python2-2_3
        rubygem-mysql2-0.3.20

The operation will free 66 MiB.

Proceed with deinstalling packages? [y/N]: y
 [1/3] Deinstalling python2-2_3...
 [1/3] Deleting files for python2-2_3: 100%
 [2/3] Deinstalling rubygem-mysql2-0.3.20...
 [2/3] Deleting files for rubygem-mysql2-0.3.20: 100%
 [3/3] Deinstalling python27-2.7.11_3...
 [3/3] Deleting files for python27-2.7.11_3: 100%



service redmine restart failed so I tried to run it manually

# /usr/local/bin/thin -D -c /usr/local/www/redmine -u www -g www -a 0.0.0.0 -p 8080 -e production start
Changing process privilege to www:www
Using rack adapter
Could not find gem 'mysql2 (~> 0.3.11)' in any of the gem sources listed in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.


pkg check don't show missing pkgs / libs

# pkg check -da
Checking all packages: 100%

# pkg check -Ba
Checking all packages: 100%


And pkg install -f redmine didn't install gem too.

Manul install of the mysql2 gem fixed the problem
# pkg install rubygem-mysql2


Few days ago I did fresh install of Redmine 3.2.3 in another jail and everything works fine without manual installation of dependencies. So I don't know where is the problem. 
Why Redmine doesn't list rubygem-mysql2 as dependency and why pkg autoremove removes is.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2016-07-02 00:53:28 UTC
Fix Summary, assign, and notify last committer.
Comment 2 Torsten Zuehlsdorff freebsd_committer freebsd_triage 2016-07-04 10:21:48 UTC
(In reply to Miroslav Lachman from comment #0)

You wrote:

> I upgraded from 3.2.0 to 3.2.3. 

Since there was never a 3.2.0 version in the ports, this could cause the problem.

What does pkg info say about:
$ pkg info -f -d redmine

What happens when you pkg delete and pkg install it again?

Greetings,
Torsten
Comment 3 Miroslav Lachman 2016-07-04 10:46:49 UTC
Sorry for the noise and thank you for the pointer. It was error on my side.
The package was built without MYSQL even if I have older version (2.x) with this option (on our build server with poudriere)

Options        :
        LDAP           : off
        MARKDOWN       : on
        MYSQL          : off
        PASSENGER      : off
        POSTGRESQL     : off
        RMAGIC         : on
        THIN           : on


So I changed option, recompile and now it is OK:


# pkg info -f -d redmine
redmine-3.2.3
Name           : redmine
Version        : 3.2.3
Installed on   : Mon Jul  4 12:38:40 2016 CEST
Origin         : www/redmine
Architecture   : freebsd:10:*
Prefix         : /usr/local
Categories     : www
Licenses       : GPLv2
Maintainer     : ruby@FreeBSD.org
WWW            : http://www.redmine.org/
Comment        : Flexible project management web application
Options        :
        LDAP           : off
        MARKDOWN       : on
        MYSQL          : on
        PASSENGER      : off
        POSTGRESQL     : off
        RMAGIC         : on
        THIN           : on
Annotations    :
        cpe            : cpe:2.3:a:redmine:redmine:3.2.3:::::freebsd10:x64
        repo_type      : binary
        repository     : codelab
Flat size      : 10.2MiB
Description    :
Redmine is a flexible project management web application
written using Ruby on Rails framework, it is cross-platform
and cross-database.

Feature Overview:
* Multiple projects support
* Flexible role based access control
* Flexible issue tracking system
* Gantt chart and calendar
* News, documents & files management
* Feeds & email notifications
* Per project wiki
* Per project forums
* Time tracking
* Custom fields for issues, time-entries, projects and users
* SCM integration (SVN, CVS, Git, Mercurial, Bazaar and Darcs)
* Issue creation via email
* Multiple LDAP authentication support
* User self-registration support
* Multilanguage support
* Multiple databases support

WWW: http://www.redmine.org/
Depends on     :
        rubygem-ruby-openid-2.7.0
        rubygem-mimemagic-0.3.1
        rubygem-rake-11.1.2
        rubygem-rack-openid-1.4.2_2
        rubygem-redcarpet-3.3.4
        rubygem-coderay-1.1.1
        rubygem-protected_attributes-1.1.3
        rubygem-roadie-rails-1.1.1
        rubygem-builder-3.0.4
        rubygem-rbpdf-1.19.0
        rubygem-jquery-rails4-4.1.1
        rubygem-rails4-4.2.6
        rubygem-actionpack-xml_parser-1.0.2
        rubygem-mysql2-0.3.20
        rubygem-net-ldap-0.14.0
        rubygem-thin-1.6.4
        rubygem-bundler-1.12.1
        rubygem-mime-types-3.1
        ruby-2.2.5,1
        rubygem-rmagick-2.15.4
        rubygem-request_store-1.3.1
        rubygem-actionpack-action_caching-1.1.1


PS: 3.2.0 was your patch sent privately to me on March 2016