View | Details | Raw Unified | Return to bug 197980
Collapse All | Expand All

(-)Makefile (-6 / +7 lines)
Lines 1-8 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	seafile
3
PORTNAME=	seafile
4
PORTVERSION=	3.1.4
4
PORTVERSION=	4.0.6
5
PORTREVISION=	3
5
PORTREVISION=	4
6
CATEGORIES=	net-mgmt devel
6
CATEGORIES=	net-mgmt devel
7
7
8
MAINTAINER=	yan_jingfeng@yahoo.com
8
MAINTAINER=	yan_jingfeng@yahoo.com
Lines 16-21 Link Here
16
		libzdb.so:${PORTSDIR}/databases/libzdb \
16
		libzdb.so:${PORTSDIR}/databases/libzdb \
17
		libcrypto.so:${PORTSDIR}/security/openssl \
17
		libcrypto.so:${PORTSDIR}/security/openssl \
18
		libarchive.so.13:${PORTSDIR}/archivers/libarchive \
18
		libarchive.so.13:${PORTSDIR}/archivers/libarchive \
19
		libcurl.so:${PORTSDIR}/ftp/curl \
19
		libinotify.so:${PORTSDIR}/devel/libinotify \
20
		libinotify.so:${PORTSDIR}/devel/libinotify \
20
		libccnet.so:${PORTSDIR}/net-mgmt/ccnet
21
		libccnet.so:${PORTSDIR}/net-mgmt/ccnet
21
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}eggtestinfo>0:${PORTSDIR}/devel/py-eggtestinfo \
22
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}eggtestinfo>0:${PORTSDIR}/devel/py-eggtestinfo \
Lines 25-32 Link Here
25
26
26
USE_GITHUB=	yes
27
USE_GITHUB=	yes
27
GH_ACCOUNT=	haiwen
28
GH_ACCOUNT=	haiwen
28
GH_TAGNAME=	v3.1.4
29
GH_TAGNAME=	v${PORTVERSION}-server
29
GH_COMMIT=	ac58109
30
GH_COMMIT=	adf9a87
30
31
31
USES=		autoreconf iconv libtool pathfix pkgconfig python:2 shebangfix
32
USES=		autoreconf iconv libtool pathfix pkgconfig python:2 shebangfix
32
SHEBANG_FILES=	scripts/*.sh scripts/upgrade/*.sh
33
SHEBANG_FILES=	scripts/*.sh scripts/upgrade/*.sh
Lines 78-85 Link Here
78
	@${MKDIR} ${STAGEDIR}${PREFIX}/${SEABIN} ${STAGEDIR}${PREFIX}/${SEALIB}\
79
	@${MKDIR} ${STAGEDIR}${PREFIX}/${SEABIN} ${STAGEDIR}${PREFIX}/${SEALIB}\
79
		${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/seafile/share/doc/seafile \
80
		${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/seafile/share/doc/seafile \
80
		${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/upgrade
81
		${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/upgrade
81
.for SERVPROG in fileserver seaf-fsck seafserv-gc seaf-fuse seaf-migrate \
82
.for SERVPROG in seaf-fsck seafserv-gc seaf-fuse seaf-migrate \
82
	seaf-server seaf-server-init seafile-controller seafserv-tool
83
	seaf-server seaf-server-init seafile-controller
83
	if [ -e "${STAGEDIR}${PREFIX}/bin/${SERVPROG}" ]; then \
84
	if [ -e "${STAGEDIR}${PREFIX}/bin/${SERVPROG}" ]; then \
84
		${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/${SERVPROG} ${STAGEDIR}${PREFIX}/${SEABIN}; \
85
		${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/${SERVPROG} ${STAGEDIR}${PREFIX}/${SEABIN}; \
85
		${RM} ${STAGEDIR}${PREFIX}/bin/${SERVPROG}; \
86
		${RM} ${STAGEDIR}${PREFIX}/bin/${SERVPROG}; \
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (seafile-3.1.4.tar.gz) = 0ef5d6947ebc74ce5c37390d74b4c1ad7f0da7359f0c8d263963dd04dccf7306
1
SHA256 (seafile-4.0.6.tar.gz) = af1b568905a85ba2da06593f93a70226526ad310320c071bd70356fb77106bc9
2
SIZE (seafile-3.1.4.tar.gz) = 1047684
2
SIZE (seafile-4.0.6.tar.gz) = 1082450
(-)files/patch-common_obj-backend-fs.c (-2 / +2 lines)
Lines 1-5 Link Here
1
--- common/obj-backend-fs.c.orig	2014-08-30 10:00:33.108962525 -0400
1
--- common/obj-backend-fs.c.orig	2015-01-28 02:14:45.000000000 -0500
2
+++ common/obj-backend-fs.c	2014-08-30 10:03:02.405000733 -0400
2
+++ common/obj-backend-fs.c	2015-01-28 02:15:58.000000000 -0500
3
@@ -101,7 +101,7 @@
3
@@ -101,7 +101,7 @@
4
 static int
4
 static int
5
 fsync_obj_contents (int fd)
5
 fsync_obj_contents (int fd)
(-)files/patch-configure.ac (-35 / +82 lines)
Lines 1-70 Link Here
1
--- configure.ac.orig	2014-08-05 01:28:35.000000000 -0400
1
--- configure.ac.orig	2015-01-21 22:45:28.000000000 -0500
2
+++ configure.ac	2014-11-22 13:34:26.927863521 -0500
2
+++ configure.ac	2015-01-28 14:01:20.000000000 -0500
3
@@ -88,7 +88,7 @@
3
@@ -50,8 +50,16 @@
4
       [compile_riak=$enableval],[compile_riak="no"])
4
   AC_MSG_RESULT(no)
5
 fi
5
 
6
 
6
    AC_ARG_ENABLE(fuse, AC_HELP_STRING([--enable-fuse], [enable fuse virtual file system]),
7
+AC_MSG_CHECKING(for BSD)
7
-      [compile_fuse=$enableval],[compile_fuse="yes"])
8
+if test `uname | grep -e BSD -e DragonFly | wc -l` = "1"; then
8
+      [compile_fuse=$enableval],[compile_fuse="no"])
9
+  bbsd=true
10
+  AC_MSG_RESULT(compile in BSD)
11
+else
12
+  AC_MSG_RESULT(no)
13
+fi
14
+
15
 AC_MSG_CHECKING(for Linux)
16
-if test "$bmac" != "true" -a "$bwin32" != "true"; then
17
+if test "$bmac" != "true" -a "$bwin32" != "true" -a "$bbsd" != "true"; then
18
   blinux=true
19
   AC_MSG_RESULT(compile in linux)
20
 else
21
@@ -93,6 +101,11 @@
22
       [compile_fuse=$enableval],[compile_fuse="yes"])
9
 fi
23
 fi
10
 
24
 
25
+if test "$bbsd" = true; then
26
+   AC_ARG_ENABLE(fuse, AC_HELP_STRING([--enable-fuse], [enable fuse virtual file system]),
27
+      [compile_fuse=$enableval],[compile_fuse="no"])
28
+fi
29
+
11
 AC_ARG_ENABLE(client, AC_HELP_STRING([--enable-client], [enable client]),
30
 AC_ARG_ENABLE(client, AC_HELP_STRING([--enable-client], [enable client]),
12
@@ -199,25 +199,28 @@
31
    [compile_client=$enableval],[compile_client="yes"])
32
 
33
@@ -148,6 +161,7 @@
34
 
35
 AM_CONDITIONAL([WIN32], [test "$bwin32" = "true"])
36
 AM_CONDITIONAL([MACOS], [test "$bmac" = "true"])
37
+AM_CONDITIONAL([BSD], [test "$bbsd" = "true"])
38
 AM_CONDITIONAL([LINUX], [test "$blinux" = "true"])
39
 
40
 
41
@@ -192,6 +206,9 @@
42
   LIB_PSAPI=-lpsapi
43
   LIB_MAC=
44
   MSVC_CFLAGS="-D__MSVCRT__ -D__MSVCRT_VERSION__=0x0601"
45
+  ZLIB_LIBS=
46
+  LIB_INOTIFY=
47
+  LIB_KVM=
48
 elif test "$bmac" = true ; then
49
   LIB_WS32=
13
   LIB_GDI32=
50
   LIB_GDI32=
14
   LIB_RT=
51
@@ -204,6 +221,24 @@
15
   LIB_INTL=
16
-  LIB_RESOLV=-lresolv
17
+  LIB_RESOLV=
18
   LIB_UUID=-luuid
19
   LIB_IPHLPAPI=
20
   LIB_SHELL32=
21
   LIB_PSAPI=
52
   LIB_PSAPI=
22
   MSVC_CFLAGS=
53
   MSVC_CFLAGS=
23
   LIB_MAC="-framework CoreServices"
54
   LIB_MAC="-framework CoreServices"
55
+  ZLIB_LIBS=
56
+  LIB_INOTIFY=
57
+  LIB_KVM=
58
+elif test "$bbsd" = true ; then
59
+  LIB_WS32=
60
+  LIB_GDI32=
61
+  LIB_RT=
62
+  LIB_INTL=
63
+  LIB_RESOLV=
64
+  LIB_UUID=-luuid
65
+  LIB_IPHLPAPI=
66
+  LIB_SHELL32=
67
+  LIB_PSAPI=
68
+  LIB_MAC=
69
+  MSVC_CFLAGS=
24
+  ZLIB_LIBS=-lz
70
+  ZLIB_LIBS=-lz
71
+  LIB_INOTIFY=-linotify
72
+  LIB_KVM=-lkvm
25
 else
73
 else
26
   LIB_WS32=
74
   LIB_WS32=
27
   LIB_GDI32=
75
   LIB_GDI32=
28
   LIB_RT=
76
@@ -216,6 +251,9 @@
29
   LIB_INTL=
30
-  LIB_RESOLV=-lresolv
31
+  LIB_RESOLV=
32
   LIB_UUID=-luuid
33
   LIB_IPHLPAPI=
34
   LIB_SHELL32=
35
   LIB_PSAPI=
77
   LIB_PSAPI=
36
   LIB_MAC=
78
   LIB_MAC=
37
   MSVC_CFLAGS=
79
   MSVC_CFLAGS=
38
+  ZLIB_LIBS=-lz 
80
+  ZLIB_LIBS=-lz
39
+  LIB_INOTIFY=-linotify
81
+  LIB_INOTIFY=-linotify
82
+  LIB_KVM=
40
 fi
83
 fi
41
 
84
 
42
 AC_SUBST(LIB_WS32)
85
 AC_SUBST(LIB_WS32)
43
@@ -230,6 +233,8 @@
86
@@ -228,6 +266,9 @@
44
 AC_SUBST(LIB_SHELL32)
87
 AC_SUBST(LIB_SHELL32)
45
 AC_SUBST(LIB_PSAPI)
88
 AC_SUBST(LIB_PSAPI)
46
 AC_SUBST(LIB_MAC)
89
 AC_SUBST(LIB_MAC)
47
+AC_SUBST(ZLIB_LIBS)
90
+AC_SUBST(ZLIB_LIBS)
48
+AC_SUBST(LIB_INOTIFY)
91
+AC_SUBST(LIB_INOTIFY)
92
+AC_SUBST(LIB_KVM)
49
 AC_SUBST(MSVC_CFLAGS)
93
 AC_SUBST(MSVC_CFLAGS)
50
 
94
 
51
 
95
 
52
@@ -242,7 +247,6 @@
96
@@ -240,7 +281,9 @@
53
 #LIBNAUTILUS_EXTENSION_REQUIRED=2.30.1
97
 #LIBNAUTILUS_EXTENSION_REQUIRED=2.30.1
54
 CURL_REQUIRED=7.17
98
 CURL_REQUIRED=7.17
55
 FUSE_REQUIRED=2.8.6
99
 FUSE_REQUIRED=2.7.3
56
-ZLIB_REQUIRED=1.2.0
100
+if test "$blinux" = true ; then
101
 ZLIB_REQUIRED=1.2.0
102
+fi
57
 
103
 
58
 PKG_CHECK_MODULES(GLIB2, [glib-2.0 >= $GLIB_REQUIRED])
104
 PKG_CHECK_MODULES(SSL, [openssl])
59
 AC_SUBST(GLIB2_CFLAGS)
105
 AC_SUBST(SSL_CFLAGS)
60
@@ -268,10 +272,6 @@
106
@@ -270,9 +313,11 @@
61
 AC_SUBST(LIBEVENT_CFLAGS)
107
 AC_SUBST(LIBEVENT_CFLAGS)
62
 AC_SUBST(LIBEVENT_LIBS)
108
 AC_SUBST(LIBEVENT_LIBS)
63
 
109
 
64
-PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_REQUIRED])
110
+if test "$blinux" = true ; then
65
-AC_SUBST(ZLIB_CFLAGS)
111
 PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_REQUIRED])
66
-AC_SUBST(ZLIB_LIBS)
112
 AC_SUBST(ZLIB_CFLAGS)
67
-
113
 AC_SUBST(ZLIB_LIBS)
114
+fi
115
 
68
 if test x${compile_python} = xyes; then
116
 if test x${compile_python} = xyes; then
69
    AM_PATH_PYTHON([2.6])
117
    AM_PATH_PYTHON([2.6])
70
 
(-)files/patch-controller_seafile-controller.c (-17 / +13 lines)
Lines 1-6 Link Here
1
--- controller/seafile-controller.c.orig	2014-08-05 01:28:35.000000000 -0400
1
--- controller/seafile-controller.c.orig	2015-01-28 13:03:24.000000000 -0500
2
+++ controller/seafile-controller.c	2014-11-22 22:00:58.614945337 -0500
2
+++ controller/seafile-controller.c	2015-01-28 13:15:05.000000000 -0500
3
@@ -18,10 +18,23 @@
3
@@ -17,6 +17,19 @@
4
 #include "log.h"
4
 #include "log.h"
5
 #include "seafile-controller.h"
5
 #include "seafile-controller.h"
6
 
6
 
Lines 14-30 Link Here
14
+#define WITH_PROC_FS g_file_test("/proc/curproc", G_FILE_TEST_EXISTS)
14
+#define WITH_PROC_FS g_file_test("/proc/curproc", G_FILE_TEST_EXISTS)
15
+#endif
15
+#endif
16
+
16
+
17
+static char *command_name = NULL;
17
+#endif
18
+#endif
18
+
19
+
19
 #define CHECK_PROCESS_INTERVAL 10        /* every 10 seconds */
20
 #define CHECK_PROCESS_INTERVAL 10        /* every 10 seconds */
20
 
21
 
21
 SeafileController *ctl;
22
 SeafileController *ctl;
22
 
23
@@ -247,7 +260,20 @@
23
+static char *command_name = NULL;
24
 static char *controller_pidfile = NULL;
25
 
26
 char *bin_dir = NULL;
27
@@ -273,7 +286,20 @@
28
 init_seafile_path ()
24
 init_seafile_path ()
29
 {
25
 {
30
     GError *error = NULL;
26
     GError *error = NULL;
Lines 33-51 Link Here
33
+#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
29
+#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
34
+    /*
30
+    /*
35
+     * seafile.sh starts the process using abs path
31
+     * seafile.sh starts the process using abs path
36
+     */ 
32
+     */
37
+    char executable[_POSIX_PATH_MAX];
33
+    char executable[_POSIX_PATH_MAX];
38
+    memset(executable, 0, _POSIX_PATH_MAX);
34
+    memset(executable, 0, _POSIX_PATH_MAX);
39
+    char * rc = realpath(command_name, executable);
35
+    char * rc = realpath(command_name, executable);
40
+    if (!rc) {
36
+    if (!rc) {
41
+        seaf_warning ("failed to readpath: %s\n", executable);
37
+        seaf_warning ("failed to readpath: %s\n", executable);
42
+	return;
38
+        return;
43
+    }
39
+    }
44
+#endif
40
+#endif
45
     char *tmp = NULL;
41
     char *tmp = NULL;
46
     if (error != NULL) {
42
     if (error != NULL) {
47
         seaf_warning ("failed to readlink: %s\n", error->message);
43
         seaf_warning ("failed to readlink: %s\n", error->message);
48
@@ -287,7 +313,9 @@
44
@@ -261,7 +287,9 @@
49
 
45
 
50
     topdir = g_path_get_dirname (installpath);
46
     topdir = g_path_get_dirname (installpath);
51
 
47
 
Lines 55-61 Link Here
55
     g_free (tmp);
51
     g_free (tmp);
56
 }
52
 }
57
 
53
 
58
@@ -427,12 +455,41 @@
54
@@ -401,11 +429,40 @@
59
         return FALSE;
55
         return FALSE;
60
     } else {
56
     } else {
61
         char buf[256];
57
         char buf[256];
Lines 73-79 Link Here
73
             return FALSE;
69
             return FALSE;
74
         } else {
70
         } else {
75
             return TRUE;
71
             return TRUE;
76
-        }
77
+	}
72
+	}
78
+
73
+
79
+	} else {
74
+	} else {
Lines 94-108 Link Here
94
+#else
89
+#else
95
+	return FALSE;
90
+	return FALSE;
96
+#endif
91
+#endif
97
+	}
92
         }
98
     }
93
     }
99
 }
94
 }
100
 
95
@@ -852,6 +909,9 @@
101
@@ -892,6 +949,7 @@
102
         exit (1);
96
         exit (1);
103
     }
97
     }
104
 
98
 
99
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
105
+    command_name = argv[0];
100
+    command_name = argv[0];
101
+#endif
106
     char *config_dir = DEFAULT_CONFIG_DIR;
102
     char *config_dir = DEFAULT_CONFIG_DIR;
107
     char *seafile_dir = NULL;
103
     char *seafile_dir = NULL;
108
     char *logdir = NULL;
104
     char *logdir = NULL;
(-)files/patch-daemon_Makefile.am (-7 / +18 lines)
Lines 1-12 Link Here
1
--- daemon/Makefile.am.orig	2014-08-05 01:28:35.000000000 -0400
1
--- daemon/Makefile.am.orig	2015-01-28 13:48:56.000000000 -0500
2
+++ daemon/Makefile.am	2014-08-30 01:44:16.911202899 -0400
2
+++ daemon/Makefile.am	2015-01-28 13:55:22.000000000 -0500
3
@@ -125,7 +125,8 @@
3
@@ -65,6 +65,10 @@
4
 	@GLIB2_LIBS@  @GOBJECT_LIBS@ -lssl @LIB_RT@ @LIB_UUID@ -lsqlite3 -levent \
4
 wt_monitor_src = wt-monitor.c wt-monitor-linux.c wt-monitor-structs.c
5
 endif
6
 
7
+if BSD
8
+wt_monitor_src = wt-monitor.c wt-monitor-linux.c wt-monitor-structs.c
9
+endif
10
+
11
 if WIN32
12
 wt_monitor_src = wt-monitor.c wt-monitor-win32.c wt-monitor-structs.c
13
 endif
14
@@ -127,7 +131,8 @@
15
 	@GLIB2_LIBS@  @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ \
5
 	$(top_builddir)/common/cdc/libcdc.la \
16
 	$(top_builddir)/common/cdc/libcdc.la \
6
 	$(top_builddir)/common/index/libindex.la ${LIB_WS32} \
17
 	$(top_builddir)/common/index/libindex.la ${LIB_WS32} \
7
-	@SEARPC_LIBS@ @CCNET_LIBS@ @GNOME_KEYRING_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ @ZLIB_LIBS@
18
-	@SEARPC_LIBS@ @CCNET_LIBS@ @GNOME_KEYRING_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ @ZLIB_LIBS@ @CURL_LIBS@
8
+	@SEARPC_LIBS@ @CCNET_LIBS@ @GNOME_KEYRING_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ \
19
+	@SEARPC_LIBS@ @CCNET_LIBS@ @GNOME_KEYRING_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ @ZLIB_LIBS@ \
9
+	@ZLIB_LIBS@ @LIB_INOTIFY@
20
+	@CURL_LIBS@ @LIB_INOTIFY@
10
 
21
 
11
 seaf_daemon_LDFLAGS = @STATIC_COMPILE@ @CONSOLE@
22
 seaf_daemon_LDFLAGS = @STATIC_COMPILE@ @CONSOLE@
12
 
23
 
(-)files/patch-daemon_repo-mgr.c (-15 / +18 lines)
Lines 1-6 Link Here
1
--- daemon/repo-mgr.c.orig	2014-08-30 02:03:22.367472662 -0400
1
--- daemon/repo-mgr.c.orig	2015-01-28 02:18:05.000000000 -0500
2
+++ daemon/repo-mgr.c	2014-08-30 02:10:42.071207749 -0400
2
+++ daemon/repo-mgr.c	2015-01-28 02:22:10.000000000 -0500
3
@@ -1720,12 +1720,12 @@
3
@@ -2514,13 +2514,13 @@
4
     gboolean force_conflict = FALSE;
4
     gboolean force_conflict = FALSE;
5
     gboolean update_mode_only = FALSE;
5
     gboolean update_mode_only = FALSE;
6
 
6
 
Lines 10-22 Link Here
10
+#else
10
+#else
11
     path = build_case_conflict_free_path (worktree, name,
11
     path = build_case_conflict_free_path (worktree, name,
12
                                           conflict_hash, no_conflict_hash,
12
                                           conflict_hash, no_conflict_hash,
13
                                           &case_conflict);
13
                                           &case_conflict,
14
                                           FALSE);
14
-#else
15
-#else
15
-    path = build_checkout_path (worktree, name, strlen(name));
16
-    path = build_checkout_path (worktree, name, strlen(name));
16
 #endif
17
 #endif
17
 
18
 
18
     if (!path)
19
     if (!path)
19
@@ -1858,12 +1858,12 @@
20
@@ -2675,13 +2675,13 @@
20
     char *path;
21
     char *path;
21
     gboolean case_conflict = FALSE;
22
     gboolean case_conflict = FALSE;
22
 
23
 
Lines 26-50 Link Here
26
+#else
27
+#else
27
     path = build_case_conflict_free_path (worktree, name,
28
     path = build_case_conflict_free_path (worktree, name,
28
                                           conflict_hash, no_conflict_hash,
29
                                           conflict_hash, no_conflict_hash,
29
                                           &case_conflict);
30
                                           &case_conflict,
31
                                           FALSE);
30
-#else
32
-#else
31
-    path = build_checkout_path (worktree, name, strlen(name));
33
-    path = build_checkout_path (worktree, name, strlen(name));
32
 #endif
34
 #endif
33
 
35
 
34
     if (!path)
36
     if (!path)
35
@@ -2088,12 +2088,12 @@
37
@@ -2839,13 +2839,13 @@
38
     old_path = g_build_filename (worktree, de->name, NULL);
36
 
39
 
37
             char *new_path;
40
     if (seaf_util_exists (old_path)) {
38
             gboolean case_conflict;
39
-#ifndef __linux__
41
-#ifndef __linux__
40
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
42
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
41
+            new_path = build_checkout_path (worktree, de->new_name, strlen(de->new_name));
43
+        new_path = build_checkout_path (worktree, de->new_name, strlen(de->new_name));
42
+#else
44
+#else
43
             new_path = build_case_conflict_free_path (worktree, de->new_name,
45
         new_path = build_case_conflict_free_path (worktree, de->new_name,
44
                                                       conflict_hash, no_conflict_hash,
46
                                                   conflict_hash, no_conflict_hash,
45
                                                       &case_conflict);
47
                                                   &case_conflict,
48
                                                   TRUE);
46
-#else
49
-#else
47
-            new_path = build_checkout_path (worktree, de->new_name, strlen(de->new_name));
50
-        new_path = build_checkout_path (worktree, de->new_name, strlen(de->new_name));
48
 #endif
51
 #endif
49
 
52
 
50
             if (g_file_test (old_path, G_FILE_TEST_EXISTS) &&
53
         if (seaf_util_rename (old_path, new_path) < 0) {
(-)files/patch-daemon_vc-utils.c (-6 / +7 lines)
Lines 1-6 Link Here
1
--- daemon/vc-utils.c.orig	2014-06-05 02:25:50.000000000 -0400
1
--- daemon/vc-utils.c.orig	2015-01-28 02:24:19.000000000 -0500
2
+++ daemon/vc-utils.c	2014-07-27 01:10:00.000000000 -0400
2
+++ daemon/vc-utils.c	2015-01-28 02:30:05.000000000 -0500
3
@@ -489,7 +489,7 @@
3
@@ -664,7 +664,7 @@
4
 
4
 
5
 #endif  /* defined WIN32 || defined __APPLE__ */
5
 #endif  /* defined WIN32 || defined __APPLE__ */
6
 
6
 
Lines 7-15 Link Here
7
-#ifdef __linux__
7
-#ifdef __linux__
8
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
8
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
9
 
9
 
10
 static char *
10
 char *
11
 build_checkout_path (const char *worktree, const char *ce_name, int len)
11
 build_checkout_path (const char *worktree, const char *ce_name, int len)
12
@@ -549,12 +549,12 @@
12
@@ -724,13 +724,13 @@
13
     gboolean force_conflict = FALSE;
13
     gboolean force_conflict = FALSE;
14
 
14
 
15
     path_in = g_build_path ("/", o->base, ce->name, NULL);
15
     path_in = g_build_path ("/", o->base, ce->name, NULL);
Lines 19-25 Link Here
19
+#else
19
+#else
20
     path = build_case_conflict_free_path (o->base, ce->name,
20
     path = build_case_conflict_free_path (o->base, ce->name,
21
                                           conflict_hash, no_conflict_hash,
21
                                           conflict_hash, no_conflict_hash,
22
                                           &case_conflict);
22
                                           &case_conflict,
23
                                           FALSE);
23
-#else
24
-#else
24
-    path = build_checkout_path (o->base, ce->name, ce_namelen(ce));
25
-    path = build_checkout_path (o->base, ce->name, ce_namelen(ce));
25
 #endif
26
 #endif
(-)files/patch-lib_Makfile.am (-16 / +24 lines)
Lines 1-21 Link Here
1
--- lib/Makefile.am.orig	2014-11-11 10:47:33.631976054 -0500
1
--- lib/Makefile.am.orig	2015-01-28 13:44:26.000000000 -0500
2
+++ lib/Makefile.am	2014-11-11 11:40:14.030311321 -0500
2
+++ lib/Makefile.am	2015-01-28 13:48:00.000000000 -0500
3
@@ -55,7 +55,7 @@
3
@@ -53,6 +53,7 @@
4
 libseafile_common_la_LDFLAGS = -no-undefined
4
 libseafile_common_la_LDFLAGS = -no-undefined
5
 libseafile_common_la_LIBADD = @GLIB2_LIBS@  @GOBJECT_LIBS@ -lssl -lcrypto @LIB_GDI32@ \
5
 libseafile_common_la_LIBADD = @GLIB2_LIBS@  @GOBJECT_LIBS@ @SSL_LIBS@ -lcrypto @LIB_GDI32@ \
6
 				     @LIB_UUID@ @LIB_WS32@ @LIB_PSAPI@ -lsqlite3 \
6
 				     @LIB_UUID@ @LIB_WS32@ @LIB_PSAPI@ -lsqlite3 \
7
-					 -levent @SEARPC_LIBS@ @LIB_SHELL32@ \
7
+				@LIB_KVM@ \
8
+					 -levent -lkvm @SEARPC_LIBS@ @LIB_SHELL32@ \
8
 					 @LIBEVENT_LIBS@ @SEARPC_LIBS@ @LIB_SHELL32@ \
9
 	@ZLIB_LIBS@
9
 	@ZLIB_LIBS@
10
 
10
 
11
 searpc_gen = searpc-signature.h searpc-marshal.h
11
@@ -74,7 +75,7 @@
12
@@ -72,8 +72,4 @@
12
 	rm -f ${seafile_object_gen}
13
 	rm -f $(top_srcdir)/lib/rpc_table.pyc
13
 	@rm -f vala.tmp
14
 	@touch vala.tmp
15
-	valac -C --pkg posix $^
16
+	valac -C --pkg posix ${seafile_object_define}
17
 	@mv -f vala.tmp $@
14
 
18
 
15
 install-data-local:
19
 ${seafile_object_gen}: vala.stamp
16
-if MACOS
20
@@ -90,5 +91,9 @@
17
-	sed -i '' -e "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
21
 if MACOS
18
-else
22
 	sed -i '' -e "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
19
-	${SED} -i "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
23
 else
20
-endif
24
+if BSD
21
+	${SED} -i '' "s|(DESTDIR)|${PREFIX}|g" $(pcfiles)
25
+	sed -i '' "s|(DESTDIR)|${PREFIX}|g" $(pcfiles)
26
+else
27
 	${SED} -i "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles)
28
 endif
29
+endif
(-)files/patch-lib_libseafile.pc.in (-15 lines)
Lines 1-15 Link Here
1
--- lib/libseafile.pc.in.orig	2014-09-03 23:00:38.555065334 -0400
2
+++ lib/libseafile.pc.in	2014-09-03 23:01:13.715468049 -0400
3
@@ -3,9 +3,9 @@
4
 libdir=@libdir@
5
 includedir=@includedir@
6
 
7
-Name: libccnet
8
+Name: libseafile
9
 Description: Client library for accessing seafile service.
10
 Version: @VERSION@
11
 Libs: -L${libdir} -lseafile @SEARPC_LIBS@
12
 Cflags: -I${includedir} @SEARPC_CFLAGS@
13
-Requires: gobject-2.0 glib-2.0
14
\ No newline at end of file
15
+Requires: gobject-2.0 glib-2.0
(-)files/patch-lib_net.c (-4 / +7 lines)
Lines 1-11 Link Here
1
--- lib/net.c.orig	2014-09-02 21:09:59.708953392 -0400
1
--- lib/net.c.orig	2015-01-28 00:52:56.000000000 -0500
2
+++ lib/net.c	2014-09-02 21:10:22.959507209 -0400
2
+++ lib/net.c	2015-01-28 00:55:31.000000000 -0500
3
@@ -157,7 +157,7 @@
3
@@ -157,7 +157,11 @@
4
 
4
 
5
     snprintf (buf, sizeof(buf), "%d", port);
5
     snprintf (buf, sizeof(buf), "%d", port);
6
 
6
 
7
-    if ( (n = getaddrinfo(NULL, buf, &hints, &res) ) != 0) {
7
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
8
+    if ( (n = getaddrinfo("0.0.0.0", buf, &hints, &res) ) != 0) {
8
+    if ( (n = getaddrinfo("0.0.0.0", buf, &hints, &res) ) != 0) {
9
+#else
10
     if ( (n = getaddrinfo(NULL, buf, &hints, &res) ) != 0) {
11
+#endif
9
         ccnet_warning ("getaddrinfo fails: %s\n", gai_strerror(n));
12
         ccnet_warning ("getaddrinfo fails: %s\n", gai_strerror(n));
10
         return -1;
13
         return -1;
11
     }
14
     }
(-)files/patch-lib_utils.c (-12 / +12 lines)
Lines 1-10 Link Here
1
--- lib/utils.c.orig	2014-08-05 05:28:35 UTC
1
--- lib/utils.c.orig	2015-01-28 01:03:42.000000000 -0500
2
+++ lib/utils.c
2
+++ lib/utils.c	2015-01-28 01:26:32.000000000 -0500
3
@@ -46,6 +46,15 @@
3
@@ -56,6 +56,16 @@
4
 
4
 
5
 #include <zlib.h>
5
 #include <zlib.h>
6
 
6
 
7
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
7
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
8
+#include <netinet/in.h>
8
+#include <stdlib.h>
9
+#include <stdlib.h>
9
+#include <kvm.h>
10
+#include <kvm.h>
10
+#include <paths.h>
11
+#include <paths.h>
Lines 16-22 Link Here
16
 extern int inet_pton(int af, const char *src, void *dst);
17
 extern int inet_pton(int af, const char *src, void *dst);
17
 
18
 
18
 
19
 
19
@@ -1756,14 +1765,19 @@ wchar_from_utf8 (const char *utf8)
20
@@ -2097,14 +2107,19 @@
20
 
21
 
21
 #endif  /* ifdef WIN32 */
22
 #endif  /* ifdef WIN32 */
22
 
23
 
Lines 27-43 Link Here
27
 {
28
 {
28
     char path[512];
29
     char path[512];
29
     /* fisrst construct a path like /proc/123/exe */
30
     /* fisrst construct a path like /proc/123/exe */
30
+#ifdef __linux__
31
+#if defined(__linux__)
31
     if (sprintf (path, "/proc/%s/exe", dir->d_name) < 0) {
32
     if (sprintf (path, "/proc/%s/exe", dir->d_name) < 0) {
32
+#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
33
+#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
33
+    if (sprintf (path, "/proc/%s/file", dir->d_name) < 0) {
34
+    if (sprintf (path, "/proc/%s/file", dir->d_name) < 0) {
34
+#else
35
+#else
35
+    if (TRUE) {
36
+    if (1) {
36
+#endif
37
+#endif
37
         return -1;
38
         return -1;
38
     }
39
     }
39
 
40
 
40
@@ -1787,7 +1801,8 @@ find_process_in_dirent(struct dirent *di
41
@@ -2128,7 +2143,8 @@
41
 }
42
 }
42
 
43
 
43
 /* read the /proc fs to determine whether some process is running */
44
 /* read the /proc fs to determine whether some process is running */
Lines 47-53 Link Here
47
 {
48
 {
48
     DIR *proc_dir = opendir("/proc");
49
     DIR *proc_dir = opendir("/proc");
49
     if (!proc_dir) {
50
     if (!proc_dir) {
50
@@ -1812,7 +1827,8 @@ gboolean process_is_running (const char 
51
@@ -2153,7 +2169,8 @@
51
     return FALSE;
52
     return FALSE;
52
 }
53
 }
53
 
54
 
Lines 57-68 Link Here
57
 {
58
 {
58
     int count = 0;
59
     int count = 0;
59
     DIR *proc_dir = opendir("/proc");
60
     DIR *proc_dir = opendir("/proc");
60
@@ -1836,6 +1852,14 @@ int count_process(const char *process_na
61
@@ -2177,6 +2194,14 @@
61
     return count;
62
     return count;
62
 }
63
 }
63
 
64
 
64
+#ifdef __linux__
65
+#ifdef __linux__
65
+gboolean process_is_running (const char *process_name) {
66
+gboolean process_is_running(const char *process_name) {
66
+    return process_is_running_procfs(process_name);
67
+    return process_is_running_procfs(process_name);
67
+}
68
+}
68
+
69
+
Lines 72-78 Link Here
72
 #endif
73
 #endif
73
 
74
 
74
 #ifdef __APPLE__
75
 #ifdef __APPLE__
75
@@ -1846,6 +1870,120 @@ gboolean process_is_running (const char 
76
@@ -2187,6 +2212,119 @@
76
 }
77
 }
77
 #endif
78
 #endif
78
 
79
 
Lines 189-195 Link Here
189
+}
190
+}
190
+#endif
191
+#endif
191
+
192
+
192
+
193
 char*
193
 char*
194
 ccnet_object_type_from_id (const char *object_id)
194
 ccnet_object_type_from_id (const char *object_id)
195
 {
195
 {
(-)files/patch-lib_utils.h (-4 / +4 lines)
Lines 1-5 Link Here
1
--- lib/utils.h.orig	2014-08-05 01:28:35.000000000 -0400
1
--- lib/utils.h.orig	2015-01-28 00:57:13.000000000 -0500
2
+++ lib/utils.h	2014-11-11 11:30:51.843637061 -0500
2
+++ lib/utils.h	2015-01-28 01:01:59.000000000 -0500
3
@@ -3,6 +3,9 @@
3
@@ -3,6 +3,9 @@
4
 #ifndef CCNET_UTILS_H
4
 #ifndef CCNET_UTILS_H
5
 #define CCNET_UTILS_H
5
 #define CCNET_UTILS_H
Lines 15-23 Link Here
15
 #include <sys/stat.h>
15
 #include <sys/stat.h>
16
 
16
 
17
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
17
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
18
+#if defined(__FreeBSD__) || defined(__DragonFly__) 
18
+#if defined(__FreeBSD__) || defined(__DragonFly__)
19
+#include <evutil.h>
19
+#include <evutil.h>
20
+#elif (__NetBSD__) || defined(__OpenBSD__)
20
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
21
 #include <event2/util.h>
21
 #include <event2/util.h>
22
 #else
22
 #else
23
 #include <evutil.h>
23
 #include <evutil.h>
(-)files/patch-scripts_setup-seafile.sh (-4 / +8 lines)
Lines 1-11 Link Here
1
--- scripts/setup-seafile.sh.orig	2014-08-28 05:24:34.830623727 -0400
1
--- scripts/setup-seafile.sh.orig	2015-01-28 00:37:17.000000000 -0500
2
+++ scripts/setup-seafile.sh	2014-08-28 05:27:43.095059196 -0400
2
+++ scripts/setup-seafile.sh	2015-01-28 00:43:26.000000000 -0500
3
@@ -341,7 +341,7 @@
3
@@ -339,7 +339,11 @@
4
 }
4
 }
5
 
5
 
6
 function copy_user_manuals() {
6
 function copy_user_manuals() {
7
-    src_docs_dir=${INSTALLPATH}/seafile/docs/
7
-    src_docs_dir=${INSTALLPATH}/seafile/docs/
8
+    src_docs_dir=${INSTALLPATH}/seafile/share/doc/seafile/
8
+    if [ $(uname | grep -e BSD -e DragonFly | wc -l) == "1" ]; then
9
+        src_docs_dir=${INSTALLPATH}/seafile/share/doc/seafile/
10
+    else
11
+    	src_docs_dir=${INSTALLPATH}/seafile/docs/
12
+    fi
9
     library_template_dir=${seafile_data_dir}/library-template
13
     library_template_dir=${seafile_data_dir}/library-template
10
     mkdir -p ${library_template_dir}
14
     mkdir -p ${library_template_dir}
11
     cp -f ${src_docs_dir}/*.doc ${library_template_dir}
15
     cp -f ${src_docs_dir}/*.doc ${library_template_dir}
(-)pkg-plist (-5 / +1 lines)
Lines 1-6 Link Here
1
bin/seaf-cli
1
bin/seaf-cli
2
bin/seaf-daemon
2
bin/seaf-daemon
3
bin/seafile
4
bin/seafile-admin
3
bin/seafile-admin
5
include/seafile/monitor-rpc.h
4
include/seafile/monitor-rpc.h
6
include/seafile/seafile-object.h
5
include/seafile/seafile-object.h
Lines 11-20 Link Here
11
lib/libseafile.so.0
10
lib/libseafile.so.0
12
lib/libseafile.so.0.0.0
11
lib/libseafile.so.0.0.0
13
libdata/pkgconfig/libseafile.pc
12
libdata/pkgconfig/libseafile.pc
14
man/man1/ccnet.1.gz
15
man/man1/seaf-cli.1.gz
13
man/man1/seaf-cli.1.gz
16
man/man1/seaf-daemon.1.gz
14
man/man1/seaf-daemon.1.gz
17
man/man1/seafile-applet.1.gz
18
%%SEAFILE_SERVER%%/check_init_admin.py
15
%%SEAFILE_SERVER%%/check_init_admin.py
19
%%SEAFILE_SERVER%%/reset-admin.sh
16
%%SEAFILE_SERVER%%/reset-admin.sh
20
%%SEAFILE_SERVER%%/seaf-cli-wrapper.sh
17
%%SEAFILE_SERVER%%/seaf-cli-wrapper.sh
Lines 21-27 Link Here
21
%%SEAFILE_SERVER%%/seaf-fuse.sh
18
%%SEAFILE_SERVER%%/seaf-fuse.sh
22
%%SEAFILE_SERVER%%/seaf-gc.sh
19
%%SEAFILE_SERVER%%/seaf-gc.sh
23
%%SEAFILE_SERVER%%/seafile.sh
20
%%SEAFILE_SERVER%%/seafile.sh
24
%%SEAFILE_SERVER%%/seafile/bin/fileserver
25
%%SEAFILE_SERVER%%/seafile/bin/seaf-fsck
21
%%SEAFILE_SERVER%%/seafile/bin/seaf-fsck
26
%%SEAFILE_SERVER%%/seafile/bin/seaf-fuse
22
%%SEAFILE_SERVER%%/seafile/bin/seaf-fuse
27
%%SEAFILE_SERVER%%/seafile/bin/seaf-migrate
23
%%SEAFILE_SERVER%%/seafile/bin/seaf-migrate
Lines 29-35 Link Here
29
%%SEAFILE_SERVER%%/seafile/bin/seaf-server-init
25
%%SEAFILE_SERVER%%/seafile/bin/seaf-server-init
30
%%SEAFILE_SERVER%%/seafile/bin/seafile-controller
26
%%SEAFILE_SERVER%%/seafile/bin/seafile-controller
31
%%SEAFILE_SERVER%%/seafile/bin/seafserv-gc
27
%%SEAFILE_SERVER%%/seafile/bin/seafserv-gc
32
%%SEAFILE_SERVER%%/seafile/bin/seafserv-tool
33
%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seafile/__init__.py
28
%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seafile/__init__.py
34
%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seafile/__init__.pyc
29
%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seafile/__init__.pyc
35
%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seafile/__init__.pyo
30
%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seafile/__init__.pyo
Lines 85-88 Link Here
85
%%SEAFILE_SERVER%%/upgrade/upgrade_2.1_2.2.sh
80
%%SEAFILE_SERVER%%/upgrade/upgrade_2.1_2.2.sh
86
%%SEAFILE_SERVER%%/upgrade/upgrade_2.2_3.0.sh
81
%%SEAFILE_SERVER%%/upgrade/upgrade_2.2_3.0.sh
87
%%SEAFILE_SERVER%%/upgrade/upgrade_3.0_3.1.sh
82
%%SEAFILE_SERVER%%/upgrade/upgrade_3.0_3.1.sh
83
%%SEAFILE_SERVER%%/upgrade/upgrade_3.1_4.0.sh
88
@dir(%%SEAFILE_USERNAME%%,%%SEAFILE_GROUPNAME%%,755) %%HAIWENDIR%%
84
@dir(%%SEAFILE_USERNAME%%,%%SEAFILE_GROUPNAME%%,755) %%HAIWENDIR%%

Return to bug 197980