-
Notifications
You must be signed in to change notification settings - Fork 107
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
be buildable with f34 cosa somehow, or bust #552
be buildable with f34 cosa somehow, or bust #552
Comments
I was trying to do an RHCOS build using a custom rpm-ostree build in a f34 container without having used `--enable-sqlite-rpmdb-default`. This immediately failed trying to load the host rpmdb. Now, in practice we don't care about this problem, and it doesn't solve openshift/os#552 because the f34 rpm still can't write bdb and so just dies later. But, I think this is the right thing to do - we shouldn't pollute the sack with the host (container) rpmdb in the `compose tree` case.
jlebon correctly found https://bugzilla.redhat.com/show_bug.cgi?id=1938928 but I lost track of that BZ in the PRs/issues here. I commented there, I think rpm sqlite readonly support is enough. Let's leave this open to track work doing the conversion. |
Ultimately the conversion code I think should land in rpm-ostree, i.e. all that happens here is we set |
Yeah, I think that's the easiest approach, even if it's not great. One note is that the RHBZ is planned for 8.5, so we might have to hold until RHCOS rebases. |
I was trying to do an RHCOS build using a custom rpm-ostree build in a f34 container without having used `--enable-sqlite-rpmdb-default`. This immediately failed trying to load the host rpmdb. Now, in practice we don't care about this problem, and it doesn't solve openshift/os#552 because the f34 rpm still can't write bdb and so just dies later. But, I think this is the right thing to do - we shouldn't pollute the sack with the host (container) rpmdb in the `compose tree` case.
Do we have a path forward on this issue? 4.8 is reaching code freeze soon, which means we would just start using Could we change the internal
|
The conversation above covers one where rpm-ostree learns how to do this conversion.
That's not long term sustainable though because we're mostly focusing on F34+ for e.g. rpm-ostree builds and cosa development. If we have to fork in that way, the other option is to try again to create a rhel8 based coreos assembler plus cherry picked newer versions of things. But, I think we should chase down the rpm-ostree approach above first. |
In Fedora 34+ librpm can no longer write bdb, so we fail to build RHCOS. But the error for this is obscure. Make this an obvious, up front error. This relies on the implicit "sqlite default == fedora34+ == rpm without bdb write". xref openshift/os#552 xref https://bugzilla.redhat.com/show_bug.cgi?id=1938928
Since that's what it needs to be. There is read-only sqlite support queued in https://bugzilla.redhat.com/show_bug.cgi?id=1938928 But we need read-write for package layering etc. xref openshift#552 This is effectively a no-op right now because the default backend in F33 rpm-ostree is bdb, but by setting this explicitly we'll get a useful error message after coreos/rpm-ostree#2978 And then ideally we teach rpm-ostree how to actually deal with this.
I'm looking at this actively, and am testing a hack for converting the rpmdb as part of postprocessing, but this may then trigger further issues around things like Ahh whee and it needs to happen before the bootupd integration runs which also reads the rpmdb. |
Since that's what it needs to be. There is read-only sqlite support queued in https://bugzilla.redhat.com/show_bug.cgi?id=1938928 But we need read-write for package layering etc. xref openshift#552 This is effectively a no-op right now because the default backend in F33 rpm-ostree is bdb, but by setting this explicitly we'll get a useful error message after coreos/rpm-ostree#2978 And then ideally we teach rpm-ostree how to actually deal with this.
In Fedora 34+ librpm can no longer write bdb, so we fail to build RHCOS. But the error for this is obscure. Make this an obvious, up front error. This relies on the implicit "sqlite default == fedora34+ == rpm without bdb write". xref openshift/os#552 xref https://bugzilla.redhat.com/show_bug.cgi?id=1938928
This is a key bit to resolve openshift/os#552 (But we'll close that issue when the PR to use cosa master lands) We want to support "cross building" where e.g. a Fedora 34+ host (or container) is generating a RHEL8 ostree commit. The status quo right now is that F34+ librpm supports read/write of sqlite and just reading bdb. And rhel8 librpm only supports read/write of bdb. To deal with this, detect if the input manifest specifies an rpmdb format (namely `bdb`) that is not the current default (namely `sqlite` in Fedora 34+/RHEL9+) and if so, fork of the *host* rpm to export the database we wrote back into memory, and then pass that down to a bwrap container with the *target* rootfs `rpm`.
This is a key bit to resolve openshift/os#552 (But we'll close that issue when the PR to use cosa master lands) We want to support "cross building" where e.g. a Fedora 34+ host (or container) is generating a RHEL8 ostree commit. The status quo right now is that F34+ librpm supports read/write of sqlite and just reading bdb. And rhel8 librpm only supports read/write of bdb. To deal with this, detect if the input manifest specifies an rpmdb format (namely `bdb`) that is not the current default (namely `sqlite` in Fedora 34+/RHEL9+) and if so, fork of the *host* rpm to export the database we wrote back into memory, and then pass that down to a bwrap container with the *target* rootfs `rpm`.
🎉 this works for me coreos/rpm-ostree#2990 |
This is a key bit to resolve openshift/os#552 (But we'll close that issue when the PR to use cosa master lands) We want to support "cross building" where e.g. a Fedora 34+ host (or container) is generating a RHEL8 ostree commit. The status quo right now is that F34+ librpm supports read/write of sqlite and just reading bdb. And rhel8 librpm only supports read/write of bdb. To deal with this, detect if the input manifest specifies an rpmdb format (namely `bdb`) that is not the current default (namely `sqlite` in Fedora 34+/RHEL9+) and if so, fork of the *host* rpm to export the database we wrote back into memory, and then pass that down to a bwrap container with the *target* rootfs `rpm`.
This is a key bit to resolve openshift/os#552 (But we'll close that issue when the PR to use cosa master lands) We want to support "cross building" where e.g. a Fedora 34+ host (or container) is generating a RHEL8 ostree commit. The status quo right now is that F34+ librpm supports read/write of sqlite and just reading bdb. And rhel8 librpm only supports read/write of bdb. To deal with this, detect if the input manifest specifies an rpmdb format (namely `bdb`) that is not the current default (namely `sqlite` in Fedora 34+/RHEL9+) and if so, fork of the *host* rpm to export the database we wrote back into memory, and then pass that down to a bwrap container with the *target* rootfs `rpm`.
Latest rpm-ostree release with coreos/rpm-ostree#2990 is in the continuous tag. Rebuild to get it into cosa. Closes: openshift/os#552
Nice work @cgwalters! Confirmed I got a successful RHCOS compose using latest rpm-ostree release. So all that's left to do now is: coreos/coreos-assembler#2302 |
Latest rpm-ostree release with coreos/rpm-ostree#2990 is in the continuous tag. Rebuild to get it into cosa. Closes: openshift/os#552
Latest rpm-ostree release with coreos/rpm-ostree#2990 is in the continuous tag. Rebuild to get it into cosa. Closes: openshift/os#552
Followup to #547 and #548
Right now we're in an ugly situation where because f34 rpm dropped support for bdb, yet rhel8 only works with bdb we cannot use f34 to build rhcos(8).
Options:
rhcos-4.8
cosa-f33 branch for a while (6 months?) and see if the rpm maintainers end up doing something here (e.g. sqlite support in rhel8)./usr/lib/rpm/rpm-sqlite2bdb --dbin /path/to/srcdb --dbout /path/to/destdb
in rhel8?Or something else?
The text was updated successfully, but these errors were encountered: