From 54358372468df06321a3299c071cf75bc88e6892 Mon Sep 17 00:00:00 2001 From: "M. Vefa Bicakci" Date: Fri, 30 Jul 2021 13:04:19 -0400 Subject: [PATCH] Add build dependencies of kexec-tools In preparation of updating kexec-tools for the v5.10 kernel, this commit: - Adds the build dependencies of kexec-tools to the distro layer, - Removes the kexec source RPM file reference from the flock layer, given that kexec-tools will now be built in the distro layer, and - Modifies the dl_tarball.sh script so that the kexec-tools source RPM is downloaded and the "kdump-anaconda-addon-003-29-g4c517c5.tar.gz" source code archive is extracted from the source RPM file. This is done because this tarball does not appear to be publicly available otherwise. The only reference to the commit ID 4c517c5 is on a Red Hat employee's personal Github account at: https://github.com/ryncsn/kdump-anaconda-addon/commits/rhel-7 Verification: kexec-tools was successfully built with this patch in a monolithic StarlingX build environment. A potential failure of wget was found to be gracefully handled by inserting a "false" command after the line where wget is called, and, in a separate experiment, by replacing the wget command line with "false". (Thanks to Jim Somerville for pointing out the buggy failure path in an earlier revision of this patch.) Story: 2008921 Task: 43040 Signed-off-by: Jiping Ma Signed-off-by: M. Vefa Bicakci Change-Id: Id8df3435d8660070cce31b9f994b386b020ed6e6 --- .../centos/distro/rpms_centos3rdparties.lst | 3 +++ .../centos/flock/rpms_centos3rdparties.lst | 1 - centos-mirror-tools/dl_tarball.sh | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/centos-mirror-tools/config/centos/distro/rpms_centos3rdparties.lst b/centos-mirror-tools/config/centos/distro/rpms_centos3rdparties.lst index 343bad404..1de43e587 100644 --- a/centos-mirror-tools/config/centos/distro/rpms_centos3rdparties.lst +++ b/centos-mirror-tools/config/centos/distro/rpms_centos3rdparties.lst @@ -16,8 +16,10 @@ devtoolset-7-runtime-7.1-4.el7.x86_64.rpm # elfutils-0.176-2.el7.x86_64.rpm provided by mock # elfutils-default-yama-scope-0.176-2.el7.noarch.rpm provided by mock # elfutils-devel-0.176-2.el7.x86_64.rpm provided by mock +elfutils-devel-static-0.176-2.el7.x86_64.rpm # elfutils-libelf-0.176-2.el7.x86_64.rpm provided by mock # elfutils-libelf-devel-0.176-2.el7.x86_64.rpm provided by mock +elfutils-libelf-devel-static-0.176-2.el7.x86_64.rpm # elfutils-libs-0.176-2.el7.x86_64.rpm provided by mock gsettings-desktop-schemas-3.28.0-2.el7.x86_64.rpm gssproxy-0.7.0-21.el7.x86_64.rpm @@ -85,3 +87,4 @@ systemtap-sdt-devel-3.3-3.el7.x86_64.rpm # util-linux-2.23.2-59.el7.x86_64.rpm provided by mock valgrind-3.13.0-13.el7.x86_64.rpm valgrind-devel-3.13.0-13.el7.x86_64.rpm +zlib-static-1.2.7-18.el7.x86_64.rpm diff --git a/centos-mirror-tools/config/centos/flock/rpms_centos3rdparties.lst b/centos-mirror-tools/config/centos/flock/rpms_centos3rdparties.lst index 28280fab7..4cb78e1ce 100644 --- a/centos-mirror-tools/config/centos/flock/rpms_centos3rdparties.lst +++ b/centos-mirror-tools/config/centos/flock/rpms_centos3rdparties.lst @@ -27,7 +27,6 @@ kata-proxy-bin-1.11.0-3.1.x86_64.rpm kata-runtime-1.11.0-3.1.x86_64.rpm kata-shim-1.11.0-3.1.x86_64.rpm kata-shim-bin-1.11.0-3.1.x86_64.rpm -kexec-tools-2.0.15-21.el7.x86_64.rpm # libblkid-2.23.2-59.el7.x86_64.rpm provided by mock # libcom_err-1.42.9-13.el7.x86_64.rpm provided by mock libcom_err-devel-1.42.9-13.el7.x86_64.rpm diff --git a/centos-mirror-tools/dl_tarball.sh b/centos-mirror-tools/dl_tarball.sh index c4647323a..d19c0d1eb 100755 --- a/centos-mirror-tools/dl_tarball.sh +++ b/centos-mirror-tools/dl_tarball.sh @@ -444,6 +444,24 @@ for line in $(cat $tarball_file); do popd > /dev/null # pushd rt-setup # Cleanup rm -rf rt-setup + elif [[ "$tarball_name" = "kdump-anaconda-addon-003-29-g4c517c5.tar.gz" ]]; then + mkdir -p "$directory_name" + pushd "$directory_name" + + src_rpm_name="$(echo "$tarball_url" | rev | cut -d/ -f1 | rev)" + + wget -q -t 5 --wait=15 -O "$src_rpm_name" "$tarball_url" + if [ $? -eq 0 ]; then + rpm2cpio "$src_rpm_name" | cpio --quiet -i "$tarball_name" + mv "$tarball_name" .. + else + echo "Error: Failed to download '$tarball_url'" + echo "$tarball_url" > "$output_log" + error_count=$((error_count + 1)) + fi + + popd >/dev/null # pushd "$directory_name" + rm -rf "$directory_name" fi popd > /dev/null # pushd $output_tarball continue