0
votes
  1. I use AWS EC2 instances.
  2. I wanted to setup a package versioned at 5.4.0 but the latest that yum search all --enablerepo epel offered was 5.0.0.
  3. I hence did wget and configure && make && make install on v5.4.0 which was available on the web.

Since we do a lot of instance ups and downs, this solution was too time consuming (the compile time) to become a viable solution on deployment.

  1. I then built an RPM from the tar.bz2 versioned at 5.4.0. To ensure libraries and dependencies are no different between the environments, I ran rpmbuild on the same instance as our deployment AMI.
  2. After having had built and deployed the RPM on a test server, I tried installing gearmand to the following result-
[ec2-user@ip-10-0-0-62 ~]$ sudo yum install --enablerepo=epel gearmand

Loaded plugins: priorities, update-motd, upgrade-helper
565 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package gearmand.x86_64 0:1.1.8-2.el6 will be installed
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: gearmand-1.1.8-2.el6.x86_64
--> Processing Dependency: libpq.so.5()(64bit) for package: gearmand-1.1.8-2.el6.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: gearmand-1.1.8-2.el6.x86_64
--> Processing Dependency: libgearman.so.8()(64bit) for package: gearmand-1.1.8-2.el6.x86_64
--> Processing Dependency: libevent-1.4.so.2()(64bit) for package: gearmand-1.1.8-2.el6.x86_64
--> Processing Dependency: libboost_system.so.5()(64bit) for package: gearmand-1.1.8-2.el6.x86_64
--> Processing Dependency: libboost_program_options-mt.so.5()(64bit) for package: gearmand-1.1.8-2.el6.x86_64
--> Running transaction check
---> Package compat-boost-program-options.x86_64 0:1.41.0-11.10.amzn1 will be installed
---> Package compat-boost-system.x86_64 0:1.41.0-11.10.amzn1 will be installed
---> Package compat-libevent.x86_64 0:1.4.13-4.10.amzn1 will be installed
---> Package gearmand.x86_64 0:1.1.8-2.el6 will be installed
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: gearmand-1.1.8-2.el6.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: gearmand-1.1.8-2.el6.x86_64
---> Package libgearman.x86_64 0:1.1.8-2.el6 will be installed
---> Package postgresql9-libs.x86_64 0:9.2.5-1.37.amzn1 will be installed
--> Finished Dependency Resolution
Error: Package: gearmand-1.1.8-2.el6.x86_64 (epel)
           Requires: libmysqlclient.so.16(libmysqlclient_16)(64bit)
Error: Package: gearmand-1.1.8-2.el6.x86_64 (epel)
           Requires: libmysqlclient.so.16()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

This makes me suspect that the RPM installation is in some sense 'freezing and blocking' the libraries it depends upon. I feel this way, because while building the RPM, the package expected higher library versions than those available on amazon or epel repos. Some examples-

+-------------+-------------------+----------------+
|    name     |  amazon version   |  library wants |
+-------------+-------------------+----------------+
|   glibc     |       2.12        |      2.16      |
|   perl      |       5.10        |      5.18      |
|  python     |       2.6.9       |      2.7       |
+-------------+-------------------+----------------+

Am I doing something wrong here, do I need to change something in the source/spec before building the RPM? Because this looks like just the tip of the iceberg.

1
"i then built an RPM" - you need to post the spec file. Mixing RPM and source-based installs can get very hairy.Aaron D. Marasco
The "freezing and blocking" is solely from checks on what other installed packages need. Many packages, e.g., depend on a specific version of MySQL to function. If you have installed MySQL manually, it possible to build a package that depends on a version of MySQL that cannot be upgraded.Jeff Johnson

1 Answers

0
votes

Change rpm-spec file where you can edit the required dependencies version