From f7d347855d42d668e8121cccac65d26eb04dbbc1 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 17:43:08 +0100 Subject: [PATCH] patch to use instance dir for seafdav.conf [release 5.0.5-2mamba;Sat Apr 16 2016] --- seafile-5.0.5-instance_dir.patch | 30 +++++++++++++++++++++ seafile-5.0.7-pidfile_at_instance_dir.patch | 27 ------------------- seafile.spec | 8 ++++-- 3 files changed, 36 insertions(+), 29 deletions(-) create mode 100644 seafile-5.0.5-instance_dir.patch delete mode 100644 seafile-5.0.7-pidfile_at_instance_dir.patch diff --git a/seafile-5.0.5-instance_dir.patch b/seafile-5.0.5-instance_dir.patch new file mode 100644 index 0000000..ae7b5f2 --- /dev/null +++ b/seafile-5.0.5-instance_dir.patch @@ -0,0 +1,30 @@ +--- seafile-5.0.5/controller/seafile-controller.c.orig 2016-04-08 18:41:39.000000000 +0200 ++++ seafile-5.0.5/controller/seafile-controller.c 2016-04-17 14:06:00.685984507 +0200 +@@ -320,7 +320,8 @@ + g_setenv ("SEAFILE_CENTRAL_CONF_DIR", ctl->central_config_dir, TRUE); + + char *seahub_dir = g_build_filename (installpath, "seahub", NULL); +- char *seafdav_conf = g_build_filename (topdir, "conf", "seafdav.conf", NULL); ++ char *seafdav_conf = g_build_filename (ctl->central_config_dir, "seafdav.conf", NULL); ++ + g_setenv ("SEAHUB_DIR", seahub_dir, TRUE); + g_setenv ("SEAFDAV_CONF", seafdav_conf, TRUE); + +@@ -575,7 +576,7 @@ + static void + init_pidfile_path (SeafileController *ctl) + { +- char *pid_dir = g_build_filename (topdir, "pids", NULL); ++ char *pid_dir = g_build_filename (ctl->seafile_dir, "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)); +@@ -788,7 +789,7 @@ + GKeyFile *key_file = NULL; + GError *error = NULL; + +- seafdav_conf = g_build_filename(topdir, "conf", "seafdav.conf", NULL); ++ seafdav_conf = g_build_filename (ctl->central_config_dir, "seafdav.conf", NULL); + if (!g_file_test(seafdav_conf, G_FILE_TEST_EXISTS)) { + goto out; + } diff --git a/seafile-5.0.7-pidfile_at_instance_dir.patch b/seafile-5.0.7-pidfile_at_instance_dir.patch deleted file mode 100644 index da417f8..0000000 --- a/seafile-5.0.7-pidfile_at_instance_dir.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a241e334aa22e66b0469a3899d73db7df4b6e274 Mon Sep 17 00:00:00 2001 -From: Moritz Maxeiner -Date: Mon, 28 Apr 2014 04:42:11 +0200 -Subject: [PATCH] Revert "[server] put pids/ folder out of seafile-data/" - -This reverts commit 54926205490f9efcd16d22c4bc178576d50449ef. ---- - controller/seafile-controller.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/controller/seafile-controller.c b/controller/seafile-controller.c -index c5bc425..a1a9358 100644 ---- a/controller/seafile-controller.c -+++ b/controller/seafile-controller.c -@@ -611,7 +611,7 @@ stop_ccnet_server () - static void - init_pidfile_path (SeafileController *ctl) - { -- char *pid_dir = g_build_filename (topdir, "pids", NULL); -+ char *pid_dir = g_build_filename (ctl->seafile_dir, "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)); --- -1.9.2 - - diff --git a/seafile.spec b/seafile.spec index 7449de5..2406a7e 100644 --- a/seafile.spec +++ b/seafile.spec @@ -5,7 +5,7 @@ %define MAJver %(echo %version | cut -d. -f1) Name: seafile Version: 5.0.5 -Release: 1mamba +Release: 2mamba Summary: A next-generation open source cloud storage system with advanced support for file syncing Group: Applications/Web Vendor: openmamba @@ -19,7 +19,7 @@ Source2: seafile-seahub.service Source3: seafile-client.service Patch0: seafile-3.1.12-delay-start-after-mysql.patch Patch1: seafile-3.1.12-setup-fix-avatars.patch -Patch2: seafile-5.0.7-pidfile_at_instance_dir.patch +Patch2: seafile-5.0.5-instance_dir.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -78,6 +78,7 @@ Requires: python-%{name} = %{?epoch:%epoch:}%{version}-%{release} Requires: ccnet >= %{maj2_version} Requires: seahub >= %{maj2_version} Requires(post): seafile = %{?epoch:%epoch:}%{version}-%{release} +Requires: python-seafdav %description server Seafile is a next-generation open source cloud storage system with advanced support for file syncing, privacy protection and teamwork. @@ -239,6 +240,9 @@ fi %{python_sitearch}/seaserv/*.py* %changelog +* Sat Apr 16 2016 Silvan Calarco 5.0.5-2mamba +- patch to use instance dir for seafdav.conf + * Fri Apr 08 2016 Silvan Calarco 5.0.5-1mamba - update to 5.0.5