Chrismurphy (talk | contribs) No edit summary |
Chrismurphy (talk | contribs) No edit summary |
||
Line 73: | Line 73: | ||
* Accounts for various snapshot+rollback regimes, i.e. it's a beneficial change whether Btrfs or device-mapper based regimes. | * Accounts for various snapshot+rollback regimes, i.e. it's a beneficial change whether Btrfs or device-mapper based regimes. | ||
== Scope == | == Scope == | ||
Line 84: | Line 85: | ||
<!-- What work do other developers have to accomplish to complete the feature in time for release? Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?--> | <!-- What work do other developers have to accomplish to complete the feature in time for release? Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?--> | ||
** changes in SElinux policy | ** changes in SElinux policy | ||
* Release engineering: [https://pagure.io/releng/issue/10441 #Releng issue 10441] | * Release engineering: [https://pagure.io/releng/issue/10441 #Releng issue 10441] | ||
Line 122: | Line 124: | ||
<!-- REQUIRED FOR SYSTEM WIDE CHANGES --> | <!-- REQUIRED FOR SYSTEM WIDE CHANGES --> | ||
* Since this will apply to new clean installs only, we'll be testing that the change appears only in Rawhide and does not appear on upgrades. | |||
== User Experience == | == User Experience == | ||
Line 138: | Line 142: | ||
Otherwise, the change should be invisible to users. | Otherwise, the change should be invisible to users. | ||
== Dependencies == | == Dependencies == | ||
Line 143: | Line 148: | ||
* `rpm-ostree` probably should make `/usr/share/rpm` a symlink to `/usr/lib/sysimage/rpm`, rather than the reverse as it is currently. | * `rpm-ostree` probably should make `/usr/share/rpm` a symlink to `/usr/lib/sysimage/rpm`, rather than the reverse as it is currently. | ||
* `PackageKit` might use inotify on `/var/lib/rpm` need to check if it does and whether it should be changed or add the additional path | * `PackageKit` might use inotify on `/var/lib/rpm` need to check if it does and whether it should be changed or add the additional path | ||
<!-- REQUIRED FOR SYSTEM WIDE CHANGES --> | <!-- REQUIRED FOR SYSTEM WIDE CHANGES --> | ||
Line 154: | Line 160: | ||
<!-- Does finishing this feature block the release, or can we ship with the feature in incomplete state? --> | <!-- Does finishing this feature block the release, or can we ship with the feature in incomplete state? --> | ||
* Blocks release? Yes <!-- REQUIRED FOR SYSTEM WIDE CHANGES --> | * Blocks release? Yes <!-- REQUIRED FOR SYSTEM WIDE CHANGES --> | ||
== Documentation == | == Documentation == | ||
Line 159: | Line 166: | ||
<!-- REQUIRED FOR SYSTEM WIDE CHANGES --> | <!-- REQUIRED FOR SYSTEM WIDE CHANGES --> | ||
== Release Notes == | == Release Notes == |
Revision as of 17:16, 28 December 2021
Relocate RPM database to /usr
Summary
Currently, the RPM databases is located in /var
. Let's move it to /usr
. The move is already under way in rpm-ostree-based installations, and in (open)SUSE.
Owner
- Name: Chris Murphy
- Email: chrismurphy@fedoraproject.org
- Name: Michel Alexandre Salim
- Email: salimma@fedoraproject.org
Current status
- Targeted release: Fedora Linux 36
- Last updated: 2021-12-28
- FESCo issue: <will be assigned by the Wrangler>
- Tracker bug: <will be assigned by the Wrangler>
- Release notes tracker: <will be assigned by the Wrangler>
Detailed Description
Current location
/var/lib/rpm
New location
/usr/lib/sysimage/rpm
The proposal is to apply the new location only to new clean installs only. It will not apply to upgrades.
/var/lib/rpm
will be a symlink pointing to /usr/lib/sysimage/rpm
Changing the file system layout to accommodate a snapshot+rollback regime is implied, but not required by this proposal. For example, Fedora has long placed /home
on a separate subvolume (or file system) so it can be isolated from system root. Likewise, it makes sense to isolate /var/log
and possibly /var/lib/libvirt/images
so these locations continue to carry forward in time, even if the system root does a rollback.
Feedback
There will be no change to DNF as part of this change proposal. DNF's history will remain in /var
until DNF 5. Discussion continues about the effect of a snapshot+rollback regime on DNF history. Relocate DNF history to /usr.
Upstream RPM accept the change, but institutionally don't like the loss or weakening of a very well known location for the database, and anticipate complaints.
Benefit to Fedora
- The RPM database primarily describes the state of
/usr
. Storing the databases in/usr
will more easily facilitate OS rollback, without affecting/var
.
- Helps align Fedora variants with each other
- rpm-ostree based systems (including CoreOS, IoT, Silverblue, Kinoite) already use
/usr/lib/sysimage
for rpmdb.
- rpm-ostree based systems (including CoreOS, IoT, Silverblue, Kinoite) already use
- Consistency with another RPM-based distro, (open)SUSE has made this change
- Accounts for various snapshot+rollback regimes, i.e. it's a beneficial change whether Btrfs or device-mapper based regimes.
Scope
- Proposal owners:
- changes in rpm package
- create the new path
- create a symlink for the old path pointing to new path
- changes in rpm package
- Other developers:
- changes in SElinux policy
- Release engineering: #Releng issue 10441
- Policies and guidelines: N/A (not needed for this Change)
- Trademark approval: N/A (not needed for this Change)
- Alignment with Objectives:
Upgrade/compatibility impact
Change will not be applied to upgrades.
How To Test
- Clean install or upgrade an existing Fedora system
- Note the changed database paths (new location) and symlinks in the old location
- Check that
rpm
anddnf
commands work as expected, e.g.
dnf history rpm -qa
- Since this will apply to new clean installs only, we'll be testing that the change appears only in Rawhide and does not appear on upgrades.
User Experience
Users will notice:
- symlink in the old locations for the databases, pointing to the new location
Otherwise, the change should be invisible to users.
Dependencies
rpm-ostree
probably should make/usr/share/rpm
a symlink to/usr/lib/sysimage/rpm
, rather than the reverse as it is currently.PackageKit
might use inotify on/var/lib/rpm
need to check if it does and whether it should be changed or add the additional path
Contingency Plan
- Contingency mechanism: Revert the change, try again the next Fedora release.
- Contingency deadline: Beta freeze
- Blocks release? Yes