-
Notifications
You must be signed in to change notification settings - Fork 58
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
repair: add sequoia
subcommand that can migrate build users to the new 351+ UID range
#1143
Conversation
171dd54
to
8afea5b
Compare
sequoia
subcommand that can migrate build users to the new 351+ UID rangesequoia
subcommand that can migrate build users to the new 351+ UID range
This is useful for when you don't care if it's been completed or not and want to rerun the commands. Especially useful on macOS, where `dscl . -create` is idempotent.
8afea5b
to
ff6cdb5
Compare
…new 351+ UID range
ff6cdb5
to
2d2b81b
Compare
Just ran this before updating to Sequoia, worked perfectly!
|
1c21fea
to
815388d
Compare
); | ||
// NOTE(cole-h): this round-trip is kinda jank... but Action is not | ||
// object-safe, and I can't think of any other way to get the | ||
// concrete `CreateUsersAndGroups` type out of a `Box<dyn Action>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw, from downstream review: https://doc.rust-lang.org/std/boxed/struct.Box.html#method.downcast-2
But this is not a big deal honestly, assuming that our roundtripping isn't busted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that, but couldn't get it to work 🤷
Maybe because it was originally a Box<dyn Action>
and not CreateUsersAndGroups
(i.e. it didn't go CreateUsersAndGroups
-> Box<dyn Action>
, but we parsed the receipt into a structure that only has Vec<Box<dyn Action>>
, so it loses the original type information)?
If you can get it to work with that, I'd love to see the diff, because round-tripping isn't the most elegant... Maybe I overlooked something obvious!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you need an Any bound, but the way to actually make all this work is unnecessarily arcane (i don't remember if it works as a supertrait or if you have to do it a different way). I'll have to consult what i did in clipper with dyn stuff and have a go if i remember to get around to it.
Description
Closes #1001.
Closes #1115.
Closes #1092.
Checklist
cargo fmt
nix build
nix flake check
Validating with
install.determinate.systems
If a maintainer has added the
upload to s3
label to this PR, it will become available for installation viainstall.determinate.systems
:I still have some more testing to do, but so far I'm mostly satisfied with how it works. Feel free to take a look (at the code or at actually using it).The default repair subcommand is still to repair the shell hooks (
nix-installer repair
==nix-installer repair hooks
). To run the sequoia repair process, runnix-installer repair sequoia
. If you're not on macOS 15 Sequoia yet, you'll want to pass the--move-existing-users
flag (this was a compromise with the goal of making subsequent runs of the repair do nothing when all the users still exist because we already migrated them before).