Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#49347 - {arch-install-scripts} pacstrap maybe should set --hookdir

Attached to Project: Arch Linux
Opened by Gerardo Exequiel Pozzi (djgera) - Sunday, 15 May 2016, 20:48 GMT
Last edited by Gerardo Exequiel Pozzi (djgera) - Wednesday, 14 February 2018, 15:58 GMT
Task Type Bug Report
Category Arch Projects
Status Assigned
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 2
Private No

Details

While building archiso, it uses pacstrap, I see custom hooks made in my system in /etc/pacman.d/hooks running inside the $newroot. I guess should be an option to avoid this from command line or set by default to $newroot/etc/pacman.d/hooks via --hookdir. (Note using defaults: unset HookDir option)

arch-install-scripts 15-1
Comment by Dave Reisner (falconindy) - Monday, 16 May 2016, 12:46 GMT
I think this is something to fix in pacman itself. The default hookdir should be assumed to be relative to the root, in the same way that the DBPath is. Otherwise, you risk Bad Things™ happening due to the two not being in sync.
Comment by Gerardo Exequiel Pozzi (djgera) - Monday, 16 May 2016, 22:13 GMT
Yes Dave, I was initially surprised first, indeed I first think opening a ticket for pacman, but later reading pacman manpages seems to be the desired bahavior. In any case, the documentation seems to be confused al least for options about paths.

In any case I opened a ticket for pacman and --hookdir parameter. FS#49349
Comment by Allan McRae (Allan) - Monday, 16 May 2016, 22:33 GMT
Hrm... in terms of being relative to the root --hookdir is acting the same as --dbpath and --config.
Comment by Andrew Gregory (andrewgregory) - Tuesday, 17 May 2016, 01:05 GMT
I think it would be okay to default HookDir relative to RootDir. But, regarding "Bad Things", -r is already dangerous when (mis)used this way. -r is not equivalent to a chroot, as many people seem to assume. It is just a path prefix determining where package files are extracted. The host config is still used, including DBPath and LogFile if they have been set. So, Bad Things™ can easily still happen even with paths defaulting under RootDir; we just don't see that because most people don't set those options. What we probably need is something like a --chroot option that gets prepended to all configuration paths even if they are manually set.
Comment by Allan McRae (Allan) - Saturday, 14 January 2017, 07:30 GMT
Unassigning myself - I am assigned to the bug on the pacman end.
Comment by Eli Schwartz (eschwartz) - Tuesday, 31 July 2018, 23:33 GMT
This would be fixed by using --sysroot instead, cf. FS#58778

Loading...