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

sudo: explicitly disable tmpfiles.d to fix build on Linux #34869

Closed
wants to merge 1 commit into from

Conversation

andrew-d
Copy link
Contributor

@andrew-d andrew-d commented Feb 12, 2018

Motivation for this change

If we're building on a Linux with systemd, then the configure script will attempt to autodetect it and set this flag, which will attempt to write a file into the directory at /usr/lib/tmpfiles.d, which we may not have permission for and may conflict with the host. This PR explicitly disables it.

This should have no affect on NixOS, where the directory does not exist.

For reviewers, here's the relevant code in sudo's configure.ac.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

If we're building on a Linux with systemd, then the configure script
will attempt to autodetect it and set this flag, which will attempt to
write a file into the directory at /usr/lib/tmpfiles.d, which we may not
have permission for and may conflict with the host.
@andrew-d andrew-d changed the title sudo: explicitly disable tmpfiles.d sudo: explicitly disable tmpfiles.d to fix build on Linux Feb 12, 2018
@andrew-d
Copy link
Contributor Author

cc @edolstra as maintainer - apologies for forgetting to CC you originally!

@andrew-d
Copy link
Contributor Author

ping @edolstra 😃

@fpletz
Copy link
Member

fpletz commented Feb 26, 2018

Does only this happen when you have the sandbox disabled?

@andrew-d
Copy link
Contributor Author

Huh, looks like @bgamari fixed this in da310bd, merged about a day after I opened this 😊 Well, looks like I can close this! 🎉

@andrew-d andrew-d closed this Feb 26, 2018
@andrew-d andrew-d deleted the adunham/sudo-no-tempfiles branch June 5, 2018 05:15
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