[oe] [meta-oe][PATCH] mariadb: drop the anonymous function and use proper install layout

Huang, Jie (Jackie) Jackie.Huang at windriver.com
Sun Sep 28 06:19:11 UTC 2014



> -----Original Message-----
> From: openembedded-devel-bounces at lists.openembedded.org [mailto:openembedded-devel-
> bounces at lists.openembedded.org] On Behalf Of jackie.huang at windriver.com
> Sent: Sunday, September 28, 2014 2:10 PM
> To: openembedded-devel at lists.openembedded.org; paul.eggleton at linux.intel.com; Yang, Liezhi
> Subject: [oe] [meta-oe][PATCH] mariadb: drop the anonymous function and use proper install layout
> 
> From: Jackie Huang <jackie.huang at windriver.com>
> 
> The anonymous function redefined bindir to bindir_noprefix (and others), which broke the sstate
> between build dirs.
> 
> The redefined *_noprefix was to used to pass to the INSTALL_* variables to change the layout as we
> want, but in fact we can do this in other ways instead of the pain one:
> 
> 1) Change the default layout and a little adjustment.
> There are 4 install layout: STANDALONE(default), RPM, DEB and SVR4.
> And RPM is the one close to what we are using.
> 
> 2) Don't use prefix and pass full patches to INSTALL_*.

Sorry, one typo here: s/patches/paths/

I will send v2 for this.

Thanks,
Jackie

> The mariadb's cmake define some of the INSTALL_* relative to CMAKE_INSTALL_PREFIX, So we can
> use empty CMAKE_INSTALL_PREFIX, then we can pass our full paths to INSTALL_* directly.
> 
> This patch set the default layout to RPM and pass paths only for:
> - INSTALL_DOCDIR: no prefix prepending, so ${datadir} works.
> - INSTALL_LIBDIR/INSTALL_PLUGINDIR: use ${baselib}.
> 
> The mysql-test is moved from /usr to /usr/share which is more reasonable, fix the FILES inclusion
> accordingly.
> 
> Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
> ---
>  meta-oe/recipes-support/mysql/mariadb_5.5.39.inc | 27 +++++-------------------
>  1 file changed, 5 insertions(+), 22 deletions(-)
> 
> diff --git a/meta-oe/recipes-support/mysql/mariadb_5.5.39.inc b/meta-oe/recipes-
> support/mysql/mariadb_5.5.39.inc
> index 9cc2cc9..4460df9 100644
> --- a/meta-oe/recipes-support/mysql/mariadb_5.5.39.inc
> +++ b/meta-oe/recipes-support/mysql/mariadb_5.5.39.inc
> @@ -35,19 +35,6 @@ SYSTEMD_AUTO_ENABLE_mariadb-server = "disable"
> 
>  EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'"
> 
> -python __anonymous() {
> -    # This is a pain but it's the only way to pass these in since
> -    # MariaDB's cmake scripts insist on prepending the prefix to the
> -    # specified values for INSTALL_*
> -    localdata = d.createCopy()
> -    localdata.setVar('prefix', '')
> -    localdata.setVar('exec_prefix', '')
> -    d.setVar('bindir_noprefix', localdata.getVar('bindir', True).lstrip('/'))
> -    d.setVar('sbindir_noprefix', localdata.getVar('sbindir', True).lstrip('/'))
> -    d.setVar('datadir_noprefix', localdata.getVar('datadir', True).lstrip('/'))
> -    d.setVar('libdir_noprefix', localdata.getVar('libdir', True).lstrip('/'))
> -}
> -
>  PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
>  PACKAGECONFIG_class-native = ""
>  PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam"
> @@ -64,15 +51,11 @@ EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \
>                   -DNROFF=FALSE \
>                   -DENABLE_DTRACE=FALSE \
>                   -DWITH_PIC=ON \
> -                 -DINSTALL_DOCDIR:PATH=${datadir_noprefix}/doc/${BPN} \
> -                 -DINSTALL_BINDIR:PATH=${bindir_noprefix} \
> -                 -DINSTALL_SBINDIR:PATH=${sbindir_noprefix} \
> -                 -DINSTALL_SCRIPTDIR:PATH=${bindir_noprefix} \
> -                 -DINSTALL_LIBDIR:PATH=${libdir_noprefix} \
> -                 -DINSTALL_PLUGINDIR:PATH=${libdir_noprefix}/plugin \
> +                 -DINSTALL_LAYOUT=RPM \
> +                 -DINSTALL_DOCDIR:PATH=${datadir}/doc/${BPN} \
> +                 -DINSTALL_LIBDIR:PATH=${baselib} \
> +                 -DINSTALL_PLUGINDIR:PATH=${baselib}/plugin \
>                   -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \
> -                 -DINSTALL_MYSQLSHAREDIR:PATH=${datadir_noprefix}/mysql \
> -                 -DINSTALL_SUPPORTFILESDIR:PATH=${datadir_noprefix}/mysql-support-files \
>                   -DMYSQL_DATADIR:PATH=/var/mysql \
>                   -DCAT_EXECUTABLE=`which cat` \
>                   -DCMAKE_AR:FILEPATH=${AR}"
> @@ -177,7 +160,7 @@ FILES_libmysqlclient-dev = " \  FILES_libmysqlclient-staticdev = "\
>      ${libdir}/*.a"
>  FILES_libmysqlclient-dbg = "${libdir}/plugin/.debug/ \
> -    /usr/mysql-test/lib/My/SafeProcess/.debug/my_safe_process"
> +    ${datadir}/mysql-test/lib/My/SafeProcess/.debug/my_safe_process"
> 
>  # Avoid warnings about ha_xtradb.so.0.0.0 and ha_innodb_plugin.so.0.0.0  # which are intentionally
> non-PIC on 32-bit x86 (see e.g.
> --
> 2.0.0
> 
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel



More information about the Openembedded-devel mailing list