You are not logged in.

#1 2021-06-13 18:35:22

Kasami
Member
Registered: 2012-12-04
Posts: 7

Seafile server from AUR

Hello!

I'm trying to install Seafile server from AUR, following the guide from https://wiki.archlinux.org/title/Seafile

All the packages appears to be installed correctly

yay -Qs seafile | grep 'local'
local/ccnet-server 7.1.5-2
local/libevhtp-seafile 2:1.2.0-4
local/seafile-server 8.0.5-1
local/seahub 8.0.5-1

I have a feeling guide might be outdated, mostly cause seafile-admin seems to be requiring ccnet-server which is neither mentioned in the guide or dependencies and also cannot be run via system default python3 and requires python2 instead.

At the moment I'm stuck on the following step:

python2 /usr/bin/seafile-admin setup
Error: seaf-server-init not found in PATH. Have you built and installed seafile server?

It doesn't seem like seaf-server-init is a part of either of AUR seafile packages.

Am I doing something wrong here or should I just try installing manually, without AUR?

Thanks

Offline

#2 2021-06-13 22:00:09

loqs
Member
Registered: 2014-03-06
Posts: 18,823

Re: Seafile server from AUR

seaf-server-init was removed in https://github.com/haiwen/seafile-serve … 18b71d0f1b
https://github.com/haiwen/seafile-serve … file-admin still references the now removed binaries.
Edit:
What if you apply this patch:

diff --git a/tools/seafile-admin b/tools/seafile-admin
index b5e199e..370c291 100755
--- a/tools/seafile-admin
+++ b/tools/seafile-admin
@@ -590,20 +590,15 @@ def init_ccnet_seafile():
 
     if not conf[CONF_SEAFILE_CONF_EXISTS]:
         info('Generating seafile configuration...')
-        argv = [
-            'seaf-server-init',
-            '-F',
-            conf[CONF_SEAFILE_CENTRAL_CONF_DIR],
-            '--seafile-dir',
-            conf[CONF_SEAFILE_DIR],
-            '--port',
-            conf[CONF_SEAFILE_PORT],
-            '--fileserver-port',
-            conf[CONF_FILESERVER_PORT],
-        ]
 
-        if run_argv(argv) != 0:
-            error('failed to init seafile configuration')
+        seafile_conf = os.path.join(conf[CONF_SEAFILE_CENTRAL_CONF_DIR], 'seafile.conf')
+        seafile_fileserver_conf = '''\
+[fileserver]
+port=8082
+'''
+        with open(seafile_conf, 'a+') as fp:
+            fp.write('\n')
+            fp.write(seafile_fileserver_conf)
 
         info('done')
 

Last edited by loqs (2021-06-13 23:43:08)

Offline

#3 2021-06-15 13:37:57

Kasami
Member
Registered: 2012-12-04
Posts: 7

Re: Seafile server from AUR

Thanks, logs!

You've correctly pinpointed the issue.

This patch worked, but I additionally had to remove

seaf-server-init from progs list to skip validation

Following that I had to add a symlink for seahub
sudo ln -s /usr/share/seafile-server/seahub/ seahub

That allowed me to run installation script. Unfortunately it needed django 1.8 for python2, which isn't available in AUR anyway and at that point I've given up on using AUR package altogether.

Thanks for your help, though!

loqs wrote:

seaf-server-init was removed in https://github.com/haiwen/seafile-serve … 18b71d0f1b
https://github.com/haiwen/seafile-serve … file-admin still references the now removed binaries.
Edit:
What if you apply this patch:

diff --git a/tools/seafile-admin b/tools/seafile-admin
index b5e199e..370c291 100755
--- a/tools/seafile-admin
+++ b/tools/seafile-admin
@@ -590,20 +590,15 @@ def init_ccnet_seafile():
 
     if not conf[CONF_SEAFILE_CONF_EXISTS]:
         info('Generating seafile configuration...')
-        argv = [
-            'seaf-server-init',
-            '-F',
-            conf[CONF_SEAFILE_CENTRAL_CONF_DIR],
-            '--seafile-dir',
-            conf[CONF_SEAFILE_DIR],
-            '--port',
-            conf[CONF_SEAFILE_PORT],
-            '--fileserver-port',
-            conf[CONF_FILESERVER_PORT],
-        ]
 
-        if run_argv(argv) != 0:
-            error('failed to init seafile configuration')
+        seafile_conf = os.path.join(conf[CONF_SEAFILE_CENTRAL_CONF_DIR], 'seafile.conf')
+        seafile_fileserver_conf = '''\
+[fileserver]
+port=8082
+'''
+        with open(seafile_conf, 'a+') as fp:
+            fp.write('\n')
+            fp.write(seafile_fileserver_conf)
 
         info('done')
 

Offline

Board footer

Powered by FluxBB