From 1c90edaa70df0f0d157ced136ac83180b6269dd5 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Mon, 4 Jul 2022 13:10:48 -0700 Subject: [PATCH] fix readme and bump to RC2 --- iso/empanadas/empanadas/configs/el9.yaml | 2 +- iso/empanadas/empanadas/util/dnf_utils.py | 2 +- sync/common_9 | 2 +- sync/sync-to-staging-9.sh | 40 +++++++++++++++++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 sync/sync-to-staging-9.sh diff --git a/iso/empanadas/empanadas/configs/el9.yaml b/iso/empanadas/empanadas/configs/el9.yaml index 786c46a..e63cd6e 100644 --- a/iso/empanadas/empanadas/configs/el9.yaml +++ b/iso/empanadas/empanadas/configs/el9.yaml @@ -2,7 +2,7 @@ '9': fullname: 'Rocky Linux 9.0' revision: '9.0' - rclvl: 'RC1' + rclvl: 'RC2' major: '9' minor: '0' profile: '9' diff --git a/iso/empanadas/empanadas/util/dnf_utils.py b/iso/empanadas/empanadas/util/dnf_utils.py index c7ced10..336e782 100644 --- a/iso/empanadas/empanadas/util/dnf_utils.py +++ b/iso/empanadas/empanadas/util/dnf_utils.py @@ -996,7 +996,7 @@ class RepoSync: version=empanadas.__version__ ) - with open(metadata_dir + '/README') as readme_file: + with open(metadata_dir + '/README', 'w+', encoding='utf-8') as readme_file: readme_file.write(readme_output) readme_file.close() diff --git a/sync/common_9 b/sync/common_9 index 8b1cbb8..777ae46 100644 --- a/sync/common_9 +++ b/sync/common_9 @@ -9,7 +9,7 @@ MAJOR="${REVISION:0:1}" MINOR="${REVISION:2:1}" # comment or blank if needed -APPEND_TO_DIR="-RC1" +APPEND_TO_DIR="-RC2" STAGING_ROOT="/mnt/repos-staging" PRODUCTION_ROOT="/mnt/repos-production" diff --git a/sync/sync-to-staging-9.sh b/sync/sync-to-staging-9.sh new file mode 100644 index 0000000..ffcc6f1 --- /dev/null +++ b/sync/sync-to-staging-9.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# Source common variables +# shellcheck disable=SC2046,1091,1090 +source "$(dirname "$0")/common" + +if [[ $# -eq 0 ]]; then + echo "You must specify a short name." + exit 1 +fi + +# Major Version (eg, 8) +MAJ=${RLVER} +# Short name (eg, NFV, extras, Rocky, gluster9) +SHORT=${1} +PROFILE=${2} + +cd "/mnt/compose/${MAJ}/latest-${SHORT}-${MAJ}${PROFILE}/compose" || { echo "Failed to change directory"; ret_val=1; exit 1; } +ret_val=$? + +if [ $ret_val -eq "0" ]; then + TARGET="${STAGING_ROOT}/${CATEGORY_STUB}/${REV}" + mkdir -p "${TARGET}" + # disabling because none of our files should be starting with dashes. If they + # are something is *seriously* wrong here. + # shellcheck disable=SC2035 + #sudo -l && find **/* -maxdepth 0 -type d | parallel --will-cite -j 18 sudo rsync -av --chown=10004:10005 --progress --relative --human-readable \ + # {} "${TARGET}" + sudo -l && fpsync -o '-av --numeric-ids --no-compress --chown=10004:10005' -n 18 -t /mnt/compose/partitions "/mnt/compose/${MAJ}/latest-${SHORT}-${MAJ}${PROFILE}/compose/" "${TARGET}/" + + # This is temporary until we implement rsync into empanadas + #if [ -f "COMPOSE_ID" ]; then + # cp COMPOSE_ID "${TARGET}" + # chown 10004:10005 "${TARGET}/COMPOSE_ID" + #fi + + #if [ -d "metadata" ]; then + # rsync -av --chown=10004:10005 --progress --relative --human-readable metadata "${TARGET}" + #fi +fi