Bug 1959874

Summary: Rebase rpm-ostree to latest upstream release 2021.5 (includes fixes for libsolv 0.7.17 using %_dbpath)
Product: Red Hat Enterprise Linux 8 Reporter: Xiaofeng Wang <xiaofwan>
Component: rpm-ostreeAssignee: Luca BRUNO <lucab>
Status: CLOSED ERRATA QA Contact: Micah Abbott <miabbott>
Severity: unspecified Docs Contact:
Priority: high    
Version: 8.5CC: akoutsou, dornelas, elpereir, jlebon, miabbott, mnguyen, perobins, tgunders, xiaofwan, yih
Target Milestone: pre-dev-freezeKeywords: Rebase, Triaged
Target Release: 8.5Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpm-ostree-2021.5-1.el8 Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
New release, see https://github.com/coreos/rpm-ostree/releases/tag/v2021.5.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 18:46:52 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:

Description Xiaofeng Wang 2021-05-12 13:52:06 UTC
Description of problem:
Install a rpm package failed with "rpm-ostree install http://file-server-virt-qe-3rd.apps.ocp4.prod.psi.redhat.com/greenboot-failing-unit-1.0-1.el8.noarch.rpm".
Error log: "error: Sanity-checking final rpmdb: Didn't find package 'greenboot-failing-unit-1.0-1.el8.noarch"

This issue looks the same as issue https://github.com/coreos/rpm-ostree/pull/2490
Why does this issue only happen on RHEL 8.5 and not on RHEL 8.4?
RHEL 8.5 uses libsolv-0.7.17-2 which includes "check %_dbpath macro in rpmdb code" fix(https://src.osci.redhat.com/rpms/libsolv/blob/rhel-8.5.0/f/libsolv.spec), but RHEL 8.4 uses libsolv-0.7.16 which does not include that fix.

And "check %_dbpath macro in rpmdb code" fix in libsolv-0.7.17-2 needs rpm-ostree fix "core: Set _dbpath back to /usr/share/rpm after writing rpmdb" which is not included in rpm-ostree-2020.7 which is used by RHEL 8.5.

Version-Release number of selected component (if applicable):

libsolv-0.7.17-2.el8.x86_64

ostree-libs-2020.7-4.el8.x86_64
rpm-ostree-2020.7-4.el8.x86_64
ostree-2020.7-4.el8.x86_64
rpm-ostree-libs-2020.7-4.el8.x86_64


How reproducible:

Steps to Reproduce:
1. build or install an ostree like system
2. run "sudo rpm-ostree install http://file-server-virt-qe-3rd.apps.ocp4.prod.psi.redhat.com/greenboot-failing-unit-1.0-1.el8.noarch.rpm"

Actual results:
Should install rpm without error, like:

Downloading 'http://file-server-virt-qe-3rd.apps.ocp4.prod.psi.redhat.com/greenboot-failing-unit-1.0-1.el8.noarch.rpm'... done!
Checking out tree ca6875c... done
No enabled rpm-md repositories.
Importing rpm-md... done
Resolving dependencies... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
Writing OSTree commit... done
Staging deployment... done
Added:
  greenboot-failing-unit-1.0-1.el8.noarch
Run "systemctl reboot" to start a reboot

Expected results:
Downloading 'http://file-server-virt-qe-3rd.apps.ocp4.prod.psi.redhat.com/greenboot-failing-unit-1.0-1.el8.noarch.rpm'... done!
Checking out tree 0cca2fd... done
No enabled rpm-md repositories.
Importing rpm-md... done
Resolving dependencies... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
error: Sanity-checking final rpmdb: Didn't find package 'greenboot-failing-unit-1.0-1.el8.noarch'

Additional info:

Comment 1 Jonathan Lebon 2021-05-12 15:49:25 UTC
Yeah, I think we need to backport both https://github.com/coreos/rpm-ostree/pull/2490 and https://github.com/coreos/rpm-ostree/pull/2553.

Comment 2 Jonathan Lebon 2021-05-12 15:49:58 UTC
*** Bug 1959907 has been marked as a duplicate of this bug. ***

Comment 3 Jonathan Lebon 2021-05-12 15:56:33 UTC
It looks like we're unblocked on the libmodulemd front (https://bugzilla.redhat.com/show_bug.cgi?id=1894573), so we should be able to rebase.

Comment 6 Luca BRUNO 2021-05-26 08:44:03 UTC
This rebase needs the following library updates to land in 8.5 first:
 * libmodulemd >= 2.11.2-2 (2.12.1-1 done in https://bugzilla.redhat.com/show_bug.cgi?id=1894573)
 * librepo >= 1.13.0 (1.14.0-1 in progress at https://bugzilla.redhat.com/show_bug.cgi?id=1951407)
 * libsolv >= 0.7.17 (0.7.17-2 done in https://bugzilla.redhat.com/show_bug.cgi?id=1951405)
 * ostree >= 2020.7 (2021.2 done in https://bugzilla.redhat.com/show_bug.cgi?id=1961289)

Once librepo is done too, I think this should be able to proceed too.

Comment 7 Luca BRUNO 2021-05-26 10:29:35 UTC
One more obstacle for this rebase is that it needs newer librpm API too, asked about that at https://bugzilla.redhat.com/show_bug.cgi?id=1964906.

Comment 21 Luca BRUNO 2021-06-18 08:25:39 UTC
The followup bug for osbuild is related to _dbpath location handling in `rpm-ostree compose commit`, tracked at https://bugzilla.redhat.com/show_bug.cgi?id=1973579.

Comment 22 Xiaofeng Wang 2021-06-21 13:59:36 UTC
Verified on rpm-ostree-2021.5-2.el8.x86_64 and rpm-ostree-libs-2021.5-2.el8.x86_64.

Comment 26 errata-xmlrpc 2021-11-09 18:46:52 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-2021:4272