-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 nixbld user name/uid for macOS/darwin #4532
Conversation
Maybe we could count down from 400 to minimize the risk of an update collision disaster down the line? The number of nixbld users limits how high a |
I'd like to add that I've actually seen this behavior in Big Sur ever since the betas, on both Intel and ARM. Our entire organization uses nix for development machines, and we've seen it consistently across updates. If what we saw was indeed this issue, it seems pretty likely that this isn't limited to 11.2, but is just part of something new in Big Sur. I have a feedback ticket open with Apple about this issue, and I'll link to this PR as part of the dialogue there. |
It's not super important, but we run Nix on several different Macs of various makes and models, and we saw this issue on both the 11.0->11.1 update, and the 11.1->11.2 update. I didn't really think anything of it, nor mention it in IRC, during the 11.0->11.1 update because I figured it was just a typical Apple one-off bug. But now I'm certain that it's been around since the 11.1 update, at least. (We may have also seen it with the original 11.0 install, but I don't recall anymore.) |
@kevingriffin @dhess Thanks for clarifying this; updated the summary. |
Does the group id not matter? It's still 30000 here. The migrate script doesn't appear to be working since the
I'm not sure how to fix this. I ran:
to reverse this. |
It doesn't appear to, so I didn't touch it.
Good catch, it looks like I got caught up in optimizing for the smallest change that didn't drop us into recovery. I'll disable the recommendation in the other issue and take a look at it. |
300abc0
to
8749d1f
Compare
@matthewbauer I've updated it to remove each account with dseditgroup before the change and re-add it after. I have force-pushed this change, but won't have a chance to test the whole script again until later today. Updates:
If you've already run this script (and have not reverted it) you should be able to fix group membership with these commands
|
8749d1f
to
d851aaa
Compare
I'll also update the main post, but just wanted to mention here that I've added some extra evidence that this will be an ongoing problem:
|
If you've been affected by this and want to report it to Apple, you can refer to the feedback I filed last night: FB8997501 |
I ran the However, this system uses |
d851aaa
to
0431cf6
Compare
I've rebased to re-run tests now that #4577 is merged. macOS install: https://github.com/abathur/nix/runs/2088031573 |
Does not happen here. Users stay _nixbldXX after darwin-rebuild switch on my systems. |
It's been fixed in nix-darwin since I wrote that comment on Feb 9. :) |
@abathur should we backport this to 2.3? |
@domenkozar I think so. |
Pushed to |
I've been able to confirm the update problem reported in #4531 on a spare system. This PR will:
Background
I'm enough of a masochist to run clean-install + upgrade cycles until I have a vague sense of the problem:
I get the impression, because of the report timing, that this is something new after Big Sur 11.0 and probably new in 11.2.sysadminctl -addUser
flags ([-GID <group ID>]
,[-roleAccount]
) and this usage note*Role accounts require name starting with _ and UID in 200-400 range
.nixbld#
usernames to_nixbld#
and use UIDs in the 200-400 range.Open questions
sysctl -n hw.ncpu
orsysctl -n hw.physicalcpu
?)