From a15935b9466c1fd46e918a686b9ea0b34f9f60a9 Mon Sep 17 00:00:00 2001 From: Timofey Turenko Date: Wed, 2 Jul 2014 15:39:18 +0300 Subject: [PATCH 1/6] set maxscale install path /usr/local/skysql/maxscale --- debian/install | 2 +- maxscale.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/install b/debian/install index a9af76865..b4c4d7d2d 100644 --- a/debian/install +++ b/debian/install @@ -1,3 +1,3 @@ maxscale.conf etc/ld.so.conf.d/ etc/init.d/maxscale etc/init.d/ -binaries/* usr/local/sbin/ +binaries/* /usr/local/skysql/maxscale/ diff --git a/maxscale.spec b/maxscale.spec index 077c48e55..5d04cc8e1 100644 --- a/maxscale.spec +++ b/maxscale.spec @@ -2,7 +2,7 @@ %define name maxscale %define release 1 %define version 0.7 -%define install_path /usr/local/sbin/ +%define install_path /usr/local/skysql/maxscale/ BuildRoot: %{buildroot} Summary: maxscale From f379ee3d7ae8d1ed8321e0dda04d9c5e64cb9a99 Mon Sep 17 00:00:00 2001 From: Timofey Turenko Date: Wed, 2 Jul 2014 15:52:16 +0300 Subject: [PATCH 2/6] add -static for lmysqld --- makefile.inc | 4 ++-- server/core/Makefile | 2 +- server/modules/monitor/Makefile | 2 +- server/modules/routing/readwritesplit/Makefile | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/makefile.inc b/makefile.inc index 657ebf849..976b7de25 100644 --- a/makefile.inc +++ b/makefile.inc @@ -26,7 +26,7 @@ endif CFLAGS := $(CFLAGS) -Wall LDLIBS := $(LDLIBS) -pthread -LDMYSQL := -lmysqld +LDMYSQL := -static -lmysqld CPP_LDLIBS := -lstdc++ # @@ -40,4 +40,4 @@ endif ifdef PROF CFLAGS := $(CFLAGS) -DSS_PROF -endif \ No newline at end of file +endif diff --git a/server/core/Makefile b/server/core/Makefile index 6f08a4729..2bd095dea 100644 --- a/server/core/Makefile +++ b/server/core/Makefile @@ -75,7 +75,7 @@ POBJS=maxpasswd.o secrets.o utils.o LIBS=-L../inih/extra -linih -lssl -lstdc++ \ -L$(EMBEDDED_LIB) \ -lz -lm -lcrypt -lcrypto -ldl -laio -lrt -pthread -llog_manager \ - -lmysqld + -static -lmysqld all: maxscale maxkeys maxpasswd diff --git a/server/modules/monitor/Makefile b/server/modules/monitor/Makefile index 7fdbc5843..7bdf6d9c8 100644 --- a/server/modules/monitor/Makefile +++ b/server/modules/monitor/Makefile @@ -39,7 +39,7 @@ GALERAOBJ=$(GALERASRCS:.c=.o) SRCS=$(MYSQLSRCS) OBJ=$(SRCS:.c=.o) LIBS=$(UTILSPATH)/skygw_utils.o -llog_manager \ - -L$(EMBEDDED_LIB) -lmysqld + -L$(EMBEDDED_LIB) -static -lmysqld MODULES=libmysqlmon.so libgaleramon.so diff --git a/server/modules/routing/readwritesplit/Makefile b/server/modules/routing/readwritesplit/Makefile index c60f2ffd1..be489f740 100644 --- a/server/modules/routing/readwritesplit/Makefile +++ b/server/modules/routing/readwritesplit/Makefile @@ -38,7 +38,7 @@ LDFLAGS=-shared -L$(LOGPATH) -L$(QCLASSPATH) -L$(EMBEDDED_LIB) \ SRCS=readwritesplit.c OBJ=$(SRCS:.c=.o) -LIBS=-lssl -pthread -llog_manager -lquery_classifier -lmysqld +LIBS=-lssl -pthread -llog_manager -lquery_classifier -static -lmysqld MODULES=libreadwritesplit.so all: $(MODULES) From 511bb84130947c6643d5eb981a65cdd2330d0664 Mon Sep 17 00:00:00 2001 From: Timofey Turenko Date: Wed, 2 Jul 2014 16:02:21 +0300 Subject: [PATCH 3/6] lstc should be dynamic --- makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile.inc b/makefile.inc index 976b7de25..8f19725b4 100644 --- a/makefile.inc +++ b/makefile.inc @@ -27,7 +27,7 @@ endif CFLAGS := $(CFLAGS) -Wall LDLIBS := $(LDLIBS) -pthread LDMYSQL := -static -lmysqld -CPP_LDLIBS := -lstdc++ +CPP_LDLIBS := -shared -lstdc++ # # Compiler flags, httpd arguments and debugger options From eb3a8eaab3d230fbc963a6748bcecdb48fca3579 Mon Sep 17 00:00:00 2001 From: Timofey Turenko Date: Wed, 2 Jul 2014 16:25:55 +0300 Subject: [PATCH 4/6] L:.a --- makefile.inc | 4 ++-- server/core/Makefile | 2 +- server/modules/monitor/Makefile | 2 +- server/modules/routing/readwritesplit/Makefile | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/makefile.inc b/makefile.inc index 8f19725b4..f2d93bf84 100644 --- a/makefile.inc +++ b/makefile.inc @@ -26,8 +26,8 @@ endif CFLAGS := $(CFLAGS) -Wall LDLIBS := $(LDLIBS) -pthread -LDMYSQL := -static -lmysqld -CPP_LDLIBS := -shared -lstdc++ +LDMYSQL := -lmysqld +CPP_LDLIBS := -lstdc++ # # Compiler flags, httpd arguments and debugger options diff --git a/server/core/Makefile b/server/core/Makefile index 2bd095dea..000b30801 100644 --- a/server/core/Makefile +++ b/server/core/Makefile @@ -75,7 +75,7 @@ POBJS=maxpasswd.o secrets.o utils.o LIBS=-L../inih/extra -linih -lssl -lstdc++ \ -L$(EMBEDDED_LIB) \ -lz -lm -lcrypt -lcrypto -ldl -laio -lrt -pthread -llog_manager \ - -static -lmysqld + -l:libmysqld.a all: maxscale maxkeys maxpasswd diff --git a/server/modules/monitor/Makefile b/server/modules/monitor/Makefile index 7bdf6d9c8..035897d3e 100644 --- a/server/modules/monitor/Makefile +++ b/server/modules/monitor/Makefile @@ -39,7 +39,7 @@ GALERAOBJ=$(GALERASRCS:.c=.o) SRCS=$(MYSQLSRCS) OBJ=$(SRCS:.c=.o) LIBS=$(UTILSPATH)/skygw_utils.o -llog_manager \ - -L$(EMBEDDED_LIB) -static -lmysqld + -L$(EMBEDDED_LIB) -l:libmysqld.a MODULES=libmysqlmon.so libgaleramon.so diff --git a/server/modules/routing/readwritesplit/Makefile b/server/modules/routing/readwritesplit/Makefile index be489f740..07f956ed6 100644 --- a/server/modules/routing/readwritesplit/Makefile +++ b/server/modules/routing/readwritesplit/Makefile @@ -38,7 +38,7 @@ LDFLAGS=-shared -L$(LOGPATH) -L$(QCLASSPATH) -L$(EMBEDDED_LIB) \ SRCS=readwritesplit.c OBJ=$(SRCS:.c=.o) -LIBS=-lssl -pthread -llog_manager -lquery_classifier -static -lmysqld +LIBS=-lssl -pthread -llog_manager -lquery_classifier -l:libmysqld.a MODULES=libreadwritesplit.so all: $(MODULES) From c3c18fb044007a6431d5d97ee061210e6038955e Mon Sep 17 00:00:00 2001 From: Mark Riddoch Date: Wed, 2 Jul 2014 17:32:47 +0100 Subject: [PATCH 5/6] Fix for missing maxscaled sources in Makefile. Resolves issue with make clean not removing maxscaled.o --- server/modules/protocol/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/modules/protocol/Makefile b/server/modules/protocol/Makefile index bca893942..54a8f8c38 100644 --- a/server/modules/protocol/Makefile +++ b/server/modules/protocol/Makefile @@ -48,10 +48,12 @@ HTTPDSRCS=httpd.c HTTPDOBJ=$(HTTPDSRCS:.c=.o) MAXSCALEDSRCS=maxscaled.c MAXSCALEDOBJ=$(MAXSCALEDSRCS:.c=.o) -SRCS=$(MYSQLCLIENTSRCS) $(MYSQLBACKENDSRCS) $(TELNETDSRCS) $(HTTPDSRCS) +SRCS=$(MYSQLCLIENTSRCS) $(MYSQLBACKENDSRCS) $(TELNETDSRCS) $(HTTPDSRCS) \ + $(MAXSCALEDSRCS) OBJ=$(SRCS:.c=.o) LIBS=$(UTILSPATH)/skygw_utils.o -MODULES=libMySQLClient.so libMySQLBackend.so libtelnetd.so libHTTPD.so libmaxscaled.so +MODULES=libMySQLClient.so libMySQLBackend.so libtelnetd.so libHTTPD.so \ + libmaxscaled.so all: $(MODULES) From 7f0ab047d57434b62e3f5c48a29e4c2b8285c2cd Mon Sep 17 00:00:00 2001 From: Timofey Turenko Date: Wed, 2 Jul 2014 22:42:04 +0300 Subject: [PATCH 6/6] fix path for ldconfig --- maxscale.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maxscale.conf b/maxscale.conf index a381124f4..ad7652647 100644 --- a/maxscale.conf +++ b/maxscale.conf @@ -1,2 +1,2 @@ -/usr/local/sbin/MaxScale/modules -/usr/local/sbin/lib +/usr/local/skysql/maxscale/modules +/usr/local/skysql/maxscale/lib