From patchwork Sun Dec 13 23:57:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 556255 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 565A0140323 for ; Mon, 14 Dec 2015 10:57:33 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 90D22321BE; Sun, 13 Dec 2015 23:57:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A6olqMiQJuiP; Sun, 13 Dec 2015 23:57:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 1173232242; Sun, 13 Dec 2015 23:57:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 8FE951BF9A7 for ; Sun, 13 Dec 2015 23:57:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8BF008C55F for ; Sun, 13 Dec 2015 23:57:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0h3qNlidyizE for ; Sun, 13 Dec 2015 23:57:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exchange.essensium.com (220.77.144.195.ipv4.evonet.be [195.144.77.220]) by whitealder.osuosl.org (Postfix) with ESMTPS id 3A2568C54E for ; Sun, 13 Dec 2015 23:57:25 +0000 (UTC) Received: from localhost.localdomain (10.3.7.11) by beleexch01.local.ess-mail.com (10.3.7.8) with Microsoft SMTP Server (TLS) id 15.0.847.32; Mon, 14 Dec 2015 00:57:11 +0100 From: "Arnout Vandecappelle (Essensium/Mind)" To: Date: Mon, 14 Dec 2015 00:57:07 +0100 Message-ID: <1450051027-23633-1-git-send-email-arnout@mind.be> X-Mailer: git-send-email 2.6.4 MIME-Version: 1.0 X-Originating-IP: [10.3.7.11] X-ClientProxiedBy: beleexch01.local.ess-mail.com (10.3.7.8) To beleexch01.local.ess-mail.com (10.3.7.8) Subject: [Buildroot] [PATCH] Don't install in mysql directory X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Installing libraries in a subdirectory of /usr/lib leads to no end of trouble. It requires either setting a RUN_PATH in the ELF files linked with it or adding the path to ld.so.conf and calling ldconfig on the target. So to simplify things, put everything in /usr/lib instead of /usr/lib/mysql Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- .../0007-dont-install-in-mysql-directory.patch | 182 +++++++++++++++++++++ 1 file changed, 182 insertions(+) create mode 100644 package/mysql/0007-dont-install-in-mysql-directory.patch diff --git a/package/mysql/0007-dont-install-in-mysql-directory.patch b/package/mysql/0007-dont-install-in-mysql-directory.patch new file mode 100644 index 0000000..971b9ce --- /dev/null +++ b/package/mysql/0007-dont-install-in-mysql-directory.patch @@ -0,0 +1,182 @@ +Don't install in mysql directory + +Installing libraries in a subdirectory of /usr/lib leads to no end of +trouble. It requires either setting a RUN_PATH in the ELF files linked +with it or adding the path to ld.so.conf and calling ldconfig on the +target. + +So to simplify things, put everything in /usr/lib instead of +/usr/lib/mysql + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) + +diff -Nrup mysql-5.1.73.orig/dbug/Makefile.am mysql-5.1.73/dbug/Makefile.am +--- mysql-5.1.73.orig/dbug/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/dbug/Makefile.am 2015-12-14 00:34:58.567937603 +0100 +@@ -17,7 +17,7 @@ + + INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include + LDADD = libdbug.a ../mysys/libmysys.a ../strings/libmystrings.a +-pkglib_LIBRARIES = libdbug.a ++lib_LIBRARIES = libdbug.a + noinst_HEADERS = dbug_long.h + libdbug_a_SOURCES = dbug.c sanity.c + EXTRA_DIST = CMakeLists.txt example1.c example2.c example3.c \ +diff -Nrup mysql-5.1.73.orig/libmysql/Makefile.shared mysql-5.1.73/libmysql/Makefile.shared +--- mysql-5.1.73.orig/libmysql/Makefile.shared 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/libmysql/Makefile.shared 2015-12-14 00:34:58.567937603 +0100 +@@ -25,7 +25,7 @@ MYSQLBASEdir= $(prefix) + ## We'll use CLIENT_EXTRA_LDFLAGS for threaded and non-threaded + ## until someone complains that they need separate options. + LDADD = @CLIENT_EXTRA_LDFLAGS@ $(target) +-pkglib_LTLIBRARIES = $(target) ++lib_LTLIBRARIES = $(target) + + noinst_PROGRAMS = conf_to_src + +diff -Nrup mysql-5.1.73.orig/libmysqld/Makefile.am mysql-5.1.73/libmysqld/Makefile.am +--- mysql-5.1.73.orig/libmysqld/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/libmysqld/Makefile.am 2015-12-14 00:34:58.567937603 +0100 +@@ -38,7 +38,7 @@ INCLUDES= -I$(top_builddir)/include -I$ + @condition_dependent_plugin_includes@ + + noinst_LIBRARIES = libmysqld_int.a +-pkglib_LIBRARIES = libmysqld.a ++lib_LIBRARIES = libmysqld.a + SUBDIRS = . examples + libmysqld_sources= libmysqld.c lib_sql.cc emb_qcache.cc + libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \ +diff -Nrup mysql-5.1.73.orig/mysys/Makefile.am mysql-5.1.73/mysys/Makefile.am +--- mysql-5.1.73.orig/mysys/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/mysys/Makefile.am 2015-12-14 00:34:58.567937603 +0100 +@@ -18,7 +18,7 @@ MYSQLSHAREdir = $(pkgdatadir) + MYSQLBASEdir= $(prefix) + INCLUDES = @ZLIB_INCLUDES@ -I$(top_builddir)/include \ + -I$(top_srcdir)/include -I$(srcdir) +-pkglib_LIBRARIES = libmysys.a ++lib_LIBRARIES = libmysys.a + LDADD = libmysys.a $(top_builddir)/strings/libmystrings.a $(top_builddir)/dbug/libdbug.a + noinst_HEADERS = mysys_priv.h my_static.h my_handler_errors.h + libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \ +diff -Nrup mysql-5.1.73.orig/storage/csv/Makefile.am mysql-5.1.73/storage/csv/Makefile.am +--- mysql-5.1.73.orig/storage/csv/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/storage/csv/Makefile.am 2015-12-14 00:34:58.563937596 +0100 +@@ -30,7 +30,7 @@ DEFS = @DEFS@ + noinst_HEADERS = ha_tina.h transparent_file.h + + EXTRA_LTLIBRARIES = ha_csv.la +-pkglib_LTLIBRARIES = @plugin_csv_shared_target@ ++lib_LTLIBRARIES = @plugin_csv_shared_target@ + ha_csv_la_LDFLAGS = -module -rpath $(MYSQLLIBdir) + ha_csv_la_CXXFLAGS = $(AM_CXXFLAGS) -DMYSQL_PLUGIN + ha_csv_la_SOURCES = transparent_file.cc ha_tina.cc +diff -Nrup mysql-5.1.73.orig/storage/heap/Makefile.am mysql-5.1.73/storage/heap/Makefile.am +--- mysql-5.1.73.orig/storage/heap/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/storage/heap/Makefile.am 2015-12-14 00:34:58.563937596 +0100 +@@ -26,7 +26,7 @@ WRAPLIBS= + LDADD = + + DEFS = @DEFS@ +-pkglib_LIBRARIES = libheap.a ++lib_LIBRARIES = libheap.a + noinst_PROGRAMS = hp_test1 hp_test2 + noinst_LIBRARIES = libheap.a + hp_test1_LDFLAGS = @NOINST_LDFLAGS@ +diff -Nrup mysql-5.1.73.orig/storage/myisam/Makefile.am mysql-5.1.73/storage/myisam/Makefile.am +--- mysql-5.1.73.orig/storage/myisam/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/storage/myisam/Makefile.am 2015-12-14 00:34:58.563937596 +0100 +@@ -30,7 +30,7 @@ DEFS = @DEFS@ + EXTRA_DIST = mi_test_all.sh mi_test_all.res ft_stem.c CMakeLists.txt plug.in + pkgdata_DATA = mi_test_all mi_test_all.res + +-pkglib_LIBRARIES = libmyisam.a ++lib_LIBRARIES = libmyisam.a + bin_PROGRAMS = myisamchk myisamlog myisampack myisam_ftdump + myisamchk_DEPENDENCIES= $(LIBRARIES) + myisamchk_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \ +diff -Nrup mysql-5.1.73.orig/storage/myisammrg/Makefile.am mysql-5.1.73/storage/myisammrg/Makefile.am +--- mysql-5.1.73.orig/storage/myisammrg/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/storage/myisammrg/Makefile.am 2015-12-14 00:34:58.563937596 +0100 +@@ -26,7 +26,7 @@ WRAPLIBS= + LDADD = + + DEFS = @DEFS@ +-pkglib_LIBRARIES = libmyisammrg.a ++lib_LIBRARIES = libmyisammrg.a + noinst_HEADERS = myrg_def.h ha_myisammrg.h + noinst_LIBRARIES = libmyisammrg.a + libmyisammrg_a_SOURCES = myrg_open.c myrg_extra.c myrg_info.c myrg_locking.c \ +diff -Nrup mysql-5.1.73.orig/strings/Makefile.am mysql-5.1.73/strings/Makefile.am +--- mysql-5.1.73.orig/strings/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/strings/Makefile.am 2015-12-14 00:34:58.567937603 +0100 +@@ -16,7 +16,7 @@ + # This file is public domain and comes with NO WARRANTY of any kind + + INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include +-pkglib_LIBRARIES = libmystrings.a ++lib_LIBRARIES = libmystrings.a + + # Exact one of ASSEMBLER_X + if ASSEMBLER_x86 +@@ -69,15 +69,15 @@ conf_to_src_LDFLAGS= @NOINST_LDFLAGS@ + + FLAGS=$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) @NOINST_LDFLAGS@ + +-str_test: str_test.c $(pkglib_LIBRARIES) +- $(LINK) $(FLAGS) -DMAIN $(INCLUDES) $(srcdir)/str_test.c $(LDADD) $(pkglib_LIBRARIES) ++str_test: str_test.c $(lib_LIBRARIES) ++ $(LINK) $(FLAGS) -DMAIN $(INCLUDES) $(srcdir)/str_test.c $(LDADD) $(lib_LIBRARIES) + + uctypedump: uctypedump.c + $(LINK) $(INCLUDES) $(srcdir)/uctypedump.c + +-test_decimal$(EXEEXT): decimal.c $(pkglib_LIBRARIES) ++test_decimal$(EXEEXT): decimal.c $(lib_LIBRARIES) + $(CP) $(srcdir)/decimal.c ./test_decimal.c +- $(LINK) $(FLAGS) -DMAIN ./test_decimal.c $(LDADD) $(pkglib_LIBRARIES) ++ $(LINK) $(FLAGS) -DMAIN ./test_decimal.c $(LDADD) $(lib_LIBRARIES) + $(RM) -f ./test_decimal.c + + # Don't update the files from bitkeeper +diff -Nrup mysql-5.1.73.orig/tests/Makefile.am mysql-5.1.73/tests/Makefile.am +--- mysql-5.1.73.orig/tests/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/tests/Makefile.am 2015-12-14 00:34:58.567937603 +0100 +@@ -51,11 +51,11 @@ mysql_client_test.o: mysql_client_fw.c + + insert_test_SOURCES= insert_test.c + select_test_SOURCES= select_test.c +-insert_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) +-select_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) ++insert_test_DEPENDENCIES= $(LIBRARIES) $(lib_LTLIBRARIES) ++select_test_DEPENDENCIES= $(LIBRARIES) $(lib_LTLIBRARIES) + + bug25714_SOURCES= bug25714.c +-bug25714_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) ++bug25714_DEPENDENCIES= $(LIBRARIES) $(lib_LTLIBRARIES) + + # Fix for mit-threads + DEFS = -DMYSQL_CLIENT_NO_THREADS +diff -Nrup mysql-5.1.73.orig/vio/Makefile.am mysql-5.1.73/vio/Makefile.am +--- mysql-5.1.73.orig/vio/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/vio/Makefile.am 2015-12-14 00:34:58.567937603 +0100 +@@ -16,7 +16,7 @@ + INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \ + $(openssl_includes) + LDADD = @CLIENT_EXTRA_LDFLAGS@ $(openssl_libs) $(yassl_libs) +-pkglib_LIBRARIES = libvio.a ++lib_LIBRARIES = libvio.a + + noinst_HEADERS = vio_priv.h + +diff -Nrup mysql-5.1.73.orig/zlib/Makefile.am mysql-5.1.73/zlib/Makefile.am +--- mysql-5.1.73.orig/zlib/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/zlib/Makefile.am 2015-12-14 00:34:58.567937603 +0100 +@@ -19,7 +19,7 @@ INCLUDES= -I$(top_builddir)/include -I$ + + LIBS= $(NON_THREADED_LIBS) + +-pkglib_LTLIBRARIES = libz.la ++lib_LTLIBRARIES = libz.la + noinst_LTLIBRARIES = libzlt.la + + libz_la_LDFLAGS = -static