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

nixos/hedgedoc: Set StateDirectory to workDir and uploadsPath #172824

Merged
merged 1 commit into from
May 13, 2022

Conversation

cheriimoya
Copy link
Contributor

@cheriimoya cheriimoya commented May 13, 2022

Description of changes

Currently, hedgedoc doesn't allow uploading images into documents.

The cause of the failing uploads is, that the "uploadsPath" is not included in the systemd StateDirectories of the service configuration.

Tested on a vanilla NixOS with and without this patch. Without, i cannot upload images, with the patch it works.

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/)
  • 22.05 Release Notes (or backporting 21.11 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.

This is needed to make uploading files possible in the hedgedoc ui.
@dasJ
Copy link
Member

dasJ commented May 18, 2022

This is wrong. StateDirectory only accepts paths relative to /var/lib

yayayayaka added a commit to yayayayaka/nixpkgs that referenced this pull request Jun 15, 2022
Commit 8109d8a set the `StateDirectory=` option of the systemd service
configuration to the value of `cfg.workDir` which is wrong, according
to dasJ [1]. This commit resolves this issue by stripping the
`/var/lib/` prefix from `cfg.workDir`.

[1] NixOS#172824 (comment)
github-actions bot pushed a commit that referenced this pull request Jun 22, 2022
Commit 8109d8a set the `StateDirectory=` option of the systemd service
configuration to the value of `cfg.workDir` which is wrong, according
to dasJ [1]. This commit resolves this issue by stripping the
`/var/lib/` prefix from `cfg.workDir`.

[1] #172824 (comment)

(cherry picked from commit becff58)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants