-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seafile: 10.0.1 -> 11.0.12 #318727
Seafile: 10.0.1 -> 11.0.12 #318727
Conversation
Tests for seafile are failing on master but worked on nixos-24.05; I'll take a look when I can. Also, the update to 11.0 requires changing a reverse proxy setting that nixos doesn't allow. From https://cloud.seatable.io/dtable/external-links/7b976c85f504491cbe8e/?tid=0000&vid=0000&row-id=BQhH-2HSQs68Nq2EW91DBA, the new django CSRF protection requires the proxy server to pass the Host header untouched, but this is blocked by https://github.com/yandex/gixy/blob/master/docs/en/plugins/hostspoofing.md. This means that either nginx config validation has to be entirely disabled, or CSRF protection has to be disabled. |
f85db95
to
28352f8
Compare
Migration from 10.0 to 11.0 seem to be working properly now, and tests are passing both on 24.05 and unstable. The reverse proxy issue remains, but this is technically not caused by this module, so I'll undraft. A release note line may be necessary. |
c5ed206
to
0ff1f13
Compare
Thank you @melvyn2 for looking into this. I've been put off by the deprecation of sqlite (see upstream changelog). It seems to work, but I wouldn't assume this will be the case for long. Are you aware of a decision change? |
No, I just missed that in the changelog somehow 🤦
I actually undid this, I originally thought the SQL script was required because during my first attempted upgrade the migration silently failed. The django migrations do work normally and are simpler to use so I've reverted to only using them.
By "disabling" CSRF I meant simply adding the domain to CSRF_TRUSTED_ORIGINS, because I saw this as "bypassing" the protection for that specific origin - it was just bad phrasing from me. Exposing the setting in the module seems like a good choice considering how often this will be required for users to set. |
The MariaDB-based seafile module is passing tests, and migrations from sqlite/10.0 are almost working. Last error is https://manual.seafile.com/deploy/migrate_from_sqlite_to_mysql/#encountered-errno-150-foreign-key-constraint-is-incorrectly-formed, |
Of course as soon as I post that, I find https://mariadb.com/kb/en/server-system-variables/#foreign_key_checks ... |
ba8afc7
to
cbc574c
Compare
MariaDB migration is now working in a test environment, and using the ccnet service URL as a default URL for the CSRF whitelist seems like a decent solution for the CSRF issue. |
Works on my end, after these little changes! |
a85cbb9
to
5019899
Compare
I haven't been able to work on this for a decent period of time, but I think with this rebase and modifications (all passing tests and running on my server), it is ready to be merged. I've removed the remote-mysql additions because they are incomplete and will take non-negligible effort to get into a working state. This was "extra" functionality anyways that should really be in a separate PR; the old sqlite database only supported running on the same host anyways. |
Seems like the failed PR is an OfBorg/GitHub API issue and not something to do with this PR... |
5019899
to
20b7cd6
Compare
20b7cd6
to
4ade175
Compare
4ade175
to
76e55a0
Compare
76e55a0
to
073099d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The migration went fine. Let's merge this since seafile is broken on master.
I'll merge this as is since its better than having it broken on master, but I don't think enabling mysql on the local host is ideal. Would be great if you could open an issue to track progress so others can find it and see that it's not intended as a long term solution. That being said, thank you for the great effort spanning several months! |
checkPhase = '' | ||
runHook preCheck | ||
|
||
python tests/run_tests.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python tests/run_tests.py | |
${python.interpreter} tests/run_tests.py |
Description of changes
Updates seafile-server and seahub to 11.0.9. This requires adding the python package djangosaml2.
Finally, cleans up the seafile module a little to ensure the proper, matching packages are used.This required adding a migration script as the sqlite backend was deprecated in favor of MySQL as of version 11. To make this change easier, the persistent user setup of #290104 was merged in.
Finally, a change to the CSRF setup means some users might need to manually whitelist their domains, like so:
This closes #258719
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.