]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
ci: don't use `rpm` to determine the kernel version
authorHarald Hoyer <harald@redhat.com>
Wed, 12 May 2021 12:19:58 +0000 (14:19 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Wed, 12 May 2021 12:21:00 +0000 (14:21 +0200)
for `/etc/profile.d/dracut-test.sh`

test/container/Dockerfile-Arch
test/container/Dockerfile-Fedora-33
test/container/Dockerfile-Fedora-34
test/container/Dockerfile-Fedora-latest

index 9340e50f00cc5f6a0de4198159810d140d572cba..4dcb24dda3e7167fe4c8c04f4324311f3f7c585f 100644 (file)
@@ -5,7 +5,7 @@ MAINTAINER https://github.com/dracutdevs/dracut
 ENV container docker
 LABEL RUN="docker run -it --name NAME --privileged --ipc=host --net=host --pid=host -e NAME=NAME -e IMAGE=IMAGE IMAGE"
 
-RUN echo 'export DRACUT_NO_XATTR=1 KVERSION="$(rpm -qa kernel --qf "%{VERSION}-%{RELEASE}.%{ARCH}\n" | sort -rn | head -1)"' > /etc/profile.d/dracut-test.sh
+RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)' > /etc/profile.d/dracut-test.sh
 
 # Install needed packages for the dracut CI container
 RUN pacman --noconfirm -Sy \
index 37208d47609e879b7a802a77ebbd5b45c5765b60..d0c943bd004f63f36f8ba4b53b35d0057520f004 100644 (file)
@@ -5,7 +5,7 @@ MAINTAINER https://github.com/dracutdevs/dracut
 ENV container docker
 LABEL RUN="docker run -it --name NAME --privileged --ipc=host --net=host --pid=host -e NAME=NAME -e IMAGE=IMAGE IMAGE"
 
-RUN echo 'export DRACUT_NO_XATTR=1 KVERSION="$(rpm -qa kernel --qf "%{VERSION}-%{RELEASE}.%{ARCH}\n" | sort -rn | head -1)"' > /etc/profile.d/dracut-test.sh
+RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)' > /etc/profile.d/dracut-test.sh
 
 # Install needed packages for the dracut CI container
 RUN dnf -y install --setopt=install_weak_deps=False \
index 72cdae728b5fbf49348afe84430f7a4160226780..e40c1c9069b0edcaae28396d47f9c6463289bf18 100644 (file)
@@ -5,7 +5,7 @@ MAINTAINER https://github.com/dracutdevs/dracut
 ENV container docker
 LABEL RUN="docker run -it --name NAME --privileged --ipc=host --net=host --pid=host -e NAME=NAME -e IMAGE=IMAGE IMAGE"
 
-RUN echo 'export DRACUT_NO_XATTR=1 KVERSION="$(rpm -qa kernel --qf "%{VERSION}-%{RELEASE}.%{ARCH}\n" | sort -rn | head -1)"' > /etc/profile.d/dracut-test.sh
+RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)' > /etc/profile.d/dracut-test.sh
 
 # Install needed packages for the dracut CI container
 RUN dnf -y install --setopt=install_weak_deps=False \
index b6c1e2715de82333ef7a0c95523032e4742c4054..bfc5a98eb53d0e7d7a756bc09efa7867a69173f6 100644 (file)
@@ -5,7 +5,7 @@ MAINTAINER https://github.com/dracutdevs/dracut
 ENV container docker
 LABEL RUN="docker run -it --name NAME --privileged --ipc=host --net=host --pid=host -e NAME=NAME -e IMAGE=IMAGE IMAGE"
 
-RUN echo 'export DRACUT_NO_XATTR=1 KVERSION="$(rpm -qa kernel --qf "%{VERSION}-%{RELEASE}.%{ARCH}\n" | sort -rn | head -1)"' > /etc/profile.d/dracut-test.sh
+RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)' > /etc/profile.d/dracut-test.sh
 
 # Install needed packages for the dracut CI container
 RUN dnf -y install --setopt=install_weak_deps=False \