Bug 1083637 - Trim dependencies in rabbitmq-server
Summary: Trim dependencies in rabbitmq-server
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: rabbitmq-server
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Hubert Plociniczak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1086146
TreeView+ depends on / blocked
 
Reported: 2014-04-02 15:46 UTC by Lon Hohberger
Modified: 2014-07-30 21:57 UTC (History)
9 users (show)

Fixed In Version: rabbitmq-server-3.1.5-7.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-30 21:57:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Example (1.70 KB, patch)
2014-04-02 17:14 UTC, Lon Hohberger
no flags Details | Diff

Description Lon Hohberger 2014-04-02 15:46:01 UTC
Description of problem:

The rabbitmq-server package pulls in 59 dependencies on a system with X previously installed.  (It also pulls in wxGTK and wxGTK-gl, which is 

rabbitmq-server needs the following erlang packages to run:
  Requires: erlang-inets
  Requires: erlang-mnesia
  Requires: erlang-erts
  Requires: erlang-asn1
  Requires: erlang-snmp
  Requires: erlang-xmerl
  Requires: erlang-stdlib
  Requires: erlang-public_key
  Requires: erlang-otp_mibs
  Requires: erlang-ssl
  Requires: erlang-kernel
  Requires: erlang-sasl
  Requires: erlang-crypto
  Requires: erlang-os_mon
  Requires: erlang-runtime_tools

There are some internal Requires: lines in erlang which pull in more, but if you delete them with 'rpm -e --nodeps', rabbitmq-server still operates.

Without changing the internal requirements of the erlang package, using the above 'Requires' lines cuts the number of dependencies pulled in from ~59 to ~29.  It still includes wxGTK / wxGTK-gl, so not perfect, but better.

(It is also possible to build Erlang without wx* support, but it is less beneficial to do so as doing so breaks things like the debugger - I'll explore that separately.)

Version-Release number of selected component (if applicable): 3.1.5-3.el7

Comment 1 Lon Hohberger 2014-04-02 15:47:25 UTC
My ultimate goal is to also have the erlang package buildable or usable without wxGTK, since it's rather silly to have rabbitmq-server require X and/or OpenGL.

Comment 2 Lon Hohberger 2014-04-02 15:49:27 UTC
(Obviously comment #1 is not the subject of this bugzilla :) )

Comment 3 Peter Lemenkov 2014-04-02 16:13:41 UTC

*** This bug has been marked as a duplicate of bug 784693 ***

Comment 4 Lon Hohberger 2014-04-02 17:14:07 UTC
There are two separate optimizations - one is for erlang, which looks like bug 784693 - the other is for rabbitmq-server's .spec file - which does -not- need to include the erlang environment metapackage as it does now.

For example, to run rabbitmq-server, there's no need for the debugger, observer, the release tool, etc. - all of which are pulled in as part of the erlang metapackage.

I'll attach a specfile patch.

Comment 5 Lon Hohberger 2014-04-02 17:14:36 UTC
Created attachment 881910 [details]
Example

Comment 6 Peter Lemenkov 2014-04-02 17:18:44 UTC
(In reply to Lon Hohberger from comment #4)
> There are two separate optimizations - one is for erlang, which looks like
> bug 784693 - the other is for rabbitmq-server's .spec file - which does
> -not- need to include the erlang environment metapackage as it does now.

Yes, indeed. These are two separate issues.

Comment 7 Richard W.M. Jones 2014-04-02 17:42:03 UTC
The patch in comment 5 looks reasonable.  Peter what do you think
about [me or you] adding this?  So far I've only made a few quite
conservative changes to the rabbitmq-server package; this is a bit
larger.

Comment 8 Peter Lemenkov 2014-04-02 18:07:04 UTC
(In reply to Richard W.M. Jones from comment #7)
> The patch in comment 5 looks reasonable.  Peter what do you think
> about [me or you] adding this?  So far I've only made a few quite
> conservative changes to the rabbitmq-server package; this is a bit
> larger.

Looks good to me.

The package is quite large and contains plugins which are currently cannot be processed by my own poor-man dependency generator properly. However if considering only core functionality it could be trimmed down even more. Here is my final list of RabbitMQ dependencies:

Requires: erlang-erts%{?_isa}
Requires: erlang-kernel%{?_isa}
Requires: erlang-mnesia%{?_isa}
Requires: erlang-os_mon%{?_isa}
Requires: erlang-public_key%{?_isa}
Requires: erlang-sasl%{?_isa}
Requires: erlang-ssl%{?_isa}
Requires: erlang-stdlib%{?_isa}
Requires: erlang-tools%{?_isa}
Requires: erlang-xmerl%{?_isa}

Note that I added "Requires: erlang-tools". Not sure if we need to add %{?_isa} since the package is noarch.

The following dependencies can be removed since my script failed to recognize dependency on them:

Requires: erlang-inets >= %{erlang_minver}
Requires: erlang-asn1 >= %{erlang_minver}
Requires: erlang-snmp >= %{erlang_minver}
Requires: erlang-otp_mibs >= %{erlang_minver}
Requires: erlang-crypto >= %{erlang_minver}
Requires: erlang-runtime_tools >= %{erlang_minver}

There could be a possibility that some of the plugins depends on them though.

Rich, please go on with the changes - I'm not an active RabbitMQ user these days (however I'll be back in a couple of months - my next project will rely on it) so I can't maintain it properly right now.

Comment 9 Lon Hohberger 2014-04-04 16:39:17 UTC
So, I tried this in my specfile:

  Requires: erlang-mnesia >= %{erlang_minver}
  Requires: erlang-erts >= %{erlang_minver}
  Requires: erlang-xmerl >= %{erlang_minver}
  Requires: erlang-stdlib >= %{erlang_minver}
  Requires: erlang-public_key >= %{erlang_minver}
  Requires: erlang-ssl >= %{erlang_minver}
  Requires: erlang-kernel >= %{erlang_minver}
  Requires: erlang-sasl >= %{erlang_minver}
  Requires: erlang-os_mon >= %{erlang_minver}
  Requires: erlang-tools >= %{erlang_minver}

I turned on SSL and erased runtime_tools (and tools) and things still work. Forcefully erasing some of the others (for example inets) caused rabbitmq-server to fail on startup:

Error description:
   {error,{"no such file or directory","inets.app"}}

You were right about runtime_tools, it's not needed really.

erlang-snmp-R16B-03.2min.2.el7.x86_64
erlang-asn1-R16B-03.2min.2.el7.x86_64
erlang-inets-R16B-03.2min.2.el7.x86_64
erlang-crypto-R16B-03.2min.2.el7.x86_64
erlang-kernel-R16B-03.2min.2.el7.x86_64
erlang-mnesia-R16B-03.2min.2.el7.x86_64
erlang-otp_mibs-R16B-03.2min.2.el7.x86_64
erlang-ssl-R16B-03.2min.2.el7.x86_64
erlang-public_key-R16B-03.2min.2.el7.x86_64
erlang-stdlib-R16B-03.2min.2.el7.x86_64
erlang-os_mon-R16B-03.2min.2.el7.x86_64
erlang-xmerl-R16B-03.2min.2.el7.x86_64
erlang-erts-R16B-03.2min.2.el7.x86_64
erlang-sasl-R16B-03.2min.2.el7.x86_64

Apart from the packages that require wx, a few extraneous packages get pulled in (that is, they are not required for rabbitmq to run):

  erlang-syntax_tools
  erlang-compiler
  erlang-hipe
  erlang-runtime_tools
  erlang-tools

This should be fine.  This is a big improvement over the previous requirement of the 'erlang' meta package.  Once wx is optional (looks like F21), this will be a -huge- improvement!

Comment 10 Fedora Update System 2014-06-01 15:37:09 UTC
rabbitmq-server-3.1.5-7.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/rabbitmq-server-3.1.5-7.fc20

Comment 11 Peter Lemenkov 2014-06-01 15:41:24 UTC
Hello All!
That's a first test build of RabbitMQ with dependencies trimmed a bit. Also there is a EL7 build available:

http://koji.fedoraproject.org/koji/taskinfo?taskID=6916081

Please test it. Meanwhile I'm going to roll out another set of changes (and update to the latest version) which will trim dependencies even further.

Comment 12 Fedora Update System 2014-06-02 22:58:41 UTC
Package rabbitmq-server-3.1.5-7.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing rabbitmq-server-3.1.5-7.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-7005/rabbitmq-server-3.1.5-7.fc20
then log in and leave karma (feedback).

Comment 13 lnie 2014-06-04 07:43:26 UTC
rabbitmq-server-3.1.5-7.fc20 works

Comment 14 Fedora Update System 2014-07-30 21:57:57 UTC
rabbitmq-server-3.1.5-7.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.