Bug #37697 make_binary_distribution places files in wrong path
Submitted: 27 Jun 2008 15:24 Modified: 13 Oct 2016 10:59
Reporter: Joe Grasse Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.1.25, 5.1, 6.0 BZR OS:Linux
Assigned to: Assigned Account CPU Architecture:Any
Tags: regression

[27 Jun 2008 15:24] Joe Grasse
Description:
The make_binary_distribution states that

Note that the structure created by this script is slightly different from
what a normal "make install" would produce. No extra "mysql" sub directory
will be created, i.e. no "$prefix/include/mysql", "$prefix/lib/mysql" or
"$prefix/share/mysql".  This is because the build system explicitly calls
make with pkgdatadir=<datadir>, etc.

However when you untar the tar file, the sub directories as lib/mysql, include/mysql, and share/mysql

How to repeat:
Create a binary distribution with make_binary_distribution and untar it.

Suggested fix:
Change the file paths of the make install pkglibdir, pkgincludedir, pkgdatadir, and pkgsuppdir to not include the sub directory mysql.
[28 Jun 2008 13:30] Sveta Smirnova
Thank you for the report.

Verified as described.
[5 Oct 2009 9:40] 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:

  http://lists.mysql.com/commits/85720

3147 Jonathan Perkin	2009-10-05
      bug#37697: make_binary_distribution places files in wrong path
      
      Clarify comments and explain that the alterations to package layout
      by overriding pkg* variables only occurs in official MySQL releases.
      
      Add a new --release argument which will be used by our releases to
      rebuild the two scripts according to our layout, and leave normal
      builds with the hardcoded paths.
      
      Users wishing to use this script in an attempt to create relocatable
      packages will need to either rewrite the scripts themselves using
      the paths they have configured, or use the defaults and override
      --basedir and --datadir when running mysql_install_db, for example
      
        $ make bin-dist
        [ unpack .tar.gz and cd into package directory ]
        $ ./scripts/mysql_install_db --basedir=. --datadir=./data
        $ ./bin/mysqld_safe &
        $ env LD_LIBRARY_PATH=./lib/mysql ./bin/mysql
      
      We hope to provide fully relocatable packages in a future release.
[27 Aug 2014 21:03] MySQL Verification Team
patch pending!
[13 Oct 2016 10:59] Daniel Fischer
This bug is obsolete since the script was replaced with a call to cpack.