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/transmission: fix startup directory creation #81104

Merged
merged 1 commit into from May 22, 2020

Conversation

@bb2020
Copy link
Contributor

bb2020 commented Feb 26, 2020

Fixes #76552 #78113 #55161. Supplements #70542.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@bb2020 bb2020 force-pushed the bb2020:transmission branch from 5801776 to fa50d8b Feb 26, 2020
@chreekat
Copy link
Contributor

chreekat commented Mar 1, 2020

@bb2020 , is this still a draft? Are there changes you want to make?

@bb2020
Copy link
Contributor Author

bb2020 commented Mar 1, 2020

No, this is final. I didn't have time to test it so left it as draft.

@bb2020 bb2020 force-pushed the bb2020:transmission branch 2 times, most recently from c78d4ef to e06e32c Mar 1, 2020
@bb2020 bb2020 force-pushed the bb2020:transmission branch from e06e32c to f43f789 Mar 1, 2020
@chreekat

This comment has been minimized.

Copy link
Contributor

chreekat commented on nixos/modules/services/torrent/transmission.nix in f43f789 Mar 1, 2020

🙏

This comment has been minimized.

Copy link
Contributor Author

bb2020 replied Mar 1, 2020

It looks like tmpfiles can not create dot folders so I had to rename this.
The error message was: Detected unsafe path transition.

This comment has been minimized.

Copy link
Contributor

chreekat replied Mar 1, 2020

I approve - dotfiles anywhere other than $HOME seem fishy to me.

This comment has been minimized.

Copy link
Contributor Author

bb2020 replied Mar 1, 2020

Actually .incomplete also seems creepy. However I don't want to break someone's shell script.
Edit: It may also lead to orphaned files as Nixos has incomplete-files enabled by default.

@bb2020 bb2020 marked this pull request as ready for review Mar 1, 2020
@chreekat
Copy link
Contributor

chreekat commented Mar 1, 2020

I tested on my computer. I have to admit I'm not sure if it's good enough for multi-user setup or not, but it at least solves my problem!

:/var/lib/transmission]$ ls -al
total 24
drwxrwx---  6 transmission transmission 4096 Mar  1 17:55 .
drwxr-xr-x 29 root         root         4096 Feb 23 14:25 ..
drwxrwxr-x  3 transmission transmission 4096 Feb 23 14:25 .config
drwx------  5 transmission transmission 4096 Mar  1 17:55 config
drwxrwx---  4 transmission transmission 4096 Mar  1 12:50 Downloads
drwxrwx---  2 transmission transmission 4096 Mar  1 12:50 .incomplete

I can get to my downloads now. :)

Run on the following system:

  • system: "x86_64-linux"
  • host os: Linux 5.4.21, NixOS, 20.03beta358.4f8bc8e10bf (Markhor)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.2
  • channels(root): "nixos-20.03beta358.4f8bc8e10bf"
  • channels(b): "unstable-20.03pre200231.7827d3f4497"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
@bb2020
Copy link
Contributor Author

bb2020 commented Mar 1, 2020

Great. This PR is a go then.

@Lassulus Lassulus merged commit 79f41b2 into NixOS:master May 22, 2020
12 checks passed
12 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.