From 7e1188574e16f2daa0f8af2ab5c9b64edfec78f5 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Fri, 31 Jan 2020 10:10:50 -0500 Subject: [PATCH] scripts: Update signing scripts to support CentOS/RHEL8 Signed-off-by: David Galloway --- scripts/sign-rpms | 2 +- scripts/sync-pull | 12 +++++++----- scripts/sync-push | 6 ++++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/scripts/sign-rpms b/scripts/sign-rpms index 8d4d5a08..b757fe5c 100644 --- a/scripts/sign-rpms +++ b/scripts/sign-rpms @@ -26,7 +26,7 @@ distros=( centos rhel ) # Although upstream these might be "el6" or "el7", we just use these since they # are the same values used by the build system. -distro_versions=( 6 7 ) +distro_versions=( 6 7 8 ) # To unlock the gpg keys for the current run, it is requested over STDIN as # a password and later passed into GPG directly as a variable. diff --git a/scripts/sync-pull b/scripts/sync-pull index 327dd001..cdeb197c 100644 --- a/scripts/sync-pull +++ b/scripts/sync-pull @@ -27,7 +27,7 @@ echo "Found the most packages ($current_highest_count) in $highest_combo." # Check the the DEB and RPM chacra endpoints to see if the repos are or need updating. # This helps prevent packages from getting missed when signing and pushing. need_rerun=false -for endpoint in https://chacra.ceph.com/repos/$project/$release/$sha1/$highest_combo https://chacra.ceph.com/repos/$project/$release/$sha1/centos/7; do +for endpoint in https://chacra.ceph.com/repos/$project/$release/$sha1/$highest_combo https://chacra.ceph.com/repos/$project/$release/$sha1/centos/{7,8}; do chacra_repo_status=$(curl -s -L $endpoint) # python is only used here because jq isn't installed on the signer box chacra_needs_update=$(echo $chacra_repo_status | python -mjson.tool | grep needs_update | awk '{ print $2 }' | sed 's/,$//') @@ -44,10 +44,12 @@ echo $deb_cmd echo "--------------------------------------------" rsync -Lavh -e 'ssh -p 2222' --progress $deb_cmd -el7_cmd="ubuntu@chacra.ceph.com:/opt/repos/$project/$release/$sha1/centos/7/flavors/default/* /opt/repos/$project/$release/centos/7/" -echo $el7_cmd -echo "--------------------------------------------" -rsync -Lavh -e 'ssh -p 2222' --progress $el7_cmd +for el_version in 7 8; do + el_cmd="ubuntu@chacra.ceph.com:/opt/repos/$project/$release/$sha1/centos/$el_version/flavors/default/* /opt/repos/$project/$release/centos/$el_version/" + echo $el_cmd + echo "--------------------------------------------" + rsync -Lavh -e 'ssh -p 2222' --progress $el_cmd +done if $need_rerun; then echo diff --git a/scripts/sync-push b/scripts/sync-push index bd683293..1b677424 100644 --- a/scripts/sync-push +++ b/scripts/sync-push @@ -15,8 +15,10 @@ ceph_sync() { deb_cmd="/opt/repos/ceph/$release/debian/jessie/* signer@download.ceph.com:/data/download.ceph.com/www/debian-$release/" rsync --progress --exclude '*lockfile*' -avr $deb_cmd - el7_cmd="/opt/repos/ceph/$release/centos/7/* signer@download.ceph.com:/data/download.ceph.com/www/rpm-$release/el7/" - rsync --progress -avr $el7_cmd + for el_version in 7 8; do + el_cmd="/opt/repos/ceph/$release/centos/$el_version/* signer@download.ceph.com:/data/download.ceph.com/www/rpm-$release/el${el_version}/" + rsync --progress -avr $el_cmd + done } for i in "${releases[@]}" -- 2.39.5