FreeBSD Bugzilla – Attachment 178069 Details for
Bug 215360
net-mgmt/seafile: Updated to 6.0.1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
seafile-client.diff
2-seafile-client.diff (text/plain), 71.88 KB, created by
Ultima
on 2016-12-18 19:27:38 UTC
(
hide
)
Description:
seafile-client.diff
Filename:
MIME Type:
Creator:
Ultima
Created:
2016-12-18 19:27:38 UTC
Size:
71.88 KB
patch
obsolete
>diff -ruNp orig/net-mgmt/seafile/Makefile current/net-mgmt/seafile/Makefile >--- orig/net-mgmt/seafile/Makefile 2016-12-18 13:43:08.008626000 -0500 >+++ current/net-mgmt/seafile/Makefile 1969-12-31 19:00:00.000000000 -0500 >@@ -1,133 +0,0 @@ >-# $FreeBSD$ >- >-PORTNAME= seafile >-PORTVERSION= 6.0.0 >-DISTVERSIONPREFIX= v >-DISTVERSIONSUFFIX= -server >-CATEGORIES= net-mgmt >- >-MAINTAINER= ultima1252@gmail.com >-COMMENT= Open Source Cloud Storage (Server) >- >-LICENSE= GPLv3 >-LICENSE_FILE= ${WRKSRC}/LICENSE.txt >- >-BUILD_DEPENDS= valac:lang/vala >-LIB_DEPENDS= libsearpc.so:devel/libsearpc \ >- libevhtp.so:www/libevhtp \ >- libzdb.so:databases/libzdb \ >- libcurl.so:ftp/curl \ >- libinotify.so:devel/libinotify \ >- libccnet.so:net-mgmt/ccnet \ >- libevent.so:devel/libevent2 \ >- libuuid.so:misc/e2fsprogs-libuuid \ >- libjansson.so:devel/jansson >-RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 \ >- ${PYTHON_PKGNAMEPREFIX}urllib3>0:net/py-urllib3 \ >- bash:shells/bash >- >-CONFLICTS= seafile-server-[0-9]* >- >-USE_GITHUB= yes >-GH_ACCOUNT= haiwen >- >-USES= autoreconf gettext iconv libarchive libtool mysql pathfix \ >- pkgconfig python:-2.7 shebangfix sqlite ssl >-USE_GNOME= glib20 >-SHEBANG_FILES= scripts/*.sh scripts/upgrade/*.sh tests/*.py tests/basic/*.sh \ >- tests/sync-auto-test/*.template *.sh scripts/build/*.py \ >- scripts/*.py *.py scripts/upgrade/*.py app/seaf-cli \ >- tools/seafile-admin >-GNU_CONFIGURE= yes >-USE_LDCONFIG= yes >-CONFIGURE_ENV= SSL_CFLAGS="${OPENSSLINC}" SSL_LIBS="-L${OPENSSLLIB} -lssl -lcrypto" >- >-CONFIGURE_ARGS= --enable-server >-INSTALL_TARGET= install-strip >-CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/evhtp >-LDFLAGS+= -L${LOCALBASE}/lib >- >-HAIWENDIR= www/haiwen >-SEAFILE_SERVER= ${HAIWENDIR}/seafile-server >-SEABIN= ${SEAFILE_SERVER}/seafile/bin >-SEALIB= ${SEAFILE_SERVER}/seafile/lib >- >-USERS= seafile >-GROUPS= ${USERS} >- >-USE_RC_SUBR= ${PORTNAME} >-PLIST_SUB= USERS=${USERS} \ >- GROUPS=${GROUPS} \ >- SEAFILE_SERVER=${SEAFILE_SERVER} \ >- HAIWENDIR=${HAIWENDIR} >- >-SUB_FILES= pkg-message >- >-SUB_LIST+= USERS=${USERS} \ >- GROUPS=${GROUPS} \ >- SEAFILE_SERVER=${SEAFILE_SERVER} \ >- HAIWENDIR=${HAIWENDIR} >- >-MAKE_JOBS_UNSAFE= yes >- >-OPTIONS_DEFINE= FUSE RIAK >-OPTIONS_SUB= yes >- >-FUSE_DESC= Use file system in userspace >-RIAK_DESC= Use distributed noSQL database >- >-FUSE_CONFIGURE_ENABLE= fuse >-FUSE_LIB_DEPENDS= libfuse.so:sysutils/fusefs-libs >- >-RIAK_CONFIGURE_ENABLE= riak >-RIAK_RUN_DEPENDS= riak:databases/riak >- >-OPTIONS_DEFAULT= FUSE >-OPTIONS_EXCLUDE_DragonFly= FUSE >- >-.include <bsd.port.options.mk> >- >-post-patch: >-# Fix P_KTHREAD r295435 >-.if ${OSVERSION} >= 1100097 >- ${REINPLACE_CMD} 's/P_KTHREAD/P_KPROC/' ${WRKSRC}/lib/utils.c >-.endif >- ${REINPLACE_CMD} 's/python/${PYTHON_VERSION}/' \ >- ${WRKSRC}/scripts/upgrade/regenerate_secret_key.sh >- ${REINPLACE_CMD} -e 's|^INSTALL.*|INSTALLPATH="${PREFIX}/${SEAFILE_SERVER}/seafile"|' \ >- ${WRKSRC}/scripts/seaf-cli-wrapper.sh >- ${REINPLACE_CMD} 's/<evhtp.h>/<evhtp\/evhtp.h>/' ${WRKSRC}/server/upload-file.c \ >- ${WRKSRC}/server/access-file.c ${WRKSRC}/server/http-server.c >-post-install: >- @${MKDIR} ${STAGEDIR}${PREFIX}/${SEABIN} ${STAGEDIR}${PREFIX}/${SEALIB} \ >- ${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/seafile/share/doc/seafile \ >- ${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/upgrade >-.for SERVPROG in seaf-fsck seafserv-gc seaf-fuse seaf-migrate \ >- seaf-server seaf-server-init seafile-controller >- if [ -e "${STAGEDIR}${PREFIX}/bin/${SERVPROG}" ]; then \ >- ${INSTALL_PROGRAM} ${STAGEDIR}${PREFIX}/bin/${SERVPROG} ${STAGEDIR}${PREFIX}/${SEABIN}; \ >- ${RM} ${STAGEDIR}${PREFIX}/bin/${SERVPROG}; \ >- fi >-.endfor >-.for SERVPROG in seafile-controller seaf-server >- ${LN} -s ${PREFIX}/${SEABIN}/${SERVPROG} ${STAGEDIR}${PREFIX}/bin/ >-.endfor >- >- ${INSTALL_SCRIPT} ${STAGEDIR}${PREFIX}/bin/seaf-cli ${STAGEDIR}${PREFIX}/${SEABIN}/seaf-cli.py >- ${INSTALL_SCRIPT} ${WRKSRC}/scripts/seaf-cli-wrapper.sh ${STAGEDIR}${PREFIX}/bin/seaf-cli >- (cd ${STAGEDIR}${PREFIX}/lib && \ >- ${COPYTREE_SHARE} ${PYTHON_VERSION} ${STAGEDIR}${PREFIX}/${SEALIB}) >- @${RM} -r ${STAGEDIR}${PREFIX}/lib/${PYTHON_VERSION} \ >- ${WRKSRC}/scripts/seaf-cli-wrapper.sh \ >- ${WRKSRC}/scripts/sqlite2mysql.[ps][yh] \ >- ${WRKSRC}/scripts/setup-seafile.sh \ >- ${STAGEDIR}${PREFIX}/bin/seafile-admin >- ${INSTALL_SCRIPT} ${WRKSRC}/scripts/*.[ps][yh] ${STAGEDIR}${PREFIX}/${SEAFILE_SERVER} >- ${INSTALL_SCRIPT} ${WRKSRC}/scripts/upgrade/*.[ps][yh] \ >- ${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/upgrade >- ${INSTALL_DATA} ${WRKSRC}/doc/seafile-tutorial.doc \ >- ${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/seafile/share/doc/seafile/ >- (cd ${WRKSRC}/scripts/upgrade && \ >- ${COPYTREE_SHARE} sql ${STAGEDIR}${PREFIX}/${SEAFILE_SERVER}/upgrade) >- >-.include <bsd.port.mk> >diff -ruNp orig/net-mgmt/seafile/distinfo current/net-mgmt/seafile/distinfo >--- orig/net-mgmt/seafile/distinfo 2016-12-18 13:42:23.167500000 -0500 >+++ current/net-mgmt/seafile/distinfo 1969-12-31 19:00:00.000000000 -0500 >@@ -1,3 +0,0 @@ >-TIMESTAMP = 1470238743 >-SHA256 (haiwen-seafile-v6.0.0-server_GH0.tar.gz) = 778b4248c6596f25d337ea18b9422eeb6950c9b86456ac535c0f7c2fd5e8148f >-SIZE (haiwen-seafile-v6.0.0-server_GH0.tar.gz) = 1149598 >diff -ruNp orig/net-mgmt/seafile/files/patch-common_obj-backend-fs.c current/net-mgmt/seafile/files/patch-common_obj-backend-fs.c >--- orig/net-mgmt/seafile/files/patch-common_obj-backend-fs.c 2016-12-17 18:03:10.918922000 -0500 >+++ current/net-mgmt/seafile/files/patch-common_obj-backend-fs.c 1969-12-31 19:00:00.000000000 -0500 >@@ -1,20 +0,0 @@ >---- common/obj-backend-fs.c.orig 2015-09-21 03:42:11 UTC >-+++ common/obj-backend-fs.c >-@@ -101,7 +101,7 @@ obj_backend_fs_read (ObjBackend *bend, >- static int >- fsync_obj_contents (int fd) >- { >--#ifdef __linux__ >-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >- /* Some file systems may not support fsync(). >- * In this case, just skip the error. >- */ >-@@ -153,7 +153,7 @@ fsync_obj_contents (int fd) >- static int >- rename_and_sync (const char *tmp_path, const char *obj_path) >- { >--#ifdef __linux__ >-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >- char *parent_dir; >- int ret = 0; >- >diff -ruNp orig/net-mgmt/seafile/files/patch-configure.ac current/net-mgmt/seafile/files/patch-configure.ac >--- orig/net-mgmt/seafile/files/patch-configure.ac 2016-12-17 18:03:10.919126000 -0500 >+++ current/net-mgmt/seafile/files/patch-configure.ac 1969-12-31 19:00:00.000000000 -0500 >@@ -1,119 +0,0 @@ >---- configure.ac.orig 2016-05-10 12:25:35 UTC >-+++ configure.ac >-@@ -50,8 +50,16 @@ else >- AC_MSG_RESULT(no) >- fi >- >-+AC_MSG_CHECKING(for BSD) >-+if test `uname | grep -e BSD -e DragonFly | wc -l` = "1"; then >-+ bbsd=true >-+ AC_MSG_RESULT(compile in BSD) >-+else >-+ AC_MSG_RESULT(no) >-+fi >-+ >- AC_MSG_CHECKING(for Linux) >--if test "$bmac" != "true" -a "$bwin32" != "true"; then >-+if test "$bmac" != "true" -a "$bwin32" != "true" -a "$bbsd" != "true"; then >- blinux=true >- AC_MSG_RESULT(compile in linux) >- else >-@@ -93,6 +101,11 @@ if test "$bwin32" != true; then >- [compile_fuse=$enableval],[compile_fuse="yes"]) >- fi >- >-+if test "$bbsd" = true; then >-+ AC_ARG_ENABLE(fuse, AC_HELP_STRING([--enable-fuse], [enable fuse virtual file system]), >-+ [compile_fuse=$enableval],[compile_fuse="no"]) >-+fi >-+ >- AC_ARG_ENABLE(client, AC_HELP_STRING([--enable-client], [enable client]), >- [compile_client=$enableval],[compile_client="yes"]) >- >-@@ -148,6 +161,7 @@ AM_CONDITIONAL([COMPILE_FUSE], [test "${ >- >- AM_CONDITIONAL([WIN32], [test "$bwin32" = "true"]) >- AM_CONDITIONAL([MACOS], [test "$bmac" = "true"]) >-+AM_CONDITIONAL([BSD], [test "$bbsd" = "true"]) >- AM_CONDITIONAL([LINUX], [test "$blinux" = "true"]) >- >- >-@@ -193,6 +207,9 @@ if test "$bwin32" = true; then >- LIB_MAC= >- MSVC_CFLAGS="-D__MSVCRT__ -D__MSVCRT_VERSION__=0x0601" >- LIB_CRYPT32=-lcrypt32 >-+ ZLIB_LIBS= >-+ LIB_INOTIFY= >-+ LIB_KVM= >- elif test "$bmac" = true ; then >- LIB_WS32= >- LIB_GDI32= >-@@ -207,6 +224,26 @@ elif test "$bmac" = true ; then >- LIB_MAC="-framework CoreServices" >- LIB_CRYPT32= >- LIB_ICONV=-liconv >-+ ZLIB_LIBS= >-+ LIB_INOTIFY= >-+ LIB_KVM= >-+elif test "$bbsd" = true ; then >-+ LIB_WS32= >-+ LIB_GDI32= >-+ LIB_RT= >-+ LIB_INTL= >-+ LIB_RESOLV= >-+ LIB_UUID=-luuid >-+ LIB_IPHLPAPI= >-+ LIB_SHELL32= >-+ LIB_PSAPI= >-+ LIB_MAC= >-+ MSVC_CFLAGS= >-+ LIB_CRYPT32= >-+ LIB_ICONV=-liconv >-+ ZLIB_LIBS=-lz >-+ LIB_INOTIFY=-linotify >-+ LIB_KVM=-lkvm >- else >- LIB_WS32= >- LIB_GDI32= >-@@ -220,6 +257,9 @@ else >- LIB_MAC= >- MSVC_CFLAGS= >- LIB_CRYPT32= >-+ ZLIB_LIBS=-lz >-+ LIB_INOTIFY=-linotify >-+ LIB_KVM= >- fi >- >- AC_SUBST(LIB_WS32) >-@@ -232,6 +272,9 @@ AC_SUBST(LIB_IPHLPAPI) >- AC_SUBST(LIB_SHELL32) >- AC_SUBST(LIB_PSAPI) >- AC_SUBST(LIB_MAC) >-+AC_SUBST(ZLIB_LIBS) >-+AC_SUBST(LIB_INOTIFY) >-+AC_SUBST(LIB_KVM) >- AC_SUBST(MSVC_CFLAGS) >- AC_SUBST(LIB_CRYPT32) >- AC_SUBST(LIB_ICONV) >-@@ -246,7 +289,9 @@ ZDB_REQUIRED=2.10 >- #LIBNAUTILUS_EXTENSION_REQUIRED=2.30.1 >- CURL_REQUIRED=7.17 >- FUSE_REQUIRED=2.7.3 >-+if test "$blinux" = true ; then >- ZLIB_REQUIRED=1.2.0 >-+fi >- >- PKG_CHECK_MODULES(SSL, [openssl]) >- AC_SUBST(SSL_CFLAGS) >-@@ -276,9 +321,11 @@ PKG_CHECK_MODULES(LIBEVENT, [libevent >= >- AC_SUBST(LIBEVENT_CFLAGS) >- AC_SUBST(LIBEVENT_LIBS) >- >-+if test "$blinux" = true ; then >- PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_REQUIRED]) >- AC_SUBST(ZLIB_CFLAGS) >- AC_SUBST(ZLIB_LIBS) >-+fi >- >- if test x${compile_python} = xyes; then >- AM_PATH_PYTHON([2.6]) >diff -ruNp orig/net-mgmt/seafile/files/patch-controller_seafile-controller.c current/net-mgmt/seafile/files/patch-controller_seafile-controller.c >--- orig/net-mgmt/seafile/files/patch-controller_seafile-controller.c 2016-12-17 18:03:10.919291000 -0500 >+++ current/net-mgmt/seafile/files/patch-controller_seafile-controller.c 1969-12-31 19:00:00.000000000 -0500 >@@ -1,104 +0,0 @@ >---- controller/seafile-controller.c.orig 2015-09-21 03:42:11 UTC >-+++ controller/seafile-controller.c >-@@ -17,6 +17,19 @@ >- #include "log.h" >- #include "seafile-controller.h" >- >-+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >-+#include <sys/sysctl.h> >-+#include <sys/types.h> >-+#include <sys/user.h> >-+#include <limits.h> >-+ >-+#ifndef WITH_PROC_FS >-+#define WITH_PROC_FS g_file_test("/proc/curproc", G_FILE_TEST_EXISTS) >-+#endif >-+ >-+static char *command_name = NULL; >-+#endif >-+ >- #define CHECK_PROCESS_INTERVAL 10 /* every 10 seconds */ >- >- SeafileController *ctl; >-@@ -247,7 +260,20 @@ static void >- init_seafile_path () >- { >- GError *error = NULL; >-+#if defined(__linux__) >- char *executable = g_file_read_link ("/proc/self/exe", &error); >-+#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >-+ /* >-+ * seafile.sh starts the process using abs path >-+ */ >-+ char executable[_POSIX_PATH_MAX]; >-+ memset(executable, 0, _POSIX_PATH_MAX); >-+ char * rc = realpath(command_name, executable); >-+ if (!rc) { >-+ seaf_warning ("failed to readpath: %s\n", executable); >-+ return; >-+ } >-+#endif >- char *tmp = NULL; >- if (error != NULL) { >- seaf_warning ("failed to readlink: %s\n", error->message); >-@@ -261,7 +287,9 @@ init_seafile_path () >- >- topdir = g_path_get_dirname (installpath); >- >-+#if defined(__linux__) >- g_free (executable); >-+#endif >- g_free (tmp); >- } >- >-@@ -402,11 +430,40 @@ need_restart (int which) >- return FALSE; >- } else { >- char buf[256]; >-+ gboolean with_procfs; >-+#if defined(__linux__) >-+ with_procfs = g_file_test("/proc/self", G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR); >-+#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) >-+ with_procfs = g_file_test("/proc/curproc", G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR); >-+#else >-+ with_procfs = FALSE; >-+#endif >-+ if (with_procfs) { >- snprintf (buf, sizeof(buf), "/proc/%d", pid); >- if (g_file_test (buf, G_FILE_TEST_IS_DIR)) { >- return FALSE; >- } else { >- return TRUE; >-+ } >-+ >-+ } else { >-+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >-+#ifdef __OpenBSD__ >-+ int min[6] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid, sizeof(struct kinfo_proc), 1}; >-+#else >-+ int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid}; >-+#endif >-+ size_t len = sizeof(struct kinfo_proc); >-+ struct kinfo_proc kp; >-+ if (sysctl(mib, sizeof(mib)/sizeof(mib[0]), &kp, &len, NULL, 0) != -1 && >-+ len == sizeof(struct kinfo_proc)) { >-+ return FALSE; >-+ } else { >-+ return TRUE; >-+ } >-+#else >-+ return FALSE; >-+#endif >- } >- } >- } >-@@ -877,6 +934,9 @@ int main (int argc, char **argv) >- exit (1); >- } >- >-+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >-+ command_name = argv[0]; >-+#endif >- char *config_dir = DEFAULT_CONFIG_DIR; >- char *seafile_dir = NULL; >- char *logdir = NULL; >diff -ruNp orig/net-mgmt/seafile/files/patch-daemon_Makefile.am current/net-mgmt/seafile/files/patch-daemon_Makefile.am >--- orig/net-mgmt/seafile/files/patch-daemon_Makefile.am 2016-12-17 18:03:10.919424000 -0500 >+++ current/net-mgmt/seafile/files/patch-daemon_Makefile.am 1969-12-31 19:00:00.000000000 -0500 >@@ -1,22 +0,0 @@ >---- daemon/Makefile.am.orig 2016-04-15 23:08:45 UTC >-+++ daemon/Makefile.am >-@@ -63,6 +63,10 @@ if LINUX >- wt_monitor_src = wt-monitor.c wt-monitor-linux.c wt-monitor-structs.c >- endif >- >-+if BSD >-+wt_monitor_src = wt-monitor.c wt-monitor-linux.c wt-monitor-structs.c >-+endif >-+ >- if WIN32 >- wt_monitor_src = wt-monitor.c wt-monitor-win32.c wt-monitor-structs.c >- endif >-@@ -126,6 +130,7 @@ seaf_daemon_LDADD = $(top_builddir)/lib/ >- @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ \ >- $(top_builddir)/common/cdc/libcdc.la \ >- $(top_builddir)/common/index/libindex.la @LIB_WS32@ @LIB_CRYPT32@ \ >-- @SEARPC_LIBS@ @CCNET_LIBS@ @GNOME_KEYRING_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ @ZLIB_LIBS@ @CURL_LIBS@ @BPWRAPPER_LIBS@ >-+ @SEARPC_LIBS@ @CCNET_LIBS@ @GNOME_KEYRING_LIBS@ @JANSSON_LIBS@ \ >-+ @LIB_MAC@ @ZLIB_LIBS@ @CURL_LIBS@ @LIB_INOTIFY@ @BPWRAPPER_LIBS@ >- >- seaf_daemon_LDFLAGS = @STATIC_COMPILE@ @CONSOLE@ >diff -ruNp orig/net-mgmt/seafile/files/patch-daemon_http-tx-mgr.c current/net-mgmt/seafile/files/patch-daemon_http-tx-mgr.c >--- orig/net-mgmt/seafile/files/patch-daemon_http-tx-mgr.c 2016-12-17 18:03:10.919556000 -0500 >+++ current/net-mgmt/seafile/files/patch-daemon_http-tx-mgr.c 1969-12-31 19:00:00.000000000 -0500 >@@ -1,25 +0,0 @@ >---- daemon/http-tx-mgr.c.orig 2015-09-21 03:42:11 UTC >-+++ daemon/http-tx-mgr.c >-@@ -58,6 +58,22 @@ >- #define USER_AGENT_OS "Linux" >- #endif >- >-+#ifdef __FreeBSD__ >-+#define USER_AGENT_OS "FreeBSD" >-+#endif >-+ >-+#ifdef __DragonFly__ >-+#define USER_AGENT_OS "DragonFly" >-+#endif >-+ >-+#ifdef __NetBSD__ >-+#define USER_AGENT_OS "NetBSD" >-+#endif >-+ >-+#ifdef __OpenBSD__ >-+#define USER_AGENT_OS "OpenBSD" >-+#endif >-+ >- struct _Connection { >- CURL *curl; >- gint64 ctime; /* Used to clean up unused connection. */ >diff -ruNp orig/net-mgmt/seafile/files/patch-daemon_repo-mgr.c current/net-mgmt/seafile/files/patch-daemon_repo-mgr.c >--- orig/net-mgmt/seafile/files/patch-daemon_repo-mgr.c 2016-12-18 13:42:23.167838000 -0500 >+++ current/net-mgmt/seafile/files/patch-daemon_repo-mgr.c 1969-12-31 19:00:00.000000000 -0500 >@@ -1,47 +0,0 @@ >---- daemon/repo-mgr.c.orig 2016-05-10 12:25:35 UTC >-+++ daemon/repo-mgr.c >-@@ -4441,7 +4441,7 @@ checkout_file (const char *repo_id, >- gboolean force_conflict = FALSE; >- gboolean update_mode_only = FALSE; >- >--#ifndef __linux__ >-+#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__OpenBSD__) >- path = build_case_conflict_free_path (worktree, name, >- conflict_hash, no_conflict_hash, >- &case_conflict, >-@@ -4617,7 +4617,7 @@ checkout_empty_dir (const char *worktree >- char *path; >- gboolean case_conflict = FALSE; >- >--#ifndef __linux__ >-+#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__OpenBSD__) >- path = build_case_conflict_free_path (worktree, name, >- conflict_hash, no_conflict_hash, >- &case_conflict, >-@@ -5038,7 +5038,7 @@ schedule_file_fetch (GThreadPool *tpool, >- } >- >- if (!skip_fetch) { >--#ifndef __linux__ >-+#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__OpenBSD__) >- gboolean case_conflict = FALSE; >- path = build_case_conflict_free_path (worktree, de->name, >- conflict_hash, no_conflict_hash, >-@@ -5185,7 +5185,7 @@ checkout_file_http (FileTxData *data, >- * A.txt to checkout, we can only detect case conflict after one file is checkecd >- * out. So we need to generate a new one here. >- */ >--#ifndef __linux__ >-+#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__OpenBSD__) >- path = build_case_conflict_free_path (worktree, de->name, >- conflict_hash, no_conflict_hash, >- &case_conflict, >-@@ -5567,7 +5567,7 @@ do_rename_in_worktree (DiffEntry *de, co >- old_path = g_build_filename (worktree, de->name, NULL); >- >- if (seaf_util_exists (old_path)) { >--#ifndef __linux__ >-+#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__OpenBSD__) >- gboolean case_conflict; >- new_path = build_case_conflict_free_path (worktree, de->new_name, >- conflict_hash, no_conflict_hash, >diff -ruNp orig/net-mgmt/seafile/files/patch-daemon_vc-utils.c current/net-mgmt/seafile/files/patch-daemon_vc-utils.c >--- orig/net-mgmt/seafile/files/patch-daemon_vc-utils.c 2016-12-18 13:42:23.168050000 -0500 >+++ current/net-mgmt/seafile/files/patch-daemon_vc-utils.c 1969-12-31 19:00:00.000000000 -0500 >@@ -1,20 +0,0 @@ >---- daemon/vc-utils.c.orig 2016-04-05 08:38:26 UTC >-+++ daemon/vc-utils.c >-@@ -664,7 +664,7 @@ error: >- >- #endif /* defined WIN32 || defined __APPLE__ */ >- >--#ifdef __linux__ >-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >- >- char * >- build_checkout_path (const char *worktree, const char *ce_name, int len) >-@@ -724,7 +724,7 @@ checkout_entry (struct cache_entry *ce, >- gboolean force_conflict = FALSE; >- >- path_in = g_build_path ("/", o->base, ce->name, NULL); >--#ifndef __linux__ >-+#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__OpenBSD__) >- path = build_case_conflict_free_path (o->base, ce->name, >- conflict_hash, no_conflict_hash, >- &case_conflict, >diff -ruNp orig/net-mgmt/seafile/files/patch-lib_Makefile.am current/net-mgmt/seafile/files/patch-lib_Makefile.am >--- orig/net-mgmt/seafile/files/patch-lib_Makefile.am 2016-12-17 18:03:10.919986000 -0500 >+++ current/net-mgmt/seafile/files/patch-lib_Makefile.am 1969-12-31 19:00:00.000000000 -0500 >@@ -1,29 +0,0 @@ >---- lib/Makefile.am.orig 2015-10-12 04:12:33 UTC >-+++ lib/Makefile.am >-@@ -53,6 +53,7 @@ libseafile_common_la_SOURCES = ${seafile >- libseafile_common_la_LDFLAGS = -no-undefined >- libseafile_common_la_LIBADD = @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ -lcrypto @LIB_GDI32@ \ >- @LIB_UUID@ @LIB_WS32@ @LIB_PSAPI@ -lsqlite3 \ >-+ @LIB_KVM@ \ >- @LIBEVENT_LIBS@ @SEARPC_LIBS@ @LIB_SHELL32@ \ >- @ZLIB_LIBS@ >- >-@@ -74,7 +75,7 @@ vala.stamp: ${seafile_object_define} >- rm -f ${seafile_object_gen} >- @rm -f vala.tmp >- @touch vala.tmp >-- valac -C --pkg posix $^ >-+ valac -C --pkg posix ${seafile_object_define} >- @mv -f vala.tmp $@ >- >- ${seafile_object_gen}: vala.stamp >-@@ -90,5 +91,9 @@ install-data-local: >- if MACOS >- sed -i '' -e "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles) >- else >-+if BSD >-+ sed -i '' "s|(DESTDIR)|${PREFIX}|g" $(pcfiles) >-+else >- ${SED} -i "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles) >- endif >-+endif >diff -ruNp orig/net-mgmt/seafile/files/patch-lib_net.c current/net-mgmt/seafile/files/patch-lib_net.c >--- orig/net-mgmt/seafile/files/patch-lib_net.c 2016-12-17 18:03:10.920122000 -0500 >+++ current/net-mgmt/seafile/files/patch-lib_net.c 1969-12-31 19:00:00.000000000 -0500 >@@ -1,14 +0,0 @@ >---- lib/net.c.orig 2015-09-21 03:42:11 UTC >-+++ lib/net.c >-@@ -157,7 +157,11 @@ ccnet_net_bind_tcp (int port, int nonblo >- >- snprintf (buf, sizeof(buf), "%d", port); >- >-+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >-+ if ( (n = getaddrinfo("0.0.0.0", buf, &hints, &res) ) != 0) { >-+#else >- if ( (n = getaddrinfo(NULL, buf, &hints, &res) ) != 0) { >-+#endif >- ccnet_warning ("getaddrinfo fails: %s\n", gai_strerror(n)); >- return -1; >- } >diff -ruNp orig/net-mgmt/seafile/files/patch-lib_utils.c current/net-mgmt/seafile/files/patch-lib_utils.c >--- orig/net-mgmt/seafile/files/patch-lib_utils.c 2016-12-17 18:03:10.920282000 -0500 >+++ current/net-mgmt/seafile/files/patch-lib_utils.c 1969-12-31 19:00:00.000000000 -0500 >@@ -1,195 +0,0 @@ >---- lib/utils.c.orig 2015-09-21 03:42:11 UTC >-+++ lib/utils.c >-@@ -56,6 +56,16 @@ >- >- #include <zlib.h> >- >-+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >-+#include <netinet/in.h> >-+#include <stdlib.h> >-+#include <kvm.h> >-+#include <paths.h> >-+#include <sys/param.h> >-+#include <sys/sysctl.h> >-+#include <sys/user.h> >-+#endif >-+ >- extern int inet_pton(int af, const char *src, void *dst); >- >- >-@@ -2112,14 +2122,19 @@ wchar_from_utf8 (const char *utf8) >- >- #endif /* ifdef WIN32 */ >- >--#ifdef __linux__ >- /* read the link of /proc/123/exe and compare with `process_name' */ >- static int >- find_process_in_dirent(struct dirent *dir, const char *process_name) >- { >- char path[512]; >- /* fisrst construct a path like /proc/123/exe */ >-+#if defined(__linux__) >- if (sprintf (path, "/proc/%s/exe", dir->d_name) < 0) { >-+#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) >-+ if (sprintf (path, "/proc/%s/file", dir->d_name) < 0) { >-+#else >-+ if (1) { >-+#endif >- return -1; >- } >- >-@@ -2143,7 +2158,8 @@ find_process_in_dirent(struct dirent *di >- } >- >- /* read the /proc fs to determine whether some process is running */ >--gboolean process_is_running (const char *process_name) >-+static gboolean >-+process_is_running_procfs (const char *process_name) >- { >- DIR *proc_dir = opendir("/proc"); >- if (!proc_dir) { >-@@ -2168,7 +2184,8 @@ gboolean process_is_running (const char >- return FALSE; >- } >- >--int count_process(const char *process_name) >-+static int >-+count_process_procfs(const char *process_name) >- { >- int count = 0; >- DIR *proc_dir = opendir("/proc"); >-@@ -2192,6 +2209,14 @@ int count_process(const char *process_na >- return count; >- } >- >-+#ifdef __linux__ >-+gboolean process_is_running(const char *process_name) { >-+ return process_is_running_procfs(process_name); >-+} >-+ >-+int count_process(const char *process_name) { >-+ return count_process_procfs(process_name); >-+} >- #endif >- >- #ifdef __APPLE__ >-@@ -2202,6 +2227,119 @@ gboolean process_is_running (const char >- } >- #endif >- >-+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >-+#if defined(__FreeBSD__) >-+#define PSKIP(kp) ((kp)->ki_pid == mypid || \ >-+ (!kthreads && ((kp)->ki_flag & P_KTHREAD) != 0)) >-+#define KVM_OPENFILES(exec, coref, buf) \ >-+ kvm_openfiles(exec, coref, NULL, O_RDONLY, buf) >-+#define KVM_GETPROCS(kd, plist, nproc) \ >-+ kvm_getprocs(kd, KERN_PROC_PROC, 0, &nproc) >-+ >-+#elif defined(__DragonFly__) >-+#define PSKIP(kp) ((kp)->kp_pid == mypid || \ >-+ (!kthreads && ((kp)->kp_flags & P_SYSTEM) != 0)) >-+#define KVM_OPENFILES(exec, coref, buf) \ >-+ kvm_openfiles(exec, coref, NULL, O_RDONLY, buf) >-+#define KVM_GETPROCS(kd, plist, nproc) \ >-+ kvm_getprocs(kd, KERN_PROC_ALL, 0, &nproc) >-+ >-+#elif defined(__NetBSD__) >-+#define PSKIP(kp) ((kp)->kp_pid == mypid || \ >-+ ((kp)->p_flag & P_SYSTEM) != 0) >-+#define KVM_OPENFILES(exec, coref, buf) \ >-+ kvm_openfiles(exec, coref, NULL, KVM_NO_FILES, buf) >-+#define KVM_GETPROCS(kd, plist, nproc) \ >-+ kvm_getprocs(kd, KERN_PROC_ALL, 0, sizeof(*plist), &nproc) >-+ >-+#elif defined(__OpenBSD__) >-+#define PSKIP(kp) ((kp)->kp_pid == mypid || \ >-+ ((kp)->p_flag & (P_SYSTEM | P_THREAD)) != 0) >-+#define KVM_OPENFILES(exec, coref, buf) \ >-+ kvm_openfiles(exec, coref, NULL, KVM_NO_FILES, buf) >-+#define KVM_GETPROCS(kd, plist, nproc) \ >-+ kvm_getprocs(kd, KERN_PROC_ALL, 0, sizeof(*plist), &nproc) >-+ >-+#else >-+#define PSKIP(kp) 0 >-+#define KVM_OPENFILES(exec, coref, buf) 0 >-+#define KVM_GETPROCS(kd, plist, nproc) 0 >-+#endif >-+ >-+#ifndef WITH_PROC_FS >-+#define WITH_PROC_FS g_file_test("/proc/curproc", G_FILE_TEST_EXISTS) >-+#endif >-+ >-+static int >-+count_running_process_kvm(const char *process_name) { >-+ >-+ >-+ static kvm_t *kd; >-+ static struct kinfo_proc *plist; >-+ static int nproc; >-+ static pid_t mypid; >-+ static int kthreads; >-+ >-+ char buf[_POSIX2_LINE_MAX]; >-+ const char * execf, *coref; >-+ char **pargv; >-+ int i, selected_nproc; >-+ struct kinfo_proc *kp; >-+ >-+ selected_nproc = 0; >-+ execf = NULL; >-+ coref = _PATH_DEVNULL; >-+ >-+ mypid = getpid(); >-+ kd = KVM_OPENFILES(execf, coref, buf); >-+ if (kd == NULL) { >-+ fprintf(stderr, "Error: Cannot open kernel files (%s)", buf); >-+ exit(1); >-+ } >-+ >-+ plist = KVM_GETPROCS(kd, plist, nproc); >-+ if (plist == NULL) { >-+ fprintf(stderr, "Error: Cannot get process list (%s)", kvm_geterr(kd)); >-+ exit(1); >-+ } >-+ >-+ for(i = 0, kp = plist; i < nproc; i++, kp++) { >-+ if (PSKIP(kp)) { >-+ continue; >-+ } >-+ if ((pargv = kvm_getargv(kd, kp, 0)) != NULL) { >-+ if (strstr(pargv[0], process_name) != NULL) { >-+ selected_nproc += 1; >-+ } >-+ } >-+ } >-+ kvm_close(kd); >-+ kvm_close(kd); >-+ >-+ return selected_nproc; >-+} >-+ >-+gboolean >-+process_is_running(const char * process_name) { >-+ if (WITH_PROC_FS) { >-+ return process_is_running_procfs(process_name); >-+ } >-+ if (count_running_process_kvm(process_name) > 0) { >-+ return TRUE; >-+ } else { >-+ return FALSE; >-+ } >-+} >-+ >-+int >-+count_process(const char * process_name) { >-+ if (WITH_PROC_FS) { >-+ return count_process_procfs(process_name); >-+ } >-+ return count_running_process_kvm(process_name); >-+} >-+#endif >-+ >- char* >- ccnet_object_type_from_id (const char *object_id) >- { >diff -ruNp orig/net-mgmt/seafile/files/patch-lib_utils.h current/net-mgmt/seafile/files/patch-lib_utils.h >--- orig/net-mgmt/seafile/files/patch-lib_utils.h 2016-12-17 18:03:10.920404000 -0500 >+++ current/net-mgmt/seafile/files/patch-lib_utils.h 1969-12-31 19:00:00.000000000 -0500 >@@ -1,23 +0,0 @@ >---- lib/utils.h.orig 2015-09-21 03:42:11 UTC >-+++ lib/utils.h >-@@ -3,6 +3,9 @@ >- #ifndef CCNET_UTILS_H >- #define CCNET_UTILS_H >- >-+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >-+#include <netinet/in.h> >-+#endif >- #include <sys/time.h> >- #include <time.h> >- #include <stdint.h> >-@@ -13,7 +16,9 @@ >- #include <stdlib.h> >- #include <sys/stat.h> >- >--#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) >-+#if defined(__FreeBSD__) || defined(__DragonFly__) >-+#include <evutil.h> >-+#elif defined(__NetBSD__) || defined(__OpenBSD__) >- #include <event2/util.h> >- #else >- #include <evutil.h> >diff -ruNp orig/net-mgmt/seafile/files/patch-scripts_setup-seafile.sh current/net-mgmt/seafile/files/patch-scripts_setup-seafile.sh >--- orig/net-mgmt/seafile/files/patch-scripts_setup-seafile.sh 2016-12-17 18:03:10.920533000 -0500 >+++ current/net-mgmt/seafile/files/patch-scripts_setup-seafile.sh 1969-12-31 19:00:00.000000000 -0500 >@@ -1,15 +0,0 @@ >---- scripts/setup-seafile.sh.orig 2015-10-12 04:12:33 UTC >-+++ scripts/setup-seafile.sh >-@@ -340,7 +340,11 @@ fi >- } >- >- function copy_user_manuals() { >-- src_docs_dir=${INSTALLPATH}/seafile/docs/ >-+ if [ $(uname | grep -e BSD -e DragonFly | wc -l) == "1" ]; then >-+ src_docs_dir=${INSTALLPATH}/seafile/share/doc/seafile/ >-+ else >-+ src_docs_dir=${INSTALLPATH}/seafile/docs/ >-+ fi >- library_template_dir=${seafile_data_dir}/library-template >- mkdir -p ${library_template_dir} >- cp -f ${src_docs_dir}/*.doc ${library_template_dir} >diff -ruNp orig/net-mgmt/seafile/files/patch-scripts_upgrade_regenerate__secret__key.sh current/net-mgmt/seafile/files/patch-scripts_upgrade_regenerate__secret__key.sh >--- orig/net-mgmt/seafile/files/patch-scripts_upgrade_regenerate__secret__key.sh 2016-12-17 18:03:10.920657000 -0500 >+++ current/net-mgmt/seafile/files/patch-scripts_upgrade_regenerate__secret__key.sh 1969-12-31 19:00:00.000000000 -0500 >@@ -1,10 +0,0 @@ >---- scripts/upgrade/regenerate_secret_key.sh.orig 2016-01-29 17:25:05 UTC >-+++ scripts/upgrade/regenerate_secret_key.sh >-@@ -10,4 +10,6 @@ seahub_settings_py=${TOPDIR}/seahub_sett >- >- line="SECRET_KEY = \"$(python $seahub_secret_keygen)\"" >- >--sed -i -e "/SECRET_KEY/c\\$line" $seahub_settings_py >-+sed -i.bak -e "/SECRET_KEY/c\\ >-+$line >-+" $seahub_settings_py >diff -ruNp orig/net-mgmt/seafile/files/patch-server_access-file.c current/net-mgmt/seafile/files/patch-server_access-file.c >--- orig/net-mgmt/seafile/files/patch-server_access-file.c 2016-12-17 18:03:10.920780000 -0500 >+++ current/net-mgmt/seafile/files/patch-server_access-file.c 1969-12-31 19:00:00.000000000 -0500 >@@ -1,54 +0,0 @@ >---- server/access-file.c.orig 2015-11-12 02:40:40 UTC >-+++ server/access-file.c >-@@ -221,10 +221,10 @@ write_block_data_cb (struct bufferevent >- bev->cbarg = data->saved_cb_arg; >- >- /* Resume reading incomming requests. */ >-- evhtp_request_resume (data->req); >-- >- evhtp_send_reply_end (data->req); >- >-+ evhtp_request_resume (data->req); >-+ >- free_sendblock_data (data); >- return; >- } >-@@ -306,10 +306,10 @@ next: >- bev->cbarg = data->saved_cb_arg; >- >- /* Resume reading incomming requests. */ >-- evhtp_request_resume (data->req); >-- >- evhtp_send_reply_end (data->req); >- >-+ evhtp_request_resume (data->req); >-+ >- free_sendfile_data (data); >- return; >- } >-@@ -403,10 +403,10 @@ write_dir_data_cb (struct bufferevent *b >- bev->cbarg = data->saved_cb_arg; >- >- /* Resume reading incomming requests. */ >-- evhtp_request_resume (data->req); >-- >- evhtp_send_reply_end (data->req); >- >-+ evhtp_request_resume (data->req); >-+ >- free_senddir_data (data); >- return; >- } >-@@ -710,10 +710,10 @@ finish_file_range_request (struct buffer >- bev->cbarg = data->saved_cb_arg; >- >- /* Resume reading incomming requests. */ >-- evhtp_request_resume (data->req); >-- >- evhtp_send_reply_end (data->req); >- >-+ evhtp_request_resume (data->req); >-+ >- free_send_file_range_data (data); >- } >- >diff -ruNp orig/net-mgmt/seafile/files/pkg-message.in current/net-mgmt/seafile/files/pkg-message.in >--- orig/net-mgmt/seafile/files/pkg-message.in 2016-12-18 13:42:23.168216000 -0500 >+++ current/net-mgmt/seafile/files/pkg-message.in 1969-12-31 19:00:00.000000000 -0500 >@@ -1,12 +0,0 @@ >-For an existing config, or creating a new one, fix the UID/GID. >-Do not change %%PREFIX%%/%%SEAFILE_SERVER%% unless your front >-end is using the seafile UID/GID as well. >- >-chown -R seafile:seafile %%PREFIX%%/%%HAIWENDIR%%/conf \ >- %%PREFIX%%/%%HAIWENDIR%%/ccnet %%PREFIX%%/%%HAIWENDIR%%/seafile-data \ >- %%PREFIX%%/%%HAIWENDIR%%/pids %%PREFIX%%/%%HAIWENDIR%%/logs >- >-Don't forget to run update scripts after every minor and major update located in >- %%PREFIX%%/%%SEAFILE_SERVER%%/upgrade >- >-Patch updates (5.1.x) don't require these scripts, however do required a restarted. >diff -ruNp orig/net-mgmt/seafile/files/seafile.in current/net-mgmt/seafile/files/seafile.in >--- orig/net-mgmt/seafile/files/seafile.in 2016-12-18 13:42:23.168381000 -0500 >+++ current/net-mgmt/seafile/files/seafile.in 1969-12-31 19:00:00.000000000 -0500 >@@ -1,147 +0,0 @@ >-#!/bin/sh >-# >-# $FreeBSD$ >-# >- >-# PROVIDE: seafile >-# REQUIRE: LOGIN cleanvar mysql >-# KEYWORD: shutdown >-# >- >-# >-# Add the following lines to /etc/rc.conf to enable seafile: >-# >-# seafile_enable (bool): Set to "NO" by default. >-# Set it to "YES" to enable seafile. >-# seafile_user (str): User to run seafile as >-# Default to "%%USERS%%" created by the port >-# seafile_group (str): Group to run seafile as >-# Default to "%%GROUPS%%" created by the port >-# seafile_path (str): Set to "" by default will use the path >-# %%PREFIX%%/%%SEAFILE_SERVER%%. >-# Set it to a different path. >-# seafile_ccnet (str): Set to "" by default will use the path >-# %%PREFIX%%/%%HAIWENDIR%%/ccnet. >-# Set it to a different path. >-# seafile_conf (str): Set to "" by default will use the path >-# %%PREFIX%%/%%HAIWENDIR%%/conf. >-# Set it to a different path. >-# seafile_datadir (str): Set to "" by default will use the path >-# in file %%PREFIX%%/%%HAIWENDIR%%/ccnet/seafile.ini. >-# Set it to a different path. >-# seafile_logdir (str): Set to "" by default will use the path >-# %%PREFIX%%/%%HAIWENDIR%%/logs >-# Set it to a different path. >-# seafile_loglevel (str): Set to "info" by default. >-# Possible values are debug, warning, info. >- >-. /etc/rc.subr >- >-name="seafile" >-rcvar="seafile_enable" >- >-load_rc_config $name >- >-start_cmd="seafile_start" >-restart_cmd="seafile_restart" >-stop_cmd="seafile_stop" >- >-: ${seafile_enable="NO"} >-: ${seafile_user:="%%USERS%%"} >-: ${seafile_group:="%%GROUPS%%"} >-: ${seafile_path:="%%PREFIX%%/%%SEAFILE_SERVER%%"} >-: ${seafile_ccnet:="%%PREFIX%%/%%HAIWENDIR%%/ccnet"} >-: ${seafile_conf:="%%PREFIX%%/%%HAIWENDIR%%/conf"} >-: ${seafile_datadir:="`cat ${seafile_ccnet}/seafile.ini 2>/dev/null`"} >-: ${seafile_logdir:="%%PREFIX%%/%%HAIWENDIR%%/logs"} >-: ${seafile_loglevel:="info"} >- >-command="%%PREFIX%%/%%SEAFILE_SERVER%%/seafile/bin/seafile-controller" >-command_args="-c \"${seafile_ccnet}\" -d \"${seafile_datadir}\" -F \"${seafile_conf}\" -L \"${seafile_logdir}\" -g \"${seafile_loglevel}\" -G \"${seafile_loglevel}\"" >- >-required_dirs="${seafile_ccnet} ${seafile_conf} ${seafile_datadir}" >-required_files="${seafile_ccnet}/seafile.ini" >- >-test_config() { >- if ! su -m ${seafile_user} -c "${command} -t ${command_args}" ; then >- exit 1; >- fi >-} >- >-check_component_running() { >- name=$1 >- cmd=$2 >- if pid=$(pgrep -f "$cmd" 2>/dev/null); then >- echo "{$name} is running, pid $pid. You can stop it by: " >- echo >- echo " kill $pid" >- echo >- echo "Stop it and try again." >- echo >- exit >- fi >-} >- >-validate_already_running() { >- if pid=$(pgrep -f "seafile-controller -c ${seafile_ccnet}" 2>/dev/null); then >- echo "Seafile controller is already running, pid $pid" >- echo >- exit 1; >- fi >- >- check_component_running "ccnet-server" "ccnet-server -c ${seafile_ccnet}" >- check_component_running "seaf-server" "seaf-server -c ${seafile_ccnet}" >- check_component_running "fileserver" "fileserver -c ${seafile_ccnet}" >- check_component_running "seafdav" "wsgidav.server.run_server" >-} >- >-prepare_env() { >-export PATH=${seafile_path}/seafile/bin:$PATH >-export LD_LIBRARY_PATH=${seafile_path}/seafile/lib/:${seafile_path}/seafile/lib64:${LD_LIBRARY_PATH} >-} >- >-seafile_start() { >- check_required_before; >- validate_already_running; >- test_config; >- >- echo "Starting seafile server, please wait ..." >- >- su -m "${seafile_user}" -c "mkdir -p $seafile_logdir" >- su -m "${seafile_user}" -c "$command $command_args" >- >- sleep 3 >- >- # check if seafile server started successfully >- if ! pgrep -f "seafile-controller -c ${seafile_ccnet}" 2>/dev/null 1>&2; then >- echo "Failed to start seafile server" >- exit 1; >- fi >- >- echo "Seafile server started" >- echo >-} >- >-seafile_stop() { >- if ! pgrep -f "seafile-controller -c ${seafile_ccnet}" 2>/dev/null 1>&2; then >- echo "Seafile is not running" >- return 1; >- fi >- >- echo "Stopping ${name}." >- pkill -SIGTERM -f "seafile-controller -c ${seafile_ccnet}" >- pkill -f "ccnet-server -c ${seafile_ccnet}" >- pkill -f "seaf-server -c ${seafile_ccnet}" >- pkill -f "fileserver -c ${seafile_ccnet}" >- pkill -f "soffice.*--invisible --nocrashreport" >- pkill -f "wsgidav.server.run_server" >- return 0 >-} >- >-seafile_restart() { >- seafile_stop; >- sleep 2 >- seafile_start; >-} >- >-run_rc_command "$1" >diff -ruNp orig/net-mgmt/seafile/pkg-descr current/net-mgmt/seafile/pkg-descr >--- orig/net-mgmt/seafile/pkg-descr 2016-12-17 18:03:10.921194000 -0500 >+++ current/net-mgmt/seafile/pkg-descr 1969-12-31 19:00:00.000000000 -0500 >@@ -1,11 +0,0 @@ >-Seafile is a next-generation open source cloud storage system with >-advanced support for file syncing, privacy protection and teamwork. >-Collections of files are called libraries, and each library can be synced >-separately. A library can be encrypted with a user chosen password. This >-password is not stored on the server, so even the server admin cannot >-view a file's contents. >- >-Seafile allows users to create groups with file syncing, wiki, and >-discussion to enable easy collaboration around documents within a team. >- >-WWW: https://github.com/haiwen/seafile >diff -ruNp orig/net-mgmt/seafile/pkg-plist current/net-mgmt/seafile/pkg-plist >--- orig/net-mgmt/seafile/pkg-plist 2016-12-18 13:42:23.168599000 -0500 >+++ current/net-mgmt/seafile/pkg-plist 1969-12-31 19:00:00.000000000 -0500 >@@ -1,113 +0,0 @@ >-bin/seaf-cli >-bin/seaf-daemon >-bin/seafile-controller >-bin/seaf-server >-include/seafile/monitor-rpc.h >-include/seafile/seafile-object.h >-include/seafile/seafile-rpc.h >-include/seafile/seafile.h >-lib/libseafile.a >-lib/libseafile.so >-lib/libseafile.so.0 >-lib/libseafile.so.0.0.0 >-libdata/pkgconfig/libseafile.pc >-man/man1/seaf-cli.1.gz >-man/man1/seaf-daemon.1.gz >-%%SEAFILE_SERVER%%/check_init_admin.py >-%%SEAFILE_SERVER%%/reset-admin.sh >-%%SEAFILE_SERVER%%/seaf-fuse.sh >-%%SEAFILE_SERVER%%/seaf-gc.sh >-%%SEAFILE_SERVER%%/seafile.sh >-%%SEAFILE_SERVER%%/seafile/bin/seaf-fsck >-%%FUSE%%%%SEAFILE_SERVER%%/seafile/bin/seaf-fuse >-%%SEAFILE_SERVER%%/seafile/bin/seaf-cli.py >-%%SEAFILE_SERVER%%/seafile/bin/seaf-migrate >-%%SEAFILE_SERVER%%/seafile/bin/seaf-server >-%%SEAFILE_SERVER%%/seafile/bin/seaf-server-init >-%%SEAFILE_SERVER%%/seafile/bin/seafile-controller >-%%SEAFILE_SERVER%%/seafile/bin/seafserv-gc >-%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seafile/__init__.py >-%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seafile/__init__.pyc >-%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seafile/__init__.pyo >-%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seafile/rpcclient.py >-%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seafile/rpcclient.pyc >-%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seafile/rpcclient.pyo >-%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seaserv/__init__.py >-%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seaserv/__init__.pyc >-%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seaserv/__init__.pyo >-%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seaserv/api.py >-%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seaserv/api.pyc >-%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seaserv/api.pyo >-%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seaserv/service.py >-%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seaserv/service.pyc >-%%SEAFILE_SERVER%%/seafile/%%PYTHON_SITELIBDIR%%/seaserv/service.pyo >-%%PORTDOCS%%%%SEAFILE_SERVER%%/seafile/%%DOCSDIR%%/seafile-tutorial.doc >-%%SEAFILE_SERVER%%/breakpad.py >-%%SEAFILE_SERVER%%/seahub.sh >-%%SEAFILE_SERVER%%/setup-seafile-mysql.py >-%%SEAFILE_SERVER%%/setup-seafile-mysql.sh >-%%SEAFILE_SERVER%%/upgrade/add_collate.sh >-%%SEAFILE_SERVER%%/upgrade/db_update_1.3_1.4.py >-%%SEAFILE_SERVER%%/upgrade/db_update_helper.py >-%%SEAFILE_SERVER%%/upgrade/minor-upgrade.sh >-%%SEAFILE_SERVER%%/seaf-fsck.sh >-%%SEAFILE_SERVER%%/upgrade/fix_mysql_user.py >-%%SEAFILE_SERVER%%/upgrade/regenerate_secret_key.sh >-%%SEAFILE_SERVER%%/upgrade/sql/1.6.0/mysql/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/1.6.0/sqlite3/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/1.7.0/mysql/seafile.sql >-%%SEAFILE_SERVER%%/upgrade/sql/1.7.0/mysql/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/1.7.0/sqlite3/seafile.sql >-%%SEAFILE_SERVER%%/upgrade/sql/1.7.0/sqlite3/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/1.8.0/mysql/ccnet.sql >-%%SEAFILE_SERVER%%/upgrade/sql/1.8.0/mysql/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/1.8.0/sqlite3/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/2.0.0/mysql/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/2.0.0/sqlite3/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/2.1.0/mysql/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/2.1.0/sqlite3/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/2.2.0/mysql/ccnet.sql >-%%SEAFILE_SERVER%%/upgrade/sql/3.0.0/mysql/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/3.0.0/sqlite3/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/3.1.0/mysql/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/3.1.0/sqlite3/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/4.1.0/mysql/ccnet.sql >-%%SEAFILE_SERVER%%/upgrade/sql/4.1.0/mysql/seafile.sql >-%%SEAFILE_SERVER%%/upgrade/sql/4.1.0/sqlite3/ccnet/groupmgr.sql >-%%SEAFILE_SERVER%%/upgrade/sql/4.1.0/sqlite3/seafile.sql >-%%SEAFILE_SERVER%%/upgrade/sql/4.2.0/mysql/seafile.sql >-%%SEAFILE_SERVER%%/upgrade/sql/4.2.0/mysql/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/4.2.0/sqlite3/seafile.sql >-%%SEAFILE_SERVER%%/upgrade/sql/4.2.0/sqlite3/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/4.3.0/mysql/.gitkeep >-%%SEAFILE_SERVER%%/upgrade/sql/4.3.0/sqlite3/.gitkeep >-%%SEAFILE_SERVER%%/upgrade/sql/4.4.0/mysql/.gitkeep >-%%SEAFILE_SERVER%%/upgrade/sql/4.4.0/sqlite3/.gitkeep >-%%SEAFILE_SERVER%%/upgrade/upgrade_1.2_1.3.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_1.3_1.4.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_1.4_1.5.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_1.5_1.6.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_1.6_1.7.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_1.7_1.8.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_1.8_2.0.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_2.0_2.1.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_2.1_2.2.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_2.2_3.0.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_3.0_3.1.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_3.1_4.0.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_4.0_4.1.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_4.1_4.2.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_4.2_4.3.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_4.3_4.4.sh >-%%SEAFILE_SERVER%%/upgrade/sql/5.0.0/mysql/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/5.0.0/sqlite3/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/5.1.0/mysql/seafile.sql >-%%SEAFILE_SERVER%%/upgrade/sql/5.1.0/mysql/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/5.1.0/sqlite3/seafile.sql >-%%SEAFILE_SERVER%%/upgrade/sql/5.1.0/sqlite3/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/6.0.0/mysql/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/sql/6.0.0/sqlite3/seahub.sql >-%%SEAFILE_SERVER%%/upgrade/upgrade_5.1_6.0.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_5.0_5.1.sh >-%%SEAFILE_SERVER%%/upgrade/upgrade_4.4_5.0.sh >-@dir(%%USERS%%,%%GROUPS%%,755) %%HAIWENDIR%% >diff -ruNp orig/net-mgmt/seafile-client/Makefile current/net-mgmt/seafile-client/Makefile >--- orig/net-mgmt/seafile-client/Makefile 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/Makefile 2016-12-18 13:45:16.267083000 -0500 >@@ -0,0 +1,78 @@ >+# $FreeBSD$ >+ >+PORTNAME= seafile-client >+PORTVERSION= 6.0.1 >+DISTVERSIONPREFIX= v >+CATEGORIES= net-mgmt >+ >+MAINTAINER= ultima1252@gmail.com >+COMMENT= Open Source Cloud Storage (Client) >+ >+LICENSE= GPLv3 >+LICENSE_FILE= ${WRKSRC}/LICENSE.txt >+ >+BUILD_DEPENDS= valac:lang/vala >+LIB_DEPENDS= libsearpc.so:devel/libsearpc \ >+ libevhtp.so:www/libevhtp \ >+ libzdb.so:databases/libzdb \ >+ libcurl.so:ftp/curl \ >+ libinotify.so:devel/libinotify \ >+ libccnet.so:net-mgmt/ccnet-client \ >+ libevent.so:devel/libevent2 \ >+ libuuid.so:misc/e2fsprogs-libuuid \ >+ libjansson.so:devel/jansson >+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 \ >+ ${PYTHON_PKGNAMEPREFIX}urllib3>0:net/py-urllib3 \ >+ bash:shells/bash >+ >+CONFLICTS= seafile-server-[0-9]* >+ >+USE_GITHUB= yes >+GH_ACCOUNT= haiwen >+GH_PROJECT= seafile >+ >+USES= autoreconf gettext iconv libarchive libtool mysql pathfix \ >+ pkgconfig python:-2.7 shebangfix sqlite ssl >+USE_GNOME= glib20 >+SHEBANG_FILES= scripts/*.sh scripts/upgrade/*.sh tests/*.py tests/basic/*.sh \ >+ tests/sync-auto-test/*.template *.sh scripts/build/*.py \ >+ scripts/*.py *.py scripts/upgrade/*.py app/seaf-cli \ >+ tools/seafile-admin >+GNU_CONFIGURE= yes >+USE_LDCONFIG= yes >+CONFIGURE_ENV= SSL_CFLAGS="${OPENSSLINC}" SSL_LIBS="-L${OPENSSLLIB} -lssl -lcrypto" >+ >+INSTALL_TARGET= install-strip >+CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/evhtp >+LDFLAGS+= -L${LOCALBASE}/lib >+ >+OPTIONS_DEFINE= FUSE RIAK >+OPTIONS_SUB= yes >+ >+FUSE_DESC= Use file system in userspace >+RIAK_DESC= Use distributed noSQL database >+ >+FUSE_CONFIGURE_ENABLE= fuse >+FUSE_LIB_DEPENDS= libfuse.so:sysutils/fusefs-libs >+ >+RIAK_CONFIGURE_ENABLE= riak >+RIAK_RUN_DEPENDS= riak:databases/riak >+ >+OPTIONS_DEFAULT= FUSE >+OPTIONS_EXCLUDE_DragonFly= FUSE >+ >+.include <bsd.port.options.mk> >+ >+post-patch: >+# Fix P_KTHREAD r295435 >+.if ${OSVERSION} >= 1100097 >+ ${REINPLACE_CMD} 's/P_KTHREAD/P_KPROC/' ${WRKSRC}/lib/utils.c >+.endif >+ ${REINPLACE_CMD} 's/python/${PYTHON_VERSION}/' \ >+ ${WRKSRC}/scripts/upgrade/regenerate_secret_key.sh >+ ${REINPLACE_CMD} -e 's|^INSTALL.*|INSTALLPATH="${PREFIX}/${SEAFILE_SERVER}/seafile"|' \ >+ ${WRKSRC}/scripts/seaf-cli-wrapper.sh >+ ${REINPLACE_CMD} 's/<evhtp.h>/<evhtp\/evhtp.h>/' ${WRKSRC}/server/upload-file.c \ >+ ${WRKSRC}/server/access-file.c ${WRKSRC}/server/http-server.c >+ >+.include <bsd.port.mk> >diff -ruNp orig/net-mgmt/seafile-client/distinfo current/net-mgmt/seafile-client/distinfo >--- orig/net-mgmt/seafile-client/distinfo 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/distinfo 2016-12-18 13:32:49.988217000 -0500 >@@ -0,0 +1,3 @@ >+TIMESTAMP = 1481772891 >+SHA256 (haiwen-seafile-v6.0.1_GH0.tar.gz) = c212833ff21af19554d216ab3f5c01c3a5878d4bd30b4f71c67ec9b71416a095 >+SIZE (haiwen-seafile-v6.0.1_GH0.tar.gz) = 1154256 >diff -ruNp orig/net-mgmt/seafile-client/files/patch-common_obj-backend-fs.c current/net-mgmt/seafile-client/files/patch-common_obj-backend-fs.c >--- orig/net-mgmt/seafile-client/files/patch-common_obj-backend-fs.c 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/files/patch-common_obj-backend-fs.c 2016-12-17 18:03:10.918922000 -0500 >@@ -0,0 +1,20 @@ >+--- common/obj-backend-fs.c.orig 2015-09-21 03:42:11 UTC >++++ common/obj-backend-fs.c >+@@ -101,7 +101,7 @@ obj_backend_fs_read (ObjBackend *bend, >+ static int >+ fsync_obj_contents (int fd) >+ { >+-#ifdef __linux__ >++#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >+ /* Some file systems may not support fsync(). >+ * In this case, just skip the error. >+ */ >+@@ -153,7 +153,7 @@ fsync_obj_contents (int fd) >+ static int >+ rename_and_sync (const char *tmp_path, const char *obj_path) >+ { >+-#ifdef __linux__ >++#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >+ char *parent_dir; >+ int ret = 0; >+ >diff -ruNp orig/net-mgmt/seafile-client/files/patch-configure.ac current/net-mgmt/seafile-client/files/patch-configure.ac >--- orig/net-mgmt/seafile-client/files/patch-configure.ac 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/files/patch-configure.ac 2016-12-17 18:03:10.919126000 -0500 >@@ -0,0 +1,119 @@ >+--- configure.ac.orig 2016-05-10 12:25:35 UTC >++++ configure.ac >+@@ -50,8 +50,16 @@ else >+ AC_MSG_RESULT(no) >+ fi >+ >++AC_MSG_CHECKING(for BSD) >++if test `uname | grep -e BSD -e DragonFly | wc -l` = "1"; then >++ bbsd=true >++ AC_MSG_RESULT(compile in BSD) >++else >++ AC_MSG_RESULT(no) >++fi >++ >+ AC_MSG_CHECKING(for Linux) >+-if test "$bmac" != "true" -a "$bwin32" != "true"; then >++if test "$bmac" != "true" -a "$bwin32" != "true" -a "$bbsd" != "true"; then >+ blinux=true >+ AC_MSG_RESULT(compile in linux) >+ else >+@@ -93,6 +101,11 @@ if test "$bwin32" != true; then >+ [compile_fuse=$enableval],[compile_fuse="yes"]) >+ fi >+ >++if test "$bbsd" = true; then >++ AC_ARG_ENABLE(fuse, AC_HELP_STRING([--enable-fuse], [enable fuse virtual file system]), >++ [compile_fuse=$enableval],[compile_fuse="no"]) >++fi >++ >+ AC_ARG_ENABLE(client, AC_HELP_STRING([--enable-client], [enable client]), >+ [compile_client=$enableval],[compile_client="yes"]) >+ >+@@ -148,6 +161,7 @@ AM_CONDITIONAL([COMPILE_FUSE], [test "${ >+ >+ AM_CONDITIONAL([WIN32], [test "$bwin32" = "true"]) >+ AM_CONDITIONAL([MACOS], [test "$bmac" = "true"]) >++AM_CONDITIONAL([BSD], [test "$bbsd" = "true"]) >+ AM_CONDITIONAL([LINUX], [test "$blinux" = "true"]) >+ >+ >+@@ -193,6 +207,9 @@ if test "$bwin32" = true; then >+ LIB_MAC= >+ MSVC_CFLAGS="-D__MSVCRT__ -D__MSVCRT_VERSION__=0x0601" >+ LIB_CRYPT32=-lcrypt32 >++ ZLIB_LIBS= >++ LIB_INOTIFY= >++ LIB_KVM= >+ elif test "$bmac" = true ; then >+ LIB_WS32= >+ LIB_GDI32= >+@@ -207,6 +224,26 @@ elif test "$bmac" = true ; then >+ LIB_MAC="-framework CoreServices" >+ LIB_CRYPT32= >+ LIB_ICONV=-liconv >++ ZLIB_LIBS= >++ LIB_INOTIFY= >++ LIB_KVM= >++elif test "$bbsd" = true ; then >++ LIB_WS32= >++ LIB_GDI32= >++ LIB_RT= >++ LIB_INTL= >++ LIB_RESOLV= >++ LIB_UUID=-luuid >++ LIB_IPHLPAPI= >++ LIB_SHELL32= >++ LIB_PSAPI= >++ LIB_MAC= >++ MSVC_CFLAGS= >++ LIB_CRYPT32= >++ LIB_ICONV=-liconv >++ ZLIB_LIBS=-lz >++ LIB_INOTIFY=-linotify >++ LIB_KVM=-lkvm >+ else >+ LIB_WS32= >+ LIB_GDI32= >+@@ -220,6 +257,9 @@ else >+ LIB_MAC= >+ MSVC_CFLAGS= >+ LIB_CRYPT32= >++ ZLIB_LIBS=-lz >++ LIB_INOTIFY=-linotify >++ LIB_KVM= >+ fi >+ >+ AC_SUBST(LIB_WS32) >+@@ -232,6 +272,9 @@ AC_SUBST(LIB_IPHLPAPI) >+ AC_SUBST(LIB_SHELL32) >+ AC_SUBST(LIB_PSAPI) >+ AC_SUBST(LIB_MAC) >++AC_SUBST(ZLIB_LIBS) >++AC_SUBST(LIB_INOTIFY) >++AC_SUBST(LIB_KVM) >+ AC_SUBST(MSVC_CFLAGS) >+ AC_SUBST(LIB_CRYPT32) >+ AC_SUBST(LIB_ICONV) >+@@ -246,7 +289,9 @@ ZDB_REQUIRED=2.10 >+ #LIBNAUTILUS_EXTENSION_REQUIRED=2.30.1 >+ CURL_REQUIRED=7.17 >+ FUSE_REQUIRED=2.7.3 >++if test "$blinux" = true ; then >+ ZLIB_REQUIRED=1.2.0 >++fi >+ >+ PKG_CHECK_MODULES(SSL, [openssl]) >+ AC_SUBST(SSL_CFLAGS) >+@@ -276,9 +321,11 @@ PKG_CHECK_MODULES(LIBEVENT, [libevent >= >+ AC_SUBST(LIBEVENT_CFLAGS) >+ AC_SUBST(LIBEVENT_LIBS) >+ >++if test "$blinux" = true ; then >+ PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_REQUIRED]) >+ AC_SUBST(ZLIB_CFLAGS) >+ AC_SUBST(ZLIB_LIBS) >++fi >+ >+ if test x${compile_python} = xyes; then >+ AM_PATH_PYTHON([2.6]) >diff -ruNp orig/net-mgmt/seafile-client/files/patch-controller_seafile-controller.c current/net-mgmt/seafile-client/files/patch-controller_seafile-controller.c >--- orig/net-mgmt/seafile-client/files/patch-controller_seafile-controller.c 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/files/patch-controller_seafile-controller.c 2016-12-17 18:03:10.919291000 -0500 >@@ -0,0 +1,104 @@ >+--- controller/seafile-controller.c.orig 2015-09-21 03:42:11 UTC >++++ controller/seafile-controller.c >+@@ -17,6 +17,19 @@ >+ #include "log.h" >+ #include "seafile-controller.h" >+ >++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >++#include <sys/sysctl.h> >++#include <sys/types.h> >++#include <sys/user.h> >++#include <limits.h> >++ >++#ifndef WITH_PROC_FS >++#define WITH_PROC_FS g_file_test("/proc/curproc", G_FILE_TEST_EXISTS) >++#endif >++ >++static char *command_name = NULL; >++#endif >++ >+ #define CHECK_PROCESS_INTERVAL 10 /* every 10 seconds */ >+ >+ SeafileController *ctl; >+@@ -247,7 +260,20 @@ static void >+ init_seafile_path () >+ { >+ GError *error = NULL; >++#if defined(__linux__) >+ char *executable = g_file_read_link ("/proc/self/exe", &error); >++#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >++ /* >++ * seafile.sh starts the process using abs path >++ */ >++ char executable[_POSIX_PATH_MAX]; >++ memset(executable, 0, _POSIX_PATH_MAX); >++ char * rc = realpath(command_name, executable); >++ if (!rc) { >++ seaf_warning ("failed to readpath: %s\n", executable); >++ return; >++ } >++#endif >+ char *tmp = NULL; >+ if (error != NULL) { >+ seaf_warning ("failed to readlink: %s\n", error->message); >+@@ -261,7 +287,9 @@ init_seafile_path () >+ >+ topdir = g_path_get_dirname (installpath); >+ >++#if defined(__linux__) >+ g_free (executable); >++#endif >+ g_free (tmp); >+ } >+ >+@@ -402,11 +430,40 @@ need_restart (int which) >+ return FALSE; >+ } else { >+ char buf[256]; >++ gboolean with_procfs; >++#if defined(__linux__) >++ with_procfs = g_file_test("/proc/self", G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR); >++#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) >++ with_procfs = g_file_test("/proc/curproc", G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR); >++#else >++ with_procfs = FALSE; >++#endif >++ if (with_procfs) { >+ snprintf (buf, sizeof(buf), "/proc/%d", pid); >+ if (g_file_test (buf, G_FILE_TEST_IS_DIR)) { >+ return FALSE; >+ } else { >+ return TRUE; >++ } >++ >++ } else { >++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >++#ifdef __OpenBSD__ >++ int min[6] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid, sizeof(struct kinfo_proc), 1}; >++#else >++ int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid}; >++#endif >++ size_t len = sizeof(struct kinfo_proc); >++ struct kinfo_proc kp; >++ if (sysctl(mib, sizeof(mib)/sizeof(mib[0]), &kp, &len, NULL, 0) != -1 && >++ len == sizeof(struct kinfo_proc)) { >++ return FALSE; >++ } else { >++ return TRUE; >++ } >++#else >++ return FALSE; >++#endif >+ } >+ } >+ } >+@@ -877,6 +934,9 @@ int main (int argc, char **argv) >+ exit (1); >+ } >+ >++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >++ command_name = argv[0]; >++#endif >+ char *config_dir = DEFAULT_CONFIG_DIR; >+ char *seafile_dir = NULL; >+ char *logdir = NULL; >diff -ruNp orig/net-mgmt/seafile-client/files/patch-daemon_Makefile.am current/net-mgmt/seafile-client/files/patch-daemon_Makefile.am >--- orig/net-mgmt/seafile-client/files/patch-daemon_Makefile.am 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/files/patch-daemon_Makefile.am 2016-12-17 18:03:10.919424000 -0500 >@@ -0,0 +1,22 @@ >+--- daemon/Makefile.am.orig 2016-04-15 23:08:45 UTC >++++ daemon/Makefile.am >+@@ -63,6 +63,10 @@ if LINUX >+ wt_monitor_src = wt-monitor.c wt-monitor-linux.c wt-monitor-structs.c >+ endif >+ >++if BSD >++wt_monitor_src = wt-monitor.c wt-monitor-linux.c wt-monitor-structs.c >++endif >++ >+ if WIN32 >+ wt_monitor_src = wt-monitor.c wt-monitor-win32.c wt-monitor-structs.c >+ endif >+@@ -126,6 +130,7 @@ seaf_daemon_LDADD = $(top_builddir)/lib/ >+ @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ \ >+ $(top_builddir)/common/cdc/libcdc.la \ >+ $(top_builddir)/common/index/libindex.la @LIB_WS32@ @LIB_CRYPT32@ \ >+- @SEARPC_LIBS@ @CCNET_LIBS@ @GNOME_KEYRING_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ @ZLIB_LIBS@ @CURL_LIBS@ @BPWRAPPER_LIBS@ >++ @SEARPC_LIBS@ @CCNET_LIBS@ @GNOME_KEYRING_LIBS@ @JANSSON_LIBS@ \ >++ @LIB_MAC@ @ZLIB_LIBS@ @CURL_LIBS@ @LIB_INOTIFY@ @BPWRAPPER_LIBS@ >+ >+ seaf_daemon_LDFLAGS = @STATIC_COMPILE@ @CONSOLE@ >diff -ruNp orig/net-mgmt/seafile-client/files/patch-daemon_http-tx-mgr.c current/net-mgmt/seafile-client/files/patch-daemon_http-tx-mgr.c >--- orig/net-mgmt/seafile-client/files/patch-daemon_http-tx-mgr.c 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/files/patch-daemon_http-tx-mgr.c 2016-12-17 18:03:10.919556000 -0500 >@@ -0,0 +1,25 @@ >+--- daemon/http-tx-mgr.c.orig 2015-09-21 03:42:11 UTC >++++ daemon/http-tx-mgr.c >+@@ -58,6 +58,22 @@ >+ #define USER_AGENT_OS "Linux" >+ #endif >+ >++#ifdef __FreeBSD__ >++#define USER_AGENT_OS "FreeBSD" >++#endif >++ >++#ifdef __DragonFly__ >++#define USER_AGENT_OS "DragonFly" >++#endif >++ >++#ifdef __NetBSD__ >++#define USER_AGENT_OS "NetBSD" >++#endif >++ >++#ifdef __OpenBSD__ >++#define USER_AGENT_OS "OpenBSD" >++#endif >++ >+ struct _Connection { >+ CURL *curl; >+ gint64 ctime; /* Used to clean up unused connection. */ >diff -ruNp orig/net-mgmt/seafile-client/files/patch-daemon_vc-utils.c current/net-mgmt/seafile-client/files/patch-daemon_vc-utils.c >--- orig/net-mgmt/seafile-client/files/patch-daemon_vc-utils.c 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/files/patch-daemon_vc-utils.c 2016-12-18 13:32:49.988340000 -0500 >@@ -0,0 +1,11 @@ >+--- daemon/vc-utils.c.orig 2016-12-03 06:02:47 UTC >++++ daemon/vc-utils.c >+@@ -736,7 +736,7 @@ checkout_entry (struct cache_entry *ce, >+ gboolean force_conflict = FALSE; >+ >+ path_in = g_build_path ("/", o->base, ce->name, NULL); >+-#ifndef __linux__ >++#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__DragonFly__) && !defined(__NetBSD__) && !defined(__OpenBSD__) >+ path = build_case_conflict_free_path (o->base, ce->name, >+ conflict_hash, no_conflict_hash, >+ &case_conflict, >diff -ruNp orig/net-mgmt/seafile-client/files/patch-lib_Makefile.am current/net-mgmt/seafile-client/files/patch-lib_Makefile.am >--- orig/net-mgmt/seafile-client/files/patch-lib_Makefile.am 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/files/patch-lib_Makefile.am 2016-12-17 18:03:10.919986000 -0500 >@@ -0,0 +1,29 @@ >+--- lib/Makefile.am.orig 2015-10-12 04:12:33 UTC >++++ lib/Makefile.am >+@@ -53,6 +53,7 @@ libseafile_common_la_SOURCES = ${seafile >+ libseafile_common_la_LDFLAGS = -no-undefined >+ libseafile_common_la_LIBADD = @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ -lcrypto @LIB_GDI32@ \ >+ @LIB_UUID@ @LIB_WS32@ @LIB_PSAPI@ -lsqlite3 \ >++ @LIB_KVM@ \ >+ @LIBEVENT_LIBS@ @SEARPC_LIBS@ @LIB_SHELL32@ \ >+ @ZLIB_LIBS@ >+ >+@@ -74,7 +75,7 @@ vala.stamp: ${seafile_object_define} >+ rm -f ${seafile_object_gen} >+ @rm -f vala.tmp >+ @touch vala.tmp >+- valac -C --pkg posix $^ >++ valac -C --pkg posix ${seafile_object_define} >+ @mv -f vala.tmp $@ >+ >+ ${seafile_object_gen}: vala.stamp >+@@ -90,5 +91,9 @@ install-data-local: >+ if MACOS >+ sed -i '' -e "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles) >+ else >++if BSD >++ sed -i '' "s|(DESTDIR)|${PREFIX}|g" $(pcfiles) >++else >+ ${SED} -i "s|(DESTDIR)|${DESTDIR}|g" $(pcfiles) >+ endif >++endif >diff -ruNp orig/net-mgmt/seafile-client/files/patch-lib_net.c current/net-mgmt/seafile-client/files/patch-lib_net.c >--- orig/net-mgmt/seafile-client/files/patch-lib_net.c 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/files/patch-lib_net.c 2016-12-17 18:03:10.920122000 -0500 >@@ -0,0 +1,14 @@ >+--- lib/net.c.orig 2015-09-21 03:42:11 UTC >++++ lib/net.c >+@@ -157,7 +157,11 @@ ccnet_net_bind_tcp (int port, int nonblo >+ >+ snprintf (buf, sizeof(buf), "%d", port); >+ >++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >++ if ( (n = getaddrinfo("0.0.0.0", buf, &hints, &res) ) != 0) { >++#else >+ if ( (n = getaddrinfo(NULL, buf, &hints, &res) ) != 0) { >++#endif >+ ccnet_warning ("getaddrinfo fails: %s\n", gai_strerror(n)); >+ return -1; >+ } >diff -ruNp orig/net-mgmt/seafile-client/files/patch-lib_utils.c current/net-mgmt/seafile-client/files/patch-lib_utils.c >--- orig/net-mgmt/seafile-client/files/patch-lib_utils.c 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/files/patch-lib_utils.c 2016-12-17 18:03:10.920282000 -0500 >@@ -0,0 +1,195 @@ >+--- lib/utils.c.orig 2015-09-21 03:42:11 UTC >++++ lib/utils.c >+@@ -56,6 +56,16 @@ >+ >+ #include <zlib.h> >+ >++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >++#include <netinet/in.h> >++#include <stdlib.h> >++#include <kvm.h> >++#include <paths.h> >++#include <sys/param.h> >++#include <sys/sysctl.h> >++#include <sys/user.h> >++#endif >++ >+ extern int inet_pton(int af, const char *src, void *dst); >+ >+ >+@@ -2112,14 +2122,19 @@ wchar_from_utf8 (const char *utf8) >+ >+ #endif /* ifdef WIN32 */ >+ >+-#ifdef __linux__ >+ /* read the link of /proc/123/exe and compare with `process_name' */ >+ static int >+ find_process_in_dirent(struct dirent *dir, const char *process_name) >+ { >+ char path[512]; >+ /* fisrst construct a path like /proc/123/exe */ >++#if defined(__linux__) >+ if (sprintf (path, "/proc/%s/exe", dir->d_name) < 0) { >++#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) >++ if (sprintf (path, "/proc/%s/file", dir->d_name) < 0) { >++#else >++ if (1) { >++#endif >+ return -1; >+ } >+ >+@@ -2143,7 +2158,8 @@ find_process_in_dirent(struct dirent *di >+ } >+ >+ /* read the /proc fs to determine whether some process is running */ >+-gboolean process_is_running (const char *process_name) >++static gboolean >++process_is_running_procfs (const char *process_name) >+ { >+ DIR *proc_dir = opendir("/proc"); >+ if (!proc_dir) { >+@@ -2168,7 +2184,8 @@ gboolean process_is_running (const char >+ return FALSE; >+ } >+ >+-int count_process(const char *process_name) >++static int >++count_process_procfs(const char *process_name) >+ { >+ int count = 0; >+ DIR *proc_dir = opendir("/proc"); >+@@ -2192,6 +2209,14 @@ int count_process(const char *process_na >+ return count; >+ } >+ >++#ifdef __linux__ >++gboolean process_is_running(const char *process_name) { >++ return process_is_running_procfs(process_name); >++} >++ >++int count_process(const char *process_name) { >++ return count_process_procfs(process_name); >++} >+ #endif >+ >+ #ifdef __APPLE__ >+@@ -2202,6 +2227,119 @@ gboolean process_is_running (const char >+ } >+ #endif >+ >++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >++#if defined(__FreeBSD__) >++#define PSKIP(kp) ((kp)->ki_pid == mypid || \ >++ (!kthreads && ((kp)->ki_flag & P_KTHREAD) != 0)) >++#define KVM_OPENFILES(exec, coref, buf) \ >++ kvm_openfiles(exec, coref, NULL, O_RDONLY, buf) >++#define KVM_GETPROCS(kd, plist, nproc) \ >++ kvm_getprocs(kd, KERN_PROC_PROC, 0, &nproc) >++ >++#elif defined(__DragonFly__) >++#define PSKIP(kp) ((kp)->kp_pid == mypid || \ >++ (!kthreads && ((kp)->kp_flags & P_SYSTEM) != 0)) >++#define KVM_OPENFILES(exec, coref, buf) \ >++ kvm_openfiles(exec, coref, NULL, O_RDONLY, buf) >++#define KVM_GETPROCS(kd, plist, nproc) \ >++ kvm_getprocs(kd, KERN_PROC_ALL, 0, &nproc) >++ >++#elif defined(__NetBSD__) >++#define PSKIP(kp) ((kp)->kp_pid == mypid || \ >++ ((kp)->p_flag & P_SYSTEM) != 0) >++#define KVM_OPENFILES(exec, coref, buf) \ >++ kvm_openfiles(exec, coref, NULL, KVM_NO_FILES, buf) >++#define KVM_GETPROCS(kd, plist, nproc) \ >++ kvm_getprocs(kd, KERN_PROC_ALL, 0, sizeof(*plist), &nproc) >++ >++#elif defined(__OpenBSD__) >++#define PSKIP(kp) ((kp)->kp_pid == mypid || \ >++ ((kp)->p_flag & (P_SYSTEM | P_THREAD)) != 0) >++#define KVM_OPENFILES(exec, coref, buf) \ >++ kvm_openfiles(exec, coref, NULL, KVM_NO_FILES, buf) >++#define KVM_GETPROCS(kd, plist, nproc) \ >++ kvm_getprocs(kd, KERN_PROC_ALL, 0, sizeof(*plist), &nproc) >++ >++#else >++#define PSKIP(kp) 0 >++#define KVM_OPENFILES(exec, coref, buf) 0 >++#define KVM_GETPROCS(kd, plist, nproc) 0 >++#endif >++ >++#ifndef WITH_PROC_FS >++#define WITH_PROC_FS g_file_test("/proc/curproc", G_FILE_TEST_EXISTS) >++#endif >++ >++static int >++count_running_process_kvm(const char *process_name) { >++ >++ >++ static kvm_t *kd; >++ static struct kinfo_proc *plist; >++ static int nproc; >++ static pid_t mypid; >++ static int kthreads; >++ >++ char buf[_POSIX2_LINE_MAX]; >++ const char * execf, *coref; >++ char **pargv; >++ int i, selected_nproc; >++ struct kinfo_proc *kp; >++ >++ selected_nproc = 0; >++ execf = NULL; >++ coref = _PATH_DEVNULL; >++ >++ mypid = getpid(); >++ kd = KVM_OPENFILES(execf, coref, buf); >++ if (kd == NULL) { >++ fprintf(stderr, "Error: Cannot open kernel files (%s)", buf); >++ exit(1); >++ } >++ >++ plist = KVM_GETPROCS(kd, plist, nproc); >++ if (plist == NULL) { >++ fprintf(stderr, "Error: Cannot get process list (%s)", kvm_geterr(kd)); >++ exit(1); >++ } >++ >++ for(i = 0, kp = plist; i < nproc; i++, kp++) { >++ if (PSKIP(kp)) { >++ continue; >++ } >++ if ((pargv = kvm_getargv(kd, kp, 0)) != NULL) { >++ if (strstr(pargv[0], process_name) != NULL) { >++ selected_nproc += 1; >++ } >++ } >++ } >++ kvm_close(kd); >++ kvm_close(kd); >++ >++ return selected_nproc; >++} >++ >++gboolean >++process_is_running(const char * process_name) { >++ if (WITH_PROC_FS) { >++ return process_is_running_procfs(process_name); >++ } >++ if (count_running_process_kvm(process_name) > 0) { >++ return TRUE; >++ } else { >++ return FALSE; >++ } >++} >++ >++int >++count_process(const char * process_name) { >++ if (WITH_PROC_FS) { >++ return count_process_procfs(process_name); >++ } >++ return count_running_process_kvm(process_name); >++} >++#endif >++ >+ char* >+ ccnet_object_type_from_id (const char *object_id) >+ { >diff -ruNp orig/net-mgmt/seafile-client/files/patch-lib_utils.h current/net-mgmt/seafile-client/files/patch-lib_utils.h >--- orig/net-mgmt/seafile-client/files/patch-lib_utils.h 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/files/patch-lib_utils.h 2016-12-17 18:03:10.920404000 -0500 >@@ -0,0 +1,23 @@ >+--- lib/utils.h.orig 2015-09-21 03:42:11 UTC >++++ lib/utils.h >+@@ -3,6 +3,9 @@ >+ #ifndef CCNET_UTILS_H >+ #define CCNET_UTILS_H >+ >++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) >++#include <netinet/in.h> >++#endif >+ #include <sys/time.h> >+ #include <time.h> >+ #include <stdint.h> >+@@ -13,7 +16,9 @@ >+ #include <stdlib.h> >+ #include <sys/stat.h> >+ >+-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) >++#if defined(__FreeBSD__) || defined(__DragonFly__) >++#include <evutil.h> >++#elif defined(__NetBSD__) || defined(__OpenBSD__) >+ #include <event2/util.h> >+ #else >+ #include <evutil.h> >diff -ruNp orig/net-mgmt/seafile-client/files/patch-scripts_setup-seafile.sh current/net-mgmt/seafile-client/files/patch-scripts_setup-seafile.sh >--- orig/net-mgmt/seafile-client/files/patch-scripts_setup-seafile.sh 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/files/patch-scripts_setup-seafile.sh 2016-12-17 18:03:10.920533000 -0500 >@@ -0,0 +1,15 @@ >+--- scripts/setup-seafile.sh.orig 2015-10-12 04:12:33 UTC >++++ scripts/setup-seafile.sh >+@@ -340,7 +340,11 @@ fi >+ } >+ >+ function copy_user_manuals() { >+- src_docs_dir=${INSTALLPATH}/seafile/docs/ >++ if [ $(uname | grep -e BSD -e DragonFly | wc -l) == "1" ]; then >++ src_docs_dir=${INSTALLPATH}/seafile/share/doc/seafile/ >++ else >++ src_docs_dir=${INSTALLPATH}/seafile/docs/ >++ fi >+ library_template_dir=${seafile_data_dir}/library-template >+ mkdir -p ${library_template_dir} >+ cp -f ${src_docs_dir}/*.doc ${library_template_dir} >diff -ruNp orig/net-mgmt/seafile-client/files/patch-scripts_upgrade_regenerate__secret__key.sh current/net-mgmt/seafile-client/files/patch-scripts_upgrade_regenerate__secret__key.sh >--- orig/net-mgmt/seafile-client/files/patch-scripts_upgrade_regenerate__secret__key.sh 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/files/patch-scripts_upgrade_regenerate__secret__key.sh 2016-12-17 18:03:10.920657000 -0500 >@@ -0,0 +1,10 @@ >+--- scripts/upgrade/regenerate_secret_key.sh.orig 2016-01-29 17:25:05 UTC >++++ scripts/upgrade/regenerate_secret_key.sh >+@@ -10,4 +10,6 @@ seahub_settings_py=${TOPDIR}/seahub_sett >+ >+ line="SECRET_KEY = \"$(python $seahub_secret_keygen)\"" >+ >+-sed -i -e "/SECRET_KEY/c\\$line" $seahub_settings_py >++sed -i.bak -e "/SECRET_KEY/c\\ >++$line >++" $seahub_settings_py >diff -ruNp orig/net-mgmt/seafile-client/files/patch-server_access-file.c current/net-mgmt/seafile-client/files/patch-server_access-file.c >--- orig/net-mgmt/seafile-client/files/patch-server_access-file.c 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/files/patch-server_access-file.c 2016-12-17 18:03:10.920780000 -0500 >@@ -0,0 +1,54 @@ >+--- server/access-file.c.orig 2015-11-12 02:40:40 UTC >++++ server/access-file.c >+@@ -221,10 +221,10 @@ write_block_data_cb (struct bufferevent >+ bev->cbarg = data->saved_cb_arg; >+ >+ /* Resume reading incomming requests. */ >+- evhtp_request_resume (data->req); >+- >+ evhtp_send_reply_end (data->req); >+ >++ evhtp_request_resume (data->req); >++ >+ free_sendblock_data (data); >+ return; >+ } >+@@ -306,10 +306,10 @@ next: >+ bev->cbarg = data->saved_cb_arg; >+ >+ /* Resume reading incomming requests. */ >+- evhtp_request_resume (data->req); >+- >+ evhtp_send_reply_end (data->req); >+ >++ evhtp_request_resume (data->req); >++ >+ free_sendfile_data (data); >+ return; >+ } >+@@ -403,10 +403,10 @@ write_dir_data_cb (struct bufferevent *b >+ bev->cbarg = data->saved_cb_arg; >+ >+ /* Resume reading incomming requests. */ >+- evhtp_request_resume (data->req); >+- >+ evhtp_send_reply_end (data->req); >+ >++ evhtp_request_resume (data->req); >++ >+ free_senddir_data (data); >+ return; >+ } >+@@ -710,10 +710,10 @@ finish_file_range_request (struct buffer >+ bev->cbarg = data->saved_cb_arg; >+ >+ /* Resume reading incomming requests. */ >+- evhtp_request_resume (data->req); >+- >+ evhtp_send_reply_end (data->req); >+ >++ evhtp_request_resume (data->req); >++ >+ free_send_file_range_data (data); >+ } >+ >diff -ruNp orig/net-mgmt/seafile-client/pkg-descr current/net-mgmt/seafile-client/pkg-descr >--- orig/net-mgmt/seafile-client/pkg-descr 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/pkg-descr 2016-12-17 18:03:10.921194000 -0500 >@@ -0,0 +1,11 @@ >+Seafile is a next-generation open source cloud storage system with >+advanced support for file syncing, privacy protection and teamwork. >+Collections of files are called libraries, and each library can be synced >+separately. A library can be encrypted with a user chosen password. This >+password is not stored on the server, so even the server admin cannot >+view a file's contents. >+ >+Seafile allows users to create groups with file syncing, wiki, and >+discussion to enable easy collaboration around documents within a team. >+ >+WWW: https://github.com/haiwen/seafile >diff -ruNp orig/net-mgmt/seafile-client/pkg-plist current/net-mgmt/seafile-client/pkg-plist >--- orig/net-mgmt/seafile-client/pkg-plist 1969-12-31 19:00:00.000000000 -0500 >+++ current/net-mgmt/seafile-client/pkg-plist 2016-12-18 13:32:49.988492000 -0500 >@@ -0,0 +1,28 @@ >+bin/seaf-cli >+bin/seaf-daemon >+include/seafile/monitor-rpc.h >+include/seafile/seafile-object.h >+include/seafile/seafile-rpc.h >+include/seafile/seafile.h >+lib/libseafile.a >+lib/libseafile.so >+lib/libseafile.so.0 >+lib/libseafile.so.0.0.0 >+%%PYTHON_SITELIBDIR%%/seafile/__init__.py >+%%PYTHON_SITELIBDIR%%/seafile/__init__.pyc >+%%PYTHON_SITELIBDIR%%/seafile/__init__.pyo >+%%PYTHON_SITELIBDIR%%/seafile/rpcclient.py >+%%PYTHON_SITELIBDIR%%/seafile/rpcclient.pyc >+%%PYTHON_SITELIBDIR%%/seafile/rpcclient.pyo >+%%PYTHON_SITELIBDIR%%/seaserv/__init__.py >+%%PYTHON_SITELIBDIR%%/seaserv/__init__.pyc >+%%PYTHON_SITELIBDIR%%/seaserv/__init__.pyo >+%%PYTHON_SITELIBDIR%%/seaserv/api.py >+%%PYTHON_SITELIBDIR%%/seaserv/api.pyc >+%%PYTHON_SITELIBDIR%%/seaserv/api.pyo >+%%PYTHON_SITELIBDIR%%/seaserv/service.py >+%%PYTHON_SITELIBDIR%%/seaserv/service.pyc >+%%PYTHON_SITELIBDIR%%/seaserv/service.pyo >+libdata/pkgconfig/libseafile.pc >+man/man1/seaf-cli.1.gz >+man/man1/seaf-daemon.1.gz >diff -ruNp orig/net-mgmt/seafile-gui/Makefile current/net-mgmt/seafile-gui/Makefile >--- orig/net-mgmt/seafile-gui/Makefile 2016-12-18 13:40:11.373468000 -0500 >+++ current/net-mgmt/seafile-gui/Makefile 2016-12-18 13:37:44.582556000 -0500 >@@ -13,7 +13,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE > > LIB_DEPENDS= libglib-2.0.so:devel/glib20 \ > libsearpc.so:devel/libsearpc \ >- libseafile.so:net-mgmt/seafile \ >+ libseafile.so:net-mgmt/seafile-client \ > libsqlite3.so:databases/sqlite3 \ > libccnet.so:net-mgmt/ccnet-client \ > libjansson.so:devel/jansson \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
Ultima1252
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 215360
:
178037
|
178038
| 178069