* [meta-oe][PATCH] mysql: make it work after $libexec change - LP: #1068759
@ 2012-11-19 10:27 Marcin Juszkiewicz
2012-11-21 10:38 ` Koen Kooi
0 siblings, 1 reply; 4+ messages in thread
From: Marcin Juszkiewicz @ 2012-11-19 10:27 UTC (permalink / raw)
To: openembedded-devel
Mysql start scripts assumed that mysqld is in /usr/libexec/ directory.
It was true until 406bd38b4232f9f399ef5ffe0b4fac72ed605a23 landed in
OE-Core.
This changeset fixes mysqld start and initial databases population
scripts.
More: https://bugs.launchpad.net/linaro-oe/+bug/1068759
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
.../mysql/mysql5/no-libexec-anymore.patch | 56 ++++++++++++++++++++++
meta-oe/recipes-support/mysql/mysql5_5.1.40.inc | 5 +-
2 files changed, 59 insertions(+), 2 deletions(-)
create mode 100644 meta-oe/recipes-support/mysql/mysql5/no-libexec-anymore.patch
diff --git a/meta-oe/recipes-support/mysql/mysql5/no-libexec-anymore.patch b/meta-oe/recipes-support/mysql/mysql5/no-libexec-anymore.patch
new file mode 100644
index 0000000..6801308
--- /dev/null
+++ b/meta-oe/recipes-support/mysql/mysql5/no-libexec-anymore.patch
@@ -0,0 +1,56 @@
+---
+ scripts/mysql_install_db.sh | 4 ++--
+ scripts/mysqld_safe.sh | 8 ++++----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+--- mysql-5.1.40.orig/scripts/mysql_install_db.sh
++++ mysql-5.1.40/scripts/mysql_install_db.sh
+@@ -256,14 +256,14 @@ then
+ scriptdir="$srcdir/scripts"
+ elif test -n "$basedir"
+ then
+ bindir="$basedir/bin"
+ extra_bindir="$bindir"
+- mysqld=`find_in_basedir mysqld libexec sbin bin`
++ mysqld=`find_in_basedir mysqld lib/mysql5 sbin bin`
+ if test -z "$mysqld"
+ then
+- cannot_find_file mysqld $basedir/libexec $basedir/sbin $basedir/bin
++ cannot_find_file mysqld $basedir/lib/mysql5 $basedir/sbin $basedir/bin
+ exit 1
+ fi
+ langdir=`find_in_basedir --dir errmsg.sys share/english share/mysql/english`
+ if test -z "$langdir"
+ then
+--- mysql-5.1.40.orig/scripts/mysqld_safe.sh
++++ mysql-5.1.40/scripts/mysqld_safe.sh
+@@ -219,25 +219,25 @@ MY_PWD=`pwd`
+ if test -n "$MY_BASEDIR_VERSION" -a -d "$MY_BASEDIR_VERSION"
+ then
+ # BASEDIR is already overridden on command line. Do not re-set.
+
+ # Use BASEDIR to discover le.
+- if test -x "$MY_BASEDIR_VERSION/libexec/mysqld"
++ if test -x "$MY_BASEDIR_VERSION/lib/mysql5/mysqld"
+ then
+- ledir="$MY_BASEDIR_VERSION/libexec"
++ ledir="$MY_BASEDIR_VERSION/lib/mysql5"
+ else
+ ledir="$MY_BASEDIR_VERSION/bin"
+ fi
+ elif test -f "$relpkgdata"/english/errmsg.sys -a -x "$MY_PWD/bin/mysqld"
+ then
+ MY_BASEDIR_VERSION="$MY_PWD" # Where bin, share and data are
+ ledir="$MY_PWD/bin" # Where mysqld is
+ # Check for the directories we would expect from a source install
+-elif test -f "$relpkgdata"/english/errmsg.sys -a -x "$MY_PWD/libexec/mysqld"
++elif test -f "$relpkgdata"/english/errmsg.sys -a -x "$MY_PWD/lib/mysql5/mysqld"
+ then
+ MY_BASEDIR_VERSION="$MY_PWD" # Where libexec, share and var are
+- ledir="$MY_PWD/libexec" # Where mysqld is
++ ledir="$MY_PWD/lib/mysql5" # Where mysqld is
+ # Since we didn't find anything, used the compiled-in defaults
+ else
+ MY_BASEDIR_VERSION='@prefix@'
+ ledir='@libexecdir@'
+ fi
diff --git a/meta-oe/recipes-support/mysql/mysql5_5.1.40.inc b/meta-oe/recipes-support/mysql/mysql5_5.1.40.inc
index 3867a12..703aebc 100644
--- a/meta-oe/recipes-support/mysql/mysql5_5.1.40.inc
+++ b/meta-oe/recipes-support/mysql/mysql5_5.1.40.inc
@@ -5,7 +5,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=477ab0a4c8ca64b482b3f2a365d0fdfa"
DEPENDS = "ncurses"
-PR = "r10"
+PR = "r11"
SRC_URI = "http://downloads.mysql.com/archives/mysql-5.1/mysql-${PV}.tar.gz \
file://configure.in.patch \
@@ -13,8 +13,9 @@ SRC_URI = "http://downloads.mysql.com/archives/mysql-5.1/mysql-${PV}.tar.gz \
file://misc.m4.patch \
file://Makefile.am.patch \
file://fix_host_path.patch \
- file://configure-ps-cache-check.patch \
+ file://configure-ps-cache-check.patch \
file://fix-abi-check-gcc45.patch \
+ file://no-libexec-anymore.patch \
file://my.cnf \
file://mysqld.sh"
--
1.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [meta-oe][PATCH] mysql: make it work after $libexec change - LP: #1068759
2012-11-19 10:27 [meta-oe][PATCH] mysql: make it work after $libexec change - LP: #1068759 Marcin Juszkiewicz
@ 2012-11-21 10:38 ` Koen Kooi
2012-11-22 10:44 ` [PATCH] " Marcin Juszkiewicz
0 siblings, 1 reply; 4+ messages in thread
From: Koen Kooi @ 2012-11-21 10:38 UTC (permalink / raw)
To: openembedded-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Op 19-11-12 11:27, Marcin Juszkiewicz schreef:
> Mysql start scripts assumed that mysqld is in /usr/libexec/ directory. It
> was true until 406bd38b4232f9f399ef5ffe0b4fac72ed605a23 landed in
> OE-Core.
>
> This changeset fixes mysqld start and initial databases population
> scripts.
This replaces one hardcode with another, which breaks DISTROs that keep
/usr/libexec. Can you sed it in do_install_append?
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org
iD8DBQFQrK8lMkyGM64RGpERAv1kAKCrIxpHbF8yzZMIufZjeZkxxAxipwCfUJtA
jb1oTnFXIvpqk/IQVYazAe8=
=tdxb
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] mysql: make it work after $libexec change - LP: #1068759
2012-11-21 10:38 ` Koen Kooi
@ 2012-11-22 10:44 ` Marcin Juszkiewicz
0 siblings, 0 replies; 4+ messages in thread
From: Marcin Juszkiewicz @ 2012-11-22 10:44 UTC (permalink / raw)
To: openembedded-devel
Mysql start scripts assumed that mysqld is in /usr/libexec/ directory.
It was true until 406bd38b4232f9f399ef5ffe0b4fac72ed605a23 landed in
OE-Core.
This changeset fixes mysqld start and initial databases population
scripts.
More: https://bugs.launchpad.net/linaro-oe/+bug/1068759
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
meta-oe/recipes-support/mysql/mysql5_5.1.40.inc | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/meta-oe/recipes-support/mysql/mysql5_5.1.40.inc b/meta-oe/recipes-support/mysql/mysql5_5.1.40.inc
index 3867a12..af0ddbb 100644
--- a/meta-oe/recipes-support/mysql/mysql5_5.1.40.inc
+++ b/meta-oe/recipes-support/mysql/mysql5_5.1.40.inc
@@ -5,7 +5,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=477ab0a4c8ca64b482b3f2a365d0fdfa"
DEPENDS = "ncurses"
-PR = "r10"
+PR = "r11"
SRC_URI = "http://downloads.mysql.com/archives/mysql-5.1/mysql-${PV}.tar.gz \
file://configure.in.patch \
@@ -13,7 +13,7 @@ SRC_URI = "http://downloads.mysql.com/archives/mysql-5.1/mysql-${PV}.tar.gz \
file://misc.m4.patch \
file://Makefile.am.patch \
file://fix_host_path.patch \
- file://configure-ps-cache-check.patch \
+ file://configure-ps-cache-check.patch \
file://fix-abi-check-gcc45.patch \
file://my.cnf \
file://mysqld.sh"
@@ -36,6 +36,12 @@ EXTRA_OECONF = " --with-atomic-ops=up --with-embedded-server --prefix=/usr --sys
do_configure_append() {
sed -i /comp_err/d ${S}/sql/share/Makefile
+
+ # handle distros with different values of ${libexecdir}
+ libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'`
+ sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysql_install_db.sh
+ sed -i -e "s:mysqld libexec:mysqld $libexecdir2:g" ${S}/scripts/mysql_install_db.sh
+ sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysqld_safe.sh
}
SYSROOT_PREPROCESS_FUNCS += "mysql5_sysroot_preprocess"
--
1.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [meta-oe][PATCH] mysql: make it work after $libexec change - LP: #1068759
[not found] <^[[B^[[B^[[Bk8iauv$8f3$1@ger.gmane.org>
@ 2012-11-22 10:45 ` Marcin Juszkiewicz
0 siblings, 0 replies; 4+ messages in thread
From: Marcin Juszkiewicz @ 2012-11-22 10:45 UTC (permalink / raw)
To: openembedded-devel
Mysql start scripts assumed that mysqld is in /usr/libexec/ directory.
It was true until 406bd38b4232f9f399ef5ffe0b4fac72ed605a23 landed in
OE-Core.
This changeset fixes mysqld start and initial databases population
scripts.
More: https://bugs.launchpad.net/linaro-oe/+bug/1068759
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
meta-oe/recipes-support/mysql/mysql5_5.1.40.inc | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/meta-oe/recipes-support/mysql/mysql5_5.1.40.inc b/meta-oe/recipes-support/mysql/mysql5_5.1.40.inc
index 3867a12..af0ddbb 100644
--- a/meta-oe/recipes-support/mysql/mysql5_5.1.40.inc
+++ b/meta-oe/recipes-support/mysql/mysql5_5.1.40.inc
@@ -5,7 +5,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=477ab0a4c8ca64b482b3f2a365d0fdfa"
DEPENDS = "ncurses"
-PR = "r10"
+PR = "r11"
SRC_URI = "http://downloads.mysql.com/archives/mysql-5.1/mysql-${PV}.tar.gz \
file://configure.in.patch \
@@ -13,7 +13,7 @@ SRC_URI = "http://downloads.mysql.com/archives/mysql-5.1/mysql-${PV}.tar.gz \
file://misc.m4.patch \
file://Makefile.am.patch \
file://fix_host_path.patch \
- file://configure-ps-cache-check.patch \
+ file://configure-ps-cache-check.patch \
file://fix-abi-check-gcc45.patch \
file://my.cnf \
file://mysqld.sh"
@@ -36,6 +36,12 @@ EXTRA_OECONF = " --with-atomic-ops=up --with-embedded-server --prefix=/usr --sys
do_configure_append() {
sed -i /comp_err/d ${S}/sql/share/Makefile
+
+ # handle distros with different values of ${libexecdir}
+ libexecdir2=`echo ${libexecdir} | sed -e 's+/usr/++g'`
+ sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysql_install_db.sh
+ sed -i -e "s:mysqld libexec:mysqld $libexecdir2:g" ${S}/scripts/mysql_install_db.sh
+ sed -i -e "s:/libexec:/$libexecdir2:g" ${S}/scripts/mysqld_safe.sh
}
SYSROOT_PREPROCESS_FUNCS += "mysql5_sysroot_preprocess"
--
1.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-22 11:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-19 10:27 [meta-oe][PATCH] mysql: make it work after $libexec change - LP: #1068759 Marcin Juszkiewicz
2012-11-21 10:38 ` Koen Kooi
2012-11-22 10:44 ` [PATCH] " Marcin Juszkiewicz
[not found] <^[[B^[[B^[[Bk8iauv$8f3$1@ger.gmane.org>
2012-11-22 10:45 ` [meta-oe][PATCH] " Marcin Juszkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox