RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2075429 - osbuild-composer fails to generate an image when osbuild-selinux is triggered as a dependency
Summary: osbuild-composer fails to generate an image when osbuild-selinux is triggered...
Keywords:
Status: CLOSED DUPLICATE of bug 2065734
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: osbuild-composer
Version: 8.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Image Builder team
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-14 08:13 UTC by Christophe Besson
Modified: 2022-04-14 12:26 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-14 12:25:53 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-118945 0 None None None 2022-04-14 08:15:58 UTC

Description Christophe Besson 2022-04-14 08:13:03 UTC
Description of problem:
The org.osbuild.rpm stage fails when osbuild-selinux is triggered as a dependency. 

Version-Release number of selected component (if applicable):
osbuild-composer-33.2-1.el8
osbuild-selinux-35-3.el8
osbuild-35-3.el8

How reproducible:
Always

Steps to Reproduce:
1. Create and push the below blueprint

name = "imagebuilder"
description = "An image with Image Builder already installed"
version = "0.0.2"
modules = []
groups = []
distro = ""

[[packages]]
name = "osbuild-composer"

[[packages]]
name = "composer-cli"

[customizations]
hostname = "imagebuilder.local"

[customizations.services]
enabled = ["osbuild-composer.socket"]

2. Run a compose with this blueprint


Actual results:
Apr 14 09:43:18 localhost.localdomain osbuild-worker[311296]: Running 'osbuild' job e562201b-e99c-4eb5-8c45-830cc4baa88c
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58 Build stages results:
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58 Stages results:
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58 build:0-org.osbuild.rpm  success
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58 build:1-org.osbuild.selinux  success
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58 os:0-org.osbuild.rpm failure:
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58         [/usr/lib/tmpfiles.d/journal-nocow.conf:26] Failed to resolve specifier: uninitialized /etc detected, skipping
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58         All rules containing unresolvable specifiers will be skipped.
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58         Failed to create file /sys/fs/selinux/checkreqprot: Read-only file system
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58         imported gpg key
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58         creating a fake machine id
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58         error: Failed dependencies:
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58                 (osbuild-selinux if selinux-policy-targeted) is needed by osbuild-35-3.el8.noarch
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58         Traceback (most recent call last):
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58           File "/run/osbuild/bin/org.osbuild.rpm", line 312, in <module>
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58             r = main(args["tree"], args["inputs"], args["options"])
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58           File "/run/osbuild/bin/org.osbuild.rpm", line 285, in main
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58             ], cwd=pkgpath, check=True)
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58           File "/usr/lib64/python3.6/subprocess.py", line 438, in run
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58             output=stdout, stderr=stderr)
Apr 14 09:43:58 localhost.localdomain osbuild-worker[311296]: 2022/04/14 09:43:58         subprocess.CalledProcessError: Command '['rpm', '--verbose', '--root', '/run/osbuild/tree', '--define', '_pkgverify_level none', '--install', '/tmp/manifest.5nogichc']' returned non-zero exit status 254.

Additional info:
- the depsolve shows osbuild-selinux but not selinux-policy-targeted in the package list
- WORKAROUND: adding osbuild-selinux as a package in the blueprint.
- Following this blog reproduces the issue: https://www.redhat.com/en/blog/build-rhel-images-azure-image-builder

Comment 1 Christian Kellner 2022-04-14 12:25:53 UTC
This is a known limitation in the way we currently dep-solve packages provided via blueprints. We are actively working on this. Sorry for the inconvenience. A workaround for now is to include `selinux-policy-targeted` in the blueprint.

*** This bug has been marked as a duplicate of bug 2065734 ***


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