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

Fix sudo in the darwin installer #10128

Merged
merged 2 commits into from
Mar 6, 2024
Merged

Conversation

thufschmitt
Copy link
Member

Motivation

Make sure that every part of the installer has access to the required environment to run our sudo wrapper

Context

The darwin installer job is broken on master: https://github.com/NixOS/nix/actions/runs/8112489666/job/22176091480
Seems to be due to #10070

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

Make sure that every part of the installer has access to the required
environment to run our sudo wrapper
@thufschmitt
Copy link
Member Author

This is apparently also causing a failure in hydra: https://hydra.nixos.org/build/251925004/nixlog/1

@thufschmitt
Copy link
Member Author

(which is nice because it means that I can actually test it :) )

@thufschmitt
Copy link
Member Author

And I can confirm that this at least fixes the hydraJobs.installerTests.rhel-7.x86_64-linux.install-force-daemon test. So probably good to go

@thufschmitt thufschmitt marked this pull request as ready for review March 2, 2024 18:07
Copy link
Contributor

@fricklerhandwerk fricklerhandwerk left a comment

Choose a reason for hiding this comment

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

Looks like it makes sense

fi
done

# Required by the darwin installer
export SUDO_KEPT_ENVIRONMENT_VARIABLES
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does it need to be exported, if all we do with it is pass it through sudo?

Copy link
Member Author

Choose a reason for hiding this comment

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

Frankly: I don't know. But it failed complaining that the variable was unset before. So I assume we're executing something in a sub-script somewhere

@fricklerhandwerk fricklerhandwerk merged commit 686405e into master Mar 6, 2024
15 checks passed
@fricklerhandwerk fricklerhandwerk deleted the fix-darwin-installer branch March 6, 2024 21:36
@thufschmitt
Copy link
Member Author

This broke the Ubuntu 16.04 installer, because their (probably very old) sudo doesn't support --preserve-env with arguments: https://hydra.nixos.org/build/252347636/nixlog/1 .

So either we

  1. revert this and install-multi-user.sh: _sudo: add proxy variables to sudo #10070
  2. Drop support for Ubuntu 16.04 (but it is still officially in extended security maintenance for 2y)
  3. Rewrite the logic to support old Ubuntu versions

I'd be in favour of 1. now, and 3 after the release. Opinions?

@fricklerhandwerk
Copy link
Contributor

Yes, let's revert for now. We really have to make some progress on the installer situation more generally...

thufschmitt added a commit that referenced this pull request Mar 7, 2024
thufschmitt added a commit to tweag/nix that referenced this pull request Mar 7, 2024
thufschmitt added a commit to tweag/nix that referenced this pull request Mar 7, 2024
fricklerhandwerk pushed a commit that referenced this pull request Mar 7, 2024
@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/2024-03-06-nix-team-meeting-131/42959/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants