View | Details | Raw Unified | Return to bug 246912 | Differences between
and this patch

Collapse All | Expand All

(-)devel/libfastcommon/Makefile (-3 / +2 lines)
Lines 1-8 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	libfastcommon
3
PORTNAME=	libfastcommon
4
PORTVERSION=	1.0.36
4
PORTVERSION=	1.0.43
5
PORTREVISION=	1
6
CATEGORIES=	devel
5
CATEGORIES=	devel
7
6
8
MAINTAINER=	daniel@blodan.se
7
MAINTAINER=	daniel@blodan.se
Lines 12-18 Link Here
12
11
13
USE_GITHUB=	yes
12
USE_GITHUB=	yes
14
GH_ACCOUNT=	happyfish100
13
GH_ACCOUNT=	happyfish100
15
GH_TAGNAME=	aa4f5b2
14
GH_TAGNAME=	V1.0.43
16
15
17
USE_LDCONFIG=	yes
16
USE_LDCONFIG=	yes
18
17
(-)devel/libfastcommon/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1499761730
1
TIMESTAMP = 1591013087
2
SHA256 (happyfish100-libfastcommon-1.0.36-aa4f5b2_GH0.tar.gz) = 2c57ff7c5a14954c2073d252b4e9e4020b62aeecd47d51824d2f5f3d8229fad5
2
SHA256 (happyfish100-libfastcommon-1.0.43-V1.0.43_GH0.tar.gz) = 05425aed8e6bc7ba283abba4e1bb500cc7f8c873c35bb86712d7123144a37b4c
3
SIZE (happyfish100-libfastcommon-1.0.36-aa4f5b2_GH0.tar.gz) = 434877
3
SIZE (happyfish100-libfastcommon-1.0.43-V1.0.43_GH0.tar.gz) = 166526
(-)devel/libfastcommon/files/patch-make.sh (-6 / +11 lines)
Lines 1-6 Link Here
1
--- make.sh.orig	2016-09-08 07:44:31 UTC
1
--- make.sh.orig	2019-12-25 12:35:44 UTC
2
+++ make.sh
2
+++ make.sh
3
@@ -1,55 +1,15 @@
3
@@ -1,57 +1,16 @@
4
-tmp_src_filename=fast_check_bits.c
4
-tmp_src_filename=fast_check_bits.c
5
-cat <<EOF > $tmp_src_filename
5
-cat <<EOF > $tmp_src_filename
6
-#include <stdio.h>
6
-#include <stdio.h>
Lines 37-46 Link Here
37
-
37
-
38
-    count=`$EXPR $count + 1`
38
-    count=`$EXPR $count + 1`
39
-done
39
-done
40
-
41
-/bin/rm -f a.out $tmp_src_filename
40
+unamep=$(/usr/bin/uname -p)
42
+unamep=$(/usr/bin/uname -p)
41
 
43
 
42
-/bin/rm -f a.out $tmp_src_filename
44
-TARGET_PREFIX=$DESTDIR/usr
43
-if [ "$int_bytes" -eq 8 ]; then
45
-if [ "$int_bytes" -eq 8 ]; then
46
+TARGET_PREFIX=$DESTDIR$PREFIX
44
+if [ "$unamep" = "amd64" -o "$unamep" = "x86_64" ]; then
47
+if [ "$unamep" = "amd64" -o "$unamep" = "x86_64" ]; then
45
  OS_BITS=64
48
  OS_BITS=64
46
- LIB_VERSION=lib64
49
- LIB_VERSION=lib64
Lines 61-67 Link Here
61
 DEBUG_FLAG=0
64
 DEBUG_FLAG=0
62
 
65
 
63
 CFLAGS='-Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE'
66
 CFLAGS='-Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE'
64
@@ -67,12 +27,9 @@ HAVE_USER_H=0
67
@@ -69,14 +28,9 @@ HAVE_USER_H=0
65
 if [ "$uname" = "Linux" ]; then
68
 if [ "$uname" = "Linux" ]; then
66
   OS_NAME=OS_LINUX
69
   OS_NAME=OS_LINUX
67
   IOEVENT_USE=IOEVENT_USE_EPOLL
70
   IOEVENT_USE=IOEVENT_USE_EPOLL
Lines 71-86 Link Here
71
   IOEVENT_USE=IOEVENT_USE_KQUEUE
74
   IOEVENT_USE=IOEVENT_USE_KQUEUE
72
-  if [ "$uname" = "Darwin" ]; then
75
-  if [ "$uname" = "Darwin" ]; then
73
-    CFLAGS="$CFLAGS -DDARWIN"
76
-    CFLAGS="$CFLAGS -DDARWIN"
77
-    TARGET_PREFIX=$TARGET_PREFIX/local
78
-    LIB_VERSION=lib
74
-  fi
79
-  fi
75
 
80
 
76
   if [ -f /usr/include/sys/vmmeter.h ]; then
81
   if [ -f /usr/include/sys/vmmeter.h ]; then
77
      HAVE_VMMETER_H=1
82
      HAVE_VMMETER_H=1
78
@@ -138,7 +95,7 @@ sed_replace()
83
@@ -142,7 +96,7 @@ sed_replace()
79
 {
84
 {
80
     sed_cmd=$1
85
     sed_cmd=$1
81
     filename=$2
86
     filename=$2
82
-    if [ "$uname" = "FreeBSD" ] || [ "$uname" = "Darwin" ]; then
87
-    if [ "$uname" = "FreeBSD" ] || [ "$uname" = "Darwin" ]; then
83
+    if [ "$uname" = "FreeBSD" -o "$uname" = "DragonFly" ]; then
88
+    if [ "$uname" = "FreeBSD" -o "$name" = "DragonFly" ]; then
84
        sed -i "" "$sed_cmd" $filename
89
        sed -i "" "$sed_cmd" $filename
85
     else
90
     else
86
        sed -i "$sed_cmd" $filename
91
        sed -i "$sed_cmd" $filename
(-)devel/libfastcommon/files/patch-src_Makefile.in (-20 / +14 lines)
Lines 1-28 Link Here
1
--- src/Makefile.in.orig	2016-09-08 07:44:31 UTC
1
--- src/Makefile.in.orig	2019-12-25 12:35:44 UTC
2
+++ src/Makefile.in
2
+++ src/Makefile.in
3
@@ -41,7 +41,7 @@ ALL_LIBS = $(SHARED_LIBS) $(STATIC_LIBS)
3
@@ -51,7 +51,7 @@ ALL_LIBS = $(SHARED_LIBS) $(STATIC_LIBS)
4
 
4
 
5
 all: $(ALL_OBJS) $(ALL_PRGS) $(ALL_LIBS)
5
 all: $(ALL_OBJS) $(ALL_PRGS) $(ALL_LIBS)
6
 libfastcommon.so:
6
 libfastcommon.so: $(FAST_SHARED_OBJS)
7
-	$(COMPILE) -o $@ $< -shared $(FAST_SHARED_OBJS) $(LIB_PATH)
7
-	$(COMPILE) -o $@ -shared $(FAST_SHARED_OBJS) $(LIB_PATH)
8
+	$(COMPILE) -o $@ $< -shared -Wl,-soname,libfastcommon.so $(FAST_SHARED_OBJS) $(LIB_PATH)
8
+	$(COMPILE) -o $@ -shared -Wl,-soname,libfastcommon.so $(FAST_SHARED_OBJS) $(LIB_PATH)
9
 libfastcommon.a: $(FAST_STATIC_OBJS)
9
 libfastcommon.a: $(FAST_STATIC_OBJS)
10
 	ar rcs $@ $(FAST_STATIC_OBJS)
10
 	ar rcs $@ $(FAST_STATIC_OBJS)
11
 .o:
11
 .o:
12
@@ -53,12 +53,10 @@ libfastcommon.a: $(FAST_STATIC_OBJS)
12
@@ -67,8 +67,8 @@ install:
13
 .c.lo:
13
 	mkdir -p $(TARGET_PREFIX)/lib
14
 	$(COMPILE) -c -fPIC -o $@ $<  $(INC_PATH)
14
 	mkdir -p $(TARGET_PREFIX)/include/fastcommon
15
 install:
15
 
16
-	mkdir -p $(DESTDIR)/usr/$(LIB_VERSION)
16
-	install -m 755 $(SHARED_LIBS) $(TARGET_LIB)
17
-	mkdir -p $(DESTDIR)/usr/lib
17
-	install -m 644 $(HEADER_FILES) $(TARGET_PREFIX)/include/fastcommon
18
-	install -m 755 $(SHARED_LIBS) $(DESTDIR)/usr/$(LIB_VERSION)
18
+	${BSD_INSTALL_LIB} $(SHARED_LIBS) $(TARGET_LIB)
19
-	install -m 755 $(SHARED_LIBS) $(DESTDIR)/usr/lib
19
+	${BSD_INSTALL_DATA} $(HEADER_FILES) $(TARGET_PREFIX)/include/fastcommon
20
-	mkdir -p $(DESTDIR)/usr/include/fastcommon
20
 	if [ ! -e $(TARGET_PREFIX)/lib/libfastcommon.so ]; then ln -s $(TARGET_LIB)/libfastcommon.so $(TARGET_PREFIX)/lib/libfastcommon.so; fi
21
-	install -m 644 $(HEADER_FILES) $(DESTDIR)/usr/include/fastcommon
22
+	mkdir -p $(DESTDIR)$(PREFIX)/$(LIB_VERSION)
23
+	${BSD_INSTALL_LIB} $(SHARED_LIBS) $(DESTDIR)$(PREFIX)/$(LIB_VERSION)
24
+	mkdir -p $(DESTDIR)$(PREFIX)/include/fastcommon
25
+	${BSD_INSTALL_DATA} $(HEADER_FILES) $(DESTDIR)$(PREFIX)/include/fastcommon
26
 clean:
21
 clean:
27
 	rm -f $(ALL_OBJS) $(ALL_PRGS) $(ALL_LIBS)
22
 	rm -f $(ALL_OBJS) $(ALL_PRGS) $(ALL_LIBS)
28
 
(-)devel/libfastcommon/files/patch-src_system__info.c (-2 / +11 lines)
Lines 1-6 Link Here
1
--- src/system_info.c.orig	2016-09-08 07:44:31 UTC
1
--- src/system_info.c.orig	2019-12-25 12:35:44 UTC
2
+++ src/system_info.c
2
+++ src/system_info.c
3
@@ -582,6 +582,20 @@ int get_sysinfo(struct fast_sysinfo*info
3
@@ -62,7 +62,7 @@ int get_sys_total_mem_size(int64_t *mem_
4
    size_t len;
5
 
6
    mib[0] = CTL_HW;
7
-   mib[1] = HW_MEMSIZE;
8
+   mib[1] = HW_PHYSMEM;
9
    len = sizeof(*mem_size);
10
    if (sysctl(mib, 2, mem_size, &len, NULL, 0) != 0)
11
    {
12
@@ -583,6 +583,20 @@ int get_sysinfo(struct fast_sysinfo*info
4
 #define ki_rgid kp_eproc.e_pcred.p_rgid
13
 #define ki_rgid kp_eproc.e_pcred.p_rgid
5
 #define GET_SIGNAL(sig) sig
14
 #define GET_SIGNAL(sig) sig
6
 
15
 
(-)devel/libfastcommon/pkg-plist (+6 lines)
Lines 1-9 Link Here
1
include/fastcommon/_os_define.h
1
include/fastcommon/_os_define.h
2
include/fastcommon/avl_tree.h
2
include/fastcommon/avl_tree.h
3
include/fastcommon/base64.h
3
include/fastcommon/base64.h
4
include/fastcommon/buffered_file_writer.h
4
include/fastcommon/chain.h
5
include/fastcommon/chain.h
5
include/fastcommon/char_convert_loader.h
6
include/fastcommon/char_convert_loader.h
6
include/fastcommon/char_converter.h
7
include/fastcommon/char_converter.h
8
include/fastcommon/common_blocked_queue.h
7
include/fastcommon/common_define.h
9
include/fastcommon/common_define.h
8
include/fastcommon/connection_pool.h
10
include/fastcommon/connection_pool.h
9
include/fastcommon/fast_allocator.h
11
include/fastcommon/fast_allocator.h
Lines 13-18 Link Here
13
include/fastcommon/fast_mpool.h
15
include/fastcommon/fast_mpool.h
14
include/fastcommon/fast_task_queue.h
16
include/fastcommon/fast_task_queue.h
15
include/fastcommon/fast_timer.h
17
include/fastcommon/fast_timer.h
18
include/fastcommon/fc_list.h
16
include/fastcommon/flat_skiplist.h
19
include/fastcommon/flat_skiplist.h
17
include/fastcommon/hash.h
20
include/fastcommon/hash.h
18
include/fastcommon/http_func.h
21
include/fastcommon/http_func.h
Lines 20-29 Link Here
20
include/fastcommon/ini_file_reader.h
23
include/fastcommon/ini_file_reader.h
21
include/fastcommon/ioevent.h
24
include/fastcommon/ioevent.h
22
include/fastcommon/ioevent_loop.h
25
include/fastcommon/ioevent_loop.h
26
include/fastcommon/json_parser.h
23
include/fastcommon/local_ip_func.h
27
include/fastcommon/local_ip_func.h
24
include/fastcommon/logger.h
28
include/fastcommon/logger.h
25
include/fastcommon/md5.h
29
include/fastcommon/md5.h
26
include/fastcommon/multi_skiplist.h
30
include/fastcommon/multi_skiplist.h
31
include/fastcommon/multi_socket_client.h
27
include/fastcommon/php7_ext_wrapper.h
32
include/fastcommon/php7_ext_wrapper.h
28
include/fastcommon/process_ctrl.h
33
include/fastcommon/process_ctrl.h
29
include/fastcommon/pthread_func.h
34
include/fastcommon/pthread_func.h
Lines 31-36 Link Here
31
include/fastcommon/shared_func.h
36
include/fastcommon/shared_func.h
32
include/fastcommon/skiplist.h
37
include/fastcommon/skiplist.h
33
include/fastcommon/skiplist_common.h
38
include/fastcommon/skiplist_common.h
39
include/fastcommon/skiplist_set.h
34
include/fastcommon/sockopt.h
40
include/fastcommon/sockopt.h
35
include/fastcommon/system_info.h
41
include/fastcommon/system_info.h
36
lib/libfastcommon.so
42
lib/libfastcommon.so
(-)ftp/fastdfs/Makefile (-3 / +2 lines)
Lines 1-8 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	fastdfs
3
PORTNAME=	fastdfs
4
PORTVERSION=	5.0.11
4
PORTVERSION=	6.0.6
5
PORTREVISION=	1
6
CATEGORIES=	ftp
5
CATEGORIES=	ftp
7
6
8
MAINTAINER=	daniel@blodan.se
7
MAINTAINER=	daniel@blodan.se
Lines 25-31 Link Here
25
24
26
USE_GITHUB=	yes
25
USE_GITHUB=	yes
27
GH_ACCOUNT=	happyfish100
26
GH_ACCOUNT=	happyfish100
28
GH_TAGNAME=	1e50b4f
27
GH_TAGNAME=	V6.06
29
28
30
SUB_FILES=	fdfs_status
29
SUB_FILES=	fdfs_status
31
30
(-)ftp/fastdfs/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1502819381
1
TIMESTAMP = 1591010695
2
SHA256 (happyfish100-fastdfs-5.0.11-1e50b4f_GH0.tar.gz) = 42ef67951c55fb416282cd20389dde5709016913debbb87465b9b744fa3dacf9
2
SHA256 (happyfish100-fastdfs-6.0.6-V6.06_GH0.tar.gz) = d724266719235c7901bf3281134903dfdbc925c44b4c4a9f7fb451ae916c80e1
3
SIZE (happyfish100-fastdfs-5.0.11-1e50b4f_GH0.tar.gz) = 336996
3
SIZE (happyfish100-fastdfs-6.0.6-V6.06_GH0.tar.gz) = 809328
(-)ftp/fastdfs/files/patch-client-Makefile.in (-9 / +6 lines)
Lines 1-19 Link Here
1
--- client/Makefile.in.orig	2016-08-08 07:17:50 UTC
1
--- client/Makefile.in.orig	2019-12-30 23:36:03 UTC
2
+++ client/Makefile.in
2
+++ client/Makefile.in
3
@@ -3,10 +3,10 @@
3
@@ -3,8 +3,8 @@
4
 COMPILE = $(CC) $(CFLAGS)
4
 COMPILE = $(CC) $(CFLAGS)
5
 ENABLE_STATIC_LIB = $(ENABLE_STATIC_LIB)
5
 ENABLE_STATIC_LIB = $(ENABLE_STATIC_LIB)
6
 ENABLE_SHARED_LIB = $(ENABLE_SHARED_LIB)
6
 ENABLE_SHARED_LIB = $(ENABLE_SHARED_LIB)
7
-INC_PATH = -I../common -I../tracker -I/usr/include/fastcommon
7
-INC_PATH = -I../common -I../tracker -I/usr/include/fastcommon
8
-LIB_PATH = $(LIBS) -lfastcommon
8
-LIB_PATH = $(LIBS) -lfastcommon
9
+INC_PATH = -I../common -I../tracker -I$(LOCALBASE)/include/fastcommon
9
+INC_PATH = -I../common -I../tracker -I$(LOCALBASE)/include
10
+LIB_PATH = $(LIBS) -L${LOCALBASE}/lib -lfastcommon
10
+LIB_PATH = $(LIBS) -L${LOCALBASE}/lib -lfastcommon
11
 TARGET_PATH = $(TARGET_PREFIX)/bin
11
 TARGET_PATH = $(TARGET_PREFIX)/bin
12
-TARGET_LIB = $(TARGET_PREFIX)/lib64
12
 TARGET_LIB = $(TARGET_PREFIX)/$(LIB_VERSION)
13
+TARGET_LIB = $(TARGET_PREFIX)/lib
14
 TARGET_INC = $(TARGET_PREFIX)/include
13
 TARGET_INC = $(TARGET_PREFIX)/include
15
 CONFIG_PATH = $(TARGET_CONF_PATH)
16
 
17
@@ -50,7 +50,8 @@ ALL_LIBS = $(STATIC_LIBS) $(SHARED_LIBS)
14
@@ -50,7 +50,8 @@ ALL_LIBS = $(STATIC_LIBS) $(SHARED_LIBS)
18
 
15
 
19
 all: $(ALL_OBJS) $(ALL_PRGS) $(ALL_LIBS)
16
 all: $(ALL_OBJS) $(ALL_PRGS) $(ALL_LIBS)
Lines 20-28 Link Here
20
 libfdfsclient.so:
17
 libfdfsclient.so:
21
-	$(COMPILE) -o $@ $< -shared $(FDFS_SHARED_OBJS) $(LIB_PATH)
18
-	$(COMPILE) -o $@ $< -shared $(FDFS_SHARED_OBJS) $(LIB_PATH)
22
+	$(COMPILE) -o $@ $< -shared $(FDFS_SHARED_OBJS) $(LIB_PATH) \
19
+	$(COMPILE) -o $@ $< -shared $(FDFS_SHARED_OBJS) $(LIB_PATH) \
23
+	    -Wl,-soname,libfdfsclient.so
20
+		-Wl,-soname,libfdfsclient.so
24
 libfdfsclient.a:
21
 libfdfsclient.a:
25
 	ar cru $@ $< $(FDFS_STATIC_OBJS)
22
 	ar rcs $@ $< $(FDFS_STATIC_OBJS)
26
 .o:
23
 .o:
27
@@ -66,9 +67,9 @@ install:
24
@@ -66,9 +67,9 @@ install:
28
 	mkdir -p $(CONFIG_PATH)
25
 	mkdir -p $(CONFIG_PATH)
(-)ftp/fastdfs/files/patch-conf-client.conf (-7 / +7 lines)
Lines 1-11 Link Here
1
--- conf/client.conf.orig	2016-08-08 07:17:50 UTC
1
--- conf/client.conf.orig	2019-12-30 23:36:03 UTC
2
+++ conf/client.conf
2
+++ conf/client.conf
3
@@ -7,7 +7,7 @@ connect_timeout=30
3
@@ -8,7 +8,7 @@ connect_timeout = 5
4
 network_timeout=60
4
 network_timeout = 60
5
 
5
 
6
 # the base path to store log files
6
 # the base path to store log files
7
-base_path=/home/yuqing/fastdfs
7
-base_path = /home/yuqing/fastdfs
8
+base_path=/var/db/fastdfs
8
+base_path = /var/db/fastdfs
9
 
9
 
10
 # tracker_server can ocur more than once, and tracker_server format is
10
 # tracker_server can ocur more than once for multi tracker servers.
11
 #  "host:port", host can be hostname or ip address
11
 # the value format of tracker_server is "HOST:PORT",
(-)ftp/fastdfs/files/patch-conf-storage.conf (-21 / +21 lines)
Lines 1-36 Link Here
1
--- conf/storage.conf.orig	2016-08-08 07:17:50 UTC
1
--- conf/storage.conf.orig	2019-12-30 23:36:03 UTC
2
+++ conf/storage.conf
2
+++ conf/storage.conf
3
@@ -38,7 +38,7 @@ heart_beat_interval=30
3
@@ -46,7 +46,7 @@ stat_report_interval = 60
4
 stat_report_interval=60
4
 # NOTE: the binlog files maybe are large, make sure
5
 #       the base path has enough disk space,
6
 #       eg. the disk free space should > 50GB
7
-base_path = /home/yuqing/fastdfs
8
+base_path = /var/db/fastdfs/storage
5
 
9
 
6
 # the base path to store data and log files
10
 # max concurrent connections the server supported,
7
-base_path=/home/yuqing/fastdfs
11
 # you should set this parameter larger, eg. 10240
8
+base_path=/var/db/fastdfs/storage
12
@@ -126,8 +126,8 @@ store_path_count = 1
13
 #       the store paths' order is very important, don't mess up!!!
14
 #       the base_path should be independent (different) of the store paths
9
 
15
 
10
 # max concurrent connections the server supported
16
-store_path0 = /home/yuqing/fastdfs
11
 # default value is 256
17
-#store_path1 = /home/yuqing/fastdfs2
12
@@ -106,8 +106,8 @@ store_path_count=1
18
+store_path0 = /var/db/fastdfs/storage
19
+#store_path1 = /var/db/fastdfs2/storage
13
 
20
 
14
 # store_path#, based 0, if store_path0 not exists, it's value is base_path
15
 # the paths must be exist
16
-store_path0=/home/yuqing/fastdfs
17
-#store_path1=/home/yuqing/fastdfs2
18
+store_path0=/var/db/fastdfs/storage
19
+#store_path1=/var/db/fastdfs/storage2
20
 
21
 # subdir_count  * subdir_count directories will be auto created under each 
21
 # subdir_count  * subdir_count directories will be auto created under each 
22
 # store_path (disk), value can be 1 to 256, default value is 256
22
 # store_path (disk), value can be 1 to 256, default value is 256
23
@@ -130,11 +130,11 @@ log_level=info
23
@@ -158,11 +158,11 @@ log_level = info
24
 
24
 
25
 #unix group name to run this program, 
25
 #unix group name to run this program, 
26
 #not set (empty) means run by the group of current user
26
 #not set (empty) means run by the group of current user
27
-run_by_group=
27
-run_by_group =
28
+run_by_group=_fastdfs
28
+run_by_group = _fastdfs
29
 
29
 
30
 #unix username to run this program,
30
 #unix username to run this program,
31
 #not set (empty) means run by current user
31
 #not set (empty) means run by current user
32
-run_by_user=
32
-run_by_user =
33
+run_by_user=_fastdfs
33
+run_by_user = _fastdfs
34
 
34
 
35
 # allow_hosts can ocur more than once, host can be hostname or ip address,
35
 # allow_hosts can ocur more than once, host can be hostname or ip address,
36
 # "*" (only one asterisk) means match all ip addresses
36
 # "*" (only one asterisk) means match all ip addresses
(-)ftp/fastdfs/files/patch-conf-tracker.conf (-10 / +10 lines)
Lines 1-15 Link Here
1
--- conf/tracker.conf.orig	2016-08-08 07:17:50 UTC
1
--- conf/tracker.conf.orig	2019-12-30 23:36:03 UTC
2
+++ conf/tracker.conf
2
+++ conf/tracker.conf
3
@@ -19,7 +19,7 @@ connect_timeout=30
3
@@ -20,7 +20,7 @@ connect_timeout = 5
4
 network_timeout=60
4
 network_timeout = 60
5
 
5
 
6
 # the base path to store data and log files
6
 # the base path to store data and log files
7
-base_path=/home/yuqing/fastdfs
7
-base_path = /home/yuqing/fastdfs
8
+base_path=/var/db/fastdfs/tracker
8
+base_path = /var/db/fastdfs/tracker
9
 
9
 
10
 # max concurrent connections this server supported
10
 # max concurrent connections this server support
11
 max_connections=256
11
 # you should set this parameter larger, eg. 10240
12
@@ -85,11 +85,11 @@ log_level=info
12
@@ -97,11 +97,11 @@ log_level = info
13
 
13
 
14
 #unix group name to run this program, 
14
 #unix group name to run this program, 
15
 #not set (empty) means run by the group of current user
15
 #not set (empty) means run by the group of current user
Lines 18-25 Link Here
18
 
18
 
19
 #unix username to run this program,
19
 #unix username to run this program,
20
 #not set (empty) means run by current user
20
 #not set (empty) means run by current user
21
-run_by_user=
21
-run_by_user =
22
+run_by_user=_fastdfs
22
+run_by_user = _fastdfs
23
 
23
 
24
 # allow_hosts can ocur more than once, host can be hostname or ip address,
24
 # allow_hosts can ocur more than once, host can be hostname or ip address,
25
 # "*" (only one asterisk) means match all ip addresses
25
 # "*" (only one asterisk) means match all ip addresses
(-)ftp/fastdfs/files/patch-make.sh (-56 / +26 lines)
Lines 1-56 Link Here
1
--- make.sh.orig	2016-08-08 07:17:50 UTC
1
--- make.sh.orig	2019-12-30 23:36:03 UTC
2
+++ make.sh
2
+++ make.sh
3
@@ -1,58 +1,19 @@
3
@@ -1,10 +1,10 @@
4
-tmp_src_filename=fdfs_check_bits.c
5
-cat <<EOF > $tmp_src_filename
6
-#include <stdio.h>
7
-#include <unistd.h>
8
-#include <fcntl.h>
9
-int main()
10
-{
11
-	printf("%d\n", (int)sizeof(long));
12
-	printf("%d\n", (int)sizeof(off_t));
13
-	return 0;
14
-}
15
-EOF
16
-
17
-gcc -D_FILE_OFFSET_BITS=64 -o a.out $tmp_src_filename
18
-output=$(./a.out)
19
 
20
-if [ -f /bin/expr ]; then
21
-  EXPR=/bin/expr
22
-else
23
-  EXPR=/usr/bin/expr
24
-fi
25
-
26
-count=0
27
-int_bytes=4
28
-off_bytes=8
29
-for col in $output; do
30
-    if [ $count -eq 0 ]; then
31
-        int_bytes=$col
32
-    else
33
-        off_bytes=$col
34
-    fi
35
-
36
-    count=$($EXPR $count + 1)
37
-done
38
-
39
-/bin/rm -f a.out $tmp_src_filename
40
-if [ "$int_bytes" -eq 8 ]; then
41
+if [ "$(/usr/bin/uname -m)" = "amd64"  ]; then
42
  OS_BITS=64
43
-else
44
- OS_BITS=32
45
-fi
46
-
47
-if [ "$off_bytes" -eq 8 ]; then
48
  OFF_BITS=64
49
 else
50
+ OS_BITS=32
51
  OFF_BITS=32
52
 fi
53
 
54
 ENABLE_STATIC_LIB=0
4
 ENABLE_STATIC_LIB=0
55
 ENABLE_SHARED_LIB=1
5
 ENABLE_SHARED_LIB=1
56
-TARGET_PREFIX=$DESTDIR/usr
6
-TARGET_PREFIX=$DESTDIR/usr
Lines 64-82 Link Here
64
 
14
 
65
 DEBUG_FLAG=1
15
 DEBUG_FLAG=1
66
 
16
 
67
@@ -74,7 +35,7 @@ if [ "$uname" = "Linux" ]; then
17
@@ -25,15 +25,7 @@ fi
18
 
19
 uname=$(uname)
20
 
21
-if [ "$OS_BITS" -eq 64 ]; then
22
-  if [ "$uname" = "Darwin" ]; then
23
-    LIB_VERSION=lib
24
-  else
25
-    LIB_VERSION=lib64
26
-  fi
27
-else
28
-  LIB_VERSION=lib
29
-fi
30
+LIB_VERSION=lib
31
 
32
 LIBS=''
33
 
34
@@ -46,7 +38,7 @@ if [ "$uname" = "Linux" ]; then
68
   fi
35
   fi
69
   CFLAGS="$CFLAGS"
36
   CFLAGS="$CFLAGS"
70
 elif [ "$uname" = "FreeBSD" ] || [ "$uname" = "Darwin" ]; then
37
 elif [ "$uname" = "FreeBSD" ] || [ "$uname" = "Darwin" ]; then
71
-  LIBS="$LIBS -L/usr/lib"
38
-  LIBS="$LIBS -L/usr/lib"
72
+  LIBS="$LIBS -L/usr/local/lib"
39
+  LIBS="$LIBS -L$PREFIX/lib"
73
   CFLAGS="$CFLAGS"
40
   CFLAGS="$CFLAGS"
74
   if [ "$uname" = "Darwin" ]; then
41
   if [ "$uname" = "Darwin" ]; then
75
     CFLAGS="$CFLAGS -DDARWIN"
42
     CFLAGS="$CFLAGS -DDARWIN"
76
@@ -180,26 +141,3 @@ perl -pi -e "s#\\\$\(LIBS\)#$LIBS#g" Mak
43
@@ -153,29 +145,3 @@ perl -pi -e "s#\\\$\(CFLAGS\)#$CFLAGS#g"
44
 perl -pi -e "s#\\\$\(LIBS\)#$LIBS#g" Makefile
77
 perl -pi -e "s#\\\$\(TARGET_PREFIX\)#$TARGET_PREFIX#g" Makefile
45
 perl -pi -e "s#\\\$\(TARGET_PREFIX\)#$TARGET_PREFIX#g" Makefile
78
 cd ..
46
 cd ..
79
 
47
-
80
-if [ "$1" = "install" ]; then
48
-if [ "$1" = "install" ]; then
81
-  cd ..
49
-  cd ..
82
-  cp -f restart.sh $TARGET_PREFIX/bin
50
-  cp -f restart.sh $TARGET_PREFIX/bin
Lines 90-95 Link Here
90
-        cp -f conf/storage.conf $TARGET_CONF_PATH/storage.conf.sample
58
-        cp -f conf/storage.conf $TARGET_CONF_PATH/storage.conf.sample
91
-        cp -f conf/client.conf $TARGET_CONF_PATH/client.conf.sample
59
-        cp -f conf/client.conf $TARGET_CONF_PATH/client.conf.sample
92
-        cp -f conf/storage_ids.conf $TARGET_CONF_PATH/storage_ids.conf.sample
60
-        cp -f conf/storage_ids.conf $TARGET_CONF_PATH/storage_ids.conf.sample
61
-        cp -f conf/http.conf $TARGET_CONF_PATH/http.conf.sample
62
-        cp -f conf/mime.types $TARGET_CONF_PATH/mime.types.sample
93
-      fi
63
-      fi
94
-      mkdir -p $TARGET_INIT_PATH
64
-      mkdir -p $TARGET_INIT_PATH
95
-      cp -f init.d/fdfs_trackerd $TARGET_INIT_PATH
65
-      cp -f init.d/fdfs_trackerd $TARGET_INIT_PATH
(-)ftp/fastdfs/files/patch-storage-Makefile.in (-3 / +3 lines)
Lines 1-4 Link Here
1
--- storage/Makefile.in.orig	2016-08-08 07:17:50 UTC
1
--- storage/Makefile.in.orig	2019-12-30 23:36:03 UTC
2
+++ storage/Makefile.in
2
+++ storage/Makefile.in
3
@@ -1,8 +1,8 @@
3
@@ -1,8 +1,8 @@
4
 .SUFFIXES: .c .o
4
 .SUFFIXES: .c .o
Lines 6-17 Link Here
6
 COMPILE = $(CC) $(CFLAGS)
6
 COMPILE = $(CC) $(CFLAGS)
7
-INC_PATH = -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
7
-INC_PATH = -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon
8
-LIB_PATH = $(LIBS)  -lfastcommon
8
-LIB_PATH = $(LIBS)  -lfastcommon
9
+INC_PATH = -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I$(LOCALBASE)/include/fastcommon
9
+INC_PATH = -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I$(LOCALBASE)/include
10
+LIB_PATH = $(LIBS) -L${LOCALBASE}/lib -lfastcommon
10
+LIB_PATH = $(LIBS) -L${LOCALBASE}/lib -lfastcommon
11
 TARGET_PATH = $(TARGET_PREFIX)/bin
11
 TARGET_PATH = $(TARGET_PREFIX)/bin
12
 CONFIG_PATH = $(TARGET_CONF_PATH)
12
 CONFIG_PATH = $(TARGET_CONF_PATH)
13
 
13
 
14
@@ -34,7 +34,7 @@ all: $(ALL_OBJS) $(ALL_PRGS)
14
@@ -35,7 +35,7 @@ all: $(ALL_OBJS) $(ALL_PRGS)
15
 install:
15
 install:
16
 	mkdir -p $(TARGET_PATH)
16
 	mkdir -p $(TARGET_PATH)
17
 	mkdir -p $(CONFIG_PATH)
17
 	mkdir -p $(CONFIG_PATH)
(-)ftp/fastdfs/files/patch-tracker-Makefile.in (-6 / +5 lines)
Lines 1-17 Link Here
1
--- tracker/Makefile.in.orig	2016-08-08 07:17:50 UTC
1
--- tracker/Makefile.in.orig	2019-12-30 23:36:03 UTC
2
+++ tracker/Makefile.in
2
+++ tracker/Makefile.in
3
@@ -1,8 +1,8 @@
3
@@ -1,8 +1,8 @@
4
 .SUFFIXES: .c .o
4
 .SUFFIXES: .c .o
5
 
5
 
6
 COMPILE = $(CC) $(CFLAGS)
6
 COMPILE = $(CC) $(CFLAGS)
7
-INC_PATH = -I../common -I/usr/include/fastcommon
7
-INC_PATH = -I../common -I/usr/local/include
8
-LIB_PATH = $(LIBS) -lfastcommon
8
-LIB_PATH = $(LIBS) -lfastcommon
9
+INC_PATH = -I../common -I$(LOCALBASE)/include/fastcommon
9
+INC_PATH = -I../common -I$(LOCALBASE)/include
10
+LIB_PATH = $(LIBS) -L${LOCALBASE}/lib -lfastcommon
10
+LIB_PATH = $(LIBS) -L${LOCALBASE}/lib -lfastcommon
11
 TARGET_PATH = $(TARGET_PREFIX)/bin
11
 TARGET_PATH = $(TARGET_PREFIX)/bin
12
 CONFIG_PATH = $(TARGET_CONF_PATH)
12
 CONFIG_PATH = $(TARGET_CONF_PATH)
13
 
13
 
14
@@ -26,7 +26,8 @@ all: $(ALL_OBJS) $(ALL_PRGS)
14
@@ -26,7 +26,7 @@ all: $(ALL_OBJS) $(ALL_PRGS)
15
 install:
15
 install:
16
 	mkdir -p $(TARGET_PATH)
16
 	mkdir -p $(TARGET_PATH)
17
 	mkdir -p $(CONFIG_PATH)
17
 	mkdir -p $(CONFIG_PATH)
Lines 18-23 Link Here
18
-	cp -f $(ALL_PRGS) $(TARGET_PATH)
18
-	cp -f $(ALL_PRGS) $(TARGET_PATH)
19
+	install -s $(ALL_PRGS) $(TARGET_PATH)
19
+	install -s $(ALL_PRGS) $(TARGET_PATH)
20
 	if [ ! -f $(CONFIG_PATH)/tracker.conf.sample ]; then cp -f ../conf/tracker.conf $(CONFIG_PATH)/tracker.conf.sample; fi
20
 	if [ ! -f $(CONFIG_PATH)/tracker.conf.sample ]; then cp -f ../conf/tracker.conf $(CONFIG_PATH)/tracker.conf.sample; fi
21
+	if [ ! -f $(CONFIG_PATH)/storage_ids.conf.sample ]; then cp -f ../conf/storage_ids.conf $(CONFIG_PATH)/storage_ids.conf.sample; fi
21
 	if [ ! -f $(CONFIG_PATH)/storage_ids.conf.sample ]; then cp -f ../conf/storage_ids.conf $(CONFIG_PATH)/storage_ids.conf.sample; fi
22
 clean:
22
 clean:
23
 	rm -f $(ALL_OBJS) $(ALL_PRGS)
(-)ftp/fastdfs/pkg-plist (+2 lines)
Lines 6-11 Link Here
6
bin/fdfs_download_file
6
bin/fdfs_download_file
7
bin/fdfs_file_info
7
bin/fdfs_file_info
8
bin/fdfs_monitor
8
bin/fdfs_monitor
9
bin/fdfs_regenerate_filename
9
bin/fdfs_status
10
bin/fdfs_status
10
bin/fdfs_storaged
11
bin/fdfs_storaged
11
bin/fdfs_test
12
bin/fdfs_test
Lines 23-28 Link Here
23
include/fastdfs/fdfs_define.h
24
include/fastdfs/fdfs_define.h
24
include/fastdfs/fdfs_global.h
25
include/fastdfs/fdfs_global.h
25
include/fastdfs/fdfs_http_shared.h
26
include/fastdfs/fdfs_http_shared.h
27
include/fastdfs/fdfs_server_id_func.h
26
include/fastdfs/fdfs_shared_func.h
28
include/fastdfs/fdfs_shared_func.h
27
include/fastdfs/mime_file_parser.h
29
include/fastdfs/mime_file_parser.h
28
include/fastdfs/storage_client.h
30
include/fastdfs/storage_client.h
(-)ftp/php-fastdfs/Makefile (-5 / +5 lines)
Lines 1-12 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	fastdfs
3
PORTNAME=	fastdfs
4
DISTVERSION=	5.0.11
4
DISTVERSION=	6.0.6
5
CATEGORIES=	ftp
5
CATEGORIES=	ftp
6
PKGNAMEPREFIX=	${PHP_PKGNAMEPREFIX}
6
PKGNAMEPREFIX=	${PHP_PKGNAMEPREFIX}
7
7
8
MAINTAINER=	daniel@blodan.se
8
MAINTAINER=	daniel@blodan.se
9
COMMENT?=	PHP module for accessing a FastDFS cluster
9
COMMENT=	PHP module for accessing a FastDFS cluster
10
10
11
LICENSE=	GPLv3+
11
LICENSE=	GPLv3+
12
12
Lines 13-25 Link Here
13
LIB_DEPENDS=	libfastcommon.so:devel/libfastcommon \
13
LIB_DEPENDS=	libfastcommon.so:devel/libfastcommon \
14
		libfdfsclient.so:ftp/fastdfs
14
		libfdfsclient.so:ftp/fastdfs
15
15
16
USES=		php:ext
17
16
USE_GITHUB=	yes
18
USE_GITHUB=	yes
17
GH_ACCOUNT=	happyfish100
19
GH_ACCOUNT=	happyfish100
18
GH_PROJECT=	fastdfs
20
GH_PROJECT=	fastdfs
19
GH_TAGNAME=	1e50b4f
21
GH_TAGNAME=	V6.06
20
22
21
USES=			php:ext
22
23
WRKSRC_SUBDIR=	php_client
23
WRKSRC_SUBDIR=	php_client
24
CONFIGURE_ENV=	ROOT=${LOCALBASE}
24
CONFIGURE_ENV=	ROOT=${LOCALBASE}
25
25
(-)ftp/php-fastdfs/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1502819567
1
TIMESTAMP = 1591016269
2
SHA256 (happyfish100-fastdfs-5.0.11-1e50b4f_GH0.tar.gz) = 42ef67951c55fb416282cd20389dde5709016913debbb87465b9b744fa3dacf9
2
SHA256 (happyfish100-fastdfs-6.0.6-V6.06_GH0.tar.gz) = d724266719235c7901bf3281134903dfdbc925c44b4c4a9f7fb451ae916c80e1
3
SIZE (happyfish100-fastdfs-5.0.11-1e50b4f_GH0.tar.gz) = 336996
3
SIZE (happyfish100-fastdfs-6.0.6-V6.06_GH0.tar.gz) = 809328
(-)ftp/php-fastdfs/files/patch-config.m4 (+11 lines)
Line 0 Link Here
1
--- config.m4.orig	2019-12-30 23:36:03 UTC
2
+++ config.m4
3
@@ -10,7 +10,7 @@ if test "$PHP_FASTDFS_CLIENT" != "no"; t
4
 	ROOT=/usr
5
   fi
6
 
7
-  PHP_ADD_INCLUDE($ROOT/local/include)
8
+  PHP_ADD_INCLUDE($ROOT/include)
9
 
10
   PHP_ADD_LIBRARY_WITH_PATH(fastcommon, $ROOT/lib, FASTDFS_CLIENT_SHARED_LIBADD)
11
   PHP_ADD_LIBRARY_WITH_PATH(fdfsclient, $ROOT/lib, FASTDFS_CLIENT_SHARED_LIBADD)

Return to bug 246912