Re: creating Hurd chroots on Linux using DPKG_ROOT chrootless mode
Hello,
Johannes Schauer Marin Rodrigues, le sam. 18 nov. 2023 11:04:06 +0100, a ecrit:
> But even with those patches there is another blocker. The hurd package throws
> the following error in its preinst maintainer script:
>
> ERROR: This version of the GNU Hurd requires kernel version
> 1.8+git20210923 or later.
> Please upgrade your kernel and reboot before installing hurd.
>
> So the hurd package must be patched so that this check is not done if
> $DPKG_ROOT is a non-empty string. Can you take care of preparing that patch and
> testing it?
Oh, indeed, that's an OS-specific thing that shouldn't be done on
cross-execution :)
I have commited the attached (untested) patch to the debian hurd repo.
Samuel
commit 8692df6707fd5d8e2533dd90bc740d422b02584f
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Sat Nov 18 11:30:35 2023 +0100
hurd.preinst: Disable kernel version check when $DPKG_ROOT is not empty
diff --git a/debian/hurd.preinst b/debian/hurd.preinst
index 68e577355..5ac0a9adf 100644
--- a/debian/hurd.preinst
+++ b/debian/hurd.preinst
@@ -24,9 +24,10 @@ kernel_ver_git=${kernel_ver_git%%-*}
kernel_ver=${kernel_ver%+git*}
kernel_ver_min=1.8
kernel_ver_git_min=20210923
-if kernel_compare_versions "$kernel_ver" lt $kernel_ver_min || \
- ( kernel_compare_versions "$kernel_ver" eq $kernel_ver_min && \
- [ "$kernel_ver_git" -lt $kernel_ver_git_min ] )
+if [ -z "$DPKG_ROOT" ] && \
+ ( kernel_compare_versions "$kernel_ver" lt $kernel_ver_min || \
+ ( kernel_compare_versions "$kernel_ver" eq $kernel_ver_min && \
+ [ "$kernel_ver_git" -lt $kernel_ver_git_min ] ) )
then
echo "ERROR: This version of the GNU Hurd requires kernel version"
echo "$kernel_ver_min+git$kernel_ver_git_min or later."
Reply to: