Re: F36 Change: Relocate RPM database to /usr (System-Wide Change proposal)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 29, 2021 at 3:03 PM Ben Cotton <bcotton@xxxxxxxxxx> wrote:
>
> https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr
>
> == 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.

How does this work on RO /usr files systems? I thought data in /usr
was supposed to be static/ It works for rpm-ostree because it's
updated at tree creation time.

> == Owner ==
> * Name: [[User:chrismurphy| Chris Murphy]], [[User:Salimma|Michel
> Alexandre Salim]], [[User:Ngompa|Neal Gompa]]
> * Email: bugzilla@xxxxxxxxxxxxxxxxx, michel@xxxxxxxxxxxxxxx, ngompa13@xxxxxxxxx
>
>
> == Detailed Description ==
> === Current location ===
> <pre>/var/lib/rpm</pre>
>
> === New location ===
> <pre>/usr/lib/sysimage/rpm</pre>
>
> <code>/var/lib/rpm</code> will be a symlink pointing to
> <code>/usr/lib/sysimage/rpm</code>
>
> 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.
> [http://lists.rpm.org/pipermail/rpm-ecosystem/2021-December/000769.html
> Relocate DNF history to /usr.]
>
> Upstream RPM accept the change, but institutionally don't like the
> loss or weakening of a
> [http://lists.rpm.org/pipermail/rpm-ecosystem/2021-December/000781.html
> very well known location] for the database, and
> [http://lists.rpm.org/pipermail/rpm-ecosystem/2021-December/000781.html
> 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.
>
> * 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
>
> * Other developers:
> ** changes in SElinux policy
>
> * Release engineering: [https://pagure.io/releng/issue/10441 #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 be applied to offline upgrades, similar to the RPM sqlite
> database change. A systemd service will move the rpmdb from /var to
> /usr, then create a symlink pointing to /usr from /var.
>
> # Create `/usr/lib/sysimage/rpm` (rpm package will do this at preinst)
> # Create symlinks in `/usr/lib/sysimage/rpm/` pointing to files in
> `/var/lib/rpm/` (rpm package will do this at preinst)
> # Change the dbpath in `/usr/lib/rpm/macros` to
> `/usr/lib/sysimage/rpm` (rpm package will be patched to do this on
> F36+)
> # Request rpm rebuild the database (done via systemd service)
> # Remove `/var/lib/rpm` and create a symlink `/var/lib/rpm` ->
> `/usr/lib/sysimage/rpm` (done via systemd service)
>
>
> == How To Test ==
>
> # Perform a new clean install, or upgrade a system
> # Check that `/var/lib/rpm` is a symlink to `/usr/lib/sysimage/rpm`
> # Check that `/usr/lib/sysimage/rpm` is populated with at least
> `rpmdb.sqlite`, possibly also `rpmdb.sqlite-shm` and
> `rpmdb.sqlite-wal`
> # Confirm `rpm -q <package>` and/or `rpm -qa` still work
>
> == User Experience ==
>
> * symlink `/var/lib/rpm` -> `/usr/lib/sysimage/rpm`
>
> 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
>
> --
> Ben Cotton
> He / Him / His
> Fedora Program Manager
> Red Hat
> TZ=America/Indiana/Indianapolis
> _______________________________________________
> devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
> Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux