diff options
author | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2020-07-03 15:13:58 +0000 |
---|---|---|
committer | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2020-07-03 15:13:58 +0000 |
commit | 61c827b33eb6e83a20977a661ceb5d0f00ee078e (patch) | |
tree | 8fa417fd262b07f6a38fbbb6998c4e22b82dee2d /ftp/fastdfs/files | |
parent | Fix build with non-default LOCALBASE, PREFIX (diff) |
Update to 6.06
PR: 246912
Submitted by: Daniel Ylitalo <daniel@blodan.se> (maintainer)
Diffstat (limited to 'ftp/fastdfs/files')
-rw-r--r-- | ftp/fastdfs/files/patch-client-Makefile.in | 15 | ||||
-rw-r--r-- | ftp/fastdfs/files/patch-conf-client.conf | 14 | ||||
-rw-r--r-- | ftp/fastdfs/files/patch-conf-storage.conf | 42 | ||||
-rw-r--r-- | ftp/fastdfs/files/patch-conf-tracker.conf | 20 | ||||
-rw-r--r-- | ftp/fastdfs/files/patch-make.sh | 82 | ||||
-rw-r--r-- | ftp/fastdfs/files/patch-storage-Makefile.in | 6 | ||||
-rw-r--r-- | ftp/fastdfs/files/patch-tracker-Makefile.in | 11 |
7 files changed, 78 insertions, 112 deletions
diff --git a/ftp/fastdfs/files/patch-client-Makefile.in b/ftp/fastdfs/files/patch-client-Makefile.in index 1adae60f9b07..fc22e2a0101d 100644 --- a/ftp/fastdfs/files/patch-client-Makefile.in +++ b/ftp/fastdfs/files/patch-client-Makefile.in @@ -1,28 +1,25 @@ ---- client/Makefile.in.orig 2016-08-08 07:17:50 UTC +--- client/Makefile.in.orig 2019-12-30 23:36:03 UTC +++ client/Makefile.in -@@ -3,10 +3,10 @@ +@@ -3,8 +3,8 @@ COMPILE = $(CC) $(CFLAGS) ENABLE_STATIC_LIB = $(ENABLE_STATIC_LIB) ENABLE_SHARED_LIB = $(ENABLE_SHARED_LIB) -INC_PATH = -I../common -I../tracker -I/usr/include/fastcommon -LIB_PATH = $(LIBS) -lfastcommon -+INC_PATH = -I../common -I../tracker -I$(LOCALBASE)/include/fastcommon ++INC_PATH = -I../common -I../tracker -I$(LOCALBASE)/include +LIB_PATH = $(LIBS) -L${LOCALBASE}/lib -lfastcommon TARGET_PATH = $(TARGET_PREFIX)/bin --TARGET_LIB = $(TARGET_PREFIX)/lib64 -+TARGET_LIB = $(TARGET_PREFIX)/lib + TARGET_LIB = $(TARGET_PREFIX)/$(LIB_VERSION) TARGET_INC = $(TARGET_PREFIX)/include - CONFIG_PATH = $(TARGET_CONF_PATH) - @@ -50,7 +50,8 @@ ALL_LIBS = $(STATIC_LIBS) $(SHARED_LIBS) all: $(ALL_OBJS) $(ALL_PRGS) $(ALL_LIBS) libfdfsclient.so: - $(COMPILE) -o $@ $< -shared $(FDFS_SHARED_OBJS) $(LIB_PATH) + $(COMPILE) -o $@ $< -shared $(FDFS_SHARED_OBJS) $(LIB_PATH) \ -+ -Wl,-soname,libfdfsclient.so ++ -Wl,-soname,libfdfsclient.so libfdfsclient.a: - ar cru $@ $< $(FDFS_STATIC_OBJS) + ar rcs $@ $< $(FDFS_STATIC_OBJS) .o: @@ -66,9 +67,9 @@ install: mkdir -p $(CONFIG_PATH) diff --git a/ftp/fastdfs/files/patch-conf-client.conf b/ftp/fastdfs/files/patch-conf-client.conf index 161990d6dd6a..f5526f0edc4a 100644 --- a/ftp/fastdfs/files/patch-conf-client.conf +++ b/ftp/fastdfs/files/patch-conf-client.conf @@ -1,11 +1,11 @@ ---- conf/client.conf.orig 2016-08-08 07:17:50 UTC +--- conf/client.conf.orig 2019-12-30 23:36:03 UTC +++ conf/client.conf -@@ -7,7 +7,7 @@ connect_timeout=30 - network_timeout=60 +@@ -8,7 +8,7 @@ connect_timeout = 5 + network_timeout = 60 # the base path to store log files --base_path=/home/yuqing/fastdfs -+base_path=/var/db/fastdfs +-base_path = /home/yuqing/fastdfs ++base_path = /var/db/fastdfs - # tracker_server can ocur more than once, and tracker_server format is - # "host:port", host can be hostname or ip address + # tracker_server can ocur more than once for multi tracker servers. + # the value format of tracker_server is "HOST:PORT", diff --git a/ftp/fastdfs/files/patch-conf-storage.conf b/ftp/fastdfs/files/patch-conf-storage.conf index 51b71c74fa2d..538a9657558f 100644 --- a/ftp/fastdfs/files/patch-conf-storage.conf +++ b/ftp/fastdfs/files/patch-conf-storage.conf @@ -1,36 +1,36 @@ ---- conf/storage.conf.orig 2016-08-08 07:17:50 UTC +--- conf/storage.conf.orig 2019-12-30 23:36:03 UTC +++ conf/storage.conf -@@ -38,7 +38,7 @@ heart_beat_interval=30 - stat_report_interval=60 +@@ -46,7 +46,7 @@ stat_report_interval = 60 + # NOTE: the binlog files maybe are large, make sure + # the base path has enough disk space, + # eg. the disk free space should > 50GB +-base_path = /home/yuqing/fastdfs ++base_path = /var/db/fastdfs/storage - # the base path to store data and log files --base_path=/home/yuqing/fastdfs -+base_path=/var/db/fastdfs/storage + # max concurrent connections the server supported, + # you should set this parameter larger, eg. 10240 +@@ -126,8 +126,8 @@ store_path_count = 1 + # the store paths' order is very important, don't mess up!!! + # the base_path should be independent (different) of the store paths - # max concurrent connections the server supported - # default value is 256 -@@ -106,8 +106,8 @@ store_path_count=1 - - # store_path#, based 0, if store_path0 not exists, it's value is base_path - # the paths must be exist --store_path0=/home/yuqing/fastdfs --#store_path1=/home/yuqing/fastdfs2 -+store_path0=/var/db/fastdfs/storage -+#store_path1=/var/db/fastdfs/storage2 +-store_path0 = /home/yuqing/fastdfs +-#store_path1 = /home/yuqing/fastdfs2 ++store_path0 = /var/db/fastdfs/storage ++#store_path1 = /var/db/fastdfs/storage2 # subdir_count * subdir_count directories will be auto created under each # store_path (disk), value can be 1 to 256, default value is 256 -@@ -130,11 +130,11 @@ log_level=info +@@ -158,11 +158,11 @@ log_level = info #unix group name to run this program, #not set (empty) means run by the group of current user --run_by_group= -+run_by_group=_fastdfs +-run_by_group = ++run_by_group = _fastdfs #unix username to run this program, #not set (empty) means run by current user --run_by_user= -+run_by_user=_fastdfs +-run_by_user = ++run_by_user = _fastdfs # allow_hosts can ocur more than once, host can be hostname or ip address, # "*" (only one asterisk) means match all ip addresses diff --git a/ftp/fastdfs/files/patch-conf-tracker.conf b/ftp/fastdfs/files/patch-conf-tracker.conf index 42ff48d4e902..96a83788ac0a 100644 --- a/ftp/fastdfs/files/patch-conf-tracker.conf +++ b/ftp/fastdfs/files/patch-conf-tracker.conf @@ -1,15 +1,15 @@ ---- conf/tracker.conf.orig 2016-08-08 07:17:50 UTC +--- conf/tracker.conf.orig 2019-12-30 23:36:03 UTC +++ conf/tracker.conf -@@ -19,7 +19,7 @@ connect_timeout=30 - network_timeout=60 +@@ -20,7 +20,7 @@ connect_timeout = 5 + network_timeout = 60 # the base path to store data and log files --base_path=/home/yuqing/fastdfs -+base_path=/var/db/fastdfs/tracker +-base_path = /home/yuqing/fastdfs ++base_path = /var/db/fastdfs/tracker - # max concurrent connections this server supported - max_connections=256 -@@ -85,11 +85,11 @@ log_level=info + # max concurrent connections this server support + # you should set this parameter larger, eg. 10240 +@@ -97,11 +97,11 @@ log_level = info #unix group name to run this program, #not set (empty) means run by the group of current user @@ -18,8 +18,8 @@ #unix username to run this program, #not set (empty) means run by current user --run_by_user= -+run_by_user=_fastdfs +-run_by_user = ++run_by_user = _fastdfs # allow_hosts can ocur more than once, host can be hostname or ip address, # "*" (only one asterisk) means match all ip addresses diff --git a/ftp/fastdfs/files/patch-make.sh b/ftp/fastdfs/files/patch-make.sh index 50e709575b69..42c003e2f45f 100644 --- a/ftp/fastdfs/files/patch-make.sh +++ b/ftp/fastdfs/files/patch-make.sh @@ -1,56 +1,6 @@ ---- make.sh.orig 2016-08-08 07:17:50 UTC +--- make.sh.orig 2019-12-30 23:36:03 UTC +++ make.sh -@@ -1,58 +1,19 @@ --tmp_src_filename=fdfs_check_bits.c --cat <<EOF > $tmp_src_filename --#include <stdio.h> --#include <unistd.h> --#include <fcntl.h> --int main() --{ -- printf("%d\n", (int)sizeof(long)); -- printf("%d\n", (int)sizeof(off_t)); -- return 0; --} --EOF -- --gcc -D_FILE_OFFSET_BITS=64 -o a.out $tmp_src_filename --output=$(./a.out) - --if [ -f /bin/expr ]; then -- EXPR=/bin/expr --else -- EXPR=/usr/bin/expr --fi -- --count=0 --int_bytes=4 --off_bytes=8 --for col in $output; do -- if [ $count -eq 0 ]; then -- int_bytes=$col -- else -- off_bytes=$col -- fi -- -- count=$($EXPR $count + 1) --done -- --/bin/rm -f a.out $tmp_src_filename --if [ "$int_bytes" -eq 8 ]; then -+if [ "$(/usr/bin/uname -m)" = "amd64" ]; then - OS_BITS=64 --else -- OS_BITS=32 --fi -- --if [ "$off_bytes" -eq 8 ]; then - OFF_BITS=64 - else -+ OS_BITS=32 - OFF_BITS=32 - fi - +@@ -1,10 +1,10 @@ ENABLE_STATIC_LIB=0 ENABLE_SHARED_LIB=1 -TARGET_PREFIX=$DESTDIR/usr @@ -64,19 +14,37 @@ DEBUG_FLAG=1 -@@ -74,7 +35,7 @@ if [ "$uname" = "Linux" ]; then +@@ -25,15 +25,7 @@ fi + + uname=$(uname) + +-if [ "$OS_BITS" -eq 64 ]; then +- if [ "$uname" = "Darwin" ]; then +- LIB_VERSION=lib +- else +- LIB_VERSION=lib64 +- fi +-else +- LIB_VERSION=lib +-fi ++LIB_VERSION=lib + + LIBS='' + +@@ -46,7 +38,7 @@ if [ "$uname" = "Linux" ]; then fi CFLAGS="$CFLAGS" elif [ "$uname" = "FreeBSD" ] || [ "$uname" = "Darwin" ]; then - LIBS="$LIBS -L/usr/lib" -+ LIBS="$LIBS -L/usr/local/lib" ++ LIBS="$LIBS -L$PREFIX/lib" CFLAGS="$CFLAGS" if [ "$uname" = "Darwin" ]; then CFLAGS="$CFLAGS -DDARWIN" -@@ -180,26 +141,3 @@ perl -pi -e "s#\\\$\(LIBS\)#$LIBS#g" Mak +@@ -153,29 +145,3 @@ perl -pi -e "s#\\\$\(CFLAGS\)#$CFLAGS#g" + perl -pi -e "s#\\\$\(LIBS\)#$LIBS#g" Makefile perl -pi -e "s#\\\$\(TARGET_PREFIX\)#$TARGET_PREFIX#g" Makefile cd .. - +- -if [ "$1" = "install" ]; then - cd .. - cp -f restart.sh $TARGET_PREFIX/bin @@ -90,6 +58,8 @@ - cp -f conf/storage.conf $TARGET_CONF_PATH/storage.conf.sample - cp -f conf/client.conf $TARGET_CONF_PATH/client.conf.sample - cp -f conf/storage_ids.conf $TARGET_CONF_PATH/storage_ids.conf.sample +- cp -f conf/http.conf $TARGET_CONF_PATH/http.conf.sample +- cp -f conf/mime.types $TARGET_CONF_PATH/mime.types.sample - fi - mkdir -p $TARGET_INIT_PATH - cp -f init.d/fdfs_trackerd $TARGET_INIT_PATH diff --git a/ftp/fastdfs/files/patch-storage-Makefile.in b/ftp/fastdfs/files/patch-storage-Makefile.in index 095b7f770cec..107c23dbc8df 100644 --- a/ftp/fastdfs/files/patch-storage-Makefile.in +++ b/ftp/fastdfs/files/patch-storage-Makefile.in @@ -1,4 +1,4 @@ ---- storage/Makefile.in.orig 2016-08-08 07:17:50 UTC +--- storage/Makefile.in.orig 2019-12-30 23:36:03 UTC +++ storage/Makefile.in @@ -1,8 +1,8 @@ .SUFFIXES: .c .o @@ -6,12 +6,12 @@ COMPILE = $(CC) $(CFLAGS) -INC_PATH = -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon -LIB_PATH = $(LIBS) -lfastcommon -+INC_PATH = -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I$(LOCALBASE)/include/fastcommon ++INC_PATH = -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I$(LOCALBASE)/include +LIB_PATH = $(LIBS) -L${LOCALBASE}/lib -lfastcommon TARGET_PATH = $(TARGET_PREFIX)/bin CONFIG_PATH = $(TARGET_CONF_PATH) -@@ -34,7 +34,7 @@ all: $(ALL_OBJS) $(ALL_PRGS) +@@ -35,7 +35,7 @@ all: $(ALL_OBJS) $(ALL_PRGS) install: mkdir -p $(TARGET_PATH) mkdir -p $(CONFIG_PATH) diff --git a/ftp/fastdfs/files/patch-tracker-Makefile.in b/ftp/fastdfs/files/patch-tracker-Makefile.in index 01757c3a17f1..2fe4ad169829 100644 --- a/ftp/fastdfs/files/patch-tracker-Makefile.in +++ b/ftp/fastdfs/files/patch-tracker-Makefile.in @@ -1,23 +1,22 @@ ---- tracker/Makefile.in.orig 2016-08-08 07:17:50 UTC +--- tracker/Makefile.in.orig 2019-12-30 23:36:03 UTC +++ tracker/Makefile.in @@ -1,8 +1,8 @@ .SUFFIXES: .c .o COMPILE = $(CC) $(CFLAGS) --INC_PATH = -I../common -I/usr/include/fastcommon +-INC_PATH = -I../common -I/usr/local/include -LIB_PATH = $(LIBS) -lfastcommon -+INC_PATH = -I../common -I$(LOCALBASE)/include/fastcommon ++INC_PATH = -I../common -I$(LOCALBASE)/include +LIB_PATH = $(LIBS) -L${LOCALBASE}/lib -lfastcommon TARGET_PATH = $(TARGET_PREFIX)/bin CONFIG_PATH = $(TARGET_CONF_PATH) -@@ -26,7 +26,8 @@ all: $(ALL_OBJS) $(ALL_PRGS) +@@ -26,7 +26,7 @@ all: $(ALL_OBJS) $(ALL_PRGS) install: mkdir -p $(TARGET_PATH) mkdir -p $(CONFIG_PATH) - cp -f $(ALL_PRGS) $(TARGET_PATH) + install -s $(ALL_PRGS) $(TARGET_PATH) if [ ! -f $(CONFIG_PATH)/tracker.conf.sample ]; then cp -f ../conf/tracker.conf $(CONFIG_PATH)/tracker.conf.sample; fi -+ if [ ! -f $(CONFIG_PATH)/storage_ids.conf.sample ]; then cp -f ../conf/storage_ids.conf $(CONFIG_PATH)/storage_ids.conf.sample; fi + if [ ! -f $(CONFIG_PATH)/storage_ids.conf.sample ]; then cp -f ../conf/storage_ids.conf $(CONFIG_PATH)/storage_ids.conf.sample; fi clean: - rm -f $(ALL_OBJS) $(ALL_PRGS) |