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/nixos-enter: Create /tmp #80769

Merged
merged 1 commit into from Dec 31, 2020
Merged

nixos/nixos-enter: Create /tmp #80769

merged 1 commit into from Dec 31, 2020

Conversation

chkno
Copy link
Member

@chkno chkno commented Feb 22, 2020

/tmp is normally created by the systemd-tmpfiles-setup systemd service
at startup.

Fixes #39140

Motivation for this change

Working towards being able to run 'nixos-enter -- nix-build ...`. This is the first thing that breaks.

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.

/tmp is normally created by the systemd-tmpfiles-setup systemd service
at startup.

Fixes NixOS#39140
@danbst
Copy link
Contributor

danbst commented Feb 22, 2020

cc @edolstra whether systemd-tmpfiles is fine to run in nixos-enter

@chkno chkno requested a review from edolstra May 11, 2020 23:24
@stale
Copy link

stale bot commented Nov 8, 2020

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 8, 2020
@nh2
Copy link
Contributor

nh2 commented Nov 22, 2020

👍 I need this too, otherwise I cannot nixos-rebuild switch in the nixos-enter to fix a server's GRUB.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 22, 2020
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/313

@nh2
Copy link
Contributor

nh2 commented Dec 31, 2020

I'm merging this now as it looks correct, works for me +3 others, and from #39140 (comment) this is the same

like switch-to-configuration.pl

in

system("@systemd@/bin/systemd-tmpfiles", "--create", "--remove", "--exclude-prefix=/dev") == 0 or $res = 3;
.

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.

The result of (nixos-install && nixos-enter) lacks the /tmp directory
5 participants