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

tree-wide: nixos: /var/run -> /run #51918

Merged
merged 46 commits into from Apr 7, 2019
Merged

Conversation

bobvanderlinden
Copy link
Member

@bobvanderlinden bobvanderlinden commented Dec 12, 2018

Motivation for this change

Fixes #51800
Continuation of #47856

/var/run is deprecated in tmpfiles.d and /run should be used. Currently this produces a warning every time nixos-rebuild switch runs for each service that uses tmpfiles.d with an entry for /var/run.

This PR changes /var/run instances into /run across nixpkgs.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@bobvanderlinden bobvanderlinden changed the title Var run tree-wide: /var/run -> /run Dec 12, 2018
@grahamc
Copy link
Member

grahamc commented Dec 12, 2018

I'm not sure the individual commits with all the same commit message are usefully separate? May be good to squash them all together, or make their commit messages more specific about what they're doing.

@@ -203,7 +203,7 @@ in

environment.shells =
[ "/run/current-system/sw/bin/zsh"
"/var/run/current-system/sw/bin/zsh"
"/run/current-system/sw/bin/zsh"
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
"/run/current-system/sw/bin/zsh"

@bobvanderlinden
Copy link
Member Author

What needs to be done to get this merged? If doing this tree-wide is making the decision harder, I can split things up in separate PRs as well. For instance, I can do /{var/,}run/kubernetes separate from /{var/,}run/current-system

@bobvanderlinden
Copy link
Member Author

bobvanderlinden commented Dec 19, 2018

Thanks a lot @globin for the review. I reverted the changes that you mentioned. That made me realize there are a number of changes in here that are just wrong or edge cases. I went through the changes again, removed anything that seemed fishy and committed them separately.

Let me know whether this makes more sense.

Also, it is good to note here that I have tried this for my local machine with nixos-rebuild, but I have not tried any of the modules individually.

@Mic92
Copy link
Member

Mic92 commented Dec 20, 2018

That needs to go to staging.

@nixos-discourse
Copy link

This pull request has been mentioned on Nix community. There might be relevant details there:

https://discourse.nixos.org/t/solved-add-var-run-directory/1701/3

@bobvanderlinden
Copy link
Member Author

bobvanderlinden commented Mar 24, 2019

@oxij Thanks a lot of the feedback! I've applied the changes (with your script, thanks!) and split the package-related commits off to a separate PR: #58222. That PR is based on latest staging.

I split the wpa_supplicant and the asterisk commits in 2 (a nixos and a pkgs commit). The pkgs commit of those were also moved to #58222. It should still be compatible if /var/run is indeed linked to /run

Copy link
Member

@globin globin left a comment

Choose a reason for hiding this comment

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

Will merge in a few days if no other issues are brought up.

@bobvanderlinden
Copy link
Member Author

@globin merging would be awesome! :D

@flokli flokli merged commit 2457510 into NixOS:master Apr 7, 2019
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

9 participants