]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
ci: remove remaining workarounds from the alpine container
authorJo Zzsi <jozzsicsataban@gmail.com>
Sat, 19 Oct 2024 23:42:03 +0000 (19:42 -0400)
committerLaszlo <laszlo.gombos@gmail.com>
Sun, 20 Oct 2024 00:06:01 +0000 (20:06 -0400)
Reorganize VMLINUZ detection to make the test pass again
on alpine after the container change.

test/container/Dockerfile-alpine
test/test-functions

index bacc29e1fd731e1dd84f59192b511265dfceb028..c53a20c059840ac2ba67fe5bc262915d7fcb0a58 100644 (file)
@@ -74,8 +74,3 @@ RUN apk add --no-cache \
     util-linux-misc \
     xfsprogs \
     xz
-
-RUN \
-  cp /usr/lib/udev/rules.d/* /lib/udev/rules.d/ && \
-  ln -sf /sbin/poweroff /sbin/shutdown && \
-  ln -sf /boot/vmlinuz-virt /boot/vmlinuz-$(cd /lib/modules; ls -1 | tail -1)
index 429c615d20e7e2965a119622556fe1800d925363..40f8d6a591e3e28da30537ae5300ca5127132fb4 100644 (file)
@@ -71,8 +71,6 @@ if ! [ -f "$VMLINUZ" ]; then
     VMLINUZ="/lib/modules/${KVERSION}/vmlinux"
 fi
 
-[ -z "$VMLINUZ" ] && VMLINUZ=$(find /boot/vmlinuz-* -type f 2> /dev/null | tail -1)
-
 if ! [ -f "$VMLINUZ" ]; then
     [[ -f /etc/machine-id ]] && read -r MACHINE_ID < /etc/machine-id
 
@@ -84,13 +82,19 @@ if ! [ -f "$VMLINUZ" ]; then
         VMLINUZ="/boot/vmlinux-${KVERSION}"
     elif [ -f "/boot/kernel-${KVERSION}" ]; then
         VMLINUZ="/boot/kernel-${KVERSION}"
-    else
-        echo "Could not find a Linux kernel version $KVERSION to test with!" >&2
-        echo "Please install linux." >&2
-        exit 1
     fi
 fi
 
+if ! [ -f "$VMLINUZ" ]; then
+    VMLINUZ=$(find /boot/vmlinuz-* -type f 2> /dev/null | tail -1)
+fi
+
+if ! [ -f "$VMLINUZ" ]; then
+    echo "Could not find a Linux kernel version $KVERSION to test with!" >&2
+    echo "Please install linux." >&2
+    exit 1
+fi
+
 export VMLINUZ
 
 command -v test_check &> /dev/null || test_check() {