[SERVER-12753] Specify cyrus-sasl and net-snmp-libs versions in enterprise rpm dependencies Created: 15/Feb/14  Updated: 11/Jul/16  Resolved: 06/Mar/14

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: 2.4.9, 2.5.5
Fix Version/s: 2.6.0-rc2

Type: Task Priority: Minor - P4
Reporter: Ernie Hershey Assignee: Ernie Hershey
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-16017 Suse11 enterprise packages fail due t... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

It's possible to install newer versions of snmp packages that don't work with mongodb binaries.

To reproduce in CentOS 6.4:

wget  http://download.opensuse.org/repositories/home:/ericgearhart:/net-snmp-57/CentOS_CentOS-6/x86_64/net-snmp-libs-5.7.1-31.3.x86_64.rpm http://download.opensuse.org/repositories/home:/ericgearhart:/net-snmp-57/CentOS_CentOS-6/x86_64/net-snmp-devel-5.7.1-31.3.x86_64.rpm  http://download.opensuse.org/repositories/home:/ericgearhart:/net-snmp-57/CentOS_CentOS-6/x86_64/net-snmp-5.7.1-31.3.x86_64.rpm http://download.opensuse.org/repositories/home:/ericgearhart:/net-snmp-57/CentOS_CentOS-6/x86_64/net-snmp-utils-5.7.1-31.3.x86_64.rpm
yum localinstall net-snmp-*
yum install mongodb-enterprise-unstable-server
mongod

The error:

mongod: error while loading shared libraries: libnetsnmpagent.so.20: cannot open shared object file: No such file or directory



 Comments   
Comment by Githook User [ 06/Mar/14 ]

Author:

{u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'}

Message: SERVER-12753 Remove extra %% in enterprise rpm macros file
Branch: master
https://github.com/mongodb/mongo/commit/f6c94b9b45cc200addd2ac98afcb1cde77a03dc5

Comment by Githook User [ 28/Feb/14 ]

Author:

{u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'}

Message: SERVER-12753 Don't use internal rpmbuild dependency generator

This turns on a call out to the find-requires script which
properly adds shared library dependencies to RPM's when
being built in Ubuntu.
Branch: master
https://github.com/mongodb/mongo/commit/6a167a29bd3259ad77ccba6b4b70dd5b0a43c917

Comment by Ernie Hershey [ 27/Feb/14 ]

Based on a lot of testing, help from jonathan.reams@10gen.com, and finally info here - https://fedoraproject.org/wiki/PackagingDrafts/FilteringAutomaticDependencies

I've determined that our package generation environment in Ubuntu, doesn't properly generate automatic shared library dependency because it's trying to use an internal dependency generator. Setting the rpm macro _use_internal_dependency_generator to 0 enables calling out to the external "find-requires" script, which properly detects shared library dependencies and adds them to the rpm.

Building a new RPM with _use_internal_dependency_generator set to 0 properly gives an error when trying to install it alongside versions of libraries that are too new.

Error: Package: mongodb-enterprise-server-2.6.0-0.5.rc0.el6.x86_64 (/mongodb-enterprise-server-2.6.0-0.5.rc0.el6.x86_64)
           Requires: libnetsnmpagent.so.20()(64bit)
           Available: 1:net-snmp-libs-5.5-49.el6.x86_64 (base)
               libnetsnmpagent.so.20()(64bit)
           Installed: 1:net-snmp-libs-5.7.1-31.3.x86_64 (installed)
               Not found
etc.

It also errors when trying to upgrade the libraries while the mongodb package is installed.

[root@ip-10-183-200-251 ~]# rpm -Uvh ./net-snmp-*
warning: ./net-snmp-5.7.1-31.3.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID a8022b27: NOKEY
error: Failed dependencies:
        libnetsnmp.so.20()(64bit) is needed by (installed) mongodb-enterprise-server-2.6.0-0.5.rc0.el6.x86_64
        libnetsnmpagent.so.20()(64bit) is needed by (installed) mongodb-enterprise-server-2.6.0-0.5.rc0.el6.x86_64
        libnetsnmphelpers.so.20()(64bit) is needed by (installed) mongodb-enterprise-server-2.6.0-0.5.rc0.el6.x86_64
        libnetsnmpmibs.so.20()(64bit) is needed by (installed) mongodb-enterprise-server-2.6.0-0.5.rc0.el6.x86_64
[root@ip-10-183-200-251 ~]#

Generated at Thu Feb 08 03:29:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.