Bug #12233 missing rpm dependencies
Submitted: 27 Jul 2005 23:30 Modified: 7 Aug 2005 0:15
Reporter: Christopher Seawood Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.11 OS:Linux (SLES9)
Assigned to: Lenz Grimmer

[27 Jul 2005 23:30] Christopher Seawood
We are attempting to install a custom SuSE Linux Enterprise Server 9 (SLES9)  box with the MySQL 4.1.11-0.i386  rpms from mysql.com.  If we install just the Minimal SLES9 configurations with the MySQL rpms, then rpms install fine.  If we add Service Pack 1 (SP1) to the install list, then the post-install script of the MySQL-server install fails.   I see this same behavior with the .sles9 rpms as well.

The problem is that the server rpms use several commands in the post-install scripts (like chkconfig & useradd) but the rpm has no dependencies listed for those commands.  When YaST2 parses the rpms to get the list of dependencies, it does not realize that MySQL-server requires pwdutils (for useradd) to be installed first.   YaST2 installs MySQL-server before pwdutils so the useradd command fails.  This means that the mysql user is never created and the daemon will not start if the user doesn't exist.  It's all downhill from there.

How to repeat:
Create a custom YaST2 product, Custom, that contains the mysql.com rpms. 
Configure the SLES9 xml files to do a 'Minimal' installation configuration.
In the yast/instorder files, order the install as:

Or, uninstall pwdutils (SLES9) or shadow-utils (RH/FC) and then install the mysql rpms.

Suggested fix:
Add explicit dependencies upon the commands used in the post-install scripts.
[28 Jul 2005 12:37] Lenz Grimmer
Thanks for the hint! I will add the necessary requirements to the spec file.
[2 Aug 2005 11:45] Lenz Grimmer
Fixed the spec files by adding the respective "Requires:" for the SLES/RHEL RPMs. Will be fixed for the next releases (4.1.14 and 5.0.11)
[2 Aug 2005 11:56] Lenz Grimmer
The generic RPMs were fixed similarly now:

Requires: coreutils grep procps /usr/sbin/useradd /usr/sbin/groupadd /sbin/chkconfig

(For the SLES/RHEL RPMs, we list the RPMs that include these commands instead of the explicit commands)
[2 Aug 2005 11:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

[7 Aug 2005 0:12] Mike Hillyer
This patch has no three-part version number, no changelog entry can be made. Reverting to Patch Approved.
[7 Aug 2005 0:15] Mike Hillyer
Missed that Lenz did specify version numbers. Documented in 4.1.14 and 5.0.11 changelogs:

 Updated dependency list for RPM builds to include missing dependencies such as <literal>useradd</literal> and <literal>groupadd</literal>. (Bug #12233)