diff --git a/debian/patches/apertis/0002-Remove-bashisms-from-the-UEFI-entries-generator.patch b/debian/patches/apertis/0002-Remove-bashisms-from-the-UEFI-entries-generator.patch index 1ae4c8339248c93b9e44a8ecb518ca63b5dabac6..b0a37720127ad1cf57d6f26bb142c42fb91f6844 100644 --- a/debian/patches/apertis/0002-Remove-bashisms-from-the-UEFI-entries-generator.patch +++ b/debian/patches/apertis/0002-Remove-bashisms-from-the-UEFI-entries-generator.patch @@ -11,8 +11,6 @@ Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com> src/kernel-install/90-loaderentry.install | 55 ++++++++++++----------- 1 file changed, 29 insertions(+), 26 deletions(-) -diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install -index 39ec8a69c6..087dd78a99 100644 --- a/src/kernel-install/90-loaderentry.install +++ b/src/kernel-install/90-loaderentry.install @@ -1,4 +1,4 @@ @@ -21,9 +19,9 @@ index 39ec8a69c6..087dd78a99 100644 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -@@ -7,66 +7,69 @@ KERNEL_VERSION="$2" - BOOT_DIR_ABS="$3" +@@ -8,66 +8,69 @@ KERNEL_IMAGE="$4" + INITRD_OPTIONS_START="5" -if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then - exit 0 @@ -114,18 +112,16 @@ index 39ec8a69c6..087dd78a99 100644 echo "/etc/kernel/tries does not contain an integer." >&2 exit 1 fi -@@ -91,9 +94,9 @@ mkdir -p "${LOADER_ENTRY%/*}" || { +@@ -110,10 +113,10 @@ echo "title $PRETTY_NAME" echo "version $KERNEL_VERSION" echo "machine-id $MACHINE_ID" - echo "options ${BOOT_OPTIONS[*]}" + echo "options $BOOT_OPTIONS" echo "linux $BOOT_DIR/linux" -- [[ -f $BOOT_DIR_ABS/initrd ]] && \ -+ [ -f $BOOT_DIR_ABS/initrd ] && \ - echo "initrd $BOOT_DIR/initrd" + for initrd in "${INITRD_OPTIONS[@]}"; do +- [[ -f $BOOT_DIR_ABS/$(basename ${initrd}) ]] && \ ++ [ -f $BOOT_DIR_ABS/$(basename ${initrd}) ] && \ + echo "initrd $BOOT_DIR/$(basename ${initrd})" + done : - } > "$LOADER_ENTRY" || { --- -2.19.2 - diff --git a/debian/patches/apertis/0003-Reworked-kernel-install-script.patch b/debian/patches/apertis/0003-Reworked-kernel-install-script.patch index 580bca593a3d8daad18dcad317ced00d1abec789..bf0d40ab18bb6d2342b3709527ae93fb3405fecb 100644 --- a/debian/patches/apertis/0003-Reworked-kernel-install-script.patch +++ b/debian/patches/apertis/0003-Reworked-kernel-install-script.patch @@ -16,8 +16,6 @@ Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com> src/kernel-install/kernel-install | 77 ++++++++++++++++--------------- 1 file changed, 41 insertions(+), 36 deletions(-) -diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install -index 732d584bbe..1dffc5ea23 100644 --- a/src/kernel-install/kernel-install +++ b/src/kernel-install/kernel-install @@ -1,4 +1,4 @@ @@ -26,7 +24,7 @@ index 732d584bbe..1dffc5ea23 100644 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh # SPDX-License-Identifier: LGPL-2.1+ -@@ -31,22 +31,18 @@ usage() +@@ -31,22 +31,18 @@ dropindirs_sort() { local suffix=$1; shift @@ -58,7 +56,7 @@ index 732d584bbe..1dffc5ea23 100644 echo "$d/$f" continue 2 fi -@@ -57,14 +53,16 @@ dropindirs_sort() +@@ -57,42 +53,46 @@ export LC_COLLATE=C for i in "$@"; do @@ -70,14 +68,18 @@ index 732d584bbe..1dffc5ea23 100644 done -if [[ "${0##*/}" == 'installkernel' ]]; then -+if [ "${0%installkernel}" != "${0}" ]; then +++if [ "${0%installkernel}" != "${0}" ]; then COMMAND='add' -+elif [ "${0%removekernel}" != "${0}" ]; then -+ COMMAND='remove' +- # make install doesn't pass any parameter wrt initrd handling +- INITRD_OPTIONS=() +++elif [ "${0%removekernel}" != "${0}" ]; then +++ COMMAND='remove' else COMMAND="$1" shift -@@ -73,23 +71,28 @@ fi +- INITRD_OPTIONS=( "${@:3}" ) + fi + KERNEL_VERSION="$1" KERNEL_IMAGE="$2" @@ -112,7 +114,7 @@ index 732d584bbe..1dffc5ea23 100644 BOOT_DIR_ABS="/boot/efi/$MACHINE_ID/$KERNEL_VERSION" elif mountpoint -q /efi; then BOOT_DIR_ABS="/efi/$MACHINE_ID/$KERNEL_VERSION" -@@ -103,15 +106,16 @@ export KERNEL_INSTALL_MACHINE_ID=$MACHINE_ID +@@ -106,15 +106,16 @@ ret=0 @@ -132,7 +134,7 @@ index 732d584bbe..1dffc5ea23 100644 echo "Command 'add' requires an argument" >&2 exit 1 fi -@@ -121,42 +125,42 @@ case $COMMAND in +@@ -124,42 +125,42 @@ exit 1 } @@ -140,10 +142,10 @@ index 732d584bbe..1dffc5ea23 100644 - if [[ -x $f ]]; then + plugins_list | while read f; do + if [ -x "$f" ]; then - "$f" add "$KERNEL_VERSION" "$BOOT_DIR_ABS" "$KERNEL_IMAGE" + "$f" add "$KERNEL_VERSION" "$BOOT_DIR_ABS" "$KERNEL_IMAGE" "${INITRD_OPTIONS[@]}" x=$? - if [[ $x == $SKIP_REMAINING ]]; then -+ if [ "$x" = "$SKIP_REMAINING" ]; then ++ if [ $x = $SKIP_REMAINING ]; then ret=0 break fi @@ -171,7 +173,7 @@ index 732d584bbe..1dffc5ea23 100644 "$f" remove "$KERNEL_VERSION" "$BOOT_DIR_ABS" x=$? - if [[ $x == $SKIP_REMAINING ]]; then -+ if [ "$x" = "$SKIP_REMAINING" ]; then ++ if [ $x = $SKIP_REMAINING ]; then ret=0 break fi @@ -186,11 +188,8 @@ index 732d584bbe..1dffc5ea23 100644 ;; *) -@@ -166,3 +170,4 @@ case $COMMAND in +@@ -169,3 +170,4 @@ esac exit $ret + --- -2.19.2 -