-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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 WebDAV extension (dependencies, package, and integration to seafile service) #171878
base: master
Are you sure you want to change the base?
Conversation
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.
Impressive PR for a first-time contributor! Sorry for the long wait, this is not normal. Do not be discouraged!
The diff LGTM, but i have not test-run the package.
Could you please consider adding a nixos test for this module? Something as simple as a test that pings the webdav port should be sufficient.
here is an example
sha256 = "1gpvmfamjbw90gh9njgmba58qnzxji1w1sra46spnhi9k778mds3"; | ||
}; | ||
|
||
dontBuild = true; |
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.
Please add a comment justifying this.
sha256 = "0jwgbx083mwwh18x7450igq748bbld9s7zgibwv1cxwrrny1aari"; | ||
}; | ||
|
||
dontBuild = true; |
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.
Please add a comment justifying this.
src = fetchFromGitHub { | ||
owner = "haiwen"; | ||
repo = "seafobj"; | ||
rev = "v8.0.8-server"; |
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.
rev = "v8.0.8-server"; | |
rev = "v${version}-server"; |
, nose | ||
, python | ||
}: | ||
buildPythonPackage { |
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.
buildPythonPackage { | |
buildPythonPackage rec { |
|
||
installPhase = '' | ||
runHook preInstall | ||
dest="$out/lib/${python.libPrefix}/site-packages" |
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.
something like this should exist:
dest="$out/lib/${python.libPrefix}/site-packages" | |
dest="$out/${python.sitePackages}" |
Consider inlining it instead of using a variable.
src = fetchFromGitHub { | ||
owner = "haiwen"; | ||
repo = "seafdav"; | ||
rev = "v8.0.8-server"; |
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.
rev = "v8.0.8-server"; | |
rev = "v${version}-server"; |
Result of 2 packages blacklisted:
|
099c4d7
to
a60e225
Compare
@pbsds Thanks for the review. I addressed your comments. Since Seafile has already a test, I simply added WebDAV subtests to it. Testing those showed that I forgot adding my packages to |
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.
re: testing, draft error sounds like #173825. Make sure you rebase to get the fix.
requires = [ "seaf-server.service" ]; | ||
restartTriggers = [ seahubSettings ]; | ||
environment = { | ||
PYTHONPATH = "${pkgs.seafdav.pythonPath}:${pkgs.seafdav}:/etc/seafile"; |
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.
Do we need /etc/seafile
in pythonpath?
PYTHONPATH = "${pkgs.seafdav.pythonPath}:${pkgs.seafdav}:/etc/seafile"; | |
PYTHONPATH = "${pkgs.seafdav.pythonPath}:${pkgs.seafdav}"; |
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.
This is required for loading the seahub_settings.py
which is processed by SeafDAV. From what I understand, this is handled via django settings for actual seahub, but that is not used in SeafDAV so I'm unsure whether there's a better way to do this.
src = fetchFromGitHub { | ||
owner = "haiwen"; | ||
repo = "seafdav"; | ||
rev = "v${version}-server"; |
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.
Upstream has a habit of pushing over existing tags, on other seafile component we end up using commit hashes.
Let's hope this is not the case here 🤞
}: | ||
python3.pkgs.buildPythonApplication rec { | ||
pname = "seafdav"; | ||
version = "8.0.8"; |
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.
seafile-server has been updated to 9.0.x, maybe update this component too?
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.
Yes now that the other packages have been updated this should be too. I pushed the 9.0.7
version.
Python module required for the Seafile WebDAV extension
WebDAV extension for Seafile server. Package adds a WSGI application for easy deployment, which is lacking from upstream sources.
Added option to start the optional WebDAV service alongside a Seafile server. Added options for configuring the WebDAV service. Added subtests for WebDAV server to Seafile test.
@greizgh Did a rebase and the error vanished, but test still fails with a timeout on starting seahub. Might be that my machine is simply too slow. |
This addresses the same functionality as #152069 but at present it looks like this one is the more complete pull request. |
So... What's keeping this from being merged? |
I lost interest in pushing this to get merged due to the long process. I just integrated it as local overlay on my system. For the PR to be merged the seafobj/seafdav version should be updated (server and seahub have been bumped to Feel free to adopt the PR. |
Nextcloud isn't any better hence my interest |
Description of changes
This adds the Python library
seafobj
and the Python WSGI applicationseafdav
, both of which belong with the Seafile server. Version is8.0.8
which is not the most recent one, but conforms to the current versions of existingseafile-server
andseahub
packages.seafdav
provides a WebDAV interface to a runningseafile-server
.seafobj
is a dependency ofseafdav
.The
nixos/seafile
service has been extended to provide options for automatically starting the WebDAV extension alongside the server. I opted to not allow freeform settings since the existing settings are already confusing – some are consumed byseafdav
itself, some by the scriptserver_cli
(which my setup doesn't use), and some only when using Seafile's own management scriptseafile.sh
(which isn't viable for NixOS). I wanted to clearly communicate which values are actually relevant.I reviewed the relevant code (mainly server_cli.py) to learn how the settings are used, and then added and used a simpler WSGI application setup script for the service setup. This enables a service setup very similar to the one of
seahub
, which also is a WSGI application. This should be easier to maintain than running theserver_cli.py
script provided from upstream.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notesping @schmittlauch @greizgh (maintainers of the other Seafile packages)