Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Podman is not able to mount devices for `podman build` however it does so for `podman run`. In OSBS 2.0 we need `podman-remote build` to be able to mount devices for supporting flatpak builds.
We filed https://github.com/containers/buildah/issues/4002 to get the problem fix and it is fixed upstream we need to get it backported to RHEL 8 so that we can use it for our builders that run on RHEL 8.
Version-Release number of selected component (if applicable):
podman-3.4.2
How reproducible:
Always
Steps to Reproduce:
1.Try `podman build --no-cache --device=/dev/null:/var/tmp/flatpak-build/dev/null`
2.
3.
Actual results:
Renaming devices is not allowed for rootless containers. Device not available at `/var/tmp/flatpak-build/dev/null`
Expected results:
Device available at `/var/tmp/flatpak-build/dev/null`
Additional info:
Previous we built using docker which had higher privileges and we were able to `cp -a /dev/null /var/tmp/flatpak-build/dev/null` but in rootless podman it's not possible so we need to mount it.
We also tried mounting the devices using ``podman build --no-cache --volume=/dev/null:/var/tmp/flatpak-build/dev/null` but that doesn't work for use since we build for different architectures using `podman-remote` and `podman-remote` doesn't do anything for `podman-remote --remote --connection podman-connection build --no-cache --volume=/dev/null:/var/tmp/flatpak-build/dev/null`.
This will be fixed in Podman v4.1.1, which will be available in RHEL 8.6.0.2 in early August. @dornelas thoughts on doing a backport? At this point with RHEL 8.5, I think we could only do a hotfix and, if so, we'd need a strong business reason for doing so.
Can reproduce podman-4.1.0-3.module+el8.7.0+15271+4011683a.x86_64:
[test@kvm-04-guest03 ~]$ podman build --no-cache --device=/dev/null:/var/tmp/flatpak-build/dev/null .
Error: error creating build executor: Renaming device /dev/null to /var/tmp/flatpak-build/dev/null is not supported in rootless containers
And test with podman-4.1.1-6.module+el8.7.0+15895+a6753917.x86_64. It works as expected. So set this to verified. Details:
[test@dell-per430-27 ~]$ podman build --no-cache --device=/dev/null:/var/tmp/flatpak-build/dev/null .
STEP 1/3: FROM quay.io/libpod/busybox
STEP 2/3: RUN ls -l /var/tmp/flatpak-build/dev/
total 0
crw-rw-rw- 1 nobody nobody 1, 3 Jul 19 12:23 null
--> 56ca0e7f4d3
STEP 3/3: RUN echo hello > /var/tmp/flatpak-build/dev/null
COMMIT
--> 5cbc2e31b92
5cbc2e31b928401445190a7af44777c55b1988235f284f276415deee5449331d
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 (Moderate: container-tools:rhel8 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:7457