Package Details: seahub 8.0.3-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: 2021-02-02 13:12

Latest Comments

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

Joffrey commented on 2021-01-18 21:41

Hello @Artain, sorry I forgot to enable LDAP support.
It should be Ok with seafile-server-8.0.2-2.
Regards,
Joffrey

Artain commented on 2021-01-18 16:23

@Joffrey can you please check something for me. I just upgraded and now the ldap integration is no longer working. This can be of course a problem with seafile it self and there is already a post in the seafile Forums https://forum.seafile.com/t/ldap-broken-under-seafile-8-0-1-server/13526/2 But I noticed something. Since version 8 no longer has the ccnet component where does seafile get the ldap module from. If you look in the old ccnet package https://aur.archlinux.org/packages/ccnet-server/ you can see a dependency to libldap but I can't find this or any similar dependency here or in the seafile-server package. Also in the Seafile forums announcement post someone also said that he needs the python lib "python3-ldap" https://forum.seafile.com/t/seafile-community-edition-8-0-is-ready-for-test/13555/8#post_8 Thank you. Artain

Joffrey commented on 2020-12-05 11:17

Thanks @kuzalj for your feedback, I have bumped "pkgrel" for all dependencies.
For those using ARM you can wait a bit before updating, Python 3.9 isn't on mirrors yet.

kuzalj commented on 2020-12-02 20:03

Just a reminder to everyone that might have some issues. Arch updated the Python packages in the repos to 3.9. This means any python packages you have installed need to be "recompiled" in order for any python depends to work, otherwise, you will get missing depends on errors.

IF you were running seafile with python 3.8 before, running this command will let you know what python packages haven't been recompiled yet and write it to a file.

sudo pacman -Qqo /usr/lib/python3.8/site-packages/* | sort -u > rebuild.txt

Then run this to reinstalll packages (clean the packages, make sure it does a clean rebuild)

yay -S - < rebuild.txt

I can confirm seafile is working with python 3.9. Enjoy!

Joffrey commented on 2020-10-03 09:49

Hello @all,

@kuzalj thanks for the analysis, I have pushed your modifications. For debug Seahub, in ~/domain.tld/conf/gunicorn.conf.py you can change daemon = True by daemon = False and run manualy manualy ~/domain.tld/seafile-server/seahub start.
With this the Python Exception appears.

Regards,
Joffrey

trap000d commented on 2020-10-01 05:27

@kuzalj, Well. Now it's clear why all stuff has working on my server without errors.

pacman -Ss python-django-rest-framework
community/python-django-rest-framework 3.12.1-1 [installed: 3.11.1-1]

I've not upgraded for the last few weeks so my one is still on 3.11.1

Thanks for information. I will know what to do after next upgrade :)

kuzalj commented on 2020-10-01 04:57

@trap000d

I FIXED IT. I went looking at the Github for seahub after noticing the error is related to django-rest-framework. There is a commit that somehow made it right after 7.1.5 requiring djangorestframework==3.11.1 instead of the undefined version before. I started researching, and 3.11.1 is the last version that supports django 1.xx. The version of django-rest-framework in the Arch repo is too new for Joffrey's bundled version of django, which is 1.11.29. Version 1.11.29 is required for Seahub however, as it relies on an old version. I believe I was reading in the commit history that they are updating to 2.xx the next release.

Either way, you need to bundle this older version of the rest-framework much like Jeoffrey did with django-picklefield. I edited the PKGBUILD to grab version 3.11.1 of django-rest-framework in the same way, and re-copied seafile-server, and everything is working again. @Joeffrey, since Arch updated the package, the package you depend on is too new and you will have to bundle rest-framework until the next seafile version updates with django 2.xx

PKGBUILD below

# Maintainer: Joffrey <j-off@live.fr>
# Contributor: eolianoe <eolianoe [at] gmail [DoT] com>
# Contributor: Edvinas Valatka <edacval@gmail.com>
# Contributor: Aaron Lindsay <aaron@aclindsay.com>

pkgname=seahub
pkgver=7.1.5
pkgrel=1
pkgdesc='The web frontend for seafile server'
arch=('any')
url='https://github.com/haiwen/seahub'
license=('Apache')
depends=(
    "seafile-server>=$pkgver"
    'python-future'
    'python-django-statici18n'
    'python-django-post-office'
    'python-django-webpack-loader'
    'gunicorn'
    'python-pymysql'
    'python-openpyxl'
    'python-qrcode'
    'python-django-formtools'
    'python-django-simple-captcha'
    'python-django-rest-framework'
    'python-dateutil'
    'python-requests'
    'python-pillow'
    'python-pyjwt'
    'python-pycryptodome'
    'python-requests-oauthlib'
    'python-django-ranged-response'
)
optdepends=(
    'python-wsgidav-seafile: Webdav support'
    'python-django-pylibmc: Memcached support'
    'ffmpeg: For video thumbnails'
)
# Outdated Python modules, but required by Seahub
_thirdpart=(
    'Django-1.11.29'
    'django-picklefield-2.1.1'
    'django-rest-framework-3.11.1'
)
source=(
    "$pkgname-$pkgver-server.tar.gz::$url/archive/v$pkgver-server.tar.gz"
    "${_thirdpart[0],,}.tar.gz::https://media.djangoproject.com/releases/1.11/${_thirdpart[0]}.tar.gz"
    "${_thirdpart[1],,}.tar.gz::https://github.com/gintas/${_thirdpart[1]%-*}/archive/v${_thirdpart[1]##*-}.tar.gz"
    "${_thirdpart[2],,}.tar.gz::https://github.com/encode/${_thirdpart[2]%-*}/archive/${_thirdpart[2]##*-}.tar.gz"
    'seahub@.service'
    'nginx.example.conf'
)
sha256sums=(
    'cc7f5a1642d203b2390ae3c30c8a5546d1e829d9d1a5ddf686e558292746ce5c'
    '4200aefb6678019a0acf0005cd14cfce3a5e6b9b90d06145fcdd2e474ad4329c'
    '5985205ec990ad1319e6d238616284b342f018d41a30dc089b76349fb17b15ae'
    '513c0da69619e76715a4ac9149d7715751b9c4820a29476cb143f2bb6b5a3d11'
    '67bb375871ce908b48bef53277284c9d8f80ee2e733efc89cb66d987647195e4'
    '461591ba500d012523d6fdecbcc230461f6fd8d708b92eefdedc8b93b1542171'
)
options=('!strip')

prepare() {
    cd "$srcdir/$pkgname-$pkgver-server"

    # Remove useless files and directories
    rm -rf \
        ./{CONTRIBUTORS,HACKING,Makefile} \
        ./{*test*,*dev*,*sh*,README*,pylintrc*,LICENSE*} \
        "$(find . -name \*.pyc)"

    sed -i -E "/SEAFILE_VERSION/s/[0-9.]+/$pkgver/" ./seahub/settings.py
}

build() {
    cd "$srcdir/$pkgname-$pkgver-server"

    for locale in ./locale/*/LC_MESSAGES/*.po; do
        echo "$locale"
        msgfmt -vo "${locale%.po}.mo" "$locale"
    done
}

package() {
    cd "$srcdir/seahub-$pkgver-server/"

    install -dm755 "$pkgdir/usr/share/seafile-server/seahub"
    cp -r -p "./"* "$pkgdir/usr/share/seafile-server/seahub/"

    # Install third part
    for thirdpart in "${_thirdpart[@]}"; do
        cd "$srcdir/$thirdpart"
        python setup.py install \
            --root="$pkgdir/" \
            --install-lib="usr/share/seafile-server/$pkgname/thirdpart/" \
            --optimize=1
    done
    rm -rf "$pkgdir"/usr/{bin,share/seafile-server/"$pkgname"/thirdpart/*.egg-info}

    install -Dm644 \
        "$srcdir/seahub@.service" \
        "$pkgdir/usr/lib/systemd/system/seahub@.service"
    install -Dm644 \
        "$srcdir/nginx.example.conf" \
        "$pkgdir/etc/webapps/$pkgname/nginx.conf"
}

kuzalj commented on 2020-10-01 04:14

@trap000d

I believe i have python-django installed, because I use it for other packages. But Joffrey's package (look at the PKGBUILD) downloads django-1.11.29.tar.gz and sets it up to be used. So in effect, running seahub makes you use django 1.11.29. This was done on purpose i thought by Jeoffrey because we needed the older version?

trap000d commented on 2020-10-01 04:10

@kuzalj, Check your python-django (or python2-django) installation

ImportError: cannot import name 'ProhibitNullCharactersValidator' from 'django.core.validators'

'ProhibitNullCharactersValidator' was implemented in Django 2, so if you still have any instance of Django 1.x around, it might break all things.

kuzalj commented on 2020-10-01 03:31

@trap000d

Thank you for that!!!! I finally got useful console output.

I am going to start looking into this myself, but this is what I get as an error.

Traceback (most recent call last):
  File "/usr/bin/gunicorn", line 11, in <module>
    load_entry_point('gunicorn==20.0.4', 'console_scripts', 'gunicorn')()
  File "/usr/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/usr/lib/python3.8/site-packages/gunicorn/app/base.py", line 228, in run
    super().run()
  File "/usr/lib/python3.8/site-packages/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/usr/lib/python3.8/site-packages/gunicorn/arbiter.py", line 58, in __init__
    self.setup(app)
  File "/usr/lib/python3.8/site-packages/gunicorn/arbiter.py", line 118, in setup
    self.app.wsgi()
  File "/usr/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
    return self.load_wsgiapp()
  File "/usr/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
    mod = importlib.import_module(module)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/srv/seafile/xxxxx/seafile-server/seahub/seahub/wsgi.py", line 25, in <module>
    application = get_wsgi_application()
  File "/srv/seafile/xxxxx/seafile-server/seahub/thirdpart/django/core/wsgi.py", line 14, in get_wsgi_application
    return WSGIHandler()
  File "/srv/seafile/xxxxx/seafile-server/seahub/thirdpart/django/core/handlers/wsgi.py", line 151, in __init__
    self.load_middleware()
  File "/srv/seafile/xxxxx/seafile-server/seahub/thirdpart/django/core/handlers/base.py", line 56, in load_middleware
    mw_class = import_string(middleware_path)
  File "/srv/seafile/xxxxx/seafile-server/seahub/thirdpart/django/utils/module_loading.py", line 20, in import_string
    module = import_module(module_path)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/srv/seafile/xxxxx/seafile-server/seahub/seahub/auth/middleware.py", line 14, in <module>
    from seahub.api2.utils import get_api_token
  File "/srv/seafile/xxxxx/seafile-server/seahub/seahub/api2/utils.py", line 16, in <module>
    from rest_framework.response import Response
  File "/usr/lib/python3.8/site-packages/rest_framework/response.py", line 11, in <module>
    from rest_framework.serializers import Serializer
  File "/usr/lib/python3.8/site-packages/rest_framework/serializers.py", line 29, in <module>
    from rest_framework.fields import get_error_detail, set_value
  File "/usr/lib/python3.8/site-packages/rest_framework/fields.py", line 15, in <module>
    from django.core.validators import (
ImportError: cannot import name 'ProhibitNullCharactersValidator' from 'django.core.validators' (/srv/seafile/xxxxx/seafile-server/seahub/thirdpart/django/core/validators.py)