-
Notifications
You must be signed in to change notification settings - Fork 57
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
Check for *_LIKE properties in os-release if def file is not found #690
Comments
Thanks for reporting this issue - for context, could you please attach or paste the /etc/os-release ? We can/could implement the ID_LIKE fallback, the only complication is that our current code will not use distro definitions for older distros, e.g. if we have a "fedora-40" distro def but are asked to build a fedora-38 iso this will fail. The reasoning is mostly that old versions of the distro may not have the packages yet that the distr-definition has. So far this is fine, but for "remixes" that declare they are like "fedora" but are on VERSION=7 this will become a problem. We could relax the rules but it would be nice to learn more about the typcial os-releae here. Alternatively we could just add a bunch of symlinks for known derrivates (which of course does not scale very well :/) |
i havent looked into it too closely, but it feels to me like *_LIKE could be reusable (if it wasnt designed that way) as a generic convention, so maybe the os-release could define heres my os-release: https://gitlab.com/RITlug/TigerOS/server/image/-/blob/main/os-release?ref_type=heads Ultimately i was thinking that fixing this issue would be primarily be useful to people building new images on top of fedora bootc images with versions 40 or higher, especially as bootc adoption grows, so i would expect this system to throw a similar error to what it does today if no def is present for either the ID + VERSION or ID_LIKE + VERSION_LIKE |
Having ID_LIKE + VERSION_LIKE would be ideal, if that is available it could be (relatively) easily added. AIUI VERSION_LIKE is not an official key though (not part of the os-release man page) - is it already used (pardon my ignorance on this)? If so I can look into adding this. |
There's a few things going on here, but I think the biggest is https://docs.fedoraproject.org/en-US/bootc/os-release-and-versions/ And yes today there is nothing like I think where things start to get a little complex is that of course one can trivially have three or more layers, and that's actually a reasonable thing to do sometimes! (think "fedora", "platform team", "app team"). But probably in most cases the "platform team" can own the version and "app team"'s version and metadata would show up somewhere else (e.g. in application images). It's probably worth trying to standardize That said there's a different fix here which is basically...bib IMO should aim to stop including operating system dependent sets of packages inside itself and fetch them from the OS instead. For example, we already have the lists of requirements for installing anaconda in the I have to emphasize the importance of this point because it naturally means that anyone who wants to configure/override things can do so by changing the dnf repos which is already a well known operation. And note today the "base os version" mapping here already goes by a well known channel in the |
You mean we should just install We still need to install build packages to create the ISO and some of those have distro-dependent names. Though this might not be true of the build packages for Anaconda in particular, so I'd have to look. |
I've been building a downstream image based on fedora 40 and, by changing the
ID
of my system, i now get this error when trying to build an anaconda iso.bootc-image-builder/bib/internal/distrodef/distrodef.go
Line 61 in cfb33fd
as suggested on matrix, I have added the
ID_LIKE
field to myos-release
file, and I think it would be helpful for bib to be able to check this during its process of trying to find a compatible def file for the OS.I strongly suspect this will make the process of creating derived images far easier. If this is something thats a desireable fix and a "good first issue" type of thing, I could maybe take a shot at an implementation
The text was updated successfully, but these errors were encountered: