From c05460c9add83aec9a553149f32d23bb57a0dc91 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 7 Mar 2022 06:43:52 +0800 Subject: [PATCH] seafile: Remove packages I believe these packages should be removed (and imported into the abandoned packages repo[1]) as Seafile Server and Seahub have been marked as broken for some time, and I do not believe I will have time to fix or update these packages in the foreseeable future. [1]: https://github.com/openwrt/packages-abandoned/pull/22 Signed-off-by: Jeffery To --- libs/libsearpc/Makefile | 89 --- .../patches/001-no-python-compile.patch | 8 - .../patches/002-no-future-import.patch | 11 - net/seafile-ccnet/Makefile | 100 --- net/seafile-ccnet/patches/010-Makefile.patch | 16 - .../patches/011-no-python-compile.patch | 6 - ...Remove-API-deprecated-in-openssl-1.1.patch | 133 ---- net/seafile-ccnet/patches/030-uci-conf.patch | 33 - net/seafile-seahub/Django-1.11.txt | 2 - net/seafile-seahub/Makefile | 97 --- .../patches/020-Makefile-fixes.patch | 36 -- net/seafile-seahub/patches/030-uci-conf.patch | 29 - .../patches/040-manage-shebang.patch | 8 - net/seafile-server/Makefile | 241 -------- net/seafile-server/README.md | 114 ---- .../files/create-seafile-admin.sh | 10 - .../files/seafile-server.config | 11 - net/seafile-server/files/seafile-server.init | 75 --- .../files/seafile-server.upgrade | 1 - .../010-configure-libevent_openssl.patch | 11 - .../patches/011-configure-liconv.patch | 10 - .../012-automake-no-python-compile.patch | 14 - .../patches/020-installpath.patch | 99 --- .../patches/021-bin-paths.patch | 104 ---- net/seafile-server/patches/022-uci-conf.patch | 583 ------------------ .../patches/023-pgrep-patterns.patch | 73 --- .../patches/024-seahub-pyc.patch | 42 -- .../patches/025-command-names.patch | 180 ------ .../030-controller-pid-dir-permissions.patch | 11 - .../031-sqlite2mysql-bash-python3.patch | 61 -- .../patches/032-seafile-no-stat.patch | 15 - .../033-seahub-do-not-create-admin.patch | 56 -- .../patches/034-seaf-fuse-no-fuse_opt_h.patch | 10 - .../patches/040-setup-skip-dir-check.patch | 22 - ...041-setup-add-custom-seahub-settings.patch | 27 - .../patches/042-setup-skip-user-manuals.patch | 20 - .../043-setup-skip-server-symlink.patch | 40 -- .../044-setup-sleep-whole-number.patch | 32 - .../045-setup-copy-default-avatars.patch | 39 -- .../046-setup-show-create-admin-message.patch | 24 - .../050-libseafile-makefile-fixes.patch | 24 - .../patches/060-timestamps-as-int64.patch | 20 - .../patches/110-libevhtp-linking.patch | 36 -- .../patches/120-recent-libevhtp.patch | 65 -- .../patches/130-newer-libevhtp.patch | 75 --- 45 files changed, 2713 deletions(-) delete mode 100644 libs/libsearpc/Makefile delete mode 100644 libs/libsearpc/patches/001-no-python-compile.patch delete mode 100644 libs/libsearpc/patches/002-no-future-import.patch delete mode 100644 net/seafile-ccnet/Makefile delete mode 100644 net/seafile-ccnet/patches/010-Makefile.patch delete mode 100644 net/seafile-ccnet/patches/011-no-python-compile.patch delete mode 100644 net/seafile-ccnet/patches/020-Remove-API-deprecated-in-openssl-1.1.patch delete mode 100644 net/seafile-ccnet/patches/030-uci-conf.patch delete mode 100644 net/seafile-seahub/Django-1.11.txt delete mode 100644 net/seafile-seahub/Makefile delete mode 100644 net/seafile-seahub/patches/020-Makefile-fixes.patch delete mode 100644 net/seafile-seahub/patches/030-uci-conf.patch delete mode 100644 net/seafile-seahub/patches/040-manage-shebang.patch delete mode 100644 net/seafile-server/Makefile delete mode 100644 net/seafile-server/README.md delete mode 100644 net/seafile-server/files/create-seafile-admin.sh delete mode 100644 net/seafile-server/files/seafile-server.config delete mode 100644 net/seafile-server/files/seafile-server.init delete mode 100644 net/seafile-server/files/seafile-server.upgrade delete mode 100644 net/seafile-server/patches/010-configure-libevent_openssl.patch delete mode 100644 net/seafile-server/patches/011-configure-liconv.patch delete mode 100644 net/seafile-server/patches/012-automake-no-python-compile.patch delete mode 100644 net/seafile-server/patches/020-installpath.patch delete mode 100644 net/seafile-server/patches/021-bin-paths.patch delete mode 100644 net/seafile-server/patches/022-uci-conf.patch delete mode 100644 net/seafile-server/patches/023-pgrep-patterns.patch delete mode 100644 net/seafile-server/patches/024-seahub-pyc.patch delete mode 100644 net/seafile-server/patches/025-command-names.patch delete mode 100644 net/seafile-server/patches/030-controller-pid-dir-permissions.patch delete mode 100644 net/seafile-server/patches/031-sqlite2mysql-bash-python3.patch delete mode 100644 net/seafile-server/patches/032-seafile-no-stat.patch delete mode 100644 net/seafile-server/patches/033-seahub-do-not-create-admin.patch delete mode 100644 net/seafile-server/patches/034-seaf-fuse-no-fuse_opt_h.patch delete mode 100644 net/seafile-server/patches/040-setup-skip-dir-check.patch delete mode 100644 net/seafile-server/patches/041-setup-add-custom-seahub-settings.patch delete mode 100644 net/seafile-server/patches/042-setup-skip-user-manuals.patch delete mode 100644 net/seafile-server/patches/043-setup-skip-server-symlink.patch delete mode 100644 net/seafile-server/patches/044-setup-sleep-whole-number.patch delete mode 100644 net/seafile-server/patches/045-setup-copy-default-avatars.patch delete mode 100644 net/seafile-server/patches/046-setup-show-create-admin-message.patch delete mode 100644 net/seafile-server/patches/050-libseafile-makefile-fixes.patch delete mode 100644 net/seafile-server/patches/060-timestamps-as-int64.patch delete mode 100644 net/seafile-server/patches/110-libevhtp-linking.patch delete mode 100644 net/seafile-server/patches/120-recent-libevhtp.patch delete mode 100644 net/seafile-server/patches/130-newer-libevhtp.patch diff --git a/libs/libsearpc/Makefile b/libs/libsearpc/Makefile deleted file mode 100644 index 1e3895683..000000000 --- a/libs/libsearpc/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -# -# Copyright (C) 2007-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libsearpc -PKG_VERSION:=3.2.0 -PKG_RELEASE:=5 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL:=https://github.com/haiwen/libsearpc.git -PKG_SOURCE_VERSION:=d1fd7518a20b25766ff98d6fde6e40c63626ca0d -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(call version_abbrev,$(PKG_SOURCE_VERSION)) -PKG_MIRROR_HASH:=ee8b8b50b480afbcb71bd73cd9c2a96cfa72e9dafaf5773574adbf348e49a0d4 - -PKG_MAINTAINER:=Jeffery To -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE.txt - -PKG_FIXUP:=autoreconf -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 -PYTHON3_PKG_BUILD:=0 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -include ../../lang/python/python3-package.mk - -define Package/libsearpc - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Seafile RPC Library - URL:=https://seafile.com - DEPENDS:=+glib2 +jansson $(ICONV_DEPENDS) -endef - -define Package/libsearpc/description - Searpc is a simple C language RPC framework based on GObject system. - Searpc handles the serialization/deserialization part of RPC, the - transport part is left to users. -endef - -define Package/python3-searpc - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=Python bindings for Searpc - DEPENDS:=+libsearpc +python3-light +python3-logging -endef - -define Package/python3-searpc/description -$(call Package/libsearpc/description) - - This package contains Python bindings for Searpc. -endef - -CONFIGURE_ARGS += \ - --disable-compile-demo \ - --disable-server-pkg - -CONFIGURE_VARS += \ - PYTHON="$(HOST_PYTHON3_BIN)" - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/{bin,include} - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libsearpc.pc $(1)/usr/lib/pkgconfig/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/searpc-codegen.py $(1)/usr/bin/ -endef - -define Package/libsearpc/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsearpc.so* $(1)/usr/lib/ -endef - -Py3Package/python3-searpc/install:=: - -$(eval $(call BuildPackage,libsearpc)) - -$(eval $(call Py3Package,python3-searpc)) -$(eval $(call BuildPackage,python3-searpc)) -$(eval $(call BuildPackage,python3-searpc-src)) diff --git a/libs/libsearpc/patches/001-no-python-compile.patch b/libs/libsearpc/patches/001-no-python-compile.patch deleted file mode 100644 index fc9120b0f..000000000 --- a/libs/libsearpc/patches/001-no-python-compile.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- a/pysearpc/Makefile.am -+++ b/pysearpc/Makefile.am -@@ -1,4 +1,4 @@ - - pysearpcdir=${pyexecdir}/pysearpc - --pysearpc_PYTHON = __init__.py client.py common.py errors.py named_pipe.py server.py transport.py utils.py -+pysearpc_DATA = __init__.py client.py common.py errors.py named_pipe.py server.py transport.py utils.py diff --git a/libs/libsearpc/patches/002-no-future-import.patch b/libs/libsearpc/patches/002-no-future-import.patch deleted file mode 100644 index b69c021fc..000000000 --- a/libs/libsearpc/patches/002-no-future-import.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/pysearpc/named_pipe.py -+++ b/pysearpc/named_pipe.py -@@ -2,8 +2,6 @@ - RPC client/server implementation based on named pipe transport. - """ - --from future import standard_library --standard_library.install_aliases() - from builtins import object - import json - import logging diff --git a/net/seafile-ccnet/Makefile b/net/seafile-ccnet/Makefile deleted file mode 100644 index 1f804b05a..000000000 --- a/net/seafile-ccnet/Makefile +++ /dev/null @@ -1,100 +0,0 @@ -# -# Copyright (C) 2007-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=seafile-ccnet -PKG_VERSION:=7.1.5 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/haiwen/ccnet-server/tar.gz/v$(PKG_VERSION)-server? -PKG_HASH:=11e5281c239474756ed606bffe8f24c1089a3a9eb2502cfac7815d25ebc4585a - -PKG_MAINTAINER:=Jeffery To -PKG_LICENSE:=AGPL-3.0-only -PKG_LICENSE_FILES:=LICENSE.txt - -PKG_BUILD_DIR:=$(BUILD_DIR)/ccnet-server-$(PKG_VERSION)-server -PKG_BUILD_DEPENDS:=vala/host - -PKG_FIXUP:=autoreconf -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 -PYTHON3_PKG_BUILD:=0 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -include ../../lang/python/python3-package.mk - -define Package/seafile-ccnet - SECTION:=net - CATEGORY:=Network - TITLE:=Seafile server - ccnet component - URL:=http://seafile.com/ - DEPENDS:= \ - +glib2 \ - +jansson \ - +libevent2 \ - +libmariadb \ - +libopenssl \ - +libpthread \ - +libsearpc \ - +libsqlite3 \ - +libuuid \ - $(ICONV_DEPENDS) -endef - -define Package/seafile-ccnet/description - Ccnet is a framework for writing networked applications in C. -endef - -define Package/python3-seafile-ccnet - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=Python bindings for Seafile Ccnet - DEPENDS:=+seafile-ccnet +python3-light +python3-searpc -endef - -define Package/python3-seafile-ccnet/description -$(call Package/seafile-ccnet/description) - - This package contains Python bindings for Ccnet. -endef - -CONFIGURE_ARGS += \ - --disable-console \ - --disable-ldap \ - --enable-python \ - --with-mysql="$(STAGING_DIR)/usr/bin/mysql_config" - -CONFIGURE_VARS += \ - PYTHON="$(HOST_PYTHON3_BIN)" - -define Package/seafile-ccnet/install - $(INSTALL_DIR) $(1)/usr/{lib,libexec} - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/libexec/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libccnet.so* $(1)/usr/lib/ -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/ccnet - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/ccnet/*.h $(1)/usr/include/ccnet/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libccnet.pc $(1)/usr/lib/pkgconfig/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libccnet.{a,la,so*} $(1)/usr/lib/ -endef - -Py3Package/python3-seafile-ccnet/install:=: - -$(eval $(call BuildPackage,seafile-ccnet)) - -$(eval $(call Py3Package,python3-seafile-ccnet)) -$(eval $(call BuildPackage,python3-seafile-ccnet)) -$(eval $(call BuildPackage,python3-seafile-ccnet-src)) diff --git a/net/seafile-ccnet/patches/010-Makefile.patch b/net/seafile-ccnet/patches/010-Makefile.patch deleted file mode 100644 index 51477c855..000000000 --- a/net/seafile-ccnet/patches/010-Makefile.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/lib/Makefile.am -+++ b/lib/Makefile.am -@@ -1,3 +1,4 @@ -+include $(TOPDIR)/rules.mk - - AM_CPPFLAGS = @GLIB2_CFLAGS@ -I$(top_srcdir)/include \ - -I$(top_srcdir)/include/ccnet \ -@@ -85,7 +86,7 @@ rpc_table.stamp: ${top_srcdir}/lib/rpc_t - @rm -f rpc_table.tmp - @touch rpc_table.tmp - @echo "[libsearpc]: generating rpc header files" -- @PYTHON@ `which searpc-codegen.py` ${top_srcdir}/lib/rpc_table.py -+ @PYTHON@ "$(STAGING_DIR)/usr/bin/searpc-codegen.py" ${top_srcdir}/lib/rpc_table.py - @echo "[libsearpc]: done" - @mv -f rpc_table.tmp $@ - diff --git a/net/seafile-ccnet/patches/011-no-python-compile.patch b/net/seafile-ccnet/patches/011-no-python-compile.patch deleted file mode 100644 index 276b4992b..000000000 --- a/net/seafile-ccnet/patches/011-no-python-compile.patch +++ /dev/null @@ -1,6 +0,0 @@ ---- a/python/ccnet/Makefile.am -+++ b/python/ccnet/Makefile.am -@@ -1,2 +1,2 @@ - ccnetdir=${pyexecdir}/ccnet --ccnet_PYTHON = __init__.py rpc.py -+ccnet_DATA = __init__.py rpc.py diff --git a/net/seafile-ccnet/patches/020-Remove-API-deprecated-in-openssl-1.1.patch b/net/seafile-ccnet/patches/020-Remove-API-deprecated-in-openssl-1.1.patch deleted file mode 100644 index ce06a2d32..000000000 --- a/net/seafile-ccnet/patches/020-Remove-API-deprecated-in-openssl-1.1.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 6c825349e1994a991f287e398cf0ead5f790a01b Mon Sep 17 00:00:00 2001 -From: Eneas U de Queiroz -Date: Wed, 6 Jun 2018 18:05:33 -0300 -Subject: [PATCH] Remove API deprecated in openssl 1.1 - -With openssl 1.1, we do not call OpenSSL_add_all_algorithms(), as -library initialization is done automatically. -Functions RAND_pseudo_bytes and RSA_generate_key were deprecated as -well. -Also, we need to #include for BN_num_bytes(). - -Signed-off-by: Eneas U de Queiroz ---- - lib/rsa.c | 15 ++++++++++++--- - net/common/processors/keepalive-proc.c | 4 ++-- - net/common/processors/keepalive2-proc.c | 2 +- - net/common/processors/sendsessionkey-proc.c | 2 +- - net/common/processors/sendsessionkey-v2-proc.c | 2 +- - net/server/user-mgr.c | 4 ++++ - tools/ccnet-init.c | 2 ++ - 7 files changed, 23 insertions(+), 8 deletions(-) - ---- a/lib/rsa.c -+++ b/lib/rsa.c -@@ -4,6 +4,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -207,9 +208,17 @@ RSA * - generate_private_key(u_int bits) - { - RSA *private = NULL; -+ BIGNUM *e = NULL; - -- private = RSA_generate_key(bits, 35, NULL, NULL); -- if (private == NULL) -+ private = RSA_new(); -+ e = BN_new(); -+ if (private == NULL || e == NULL || !BN_set_word(e, 35) || -+ !RSA_generate_key_ex(private, bits, e, NULL)) { -+ RSA_free(private); -+ BN_free(e); - g_error ("rsa_generate_private_key: key generation failed."); -+ return NULL; -+ } -+ BN_free(e); - return private; - } ---- a/net/common/processors/keepalive-proc.c -+++ b/net/common/processors/keepalive-proc.c -@@ -401,7 +401,7 @@ static void send_challenge(CcnetProcesso - unsigned char *buf; - int len; - -- RAND_pseudo_bytes (priv->random_buf, 40); -+ RAND_bytes (priv->random_buf, 40); - buf = public_key_encrypt (peer->pubkey, priv->random_buf, 40, &len); - ccnet_processor_send_update (processor, "311", NULL, (char *)buf, len); - -@@ -434,7 +434,7 @@ static void send_challenge_user(CcnetPro - - ccnet_debug ("[Keepalive] Send user challenge to %.8s\n", - processor->peer->id); -- RAND_pseudo_bytes (priv->random_buf, 40); -+ RAND_bytes (priv->random_buf, 40); - buf = public_key_encrypt (user->pubkey, priv->random_buf, 40, &len); - ccnet_processor_send_update (processor, "321", NULL, (char *)buf, len); - ---- a/net/common/processors/keepalive2-proc.c -+++ b/net/common/processors/keepalive2-proc.c -@@ -306,7 +306,7 @@ static void send_challenge(CcnetProcesso - unsigned char *buf; - int len; - -- RAND_pseudo_bytes (priv->random_buf, 40); -+ RAND_bytes (priv->random_buf, 40); - buf = public_key_encrypt (peer->pubkey, priv->random_buf, 40, &len); - if (len < 0) { - ccnet_debug ("[Keepalive] Failed to encrypt challenge " ---- a/net/common/processors/sendsessionkey-proc.c -+++ b/net/common/processors/sendsessionkey-proc.c -@@ -124,7 +124,7 @@ generate_session_key (CcnetProcessor *pr - unsigned char random_buf[40]; - SHA_CTX s; - -- RAND_pseudo_bytes (random_buf, sizeof(random_buf)); -+ RAND_bytes (random_buf, sizeof(random_buf)); - - SHA1_Init (&s); - SHA1_Update (&s, random_buf, sizeof(random_buf)); ---- a/net/common/processors/sendsessionkey-v2-proc.c -+++ b/net/common/processors/sendsessionkey-v2-proc.c -@@ -125,7 +125,7 @@ generate_session_key (CcnetProcessor *pr - unsigned char random_buf[40]; - SHA_CTX s; - -- RAND_pseudo_bytes (random_buf, sizeof(random_buf)); -+ RAND_bytes (random_buf, sizeof(random_buf)); - - SHA1_Init (&s); - SHA1_Update (&s, random_buf, sizeof(random_buf)); ---- a/net/server/user-mgr.c -+++ b/net/server/user-mgr.c -@@ -816,9 +816,13 @@ hash_password_pbkdf2_sha256 (const char - char salt_str[SHA256_DIGEST_LENGTH*2+1]; - - if (!RAND_bytes (salt, sizeof(salt))) { -+#if OPENSSL_VERSION_NUMBER < 0x10100000L || OPENSSL_API_COMPAT < 0x10100000L - ccnet_warning ("Failed to generate salt " - "with RAND_bytes(), use RAND_pseudo_bytes().\n"); - RAND_pseudo_bytes (salt, sizeof(salt)); -+#else -+ ccnet_warning ("Failed to generate salt with RAND_bytes().\n"); -+#endif - } - - PKCS5_PBKDF2_HMAC (passwd, strlen(passwd), ---- a/tools/ccnet-init.c -+++ b/tools/ccnet-init.c -@@ -108,7 +108,9 @@ main(int argc, char **argv) - - config_dir = ccnet_expand_path (config_dir); - /* printf("[conf_dir=%s\n]", config_dir); */ -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - OpenSSL_add_all_algorithms(); -+#endif - - if (RAND_status() != 1) { /* it should be seeded automatically */ - fprintf(stderr, "PRNG is not seeded\n"); diff --git a/net/seafile-ccnet/patches/030-uci-conf.patch b/net/seafile-ccnet/patches/030-uci-conf.patch deleted file mode 100644 index 226c4153d..000000000 --- a/net/seafile-ccnet/patches/030-uci-conf.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/net/common/rpc-service.c -+++ b/net/common/rpc-service.c -@@ -314,7 +314,11 @@ ccnet_start_rpc(CcnetSession *session) - - #endif /* CCNET_SERVER */ - -- char *path = g_build_filename (session->config_dir, CCNET_SOCKET_NAME, NULL); -+ const char *socket_dir = g_getenv ("SEAFILE_UCI_SOCKET_DIR"); -+ if (!socket_dir) { -+ socket_dir = session->config_dir; -+ } -+ char *path = g_build_filename (socket_dir, CCNET_SOCKET_NAME, NULL); - SearpcNamedPipeServer *server = searpc_create_named_pipe_server_with_threadpool (path, NAMED_PIPE_SERVER_THREAD_POOL_SIZE); - if (!server) { - ccnet_warning ("Failed to create named pipe server.\n"); ---- a/net/server/ccnet-server.c -+++ b/net/server/ccnet-server.c -@@ -292,10 +292,13 @@ main (int argc, char **argv) - config_dir = ccnet_expand_path (config_dir); - - if (!log_file) { -- char *logdir = g_build_filename (config_dir, "logs", NULL); -+ char *logdir = g_strdup (g_getenv ("SEAFILE_UCI_LOG_DIR")); -+ if (!logdir) { -+ logdir = g_build_filename (config_dir, "logs", NULL); -+ } - checkdir_with_mkdir (logdir); -+ log_file = g_build_filename (logdir, "ccnet.log", NULL); - g_free (logdir); -- log_file = g_build_filename (config_dir, "logs", "ccnet.log", NULL); - } - if (ccnet_log_init (log_file, log_level_str) < 0) { - fprintf (stderr, "ccnet_log_init error: %s, %s\n", strerror(errno), diff --git a/net/seafile-seahub/Django-1.11.txt b/net/seafile-seahub/Django-1.11.txt deleted file mode 100644 index 5501e4589..000000000 --- a/net/seafile-seahub/Django-1.11.txt +++ /dev/null @@ -1,2 +0,0 @@ -Django==1.11.29 --hash=sha256:4200aefb6678019a0acf0005cd14cfce3a5e6b9b90d06145fcdd2e474ad4329c -pytz==2021.3 --hash=sha256:acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326 diff --git a/net/seafile-seahub/Makefile b/net/seafile-seahub/Makefile deleted file mode 100644 index 8fc350c9b..000000000 --- a/net/seafile-seahub/Makefile +++ /dev/null @@ -1,97 +0,0 @@ -# -# Copyright (C) 2007-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=seafile-seahub -PKG_VERSION:=7.1.5 -PKG_RELEASE:=2 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seahub/tar.gz/v$(PKG_VERSION)-server? -PKG_HASH:=cc7f5a1642d203b2390ae3c30c8a5546d1e829d9d1a5ddf686e558292746ce5c - -PKG_MAINTAINER:=Jeffery To -PKG_LICENSE:=Apache-2.0 -PKG_LICENSE_FILES:=LICENSE.txt - -PKG_BUILD_DIR:=$(BUILD_DIR)/seahub-$(PKG_VERSION)-server - -HOST_PYTHON3_PACKAGE_BUILD_DEPENDS:=./Django-1.11.txt - -PKG_BUILD_PARALLEL:=1 -PYTHON3_PKG_BUILD:=0 - -include $(INCLUDE_DIR)/package.mk -include ../../lang/python/python3-package.mk - -define Package/seafile-seahub - SECTION:=net - CATEGORY:=Network - TITLE:=Seafile server - seahub component - URL:=https://seafile.com/ - DEPENDS:= \ - @BROKEN \ - +gunicorn3 \ - +python3 \ - +python3-chardet \ - +python3-cryptodome \ - +python3-dateutil \ - +python3-django1 \ - +python3-django-formtools \ - +python3-django-picklefield \ - +python3-django-postoffice \ - +python3-django-restframework39 \ - +python3-django-simple-captcha \ - +python3-django-statici18n \ - +python3-django-webpack-loader \ - +python3-openpyxl \ - +python3-pillow \ - +python3-pyjwt \ - +python3-pymysql \ - +python3-pytz \ - +python3-qrcode \ - +python3-requests \ - +python3-requests-oauthlib \ - +python3-seafile-ccnet \ - +python3-searpc -endef - -define Package/seafile-seahub/description - The web end of seafile server. - - Note: Localization support is turned off by default for performance - reasons. Set 'USE_I18N = True' in /etc/seafile/conf/seahub_settings.py - to use languages other than English. -endef - -define Build/Configure -endef - -MAKE_VARS += \ - PYTHON="$(HOST_PYTHON3_BIN)" \ - DJANGO_ADMIN_PY="$(STAGING_DIR_HOSTPKG)/bin/django-admin" - -define Build/Compile - $(call HostPython3/PipInstall,$(PYTHON3_PKG_HOST_PIP_INSTALL_ARGS)) - $(call Build/Compile/Default,locale) -endef - -define Py3Package/seafile-seahub/install - $(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server/seahub/tools - $(CP) $(PKG_BUILD_DIR)/{frontend,locale,media,seahub,sql,static,thirdpart} $(1)/usr/share/seafile/seafile-server/seahub/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/manage.py $(1)/usr/share/seafile/seafile-server/seahub/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/tools/secret_key_generator.py $(1)/usr/share/seafile/seafile-server/seahub/tools/ - $(SED) "s/\(SEAFILE_VERSION\s*=\s*\)'\([0-9]\.[0-9]\.[0-9]\)'/\1'$(PKG_VERSION)'/g" $(1)/usr/share/seafile/seafile-server/seahub/seahub/settings.py - mv $(1)/usr/share/seafile/seafile-server/seahub/media/avatars $(1)/usr/share/seafile/seafile-server/seahub/media/avatars_default -endef - -Py3Package/seafile-seahub/filespec:= - -$(eval $(call Py3Package,seafile-seahub)) -$(eval $(call BuildPackage,seafile-seahub)) -$(eval $(call BuildPackage,seafile-seahub-src)) diff --git a/net/seafile-seahub/patches/020-Makefile-fixes.patch b/net/seafile-seahub/patches/020-Makefile-fixes.patch deleted file mode 100644 index 12451b8f6..000000000 --- a/net/seafile-seahub/patches/020-Makefile-fixes.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -1,3 +1,6 @@ -+PYTHON ?= python -+DJANGO_ADMIN_PY ?= django-admin.py -+ - PROJECT=seahub - - develop: setup-git -@@ -9,22 +12,22 @@ dist: locale statici18n collectstatic - - locale: - @echo "--> Compile locales" -- django-admin.py compilemessages -+ $(DJANGO_ADMIN_PY) compilemessages - @echo "" - - statici18n: - @echo "--> Generate JS locale files in static/scripts/i18n" -- python manage.py compilejsi18n -+ $(PYTHON) manage.py compilejsi18n - - collectstatic: - @echo "--> Collect django static files to media/assets" - rm -rf media/assets 2> /dev/null -- python manage.py collectstatic --noinput -i admin -i termsandconditions -+ $(PYTHON) manage.py collectstatic --noinput -i admin -i termsandconditions - - compressstatic: - @echo "--> Compress static files(css) to media/CACHE" - rm -rf media/CACHE 2> /dev/null -- python manage.py compress -+ $(PYTHON) manage.py compress - - clean: - @echo '--> Cleaning media/static cache & dist' diff --git a/net/seafile-seahub/patches/030-uci-conf.patch b/net/seafile-seahub/patches/030-uci-conf.patch deleted file mode 100644 index 4e803b2ea..000000000 --- a/net/seafile-seahub/patches/030-uci-conf.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/seahub/settings.py -+++ b/seahub/settings.py -@@ -140,7 +140,7 @@ TEMPLATES = [ - { - 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [ -- os.path.join(PROJECT_ROOT, '../../seahub-data/custom/templates'), -+ os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', os.path.join(PROJECT_ROOT, '../..')), 'seahub-data/custom/templates'), - os.path.join(PROJECT_ROOT, 'seahub/templates'), - ], - 'APP_DIRS': True, -@@ -646,7 +646,7 @@ CAPTCHA_IMAGE_SIZE = (90, 42) - ENABLE_THUMBNAIL = True - - # Absolute filesystem path to the directory that will hold thumbnail files. --SEAHUB_DATA_ROOT = os.path.join(PROJECT_ROOT, '../../seahub-data') -+SEAHUB_DATA_ROOT = os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', os.path.join(PROJECT_ROOT, '../..')), 'seahub-data') - if os.path.exists(SEAHUB_DATA_ROOT): - THUMBNAIL_ROOT = os.path.join(SEAHUB_DATA_ROOT, 'thumbnail') - else: -@@ -842,7 +842,7 @@ except ImportError: - pass - else: - # In server release, sqlite3 db file is /seahub.db -- DATABASES['default']['NAME'] = os.path.join(install_topdir, 'seahub.db') -+ DATABASES['default']['NAME'] = os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', install_topdir), 'seahub.db') - - # In server release, gunicorn is used to deploy seahub - INSTALLED_APPS += ('gunicorn', ) diff --git a/net/seafile-seahub/patches/040-manage-shebang.patch b/net/seafile-seahub/patches/040-manage-shebang.patch deleted file mode 100644 index 8507d0c19..000000000 --- a/net/seafile-seahub/patches/040-manage-shebang.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- a/manage.py -+++ b/manage.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - import os - import sys - diff --git a/net/seafile-server/Makefile b/net/seafile-server/Makefile deleted file mode 100644 index 3271ee7a7..000000000 --- a/net/seafile-server/Makefile +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright (C) 2007-2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=seafile-server -PKG_VERSION:=7.1.5 -PKG_RELEASE:=3 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/haiwen/seafile-server/tar.gz/v$(PKG_VERSION)-server? -PKG_HASH:=407a6243f754e366ce6754a2aa643574aa7742d4e81b7cc350dea348f3063707 - -PKG_MAINTAINER:=Jeffery To -PKG_LICENSE:=AGPL-3.0-only -PKG_LICENSE_FILES:=LICENSE.txt - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-server -PKG_BUILD_DEPENDS:=vala/host libevhtp - -PKG_FIXUP:=autoreconf -PKG_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 -PYTHON3_PKG_BUILD:=0 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk -include ../../lang/python/python3-package.mk - -# Check that the actual Makefile version-relase match the above. -$(eval $(shell awk '/^PKG_VERSION.*=/ { print "SEAHUB_" $$$$0 }' ../seafile-seahub/Makefile)) -ifneq ($(PKG_VERSION),$(SEAHUB_PKG_VERSION)) - $(error $(if $(SEAHUB_PKG_VERSION), \ - Version mismatch between seafile-seahub ($(SEAHUB_PKG_VERSION)) and \ - seafile-server ($(PKG_VERSION)), \ - Could not get PKG_VERSION from seafile-seahub Makefile)) -endif - -define Package/seafile-server - SECTION:=net - CATEGORY:=Network - TITLE:=Seafile server - URL:=https://seafile.com/ - DEPENDS:= \ - @BROKEN \ - +bash \ - +glib2 \ - +jansson \ - +libarchive \ - +libevent2 \ - +libevent2-openssl \ - +libmariadb \ - +libopenssl \ - +libpthread \ - +libsearpc \ - +libsqlite3 \ - +libuuid \ - +oniguruma \ - +procps-ng \ - +procps-ng-pkill \ - +python3-pymysql \ - +python3-seafile-server \ - +seafile-ccnet \ - +seafile-seahub \ - +sqlite3-cli \ - +zlib \ - $(ICONV_DEPENDS) -endef - -define Package/seafile-server/description - Open source cloud storage with advanced features on privacy - protection and teamwork. -endef - -define Package/seafile-server/config - select LIBEVHTP_BUILD_DEPENDS -endef - -define Package/seafile-server-fuse - SECTION:=net - CATEGORY:=Network - TITLE:=Seafile server - FUSE extension - URL:=https://seafile.com/ - DEPENDS:= \ - @BROKEN \ - +bash \ - +glib2 \ - +jansson \ - +libevent2 \ - +libevent2-openssl \ - +libfuse \ - +libmariadb \ - +libopenssl \ - +libpthread \ - +libsearpc \ - +libsqlite3 \ - +libuuid \ - +procps-ng \ - +procps-ng-pkill \ - +seafile-ccnet \ - +seafile-server \ - +zlib \ - $(ICONV_DEPENDS) -endef - -define Package/seafile-server-fuse/description -$(call Package/seafile-server/description) - - This package contains the FUSE extension (seaf-fuse) for Seafile - server. -endef - -define Package/python3-seafile-server - SECTION:=lang - CATEGORY:=Languages - SUBMENU:=Python - TITLE:=Python bindings for Seafile server - DEPENDS:=@BROKEN +python3-light +python3-logging +python3-searpc +python3-seafile-ccnet -endef - -define Package/python3-seafile-server/description -$(call Package/seafile-server/description) - - This package contains Python bindings for Seafile server. -endef - -CONFIGURE_ARGS += \ - --disable-console \ - --enable-fuse \ - --enable-python \ - --with-mysql="$(STAGING_DIR)/usr/bin/mysql_config" - -CONFIGURE_VARS += \ - PYTHON="$(HOST_PYTHON3_BIN)" - -define Package/seafile-server/conffiles -/etc/config/seafile-server -endef - -SEAFILE_SERVER_BINARIES:= \ - seaf-fsck \ - seafile-controller \ - seaf-server \ - seaf-server-init \ - seafserv-gc - -SEAFILE_SERVER_SHELL_SCRIPTS:= \ - reset-admin.sh \ - seaf-fsck.sh \ - seaf-gc.sh \ - seafile.sh \ - seahub.sh \ - setup-seafile-mysql.sh \ - setup-seafile.sh - # sqlite2mysql.sh handled differently - -SEAFILE_SERVER_PYTHON_SCRIPTS:= \ - check_init_admin.py \ - setup-seafile-mysql.py \ - sqlite2mysql.py - -define Package/seafile-server/install - $(INSTALL_DIR) $(1)/usr/{bin,libexec} - $(INSTALL_DIR) $(1)/usr/share/seafile/seafile-server - $(INSTALL_DIR) $(1)/etc/{config,init.d,seafile} - $(INSTALL_DIR) $(1)/lib/upgrade/keep.d - - for bin in $(SEAFILE_SERVER_BINARIES) ; do \ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$$$$bin $(1)/usr/libexec/ ; \ - done - - for sh in $(SEAFILE_SERVER_SHELL_SCRIPTS) ; do \ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/$$$$sh $(1)/usr/bin/$$$${sh%.sh} ; \ - done - mv $(1)/usr/bin/reset-admin $(1)/usr/bin/reset-seafile-admin - - $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/sqlite2mysql.sh $(1)/usr/share/seafile/seafile-server/ - - for py in $(SEAFILE_SERVER_PYTHON_SCRIPTS) ; do \ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/scripts/$$$$py $(1)/usr/share/seafile/seafile-server/ ; \ - done - - $(CP) $(PKG_BUILD_DIR)/scripts/{sql,upgrade} $(1)/usr/share/seafile/seafile-server/ - rm -rf $(1)/usr/share/seafile/seafile-server/upgrade/win32 - - $(INSTALL_BIN) ./files/create-seafile-admin.sh $(1)/usr/bin/create-seafile-admin - - $(INSTALL_CONF) ./files/seafile-server.config $(1)/etc/config/seafile-server - $(INSTALL_BIN) ./files/seafile-server.init $(1)/etc/init.d/seafile-server - $(INSTALL_DATA) ./files/seafile-server.upgrade $(1)/lib/upgrade/keep.d/seafile-server -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/include/seafile - $(INSTALL_DIR) $(1)/usr/lib/pkgconfig - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/seafile/*.h $(1)/usr/include/seafile/ - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libseafile.pc $(1)/usr/lib/pkgconfig/ -endef - -define Package/seafile-server-fuse/install - $(INSTALL_DIR) $(1)/usr/{bin,libexec} - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/seaf-fuse $(1)/usr/libexec/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/seaf-fuse.sh $(1)/usr/bin/seaf-fuse -endef - -Py3Package/python3-seafile-server/install:=: - -define Package/seafile-server/postinst -#!/bin/sh -cat << EOF - -Please see: - -https://github.com/openwrt/packages/blob/master/net/seafile-server/README.md - -for OpenWrt-specific installation notes (in particular, if you are -upgrading from a version before 7.1). - -EOF - -[ -z "$$IPKG_INSTROOT" ] || exit 0 - -cat << EOF - -opkg will attempt to start Seafile server now. This may fail if you have -not set up Seafile server before or if you are upgrading and have not -run the upgrade scripts. - -EOF -endef - -$(eval $(call BuildPackage,seafile-server)) -$(eval $(call BuildPackage,seafile-server-fuse)) - -$(eval $(call Py3Package,python3-seafile-server)) -$(eval $(call BuildPackage,python3-seafile-server)) -$(eval $(call BuildPackage,python3-seafile-server-src)) diff --git a/net/seafile-server/README.md b/net/seafile-server/README.md deleted file mode 100644 index e4bd47a94..000000000 --- a/net/seafile-server/README.md +++ /dev/null @@ -1,114 +0,0 @@ -# Seafile Server on OpenWrt - -## Installation Notes - -### First-time Installation - -1. Consider where you would like the Seafile data directory - (`seafile-data`), Seahub data directory (`seahub-data`), and the - Seahub database (`seahub.db`, if you will be using SQLite) to be - stored. - - This location can be configured in `/etc/config/seafile-server` - (using the _data_dir_ option); the default is `/usr/share/seafile`. - - If you are certain you will use a custom location, set this location - in `/etc/config/seafile-server` before continuing with the other - installation steps. - -2. Run one of the two setup scripts: - - * To use SQLite: - - # setup-seafile - - * To use MySQL: - - # setup-seafile-mysql - -3. Create a Seafile admin account: - - # create-seafile-admin - -4. Start Seafile server: - - # service seafile-server start - - -### Upgrading - -Please run the appropriate upgrade scripts in -`/usr/share/seafile/seafile-server/upgrade` before using the new -version. - -For more information, see -https://download.seafile.com/published/seafile-manual/upgrade/upgrade.md. - -Note that since version 7.1, configuration files are stored in -`/etc/seafile` instead of `/usr/share/seafile`. - -If you are upgrading from a version before 7.1: - -1. Run the upgrade scripts in - `/usr/share/seafile/seafile-server/upgrade` up to 7.1. - -2. Move the `conf` and `ccnet` directories from `/usr/share/seafile` to - `/etc/seafile`. - -3. If you are using a custom Seafile data directory location and have - set this in `ccnet/seafile.ini`: - - Starting with 7.1, the Seafile data directory location will be taken - from `/etc/config/seafile-server`, and any setting in - `ccnet/seafile.ini` will be ignored. - - It is strongly recommended to migrate the custom location setting to - `/etc/config/seafile-server` and rename/remove the `seafile.ini` - file. - - Note that the _data_dir_ option in /etc/config/seafile-server - determines the *parent* path to the Seafile data directory (along - with the Seahub data directory and the Seahub database, if you are - using SQLite). The actual Seafile data directory must be named - `seafile-data`. - - For example, if your Seafile data directory is - `/srv/seafile/my-seafile-data`: - - 1. Rename the directory to `seafile-data`, so now the Seafile data - directory is `/srv/seafile/seafile-data`. - - 2. Move the Seahub data directory (`seahub-data`) from - `/usr/share/seafile` into `/srv/seafile`. - - 3. If you are using SQLite, move the Seahub database (`seahub.db`) - from `/usr/share/seafile` into `/srv/seafile`. - - 4. Set the _data_dir_ option in `/etc/config/seafile-server` to the - parent path, `/srv/seafile`. - - 5. Rename or delete `ccnet/seafile.ini`. - -4. Review/update your Seahub settings. In previous versions of the - Seahub OpenWrt package, some of Seahub's default settings (in - `/usr/share/seafile/seafile-server/seahub/seahub/settings.py`) were - modified from the defaults shipped by upstream. - - Starting with 7.1, Seahub's default settings are the same as - [upstream][seahub_settings], with custom settings added to - `/etc/seafile/conf/seahub_settings.py` during setup for new - installations. - - To use the same custom settings in your upgraded installation, add - these lines to `/etc/seafile/conf/seahub_settings.py`: - - # Custom settings for OpenWrt - USE_I18N = False - USER_PASSWORD_MIN_LENGTH = 8 - USER_STRONG_PASSWORD_REQUIRED = True - - [seahub_settings]: https://github.com/haiwen/seahub/blob/v7.1.2-server/seahub/settings.py - -5. Continue running the upgrade scripts up to the new version. - - diff --git a/net/seafile-server/files/create-seafile-admin.sh b/net/seafile-server/files/create-seafile-admin.sh deleted file mode 100644 index 3748381cd..000000000 --- a/net/seafile-server/files/create-seafile-admin.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -TOPDIR=/usr/share/seafile -INSTALLPATH=$TOPDIR/seafile-server - -seafile start || exit 1 - -seahub python-env python3 "$INSTALLPATH/check_init_admin.py" - -seafile stop diff --git a/net/seafile-server/files/seafile-server.config b/net/seafile-server/files/seafile-server.config deleted file mode 100644 index 5d801dd85..000000000 --- a/net/seafile-server/files/seafile-server.config +++ /dev/null @@ -1,11 +0,0 @@ -config seafile-server - # - # Directory that holds: - # - # * Seafile data directory (seafile-data) - # * Seahub data directory (seahub-data) - # * Seahub database (seahub.db), if using SQLite - # - # Default: /usr/share/seafile - # - option data_dir /usr/share/seafile diff --git a/net/seafile-server/files/seafile-server.init b/net/seafile-server/files/seafile-server.init deleted file mode 100644 index 401390c9b..000000000 --- a/net/seafile-server/files/seafile-server.init +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=99 -STOP=01 - -extra_command "generate_uci_conf" "Generate uci config" - -TOPDIR=/usr/share/seafile -INSTALLPATH=$TOPDIR/seafile-server - -uci_conf=/var/run/seafile/uci.conf -default_data_dir=$TOPDIR - -seafile_server_latest_symlink=$TOPDIR/seafile-server-latest -seafile_data_dir_symlink=$TOPDIR/seafile-data -seahub_avatars_symlink=$INSTALLPATH/seahub/media/avatars -seahub_custom_media_symlink=$INSTALLPATH/seahub/media/custom - -read_uci_section() { - local cfg="$1" - local data_dir - config_get data_dir "$cfg" data_dir "$default_data_dir" - uci_data_dir="$data_dir" -} - -generate_uci_conf() { - local uci_data_dir="$default_data_dir" - - config_load seafile-server - config_foreach read_uci_section seafile-server - - mkdir -p "$uci_data_dir" - - mkdir -p "${uci_conf%/*}" - cat <<- EOF > "$uci_conf" - export SEAFILE_UCI_CONF_DIR=/etc/seafile - export SEAFILE_UCI_DATA_DIR="$uci_data_dir" - export SEAFILE_UCI_LOG_DIR=/var/log/seafile - export SEAFILE_UCI_PID_DIR=/var/run/seafile - export SEAFILE_UCI_SOCKET_DIR=/var/run/seafile - EOF - - [ ! -L "$seafile_server_latest_symlink" ] || rm -f "$seafile_server_latest_symlink" - [ ! -L "$seafile_data_dir_symlink" ] || rm -f "$seafile_data_dir_symlink" - - [ ! -L "$seahub_avatars_symlink" ] || \ - [ "$(readlink -f "$seahub_avatars_symlink")" = "$uci_data_dir/seahub-data/avatars" ] || \ - ln -snf "$uci_data_dir/seahub-data/avatars" "$seahub_avatars_symlink" - - [ ! -L "$seahub_custom_media_symlink" ] || \ - [ "$(readlink -f "$seahub_custom_media_symlink")" = "$uci_data_dir/seahub-data/custom" ] || \ - ln -snf "$uci_data_dir/seahub-data/custom" "$seahub_custom_media_symlink" -} - -start() { - seafile start || return - if ! seahub start; then - seafile stop - return 1 - fi -} - -stop() { - seahub stop - seahub_ret=$? - seafile stop - seafile_ret=$? - [ "$seahub_ret" -eq 0 ] && [ "$seafile_ret" -eq 0 ] -} - -restart() { - stop - sleep 2 - start -} diff --git a/net/seafile-server/files/seafile-server.upgrade b/net/seafile-server/files/seafile-server.upgrade deleted file mode 100644 index 9312da679..000000000 --- a/net/seafile-server/files/seafile-server.upgrade +++ /dev/null @@ -1 +0,0 @@ -/etc/seafile/ diff --git a/net/seafile-server/patches/010-configure-libevent_openssl.patch b/net/seafile-server/patches/010-configure-libevent_openssl.patch deleted file mode 100644 index 902676b7e..000000000 --- a/net/seafile-server/patches/010-configure-libevent_openssl.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -219,7 +219,7 @@ PKG_CHECK_MODULES(JANSSON, [jansson >= $ - AC_SUBST(JANSSON_CFLAGS) - AC_SUBST(JANSSON_LIBS) - --PKG_CHECK_MODULES(LIBEVENT, [libevent >= $LIBEVENT_REQUIRED]) -+PKG_CHECK_MODULES(LIBEVENT, [libevent_openssl >= $LIBEVENT_REQUIRED]) - AC_SUBST(LIBEVENT_CFLAGS) - AC_SUBST(LIBEVENT_LIBS) - diff --git a/net/seafile-server/patches/011-configure-liconv.patch b/net/seafile-server/patches/011-configure-liconv.patch deleted file mode 100644 index 819e68435..000000000 --- a/net/seafile-server/patches/011-configure-liconv.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -167,6 +167,7 @@ else - LIB_MAC= - MSVC_CFLAGS= - LIB_CRYPT32= -+ LIB_ICONV=-liconv - fi - - AC_SUBST(LIB_WS32) diff --git a/net/seafile-server/patches/012-automake-no-python-compile.patch b/net/seafile-server/patches/012-automake-no-python-compile.patch deleted file mode 100644 index 624c8c7c5..000000000 --- a/net/seafile-server/patches/012-automake-no-python-compile.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/python/seafile/Makefile.am -+++ b/python/seafile/Makefile.am -@@ -1,3 +1,3 @@ - seafiledir=${pyexecdir}/seafile - --seafile_PYTHON = __init__.py rpcclient.py -+seafile_DATA = __init__.py rpcclient.py ---- a/python/seaserv/Makefile.am -+++ b/python/seaserv/Makefile.am -@@ -1,3 +1,3 @@ - seaservdir=${pyexecdir}/seaserv - --seaserv_PYTHON = __init__.py service.py api.py -+seaserv_DATA = __init__.py service.py api.py diff --git a/net/seafile-server/patches/020-installpath.patch b/net/seafile-server/patches/020-installpath.patch deleted file mode 100644 index 3a21ca976..000000000 --- a/net/seafile-server/patches/020-installpath.patch +++ /dev/null @@ -1,99 +0,0 @@ ---- a/controller/seafile-controller.c -+++ b/controller/seafile-controller.c -@@ -288,7 +288,7 @@ init_seafile_path () - bin_dir = g_path_get_dirname (binary); - - tmp = g_path_get_dirname (bin_dir); -- installpath = g_path_get_dirname (tmp); -+ installpath = "/usr/share/seafile/seafile-server"; - - topdir = g_path_get_dirname (installpath); - ---- a/scripts/reset-admin.sh -+++ b/scripts/reset-admin.sh -@@ -1,7 +1,7 @@ - #!/bin/bash - - SCRIPT=$(readlink -f "$0") --INSTALLPATH=$(dirname "${SCRIPT}") -+INSTALLPATH=/usr/share/seafile/seafile-server - TOPDIR=$(dirname "${INSTALLPATH}") - default_ccnet_conf_dir=${TOPDIR}/ccnet - default_seafile_data_dir=${TOPDIR}/seafile-data ---- a/scripts/seaf-fsck.sh -+++ b/scripts/seaf-fsck.sh -@@ -3,7 +3,7 @@ - echo "" - - SCRIPT=$(readlink -f "$0") --INSTALLPATH=$(dirname "${SCRIPT}") -+INSTALLPATH=/usr/share/seafile/seafile-server - TOPDIR=$(dirname "${INSTALLPATH}") - default_ccnet_conf_dir=${TOPDIR}/ccnet - default_seafile_data_dir=${TOPDIR}/seafile-data ---- a/scripts/seaf-fuse.sh -+++ b/scripts/seaf-fuse.sh -@@ -3,7 +3,7 @@ - echo "" - - SCRIPT=$(readlink -f "$0") --INSTALLPATH=$(dirname "${SCRIPT}") -+INSTALLPATH=/usr/share/seafile/seafile-server - TOPDIR=$(dirname "${INSTALLPATH}") - default_ccnet_conf_dir=${TOPDIR}/ccnet - default_seafile_data_dir=${TOPDIR}/seafile-data ---- a/scripts/seaf-gc.sh -+++ b/scripts/seaf-gc.sh -@@ -3,7 +3,7 @@ - echo "" - - SCRIPT=$(readlink -f "$0") --INSTALLPATH=$(dirname "${SCRIPT}") -+INSTALLPATH=/usr/share/seafile/seafile-server - TOPDIR=$(dirname "${INSTALLPATH}") - default_ccnet_conf_dir=${TOPDIR}/ccnet - default_seafile_data_dir=${TOPDIR}/seafile-data ---- a/scripts/seafile.sh -+++ b/scripts/seafile.sh -@@ -13,7 +13,7 @@ - echo "" - - SCRIPT=$(readlink -f "$0") --INSTALLPATH=$(dirname "${SCRIPT}") -+INSTALLPATH=/usr/share/seafile/seafile-server - TOPDIR=$(dirname "${INSTALLPATH}") - default_ccnet_conf_dir=${TOPDIR}/ccnet - default_seafile_data_dir=${TOPDIR}/seafile-data ---- a/scripts/seahub.sh -+++ b/scripts/seahub.sh -@@ -13,7 +13,7 @@ - echo "" - - SCRIPT=$(readlink -f "$0") --INSTALLPATH=$(dirname "${SCRIPT}") -+INSTALLPATH=/usr/share/seafile/seafile-server - TOPDIR=$(dirname "${INSTALLPATH}") - default_ccnet_conf_dir=${TOPDIR}/ccnet - default_seafile_data_dir=${TOPDIR}/seafile-data ---- a/scripts/setup-seafile-mysql.sh -+++ b/scripts/setup-seafile-mysql.sh -@@ -7,7 +7,7 @@ - set -e - - SCRIPT=$(readlink -f "$0") --INSTALLPATH=$(dirname "${SCRIPT}") -+INSTALLPATH=/usr/share/seafile/seafile-server - - cd "$INSTALLPATH" - ---- a/scripts/setup-seafile.sh -+++ b/scripts/setup-seafile.sh -@@ -1,7 +1,7 @@ - #!/bin/bash - - SCRIPT=$(readlink -f "$0") --INSTALLPATH=$(dirname "${SCRIPT}") -+INSTALLPATH=/usr/share/seafile/seafile-server - TOPDIR=$(dirname "${INSTALLPATH}") - default_ccnet_conf_dir=${TOPDIR}/ccnet - default_seafile_data_dir=${TOPDIR}/seafile-data diff --git a/net/seafile-server/patches/021-bin-paths.patch b/net/seafile-server/patches/021-bin-paths.patch deleted file mode 100644 index d97625be3..000000000 --- a/net/seafile-server/patches/021-bin-paths.patch +++ /dev/null @@ -1,104 +0,0 @@ ---- a/scripts/seaf-fsck.sh -+++ b/scripts/seaf-fsck.sh -@@ -8,9 +8,9 @@ TOPDIR=$(dirname "${INSTALLPATH}") - default_ccnet_conf_dir=${TOPDIR}/ccnet - default_seafile_data_dir=${TOPDIR}/seafile-data - default_conf_dir=${TOPDIR}/conf --seaf_fsck=${INSTALLPATH}/seafile/bin/seaf-fsck -+seaf_fsck=/usr/libexec/seaf-fsck - --export PATH=${INSTALLPATH}/seafile/bin:$PATH -+export PATH=/usr/libexec:$PATH - export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH} - - script_name=$0 ---- a/scripts/seaf-fuse.sh -+++ b/scripts/seaf-fuse.sh -@@ -8,9 +8,9 @@ TOPDIR=$(dirname "${INSTALLPATH}") - default_ccnet_conf_dir=${TOPDIR}/ccnet - default_seafile_data_dir=${TOPDIR}/seafile-data - default_conf_dir=${TOPDIR}/conf --seaf_fuse=${INSTALLPATH}/seafile/bin/seaf-fuse -+seaf_fuse=/usr/libexec/seaf-fuse - --export PATH=${INSTALLPATH}/seafile/bin:$PATH -+export PATH=/usr/libexec:$PATH - export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH} - - script_name=$0 ---- a/scripts/seaf-gc.sh -+++ b/scripts/seaf-gc.sh -@@ -8,10 +8,10 @@ TOPDIR=$(dirname "${INSTALLPATH}") - default_ccnet_conf_dir=${TOPDIR}/ccnet - default_seafile_data_dir=${TOPDIR}/seafile-data - default_conf_dir=${TOPDIR}/conf --seaf_gc=${INSTALLPATH}/seafile/bin/seafserv-gc -+seaf_gc=/usr/libexec/seafserv-gc - seaf_gc_opts="" - --export PATH=${INSTALLPATH}/seafile/bin:$PATH -+export PATH=/usr/libexec:$PATH - export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH} - - script_name=$0 ---- a/scripts/seafile.sh -+++ b/scripts/seafile.sh -@@ -18,9 +18,9 @@ TOPDIR=$(dirname "${INSTALLPATH}") - default_ccnet_conf_dir=${TOPDIR}/ccnet - default_seafile_data_dir=${TOPDIR}/seafile-data - central_config_dir=${TOPDIR}/conf --seaf_controller="${INSTALLPATH}/seafile/bin/seafile-controller" -+seaf_controller="/usr/libexec/seafile-controller" - --export PATH=${INSTALLPATH}/seafile/bin:$PATH -+export PATH=/usr/libexec:$PATH - export ORIG_LD_LIBRARY_PATH=${LD_LIBRARY_PATH} - export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH} - ---- a/scripts/seahub.sh -+++ b/scripts/seahub.sh -@@ -25,7 +25,7 @@ gunicorn_conf=${TOPDIR}/conf/gunicorn.co - pidfile=${TOPDIR}/pids/seahub.pid - errorlog=${TOPDIR}/logs/gunicorn_error.log - accesslog=${TOPDIR}/logs/gunicorn_access.log --gunicorn_exe=${INSTALLPATH}/seahub/thirdpart/bin/gunicorn -+gunicorn_exe=/usr/bin/gunicorn3 - - script_name=$0 - function usage () { -@@ -233,9 +233,9 @@ function clear_sessions () { - function stop_seahub () { - if [[ -f ${pidfile} ]]; then - echo "Stopping seahub ..." -- pkill -9 -f "thirdpart/bin/gunicorn" -+ pkill -9 -f "/usr/bin/gunicorn3" - sleep 1 -- if pgrep -f "thirdpart/bin/gunicorn" 2>/dev/null 1>&2 ; then -+ if pgrep -f "/usr/bin/gunicorn3" 2>/dev/null 1>&2 ; then - echo 'Failed to stop seahub.' - exit 1 - fi ---- a/scripts/setup-seafile-mysql.py -+++ b/scripts/setup-seafile-mysql.py -@@ -299,7 +299,7 @@ class EnvManager(object): - def __init__(self): - self.install_path = os.path.dirname(os.path.abspath(__file__)) - self.top_dir = os.path.dirname(self.install_path) -- self.bin_dir = os.path.join(self.install_path, 'seafile', 'bin') -+ self.bin_dir = '/usr/libexec' - self.central_config_dir = os.path.join(self.top_dir, 'conf') - self.central_pids_dir = os.path.join(self.top_dir, 'pids') - self.central_logs_dir = os.path.join(self.top_dir, 'logs') ---- a/scripts/setup-seafile.sh -+++ b/scripts/setup-seafile.sh -@@ -455,8 +455,8 @@ if [[ "${need_pause}" == "1" ]]; then - read dummy - fi - --ccnet_init=${INSTALLPATH}/seafile/bin/ccnet-init --seaf_server_init=${INSTALLPATH}/seafile/bin/seaf-server-init -+ccnet_init=/usr/libexec/ccnet-init -+seaf_server_init=/usr/libexec/seaf-server-init - - # ------------------------------------------- - # Create ccnet conf diff --git a/net/seafile-server/patches/022-uci-conf.patch b/net/seafile-server/patches/022-uci-conf.patch deleted file mode 100644 index 63351bf79..000000000 --- a/net/seafile-server/patches/022-uci-conf.patch +++ /dev/null @@ -1,583 +0,0 @@ ---- a/common/seaf-utils.c -+++ b/common/seaf-utils.c -@@ -238,7 +238,12 @@ create_ccnet_rpc_client () - SearpcNamedPipeClient *transport = NULL; - char *pipe_path = NULL; - -- pipe_path = g_build_path ("/", seaf->ccnet_dir, CCNET_RPC_PIPE_NAME, NULL); -+ char *socket_dir = g_strdup (g_getenv ("SEAFILE_UCI_SOCKET_DIR")); -+ if (!socket_dir) { -+ socket_dir = g_strdup (seaf->ccnet_dir); -+ } -+ pipe_path = g_build_path ("/", socket_dir, CCNET_RPC_PIPE_NAME, NULL); -+ g_free (socket_dir); - transport = searpc_create_named_pipe_client(pipe_path); - g_free(pipe_path); - if (!transport) ---- a/controller/seafile-controller.c -+++ b/controller/seafile-controller.c -@@ -511,7 +511,10 @@ stop_services () - static void - init_pidfile_path (SeafileController *ctl) - { -- char *pid_dir = g_build_filename (topdir, "pids", NULL); -+ char *pid_dir = g_strdup (g_getenv ("SEAFILE_UCI_PID_DIR")); -+ if (!pid_dir) { -+ pid_dir = g_build_filename (topdir, "pids", NULL); -+ } - if (!g_file_test(pid_dir, G_FILE_TEST_EXISTS)) { - if (g_mkdir(pid_dir, 0777) < 0) { - seaf_warning("failed to create pid dir %s: %s", pid_dir, strerror(errno)); -@@ -523,6 +526,8 @@ init_pidfile_path (SeafileController *ct - ctl->pidfile[PID_SERVER] = g_build_filename (pid_dir, "seaf-server.pid", NULL); - ctl->pidfile[PID_SEAFDAV] = g_build_filename (pid_dir, "seafdav.pid", NULL); - ctl->pidfile[PID_SEAFEVENTS] = g_build_filename (pid_dir, "seafevents.pid", NULL); -+ -+ g_free (pid_dir); - } - - static int -@@ -545,7 +550,10 @@ seaf_controller_init (SeafileController - - if (logdir == NULL) { - char *topdir = g_path_get_dirname(config_dir); -- logdir = g_build_filename (topdir, "logs", NULL); -+ logdir = g_strdup (g_getenv ("SEAFILE_UCI_LOG_DIR")); -+ if (!logdir) { -+ logdir = g_build_filename (topdir, "logs", NULL); -+ } - if (checkdir_with_mkdir(logdir) < 0) { - fprintf (stderr, "failed to create log folder \"%s\": %s\n", - logdir, strerror(errno)); -@@ -554,10 +562,15 @@ seaf_controller_init (SeafileController - g_free (topdir); - } - -+ char *socket_dir = g_strdup (g_getenv ("SEAFILE_UCI_SOCKET_DIR")); -+ if (!socket_dir) { -+ socket_dir = g_build_filename (installpath, "runtime", NULL); -+ } -+ - ctl->central_config_dir = central_config_dir; - ctl->config_dir = config_dir; - ctl->seafile_dir = seafile_dir; -- ctl->rpc_pipe_path = g_build_filename (installpath, "runtime", NULL); -+ ctl->rpc_pipe_path = socket_dir; - ctl->logdir = logdir; - - if (read_seafdav_config() < 0) { ---- a/python/seaserv/service.py -+++ b/python/seaserv/service.py -@@ -32,11 +32,17 @@ CCNET_CONF_PATH = _load_path_from_env('C - SEAFILE_CONF_DIR = _load_path_from_env('SEAFILE_CONF_DIR') - SEAFILE_CENTRAL_CONF_DIR = _load_path_from_env('SEAFILE_CENTRAL_CONF_DIR', check=False) - SEAFILE_RPC_PIPE_PATH = _load_path_from_env ("SEAFILE_RPC_PIPE_PATH", check=False) -+SEAFILE_UCI_SOCKET_DIR = _load_path_from_env('SEAFILE_UCI_SOCKET_DIR', check=False) - --ccnet_pipe_path = os.path.join (CCNET_CONF_PATH, 'ccnet-rpc.sock') -+ccnet_pipe_path = os.path.join (SEAFILE_UCI_SOCKET_DIR if SEAFILE_UCI_SOCKET_DIR else CCNET_CONF_PATH, 'ccnet-rpc.sock') - ccnet_threaded_rpc = ccnet.CcnetThreadedRpcClient(ccnet_pipe_path) - --seafile_pipe_path = os.path.join(SEAFILE_RPC_PIPE_PATH if SEAFILE_RPC_PIPE_PATH else SEAFILE_CONF_DIR, -+socket_dir = SEAFILE_CONF_DIR -+if SEAFILE_RPC_PIPE_PATH: -+ socket_dir = SEAFILE_RPC_PIPE_PATH -+elif SEAFILE_UCI_SOCKET_DIR: -+ socket_dir = SEAFILE_UCI_SOCKET_DIR -+seafile_pipe_path = os.path.join(socket_dir, - 'seafile.sock') - seafserv_threaded_rpc = seafile.ServerThreadedRpcClient(seafile_pipe_path) - ---- a/scripts/check_init_admin.py -+++ b/scripts/check_init_admin.py -@@ -284,7 +284,7 @@ class RPC(object): - import ccnet - ccnet_dir = os.environ['CCNET_CONF_DIR'] - central_config_dir = os.environ['SEAFILE_CENTRAL_CONF_DIR'] -- ccnet_named_pipe_path = ccnet_dir + '/' + 'ccnet-rpc.sock' -+ ccnet_named_pipe_path = os.environ.get('SEAFILE_UCI_SOCKET_DIR', ccnet_dir) + '/' + 'ccnet-rpc.sock' - self.rpc_client = ccnet.CcnetThreadedRpcClient(ccnet_named_pipe_path) - - def get_db_email_users(self): ---- a/scripts/reset-admin.sh -+++ b/scripts/reset-admin.sh -@@ -1,11 +1,13 @@ - #!/bin/bash - -+/etc/init.d/seafile-server generate_uci_conf && . /var/run/seafile/uci.conf -+ - SCRIPT=$(readlink -f "$0") - INSTALLPATH=/usr/share/seafile/seafile-server - TOPDIR=$(dirname "${INSTALLPATH}") --default_ccnet_conf_dir=${TOPDIR}/ccnet --default_seafile_data_dir=${TOPDIR}/seafile-data --central_config_dir=${TOPDIR}/conf -+default_ccnet_conf_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/ccnet -+default_seafile_data_dir=${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seafile-data -+central_config_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf - - function check_python_executable() { - if [[ "$PYTHON" != "" && -x $PYTHON ]]; then ---- a/scripts/seaf-fsck.sh -+++ b/scripts/seaf-fsck.sh -@@ -2,12 +2,14 @@ - - echo "" - -+/etc/init.d/seafile-server generate_uci_conf && . /var/run/seafile/uci.conf -+ - SCRIPT=$(readlink -f "$0") - INSTALLPATH=/usr/share/seafile/seafile-server - TOPDIR=$(dirname "${INSTALLPATH}") --default_ccnet_conf_dir=${TOPDIR}/ccnet --default_seafile_data_dir=${TOPDIR}/seafile-data --default_conf_dir=${TOPDIR}/conf -+default_ccnet_conf_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/ccnet -+default_seafile_data_dir=${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seafile-data -+default_conf_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf - seaf_fsck=/usr/libexec/seaf-fsck - - export PATH=/usr/libexec:$PATH ---- a/scripts/seaf-fuse.sh -+++ b/scripts/seaf-fuse.sh -@@ -2,12 +2,14 @@ - - echo "" - -+/etc/init.d/seafile-server generate_uci_conf && . /var/run/seafile/uci.conf -+ - SCRIPT=$(readlink -f "$0") - INSTALLPATH=/usr/share/seafile/seafile-server - TOPDIR=$(dirname "${INSTALLPATH}") --default_ccnet_conf_dir=${TOPDIR}/ccnet --default_seafile_data_dir=${TOPDIR}/seafile-data --default_conf_dir=${TOPDIR}/conf -+default_ccnet_conf_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/ccnet -+default_seafile_data_dir=${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seafile-data -+default_conf_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf - seaf_fuse=/usr/libexec/seaf-fuse - - export PATH=/usr/libexec:$PATH -@@ -78,7 +80,7 @@ function start_seaf_fuse () { - - echo "Starting seaf-fuse, please wait ..." - -- logfile=${TOPDIR}/logs/seaf-fuse.log -+ logfile=${SEAFILE_UCI_LOG_DIR-$TOPDIR/logs}/seaf-fuse.log - - LD_LIBRARY_PATH=$SEAFILE_LD_LIBRARY_PATH ${seaf_fuse} \ - -c "${default_ccnet_conf_dir}" \ ---- a/scripts/seaf-gc.sh -+++ b/scripts/seaf-gc.sh -@@ -2,12 +2,14 @@ - - echo "" - -+/etc/init.d/seafile-server generate_uci_conf && . /var/run/seafile/uci.conf -+ - SCRIPT=$(readlink -f "$0") - INSTALLPATH=/usr/share/seafile/seafile-server - TOPDIR=$(dirname "${INSTALLPATH}") --default_ccnet_conf_dir=${TOPDIR}/ccnet --default_seafile_data_dir=${TOPDIR}/seafile-data --default_conf_dir=${TOPDIR}/conf -+default_ccnet_conf_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/ccnet -+default_seafile_data_dir=${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seafile-data -+default_conf_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf - seaf_gc=/usr/libexec/seafserv-gc - seaf_gc_opts="" - ---- a/scripts/seafile.sh -+++ b/scripts/seafile.sh -@@ -12,12 +12,14 @@ - - echo "" - -+/etc/init.d/seafile-server generate_uci_conf && . /var/run/seafile/uci.conf -+ - SCRIPT=$(readlink -f "$0") - INSTALLPATH=/usr/share/seafile/seafile-server - TOPDIR=$(dirname "${INSTALLPATH}") --default_ccnet_conf_dir=${TOPDIR}/ccnet --default_seafile_data_dir=${TOPDIR}/seafile-data --central_config_dir=${TOPDIR}/conf -+default_ccnet_conf_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/ccnet -+default_seafile_data_dir=${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seafile-data -+central_config_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf - seaf_controller="/usr/libexec/seafile-controller" - - export PATH=/usr/libexec:$PATH -@@ -121,7 +123,7 @@ function start_seafile_server () { - - echo "Starting seafile server, please wait ..." - -- mkdir -p $TOPDIR/logs -+ mkdir -p ${SEAFILE_UCI_LOG_DIR-$TOPDIR/logs} - LD_LIBRARY_PATH=$SEAFILE_LD_LIBRARY_PATH ${seaf_controller} \ - -c "${default_ccnet_conf_dir}" \ - -d "${default_seafile_data_dir}" \ ---- a/scripts/seahub.sh -+++ b/scripts/seahub.sh -@@ -12,19 +12,21 @@ - - echo "" - -+/etc/init.d/seafile-server generate_uci_conf && . /var/run/seafile/uci.conf -+ - SCRIPT=$(readlink -f "$0") - INSTALLPATH=/usr/share/seafile/seafile-server - TOPDIR=$(dirname "${INSTALLPATH}") --default_ccnet_conf_dir=${TOPDIR}/ccnet --default_seafile_data_dir=${TOPDIR}/seafile-data --central_config_dir=${TOPDIR}/conf --seafile_rpc_pipe_path=${INSTALLPATH}/runtime -+default_ccnet_conf_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/ccnet -+default_seafile_data_dir=${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seafile-data -+central_config_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf -+seafile_rpc_pipe_path=${SEAFILE_UCI_SOCKET_DIR-$INSTALLPATH/runtime} - - manage_py=${INSTALLPATH}/seahub/manage.py --gunicorn_conf=${TOPDIR}/conf/gunicorn.conf.py --pidfile=${TOPDIR}/pids/seahub.pid --errorlog=${TOPDIR}/logs/gunicorn_error.log --accesslog=${TOPDIR}/logs/gunicorn_access.log -+gunicorn_conf=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf/gunicorn.conf.py -+pidfile=${SEAFILE_UCI_PID_DIR-$TOPDIR/pids}/seahub.pid -+errorlog=${SEAFILE_UCI_LOG_DIR-$TOPDIR/logs}/gunicorn_error.log -+accesslog=${SEAFILE_UCI_LOG_DIR-$TOPDIR/logs}/gunicorn_access.log - gunicorn_exe=/usr/bin/gunicorn3 - - script_name=$0 -@@ -138,7 +140,7 @@ function warning_if_seafile_not_running - } - - function prepare_seahub_log_dir() { -- logdir=${TOPDIR}/logs -+ logdir=${SEAFILE_UCI_LOG_DIR-$TOPDIR/logs} - if ! [[ -d ${logsdir} ]]; then - if ! mkdir -p "${logdir}"; then - echo "ERROR: failed to create logs dir \"${logdir}\"" ---- a/scripts/setup-seafile-mysql.py -+++ b/scripts/setup-seafile-mysql.py -@@ -300,9 +300,9 @@ class EnvManager(object): - self.install_path = os.path.dirname(os.path.abspath(__file__)) - self.top_dir = os.path.dirname(self.install_path) - self.bin_dir = '/usr/libexec' -- self.central_config_dir = os.path.join(self.top_dir, 'conf') -- self.central_pids_dir = os.path.join(self.top_dir, 'pids') -- self.central_logs_dir = os.path.join(self.top_dir, 'logs') -+ self.central_config_dir = os.path.join(os.environ.get('SEAFILE_UCI_CONF_DIR', self.top_dir), 'conf') -+ self.central_pids_dir = os.environ.get('SEAFILE_UCI_PID_DIR', os.path.join(self.top_dir, 'pids')) -+ self.central_logs_dir = os.environ.get('SEAFILE_UCI_LOG_DIR', os.path.join(self.top_dir, 'logs')) - Utils.must_mkdir(self.central_config_dir) - - def check_pre_condiction(self): -@@ -790,7 +790,7 @@ class CcnetConfigurator(AbstractConfigur - def __init__(self): - '''Initialize default values of ccnet configuration''' - AbstractConfigurator.__init__(self) -- self.ccnet_dir = os.path.join(env_mgr.top_dir, 'ccnet') -+ self.ccnet_dir = os.path.join(os.environ.get('SEAFILE_UCI_CONF_DIR', env_mgr.top_dir), 'ccnet') - self.port = 10001 - self.server_name = None - self.ip_or_domain = None -@@ -919,7 +919,7 @@ class CcnetConfigurator(AbstractConfigur - class SeafileConfigurator(AbstractConfigurator): - def __init__(self): - AbstractConfigurator.__init__(self) -- self.seafile_dir = os.path.join(env_mgr.top_dir, 'seafile-data') -+ self.seafile_dir = os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', env_mgr.top_dir), 'seafile-data') - self.port = 12001 - self.fileserver_port = None - self.seafile_conf = os.path.join(env_mgr.central_config_dir, 'seafile.conf') -@@ -983,7 +983,7 @@ class SeafileConfigurator(AbstractConfig - question = 'Where do you want to put your seafile data?' - key = 'seafile-data' - note = 'Please use a volume with enough free space' -- default = os.path.join(env_mgr.top_dir, 'seafile-data') -+ default = os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', env_mgr.top_dir), 'seafile-data') - self.seafile_dir = Utils.ask_question(question, - key=key, - note=note, -@@ -1204,7 +1204,7 @@ class SeahubConfigurator(AbstractConfigu - media_dir = os.path.join(env_mgr.install_path, 'seahub', 'media') - orig_avatar_dir = os.path.join(media_dir, 'avatars') - -- seahub_data_dir = os.path.join(env_mgr.top_dir, 'seahub-data') -+ seahub_data_dir = os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', env_mgr.top_dir), 'seahub-data') - dest_avatar_dir = os.path.join(seahub_data_dir, 'avatars') - - if os.path.exists(dest_avatar_dir): -@@ -1214,7 +1214,7 @@ class SeahubConfigurator(AbstractConfigu - os.mkdir(seahub_data_dir) - - shutil.move(orig_avatar_dir, dest_avatar_dir) -- os.symlink('../../../seahub-data/avatars', orig_avatar_dir) -+ os.symlink(dest_avatar_dir, orig_avatar_dir) - except Exception as e: - Utils.error('Failed to prepare seahub avatars dir: %s' % e) - -@@ -1390,7 +1390,7 @@ def check_params(args): - seafile_config.fileserver_port = Utils.validate_port(fileserver_port) - - seafile_dir = get_param_val(args.seafile_dir, 'SEAFILE_DIR', -- os.path.join(env_mgr.top_dir, 'seafile-data')) -+ os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', env_mgr.top_dir), 'seafile-data')) - seafile_config.seafile_dir = seafile_config.validate_seafile_dir(seafile_dir) - - global db_config ---- a/scripts/setup-seafile-mysql.sh -+++ b/scripts/setup-seafile-mysql.sh -@@ -6,6 +6,8 @@ - - set -e - -+/etc/init.d/seafile-server generate_uci_conf && . /var/run/seafile/uci.conf -+ - SCRIPT=$(readlink -f "$0") - INSTALLPATH=/usr/share/seafile/seafile-server - ---- a/scripts/setup-seafile.sh -+++ b/scripts/setup-seafile.sh -@@ -1,14 +1,16 @@ - #!/bin/bash - -+/etc/init.d/seafile-server generate_uci_conf && . /var/run/seafile/uci.conf -+ - SCRIPT=$(readlink -f "$0") - INSTALLPATH=/usr/share/seafile/seafile-server - TOPDIR=$(dirname "${INSTALLPATH}") --default_ccnet_conf_dir=${TOPDIR}/ccnet --default_seafile_data_dir=${TOPDIR}/seafile-data --default_seahub_db=${TOPDIR}/seahub.db --default_conf_dir=${TOPDIR}/conf --default_pids_dir=${TOPDIR}/pids --default_logs_dir=${TOPDIR}/logs -+default_ccnet_conf_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/ccnet -+default_seafile_data_dir=${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seafile-data -+default_seahub_db=${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seahub.db -+default_conf_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf -+default_pids_dir=${SEAFILE_UCI_PID_DIR-$TOPDIR/pids} -+default_logs_dir=${SEAFILE_UCI_LOG_DIR-$TOPDIR/logs} - - export SEAFILE_LD_LIBRARY_PATH=${INSTALLPATH}/seafile/lib/:${INSTALLPATH}/seafile/lib64:${LD_LIBRARY_PATH} - -@@ -516,7 +518,7 @@ gen_seafdav_conf; - # ------------------------------------------- - # generate seahub/settings.py - # ------------------------------------------- --dest_settings_py=${TOPDIR}/conf/seahub_settings.py -+dest_settings_py=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf/seahub_settings.py - seahub_secret_keygen=${INSTALLPATH}/seahub/tools/secret_key_generator.py - - if [[ ! -f ${dest_settings_py} ]]; then -@@ -621,44 +623,44 @@ function get_seahub_admin_passwd () { - echo "Creating database now, it may take one minute, please wait... " - echo - --cd ${TOPDIR}/ccnet && mkdir -m 0755 GroupMgr misc OrgMgr PeerMgr && cd - -+cd ${SEAFILE_UCI_CONF_DIR-$TOPDIR}/ccnet && mkdir -m 0755 GroupMgr misc OrgMgr PeerMgr && cd - - --ccnet_group_db=${TOPDIR}/ccnet/GroupMgr/groupmgr.db -+ccnet_group_db=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/ccnet/GroupMgr/groupmgr.db - ccnet_group_sql=${INSTALLPATH}/sql/sqlite/groupmgr.sql - if ! sqlite3 ${ccnet_group_db} ".read ${ccnet_group_sql}" 2>/dev/null 1>&2; then - echo "Failed to sync ccnet groupmgr database." - err_and_quit; - fi - --ccnet_config_db=${TOPDIR}/ccnet/misc/config.db -+ccnet_config_db=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/ccnet/misc/config.db - ccnet_config_sql=${INSTALLPATH}/sql/sqlite/config.sql - if ! sqlite3 ${ccnet_config_db} ".read ${ccnet_config_sql}" 2>/dev/null 1>&2; then - echo "Failed to sync ccnet config database." - err_and_quit; - fi - --ccnet_org_db=${TOPDIR}/ccnet/OrgMgr/orgmgr.db -+ccnet_org_db=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/ccnet/OrgMgr/orgmgr.db - ccnet_org_sql=${INSTALLPATH}/sql/sqlite/org.sql - if ! sqlite3 ${ccnet_org_db} ".read ${ccnet_org_sql}" 2>/dev/null 1>&2; then - echo "Failed to sync ccnet org database." - err_and_quit; - fi - --ccnet_user_db=${TOPDIR}/ccnet/PeerMgr/usermgr.db -+ccnet_user_db=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/ccnet/PeerMgr/usermgr.db - ccnet_user_sql=${INSTALLPATH}/sql/sqlite/user.sql - if ! sqlite3 ${ccnet_user_db} ".read ${ccnet_user_sql}" 2>/dev/null 1>&2; then - echo "Failed to sync ccnet user database." - err_and_quit; - fi - --seafile_db=${TOPDIR}/seafile-data/seafile.db -+seafile_db=${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seafile-data/seafile.db - seafile_sql=${INSTALLPATH}/sql/sqlite/seafile.sql - if ! sqlite3 ${seafile_db} ".read ${seafile_sql}" 2>/dev/null 1>&2; then - echo "Failed to sync seafile database." - err_and_quit; - fi - --seahub_db=${TOPDIR}/seahub.db -+seahub_db=${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seahub.db - seahub_sqls=${INSTALLPATH}/seahub/sql/sqlite3.sql - if ! sqlite3 ${seahub_db} ".read ${seahub_sqls}" 2>/dev/null 1>&2; then - echo "Failed to sync seahub database." -@@ -671,12 +673,12 @@ echo "Done." - - media_dir=${INSTALLPATH}/seahub/media - orig_avatar_dir=${INSTALLPATH}/seahub/media/avatars --dest_avatar_dir=${TOPDIR}/seahub-data/avatars -+dest_avatar_dir=${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seahub-data/avatars - - if [[ ! -d ${dest_avatar_dir} ]]; then -- mkdir -p "${TOPDIR}/seahub-data" -+ mkdir -p "${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seahub-data" - mv "${orig_avatar_dir}" "${dest_avatar_dir}" -- ln -s ../../../seahub-data/avatars ${media_dir} -+ ln -s ${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seahub-data/avatars ${media_dir} - fi - - # Make a seafile-server symlink, like this: ---- a/scripts/sqlite2mysql.sh -+++ b/scripts/sqlite2mysql.sh -@@ -13,17 +13,19 @@ - # (mysql> source ccnet-db.sql) - # - -+/etc/init.d/seafile-server generate_uci_conf && . /var/run/seafile/uci.conf -+ - CCNET_DB='ccnet-db.sql' - SEAFILE_DB='seafile-db.sql' - SEAHUB_DB='seahub-db.sql' - - ########## ccnet - seafile_path=$(pwd) --if [ -f "${seafile_path}/conf/ccnet.conf" ]; then -- USER_MGR_DB=${seafile_path}/ccnet/PeerMgr/usermgr.db -- GRP_MGR_DB=${seafile_path}/ccnet/GroupMgr/groupmgr.db -+if [ -f "${SEAFILE_UCI_CONF_DIR-$seafile_path}/conf/ccnet.conf" ]; then -+ USER_MGR_DB=${SEAFILE_UCI_CONF_DIR-$seafile_path}/ccnet/PeerMgr/usermgr.db -+ GRP_MGR_DB=${SEAFILE_UCI_CONF_DIR-$seafile_path}/ccnet/GroupMgr/groupmgr.db - else -- echo "${seafile_path}/conf/ccnet.conf does not exists." -+ echo "${SEAFILE_UCI_CONF_DIR-$seafile_path}/conf/ccnet.conf does not exists." - read -p "Please provide your ccnet.conf path(e.g. /data/haiwen/conf/ccnet.conf): " ccnet_conf_path - if [ -f ${ccnet_conf_path} ]; then - USER_MGR_DB=$(dirname $(dirname "${ccnet_conf_path}"))/ccnet/PeerMgr/usermgr.db -@@ -50,11 +52,11 @@ sed 's/email TEXT, role TEXT/email VARCH - ########## seafile - rm -rf ${SEAFILE_DB} - --if [ -f "${seafile_path}/seafile-data/seafile.db" ]; then -- echo "sqlite3 ${seafile_path}/seafile-data/seafile.db .dump | python sqlite2mysql.py > ${SEAFILE_DB}" -- sqlite3 ${seafile_path}/seafile-data/seafile.db .dump | python sqlite2mysql.py > ${SEAFILE_DB} -+if [ -f "${SEAFILE_UCI_DATA_DIR-$seafile_path}/seafile-data/seafile.db" ]; then -+ echo "sqlite3 ${SEAFILE_UCI_DATA_DIR-$seafile_path}/seafile-data/seafile.db .dump | python sqlite2mysql.py > ${SEAFILE_DB}" -+ sqlite3 ${SEAFILE_UCI_DATA_DIR-$seafile_path}/seafile-data/seafile.db .dump | python sqlite2mysql.py > ${SEAFILE_DB} - else -- echo "${seafile_path}/seafile-data/seafile.db does not exists." -+ echo "${SEAFILE_UCI_DATA_DIR-$seafile_path}/seafile-data/seafile.db does not exists." - read -p "Please provide your seafile.db path(e.g. /data/haiwen/seafile-data/seafile.db): " seafile_db_path - if [ -f ${seafile_db_path} ];then - echo "sqlite3 ${seafile_db_path} .dump | python sqlite2mysql.py > ${SEAFILE_DB}" -@@ -74,11 +76,11 @@ sed 's/user_name TEXT/user_name VARCHAR( - ########## seahub - rm -rf ${SEAHUB_DB} - --if [ -f "${seafile_path}/seahub.db" ]; then -- echo "sqlite3 ${seafile_path}/seahub.db .dump | tr -d '\n' | sed 's/;/;\n/g' | python sqlite2mysql.py > ${SEAHUB_DB}" -- sqlite3 ${seafile_path}/seahub.db .dump | tr -d '\n' | sed 's/;/;\n/g' | python sqlite2mysql.py > ${SEAHUB_DB} -+if [ -f "${SEAFILE_UCI_DATA_DIR-$seafile_path}/seahub.db" ]; then -+ echo "sqlite3 ${SEAFILE_UCI_DATA_DIR-$seafile_path}/seahub.db .dump | tr -d '\n' | sed 's/;/;\n/g' | python sqlite2mysql.py > ${SEAHUB_DB}" -+ sqlite3 ${SEAFILE_UCI_DATA_DIR-$seafile_path}/seahub.db .dump | tr -d '\n' | sed 's/;/;\n/g' | python sqlite2mysql.py > ${SEAHUB_DB} - else -- echo "${seafile_path}/seahub.db does not exists." -+ echo "${SEAFILE_UCI_DATA_DIR-$seafile_path}/seahub.db does not exists." - read -p "Please prove your seahub.db path(e.g. /data/haiwen/seahub.db): " seahub_db_path - if [ -f ${seahub_db_path} ]; then - echo "sqlite3 ${seahub_db_path} .dump | tr -d '\n' | sed 's/;/;\n/g' | python sqlite2mysql.py > ${SEAHUB_DB}" ---- a/scripts/upgrade/minor-upgrade.sh -+++ b/scripts/upgrade/minor-upgrade.sh -@@ -1,5 +1,7 @@ - #!/bin/bash - -+/etc/init.d/seafile-server generate_uci_conf && . /var/run/seafile/uci.conf -+ - SCRIPT=$(readlink -f "$0") # haiwen/seafile-server-1.3.0/upgrade/upgrade_xx_xx.sh - UPGRADE_DIR=$(dirname "$SCRIPT") # haiwen/seafile-server-1.3.0/upgrade/ - INSTALLPATH=$(dirname "$UPGRADE_DIR") # haiwen/seafile-server-1.3.0/ -@@ -15,11 +17,11 @@ read dummy - - media_dir=${INSTALLPATH}/seahub/media - orig_avatar_dir=${INSTALLPATH}/seahub/media/avatars --dest_avatar_dir=${TOPDIR}/seahub-data/avatars -+dest_avatar_dir=${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seahub-data/avatars - seafile_server_symlink=${TOPDIR}/seafile-server-latest --default_conf_dir=${TOPDIR}/conf --default_ccnet_conf_dir=${TOPDIR}/ccnet --seahub_data_dir=${TOPDIR}/seahub-data -+default_conf_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf -+default_ccnet_conf_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/ccnet -+seahub_data_dir=${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seahub-data - elasticsearch_config_file=${seafile_server_symlink}/pro/elasticsearch/config/jvm.options - - function migrate_avatars() { -@@ -37,7 +39,7 @@ function migrate_avatars() { - elif [[ ! -L ${orig_avatar_dir} ]]; then - mv "${orig_avatar_dir}"/* "${dest_avatar_dir}" 2>/dev/null 1>&2 - rm -rf "${orig_avatar_dir}" -- ln -s ../../../seahub-data/avatars "${media_dir}" -+ ln -s ${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seahub-data/avatars "${media_dir}" - fi - echo - echo "DONE" -@@ -51,14 +53,14 @@ function make_media_custom_symlink() { - return - - elif [[ ! -e "${media_symlink}" ]]; then -- ln -s ../../../seahub-data/custom "${media_symlink}" -+ ln -s ${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seahub-data/custom "${media_symlink}" - return - - - elif [[ -d "${media_symlink}" ]]; then - cp -rf "${media_symlink}" "${seahub_data_dir}/" - rm -rf "${media_symlink}" -- ln -s ../../../seahub-data/custom "${media_symlink}" -+ ln -s ${SEAFILE_UCI_DATA_DIR-$TOPDIR}/seahub-data/custom "${media_symlink}" - fi - - } ---- a/server/seaf-server.c -+++ b/server/seaf-server.c -@@ -767,8 +767,12 @@ static void start_rpc_service (const cha - "set_server_config_boolean", - searpc_signature_int__string_string_int()); - -+ const char *socket_dir = g_getenv ("SEAFILE_UCI_SOCKET_DIR"); -+ - if (rpc_pipe_path) { - pipe_path = g_build_path ("/", rpc_pipe_path, SEAFILE_RPC_PIPE_NAME, NULL); -+ } else if (socket_dir) { -+ pipe_path = g_build_path ("/", socket_dir, SEAFILE_RPC_PIPE_NAME, NULL); - } else { - pipe_path = g_build_path ("/", seafile_dir, SEAFILE_RPC_PIPE_NAME, NULL); - } -@@ -973,8 +977,14 @@ main (int argc, char **argv) - - if (seafile_dir == NULL) - seafile_dir = g_build_filename (ccnet_dir, "seafile", NULL); -- if (logfile == NULL) -- logfile = g_build_filename (seafile_dir, "seafile.log", NULL); -+ if (logfile == NULL) { -+ char *log_dir = g_strdup (g_getenv("SEAFILE_UCI_LOG_DIR")); -+ if (!log_dir) { -+ log_dir = g_strdup (seafile_dir); -+ } -+ logfile = g_build_filename (log_dir, "seafile.log", NULL); -+ g_free (log_dir); -+ } - - if (seafile_log_init (logfile, "info", "debug") < 0) { - seaf_warning ("Failed to init log.\n"); diff --git a/net/seafile-server/patches/023-pgrep-patterns.patch b/net/seafile-server/patches/023-pgrep-patterns.patch deleted file mode 100644 index c60154a88..000000000 --- a/net/seafile-server/patches/023-pgrep-patterns.patch +++ /dev/null @@ -1,73 +0,0 @@ ---- a/scripts/seaf-gc.sh -+++ b/scripts/seaf-gc.sh -@@ -63,8 +63,8 @@ function validate_already_running () { - exit 1; - fi - -- check_component_running "ccnet-server" "ccnet-server -c ${default_ccnet_conf_dir}" -- check_component_running "seaf-server" "seaf-server -c ${default_ccnet_conf_dir}" -+ check_component_running "ccnet-server" "ccnet-server -F ${default_conf_dir} -c ${default_ccnet_conf_dir}" -+ check_component_running "seaf-server" "seaf-server -F ${default_conf_dir} -c ${default_ccnet_conf_dir}" - check_component_running "fileserver" "fileserver -c ${default_ccnet_conf_dir}" - check_component_running "seafdav" "wsgidav.server.server_cli" - } ---- a/scripts/seafile.sh -+++ b/scripts/seafile.sh -@@ -107,8 +107,8 @@ function validate_already_running () { - exit 1; - fi - -- check_component_running "ccnet-server" "ccnet-server -c ${default_ccnet_conf_dir}" -- check_component_running "seaf-server" "seaf-server -c ${default_ccnet_conf_dir}" -+ check_component_running "ccnet-server" "ccnet-server -F ${central_config_dir} -c ${default_ccnet_conf_dir}" -+ check_component_running "seaf-server" "seaf-server -F ${central_config_dir} -c ${default_ccnet_conf_dir}" - check_component_running "fileserver" "fileserver -c ${default_ccnet_conf_dir}" - check_component_running "seafdav" "wsgidav.server.server_cli" - } -@@ -149,8 +149,8 @@ function stop_seafile_server () { - - echo "Stopping seafile server ..." - pkill -SIGTERM -f "seafile-controller -c ${default_ccnet_conf_dir}" -- pkill -f "ccnet-server -c ${default_ccnet_conf_dir}" -- pkill -f "seaf-server -c ${default_ccnet_conf_dir}" -+ pkill -f "ccnet-server -F ${central_config_dir} -c ${default_ccnet_conf_dir}" -+ pkill -f "seaf-server -F ${central_config_dir} -c ${default_ccnet_conf_dir}" - pkill -f "fileserver -c ${default_ccnet_conf_dir}" - pkill -f "soffice.*--invisible --nocrashreport" - pkill -f "wsgidav.server.server_cli" ---- a/scripts/seahub.sh -+++ b/scripts/seahub.sh -@@ -94,10 +94,10 @@ function validate_seafile_data_dir () { - } - - function validate_seahub_running () { -- if pgrep -f "${manage_py}" 2>/dev/null 1>&2; then -+ if pgrep -f "${manage_py} runfcgi" 2>/dev/null 1>&2; then - echo "Seahub is already running." - exit 1; -- elif pgrep -f "seahub.wsgi:application" 2>/dev/null 1>&2; then -+ elif pgrep -f "$gunicorn_exe seahub.wsgi:application -c ${gunicorn_conf}" 2>/dev/null 1>&2; then - echo "Seahub is already running." - exit 1; - fi -@@ -165,7 +165,7 @@ function start_seahub () { - - # Ensure seahub is started successfully - sleep 5 -- if ! pgrep -f "seahub.wsgi:application" 2>/dev/null 1>&2; then -+ if ! pgrep -f "$gunicorn_exe seahub.wsgi:application -c ${gunicorn_conf}" 2>/dev/null 1>&2; then - printf "\033[33mError:Seahub failed to start.\033[m\n" - echo "Please try to run \"./seahub.sh start\" again" - exit 1; -@@ -235,9 +235,9 @@ function clear_sessions () { - function stop_seahub () { - if [[ -f ${pidfile} ]]; then - echo "Stopping seahub ..." -- pkill -9 -f "/usr/bin/gunicorn3" -+ pkill -9 -f "$gunicorn_exe seahub.wsgi:application -c ${gunicorn_conf}" - sleep 1 -- if pgrep -f "/usr/bin/gunicorn3" 2>/dev/null 1>&2 ; then -+ if pgrep -f "$gunicorn_exe seahub.wsgi:application -c ${gunicorn_conf}" 2>/dev/null 1>&2 ; then - echo 'Failed to stop seahub.' - exit 1 - fi diff --git a/net/seafile-server/patches/024-seahub-pyc.patch b/net/seafile-server/patches/024-seahub-pyc.patch deleted file mode 100644 index 697ab9973..000000000 --- a/net/seafile-server/patches/024-seahub-pyc.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- a/scripts/reset-admin.sh -+++ b/scripts/reset-admin.sh -@@ -51,5 +51,5 @@ export SEAFILE_CONF_DIR=${default_seafil - export SEAFILE_CENTRAL_CONF_DIR=${central_config_dir} - export PYTHONPATH=${INSTALLPATH}/seafile/lib/python3.6/site-packages:${INSTALLPATH}/seafile/lib64/python3.6/site-packages:${INSTALLPATH}/seahub/thirdpart:$PYTHONPATH - --manage_py=${INSTALLPATH}/seahub/manage.py -+manage_py=${INSTALLPATH}/seahub/manage.pyc - exec "$PYTHON" "$manage_py" createsuperuser ---- a/scripts/seahub.sh -+++ b/scripts/seahub.sh -@@ -22,7 +22,7 @@ default_seafile_data_dir=${SEAFILE_UCI_D - central_config_dir=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf - seafile_rpc_pipe_path=${SEAFILE_UCI_SOCKET_DIR-$INSTALLPATH/runtime} - --manage_py=${INSTALLPATH}/seahub/manage.py -+manage_py=${INSTALLPATH}/seahub/manage.pyc - gunicorn_conf=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf/gunicorn.conf.py - pidfile=${SEAFILE_UCI_PID_DIR-$TOPDIR/pids}/seahub.pid - errorlog=${SEAFILE_UCI_LOG_DIR-$TOPDIR/logs}/gunicorn_error.log ---- a/scripts/setup-seafile-mysql.py -+++ b/scripts/setup-seafile-mysql.py -@@ -1083,7 +1083,7 @@ class SeahubConfigurator(AbstractConfigu - fp.write('# -*- coding: utf-8 -*-') - - def write_secret_key(self, fp): -- script = os.path.join(env_mgr.install_path, 'seahub/tools/secret_key_generator.py') -+ script = os.path.join(env_mgr.install_path, 'seahub/tools/secret_key_generator.pyc') - cmd = [ - Utils.get_python_executable(), - script, ---- a/scripts/setup-seafile.sh -+++ b/scripts/setup-seafile.sh -@@ -519,7 +519,7 @@ gen_seafdav_conf; - # generate seahub/settings.py - # ------------------------------------------- - dest_settings_py=${SEAFILE_UCI_CONF_DIR-$TOPDIR}/conf/seahub_settings.py --seahub_secret_keygen=${INSTALLPATH}/seahub/tools/secret_key_generator.py -+seahub_secret_keygen=${INSTALLPATH}/seahub/tools/secret_key_generator.pyc - - if [[ ! -f ${dest_settings_py} ]]; then - key=$($PYTHON "${seahub_secret_keygen}") diff --git a/net/seafile-server/patches/025-command-names.patch b/net/seafile-server/patches/025-command-names.patch deleted file mode 100644 index 18f116473..000000000 --- a/net/seafile-server/patches/025-command-names.patch +++ /dev/null @@ -1,180 +0,0 @@ ---- a/scripts/reset-admin.sh -+++ b/scripts/reset-admin.sh -@@ -37,7 +37,7 @@ function check_python_executable() { - function validate_seafile_data_dir () { - if [[ ! -d ${default_seafile_data_dir} ]]; then - echo "Error: there is no seafile server data directory." -- echo "Have you run setup-seafile.sh before this?" -+ echo "Have you run setup-seafile before this?" - echo "" - exit 1; - fi ---- a/scripts/seaf-fsck.sh -+++ b/scripts/seaf-fsck.sh -@@ -25,7 +25,7 @@ function usage () { - function validate_ccnet_conf_dir () { - if [[ ! -d ${default_ccnet_conf_dir} ]]; then - echo "Error: there is no ccnet config directory." -- echo "Have you run setup-seafile.sh before this?" -+ echo "Have you run setup-seafile before this?" - echo "" - exit -1; - fi -@@ -34,7 +34,7 @@ function validate_ccnet_conf_dir () { - function validate_seafile_data_dir () { - if [[ ! -d ${default_seafile_data_dir} ]]; then - echo "Error: there is no seafile server data directory." -- echo "Have you run setup-seafile.sh before this?" -+ echo "Have you run setup-seafile before this?" - echo "" - exit 1; - fi ---- a/scripts/seaf-fuse.sh -+++ b/scripts/seaf-fuse.sh -@@ -41,7 +41,7 @@ fi - function validate_ccnet_conf_dir () { - if [[ ! -d ${default_ccnet_conf_dir} ]]; then - echo "Error: there is no ccnet config directory." -- echo "Have you run setup-seafile.sh before this?" -+ echo "Have you run setup-seafile before this?" - echo "" - exit -1; - fi -@@ -50,7 +50,7 @@ function validate_ccnet_conf_dir () { - function validate_seafile_data_dir () { - if [[ ! -d ${default_seafile_data_dir} ]]; then - echo "Error: there is no seafile server data directory." -- echo "Have you run setup-seafile.sh before this?" -+ echo "Have you run setup-seafile before this?" - echo "" - exit 1; - fi -@@ -67,7 +67,7 @@ function validate_already_running () { - function warning_if_seafile_not_running () { - if ! pgrep -f "seafile-controller -c ${default_ccnet_conf_dir}" 2>/dev/null 1>&2; then - echo -- echo "Warning: seafile-controller not running. Have you run \"./seafile.sh start\" ?" -+ echo "Warning: seafile-controller not running. Have you run \"service seafile-server start\" ?" - echo - fi - } ---- a/scripts/seaf-gc.sh -+++ b/scripts/seaf-gc.sh -@@ -27,7 +27,7 @@ function usage () { - function validate_ccnet_conf_dir () { - if [[ ! -d ${default_ccnet_conf_dir} ]]; then - echo "Error: there is no ccnet config directory." -- echo "Have you run setup-seafile.sh before this?" -+ echo "Have you run setup-seafile before this?" - echo "" - exit -1; - fi -@@ -36,7 +36,7 @@ function validate_ccnet_conf_dir () { - function validate_seafile_data_dir () { - if [[ ! -d ${default_seafile_data_dir} ]]; then - echo "Error: there is no seafile server data directory." -- echo "Have you run setup-seafile.sh before this?" -+ echo "Have you run setup-seafile before this?" - echo "" - exit 1; - fi -@@ -58,7 +58,7 @@ function check_component_running() { - - function validate_already_running () { - if pid=$(pgrep -f "seafile-controller -c ${default_ccnet_conf_dir}" 2>/dev/null); then -- echo "seafile server is still running, stop it by \"seafile.sh stop\"" -+ echo "seafile server is still running, stop it by \"service seafile-server stop\"" - echo - exit 1; - fi ---- a/scripts/seafile.sh -+++ b/scripts/seafile.sh -@@ -53,7 +53,7 @@ function validate_running_user () { - function validate_ccnet_conf_dir () { - if [[ ! -d ${default_ccnet_conf_dir} ]]; then - echo "Error: there is no ccnet config directory." -- echo "Have you run setup-seafile.sh before this?" -+ echo "Have you run setup-seafile before this?" - echo "" - exit -1; - fi -@@ -62,7 +62,7 @@ function validate_ccnet_conf_dir () { - function validate_central_conf_dir () { - if [[ ! -d ${central_config_dir} ]]; then - echo "Error: there is no conf/ directory." -- echo "Have you run setup-seafile.sh before this?" -+ echo "Have you run setup-seafile before this?" - echo "" - exit -1; - fi -@@ -71,7 +71,7 @@ function validate_central_conf_dir () { - function validate_seafile_data_dir () { - if [[ ! -d ${default_seafile_data_dir} ]]; then - echo "Error: there is no seafile server data directory." -- echo "Have you run setup-seafile.sh before this?" -+ echo "Have you run setup-seafile before this?" - echo "" - exit 1; - fi ---- a/scripts/seahub.sh -+++ b/scripts/seahub.sh -@@ -78,7 +78,7 @@ function check_python_executable() { - function validate_ccnet_conf_dir () { - if [[ ! -d ${default_ccnet_conf_dir} ]]; then - echo "Error: there is no ccnet config directory." -- echo "Have you run setup-seafile.sh before this?" -+ echo "Have you run setup-seafile before this?" - echo "" - exit -1; - fi -@@ -87,7 +87,7 @@ function validate_ccnet_conf_dir () { - function validate_seafile_data_dir () { - if [[ ! -d ${default_seafile_data_dir} ]]; then - echo "Error: there is no seafile server data directory." -- echo "Have you run setup-seafile.sh before this?" -+ echo "Have you run setup-seafile before this?" - echo "" - exit 1; - fi -@@ -133,7 +133,7 @@ fi - function warning_if_seafile_not_running () { - if ! pgrep -f "seafile-controller -c ${default_ccnet_conf_dir}" 2>/dev/null 1>&2; then - echo -- echo "Warning: seafile-controller not running. Have you run \"./seafile.sh start\" ?" -+ echo "Warning: seafile-controller not running. Have you run \"service seafile-server start\" ?" - echo - exit 1 - fi -@@ -167,7 +167,7 @@ function start_seahub () { - sleep 5 - if ! pgrep -f "$gunicorn_exe seahub.wsgi:application -c ${gunicorn_conf}" 2>/dev/null 1>&2; then - printf "\033[33mError:Seahub failed to start.\033[m\n" -- echo "Please try to run \"./seahub.sh start\" again" -+ echo "Please try to run \"service seafile-server start\" again" - exit 1; - fi - echo ---- a/scripts/setup-seafile-mysql.py -+++ b/scripts/setup-seafile-mysql.py -@@ -1557,8 +1557,7 @@ def report_success(): - Your seafile server configuration has been finished successfully. - ----------------------------------------------------------------- - --run seafile server: ./seafile.sh { start | stop | restart } --run seahub server: ./seahub.sh { start | stop | restart } -+run seafile server: service seafile-server { start | stop | restart } - - ----------------------------------------------------------------- - If you are behind a firewall, remember to allow input/output of these tcp ports: ---- a/scripts/setup-seafile.sh -+++ b/scripts/setup-seafile.sh -@@ -718,8 +718,7 @@ echo "---------------------------------- - echo "Your seafile server configuration has been completed successfully." - echo "-----------------------------------------------------------------" - echo --echo "run seafile server: ./seafile.sh { start | stop | restart }" --echo "run seahub server: ./seahub.sh { start | stop | restart }" -+echo "run seafile server: service seafile-server { start | stop | restart }" - echo - echo "-----------------------------------------------------------------" - echo "If the server is behind a firewall, remember to open these tcp ports:" diff --git a/net/seafile-server/patches/030-controller-pid-dir-permissions.patch b/net/seafile-server/patches/030-controller-pid-dir-permissions.patch deleted file mode 100644 index 4fd26bb53..000000000 --- a/net/seafile-server/patches/030-controller-pid-dir-permissions.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/controller/seafile-controller.c -+++ b/controller/seafile-controller.c -@@ -516,7 +516,7 @@ init_pidfile_path (SeafileController *ct - pid_dir = g_build_filename (topdir, "pids", NULL); - } - if (!g_file_test(pid_dir, G_FILE_TEST_EXISTS)) { -- if (g_mkdir(pid_dir, 0777) < 0) { -+ if (g_mkdir(pid_dir, 0755) < 0) { - seaf_warning("failed to create pid dir %s: %s", pid_dir, strerror(errno)); - controller_exit(1); - } diff --git a/net/seafile-server/patches/031-sqlite2mysql-bash-python3.patch b/net/seafile-server/patches/031-sqlite2mysql-bash-python3.patch deleted file mode 100644 index 9359f9b30..000000000 --- a/net/seafile-server/patches/031-sqlite2mysql-bash-python3.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- a/scripts/sqlite2mysql.sh -+++ b/scripts/sqlite2mysql.sh -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/bin/bash - # - # This shell script and corresponding sqlite2mysql.py are used to - # migrate Seafile data from SQLite to MySQL. -@@ -38,10 +38,10 @@ fi - - rm -rf ${CCNET_DB} - --echo "sqlite3 ${USER_MGR_DB} .dump | python sqlite2mysql.py > ${CCNET_DB}" --sqlite3 ${USER_MGR_DB} .dump | python sqlite2mysql.py > ${CCNET_DB} --echo "sqlite3 ${GRP_MGR_DB} .dump | python sqlite2mysql.py >> ${CCNET_DB}" --sqlite3 ${GRP_MGR_DB} .dump | python sqlite2mysql.py >> ${CCNET_DB} -+echo "sqlite3 ${USER_MGR_DB} .dump | python3 sqlite2mysql.py > ${CCNET_DB}" -+sqlite3 ${USER_MGR_DB} .dump | python3 sqlite2mysql.py > ${CCNET_DB} -+echo "sqlite3 ${GRP_MGR_DB} .dump | python3 sqlite2mysql.py >> ${CCNET_DB}" -+sqlite3 ${GRP_MGR_DB} .dump | python3 sqlite2mysql.py >> ${CCNET_DB} - - # change ctime from INTEGER to BIGINT in EmailUser table - sed 's/ctime INTEGER/ctime BIGINT/g' ${CCNET_DB} > ${CCNET_DB}.tmp && mv ${CCNET_DB}.tmp ${CCNET_DB} -@@ -53,14 +53,14 @@ sed 's/email TEXT, role TEXT/email VARCH - rm -rf ${SEAFILE_DB} - - if [ -f "${SEAFILE_UCI_DATA_DIR-$seafile_path}/seafile-data/seafile.db" ]; then -- echo "sqlite3 ${SEAFILE_UCI_DATA_DIR-$seafile_path}/seafile-data/seafile.db .dump | python sqlite2mysql.py > ${SEAFILE_DB}" -- sqlite3 ${SEAFILE_UCI_DATA_DIR-$seafile_path}/seafile-data/seafile.db .dump | python sqlite2mysql.py > ${SEAFILE_DB} -+ echo "sqlite3 ${SEAFILE_UCI_DATA_DIR-$seafile_path}/seafile-data/seafile.db .dump | python3 sqlite2mysql.py > ${SEAFILE_DB}" -+ sqlite3 ${SEAFILE_UCI_DATA_DIR-$seafile_path}/seafile-data/seafile.db .dump | python3 sqlite2mysql.py > ${SEAFILE_DB} - else - echo "${SEAFILE_UCI_DATA_DIR-$seafile_path}/seafile-data/seafile.db does not exists." - read -p "Please provide your seafile.db path(e.g. /data/haiwen/seafile-data/seafile.db): " seafile_db_path - if [ -f ${seafile_db_path} ];then -- echo "sqlite3 ${seafile_db_path} .dump | python sqlite2mysql.py > ${SEAFILE_DB}" -- sqlite3 ${seafile_db_path} .dump | python sqlite2mysql.py > ${SEAFILE_DB} -+ echo "sqlite3 ${seafile_db_path} .dump | python3 sqlite2mysql.py > ${SEAFILE_DB}" -+ sqlite3 ${seafile_db_path} .dump | python3 sqlite2mysql.py > ${SEAFILE_DB} - else - echo "${seafile_db_path} does not exists, quit." - exit 1 -@@ -77,14 +77,14 @@ sed 's/user_name TEXT/user_name VARCHAR( - rm -rf ${SEAHUB_DB} - - if [ -f "${SEAFILE_UCI_DATA_DIR-$seafile_path}/seahub.db" ]; then -- echo "sqlite3 ${SEAFILE_UCI_DATA_DIR-$seafile_path}/seahub.db .dump | tr -d '\n' | sed 's/;/;\n/g' | python sqlite2mysql.py > ${SEAHUB_DB}" -- sqlite3 ${SEAFILE_UCI_DATA_DIR-$seafile_path}/seahub.db .dump | tr -d '\n' | sed 's/;/;\n/g' | python sqlite2mysql.py > ${SEAHUB_DB} -+ echo "sqlite3 ${SEAFILE_UCI_DATA_DIR-$seafile_path}/seahub.db .dump | tr -d '\n' | sed 's/;/;\n/g' | python3 sqlite2mysql.py > ${SEAHUB_DB}" -+ sqlite3 ${SEAFILE_UCI_DATA_DIR-$seafile_path}/seahub.db .dump | tr -d '\n' | sed 's/;/;\n/g' | python3 sqlite2mysql.py > ${SEAHUB_DB} - else - echo "${SEAFILE_UCI_DATA_DIR-$seafile_path}/seahub.db does not exists." - read -p "Please prove your seahub.db path(e.g. /data/haiwen/seahub.db): " seahub_db_path - if [ -f ${seahub_db_path} ]; then -- echo "sqlite3 ${seahub_db_path} .dump | tr -d '\n' | sed 's/;/;\n/g' | python sqlite2mysql.py > ${SEAHUB_DB}" -- sqlite3 ${seahub_db_path} .dump | tr -d '\n' | sed 's/;/;\n/g' | python sqlite2mysql.py > ${SEAHUB_DB} -+ echo "sqlite3 ${seahub_db_path} .dump | tr -d '\n' | sed 's/;/;\n/g' | python3 sqlite2mysql.py > ${SEAHUB_DB}" -+ sqlite3 ${seahub_db_path} .dump | tr -d '\n' | sed 's/;/;\n/g' | python3 sqlite2mysql.py > ${SEAHUB_DB} - else - echo "${seahub_db_path} does not exists, quit." - exit 1 diff --git a/net/seafile-server/patches/032-seafile-no-stat.patch b/net/seafile-server/patches/032-seafile-no-stat.patch deleted file mode 100644 index 2a63e35c8..000000000 --- a/net/seafile-server/patches/032-seafile-no-stat.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/scripts/seafile.sh -+++ b/scripts/seafile.sh -@@ -42,10 +42,9 @@ fi - function validate_running_user () { - real_data_dir=`readlink -f ${default_seafile_data_dir}` - running_user=`id -un` -- data_dir_owner=`stat -c %U ${real_data_dir}` - -- if [[ "${running_user}" != "${data_dir_owner}" ]]; then -- echo "Error: the user running the script (\"${running_user}\") is not the owner of \"${real_data_dir}\" folder, you should use the user \"${data_dir_owner}\" to run the script." -+ if [[ -z "$(find "${real_data_dir}" -user "${running_user}" -maxdepth 0)" ]]; then -+ echo "Error: the user running the script (\"${running_user}\") is not the owner of \"${real_data_dir}\" folder, you should use the owner of \"${real_data_dir}\" to run the script." - exit -1; - fi - } diff --git a/net/seafile-server/patches/033-seahub-do-not-create-admin.patch b/net/seafile-server/patches/033-seahub-do-not-create-admin.patch deleted file mode 100644 index 529730cc9..000000000 --- a/net/seafile-server/patches/033-seahub-do-not-create-admin.patch +++ /dev/null @@ -1,56 +0,0 @@ ---- a/scripts/check_init_admin.py -+++ b/scripts/check_init_admin.py -@@ -310,7 +310,7 @@ def create_admin(email, passwd): - def ask_admin_email(): - print() - print('----------------------------------------') -- print('It\'s the first time you start the seafile server. Now let\'s create the admin account') -+ print('Let\'s create the admin account') - print('----------------------------------------') - def validate(email): - # whitespace is not allowed -@@ -350,8 +350,15 @@ def ask_admin_password(): - - rpc = RPC() - --def main(): -+def main(argv): -+ if len(argv) > 1 and argv[1] == 'has-admin': -+ sys.exit(1 if need_create_admin() else 0) -+ - if not need_create_admin(): -+ print('') -+ print('A seafile admin account already exists.') -+ print('Log into seahub to add additional accounts.') -+ print('If you cannot log in, run reset-seafile-admin to add a new admin account.') - return - - password_file = os.path.join(os.environ['SEAFILE_CENTRAL_CONF_DIR'], 'admin.txt') -@@ -369,7 +376,7 @@ def main(): - - if __name__ == '__main__': - try: -- main() -+ main(sys.argv) - except KeyboardInterrupt: - print('\n\n\n') - print(Utils.highlight('Aborted.')) -@@ -379,3 +386,4 @@ if __name__ == '__main__': - print() - print(Utils.highlight('Error happened during creating seafile admin.')) - print() -+ sys.exit(1) ---- a/scripts/seahub.sh -+++ b/scripts/seahub.sh -@@ -250,7 +250,10 @@ function stop_seahub () { - - function check_init_admin() { - check_init_admin_script=${INSTALLPATH}/check_init_admin.py -- if ! $PYTHON $check_init_admin_script; then -+ if ! $PYTHON $check_init_admin_script has-admin; then -+ echo "Error: there is no seafile admin account." -+ echo "Have you run create-seafile-admin before this?" -+ echo "" - exit 1 - fi - } diff --git a/net/seafile-server/patches/034-seaf-fuse-no-fuse_opt_h.patch b/net/seafile-server/patches/034-seaf-fuse-no-fuse_opt_h.patch deleted file mode 100644 index 1d2c3851c..000000000 --- a/net/seafile-server/patches/034-seaf-fuse-no-fuse_opt_h.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/fuse/seaf-fuse.c -+++ b/fuse/seaf-fuse.c -@@ -5,7 +5,6 @@ - - #define FUSE_USE_VERSION 26 - #include --#include - - #include - #include diff --git a/net/seafile-server/patches/040-setup-skip-dir-check.patch b/net/seafile-server/patches/040-setup-skip-dir-check.patch deleted file mode 100644 index ebac515e4..000000000 --- a/net/seafile-server/patches/040-setup-skip-dir-check.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/scripts/setup-seafile-mysql.py -+++ b/scripts/setup-seafile-mysql.py -@@ -316,9 +316,6 @@ class EnvManager(object): - os.path.join(self.install_path, 'runtime'), - ] - -- for path in paths: -- error_if_not_exists(path) -- - if os.path.exists(ccnet_config.ccnet_dir): - Utils.error('Ccnet config dir \"%s\" already exists.' % ccnet_config.ccnet_dir) - ---- a/scripts/setup-seafile.sh -+++ b/scripts/setup-seafile.sh -@@ -415,7 +415,6 @@ if [[ $# -ge 1 && "$1" == "auto" ]]; the - need_pause=0 - fi - --check_sanity; - if [[ "${need_pause}" == "1" ]]; then - welcome; - fi diff --git a/net/seafile-server/patches/041-setup-add-custom-seahub-settings.patch b/net/seafile-server/patches/041-setup-add-custom-seahub-settings.patch deleted file mode 100644 index 99b274609..000000000 --- a/net/seafile-server/patches/041-setup-add-custom-seahub-settings.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/scripts/setup-seafile-mysql.py -+++ b/scripts/setup-seafile-mysql.py -@@ -1101,6 +1101,10 @@ class SeahubConfigurator(AbstractConfigu - } - } - -+# Custom settings for OpenWrt -+USE_I18N = False -+USER_PASSWORD_MIN_LENGTH = 8 -+USER_STRONG_PASSWORD_REQUIRED = True - ''' - text = template % dict(name=db_config.seahub_db_name, - username=db_config.seafile_mysql_user, ---- a/scripts/setup-seafile.sh -+++ b/scripts/setup-seafile.sh -@@ -525,6 +525,11 @@ if [[ ! -f ${dest_settings_py} ]]; then - cat > ${dest_settings_py} < -Description: Use shared object for libevhtp -Forwarded: https://github.com/haiwen/seafile-server/pull/12 - ---- a/configure.ac -+++ b/configure.ac -@@ -224,6 +224,10 @@ PKG_CHECK_MODULES(LIBEVENT, [libevent_op - AC_SUBST(LIBEVENT_CFLAGS) - AC_SUBST(LIBEVENT_LIBS) - -+PKG_CHECK_MODULES(LIBEVHTP, [evhtp]) -+AC_SUBST(LIBEVHTP_CFLAGS) -+AC_SUBST(LIBEVHTP_LIBS) -+ - PKG_CHECK_MODULES(ZLIB, [zlib >= $ZLIB_REQUIRED]) - AC_SUBST(ZLIB_CFLAGS) - AC_SUBST(ZLIB_LIBS) ---- a/server/Makefile.am -+++ b/server/Makefile.am -@@ -13,6 +13,7 @@ AM_CFLAGS = -DPKGDATADIR=\"$(pkgdatadir) - @GLIB2_CFLAGS@ \ - @MSVC_CFLAGS@ \ - @LIBARCHIVE_CFLAGS@ \ -+ @LIBEVHTP_CFLAGS@ \ - @MYSQL_CFLAGS@ \ - -Wall - -@@ -73,7 +74,7 @@ seaf_server_SOURCES = \ - - seaf_server_LDADD = @CCNET_LIBS@ \ - $(top_builddir)/lib/libseafile_common.la \ -- @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ -levhtp \ -+ -lonig @GLIB2_LIBS@ @GOBJECT_LIBS@ @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ -lsqlite3 @LIBEVENT_LIBS@ @LIBEVHTP_LIBS@ \ - $(top_builddir)/common/cdc/libcdc.la \ - @SEARPC_LIBS@ @JANSSON_LIBS@ ${LIB_WS32} @ZLIB_LIBS@ \ - @LIBARCHIVE_LIBS@ @LIB_ICONV@ \ diff --git a/net/seafile-server/patches/120-recent-libevhtp.patch b/net/seafile-server/patches/120-recent-libevhtp.patch deleted file mode 100644 index 5cb8b0247..000000000 --- a/net/seafile-server/patches/120-recent-libevhtp.patch +++ /dev/null @@ -1,65 +0,0 @@ -Author: Alexandre Rossi -Description: Fix download stalling on recent libevhtp - A while ago[1], evhtp_request_pause() behavior changed: it now disables - both read and write events. seafile-server would then stall. - . - [1] https://github.com/criticalstack/libevhtp/commit/6cd89466fd6bd76c5b8624be65af5893afe3e40c - [2] https://github.com/haiwen/seafile/issues/1119 -Forwarded: no - ---- a/server/access-file.c -+++ b/server/access-file.c -@@ -665,7 +665,7 @@ do_file(evhtp_request_t *req, SeafRepo * - /* Block any new request from this connection before finish - * handling this request. - */ -- evhtp_request_pause (req); -+ bufferevent_disable(bev, EV_READ); - - /* Kick start data transfer by sending out http headers. */ - evhtp_send_reply_start(req, EVHTP_RES_OK); -@@ -1030,7 +1030,7 @@ do_file_range (evhtp_request_t *req, Sea - /* Block any new request from this connection before finish - * handling this request. - */ -- evhtp_request_pause (req); -+ bufferevent_disable(bev, EV_READ); - - /* Kick start data transfer by sending out http headers. */ - evhtp_send_reply_start(req, EVHTP_RES_PARTIAL); -@@ -1100,7 +1100,7 @@ start_download_zip_file (evhtp_request_t - /* Block any new request from this connection before finish - * handling this request. - */ -- evhtp_request_pause (req); -+ bufferevent_disable(bev, EV_READ); - - /* Kick start data transfer by sending out http headers. */ - evhtp_send_reply_start(req, EVHTP_RES_OK); -@@ -1444,7 +1444,7 @@ do_block(evhtp_request_t *req, SeafRepo - /* Block any new request from this connection before finish - * handling this request. - */ -- evhtp_request_pause (req); -+ bufferevent_disable(bev, EV_READ); - - /* Kick start data transfer by sending out http headers. */ - evhtp_send_reply_start(req, EVHTP_RES_OK); ---- a/server/upload-file.c -+++ b/server/upload-file.c -@@ -2196,6 +2196,7 @@ out: - if (res != EVHTP_RES_OK) { - /* Don't receive any data before the connection is closed. */ - //evhtp_request_pause (req); -+ // or for later evhtp bufferevent_disable(evhtp_request_get_bev(req), EV_READ); - - /* Set keepalive to 0. This will cause evhtp to close the - * connection after sending the reply. -@@ -2513,6 +2514,7 @@ upload_headers_cb (evhtp_request_t *req, - err: - /* Don't receive any data before the connection is closed. */ - //evhtp_request_pause (req); -+ // or for later evhtp bufferevent_disable(evhtp_request_get_bev(req), EV_READ); - - /* Set keepalive to 0. This will cause evhtp to close the - * connection after sending the reply. diff --git a/net/seafile-server/patches/130-newer-libevhtp.patch b/net/seafile-server/patches/130-newer-libevhtp.patch deleted file mode 100644 index 70d4b2873..000000000 --- a/net/seafile-server/patches/130-newer-libevhtp.patch +++ /dev/null @@ -1,75 +0,0 @@ -Author: Alexandre Rossi -Description: Take into account libevhtp API changes -Forwarded: no - ---- a/server/upload-file.c -+++ b/server/upload-file.c -@@ -2201,7 +2201,7 @@ out: - /* Set keepalive to 0. This will cause evhtp to close the - * connection after sending the reply. - */ -- req->keepalive = 0; -+ req->flags &= ~EVHTP_REQ_FLAG_KEEPALIVE; - - fsm->state = RECV_ERROR; - } -@@ -2502,8 +2502,8 @@ upload_headers_cb (evhtp_request_t *req, - } - - /* Set up per-request hooks, so that we can read file data piece by piece. */ -- evhtp_set_hook (&req->hooks, evhtp_hook_on_read, upload_read_cb, fsm); -- evhtp_set_hook (&req->hooks, evhtp_hook_on_request_fini, upload_finish_cb, fsm); -+ evhtp_request_set_hook (req, evhtp_hook_on_read, upload_read_cb, fsm); -+ evhtp_request_set_hook (req, evhtp_hook_on_request_fini, upload_finish_cb, fsm); - /* Set arg for upload_cb or update_cb. */ - req->cbarg = fsm; - -@@ -2519,7 +2519,7 @@ err: - /* Set keepalive to 0. This will cause evhtp to close the - * connection after sending the reply. - */ -- req->keepalive = 0; -+ req->flags &= ~EVHTP_REQ_FLAG_KEEPALIVE; - send_error_reply (req, EVHTP_RES_BADREQ, err_msg); - - g_free (repo_id); -@@ -2620,32 +2620,32 @@ upload_file_init (evhtp_t *htp, const ch - g_free (cluster_shared_dir); - - cb = evhtp_set_regex_cb (htp, "^/upload-api/.*", upload_api_cb, NULL); -- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); -+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL); - - cb = evhtp_set_regex_cb (htp, "^/upload-raw-blks-api/.*", - upload_raw_blks_api_cb, NULL); -- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); -+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL); - - cb = evhtp_set_regex_cb (htp, "^/upload-blks-api/.*", upload_blks_api_cb, NULL); -- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); -+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL); - - /* cb = evhtp_set_regex_cb (htp, "^/upload-blks-aj/.*", upload_blks_ajax_cb, NULL); */ - /* evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); */ - - cb = evhtp_set_regex_cb (htp, "^/upload-aj/.*", upload_ajax_cb, NULL); -- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); -+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL); - - cb = evhtp_set_regex_cb (htp, "^/update-api/.*", update_api_cb, NULL); -- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); -+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL); - - cb = evhtp_set_regex_cb (htp, "^/update-blks-api/.*", update_blks_api_cb, NULL); -- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); -+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL); - - /* cb = evhtp_set_regex_cb (htp, "^/update-blks-aj/.*", update_blks_ajax_cb, NULL); */ - /* evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); */ - - cb = evhtp_set_regex_cb (htp, "^/update-aj/.*", update_ajax_cb, NULL); -- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); -+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL); - - evhtp_set_regex_cb (htp, "^/upload_progress.*", upload_progress_cb, NULL); -