From eaf545acc4427ea4eecedd9548e7f1085b2a3640 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Thu, 16 Nov 2023 13:59:52 -0700 Subject: [PATCH] vault no norepodata --- func/core/pkg_attr/10-check-attr.sh | 7 ++----- sync/common_9 | 2 +- sync/vault-release-no-repodata.sh | 30 ++++++++++++++++++++++++++++- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/func/core/pkg_attr/10-check-attr.sh b/func/core/pkg_attr/10-check-attr.sh index 9f24ab2..eef6996 100755 --- a/func/core/pkg_attr/10-check-attr.sh +++ b/func/core/pkg_attr/10-check-attr.sh @@ -2,6 +2,8 @@ ATTRTEST="/var/tmp/attrtest.img" ATTRMNT="/mnt/attrtest" +trap 'umount /mnt/attrtest ; /bin/rm -f ${ATTRTEST} ; /bin/rm -rf ${ATTRMNT}' EXIT + r_log "attr" "Checking that *attr works" dd if=/dev/zero of="${ATTRTEST}" bs=1024000 count=100 &>/dev/null r_checkExitStatus $? @@ -14,8 +16,3 @@ setfattr -n user.test "${ATTRMNT}/testfile" getfattr "${ATTRMNT}/testfile" | grep -oq "user.test" r_checkExitStatus $? - -# Cleanup -umount /mnt/attrtest -/bin/rm -f "${ATTRTEST}" -/bin/rm -rf "${ATTRMNT}" diff --git a/sync/common_9 b/sync/common_9 index 684b3db..a49fa5e 100644 --- a/sync/common_9 +++ b/sync/common_9 @@ -37,7 +37,7 @@ RELEASE_COMPOSE_ROOT="${COMPOSE_ROOT}/${MAJOR}/latest-${SHORT}-${MAJOR}${COMPOSE # consistency. NONMODS_REPOS=( extras - Devel + devel plus ) diff --git a/sync/vault-release-no-repodata.sh b/sync/vault-release-no-repodata.sh index 3baf9e0..b68ce4e 100644 --- a/sync/vault-release-no-repodata.sh +++ b/sync/vault-release-no-repodata.sh @@ -1,6 +1,8 @@ #!/bin/bash # Syncs everything from production to vault +DATE="$(date +%Y%m%d%H%M%S)" + if [[ "$RLREL" == "lh" ]] || [[ "$RLREL" == "beta" ]]; then echo "Lookahead nor Beta should be vaulted" exit 1 @@ -19,6 +21,32 @@ if [ $ret_val -eq "0" ]; then TARGET="${PRODUCTION_ROOT}/${VAULT_STUB}/${REV}" mkdir -p "${TARGET}" rsync_no_delete_prod_no_repodata "${REV}" "${TARGET}" - echo "Syncing to the vault completed. Please run the file list script." fi +if [ "$RLVER" -eq "9" ]; then + echo "copying module data" + for repo in "${MODS[@]}"; do + for arch in "${ARCHES[@]}"; do + mkdir -p "${TARGET}/${repo}/${arch}/os/repodata" + cp "${REV}/${repo}/${arch}/os/repodata/*MODULES.yaml.gz" "/tmp/${repo}-${arch}-${DATE}.modules.yaml.gz" + pushd /tmp || exit 1 + gunzip "/tmp/${repo}-${arch}-${DATE}.modules.yaml.gz" + popd || exit 1 + cp "/tmp/${repo}-${arch}-${DATE}.modules.yaml" "${TARGET}/${repo}/${arch}/os/repodata/" + done + done + # groups + for repo in "${MODS_REPOS[@]}"; do + for arch in "${ARCHES[@]}"; do + createrepo_comps "${TARGET}/${repo}/${arch}/os" "${REV}" "${REV}/${repo}/${arch}/os/repodata/*GROUPS.xml" + done + done + # no groups + for repo in "${NONMODS_REPOS[@]}"; do + for arch in "${ARCHES[@]}"; do + createrepo_update "${TARGET}/${repo}/${arch}/os" "${REV}" + done + done +fi + +echo "Syncing to the vault completed. Please run the file list script."