Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/run_regression_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ jobs:
'4.9.337',
'3.18.140',
'3.10.108',
'6.12.0-124.47.1.el10_1^AlmaLinux^10.1',
'6.12.0-124.56.1.el10_1^Rocky^10.1',
'5.14.0-611.55.1.el9_7^Rocky^9.7',
'4.18.0-553.124.1.el8_10^Rocky^8.10',
'6.12.0-55.43.1.el10_0^AlmaLinux^10.0',
'5.14.0-611.45.1.el9_7^AlmaLinux^9.7',
'5.14.0-570.62.1.el9_6^AlmaLinux^9.6',
'5.14.0-503.40.1.el9_5^AlmaLinux^9.5',
'5.14.0-427.42.1.el9_4^AlmaLinux^9.4',
'5.14.0-362.24.1.el9_3^AlmaLinux^9.3',
'5.14.0-284.30.1.el9_2^AlmaLinux^9.2',
'5.14.0-162.23.1.el9_1^AlmaLinux^9.1',
'5.14.0-70.30.1.el9_0^AlmaLinux^9.0',
'4.18.0-553.117.1.el8_10^AlmaLinux^8.10',
'4.18.0-513.24.1.el8_9^AlmaLinux^8.9',
'4.18.0-477.13.1.el8_8^AlmaLinux^8.8',
'4.18.0-425.19.2.el8_7^AlmaLinux^8.7',
Expand Down
6 changes: 3 additions & 3 deletions nightly/conf/nightly.conf
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ ABT_KERNELS=" \
3.12.74-nc \
3.11.10-nc \
3.10.108-nc \
6.12.0-124.47.1.el10_1^AlmaLinux^10.1-nc \
6.12.0-124.56.1.el10_1^Rocky^10.1-nc \
5.14.0-611.55.1.el9_7^Rocky^9.7-nc \
4.18.0-553.124.1.el8_10^Rocky^8.10-nc \
6.12.0-55.43.1.el10_0^AlmaLinux^10.0-nc \
5.14.0-611.45.1.el9_7^AlmaLinux^9.7-nc \
5.14.0-570.62.1.el9_6^AlmaLinux^9.6-nc \
5.14.0-503.40.1.el9_5^AlmaLinux^9.5-nc \
5.14.0-427.42.1.el9_4^AlmaLinux^9.4-nc \
5.14.0-362.24.1.el9_3^AlmaLinux^9.3-nc \
5.14.0-284.30.1.el9_2^AlmaLinux^9.2-nc \
5.14.0-162.23.1.el9_1^AlmaLinux^9.1-nc \
5.14.0-70.30.1.el9_0^AlmaLinux^9.0-nc \
4.18.0-553.117.1.el8_10^AlmaLinux^8.10-nc \
4.18.0-513.24.1.el8_9^AlmaLinux^8.9-nc \
4.18.0-477.13.1.el8_8^AlmaLinux^8.8-nc \
4.18.0-425.19.2.el8_7^AlmaLinux^8.7-nc \
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-kernel-patch
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function specialize_patch {
local releasevermajor="$1"
local releaseverminor="$2"
case "$distro" in
CentOS|AlmaLinux)
CentOS|AlmaLinux|RockyLinux|Rocky)
if [ -n "$releasevermajor" ]; then
ao=(
-v "RHEL_MAJOR=$releasevermajor"
Expand Down
69 changes: 56 additions & 13 deletions scripts/kernel-functions
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function extract_kernel_tree {
function patch_kernel {
case "$1" in
*^*)
# RHEL / CentOS or UEK.
# RHEL-compatible distro or UEK.
;;
*)
# See also commit f153b82121b0 ("Sanitize gcc version header
Expand Down Expand Up @@ -822,37 +822,80 @@ EOF
done
}

function rpm_payload_is_readable {
rpm2cpio "$1" >/dev/null 2>&1
}

function download_valid_rpm {
local rpmfile="$1"
local tmpfile="${rpmfile}.tmp.$$"
local url

shift

if [ "$(type -p rpm2cpio)" = "" ]; then
echo "Error: rpm2cpio has not been installed." >&2
return 1
fi

if [ -e "$rpmfile" ]; then
if rpm_payload_is_readable "$rpmfile"; then
return 0
fi
echo "Removing invalid cached RPM ${kernel_downloads}/${rpmfile}." >&2
rm -f "$rpmfile"
fi

for url; do
rm -f "$tmpfile"
if wget -q -O "$tmpfile" "${url%/}/${rpmfile}"; then
if rpm_payload_is_readable "$tmpfile"; then
mv "$tmpfile" "$rpmfile"
return 0
fi
echo "Downloaded RPM ${url%/}/${rpmfile} has an invalid payload." >&2
fi
done
rm -f "$tmpfile"
return 1
}

function download_and_extract_distro_rpm {
[ -n "$1" ] || return $?
set -- ${1//^/ }
local kver=$1
local distro=$2
local release=$3
local rpmfile

mkdir -p "${kernel_downloads}" || return $?

(
cd "${kernel_downloads}" || exit $?
read -a urls -r <<<"$(get_srpm_urls "$distro" "$release" x86_64 |
tr '\n' ' ')"
for url in "${urls[@]}"; do
case "$distro" in
CentOS|AlmaLinux)
wget -q -nc "${url}/kernel-${kver}.src.rpm" && break
;;
UEK)
wget -q -nc "${url}/kernel-uek-${kver}.src.rpm" && break
;;
esac
done
)
case "$distro" in
CentOS|AlmaLinux|RockyLinux|Rocky)
rpmfile="kernel-${kver}.src.rpm"
;;
UEK)
rpmfile="kernel-uek-${kver}.src.rpm"
;;
*)
echo "Error: unknown distro $distro" >&2
return 1
;;
esac
download_valid_rpm "$rpmfile" "${urls[@]}"
) || return $?
local tmpdir=kernel-tree-tmp-$$
rm -rf "linux-$1" "${tmpdir}"
mkdir "${tmpdir}" || return $?
(
set -o pipefail
cd "${tmpdir}" &&
case "$distro" in
CentOS|AlmaLinux)
CentOS|AlmaLinux|RockyLinux|Rocky)
rpm2cpio "${kernel_downloads}/kernel-${kver}.src.rpm" |
cpio -i --make-directories --quiet &&
tar xaf "linux-${kver}"*.tar.* &&
Expand Down
18 changes: 18 additions & 0 deletions scripts/rhel-rpm-functions
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ function get_srpm_urls() {
echo "https://repo.almalinux.org/vault/${releasever}/BaseOS/Source/Packages/";;
esac
;;
"RockyLinux"|"Rocky")
case $releasever in
[89]*|10*)
echo "https://dl.rockylinux.org/pub/rocky/${releasever}/BaseOS/source/tree/Packages/k/"
echo "https://dl.rockylinux.org/pub/rocky/${releasever}/BaseOS/source/tree/Packages/"
echo "https://dl.rockylinux.org/vault/rocky/${releasever}/BaseOS/source/tree/Packages/k/"
echo "https://dl.rockylinux.org/vault/rocky/${releasever}/BaseOS/source/tree/Packages/";;
esac
;;
"Oracle Linux Server"|"UEK")
echo "http://public-yum.oracle.com/repo/OracleLinux/OL${releasevermajor}/${releaseverminor}/base/${arch}/getPackageSource"
echo "http://public-yum.oracle.com/repo/OracleLinux/OL${releasevermajor}/latest/${arch}/getPackageSource"
Expand Down Expand Up @@ -101,6 +110,15 @@ function get_rpm_urls() {
echo "https://mirror.yandex.ru/almalinux/${releasever}/BaseOS/${arch}/os/Packages/";;
esac
;;
"RockyLinux"|"Rocky")
case $releasever in
[89]*|10*)
echo "https://dl.rockylinux.org/pub/rocky/${releasever}/BaseOS/${arch}/os/Packages/k/"
echo "https://dl.rockylinux.org/pub/rocky/${releasever}/BaseOS/${arch}/os/Packages/"
echo "https://dl.rockylinux.org/vault/rocky/${releasever}/BaseOS/${arch}/os/Packages/k/"
echo "https://dl.rockylinux.org/vault/rocky/${releasever}/BaseOS/${arch}/os/Packages/";;
esac
;;
"Oracle Linux Server"|"UEK")
echo "http://public-yum.oracle.com/repo/OracleLinux/OL${releasevermajor}/${releaseverminor}/base/${arch}/getPackageSource"
echo "http://public-yum.oracle.com/repo/OracleLinux/OL${releasevermajor}/latest/${arch}/getPackageSource"
Expand Down
Loading