https://bugzilla.redhat.com/show_bug.cgi?id=1083637
Bug ID: 1083637 Summary: Trim dependencies in rabbitmq-server Product: Fedora EPEL Version: epel7 Component: rabbitmq-server Assignee: hubert.plociniczak@gmail.com Reporter: lhh@redhat.com QA Contact: extras-qa@fedoraproject.org CC: erlang@lists.fedoraproject.org, hubert.plociniczak@gmail.com, josh@fornwall.com, rjones@redhat.com, skottler@redhat.com
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
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
Lon Hohberger lhh@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeckersb@redhat.com
--- Comment #1 from Lon Hohberger lhh@redhat.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
Lon Hohberger lhh@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|unspecified |low
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
--- Comment #2 from Lon Hohberger lhh@redhat.com --- (Obviously comment #1 is not the subject of this bugzilla :) )
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
Peter Lemenkov lemenkov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED CC| |lemenkov@gmail.com Resolution|--- |DUPLICATE Last Closed| |2014-04-02 12:13:41
--- Comment #3 from Peter Lemenkov lemenkov@gmail.com ---
*** This bug has been marked as a duplicate of bug 784693 ***
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
Lon Hohberger lhh@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |NEW Resolution|DUPLICATE |--- Keywords| |Reopened
--- Comment #4 from Lon Hohberger lhh@redhat.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
--- Comment #5 from Lon Hohberger lhh@redhat.com --- Created attachment 881910 --> https://bugzilla.redhat.com/attachment.cgi?id=881910&action=edit Example
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
--- Comment #6 from Peter Lemenkov lemenkov@gmail.com --- (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.
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
--- Comment #7 from Richard W.M. Jones rjones@redhat.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
--- Comment #8 from Peter Lemenkov lemenkov@gmail.com --- (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.
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
--- Comment #9 from Lon Hohberger lhh@redhat.com --- 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!
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |MODIFIED
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
--- Comment #10 from Fedora Update System updates@fedoraproject.org --- 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
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
--- Comment #11 from Peter Lemenkov lemenkov@gmail.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
Peter Lemenkov lemenkov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1086146
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1086146 [Bug 1086146] Better Erlang Support
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |ON_QA
--- Comment #12 from Fedora Update System updates@fedoraproject.org --- 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... then log in and leave karma (feedback).
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
lnie lnie@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lnie@redhat.com
--- Comment #13 from lnie lnie@redhat.com --- rabbitmq-server-3.1.5-7.fc20 works
https://bugzilla.redhat.com/show_bug.cgi?id=1083637
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ON_QA |CLOSED Fixed In Version| |rabbitmq-server-3.1.5-7.fc2 | |0 Resolution|--- |ERRATA Last Closed|2014-04-02 12:13:41 |2014-07-30 17:57:57
--- Comment #14 from Fedora Update System updates@fedoraproject.org --- 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.
erlang@lists.fedoraproject.org