0007-dont-install-in-mysql-directory.patch 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. Don't install in mysql directory
  2. Installing libraries in a subdirectory of /usr/lib leads to no end of
  3. trouble. It requires either setting a RUN_PATH in the ELF files linked
  4. with it or adding the path to ld.so.conf and calling ldconfig on the
  5. target.
  6. So to simplify things, put everything in /usr/lib instead of
  7. /usr/lib/mysql
  8. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
  9. diff -Nrup mysql-5.1.73.orig/dbug/Makefile.am mysql-5.1.73/dbug/Makefile.am
  10. --- mysql-5.1.73.orig/dbug/Makefile.am 2013-11-04 19:52:27.000000000 +0100
  11. +++ mysql-5.1.73/dbug/Makefile.am 2015-12-14 00:34:58.567937603 +0100
  12. @@ -17,7 +17,7 @@
  13. INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
  14. LDADD = libdbug.a ../mysys/libmysys.a ../strings/libmystrings.a
  15. -pkglib_LIBRARIES = libdbug.a
  16. +lib_LIBRARIES = libdbug.a
  17. noinst_HEADERS = dbug_long.h
  18. libdbug_a_SOURCES = dbug.c sanity.c
  19. EXTRA_DIST = CMakeLists.txt example1.c example2.c example3.c \
  20. diff -Nrup mysql-5.1.73.orig/libmysql/Makefile.shared mysql-5.1.73/libmysql/Makefile.shared
  21. --- mysql-5.1.73.orig/libmysql/Makefile.shared 2013-11-04 19:52:27.000000000 +0100
  22. +++ mysql-5.1.73/libmysql/Makefile.shared 2015-12-14 00:34:58.567937603 +0100
  23. @@ -25,7 +25,7 @@ MYSQLBASEdir= $(prefix)
  24. ## We'll use CLIENT_EXTRA_LDFLAGS for threaded and non-threaded
  25. ## until someone complains that they need separate options.
  26. LDADD = @CLIENT_EXTRA_LDFLAGS@ $(target)
  27. -pkglib_LTLIBRARIES = $(target)
  28. +lib_LTLIBRARIES = $(target)
  29. noinst_PROGRAMS = conf_to_src
  30. diff -Nrup mysql-5.1.73.orig/libmysqld/Makefile.am mysql-5.1.73/libmysqld/Makefile.am
  31. --- mysql-5.1.73.orig/libmysqld/Makefile.am 2013-11-04 19:52:27.000000000 +0100
  32. +++ mysql-5.1.73/libmysqld/Makefile.am 2015-12-14 00:34:58.567937603 +0100
  33. @@ -38,7 +38,7 @@ INCLUDES= -I$(top_builddir)/include -I$
  34. @condition_dependent_plugin_includes@
  35. noinst_LIBRARIES = libmysqld_int.a
  36. -pkglib_LIBRARIES = libmysqld.a
  37. +lib_LIBRARIES = libmysqld.a
  38. SUBDIRS = . examples
  39. libmysqld_sources= libmysqld.c lib_sql.cc emb_qcache.cc
  40. libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
  41. diff -Nrup mysql-5.1.73.orig/mysys/Makefile.am mysql-5.1.73/mysys/Makefile.am
  42. --- mysql-5.1.73.orig/mysys/Makefile.am 2013-11-04 19:52:27.000000000 +0100
  43. +++ mysql-5.1.73/mysys/Makefile.am 2015-12-14 00:34:58.567937603 +0100
  44. @@ -18,7 +18,7 @@ MYSQLSHAREdir = $(pkgdatadir)
  45. MYSQLBASEdir= $(prefix)
  46. INCLUDES = @ZLIB_INCLUDES@ -I$(top_builddir)/include \
  47. -I$(top_srcdir)/include -I$(srcdir)
  48. -pkglib_LIBRARIES = libmysys.a
  49. +lib_LIBRARIES = libmysys.a
  50. LDADD = libmysys.a $(top_builddir)/strings/libmystrings.a $(top_builddir)/dbug/libdbug.a
  51. noinst_HEADERS = mysys_priv.h my_static.h my_handler_errors.h
  52. libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \
  53. diff -Nrup mysql-5.1.73.orig/storage/csv/Makefile.am mysql-5.1.73/storage/csv/Makefile.am
  54. --- mysql-5.1.73.orig/storage/csv/Makefile.am 2013-11-04 19:52:27.000000000 +0100
  55. +++ mysql-5.1.73/storage/csv/Makefile.am 2015-12-14 00:34:58.563937596 +0100
  56. @@ -30,7 +30,7 @@ DEFS = @DEFS@
  57. noinst_HEADERS = ha_tina.h transparent_file.h
  58. EXTRA_LTLIBRARIES = ha_csv.la
  59. -pkglib_LTLIBRARIES = @plugin_csv_shared_target@
  60. +lib_LTLIBRARIES = @plugin_csv_shared_target@
  61. ha_csv_la_LDFLAGS = -module -rpath $(MYSQLLIBdir)
  62. ha_csv_la_CXXFLAGS = $(AM_CXXFLAGS) -DMYSQL_PLUGIN
  63. ha_csv_la_SOURCES = transparent_file.cc ha_tina.cc
  64. diff -Nrup mysql-5.1.73.orig/storage/heap/Makefile.am mysql-5.1.73/storage/heap/Makefile.am
  65. --- mysql-5.1.73.orig/storage/heap/Makefile.am 2013-11-04 19:52:27.000000000 +0100
  66. +++ mysql-5.1.73/storage/heap/Makefile.am 2015-12-14 00:34:58.563937596 +0100
  67. @@ -26,7 +26,7 @@ WRAPLIBS=
  68. LDADD =
  69. DEFS = @DEFS@
  70. -pkglib_LIBRARIES = libheap.a
  71. +lib_LIBRARIES = libheap.a
  72. noinst_PROGRAMS = hp_test1 hp_test2
  73. noinst_LIBRARIES = libheap.a
  74. hp_test1_LDFLAGS = @NOINST_LDFLAGS@
  75. diff -Nrup mysql-5.1.73.orig/storage/myisam/Makefile.am mysql-5.1.73/storage/myisam/Makefile.am
  76. --- mysql-5.1.73.orig/storage/myisam/Makefile.am 2013-11-04 19:52:27.000000000 +0100
  77. +++ mysql-5.1.73/storage/myisam/Makefile.am 2015-12-14 00:34:58.563937596 +0100
  78. @@ -30,7 +30,7 @@ DEFS = @DEFS@
  79. EXTRA_DIST = mi_test_all.sh mi_test_all.res ft_stem.c CMakeLists.txt plug.in
  80. pkgdata_DATA = mi_test_all mi_test_all.res
  81. -pkglib_LIBRARIES = libmyisam.a
  82. +lib_LIBRARIES = libmyisam.a
  83. bin_PROGRAMS = myisamchk myisamlog myisampack myisam_ftdump
  84. myisamchk_DEPENDENCIES= $(LIBRARIES)
  85. myisamchk_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \
  86. diff -Nrup mysql-5.1.73.orig/storage/myisammrg/Makefile.am mysql-5.1.73/storage/myisammrg/Makefile.am
  87. --- mysql-5.1.73.orig/storage/myisammrg/Makefile.am 2013-11-04 19:52:27.000000000 +0100
  88. +++ mysql-5.1.73/storage/myisammrg/Makefile.am 2015-12-14 00:34:58.563937596 +0100
  89. @@ -26,7 +26,7 @@ WRAPLIBS=
  90. LDADD =
  91. DEFS = @DEFS@
  92. -pkglib_LIBRARIES = libmyisammrg.a
  93. +lib_LIBRARIES = libmyisammrg.a
  94. noinst_HEADERS = myrg_def.h ha_myisammrg.h
  95. noinst_LIBRARIES = libmyisammrg.a
  96. libmyisammrg_a_SOURCES = myrg_open.c myrg_extra.c myrg_info.c myrg_locking.c \
  97. diff -Nrup mysql-5.1.73.orig/strings/Makefile.am mysql-5.1.73/strings/Makefile.am
  98. --- mysql-5.1.73.orig/strings/Makefile.am 2013-11-04 19:52:27.000000000 +0100
  99. +++ mysql-5.1.73/strings/Makefile.am 2015-12-14 00:34:58.567937603 +0100
  100. @@ -16,7 +16,7 @@
  101. # This file is public domain and comes with NO WARRANTY of any kind
  102. INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
  103. -pkglib_LIBRARIES = libmystrings.a
  104. +lib_LIBRARIES = libmystrings.a
  105. # Exact one of ASSEMBLER_X
  106. if ASSEMBLER_x86
  107. @@ -69,15 +69,15 @@ conf_to_src_LDFLAGS= @NOINST_LDFLAGS@
  108. FLAGS=$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) @NOINST_LDFLAGS@
  109. -str_test: str_test.c $(pkglib_LIBRARIES)
  110. - $(LINK) $(FLAGS) -DMAIN $(INCLUDES) $(srcdir)/str_test.c $(LDADD) $(pkglib_LIBRARIES)
  111. +str_test: str_test.c $(lib_LIBRARIES)
  112. + $(LINK) $(FLAGS) -DMAIN $(INCLUDES) $(srcdir)/str_test.c $(LDADD) $(lib_LIBRARIES)
  113. uctypedump: uctypedump.c
  114. $(LINK) $(INCLUDES) $(srcdir)/uctypedump.c
  115. -test_decimal$(EXEEXT): decimal.c $(pkglib_LIBRARIES)
  116. +test_decimal$(EXEEXT): decimal.c $(lib_LIBRARIES)
  117. $(CP) $(srcdir)/decimal.c ./test_decimal.c
  118. - $(LINK) $(FLAGS) -DMAIN ./test_decimal.c $(LDADD) $(pkglib_LIBRARIES)
  119. + $(LINK) $(FLAGS) -DMAIN ./test_decimal.c $(LDADD) $(lib_LIBRARIES)
  120. $(RM) -f ./test_decimal.c
  121. # Don't update the files from bitkeeper
  122. diff -Nrup mysql-5.1.73.orig/tests/Makefile.am mysql-5.1.73/tests/Makefile.am
  123. --- mysql-5.1.73.orig/tests/Makefile.am 2013-11-04 19:52:27.000000000 +0100
  124. +++ mysql-5.1.73/tests/Makefile.am 2015-12-14 00:34:58.567937603 +0100
  125. @@ -51,11 +51,11 @@ mysql_client_test.o: mysql_client_fw.c
  126. insert_test_SOURCES= insert_test.c
  127. select_test_SOURCES= select_test.c
  128. -insert_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
  129. -select_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
  130. +insert_test_DEPENDENCIES= $(LIBRARIES) $(lib_LTLIBRARIES)
  131. +select_test_DEPENDENCIES= $(LIBRARIES) $(lib_LTLIBRARIES)
  132. bug25714_SOURCES= bug25714.c
  133. -bug25714_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
  134. +bug25714_DEPENDENCIES= $(LIBRARIES) $(lib_LTLIBRARIES)
  135. # Fix for mit-threads
  136. DEFS = -DMYSQL_CLIENT_NO_THREADS
  137. diff -Nrup mysql-5.1.73.orig/vio/Makefile.am mysql-5.1.73/vio/Makefile.am
  138. --- mysql-5.1.73.orig/vio/Makefile.am 2013-11-04 19:52:27.000000000 +0100
  139. +++ mysql-5.1.73/vio/Makefile.am 2015-12-14 00:34:58.567937603 +0100
  140. @@ -16,7 +16,7 @@
  141. INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
  142. $(openssl_includes)
  143. LDADD = @CLIENT_EXTRA_LDFLAGS@ $(openssl_libs) $(yassl_libs)
  144. -pkglib_LIBRARIES = libvio.a
  145. +lib_LIBRARIES = libvio.a
  146. noinst_HEADERS = vio_priv.h
  147. diff -Nrup mysql-5.1.73.orig/zlib/Makefile.am mysql-5.1.73/zlib/Makefile.am
  148. --- mysql-5.1.73.orig/zlib/Makefile.am 2013-11-04 19:52:27.000000000 +0100
  149. +++ mysql-5.1.73/zlib/Makefile.am 2015-12-14 00:34:58.567937603 +0100
  150. @@ -19,7 +19,7 @@ INCLUDES= -I$(top_builddir)/include -I$
  151. LIBS= $(NON_THREADED_LIBS)
  152. -pkglib_LTLIBRARIES = libz.la
  153. +lib_LTLIBRARIES = libz.la
  154. noinst_LTLIBRARIES = libzlt.la
  155. libz_la_LDFLAGS = -static