Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[RFC 0125]: Use an intermediary representation (bootspec) for bootloader backends #125
[RFC 0125]: Use an intermediary representation (bootspec) for bootloader backends #125
Changes from 1 commit
36557a4
2157195
cd81aa8
1921a9f
bcc171d
aa2253b
33eff40
739b6a1
2f239c9
1085fef
5ee0cc5
a12f772
70976d0
d7fb344
d5fd9e0
7befc1f
427942c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
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.
@roberth Could you clarify what you envision by a "non derivation metadata facility"? Would that be a generalization of bootspec so that bootspec would be only a special case of it? (my interpretation)
We discussed it during our meeting, but I think we had some different interpretations of your comments.
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.
By adding a field such as the git revision or last modified date, you're creating new generations that are otherwise identical to preceding ones when you make changes to unrelated files. My open question aims to prevent that from happening.
(The need for this came up in NixOS/nixpkgs#179772)
Possibly.
I suppose the metadata can be in a derivation, but this derivation should not be used for determining the equivalence of generations. Assuming we keep using the output path of
system.build.toplevel
for the purpose of generation equivalence, the metadata could be put in a separate derivation that isn't part ofsystem.build.toplevel
.There's a number of ways you could implement this sort of thing.
Making
toplevel
not top level isn't great. I could rephrase this asThis allows other solutions such as a "fingerprint" field containing a hash of the essential values so that duplicate generations can be detected by the bootloader menu generator (or other tool that benefits from a "shortcutting" behavior).
Implementation idea (not necessarily part of bootspec; more of a NixOS implementation detail.
fingerprint
existence and type (string) is bootspec though.)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.
In other discussion I read that the
meta
field might be used as the extension point for arbitrary user data or arbitrary bootloader-specific data. So there's two independent characteristics for each potential bootspec field:meta
in the specmeta
Now what is
???
? Some ideas to bikeshedextension-data
. Easy to write a schema for this if you want.x-
. Allows any object to be extended, instead of only one or two dedicated locations. Might want to preprocess before doing schema validation if that's something you want to do.