Bug 1960991 - RPM unusable following upgrade to Fedora 34: cannot open Packages index using bdb_ro - Operation not permitted (1)
Summary: RPM unusable following upgrade to Fedora 34: cannot open Packages index using...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-17 01:23 UTC by Tethys
Modified: 2022-06-08 00:25 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-08 00:25:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tethys 2021-05-17 01:23:05 UTC
Description of problem:
Following an upgrade to Fedora 34, rpm doesn't seem to be able to perform transactions

Version-Release number of selected component (if applicable):
rpm-4.16.1.3-1.fc34.x86_64


How reproducible:
Every time

Steps to Reproduce:
1. dnf install sqlite2
2. Aternatively, rpm --rebuilddb
3.

Actual results:

[root@localhost ~]# dnf install sqlite2
warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
Last metadata expiration check: 1:39:18 ago on Mon 17 May 2021 12:37:01 AM BST.
Dependencies resolved.
===============================================================================================================================================================
 Package                             Architecture                       Version                                       Repository                          Size
===============================================================================================================================================================
Installing:
 sqlite2                             x86_64                             2.8.17-34.fc34                                fedora                             178 k

Transaction Summary
===============================================================================================================================================================
Install  1 Package

Total size: 178 k
Installed size: 374 k
Is this ok [y/N]: y
Downloading Packages:
[SKIPPED] sqlite2-2.8.17-34.fc34.x86_64.rpm: Already downloaded                                                                                               
warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
Running transaction check
warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
RPM: warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
RPM: error: cannot open Packages index using bdb_ro - Operation not permitted (1)
RPM: error: cannot open Packages database in /var/lib/rpm
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Could not run transaction.



[root@localhost ~]# rpm --rebuilddb
warning: Converting database from bdb_ro to sqlite backend
error: could not open /var/lib/rpm/Packages: Permission denied
error: cannot open Packages index using bdb_ro - Operation not permitted (1)



Expected results:

Normal RPM transactions occur


Additional info:

The "Operation not permitted" error seems strange. I can read the file without problems. I haven't tried writing to it, but I see no reason why I would be unable to do so:

[root@localhost ~]# ls -l /var/lib/rpm/Packages 
-rw-r--r--. 1 root root 230178816 May 14 02:45 /var/lib/rpm/Packages
[root@localhost ~]# lsattr -l /var/lib/rpm/Packages 
/var/lib/rpm/Packages        Extents

Comment 1 Tethys 2021-05-17 01:25:15 UTC
The attempt to rebuild the database was due to a suggestion that it might fix the problem in https://bugzilla.redhat.com/show_bug.cgi?id=1941206

Clearly it doesn't fix it for me.

Comment 2 Panu Matilainen 2021-05-17 08:12:05 UTC
The permission denied is probably from SELinux, see bug 1461313.

Try the following (and note the exact command to rebuild the database):

# restorecon -Rv /var/lib/rpm
# rpmdb --rebuilddb

Comment 3 Paul DeStefano 2021-06-26 01:18:28 UTC
Hey, thanks Panu, you nailed it.  Not sure how this situation occurred, but a SElinux relabel fixed it.

Comment 4 Ben Cotton 2022-05-12 16:22:07 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 5 Ben Cotton 2022-06-08 00:25:40 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release.

Thank you for reporting this bug and we are sorry it could not be fixed.


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