[pacman-dev] [RFC] command-line provided paths under --sysroot
Implementing --sysroot the lazy way with a simple chroot turned out to have a number of complications that significantly reduce its utility. I've been sitting on a patch to reimplement it by prefixing all configuration paths with the sysroot, but this raises the question of how we should handle paths provided on the command line. Using chroot meant that all paths, regardless of what they were or where they came from, would be interpreted relative to the sysroot. Switching to manually adjusting paths means that we have the option to change that. I'm inclined to change pacman to use command line arguments/options as-is and have --sysroot just modify values from the config file. I think that's the friendlier option for users. Thoughts?
On 16/1/21 5:47 pm, Andrew Gregory wrote:
Implementing --sysroot the lazy way with a simple chroot turned out to have a number of complications that significantly reduce its utility. I've been sitting on a patch to reimplement it by prefixing all configuration paths with the sysroot, but this raises the question of how we should handle paths provided on the command line. Using chroot meant that all paths, regardless of what they were or where they came from, would be interpreted relative to the sysroot. Switching to manually adjusting paths means that we have the option to change that.
I'm inclined to change pacman to use command line arguments/options as-is and have --sysroot just modify values from the config file. I think that's the friendlier option for users.
I think that is the right approach, but I'd really like input from the archiso and pacstrap maintainers, as they use these options and I believe have had issues this should solve. A
On 1/16/21 5:32 AM, Allan McRae wrote:
On 16/1/21 5:47 pm, Andrew Gregory wrote:
Implementing --sysroot the lazy way with a simple chroot turned out to have a number of complications that significantly reduce its utility. I've been sitting on a patch to reimplement it by prefixing all configuration paths with the sysroot, but this raises the question of how we should handle paths provided on the command line. Using chroot meant that all paths, regardless of what they were or where they came from, would be interpreted relative to the sysroot. Switching to manually adjusting paths means that we have the option to change that.
I'm inclined to change pacman to use command line arguments/options as-is and have --sysroot just modify values from the config file. I think that's the friendlier option for users.
I think that is the right approach, but I'd really like input from the archiso and pacstrap maintainers, as they use these options and I believe have had issues this should solve.
Speaking with my pacstrap maintainer hat on, my attempts to use --sysroot (which never panned out due to the disabled network thing) were rendered pretty ugly by the need to take the pacman.conf from the host and copy it into "$newroot"/tmp/pacman.conf, or bind mount the host cachedir in the case of pacstrap -c, because I needed to use the host resources rather than strictly administrating an existing chroot. So the ability to pass command-line options relating to the host would be very helpful since I would then not need to mess around with those. I do not know what the story is with archiso; it's plausible they'd need the same kind of flexibility. I'm looping in dvzrv for input, since I don't believe he is subscribed to this list. -- Eli Schwartz Bug Wrangler and Trusted User
On Sat, 16 Jan 2021 at 07:47, Andrew Gregory <andrew.gregory.8@gmail.com> wrote:
Implementing --sysroot the lazy way with a simple chroot turned out to have a number of complications that significantly reduce its utility. I've been sitting on a patch to reimplement it by prefixing all configuration paths with the sysroot, but this raises the question of how we should handle paths provided on the command line. Using chroot meant that all paths, regardless of what they were or where they came from, would be interpreted relative to the sysroot. Switching to manually adjusting paths means that we have the option to change that.
I'm inclined to change pacman to use command line arguments/options as-is and have --sysroot just modify values from the config file. I think that's the friendlier option for users.
Fwiw this seems like a great idea. I think it also helps for clearer privilege separation, since one doesn't need to have the extra chroot requirements into the mix. Yes there's a chroot in libalpm, but it's very self-contained and clear. Hope it helps, -Emil
participants (4)
-
Allan McRae
-
Andrew Gregory
-
Eli Schwartz
-
Emil Velikov