diff --git a/sync/common b/sync/common index 89468e6..3c4ade1 100644 --- a/sync/common +++ b/sync/common @@ -285,7 +285,8 @@ function modifyrepo_module() { function sign_data() { local TARGET="${1}" - test -f /root/bin/sign-repo.sh && /root/bin/sign-repo.sh \ + local VER="${2}" + test -f "/root/bin/sign-repo-${VER}.sh" && "/root/bin/sign-repo-${VER}.sh" \ "${TARGET}" } diff --git a/sync/minor-release-sync-to-staging.sh b/sync/minor-release-sync-to-staging.sh index 74bdee1..3e37728 100644 --- a/sync/minor-release-sync-to-staging.sh +++ b/sync/minor-release-sync-to-staging.sh @@ -105,8 +105,8 @@ fi # Change Symlink if required echo "Setting symlink to ${REV}" pushd "${STAGING_ROOT}/${CATEGORY_STUB}" || exit -/bin/rm "${STAGING_ROOT}/${CATEGORY_STUB}/latest-8" -ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" latest-8 +/bin/rm "${STAGING_ROOT}/${CATEGORY_STUB}/latest-${MAJ}" +ln -sr "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" "latest-${MAJ}" echo "Attempting hard link" perform_hardlink "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" popd || exit diff --git a/sync/sign-repos-only.sh b/sync/sign-repos-only.sh index 2029428..410ddc9 100644 --- a/sync/sign-repos-only.sh +++ b/sync/sign-repos-only.sh @@ -10,8 +10,7 @@ for y in "${ALL_REPOS[@]}"; do if [ "$ret_val" -eq 0 ]; then sed -i '/<\/open-size>/d' \ "${STAGING_ROOT}/${RELEASE_DIR}/${y}/source/tree/repodata/repomd.xml" - test -f /root/bin/sign-repo.sh && /root/bin/sign-repo.sh \ - "${STAGING_ROOT}/${RELEASE_DIR}/${y}/source/tree/repodata/repomd.xml" + sign_data "${STAGING_ROOT}/${RELEASE_DIR}/${y}/source/tree/repodata/repomd.xml" "${MAJ}" else echo "${STAGING_ROOT}/${RELEASE_DIR}/${y}/source/tree does not exist" fi @@ -29,8 +28,7 @@ for x in "${ARCHES[@]}"; do if [ "$ret_val" -eq 0 ]; then sed -i '/<\/open-size>/d' \ "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/${z}/repodata/repomd.xml" - test -f /root/bin/sign-repo.sh && /root/bin/sign-repo.sh \ - "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/${z}/repodata/repomd.xml" + sign_data "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/${z}/repodata/repomd.xml" "${MAJ}" else echo "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/${z} does not exist" fi @@ -43,8 +41,7 @@ for x in "${ARCHES[@]}"; do if [ "$ret_val" -eq 0 ]; then sed -i '/<\/open-size>/d' \ "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/debug/tree/repodata/repomd.xml" - test -f /root/bin/sign-repo.sh && /root/bin/sign-repo.sh \ - "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/debug/tree/repodata/repomd.xml" + sign_data "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/debug/tree/repodata/repomd.xml" "${MAJ}" else echo "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/debug/tree does not exist" fi @@ -60,8 +57,7 @@ for x in "${ARCHES[@]}"; do "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/os/repodata/repomd.xml" sed -i '/<\/open-size>/d' \ "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/kickstart/repodata/repomd.xml" - test -f /root/bin/sign-repo.sh && /root/bin/sign-repo.sh \ - "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/os/repodata/repomd.xml" + sign_data "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/os/repodata/repomd.xml" "${MAJ}" else echo "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/os does not exist" fi @@ -77,8 +73,7 @@ for x in "${ARCHES[@]}"; do sed -i '/<\/open-size>/d' \ "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/kickstart/repodata/repomd.xml" # This might not be necessary, but it does not hurt incase repomd is modified - test -f /root/bin/sign-repo.sh && /root/bin/sign-repo.sh \ - "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/os/repodata/repomd.xml" + sign_data "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/os/repodata/repomd.xml" "${MAJ}" else echo "${STAGING_ROOT}/${RELEASE_DIR}/${y}/${x}/os does not exist" fi diff --git a/sync/sync-to-staging.sh b/sync/sync-to-staging.sh index 837d722..81c915e 100644 --- a/sync/sync-to-staging.sh +++ b/sync/sync-to-staging.sh @@ -59,7 +59,7 @@ if [ $ret_val -eq "0" ]; then if [ $ret_val -eq "0" ]; then createrepo_update "${TARGET}/${src_repo}" "${REVISION}" fix_metadata "${TARGET}/${src_repo}/repodata/repomd.xml" - sign_data "${TARGET}/${src_repo}/repodata/repomd.xml" + sign_data "${TARGET}/${src_repo}/repodata/repomd.xml" "${RLVER}" else echo "${src_repo} not found" fi @@ -77,7 +77,7 @@ if [ $ret_val -eq "0" ]; then if [ $ret_val -eq "0" ]; then createrepo_update "${TARGET}/${debug_repo}" "${REVISION}" fix_metadata "${TARGET}/${debug_repo}/repodata/repomd.xml" - sign_data "${TARGET}/${debug_repo}/repodata/repomd.xml" + sign_data "${TARGET}/${debug_repo}/repodata/repomd.xml" "${RLVER}" else echo "${debug_repo} not found" fi @@ -94,7 +94,7 @@ if [ $ret_val -eq "0" ]; then if [ $ret_val -eq "0" ]; then createrepo_comps "${REPO_PATH}" "${REVISION}" "${COMP_PATH}" fix_metadata "${REPO_PATH}/repodata/repomd.xml" - sign_data "${REPO_PATH}/repodata/repomd.xml" + sign_data "${REPO_PATH}/repodata/repomd.xml" "${RLVER}" else echo "${comp_repo} not found" fi @@ -120,7 +120,7 @@ if [ $ret_val -eq "0" ]; then if [ $ret_val -eq 0 ]; then modifyrepo_module "${MOD_PATH}" "${MOD_YAML}" fix_metadata "${MOD_PATH}/repomd.xml" - sign_data "${MOD_PATH}/repomd.xml" + sign_data "${MOD_PATH}/repomd.xml" "${RLVER}" else echo "${mod_repo} not found" fi @@ -134,7 +134,7 @@ if [ $ret_val -eq "0" ]; then if [ $ret_val -eq "0" ]; then createrepo_update "${TARGET}/${arch_repo}" "${REVISION}" fix_metadata "${TARGET}/${arch_repo}/repodata/repomd.xml" - sign_data "${TARGET}/${arch_repo}/repodata/repomd.xml" + sign_data "${TARGET}/${arch_repo}/repodata/repomd.xml" "${RLVER}" else echo "${arch_repo} not found" fi