Package Details: seahub 7.1.5-1

Git Clone URL: https://aur.archlinux.org/seahub.git (read-only, click to copy)
Package Base: seahub
Description: The web frontend for seafile server
Upstream URL: https://github.com/haiwen/seahub
Licenses: Apache
Submitter: eolianoe
Maintainer: Joffrey
Last Packager: Joffrey
Votes: 6
Popularity: 0.000000
First Submitted: 2017-07-03 09:48
Last Updated: 2020-09-22 18:51

Pinned Comments

Joffrey commented on 2020-09-22 18:54

Hello @all,

I made some changes to the Systemd services units in the last update (v7.1.5-1).

Now Seahub has its own service (seahub@.service). You must now run seafile-server@ .service and then seahub @.service, e.g:

systemctl start seafile-server@instancename.tld.service
systemctl start seahub@instancename.tld.service

Why ? It is much cleaner, normally in forking type service, ExecStartPre must have an exit code, it was not the case before.
It's almost the same configuration as that proposed by the upstream.
https://download.seafile.com/published/seafile-manual/deploy/start_seafile_at_system_bootup.md

Regards, Joffrey

Latest Comments

1 2 3 4 5 6 ... Next › Last »

trap000d commented on 2020-09-24 03:12

Hello @all, Just a few notes in regarding to systemd units configuration.

The following option: After=seafile-server@.service means seahub will start IMMEDIATELY after seafile-server. Unfortunately with all >9000 options of systemd unit there is no single one with logic: "wait until the particular process has started indeed, e.g. has a PID file or active socket". So with standard unit files at each boot I'm getting the following in journal:

Sep 06 13:02:51 example.com seahub.sh[259]: Warning: seafile-controller not running. Have you run "./seafile.sh start" ?
Sep 06 13:02:51 example.com systemd[1]: seahub@example.service: Control process exited, code=exited, status=1/FAILURE
Sep 06 13:02:51 example.com systemd[1]: seahub@example.service: Failed with result 'exit-code'.
Sep 06 13:02:51 example.com systemd[1]: Failed to start Seafile hub.

And non-working seahub instance.

There are two kludgy ways to fix it, though.

A) Change the logic of seahub.sh, e.g. add loop (10 repeats every 5 seconds ?) to start_seahub():

function start_seahub () {
    before_start;
    echo "Starting seahub at port ${port} ..."
    check_init_admin;
    $PYTHON $gunicorn_exe seahub.wsgi:application -c "${gunicorn_conf}" --preload

    # Ensure seahub is started successfully
    for attempt in {1..10}
    do
        sleep 5
        if pgrep -f "seahub.wsgi:application" 2>/dev/null 1>&2; then
            echo
            echo "Seahub is started after $attempt attempts"
            echo
            return 0
        fi
    done
        printf "\033[33mError:Seahub failed to start.\033[m\n"
        echo "Please try to run \"./seahub.sh start\" again"
        exit 1;
    fi
}

B) Or implement the similar trick in seahub@.service

<pre><code>
[Unit]
Description=Seafile hub
After=network.target
Requires=seafile@.service

StartLimitIntervalSec=120
StartLimitBurst=5

[Service]
Restart=on-failure
RestartSec=15s
Type=forking
WorkingDirectory=/home/seafile
Environment=SEAHUB_LOG_DIR=/home/seafile/logs
ExecStart=/home/seafile/seafile-server-latest/seahub.sh start
ExecStop=/home/seafile/seafile-server-latest/seahub.sh stop
User=seafile
Group=seafile

[Install]
WantedBy=multi-user.target
</code></pre>

Regards,

Joffrey commented on 2020-09-22 18:54

Hello @all,

I made some changes to the Systemd services units in the last update (v7.1.5-1).

Now Seahub has its own service (seahub@.service). You must now run seafile-server@ .service and then seahub @.service, e.g:

systemctl start seafile-server@instancename.tld.service
systemctl start seahub@instancename.tld.service

Why ? It is much cleaner, normally in forking type service, ExecStartPre must have an exit code, it was not the case before.
It's almost the same configuration as that proposed by the upstream.
https://download.seafile.com/published/seafile-manual/deploy/start_seafile_at_system_bootup.md

Regards, Joffrey

Joffrey commented on 2020-06-30 13:52

Hello @all, sorry for my late response.

I advise you not to use "seafile-helper" anymore, when I wrote this script the package did not have the same tree structure.

For the moment, for create or upgrade an instance you must just copy the /usr/share/seafile-server content to /srv/seafile/instance/ and execute installation or upgrade script.

I am not a fan of multiple symlinks level, all scripts must be copied in instance, so why make a symlink just for "seahub". You should compile Python bytecodes in the PKGBUILD if you do that.

Otherwise, I am not against the idea of implementing improvements, if that does not involve adding patches in the source code.

yuyichao commented on 2020-06-29 21:08

Re-multipule instances, note that the daemon management (seafile-controller) isn't really setup up to run multiple domains. It reads global processes information when starting and stopping sub-processes.

kuzalj commented on 2020-06-29 21:02

@mqs

I use seafile-helper and I believe it does copy over the /usr/share/seafile-server into your instance.

However, to be safe, I recursively copied seafile-server from /usr/share into my instance, and performed the minor upgrade using seafile-helper as normal. Seafile is working perfectly fine with that method.

I am not sure how to answer on multiple instances, but if you have multiple domains, you can run different Seafile instances on different domains which is kind of cool I guess.

mqs commented on 2020-06-27 11:20

@Joffrey what do you mean when you write the following?

upgrade seafile-server directory with /usr/share/seafile-server in your instances, as a release change

Do you mean that we should copy the contents of /usr/share/seafile-server into /srv/<instance>/seafile-server? Does seafile-helper simplify this and if yes with which invocation? Also: are there files which should not be overwritten or can we completely remove all the contents of seafile-server and copy the new stuff in?

On another note, I have wondered this since I installed the package some years ago, but why is seafile/seahub laid out for multiple instances (I don't know any other package which does this) and why don't they simply all link to the same static seahub files and have a separate directory for state and configuration in /var/lib and /etc? Is this due to issues with seafile?

kuzalj commented on 2020-06-23 22:58

@Joffrey

Thank you so much for the minor upgrade. You were right about django-picklefield and this update essentially fixed the issue since you bundled it with the release.

Seafile is working for me once again, thank you :)

Joffrey commented on 2020-06-21 11:20

Hello @all,

For Seahub v7.1.4-2 you should to upgrade seafile-server directory with /usr/share/seafile-server in your instances, as a release change and execute minor-upgrade.sh after.

Best regards.

Joffrey commented on 2020-06-12 21:28

@kuzalj, It's Django-picklefield. The support of Django v1.11 was dropped, a downgrade to python-django-picklefield-2.1.1-1 temporarily fixes the problem. I'll look for a viable solution.

kuzalj commented on 2020-06-11 09:48

Not sure what I am doing wrong, but after running pacman and getting some python updates, I am getting an error on 7.1.4

TypeError at /
from_db_value() takes 4 positional arguments but 5 were given


Request Method: GET
Request URL:    https://x.com/
Django Version: 1.11.25
Exception Type: TypeError
Exception Value:    
from_db_value() takes 4 positional arguments but 5 were given
Exception Location: /srv/seafile/x.com/seafile-server/seahub/thirdpart/django/db/models/sql/compiler.py in apply_converters, line 832
Python Executable:  /usr/bin/python3
Python Version: 3.8.3
Python Path:    
['/usr/bin',
 '/srv/seafile/x.com/seafile-server/seafile/lib/python3.6/site-packages',
 '/srv/seafile/x.com/seafile-server/seafile/lib64/python3.6/site-packages',
 '/srv/seafile/x.com/seafile-server/seahub',
 '/srv/seafile/x.com/seafile-server/seahub/thirdpart',
 '/srv/seafile/x.com/seafile-server',
 '/usr/lib/python38.zip',
 '/usr/lib/python3.8',
 '/usr/lib/python3.8/lib-dynload',
 '/usr/lib/python3.8/site-packages',
 '/srv/seafile/x.com/seafile-server/seahub/seahub/api2/endpoints/../../../../../conf',
 '/srv/seafile/x.com/seafile-server/seahub/seahub/api2/endpoints/../../../../../conf']