diff --git a/sys/kernel/initramfs-tools/non-debian.patch b/sys/kernel/initramfs-tools/non-debian.patch index 50a2b71a..ed5cf11c 100644 --- a/sys/kernel/initramfs-tools/non-debian.patch +++ b/sys/kernel/initramfs-tools/non-debian.patch @@ -1,5 +1,18 @@ +diff --git a/hooks/resume b/hooks/resume +index 8ff84dd..439fe18 100755 +--- a/hooks/resume ++++ b/hooks/resume +@@ -50,7 +50,7 @@ report_verbose "Configuration sets RESUME=$RESUME" + # Try to autodetect the RESUME partition, using biggest swap device that + # is not ephemeral. We need to be able to read the listed swap partitions. + resume_auto= +-if ! ischroot && [ -r /proc/swaps ]; then ++if ! [ `stat -c %d:%i /proc/$$/root/` == `stat -c %d:%i /` ] && [ -r /proc/swaps ]; then + # shellcheck disable=SC2013 + for resume_auto in $(grep ^/dev/ /proc/swaps | sort -rnk3 | cut -d " " -f 1); do + report_verbose "Checking swap device $resume_auto" diff --git a/mkinitramfs b/mkinitramfs -index df1b940..e38aea9 100755 +index df1b940..bdd71e4 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -284,7 +284,21 @@ __TMPCPIOGZ="$(mktemp "${TMPDIR:-/var/tmp}/mkinitramfs-OL_XXXXXX")" || exit 1 @@ -7,8 +20,6 @@ index df1b940..e38aea9 100755 __TMPEARLYCPIO="$(mktemp "${TMPDIR:-/var/tmp}/mkinitramfs-FW_XXXXXX")" || exit 1 -DPKG_ARCH=$(dpkg --print-architecture) -+DPKG_ARCH=$(get_dpkg_arch) -+ +get_dpkg_arch(){ + case `uname -m` in + x86_64) @@ -22,6 +33,8 @@ index df1b940..e38aea9 100755 + ;; + esac +} ++ ++DPKG_ARCH=$(get_dpkg_arch) # Export environment for hook scripts. # diff --git a/sys/kernel/initramfs-tools/remove-zstd.patch b/sys/kernel/initramfs-tools/remove-zstd.patch index 649435a7..4067128a 100644 --- a/sys/kernel/initramfs-tools/remove-zstd.patch +++ b/sys/kernel/initramfs-tools/remove-zstd.patch @@ -24,7 +24,7 @@ index aa561bd..bf80786 100644 # COMPRESSLEVEL=3 diff --git a/mkinitramfs b/mkinitramfs -index df1b940..e9ab814 100755 +index df1b940..166bffb 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -188,7 +188,6 @@ lzma) kconfig_sym=CONFIG_RD_LZMA ;; @@ -43,15 +43,18 @@ index df1b940..e9ab814 100755 #gzip|xz|bzip2|lzma|lzop included *) # We're not using a compression level by default -@@ -227,7 +225,6 @@ gzip) # If we're doing a reproducible build, use gzip -n +@@ -227,10 +225,6 @@ gzip) # If we're doing a reproducible build, use gzip -n fi ;; lz4) compress="lz4 ${compresslevel} -l" ;; -zstd) compress="zstd -q ${compresslevel}" +- # If we're not doing a reproducible build, enable multithreading +- test -z "${SOURCE_DATE_EPOCH}" && compress="$compress -T0" +- ;; + xz) compress="xz ${compresslevel} --check=crc32" # If we're not doing a reproducible build, enable multithreading - test -z "${SOURCE_DATE_EPOCH}" && compress="$compress -T0" - ;; -@@ -426,12 +423,6 @@ find "${DESTDIR}/${MODULESDIR}" -name '*.ko.*' | while read -r ko; do + test -z "${SOURCE_DATE_EPOCH}" && compress="$compress --threads=0" +@@ -426,12 +420,6 @@ find "${DESTDIR}/${MODULESDIR}" -name '*.ko.*' | while read -r ko; do fi xz -d "${ko}" ;;