From 3e9d56440466bd62a916ef11d38d682e595d2806 Mon Sep 17 00:00:00 2001 From: Jim Somerville Date: Wed, 2 Feb 2022 17:51:47 -0500 Subject: [PATCH] dl_tarball: Add special support for ice comms ddp fw This is a firmware package for Intel Ice NIC hardware, addressing dynamic device personalization for the communications market. Intel likes their zips of zips, causing us to have to perform an extra extraction step to get the zip file that we want. Verification: Success Path - create a test .lst file with just the entry for the intel ice comms ddp firmware in it - run the dl_tarball.sh script against the test .lst file - verify that the ice_comms zip file is successfully produced in the proper directory - verify that the wrapper zip file is also left in the proper directory Failure Path - modify test .lst so that the url to the wrapper zip is no longer valid - verify that the script reports the download error properly and handles it properly Story: 2009823 Task: 44410 Change-Id: I2f8229d9a67ca986c4ad97049e8abf141cd07895 Signed-off-by: Jim Somerville --- centos-mirror-tools/dl_tarball.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/centos-mirror-tools/dl_tarball.sh b/centos-mirror-tools/dl_tarball.sh index 99843478..6543c4c4 100755 --- a/centos-mirror-tools/dl_tarball.sh +++ b/centos-mirror-tools/dl_tarball.sh @@ -315,6 +315,21 @@ for line in $(cat $tarball_file); do # rm -f "$tarball_name" rm -rf "$directory_name" + elif [[ "${tarball_name}" = '800-Series-DDP-Comms-Package-1.3.31.0.zip' ]]; then + download_file --quiet "${tarball_url}" "${tarball_name}" + if [ $? -ne 0 ]; then + echo "Warning: failed to download '${tarball_url}'" + error_count=$((error_count + 1)) + popd > /dev/null # pushd $output_tarball + continue + fi + + # Just extract exactly what we want, leaving no garbage behind to cleanup + unzip "${tarball_name}" ice_comms-1.3.31.0.zip + # Don't delete the original zip archive we just extracted from. + # We don't use it, but it will prevent re-downloading this file. + # rm -f "${tarball_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"