FS#59283 - Consider keeping the newly deprecated --root option with its behavior

Attached to Project: Pacman
Opened by Diisocyanate (Diisocyanate) - Monday, 09 July 2018, 18:44 GMT
Last edited by Allan McRae (Allan) - Friday, 27 July 2018, 00:58 GMT
Task Type Feature Request
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version 5.1.0
Due in Version 5.1.1
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Version 5.1 deprecated the "--root" option in favor of the new "--sysroot" option. While I aggree the new option is clearly useful on most common use cases, I do no not aggree with the fact it should deprecate the old option and its behavior. In some use cases you might want to use caches and configurations from the outside of the root.

I for example have a proper use case that make the old option much more relevant to me :

I have developped a set of tools that build slim vms or containers using pacman with the --root option. These systems do not have pacman installed inside. During installation, update, or installations of new packages, I use pacman from a separate host, a common cache directory also on said host, and a separate configuration for each vm/container. An overview of the file hierarchy of the setup host would be something like:

* /etc/pacman-dom/<HOST>/pacman.conf => this is a per domain configuration
* /etc/pacman-dom/<HOST>/hooks => hooks
* /etc/pacman-dom/<HOST>/* => other configuration files included from pacman.conf
* /var/lib/pacman-dom/<HOST>/db => per domain pacman database
* /var/cache/pacman-dom/pkgs => the common package cache

This architecture makes sense to me in the scope of a slim virtual machine manager and container builder, on top of pacman. Such model have two good properties I am interested in: one it helps me make slimmer systems with a common cache, two it greatly simplifies security when you do not have to trust what your virtual machines might do to their file systems over time.

The only solutions I can think of to keep these properties for my tools would be either to implement bind mounts before letting pacman doing its chroot with the --sysroot, or trying to make temporary copies (with possible temporary resizing) then removals. Which I think would add unnecessary complexity.

Could it be possible to just keep both options "--root" and "--sysroot" with their different behaviors ?
This task depends upon

Closed by  Allan McRae (Allan)
Friday, 27 July 2018, 00:58 GMT
Reason for closing:  Implemented
Additional comments about closing:  git commit 0adb3634

Loading...