Bug 498955 - Unnecessary dependencies installed on RHEL5
Unnecessary dependencies installed on RHEL5
Status: CLOSED NOTABUG
Product: Fedora EPEL
Classification: Fedora
Component: ejabberd (Show other bugs)
el5
All Linux
low Severity low
: ---
: ---
Assigned To: Peter Lemenkov
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-04 11:24 EDT by Andrew Colin Kissa
Modified: 2009-05-04 14:23 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-04 14:23:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrew Colin Kissa 2009-05-04 11:24:13 EDT
Description of problem:
The "Requires(pre): fedora-usermgmt" dependency is not necessary in EPEL packages as it causes the following unnecessary dependencies (fedora-usermgmt-default-fedora-setup,fedora-usermgmt,fedora-usermgmt-shadow-utils,fedora-usermgmt-core) to be installed and yet they are only used in the %pre part and are not essential for the package to function after installation.

Using /usr/sbin/useradd and /usr/sbin/groupadd for the EPEL spec allows these dependencies to be removed.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. yum install ejabberd
  
Actual results:
====================================================================================================================================================
 Package                                                Arch                     Version                               Repository              Size
====================================================================================================================================================
Installing:
 ejabberd                                               i386                     2.0.3-1.el5                           epel                   758 k
Installing for dependencies:
 erlang                                                 i386                     R12B-3.3.el5                          epel                    38 M
 fedora-usermgmt                                        noarch                   0.8.91-1.el5                          epel                   6.6 k
 fedora-usermgmt-core                                   noarch                   0.8.91-1.el5                          epel                   7.6 k
 fedora-usermgmt-default-fedora-setup                   noarch                   0.8.91-1.el5                          epel                   6.6 k
 fedora-usermgmt-shadow-utils                           noarch                   0.8.91-1.el5                          epel                   7.4 k
 tk                                                     i386                     8.4.13-5.el5_1.1                      base                   888 k
 unixODBC                                               i386                     2.2.11-7.1                            base                   832 k

Transaction Summary


Expected results:
====================================================================================================================================================
 Package                                                Arch                     Version                               Repository              Size
====================================================================================================================================================
Installing:
 ejabberd                                               i386                     2.0.3-1.el5                           epel                   758 k
Installing for dependencies:
 erlang                                                 i386                     R12B-3.3.el5                          epel                    38 M
 tk                                                     i386                     8.4.13-5.el5_1.1                      base                   888 k
 unixODBC                                               i386                     2.2.11-7.1                            base                   832 k

Transaction Summary


Additional info:
Comment 1 Rex Dieter 2009-05-04 11:32:40 EDT
As I understand it, I doubt this is fixable to your satisfaction, as rpm doesn't really distiguish between deps required for scriptlets vs runtime.  It only affects install ordering.
Comment 2 Andrew Colin Kissa 2009-05-04 11:42:20 EDT
Actually it is fixable, please look at my attached patch to the spec file to achieve it.

49c49,50
< Requires(pre): fedora-usermgmt
---
> Requires(pre): /usr/sbin/useradd
> Requires(pre): /usr/sbin/groupadd
73,74c74,75
< /usr/sbin/fedora-groupadd 27 -r ejabberd &>/dev/null || :
< /usr/sbin/fedora-useradd  27 -r -s /sbin/nologin -d /var/lib/ejabberd -M \
---
> /usr/sbin/groupadd 27 -r ejabberd &>/dev/null || :
> /usr/sbin/useradd  27 -r -s /sbin/nologin -d /var/lib/ejabberd -M \
[andrew@bison ~]$ diff -ruN redhat/SPECS/ejabberd.spec ejabberd.spec
--- redhat/SPECS/ejabberd.spec  2009-01-26 18:53:25.000000000 +0200
+++ ejabberd.spec       2009-05-04 17:35:41.000000000 +0200
@@ -46,7 +46,8 @@
 Requires:       erlang
 Requires:       usermode

-Requires(pre): fedora-usermgmt
+Requires(pre): /usr/sbin/useradd
+Requires(pre): /usr/sbin/groupadd
 Requires(post): /sbin/chkconfig
 Requires(post): /usr/bin/openssl
 Requires(preun): /sbin/chkconfig
@@ -70,8 +71,8 @@
 Documentation for ejabberd.

 %pre
-/usr/sbin/fedora-groupadd 27 -r ejabberd &>/dev/null || :
-/usr/sbin/fedora-useradd  27 -r -s /sbin/nologin -d /var/lib/ejabberd -M \
+/usr/sbin/groupadd 27 -r ejabberd &>/dev/null || :
+/usr/sbin/useradd  27 -r -s /sbin/nologin -d /var/lib/ejabberd -M \
                              -c 'ejabberd' -g ejabberd ejabberd &>/dev/null || :

 %post
Comment 3 Rex Dieter 2009-05-04 11:49:27 EDT
Oh sure, by simply making the pkg not use it, but that's up to the maintainer whether they're willing to do without the extra functionality that fedora-usermgmt provides.

I was going on the assumption that the maintainer made a conscious choice to use fedora-usermgmt.
Comment 4 Rex Dieter 2009-05-04 11:49:52 EDT
re-opening, maintainer's call to make.
Comment 5 Andrew Colin Kissa 2009-05-04 11:56:42 EDT
My point is fedora-usermgmt is only being pulled in to perform 2 functions add a group and a user for ejabberd to run as. As a EPEL user i do not see the pointing having 4 packages on the system that are of no use.
Comment 6 Peter Lemenkov 2009-05-04 12:02:13 EDT
I'll fix it ASAP.
Comment 7 Peter Lemenkov 2009-05-04 14:23:07 EDT
Ok, we discussed this issue. Unfortunately, we decided not to replace fedora-usermgmt utilities with their useradd/groupadd alternatives. 

The rationale behind this decision is that fedora-usermgmt doesn't add large dependency chains (several kilobytes), although it provides some functionality over plain useradd/groupadd (predictable uid/gid):

http://fedoraproject.org/wiki/PackageUserCreation


As a workaround, I advise you to type

$ sudo yum remove fedora-usermgmt*

after installation of ejabberd - they required only for installation.

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