Skip to content

boot: bring your own boot sequence#5470

Merged
joemfb merged 0 commit into
jb/wip-urthfrom
m/byo-boot-sequence
Apr 1, 2022
Merged

boot: bring your own boot sequence#5470
joemfb merged 0 commit into
jb/wip-urthfrom
m/byo-boot-sequence

Conversation

@Fang-

@Fang- Fang- commented Dec 3, 2021

Copy link
Copy Markdown
Member

Technically more like, "add your own boot sequence events".

This implements a set of boot arguments starting with --prop-, used for loading in "props", jamfiles that contain additional events for inclusion in the boot sequence. (The dream is to make this just be a single --prop or w/e that auto-distinguishes between filepaths, urls and names, but we're grounded in reality for now.)

Intended use cases here include specifying desks to install during boot, bootstrapping Azimuth state, custom userspace configuration, etc. Being able to do these separate from the pill brings some much-needed flexibility and lets us eradicate "multi-pills" from existence.

Main thing to look at is the definition of $prop in base-dev's /lib/pill and the way those nouns get handled in mars.c.

Based on and targeting jb/wip-urth for @joemfb's convenience.
Includes #5428 because we want long opts for this.
Includes #5389 because that should be updated to make use of the affordances this provides. Draft mode until /app/autopill improvements make their way in, but the vere part here should be ready for its first review.

@Fang- Fang- requested a review from joemfb December 3, 2021 23:47
@Fang- Fang- changed the base branch from jb/wip-urth to master December 16, 2021 16:37
@Fang- Fang- changed the base branch from master to jb/wip-urth December 16, 2021 16:37
@Fang- Fang- marked this pull request as ready for review December 16, 2021 16:37
@Fang- Fang- requested a review from philipcmonk December 16, 2021 16:38
@Fang-

Fang- commented Dec 16, 2021

Copy link
Copy Markdown
Member Author

This now includes an updated pkg/autoprop for auto-generating pill and prop files. Thanks to both @joemfb and @philipcmonk for the clay pointers. Please take a look, this should be ready for full review now.

(I'll look into CI failure in a bit.)

@Fang- Fang- force-pushed the m/byo-boot-sequence branch from eb49a07 to 9e2a00f Compare January 6, 2022 16:46

@joemfb joemfb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sorry for the absurd delay @Fang-!

This all looks reasonable. I've picked some nits the C changes, and noted a couple refcounting issues. I've only minimally reviewed the hoon so far, mostly to highlight some questions about the new move/message types that have been introduced.

We'll need to go over which ovums are included in the pill by default, and which (if any) props are downloaded by default. I suspect will want a set of default URL props, and a commandline flag to turn them off.

Comment thread pkg/arvo/sys/lull.hoon
[%park des=desk yok=yoki ran=rang] :: synchronous commit
[%perm des=desk pax=path rit=rite] :: change permissions
[%pork ~] :: resume commit
[%prep lat=(map lobe blob)] :: prime blob store

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I wonder if this should just be (list blob) so that %clay will recompute hashes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Discussed this with @philipcmonk, just leaving it as a map for now.

Comment thread pkg/urbit/vere/king.c Outdated
Comment thread pkg/urbit/vere/king.c Outdated
u3_atom jam = _king_get_atom(url_c);
mor = u3nc(u3ke_cue(jam), mor);
c3_free(url_c);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If we're going to be requesting several more files over the network, it'll probably be important to flesh out _king_get_atom() with retry logic, better error handling, &c.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I added some dumb retry logic. Not sure what else you were imagining with better error handling here. Probably not worth following redirects or w/e?

Comment thread pkg/urbit/worker/mars.c Outdated
Comment thread pkg/urbit/worker/mars.c Outdated
Comment thread pkg/urbit/worker/mars.c Outdated
Comment thread pkg/urbit/worker/mars.c
Comment thread pkg/base-dev/lib/pill.hoon Outdated
@Fang- Fang- changed the base branch from jb/wip-urth to jb/urth February 9, 2022 23:37
@Fang- Fang- changed the base branch from jb/urth to jb/wip-urth February 9, 2022 23:37
Comment thread pkg/urbit/daemon/main.c Outdated

@joemfb joemfb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There's a couple things here I may still want to tweak, especially the behavior around default props. But I'm going to merge this out of band (don't worry about the conflicts), so I'll address those elsewhere.

Thanks for pulling this together!

@joemfb joemfb merged commit 1401189 into jb/wip-urth Apr 1, 2022
@joemfb joemfb deleted the m/byo-boot-sequence branch April 1, 2022 14:28
Fang- added a commit to urbit/vere that referenced this pull request Oct 23, 2023
Adds support for --prop-file, --prop-url and --prop-name, which let one
augment the boot sequence of a ship with additional events.

Back-ports the vere changes from urbit/urbit#5470 onto current vere. See
that for additional details/history. This is a mostly straightforward,
copy-paste port of the changes from that original PR, with the following
exceptions:
- Boot sequence construction now happens in _pier_boot_make.
- We don't modify the way the default boot sequence is acquired (yet).

We will want to follow up on the latter, eventually.

The %autoprop "prop builder" that was included in #5470 should still
operate fine and be useful for automating keeping certain kinds of props
up to date. (Save for minimal kelvin compatability disrepair it has
fallen into due to the flow of time.)
pkova added a commit to urbit/vere that referenced this pull request Mar 8, 2024
Adds support for `--prop-file`, `--prop-url` and `--prop-name`, which
let one augment the boot sequence of a ship with additional events.

Back-ports the vere changes from urbit/urbit#5470 onto current vere. See
that for additional details/history. This is a mostly straightforward,
copy-paste port of the changes from that original PR, with the following
exceptions:
- Boot sequence construction now happens in `_pier_boot_make`.
- We don't modify the way the default boot sequence is acquired (yet).

We will want to follow up on the latter, eventually. I've left `TODO`s
in the relevant places. Figured it might be better to be less disruptive
to release processes initially. cc @pkova

The %autoprop "prop builder" that was included in urbit/urbit#5470
should still operate fine and be useful for automatically keeping
certain kinds of props up to date. (Save for minimal kelvin
compatibility disrepair it has fallen into due to the flow of time.)
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.

2 participants