You are not logged in.

#1 2024-01-23 12:42:33

soulseller
Member
Registered: 2024-01-23
Posts: 1

Change the default location of the database directory

Have you considered the idea of relocating /var/lib/pacman to /usr just like openSUSE and Fedora already did (years ago) due to possible rootfs inconsistency caused by snapshot/rollback capabilities of modern Linux filesystems like btrfs and bcachefs?

/var/lib/pacman is currently the only directory in /var that is treated as a core Arch Linux component and in my opinion deserves to reside in a system-specific path like i.e. /usr/lib/sysimage. I personally think that moving pacman's default DBPath out of /var is justified by a few very important use cases such as the maintenance of rootfs snapshots, read-only filesystems and for the sake of backup sanity in general. The relocation could dramatically simplify the backup/restore of the system state and will be a beneficial change for both device-mapper and btrfs-based filesystem layouts.

Offline

#2 2024-01-23 16:24:20

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,020

Re: Change the default location of the database directory

from the upstream pacman.conf default at https://gitlab.archlinux.org/pacman/pac … an.conf.in

# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = @ROOTDIR@
#DBPath      = @localstatedir@/lib/pacman/
#CacheDir    = @localstatedir@/cache/pacman/pkg/
#LogFile     = @localstatedir@/log/pacman.log
#GPGDir      = @sysconfdir@/pacman.d/gnupg/
#HookDir     = @sysconfdir@/pacman.d/hooks/
HoldPkg     = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto
https://www.gnu.org/prep/standards/html_node/Directory-Variables.html wrote:

‘localstatedir’

    The directory for installing data files which the programs modify while they run, and that pertain to one specific machine. Users should never need to modify files in this directory to configure the package’s operation; put such configuration information in separate files that go in $(datadir) or $(sysconfdir). $(localstatedir) should normally be /usr/local/var, but write it as $(prefix)/var. (If you are using Autoconf, write it as ‘@localstatedir@’.)

That description seems to match what is stored in /var/lib/pacman/{local,sync}  .

Keep in mind pacman is used by many distros and maintained as a seperate project, issues should be filed at https://gitlab.archlinux.org/pacman/pacman/-/issues


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2024-01-24 04:26:51

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,411
Website

Re: Change the default location of the database directory

Don't bother reporting this there...  you can set your pacman db path whereever you want in pacman.conf.  So the bug will be closed immediately.

Offline

Board footer

Powered by FluxBB