Package Details: seahub 12.0.14-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-2.0
Submitter: eolianoe
Maintainer: Joffrey
Last Packager: Joffrey
Votes: 7
Popularity: 0.000000
First Submitted: 2017-07-03 09:48 (UTC)
Last Updated: 2025-06-06 08:11 (UTC)

Pinned Comments

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 .. 15 Next › Last »

Artain commented on 2021-01-18 16:23 (UTC)

@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 (UTC) (edited on 2020-12-05 11:19 (UTC) by Joffrey)

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 (UTC)

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 (UTC) (edited on 2020-10-03 09:51 (UTC) by Joffrey)

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 (UTC)

@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 (UTC)

@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 (UTC)

@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 (UTC)

@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.