Bug #41998 Solaris 10 postinstall script fails to copy from wrong dir
Submitted: 9 Jan 2009 13:32 Modified: 21 Aug 2009 12:07
Reporter: Jonas Sundin Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Packaging Severity:S2 (Serious)
Version:6.3.20,7.0.6 OS:Solaris (Solaris 10 10/08 s10x_u6wos_07a X86)
Assigned to: Jonathan Perkin CPU Architecture:Any
Tags: Contribution

[9 Jan 2009 13:32] Jonas Sundin
Trying to install mysql-cluster-gpl-6.3.20-solaris10-x86_64.pkg in a global zone on Solaris fails with:

[ verifying class <none> ]
## Executing postinstall script.
/var/sadm/pkg/mysql-cluster/install/postinstall: /opt/mysql/mysql: does not exist
cp: cannot access /opt/mysql/mysql/support-files/mysql.server.in
pkgadd: ERROR: postinstall script did not complete successfully

Installation of <mysql-cluster> failed.

mysql.server.in can be found in /opt/mysql/mysql-cluster/support-files/ and not /opt/mysql/mysql/support-files/

How to repeat:
bash-3.00# pkgadd -G -d mysql-cluster-gpl-6.3.20-solaris10-x86_64.pkg

Suggested fix:
Update directory information.
[3 May 2009 11:25] Joachim Worringen
This bug is very annoying because it breaks every install, it is trivial to fix, and should show up with every release test of the pkg.

I wonder why it then persists with MySQL cluster 6.4 and 7.0.5 packages (the latest I just tested)!?
[3 May 2009 11:28] Joachim Worringen
Just in case: here is the fix.

--- postinstall.orig    Sun May  3 14:24:29 2009
+++ postinstall Sun May  3 14:24:42 2009
@@ -20,7 +20,7 @@
 # is not the same thing. The default pkgadd base directory is /opt/mysql,
 # the MySQL one "/opt/mysql/mysql".

[15 Jun 2009 15:13] Lars Heill
Affects all versions of mysql-cluster SVR4 packages.
[13 Jul 2009 9:18] Joerg Bruehe
Applied a fix coded by Jonathan to the ongoing cluster-6.3.25 build.
[13 Jul 2009 14:13] Jørgen Austvik
I have verified this fix in these packages:

On OpenSolaris:
SunOS khepri02 5.11 snv_117 i86pc i386 i86pc

This is the relevant output of the package install:

/usr/sbin/mysqld_safe <symbolic link>
/usr/sbin/mysqlmanager <symbolic link>
/usr/sbin/ndb_mgmd <symbolic link>
/usr/sbin/ndbd <symbolic link>
/usr/sbin/safe_mysqld <symbolic link>
[ verifying class <none> ]
## Executing postinstall script.
090713 16:09:43 [Warning] Forcing shutdown of 3 plugins
090713 16:09:43 [Warning] Forcing shutdown of 3 plugins

To do so, start the server, then issue the following commands:

/opt/mysql/mysql/bin/mysqladmin -u root password 'new-password'
/opt/mysql/mysql/bin/mysqladmin -u root -h khepri02 password 'new-password'

Alternatively you can run:

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.
[18 Aug 2009 10:58] Jonathan Perkin
Patch verified to work, set for documenting.
[20 Aug 2009 12:33] Jon Stephens
Set category to Cluster so this will appear in my queue rather than MC's.
[21 Aug 2009 5:03] Jon Stephens
Please indicate version(s) in which the fix appears. (I'm guessing NDB-6.3.26 and NDB-7.0.7, but I'm not really supposed to guess.)

Also, does the bug/fix appear in the telco-6.2 tree? If the bug is present in 6.2, I recommend that the fix be applied there also.

[21 Aug 2009 6:51] Jonathan Perkin
Hi Jon,

This was a fix to internals, so will be applied to any subsequent Cluster release.  Joerg ensured it was available for 6.3.25, so it appears there, will appear in 7.0.7, and will be in any future 6.2 build.
[21 Aug 2009 8:54] Jon Stephens
Thanks for the info!
[21 Aug 2009 12:07] Jon Stephens
Documented bugfix in the NDB-6.2.19, 6.3.25, and 7.0.7 changelogs, as follows:

      The pkg installer for MySQL Cluster on Solaris did not perform a 
      complete installation due to an invalid directory reference in the 
      post-install script.
[21 Aug 2009 12:12] Jon Stephens
Set category back to Packaging per my previous comment.

(Changelog entry is tagged for both Cluster and Packaging highlighting.)