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.

Bug 2134630

Summary: backport support for embedded container whiteouts
Product: Red Hat Enterprise Linux 8 Reporter: Colin Walters <walters>
Component: rpm-ostreeAssignee: Colin Walters <walters>
Status: CLOSED ERRATA QA Contact: HuijingHei <hhei>
Severity: unspecified Docs Contact:
Priority: urgent    
Version: 8.7CC: aaradhak, bgilbert, dornelas, ggiguash, hhei, qzhang
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpm-ostree-2022.10.99.g0049dbdd-3.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2137905 (view as bug list) Environment:
Last Closed: 2023-05-16 08:24:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2137905    

Description Colin Walters 2022-10-13 19:48:26 UTC
Backport https://github.com/coreos/rpm-ostree/pull/4088

Comment 1 HuijingHei 2022-10-19 13:33:09 UTC
Upgrade rpm-ostree and ostree, do the following tests, run `rpm-ostree compose commit` with character device with 0/0 device number works. Any review and suggestions are appreciated, thanks!

1) Upgrade ostree and rpm-ostree, run `whiteout.sh` to prepare data
[core@cosa-devsh ~]$ rpm -q ostree rpm-ostree
ostree-2022.2-6.el8.x86_64
rpm-ostree-2022.10.99.g0049dbdd-3.el8.x86_64

$ cat whiteout.sh

#!/bin/bash
mkdir test
pushd test
sudo rm -rf mkdir cache sysroot
cat > manifest.yaml << 'EOF'
ref: foo
boot-location: modules
releasever: 36
packages:
  - bash
  - rpm
  - coreutils
  - selinux-policy-targeted
  - kernel
  - ostree
repos:
  - fedora  # Intentially using frozen GA repo
EOF

cat > fedora.repo << 'EOF'
[fedora]
name=Fedora $releasever - $basearch
baseurl=https://dl.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
        https://dl.fedoraproject.org/pub/fedora-secondary/releases/$releasever/Everything/$basearch/os/
enabled=1
repo_gpgcheck=0
type=rpm
gpgcheck=0
skip_if_unavailable=False
EOF

mkdir cache sysroot
ostree --repo=build-repo init --mode=archive

sudo rpm-ostree compose install --unified-core --cachedir=cache --repo=build-repo manifest.yaml ./sysroot

sudo mknod -m 000 sysroot/rootfs/usr/share/foowhiteout c 0 0
sudo touch sysroot/rootfs/usr/share/rpm-ostree-composetest-split.txt
sudo rpm-ostree compose postprocess ./sysroot/rootfs manifest.yaml

$ sh -x whiteout.sh
......
+ sudo rpm-ostree compose postprocess ./sysroot/rootfs manifest.yaml
Processed 1 embedded whiteouts

3) Run `rpm-ostree compose commit` and check
[core@cosa-devsh test]$ sudo rpm-ostree compose commit --repo=build-repo manifest.yaml ./sysroot/rootfs

[core@cosa-devsh test]$ ostree --repo=build-repo ls foo /usr/bin/bash
-00755 0 0 1390064 /usr/bin/bash
[core@cosa-devsh test]$ ostree --repo=build-repo ls foo /usr/share/rpm-ostree-composetest-split.txt
-00644 0 0      0 /usr/share/rpm-ostree-composetest-split.txt
[core@cosa-devsh test]$ ostree --repo=build-repo ls foo /usr/share/.ostree-wh.foowhiteout
-00000 0 0      0 /usr/share/.ostree-wh.foowhiteout

Comment 2 HuijingHei 2022-10-21 13:31:22 UTC
Set status to Verified: Tested according to comment 1

Comment 8 HuijingHei 2022-10-28 07:57:28 UTC
Verify passed with rpm-ostree-2022.10.99.g0049dbdd-3.el8.x86_64 on RHCOS 412.86.202210280001-0

Comment 10 errata-xmlrpc 2023-05-16 08:24:00 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 (rpm-ostree 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/RHBA-2023:2759