Seafile community edition 9.0.5 is ready!

This is a maintenance release with following fixes and updates:

  • [fix] Fix a bug that sometimes a shared subfolder is unshared automatically by database access error
  • [fix] Fix a bug in work with Python 3.10+
  • [fix] Fix a bug in smart link redict to the file page
  • [fix] Fix a UI bug when drag and drop a file
  • [fix] Fix zip downloading a folder not having .zip suffix when using golang file server
  • Improve UI for file tags
  • Show file tags in sharing links
  • Improve UI of file comments
  • [fix] Fix permission check in deleting/editing a file comment
  • Remove the feature of related files as it is not used
  • Support editing of expire time for sharing links
  • Improve SQL performance when deleting a library
  • Show ISO date and time in file history page instead of showing relative time
  • Add “Visit related snapshot” in the dropdown menu of an entry in file history
6 Likes

Thanks for the update!
Have the docker images been fixed in regards to the cert renewal issues?

thanks!

1 Like

Hi, thanks a lot for the update, Seafile is great :slight_smile:

Question: is Seafile Server 9.0.5 compatible with Ubuntu 22.04?

I’m currently running into following issues:

  • Seafile Server 9.0.5 requires cffi==1.14.0
  • cffi==1.14.0 won’t install on Ubuntu 22.04, which ships with Python 3.10
  • cffi==1.15.0 on the other hand installs just fine on Ubuntu 22.04, and is the latest version available
  • However, cffi==1.15.0 doesn’t work with Seafile 9.0.5, as discussed on this forum (thread on CE 9.0.4)
  • Someone suggested a workaround on Github (issue 2543), by deleting the cffi library from seahub/thirdpart
  • However, this workaround leads to a new issue when starting Seahub: ModuleNotFoundError: No module named 'seaserv'
  • The fix for this issue has been discussed on this forum (thread on CE 9.0.2): install cffi==1.14.0
  • Which leads back to square one, since cffi==1.14.0 won’t install on Ubuntu 22.04

Anyone managed to get Seafile Server 9.0.5 working on Ubuntu 22.04? Or should we just wait for the next Seafile Server release for better compatibility with Python 3.10 / cffi==1.15.0?

Any feedback is appreaciated, many thanks!

cffi 1.14.6 works fine, try to install it in the thirdpart folder:

python3 -m pip install --force-reinstall --upgrade --target <SOMEWHERE>/seafile-server-9.0.5/seahub/thirdpart cffi==1.14.6

Edit: package libffi-dev is needed. If absent, install it before using pip with apt install libffi-dev

1 Like

Edit: disregard comment below, suggestion from Barolo worked (needed a fresh install first)

Thanks a lot Barolo! cffi 1.14.6 can indeed be installed on Ubuntu 22.04 following your advice.

However,

  • when I run the command you suggested to install cffi 1.14.6 in the thirdpart folder, I get Error happened during creating seafile admin when trying to execute seahub.sh, more specifically a missing module error when check_init_admin.py is invoqued:

    ModuleNotFoundError: No module named 'seaserv'
    

    The fix for this issue has been discussed on this forum (thread on CE 9.0.2), but requires to install cffi 1.14.0, which we want to avoid

  • when I install cffi 1.14.6 in the user’s .local directory with pip3 install --user cffi==1.14.6, I get a version error mismatch when trying to execute seahub.sh:

    Exception: Version mismatch: this is the 'cffi' package version 1.14.0, located in '/<PATH>/seafile-server-9.0.5/seahub/thirdpart/cffi/api.py'.  When we import the top-level '_cffi_backend' extension module, we get version 1.14.6, located in '/<PATH>/.local/lib/python3.10/site-packages/_cffi_backend.cpython-310-x86_64-linux-gnu.so'.  The two versions should be equal; check your installation.
    

So I’m still kinda stuck :confused:

I don’t see the link between the two issues, the ModuleNotFoundError looks more like a PYTHONPATH issue. Can you share the thread you’re referring to?

Thx for your response Barolo, I’m surely missing something. User DJN reported a similar error message about the missing module in this thread (sorry, can’t post full link): seafile-community-edition-9-0-2-is-ready/15569/9

User prokyon suggested checking the Python path, as well as installing the package cffi==1.14.0. Apparently, the latter did the trick. That’s why I draw parallels between both issues, but it might be something different altogether.

I’ll spin up a new install of the Ubuntu Server 22.04, try your suggestion again and report back if I have more luck.

Hello, I forgot to check on seafile forum if it is save to upgrade to ubuntu 22.04 and now my seahub service refuses to start. after installing cffi1.15 it starts, but I get Internal server Error. Your described installation method of 1.14.6 fails. What can I do to fix my seafile server? Any help would be very appreciated!

Thx for the link, it appears this is indeed another issue (“Then I ran into another issue with a mismatched python package”), which is good news.

I quickly tried to install seafile on a fresh 22.04 vm and faced no other issue than the cffi one, thus it should work.

What fails exactly ?

I get the following error during installation:

Collecting cffi==1.14.6
Using cached cffi-1.14.6.tar.gz (475 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status ‘done’
Collecting pycparser
Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Building wheels for collected packages: cffi
Building wheel for cffi (setup.py): started
Building wheel for cffi (setup.py): finished with status ‘error’
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [36 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.10
creating build/lib.linux-x86_64-3.10/cffi
copying cffi/commontypes.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/backend_ctypes.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/api.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/cparser.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/lock.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/recompiler.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/setuptools_ext.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/verifier.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/pkgconfig.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/vengine_gen.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/ffiplatform.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/cffi_opcode.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/vengine_cpy.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/error.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/init.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/model.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/_cffi_include.h → build/lib.linux-x86_64-3.10/cffi
copying cffi/parse_c_type.h → build/lib.linux-x86_64-3.10/cffi
copying cffi/_embedding.h → build/lib.linux-x86_64-3.10/cffi
copying cffi/_cffi_errors.h → build/lib.linux-x86_64-3.10/cffi
running build_ext
building ‘_cffi_backend’ extension
creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/c
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.10 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.10/c/_cffi_backend.o
c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
15 | #include <ffi.h>
| ^~~~~~~
compilation terminated.
error: command ‘/usr/bin/x86_64-linux-gnu-gcc’ failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cffi
Running setup.py clean for cffi
Failed to build cffi
Installing collected packages: pycparser, cffi
Running setup.py install for cffi: started
Running setup.py install for cffi: finished with status ‘error’
error: subprocess-exited-with-error

× Running setup.py install for cffi did not run successfully.
│ exit code: 1
╰─> [38 lines of output]
running install
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.10
creating build/lib.linux-x86_64-3.10/cffi
copying cffi/commontypes.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/backend_ctypes.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/api.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/cparser.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/lock.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/recompiler.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/setuptools_ext.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/verifier.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/pkgconfig.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/vengine_gen.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/ffiplatform.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/cffi_opcode.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/vengine_cpy.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/error.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/init.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/model.py → build/lib.linux-x86_64-3.10/cffi
copying cffi/_cffi_include.h → build/lib.linux-x86_64-3.10/cffi
copying cffi/parse_c_type.h → build/lib.linux-x86_64-3.10/cffi
copying cffi/_embedding.h → build/lib.linux-x86_64-3.10/cffi
copying cffi/_cffi_errors.h → build/lib.linux-x86_64-3.10/cffi
running build_ext
building ‘_cffi_backend’ extension
creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/c
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.10 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.10/c/_cffi_backend.o
c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
15 | #include <ffi.h>
| ^~~~~~~
compilation terminated.
error: command ‘/usr/bin/x86_64-linux-gnu-gcc’ failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> cffi

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

And Seahub URL shows internal server error :frowning:
Any idea how to fix this?
Thanks a lot for helping me!

Oh, I should have though about it. I’ll edit my previous post.

Just install libffi-dev:

sudo apt install -y libffi-dev

Hi Barolo, wanted to thank you again for your support, all works well now!

Just needed a fresh Ubuntu 22.04 install before applying your workaround (permissions were somehow messed up on previous install).

If anyone is interested, here the steps:

  1. Install Ubuntu Server 22.04 LTS (incl. LAMP stack)

  2. Install the database (e.g. MySQL) and create the ccnet, seafile & seahub databases

  3. Install dependencies for Seafile 9.0.5 & Ubuntu Server 22.04:

    sudo apt install python3 python3-{setuptools,pip} libmysqlclient-dev memcached libmemcached-dev libffi-dev
    
  4. Install Python modules for Seafile 9.0.5 & Ubuntu Server 22.04:

    sudo pip3 install django==3.2.* Pillow pylibmc captcha jinja2 sqlalchemy==1.4.3 django-pylibmc django-simple-captcha python3-ldap mysqlclient pycryptodome==3.12.0
    
  5. Download & install Seafile Server 9.0.5

  6. Install the package cffi 1.14.6 in the thirdpart folder, as suggested by Barolo:

    sudo pip3 install --force-reinstall --upgrade --target <SOMEPATH>/seafile-server-9.0.5/seahub/thirdpart cffi==1.14.6
    
  7. Run the installation script:

    ./<SOMEPATH>/seafile-server-9.0.5/setup-seafile-mysql.sh
    
  8. Start Seafile Server & Seahub with ./seafile.sh and ./seahub.sh scripts

Remark: if you install Seafile Server/Python modules as user and not as root, make sure to set the right directory permissions

5 Likes

OMG, Barolo and georgj, both of you made my day!!
I am so grateful for your help! Had to adjust the python modules because my server is still running on sqlite, and had to run the pip install (step 6) without sudo to make it work, but i finally figured it out thanks to your help!! Server back up and running. Guess it is time for another backup and the figure out how to move my seafile server to mariadb and perhaps docker, to make it more independent of the OS. Thanks again!

1 Like

Thanks a lot for the summary, was able to fix it on my Debian 12 box as well with it. Broken Python packages are way to common with the CE server due using outdated packages or pinning very specific releases in the install scripts.

1 Like

OK, I found another issue with Seafdav, that stopped working after the upgrade to 22.04 and 9.0.5 :frowning:
It shows nothing in the log files, seems that server 9.05 simply ignores the seafdav.conf file and doesn’t attempt to start seafdav with seafile.sh
Does seafdav require additional python libraries since 9.05 or do I have to move the config file somewhere else?
With Ubuntu 20.04 and Seafile Server 9.0.4, seafdav was working without any issues and I haven’t changed that config at all.

Thanks again for your help,
Ruediger

Huuum, there is an issue with markupsafe but this is something you should see in controller.log. See this thread.

Otherwise it’s not something I’ve experimented.

Thanks for the fast reply.
I was looking in the wrong log file.
Turns out I didn’t install sqlalchemy because I thought this is just for mysql/mariadb, I’m still running with sqlite (upgrade issues).
After installing sqlalchemy it’s working now. thanks a lot.

I’ll spin up a new install of the Ubuntu Server 22.04, try your suggestion again and report back if I have more luck.