Browse Source

Change download mechanism for tss2 (git clone to wget)

tss2 is the only tarball that is generated using git clone, this
commit makes the downloader get all the tarballs using wget.

Change-Id: Ib6009341f6b7c890f43962f2c24fc73e95ec81b7
Story: 2004413
Signed-off-by: Marcela Rosales <marcela.a.rosales.jimenez@intel.com>
Marcela Rosales 3 months ago
parent
commit
40a9622d77
2 changed files with 7 additions and 37 deletions
  1. 6
    36
      centos-mirror-tools/dl_tarball.sh
  2. 1
    1
      centos-mirror-tools/tarball-dl.lst

+ 6
- 36
centos-mirror-tools/dl_tarball.sh View File

@@ -329,48 +329,18 @@ for line in $(cat $tarball_file); do
329 329
             rm -rf $directory_name
330 330
             rm e6aef069b6e97790cb127d5eeb86ae9ff0b7b0e3.tar.gz
331 331
         elif [ "$tarball_name" = "tss2-930.tar.gz" ]; then
332
-            dest_dir=ibmtpm20tss-tss
333
-            for dl_src in $dl_source; do
334
-                case $dl_src in
335
-                    $dl_from_stx_mirror)
336
-                        url="$(url_to_stx_mirror_url "$tarball_url" "$distro")"
337
-                        ;;
338
-                    $dl_from_upstream)
339
-                        url="$tarball_url"
340
-                        ;;
341
-                    *)
342
-                        echo "Error: Unknown dl_source '$dl_src'"
343
-                        continue
344
-                        ;;
345
-                esac
346
-
347
-                git clone $url $dest_dir
348
-                if [ $? -eq 0 ]; then
349
-                    # Success
350
-                    break
351
-                else
352
-                    echo "Warning: Failed to git clone from '$url'"
353
-                    continue
354
-                fi
355
-            done
356
-
357
-            if [ ! -d $dest_dir ]; then
358
-                echo "Error: Failed to git clone from '$tarball_url'"
359
-                echo "$tarball_url" > "$output_log"
332
+            download_package $tarball_url
333
+            if [ $? -ne 0 ]; then
360 334
                 error_count=$((error_count + 1))
361 335
                 popd    # pushd $output_tarball
362 336
                 continue
363 337
             fi
364
-
365
-            pushd $dest_dir
366
-            branch=$util
367
-            git checkout $branch
368
-            rm -rf .git
369
-            popd
370
-            mv ibmtpm20tss-tss $directory_name
338
+            unzip_file=ibmtpm20tss-tss-52539cb81c811c973b26ed23fafd28a700b7cc78
339
+            zip_file="$unzip_file.zip"
340
+            unzip $zip_file
341
+            mv $unzip_file $directory_name
371 342
             tar czvf $tarball_name $directory_name
372 343
             rm -rf $directory_name
373
-            popd     # pushd $dest_dir
374 344
         fi
375 345
         popd  # pushd $output_tarball
376 346
         continue

+ 1
- 1
centos-mirror-tools/tarball-dl.lst View File

@@ -28,7 +28,7 @@ requests-toolbelt-0.5.1.tar.gz#requests-toolbelt-0.5.1#https://github.com/reques
28 28
 rpm-4.14.0.tar.bz2#rpm-4.14.0#https://ftp.osuosl.org/pub/rpm/releases/rpm-4.14.x/rpm-4.14.0.tar.bz2#http##
29 29
 swtpm-0.1.0-253eac5.tar.gz#swtpm-0.1.0#https://github.com/stefanberger/swtpm/tarball/1303be7d03294fb02204cb8242f366cbf0da076d#http##
30 30
 !tpm-kmod-e6aef069.tar.gz#tpm#http://git.infradead.org/users/jjs/linux-tpmdd.git/snapshot/e6aef069b6e97790cb127d5eeb86ae9ff0b7b0e3.tar.gz#http_script#post-dl-script/tpm-kmod.sh
31
-!tss2-930.tar.gz#tss2-930#https://git.code.sf.net/p/ibmtpm20tss/tss#git#v930#
31
+!tss2-930.tar.gz#tss2-930#https://sourceforge.net/code-snapshots/git/i/ib/ibmtpm20tss/tss.git/ibmtpm20tss-tss-52539cb81c811c973b26ed23fafd28a700b7cc78.zip#http##
32 32
 spectre-meltdown-checker-0.37+-5cc77741.tar.gz#spectre-meltdown-checker#https://github.com/speed47/spectre-meltdown-checker/tarball/5cc77741af1d2f52140aa9f89339f56b6c4b6783#http##
33 33
 puppet-boolean-22b726dd78b0a60a224cc7054aebbf28e9306f62.tar.gz#puppet-boolean#https://github.com/voxpupuli/puppet-boolean/tarball/22b726dd78b0a60a224cc7054aebbf28e9306f62#http##
34 34
 puppet-dnsmasq-cff07e90890662972c97684a2baee964f68ff3ed.tar.gz#packstack/puppet/modules/dnsmasq/#https://github.com/procore/puppet-dnsmasq/tarball/cff07e90890662972c97684a2baee964f68ff3ed#http##

Loading…
Cancel
Save