osbuild / osbuild-composer

An HTTP service for building bootable OS images.
https://www.osbuild.org
Apache License 2.0
158 stars 108 forks source link

RFE: ability to restrict sources used during a compose #4298

Open miabbott opened 1 month ago

miabbott commented 1 month ago

If a user has multiple sources defined when doing composes, osbuild will try to do depsolving using all of the sources regardless of the distro specified in the blueprint or the type of compose. This can lead to undesirable results if multiple sources contain multiple versions of RPMs.

The current method to avoid using undesired sources is to remove them from osbuild, complete the compose you want to do, and then re-add the removed sources at a later time.

For instances of osbuild that support multiple distro versions and multiple composes requiring additional sources, it could be useful to be able to restrict which sources are being used during the compose of an artifact. Perhaps at the blueprint level?

achilleas-k commented 1 month ago

Thanks for the write-up. I agree, this would be a useful feature, but this would have to happen in osbuild-composer, so I'll move it there.

achilleas-k commented 1 month ago

There are some plans floating around for dropping the internal management of these things (sources and blueprints) from osbuild-composer entirely and instead having the user pass them on the command line when starting a compose (something like composer-cli compose start --blueprint ./bp.toml --source ./myrepo.toml --source ./another.toml qcow2).

If we end up doing that, it solves this problem too.