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/activation: fix systemd-user daemon-reload in auto-upgrade service #47695

Merged
merged 1 commit into from Oct 3, 2018

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Oct 3, 2018

Motivation for this change

The autoupgrade service defined in system.autoUpgrade
(nixos/modules/installer/tools/auto-upgrade.nix) doesn't have su in
its path and thus yields a warning during the daemon-reload.

Specifying the absolute path fixes the issue.

Fixes #47648

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)
  • Fits CONTRIBUTING.md.

The autoupgrade service defined in `system.autoUpgrade`
(`nixos/modules/installer/tools/auto-upgrade.nix`) doesn't have `su` in
its path and thus yields a warning during the `daemon-reload`.

Specifying the absolute path fixes the issue.

Fixes NixOS#47648
@Ma27
Copy link
Member Author

Ma27 commented Oct 3, 2018

cc @etu sorry for this, can you recheck? I tested this locally and executed the nixos-upgrade.service manually to see if this works now:)

@etu
Copy link
Contributor

etu commented Oct 3, 2018

@Ma27 It's fine, I'm running on a not-yet stable branch and can expect things like this and trying to be a good tester by reporting such things.

I haven't had time to test it yet, may take a couple of days for me to find that time. But the change looks simple, clean and totally reasonable.

As long as the full path to su is in there it should be fine and this nice addition to the switching will probably stop haunting you now ;)

@xeji xeji merged commit 7297cc5 into NixOS:master Oct 3, 2018
@etu
Copy link
Contributor

etu commented Oct 3, 2018

@xeji I guess you're on it and this message may be redundant (I'm writing it just in case it's not). But I think this should be backported to 18.09 since it throws warnings there as well.

xeji pushed a commit that referenced this pull request Oct 3, 2018
…ice (#47695)

The autoupgrade service defined in `system.autoUpgrade`
(`nixos/modules/installer/tools/auto-upgrade.nix`) doesn't have `su` in
its path and thus yields a warning during the `daemon-reload`.

Specifying the absolute path fixes the issue.

Fixes #47648

(cherry picked from commit 7297cc5 and
resolved conflict)
@xeji
Copy link
Contributor

xeji commented Oct 3, 2018

backported: 6e93cdf

@Ma27 Ma27 deleted the fix-nixos-auto-upgrade branch October 4, 2018 13:18
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.

nixos/activation for users in a nixos-upgrade.service
4 participants