Index: head/net-mgmt/seafile-client/Makefile.include =================================================================== --- head/net-mgmt/seafile-client/Makefile.include (revision 503876) +++ head/net-mgmt/seafile-client/Makefile.include (nonexistent) @@ -1,3 +0,0 @@ -# $FreeBSD$ - -SEAFILE_CLIENT_VER=6.1.5 Property changes on: head/net-mgmt/seafile-client/Makefile.include ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net-mgmt/seafile-client/Makefile =================================================================== --- head/net-mgmt/seafile-client/Makefile (revision 503876) +++ head/net-mgmt/seafile-client/Makefile (revision 503877) @@ -1,60 +1,52 @@ # $FreeBSD$ PORTNAME= seafile-client DISTVERSIONPREFIX= v -DISTVERSION= ${SEAFILE_CLIENT_VER} +DISTVERSION= 7.0.1 CATEGORIES= net-mgmt MAINTAINER= ultima@FreeBSD.org COMMENT= Open Source Cloud Storage (Client) LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE.txt BUILD_DEPENDS= valac:lang/vala LIB_DEPENDS= libsearpc.so:devel/libsearpc \ libcurl.so:ftp/curl \ libinotify.so:devel/libinotify \ - libccnet.so:net-mgmt/ccnet-client \ libevent.so:devel/libevent \ libuuid.so:misc/e2fsprogs-libuuid \ libjansson.so:devel/jansson RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}urllib3>0:net/py-urllib3@${PY_FLAVOR} \ bash:shells/bash -USES= autoreconf gnome iconv libarchive libtool localbase mysql \ +USES= autoreconf gnome iconv libarchive libtool localbase \ pathfix pkgconfig python:-2.7 shebangfix sqlite ssl USE_GITHUB= yes GH_ACCOUNT= haiwen GH_PROJECT= seafile USE_GNOME= glib20 USE_LDCONFIG= yes CONFLICTS= seafile-server-[0-9]* SHEBANG_FILES= *.sh scripts/*.sh app/seaf-cli integration-tests/*.sh GNU_CONFIGURE= yes CONFIGURE_ENV= SSL_CFLAGS="${OPENSSLINC}" SSL_LIBS="-L${OPENSSLLIB} -lssl -lcrypto" CPPFLAGS+= -I${LOCALBASE}/include/evhtp INSTALL_TARGET= install-strip OPTIONS_DEFINE= NLS NLS_USES= gettext post-patch: # Fix P_KTHREAD r295435 ${REINPLACE_CMD} 's/P_KTHREAD/P_KPROC/' ${WRKSRC}/lib/utils.c - -makesum-all: -.for PORT in net-mgmt/ccnet-client net-mgmt/seafile-client net-mgmt/seafile-gui - ${MAKE} -C "${PORTSDIR}/${PORT}" makesum -.endfor - -.include "${.CURDIR}/Makefile.include" .include Index: head/net-mgmt/seafile-client/distinfo =================================================================== --- head/net-mgmt/seafile-client/distinfo (revision 503876) +++ head/net-mgmt/seafile-client/distinfo (revision 503877) @@ -1,3 +1,3 @@ -TIMESTAMP = 1517595653 -SHA256 (haiwen-seafile-v6.1.5_GH0.tar.gz) = 19f9ccd515af8b4dc422479dfdc69ab3a55978751ed25653e0f5d04196949f6a -SIZE (haiwen-seafile-v6.1.5_GH0.tar.gz) = 824318 +TIMESTAMP = 1560130395 +SHA256 (haiwen-seafile-v7.0.1_GH0.tar.gz) = 9bb14fc24830e62eff3f99dc7324a2d66acec95a73f6d12de3950d0a64ab668e +SIZE (haiwen-seafile-v7.0.1_GH0.tar.gz) = 698053 Index: head/net-mgmt/seafile-client/files/patch-daemon_Makefile.am =================================================================== --- head/net-mgmt/seafile-client/files/patch-daemon_Makefile.am (revision 503876) +++ head/net-mgmt/seafile-client/files/patch-daemon_Makefile.am (revision 503877) @@ -1,22 +1,22 @@ ---- daemon/Makefile.am.orig 2017-01-15 15:47:19 UTC +--- daemon/Makefile.am.orig 2019-06-10 01:56:16 UTC +++ daemon/Makefile.am -@@ -61,6 +61,10 @@ if LINUX +@@ -37,6 +37,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 -@@ -124,6 +128,7 @@ seaf_daemon_LDADD = $(top_builddir)/lib/ +@@ -78,6 +82,7 @@ seaf_daemon_LDADD = $(top_builddir)/lib/libseafile_com @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@ @JANSSON_LIBS@ @LIB_MAC@ @ZLIB_LIBS@ @CURL_LIBS@ @BPWRAPPER_LIBS@ -+ @SEARPC_LIBS@ @CCNET_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ \ -+ @ZLIB_LIBS@ @CURL_LIBS@ @LIB_INOTIFY@ @BPWRAPPER_LIBS@ +- @SEARPC_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ @ZLIB_LIBS@ @CURL_LIBS@ @BPWRAPPER_LIBS@ ++ @SEARPC_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ @ZLIB_LIBS@ \ ++ @CURL_LIBS@ @LIB_INOTIFY@ @BPWRAPPER_LIBS@ seaf_daemon_LDFLAGS = @CONSOLE@ Index: head/net-mgmt/seafile-client/files/patch-daemon_http-tx-mgr.c =================================================================== --- head/net-mgmt/seafile-client/files/patch-daemon_http-tx-mgr.c (revision 503876) +++ head/net-mgmt/seafile-client/files/patch-daemon_http-tx-mgr.c (revision 503877) @@ -1,35 +1,25 @@ ---- daemon/http-tx-mgr.c.orig 2018-02-02 05:55:07 UTC +--- daemon/http-tx-mgr.c.orig 2019-06-04 02:14:53 UTC +++ daemon/http-tx-mgr.c -@@ -68,6 +68,22 @@ +@@ -69,6 +69,22 @@ #define USER_AGENT_OS "BSD" #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. */ -@@ -1091,7 +1107,9 @@ curl_error_to_http_task_error (int curl_ - case CURLE_SSL_CONNECT_ERROR: - case CURLE_PEER_FAILED_VERIFICATION: - case CURLE_SSL_CERTPROBLEM: -+#if LIBCURL_VERSION_NUM < 0x073e00 - case CURLE_SSL_CACERT: -+#endif - case CURLE_SSL_CACERT_BADFILE: - case CURLE_SSL_ISSUER_ERROR: - return HTTP_TASK_ERR_SSL; Index: head/net-mgmt/seafile-client/files/patch-lib_Makefile.am =================================================================== --- head/net-mgmt/seafile-client/files/patch-lib_Makefile.am (revision 503876) +++ head/net-mgmt/seafile-client/files/patch-lib_Makefile.am (revision 503877) @@ -1,29 +1,29 @@ ---- lib/Makefile.am.orig 2015-10-12 04:12:33 UTC +--- lib/Makefile.am.orig 2019-06-10 02:04:34 UTC +++ lib/Makefile.am -@@ -53,6 +53,7 @@ libseafile_common_la_SOURCES = ${seafile +@@ -51,6 +51,7 @@ libseafile_common_la_SOURCES = ${seafile_object_gen} $ libseafile_common_la_LDFLAGS = -no-undefined - libseafile_common_la_LIBADD = @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ -lcrypto @LIB_GDI32@ \ + libseafile_common_la_LIBADD = @GLIB2_LIBS@ @GOBJECT_LIBS@ @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} +@@ -72,7 +73,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} +- @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: +@@ -88,5 +89,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 + endif Index: head/net-mgmt/seafile-client/files/patch-lib_utils.c =================================================================== --- head/net-mgmt/seafile-client/files/patch-lib_utils.c (revision 503876) +++ head/net-mgmt/seafile-client/files/patch-lib_utils.c (revision 503877) @@ -1,195 +1,195 @@ ---- lib/utils.c.orig 2015-09-21 03:42:11 UTC +--- lib/utils.c.orig 2019-06-04 02:14:53 UTC +++ lib/utils.c -@@ -56,6 +56,16 @@ +@@ -50,6 +50,16 @@ #include +#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) +#include +#include +#include +#include +#include +#include +#include +#endif + - extern int inet_pton(int af, const char *src, void *dst); + #include "log.h" -@@ -2112,14 +2122,19 @@ wchar_from_utf8 (const char *utf8) +@@ -2040,14 +2050,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 +@@ -2071,7 +2086,8 @@ find_process_in_dirent(struct dirent *dir, const char } /* 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 +@@ -2096,7 +2112,8 @@ gboolean process_is_running (const char *process_name) 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 +@@ -2120,6 +2137,14 @@ int count_process(const char *process_name) 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 - +@@ -2127,6 +2152,119 @@ gboolean process_is_running (const char *process_name) + { + //TODO + return FALSE; ++} ++#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) - { + } + #endif +