NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.38k stars 14.33k forks source link

Update request: seahub 9.0.10 → 11.0.0 #258719

Closed linyinfeng closed 2 months ago

linyinfeng commented 1 year ago

The package is broken on nixos-unstable because Django 4.2 removed the providing_args argument for django.dispatch.Signal. https://docs.djangoproject.com/en/4.2/internals/deprecation/#deprecation-removed-in-4-0.

The package failed in runtime instead of build time because the package sets dontBuild = true.

The issue was fixed in upstream https://github.com/haiwen/seahub/pull/5502. And the fix is already released in v11.0.0-pro.

Log:

Oct 03 04:19:16 mtl0 systemd[1]: Starting Seafile Server Web Frontend...
Oct 03 04:19:16 mtl0 systemd[1]: Started Seafile Server Web Frontend.
Oct 03 04:19:16 mtl0 gunicorn[8928]: Traceback (most recent call last):
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "/nix/store/6d2hnh4p82r0w3zhslxnr019k7fl8rnx-python3.10-gunicorn-21.2.0/bin/.gunicorn-wrapped", line 9, in <module>
Oct 03 04:19:16 mtl0 gunicorn[8928]:     sys.exit(run())
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "/nix/store/6d2hnh4p82r0w3zhslxnr019k7fl8rnx-python3.10-gunicorn-21.2.0/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 67, in run
Oct 03 04:19:16 mtl0 gunicorn[8928]:     WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "/nix/store/6d2hnh4p82r0w3zhslxnr019k7fl8rnx-python3.10-gunicorn-21.2.0/lib/python3.10/site-packages/gunicorn/app/base.py", line 236, in run
Oct 03 04:19:16 mtl0 gunicorn[8928]:     super().run()
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "/nix/store/6d2hnh4p82r0w3zhslxnr019k7fl8rnx-python3.10-gunicorn-21.2.0/lib/python3.10/site-packages/gunicorn/app/base.py", line 72, in run
Oct 03 04:19:16 mtl0 gunicorn[8928]:     Arbiter(self).run()
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "/nix/store/6d2hnh4p82r0w3zhslxnr019k7fl8rnx-python3.10-gunicorn-21.2.0/lib/python3.10/site-packages/gunicorn/arbiter.py", line 58, in __init__
Oct 03 04:19:16 mtl0 gunicorn[8928]:     self.setup(app)
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "/nix/store/6d2hnh4p82r0w3zhslxnr019k7fl8rnx-python3.10-gunicorn-21.2.0/lib/python3.10/site-packages/gunicorn/arbiter.py", line 118, in setup
Oct 03 04:19:16 mtl0 gunicorn[8928]:     self.app.wsgi()
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "/nix/store/6d2hnh4p82r0w3zhslxnr019k7fl8rnx-python3.10-gunicorn-21.2.0/lib/python3.10/site-packages/gunicorn/app/base.py", line 67, in wsgi
Oct 03 04:19:16 mtl0 gunicorn[8928]:     self.callable = self.load()
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "/nix/store/6d2hnh4p82r0w3zhslxnr019k7fl8rnx-python3.10-gunicorn-21.2.0/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
Oct 03 04:19:16 mtl0 gunicorn[8928]:     return self.load_wsgiapp()
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "/nix/store/6d2hnh4p82r0w3zhslxnr019k7fl8rnx-python3.10-gunicorn-21.2.0/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
Oct 03 04:19:16 mtl0 gunicorn[8928]:     return util.import_app(self.app_uri)
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "/nix/store/6d2hnh4p82r0w3zhslxnr019k7fl8rnx-python3.10-gunicorn-21.2.0/lib/python3.10/site-packages/gunicorn/util.py", line 371, in import_app
Oct 03 04:19:16 mtl0 gunicorn[8928]:     mod = importlib.import_module(module)
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "/nix/store/pzf6dnxg8gf04xazzjdwarm7s03cbrgz-python3-3.10.12/lib/python3.10/importlib/__init__.py", line 126, in import_module
Oct 03 04:19:16 mtl0 gunicorn[8928]:     return _bootstrap._gcd_import(name[level:], package, level)
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "<frozen importlib._bootstrap_external>", line 883, in exec_module
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "/nix/store/08dwi9sf17j33dnm1gawl655nfw9rli5-seahub-9.0.10/seahub/__init__.py", line 2, in <module>
Oct 03 04:19:16 mtl0 gunicorn[8928]:     from .signals import repo_created, repo_deleted, clean_up_repo_trash, \
Oct 03 04:19:16 mtl0 gunicorn[8928]:   File "/nix/store/08dwi9sf17j33dnm1gawl655nfw9rli5-seahub-9.0.10/seahub/signals.py", line 5, in <module>
Oct 03 04:19:16 mtl0 gunicorn[8928]:     repo_created = django.dispatch.Signal(providing_args=["org_id", "creator", "repo_id", "repo_name", "library_template"])
Oct 03 04:19:16 mtl0 gunicorn[8928]: TypeError: Signal.__init__() got an unexpected keyword argument 'providing_args'
Oct 03 04:19:16 mtl0 systemd[1]: seahub.service: Main process exited, code=exited, status=1/FAILURE
Oct 03 04:19:16 mtl0 systemd[1]: seahub.service: Failed with result 'exit-code'.

Notify maintainers

@greizgh @schmittlauch


Note for maintainers: Please tag this issue in your PR.

mzabani commented 1 year ago

I have a local branch that updates seafile-server and seahub to the latest, but it doesn't yet handle upgrading the local database. I'm also unsure I've covered every new python dependency, but it's at least got me to the point where it passes nix-build -A nixosTests.seafile, seahub working locally and I can upload a file.

In case that amount of work helps maintainers, please let me know and I can push my branch somewhere or open a draft PR against nixpkgs.

EDIT: if maintainers find themselves too busy at this moment, I could put in some more time and try to work the database migration out by myself and get a PR out for review.

greizgh commented 1 year ago

It seems that version 11 is still in beta (according to the download page, their tags cannot really be trusted). Also note that there is a PR to update to 10: https://github.com/NixOS/nixpkgs/pull/249523

In case that amount of work helps maintainers, please let me know and I can push my branch somewhere or open a draft PR against nixpkgs.

Thank you for that, that would be super helpful :pray:

EDIT: if maintainers find themselves too busy at this moment, I could put in some more time and try to work the database migration out by myself and get a PR out for review.

I can't promise anything but having a PR we can discuss would definitely be a first step. The update process is fairly barebone: we execute specific sql scripts.

mzabani commented 1 year ago

Also note that there is a PR to update to 10

Oh, nice. I see you added a reviewer too. Does it make sense to get your PR in before I create one to update to seafile 11, especially since 11 is beta (I hadn't noticed that)? Would it help if I review it?

The update process is fairly barebone: we execute specific sql scripts.

Oh, I saw that but think I saw somewhere that seafile's update script does a bit more than just applying changes to the sqlite DB. But I might be misremembering. In any case, you've done this before and I have just installed seafile a month ago, so I think it's safe to ignore whatever I think I saw for now.

mohe2015 commented 1 year ago

In case that amount of work helps maintainers, please let me know and I can push my branch somewhere or open a draft PR against nixpkgs.

I would be interested in that to try out the latest seahub.

mzabani commented 1 year ago

@mohe2015 I have pushed my branch with seafile 11 to https://github.com/mzabani/nixpkgs/, branch update-seafile-only. Please backup your seafile data before trying that, as it does not have data migration code yet. It might also be on top of not very recent nixpkgs, but it shouldn't be too hard to rebase.

mzabani commented 2 months ago

I am getting an error building seahub on nixos-unstable from today:

error: builder for '/nix/store/v0pli8c784ja24qzjwz18x8fkf6bv19w-python3.12-django-compressor-4.5.1.drv' failed with exit code 1;
       last 10 log lines:
       > /build/django_compressor-4.5.1/dist /build/django_compressor-4.5.1
       > Unpacking to: unpacked/django_compressor-4.5.1...OK
       > Repacking wheel as ./django_compressor-4.5.1-py2.py3-none-any.whl...OK
       > /build/django_compressor-4.5.1
       > Finished executing pypaBuildPhase
       > buildPhase completed in 34 seconds
       > Running phase: pythonRuntimeDepsCheckHook
       > Executing pythonRuntimeDepsCheck
       > Checking runtime dependencies for django_compressor-4.5.1-py2.py3-none-any.whl
       >   - django>=4.2 not satisfied by version 3.2.25
       For full logs, run 'nix log /nix/store/v0pli8c784ja24qzjwz18x8fkf6bv19w-python3.12-django-compressor-4.5.1.drv'.
error: 1 dependencies of derivation '/nix/store/fjc7kqmgx8kln903r9vpr18jzid6vq2c-seahub-10.0.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/xr6hs6bvmgavjrq681lcfnhxbp6a571q-unit-seahub.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/q7bnjcry95wxahi8wgya2v696p3yn5x1-system-units.drv' failed to build
error: 1 dependencies of derivation '/nix/store/izywdiz9fdqrsn7zywwfdjaxqmi6hadb-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/k59ckcz9wqn4l3ak2cwjs2h06q7h2gjv-nixos-system-raspberrypi-24.11.20240926.1925c60.drv' failed to build

Is anyone else running into this? I don't know if I'm doing something wrong so it'd be good to confirm. And it might be good to check if seafile 11 helps avoid this issue..