Bug 2065734 - Build fails for packages in blueprint that contain conditional dependencies
Summary: Build fails for packages in blueprint that contain conditional dependencies
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: osbuild-composer
Version: 8.5
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Image Builder team
QA Contact: Release Test Team
Eliane Ramos Pereira
URL:
Whiteboard:
: 2075429 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-18 15:26 UTC by Christian Heimes
Modified: 2022-11-08 10:28 UTC (History)
10 users (show)

Fixed In Version: osbuild-composer-51-1.el8
Doc Type: Bug Fix
Doc Text:
.Images now build successfully for packages in blueprint that contain conditional dependencies Previously, when using the web console to customize a blueprint with packages that contained conditional dependencies, such as `ipa-client`, `cockpit`, `podman`, would cause the build to fail because of the missing dependencies. As a consequence, the conditional dependency was not met during the dep-solve packages. This issue is fixed now, and the builds will no longer fail when dep-solving conditional dependencies.
Clone Of:
Environment:
Last Closed: 2022-11-08 09:37:27 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github osbuild osbuild-composer issues 2125 0 None closed distros: merge blueprint & os package set before depsolving instead of after? 2022-06-30 06:47:16 UTC
Github osbuild osbuild-composer pull 2568 0 None Merged ๐Ÿ“ฆ๐Ÿ”—๐Ÿ“ฆ Introduce chain dependency solving 2022-05-09 07:08:08 UTC
Red Hat Issue Tracker RHELPLAN-116134 0 None None None 2022-03-18 15:34:31 UTC
Red Hat Product Errata RHSA-2022:7548 0 None None None 2022-11-08 09:38:01 UTC

Description Christian Heimes 2022-03-18 15:26:38 UTC
Description of problem:
I'm unable to create an image with package "ipa-client" with image builder. The build process always fails with a missing dependency. The problem is reproducible in on the hosted beta console (https://console.redhat.com/beta/insights/image-builder) as well as a self-hosted Cockpit instance in a RHEL 8.5 VM on my computer.

Version-Release number of selected component (if applicable):
osbuild-ostree-35-3.el8.noarch
osbuild-composer-33.2-1.el8.x86_64
cockpit-composer-31.1-1.el8.noarch
ostree-2021.3-2.el8_5.x86_64
ipa-client-4.9.6-6.module+el8.5.0+12661+bab6f12d

How reproducible:
always

Steps to Reproduce:
1. Create a new RHEL 8 image in Console / Cockpit's Image Builder app
2. Add "ipa-client" package

Actual results:
Build process fails with error message

error: Failed dependencies:
	(ipa-selinux if selinux-policy-targeted) is needed by ipa-common-4.9.6-6.module+el8.5.0+12661+bab6f12d.noarch

Expected results:
Image builder should succeed

Additional info:
If I add both "ipa-selinux" and "ipa-client" as packages, then the build process finishes successfully. This leads me to the assumption that osbuild or ostree do not understand the "Requires: (ipa-selinux if selinux-policy-targeted)" syntax correctly.

https://gitlab.com/redhat/centos-stream/rpms/ipa/-/blob/c9s/freeipa.spec#L892

Comment 1 Christian Kellner 2022-03-18 15:50:08 UTC
This is a known limitation of the way we currently dep-solve packages and, quite ironically, happens also for the "osbuild" package.

Comment 2 Christian Kellner 2022-04-14 12:25:53 UTC
*** Bug 2075429 has been marked as a duplicate of this bug. ***

Comment 3 Christian Kellner 2022-04-14 12:37:08 UTC
To give a bit more details:

The build will fail for packages that contain conditionals like `(ipa-selinux if selinux-policy-targeted)` if the "condition" (`selinux-policy-targeted`) is NOT explicitly mentioned in the blueprint but IS contained in the final image; because in this case the conditional dependency (`ipa-selinux`) will not be in the dep-solved package set since the condition is not met, but later while building the image, the condition is met since the condition is now present but we are missing the conditional dependency.

We are actively working on a different way to dep-solve to avoid this scenario.

Comment 4 Tomรกลก Hozza 2022-05-09 07:08:09 UTC
This issue is already fixed in the latest upstream release of osbuild-composer and should be fixed in the upcoming release of RHEL (8.7 and 9.1). The issue is already resolved in the Image Builder Service.

Comment 9 errata-xmlrpc 2022-11-08 09:37:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Low: Image Builder security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:7548


Note You need to log in before you can comment on or make changes to this bug.