From 0e8d164e801e3fec796fa24b2eaf90f50726c38a Mon Sep 17 00:00:00 2001 From: Jiping Ma Date: Mon, 14 Jun 2021 19:37:34 -0700 Subject: [PATCH] Prep: Upgrade kernel 5.10 related packages out of tree kernel modules need to be upgraded with kernel 5.10. mlnx-ofa_kernel-5.3-OFED.5.3.1.0.0.1.src.rpm, QAT1.7.L.4.14.0-00031.tar.gz, dpdk-kmods-2a9f0f72a2d926382634cf8f1de10e1acf57542b.tar.gz, OPAE_1.3.7-5_el7.zip that included opae-intel-fpga-driver-2.0.1-10.src.rpm. need to be downloaded, so modify dl_tarball.sh to support it. This commit makes it possible to download newer versions in preparation for switching over to using them later. Previously, mlnx-ofa_kernel has been done as a tarball with the .lst file in the kernel repo. We now take the source as an rpm, and feel that it is better done via the rpms_3rdparties.lst file, so we move it there. Partial-Story: 2008921 Task: 42590 Signed-off-by: Jiping Ma Change-Id: Ie81ed225c6912bbdc046c90b86abddcec69c33da --- .../config/centos/distro/rpms_3rdparties.lst | 1 + centos-mirror-tools/dl_tarball.sh | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/centos-mirror-tools/config/centos/distro/rpms_3rdparties.lst b/centos-mirror-tools/config/centos/distro/rpms_3rdparties.lst index fba16ff5..c7d23876 100644 --- a/centos-mirror-tools/config/centos/distro/rpms_3rdparties.lst +++ b/centos-mirror-tools/config/centos/distro/rpms_3rdparties.lst @@ -6,6 +6,7 @@ glib2-doc-2.56.1-7.el7.noarch.rpm#http://mirror.centos.org/centos/7/os/x86_64/Pa kernel-headers-4.18.0-147.3.1.el8_1.x86_64.rpm#http://mirror.centos.org/centos/8.1.1911/BaseOS/x86_64/os/Packages/kernel-headers-4.18.0-147.3.1.el8_1.x86_64.rpm libpng-1.5.13-8.el7.x86_64.rpm#http://mirror.centos.org/centos/7/os/x86_64/Packages/libpng-1.5.13-8.el7.x86_64.rpm libpng-devel-1.5.13-8.el7.x86_64.rpm#http://mirror.centos.org/centos/7/os/x86_64/Packages/libpng-devel-1.5.13-8.el7.x86_64.rpm +mlnx-ofa_kernel-5.3-OFED.5.3.1.0.0.1.src.rpm#https://linux.mellanox.com/public/repo/mlnx_ofed/5.3-1.0.0.1/SRPMS/mlnx-ofa_kernel-5.3-OFED.5.3.1.0.0.1.src.rpm python2-openstackdocstheme-1.23.2-1.el7.noarch.rpm#https://cbs.centos.org/kojifiles/packages/python-openstackdocstheme/1.23.2/1.el7/noarch/python2-openstackdocstheme-1.23.2-1.el7.noarch.rpm python2-pip-9.0.3-6.fc29.noarch.rpm#https://kojipkgs.fedoraproject.org/packages/python-pip/9.0.3/6.fc29/noarch/python2-pip-9.0.3-6.fc29.noarch.rpm python2-pytest-httpbin-0.2.3-6.el7.noarch.rpm#http://cbs.centos.org/kojifiles/packages/python-pytest-httpbin/0.2.3/6.el7/noarch/python2-pytest-httpbin-0.2.3-6.el7.noarch.rpm diff --git a/centos-mirror-tools/dl_tarball.sh b/centos-mirror-tools/dl_tarball.sh index 3559e1f5..f3c5059c 100755 --- a/centos-mirror-tools/dl_tarball.sh +++ b/centos-mirror-tools/dl_tarball.sh @@ -297,6 +297,22 @@ for line in $(cat $tarball_file); do popd > /dev/null # pushd $output_tarball continue fi + elif [[ "$tarball_name" = 'OPAE_1.3.7-5_el7.zip' ]]; then + srpm_path="${directory_name}/source_code/ + wget -q -t 5 --wait=15 -O "$tarball_name" "$tarball_url" + if [ $? -ne 0 ]; then + error_count=$((error_count + 1)) + popd > /dev/null # pushd $output_tarball + continue + fi + + unzip "$tarball_name" + cp "${srpm_path}/opae-intel-fpga-driver-2.0.1-10.src.rpm" . + # Don't delete the original OPAE_1.3.7-5_el7.zip tarball. + # We don't use it, but it will prevent re-downloading this file. + # rm -f "$tarball_name" + + rm -rf "$directory_name" elif [[ "$tarball_name" = 'MLNX_OFED_SRC-5.0-2.1.8.0.tgz' ]]; then srpm_path="${directory_name}/SRPMS/" download_package "$tarball_name" "$tarball_url" @@ -322,6 +338,33 @@ for line in $(cat $tarball_file); do popd > /dev/null # pushd $output_tarball continue fi + elif [ "$tarball_name" = "QAT1.7.L.4.14.0-00031.tar.gz" ]; then + download_package "$tarball_name" "$tarball_url" + if [ $? -ne 0 ]; then + error_count=$((error_count + 1)) + popd > /dev/null # pushd $output_tarball + continue + fi + elif [ "$tarball_name" = "dpdk-kmods-2a9f0f72a2d926382634cf8f1de10e1acf57542b.tar.gz" ]; then + dest_dir=dpdk-kmods + git clone $tarball_url $dest_dir + + if [ ! -d $dest_dir ]; then + echo "Error: Failed to git clone from '$tarball_url'" + echo "$tarball_url" > "$output_log" + error_count=$((error_count + 1)) + popd > /dev/null # pushd $output_tarball + continue + fi + + pushd $dest_dir > /dev/null + rev=$util + git checkout -b temp $rev + rm -rf .git + popd > /dev/null + mv dpdk-kmods $directory_name + tar czvf $tarball_name $directory_name + rm -rf $directory_name elif [ "$tarball_name" = "tss2-930.tar.gz" ]; then dest_dir=ibmtpm20tss-tss for dl_src in $dl_source; do