require_programs: Debian: find kpartx and losetup
- Nov 06, 2024
-
-
Oliver Smith authored
We don't care about the output of "losetup --json" here, we just want to make sure that the argument exists. If it does not exist, we already give an error to the user. Set the output to null so it does not clutter the log since it runs with every pmbootstrap command now.
-
Oliver Smith authored
Use the absolute path for it, so it works in Debian too as we run it without sudo here to just check if the argument is supported.
-
Remove this chroot-specific helper and merge it in with the existing require_programs() logic. Now we have one unified way to discover and use programs from the host and where we can put any additional special handling we might need. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org>
-
On debian systems in particular special handling is needed for /usr/sbin. Let's do this once and then provide the host deps we use in a nice accessible dictionary. Signed-off-by:
Caleb Connolly <caleb@postmarketos.org> Tweaked-by:
Oliver Smith <ollieparanoid@postmarketos.org>
-
Oliver Smith authored
In Debian, /usr/sbin is not in PATH of regular users unless using sudo. Fix that pmbootstrap won't find kpartx and losetup in /usr/sbin, and complains about these even though they are installed. Fixes: issue 2489
-