Skip to content
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

Add webdav-server-rs #146965

Merged
merged 4 commits into from
Nov 30, 2021
Merged

Add webdav-server-rs #146965

merged 4 commits into from
Nov 30, 2021

Conversation

pmeiyu
Copy link
Member

@pmeiyu pmeiyu commented Nov 22, 2021

Motivation for this change

New package: webdav-server-rs

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Nov 22, 2021
@pmeiyu pmeiyu requested a review from aanderse November 22, 2021 04:41
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Nov 22, 2021
@pmeiyu pmeiyu force-pushed the webdav branch 3 times, most recently from 501bd4c to 8de7189 Compare November 22, 2021 07:50
Copy link
Member

@aanderse aanderse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few comments on the module. I'll leave the review of everything else for others to take a look at. You did a great job here 👍

You might consider mentioning the intended use of a reverse proxy to serve this and link to upstream documentation.

@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin labels Nov 23, 2021
@aanderse
Copy link
Member

@SuperSandro2000 any chance you can give this a quick review please?

rustPlatform.buildRustPackage rec {
pname = "webdav-server-rs";
# The v0.4.0 tag cannot build. So we use the 547602e commit.
version = "0.4.0-547602e";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
version = "0.4.0-547602e";
version = "unstable-2021-08-16";

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@SuperSandro2000
Copy link
Member

Why are we no longer using dynamic users?

@pmeiyu
Copy link
Member Author

pmeiyu commented Nov 30, 2021

Why are we no longer using dynamic users?

  1. Because this program actively detects if it is running in root account when it starts and uses that privilege to switch to respective unix user when a user logs in.
    Even if it's granted the CAP_SETUID and CAP_SETGID capability, its self detection still fails on start. This should be fixed by upstream developer.

  2. WebDAV files should be easily accessible by system user. It's easier to grant read/write permissions to system users if we use a special webdav user rather than dynamic user.

@pmeiyu pmeiyu force-pushed the webdav branch 2 times, most recently from c1efe32 to 78cc7d3 Compare November 30, 2021 01:46
@pmeiyu
Copy link
Member Author

pmeiyu commented Nov 30, 2021

Why are we no longer using dynamic users?

A comment block has been added to source code.

@aanderse aanderse merged commit 1800a86 into NixOS:master Nov 30, 2021
@aanderse
Copy link
Member

Thanks @SuperSandro2000! Thanks @pmeiyu!

@aanderse aanderse mentioned this pull request Dec 7, 2021
17 tasks
@pmeiyu pmeiyu deleted the webdav branch January 5, 2022 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants