-
Notifications
You must be signed in to change notification settings - Fork 168
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
cmdlib.sh: Switch to using OSTree layers for overlay/ #555
Conversation
It's an archive repo, so we don't need privs to commit to it. Also use the `${tmprepo}` var.
Use `-n` so that the OSTree checksum that `ostree commit` prints out is on the same line.
BTW, this totally sidesteps how/whether the lockfile should interact with OSTree layers. And I think there is definitely a use case there for it to be supported in rpm-ostree in some way. But for our purposes I think using a lockfile for the overlay isn't necessary because it's already tied to the specific git commit we're building on. |
will try this out! |
So now that we have OSTree layer capabilities in rpm-ostree (coreos/rpm-ostree#1830), I think it makes more sense overall to make the overlay an OSTree layer. The fact that it *is* an RPM, but differs from all the other RPMs in various ways will (and already has) come up multiple times when we talk about signing, changelogs, lockfiles, overrides, etc... (See [1] and [2] for some already filed issues). Switching to an OSTree layer sidesteps many of those issues. Of course, we do lose some things from moving away from RPM: 1. it's harder to determine from where the overlay files come from on a host system (see [3] related to this) 2. invisible to `rpm-ostree db diff` (but then again, the diff we currently get isn't helpful) 3. not possible to issue an advisory for it to be consumed like the rest of the advisories (though with the current approach, making use of this without going through Bodhi would've required some non-trivial amount of work too) Overall though, I think those are things we could (and should strive to) fix in rpm-ostree rather than avoiding layers entirely. [1] coreos#544 [2] coreos#553 (comment) [3] coreos/rpm-ostree#1789
That way the commit checksum itself is completely stable when recomposing on the same git commit (modulo a dirty directory, but then the checksum will change anyway). Doesn't really matter for now (except for the good feelsies of always getting the same commit hash between invocations), though it will if we want to start recording more information about constituent layers in the compose.
0416c89
to
8ce6b1d
Compare
ok I think this mostly looks good. one question about the underlying layers feature and one about the way this is implemented:
of course |
Yup, will still work. RPM-OSTree knows to look at the content checksum, not the commit checksum itself (though note in this patch, you'll also get exactly the same commit checksum each time for a given
Yeah, we should probably open an issue about the UX around layers. |
|
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.
LGTM
So now that we have OSTree layer capabilities in rpm-ostree
(coreos/rpm-ostree#1830), I think it
makes more sense overall to make the overlay an OSTree layer.
The fact that it is an RPM, but differs from all the other RPMs in
various ways will (and already has) come up multiple times when we talk
about signing, changelogs, lockfiles, overrides, etc... (See [1] and [2]
for some already filed issues). Switching to an OSTree layer sidesteps
many of those issues.
Of course, we do lose some things from moving away from RPM:
host system (see [3] related to this)
rpm-ostree db diff
(but then again, the diff wecurrently get isn't helpful)
of the advisories (though with the current approach, making use of
this without going through Bodhi would've required some non-trivial
amount of work too)
Overall though, I think those are things we could (and should strive to)
fix in rpm-ostree rather than avoiding layers entirely.
[1] #544
[2] #553 (comment)
[3] coreos/rpm-ostree#1789