diff --git a/net-mgmt/seafile-client/Makefile b/net-mgmt/seafile-client/Makefile index 2ddf11c8d0df..0f4a5242235a 100644 --- a/net-mgmt/seafile-client/Makefile +++ b/net-mgmt/seafile-client/Makefile @@ -1,54 +1,53 @@ PORTNAME= seafile-client DISTVERSIONPREFIX= v -DISTVERSION= 9.0.18 -PORTREVISION= 1 +DISTVERSION= 9.0.19 CATEGORIES= net-mgmt MAINTAINER= d.stoye@cms.hu-berlin.de COMMENT= Open Source Cloud Storage (Client) WWW= https://github.com/haiwen/seafile LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE.txt LIB_DEPENDS= libsearpc.so:devel/libsearpc \ libcurl.so:ftp/curl \ libinotify.so:devel/libinotify \ libevent.so:devel/libevent \ libuuid.so:misc/libuuid \ libargon2.so:security/libargon2 \ libjansson.so:devel/jansson \ libwebsockets.so:net/libwebsockets 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 \ pathfix pkgconfig python shebangfix sqlite ssl vala:build USE_GITHUB= yes GH_ACCOUNT= haiwen GH_PROJECT= seafile USE_GNOME= glib20 USE_LDCONFIG= yes CONFLICTS= seafile-server SHEBANG_FILES= *.sh scripts/*.sh app/seaf-cli integration-tests/*.sh GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share 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 .include diff --git a/net-mgmt/seafile-client/distinfo b/net-mgmt/seafile-client/distinfo index e1dbc82a9a91..2dfc0fe48815 100644 --- a/net-mgmt/seafile-client/distinfo +++ b/net-mgmt/seafile-client/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1781552976 -SHA256 (haiwen-seafile-v9.0.18_GH0.tar.gz) = 0b2a93e75b04e40c503c74059ca00b521bf981935f764efcbc5adfabff929d90 -SIZE (haiwen-seafile-v9.0.18_GH0.tar.gz) = 772680 +TIMESTAMP = 1783600895 +SHA256 (haiwen-seafile-v9.0.19_GH0.tar.gz) = 3a9a574e8b74292339681e6b96051b2f4fb039b81a0853e16794b43ba4df192c +SIZE (haiwen-seafile-v9.0.19_GH0.tar.gz) = 773779 diff --git a/net-mgmt/seafile-client/files/patch-configure.ac b/net-mgmt/seafile-client/files/patch-configure.ac index 9b39da8619a2..8056650a28ed 100644 --- a/net-mgmt/seafile-client/files/patch-configure.ac +++ b/net-mgmt/seafile-client/files/patch-configure.ac @@ -1,80 +1,80 @@ ---- configure.ac.orig 2017-01-05 08:05:21 UTC +--- configure.ac.orig 2026-06-18 08:15:42 UTC +++ configure.ac -@@ -51,8 +51,16 @@ else +@@ -53,8 +53,16 @@ fi 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 -@@ -61,6 +69,7 @@ fi +@@ -63,6 +71,7 @@ AM_CONDITIONAL([MACOS], [test "$bmac" = "true"]) AM_CONDITIONAL([WIN32], [test "$bwin32" = "true"]) AM_CONDITIONAL([MACOS], [test "$bmac" = "true"]) +AM_CONDITIONAL([BSD], [test "$bbsd" = "true"]) AM_CONDITIONAL([LINUX], [test "$blinux" = "true"]) -@@ -105,6 +114,8 @@ if test "$bwin32" = true; then +@@ -107,6 +116,8 @@ if test "$bwin32" = true; then LIB_MAC= MSVC_CFLAGS="-D__MSVCRT__ -D__MSVCRT_VERSION__=0x0601" LIB_CRYPT32=-lcrypt32 + LIB_INOTIFY= + LIB_KVM= elif test "$bmac" = true ; then LIB_WS32= LIB_GDI32= -@@ -119,6 +130,24 @@ elif test "$bmac" = true ; then +@@ -121,6 +132,24 @@ elif test "$bmac" = true ; then LIB_MAC="-framework CoreServices" LIB_CRYPT32= LIB_ICONV=-liconv + 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 + LIB_INOTIFY=-linotify + LIB_KVM=-lkvm else LIB_WS32= LIB_GDI32= -@@ -132,6 +161,8 @@ else +@@ -134,6 +163,8 @@ else LIB_MAC= MSVC_CFLAGS= LIB_CRYPT32= + LIB_INOTIFY=-linotify + LIB_KVM= fi AC_SUBST(LIB_WS32) -@@ -144,6 +175,8 @@ AC_SUBST(LIB_IPHLPAPI) +@@ -146,6 +177,8 @@ AC_SUBST(LIB_MAC) AC_SUBST(LIB_SHELL32) AC_SUBST(LIB_PSAPI) AC_SUBST(LIB_MAC) +AC_SUBST(LIB_INOTIFY) +AC_SUBST(LIB_KVM) AC_SUBST(MSVC_CFLAGS) AC_SUBST(LIB_CRYPT32) AC_SUBST(LIB_ICONV) diff --git a/net-mgmt/seafile-client/files/patch-daemon_Makefile.am b/net-mgmt/seafile-client/files/patch-daemon_Makefile.am index 775e3e6f5aa5..300e1f827e0b 100644 --- a/net-mgmt/seafile-client/files/patch-daemon_Makefile.am +++ b/net-mgmt/seafile-client/files/patch-daemon_Makefile.am @@ -1,23 +1,23 @@ ---- daemon/Makefile.am.orig 2023-12-06 20:22:32 UTC +--- daemon/Makefile.am.orig 2026-06-18 08:15:42 UTC +++ daemon/Makefile.am -@@ -46,6 +46,10 @@ if LINUX +@@ -46,6 +46,10 @@ endif 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 -@@ -102,7 +102,7 @@ +@@ -98,7 +102,7 @@ seaf_daemon_LDADD = $(top_builddir)/lib/libseafile_com @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ @LIBEVENT_PTHREADS_LIBS@\ $(top_builddir)/common/cdc/libcdc.la \ $(top_builddir)/common/index/libindex.la @LIB_WS32@ @LIB_CRYPT32@ \ - @SEARPC_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ @ZLIB_LIBS@ @CURL_LIBS@ @BPWRAPPER_LIBS@ \ - @WS_LIBS@ @ARGON2_LIBS@ + @SEARPC_LIBS@ @JANSSON_LIBS@ @LIB_MAC@ @ZLIB_LIBS@ @CURL_LIBS@ \ + @LIB_INOTIFY@ @BPWRAPPER_LIBS@ @WS_LIBS@ @ARGON2_LIBS@ seaf_daemon_LDFLAGS = @CONSOLE@ diff --git a/net-mgmt/seafile-client/files/patch-daemon_http-tx-mgr.c b/net-mgmt/seafile-client/files/patch-daemon_http-tx-mgr.c index f2d913127e31..ed6841a91717 100644 --- a/net-mgmt/seafile-client/files/patch-daemon_http-tx-mgr.c +++ b/net-mgmt/seafile-client/files/patch-daemon_http-tx-mgr.c @@ -1,25 +1,25 @@ ---- daemon/http-tx-mgr.c.orig 2019-06-04 02:14:53 UTC +--- daemon/http-tx-mgr.c.orig 2026-06-18 08:15:42 UTC +++ daemon/http-tx-mgr.c -@@ -69,6 +69,22 @@ - #define USER_AGENT_OS "BSD" - #endif +@@ -55,6 +55,22 @@ + + #define CLEAR_POOL_ERR_CNT 3 +#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 --git a/net-mgmt/seafile-client/files/patch-lib_Makefile.am b/net-mgmt/seafile-client/files/patch-lib_Makefile.am index 63e84cd213b5..f19c095cbf99 100644 --- a/net-mgmt/seafile-client/files/patch-lib_Makefile.am +++ b/net-mgmt/seafile-client/files/patch-lib_Makefile.am @@ -1,29 +1,29 @@ ---- lib/Makefile.am.orig 2019-06-10 02:04:34 UTC +--- lib/Makefile.am.orig 2026-06-18 08:15:42 UTC +++ lib/Makefile.am -@@ -51,6 +51,7 @@ libseafile_common_la_SOURCES = ${seafile_object_gen} $ +@@ -57,6 +57,7 @@ libseafile_common_la_LIBADD = @GLIB2_LIBS@ @GOBJECT_L libseafile_common_la_LDFLAGS = -no-undefined 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@ -@@ -72,7 +73,7 @@ vala.stamp: ${seafile_object_define} +@@ -66,7 +67,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 -@@ -88,5 +89,9 @@ install-data-local: +@@ -78,5 +79,9 @@ else 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 --git a/net-mgmt/seafile-client/files/patch-lib_net.c b/net-mgmt/seafile-client/files/patch-lib_net.c index 37f1311bbc6f..bb6eb20ade98 100644 --- a/net-mgmt/seafile-client/files/patch-lib_net.c +++ b/net-mgmt/seafile-client/files/patch-lib_net.c @@ -1,14 +1,14 @@ ---- lib/net.c.orig 2015-09-21 03:42:11 UTC +--- lib/net.c.orig 2026-06-18 08:15:42 UTC +++ lib/net.c -@@ -157,7 +157,11 @@ ccnet_net_bind_tcp (int port, int nonblo +@@ -159,7 +159,11 @@ ccnet_net_bind_tcp (int port, int nonblock) 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 --git a/net-mgmt/seafile-client/files/patch-lib_utils.c b/net-mgmt/seafile-client/files/patch-lib_utils.c index 49104c45bf97..f4862028aa2d 100644 --- a/net-mgmt/seafile-client/files/patch-lib_utils.c +++ b/net-mgmt/seafile-client/files/patch-lib_utils.c @@ -1,214 +1,214 @@ ---- lib/utils.c.orig 2019-06-04 02:14:53 UTC +--- lib/utils.c.orig 2026-06-18 08:15:42 UTC +++ lib/utils.c -@@ -50,6 +50,16 @@ +@@ -62,6 +62,16 @@ #include +#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) +#include +#include +#include +#include +#include +#include +#include +#endif + #include "log.h" -@@ -2040,14 +2050,19 @@ wchar_from_utf8 (const char *utf8) +@@ -2120,14 +2130,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; } -@@ -2071,7 +2086,8 @@ find_process_in_dirent(struct dirent *dir, const char +@@ -2151,7 +2166,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) { -@@ -2096,7 +2112,8 @@ gboolean process_is_running (const char *process_name) +@@ -2176,7 +2192,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"); -@@ -2120,6 +2137,14 @@ int count_process(const char *process_name) +@@ -2200,6 +2217,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__ -@@ -2127,6 +2152,119 @@ gboolean process_is_running (const char *process_name) - { - //TODO - return FALSE; -+} -+#endif -+ +@@ -2210,6 +2235,119 @@ gboolean process_is_running (const char *process_name) + } + #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 - -@@ -2976,10 +2976,16 @@ ++} ++#endif ++ + char* + ccnet_object_type_from_id (const char *object_id) + { +@@ -2838,10 +2976,16 @@ seaf_removexattr (const char *path, const char *name) return ret; #else +#ifdef __linux__ + return removexattr (path, name); +#endif + #ifdef __APPLE__ return removexattr (path, name, 0); -#else - return removexattr (path, name); +#endif + +#if defined __FreeBSD__ || defined __NetBSD__ + return extattr_delete_file(path, EXTATTR_NAMESPACE_USER, name); #endif #endif diff --git a/net-mgmt/seafile-gui/Makefile b/net-mgmt/seafile-gui/Makefile index 2bb75c4371d6..bf6ba53346bd 100644 --- a/net-mgmt/seafile-gui/Makefile +++ b/net-mgmt/seafile-gui/Makefile @@ -1,42 +1,41 @@ PORTNAME= seafile-gui DISTVERSIONPREFIX= v -DISTVERSION= 9.0.18 -PORTREVISION= 1 +DISTVERSION= 9.0.19 CATEGORIES= net-mgmt devel MAINTAINER= d.stoye@cms.hu-berlin.de COMMENT= Open Source Cloud Storage (Client) WWW= https://github.com/haiwen/seafile LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libsearpc.so:devel/libsearpc \ libseafile.so:net-mgmt/seafile-client \ libsqlite3.so:databases/sqlite3 \ libjansson.so:devel/jansson \ libevent.so:devel/libevent \ libuuid.so:misc/libuuid USES= compiler:c++11-lang cmake gnome pkgconfig qt:6 shebangfix ssl SHEBANG_FILES= extensions/*.sh scripts/*.sh fsplugin/*.sh \ scripts/*.py USE_GITHUB= yes GH_ACCOUNT= haiwen GH_PROJECT= seafile-client USE_GNOME= glib20 USE_GL= gl opengl USE_QT= 5compat base declarative positioning \ webengine webchannel CMAKE_ARGS= -DCMAKE_INCLUDE_PATH:PATH=include/glib-2.0 \ -DOPENSSL_INCLUDE_DIRS=${OPENSSLINC} \ -DOPENSSL_LIBRARIES="-L${OPENSSLLIB} -lcrypto" \ -DBUILD_SHIBBOLETH_SUPPORT=ON \ -DQT_VERSION_MAJOR=6 # Note that per PR 197984, cairo must be built with X11 and XCB options # otherwise configure fails with "cairo needs x11 enabled" message .include diff --git a/net-mgmt/seafile-gui/distinfo b/net-mgmt/seafile-gui/distinfo index 12359da732f0..d6cb24841ab9 100644 --- a/net-mgmt/seafile-gui/distinfo +++ b/net-mgmt/seafile-gui/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1781558483 -SHA256 (haiwen-seafile-client-v9.0.18_GH0.tar.gz) = 4c410761349f6b748fac1bd463c769d6a410cde90111e7dba87cf02ac8bbb151 -SIZE (haiwen-seafile-client-v9.0.18_GH0.tar.gz) = 11586605 +TIMESTAMP = 1783761468 +SHA256 (haiwen-seafile-client-v9.0.19_GH0.tar.gz) = 4f93fcd463039d4f4de3269e2d9270a727f00a890c18862a7282aa9d95d01ea8 +SIZE (haiwen-seafile-client-v9.0.19_GH0.tar.gz) = 11584638