From 27950c833df7fd2a6f58adba72c761a64f715d26 Mon Sep 17 00:00:00 2001 From: nazunalika Date: Fri, 25 Jun 2021 19:39:34 -0700 Subject: [PATCH] consolidation and scripts --- .../include-excludes.conf | 0 multilib.conf => common/multilib.conf | 0 common/vars.conf | 33 +++++++++++++++++++ container.conf | 4 +-- r8-armhfp.conf | 4 +-- r8-cloud.conf | 4 +-- r8-devel.conf | 4 +-- r8.conf | 4 +-- scripts/README.md | 13 ++++++++ scripts/produce-8.sh | 21 ++++++++++++ scripts/updates-8-devel.sh | 21 ++++++++++++ scripts/updates-8-extras.sh | 18 ++++++++++ scripts/updates-8-plus.sh | 19 +++++++++++ scripts/updates-8.sh | 21 ++++++++++++ 14 files changed, 156 insertions(+), 10 deletions(-) rename include-excludes.conf => common/include-excludes.conf (100%) rename multilib.conf => common/multilib.conf (100%) create mode 100644 common/vars.conf create mode 100644 scripts/README.md create mode 100755 scripts/produce-8.sh create mode 100755 scripts/updates-8-devel.sh create mode 100755 scripts/updates-8-extras.sh create mode 100755 scripts/updates-8-plus.sh create mode 100755 scripts/updates-8.sh diff --git a/include-excludes.conf b/common/include-excludes.conf similarity index 100% rename from include-excludes.conf rename to common/include-excludes.conf diff --git a/multilib.conf b/common/multilib.conf similarity index 100% rename from multilib.conf rename to common/multilib.conf diff --git a/common/vars.conf b/common/vars.conf new file mode 100644 index 0000000..66dcf63 --- /dev/null +++ b/common/vars.conf @@ -0,0 +1,33 @@ +global RELEASE_NAME +global RELEASE_SHORT +global RELEASE_VERSION +global PKGSET_KOJI_TAG +global PKGSET_KOJI_MODULE_TAG +global RUNROOT_CHANNEL +global RUNROOT_TAG +global COMPS_REPO +global COMPS_BRANCH +global COMPS_FILE +global COMPS_COMMAND +global MODULE_DEFAULTS_REPO +global MODULE_DEFAULTS_BRANCH +global VARIANTS_REPO +global VARIANTS_BRANCH +global VARIANTS_FILE +global GATHER_PREPOPULATE_REPO +global GATHER_PREPOPULATE_BRANCH +global GATHER_PREPOPULATE_FILE +global GATHER_PREPOPULATE_SKIP + +global GATHER_PREPOPULATE_REPO +global GATHER_PREPOPULATE_BRANCH +global GATHER_PREPOPULATE_FILE +global GATHER_PREPOPULATE_COMMAND +global EXTRA_FILES +global EXTRA_ISOS_ARCHES +global IMAGE_BUILD_SCRATCH + +EXTRA_BUILDINSTALL_SKIP = ("^$", {"*": False}) +EXTRA_FILES = [] +EXTRA_ISOS_ARCHES = [] +IMAGE_BUILD_SCRATCH = False diff --git a/container.conf b/container.conf index 564d586..fe42957 100644 --- a/container.conf +++ b/container.conf @@ -1,5 +1,5 @@ -from multilib import * -from include-excludes import * +from common/multilib import * +from common/include-excludes import * release_name = 'Rocky-Container' release_short = 'Rocky-Container' diff --git a/r8-armhfp.conf b/r8-armhfp.conf index 0cdf7e9..5e50f2d 100644 --- a/r8-armhfp.conf +++ b/r8-armhfp.conf @@ -1,5 +1,5 @@ -from multilib import * -from include-excludes import * +from common/multilib import * +from common/include-excludes import * #from images-armhfp import * # PRODUCT INFO diff --git a/r8-cloud.conf b/r8-cloud.conf index d4fab16..efc4430 100644 --- a/r8-cloud.conf +++ b/r8-cloud.conf @@ -1,5 +1,5 @@ -from multilib import * -from include-excludes import * +from common/multilib import * +from common/include-excludes import * from images-cloud import * release_name = 'Rocky-Cloud' diff --git a/r8-devel.conf b/r8-devel.conf index 3b6dd8a..c1e9cd7 100644 --- a/r8-devel.conf +++ b/r8-devel.conf @@ -1,5 +1,5 @@ -from multilib import * -from include-excludes import * +from common/multilib import * +from common/include-excludes import * # PRODUCT INFO release_name = "Rocky Development" diff --git a/r8.conf b/r8.conf index abb6fa7..f0d7765 100644 --- a/r8.conf +++ b/r8.conf @@ -1,5 +1,5 @@ -from multilib import * -from include-excludes import * +from common/multilib import * +from common/include-excludes import * #from images import * # PRODUCT INFO diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 0000000..56d80ab --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,13 @@ +Process +======= + +When runnig composes, these scripts help us take care of that. These are what they do: + +``` +. +├── produce-8.sh -> Does a full compose, usually ran only for point releases +├── updates-8-devel.sh -> Does a compose for the devel repo, ran after full or updates compose +├── updates-8-extras.sh -> Does a compose for the extras repo (only ran when there's changes) +├── updates-8-plus.sh -> Does a compose for the plus repo (only ran when there's changes) +└── updates-8.sh -> Does an updates compose (no ISOs or images are made) +``` diff --git a/scripts/produce-8.sh b/scripts/produce-8.sh new file mode 100755 index 0000000..9fa1052 --- /dev/null +++ b/scripts/produce-8.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +export PATH=/usr/sbin:/usr/bin:/root/bin +TARGET_DIR="/mnt/compose/8" +SHORT=Rocky +CONFIG=/etc/pungi-prod/r8.conf +# Unused for now +OLDCOMPOSE_ID=$(cat $TARGET_DIR/latest-$SHORT-8/COMPOSE_ID) +SKIP="" +LABEL="--production --label RC-8.4" + +CMD="pungi-koji --config=$CONFIG --old-composes=$TARGET_DIR $SKIP $LABEL" +#COMPOSE_ID="Rocky-8-20210625.n.0" + +if [ -z "$COMPOSE_ID" ]; then + CMD="$CMD --target-dir=$TARGET_DIR" +else + CMD="$CMD --debug-mode --compose-dir=$TARGET_DIR/$COMPOSE_ID" +fi + +time $CMD diff --git a/scripts/updates-8-devel.sh b/scripts/updates-8-devel.sh new file mode 100755 index 0000000..6716ca0 --- /dev/null +++ b/scripts/updates-8-devel.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +export PATH=/usr/sbin:/usr/bin:/root/bin +TARGET_DIR="/mnt/compose/8" +SHORT=Devel +CONFIG=/etc/pungi-prod/r8-devel.conf +# Unused for now +OLDCOMPOSE_ID=$(cat $TARGET_DIR/latest-$SHORT-8/COMPOSE_ID) +SKIP="--skip-phase buildinstall --skip-phase createiso --skip-phase extra_isos --skip-phase productimg" +LABEL="--production --no-label" + +CMD="pungi-koji --config=$CONFIG --old-composes=$TARGET_DIR $SKIP $LABEL" +#COMPOSE_ID="Rocky-8-20210625.n.0" + +if [ -z "$COMPOSE_ID" ]; then + CMD="$CMD --target-dir=$TARGET_DIR" +else + CMD="$CMD --debug-mode --compose-dir=$TARGET_DIR/$COMPOSE_ID" +fi + +time $CMD diff --git a/scripts/updates-8-extras.sh b/scripts/updates-8-extras.sh new file mode 100755 index 0000000..c6e237b --- /dev/null +++ b/scripts/updates-8-extras.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +TARGET_DIR="/mnt/compose/8" +SHORT=Extras +CONFIG=/etc/pungi-prod/extras.conf +# Unused for now +OLDCOMPOSE_ID=$(cat $TARGET_DIR/latest-$SHORT-8/COMPOSE_ID) +SKIP="--skip-phase buildinstall --skip-phase createiso --skip-phase extra_isos --skip-phase productimg" +LABEL="--production --label RC-8.4" +CMD="pungi-koji --config=$CONFIG --old-composes=$TARGET_DIR $OLD_COMPOSES_DIR $SKIP $LABEL" + +if [ -z "$COMPOSE_ID" ]; then + CMD="$CMD --target-dir=$TARGET_DIR" +else + CMD="$CMD --debug-mode --compose-dir=$TARGET_DIR/$COMPOSE_ID" +fi + +time $CMD diff --git a/scripts/updates-8-plus.sh b/scripts/updates-8-plus.sh new file mode 100755 index 0000000..fbb32b8 --- /dev/null +++ b/scripts/updates-8-plus.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +TARGET_DIR="/mnt/compose/8" +SHORT=Plus +CONFIG=/etc/pungi-prod/plus.conf +# Unused for now +OLDCOMPOSE_ID=$(cat $TARGET_DIR/latest-$SHORT-8/COMPOSE_ID) +SKIP="--skip-phase buildinstall --skip-phase createiso --skip-phase extra_isos --skip-phase productimg" +LABEL="--production --label RC-8.4" + +CMD="pungi-koji --config=$CONFIG --old-composes=$TARGET_DIR $OLD_COMPOSES_DIR $SKIP $LABEL" + +if [ -z "$COMPOSE_ID" ]; then + CMD="$CMD --target-dir=$TARGET_DIR" +else + CMD="$CMD --debug-mode --compose-dir=$TARGET_DIR/$COMPOSE_ID" +fi + +time $CMD diff --git a/scripts/updates-8.sh b/scripts/updates-8.sh new file mode 100755 index 0000000..7a84443 --- /dev/null +++ b/scripts/updates-8.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +export PATH=/usr/sbin:/usr/bin:/root/bin +TARGET_DIR="/mnt/compose/8" +SHORT=Rocky +CONFIG=/etc/pungi-prod/r8-updates.conf +# Unused for now +OLDCOMPOSE_ID=$(cat $TARGET_DIR/latest-$SHORT-8/COMPOSE_ID) +SKIP="--skip-phase buildinstall --skip-phase createiso --skip-phase extra_isos --skip-phase productimg" +LABEL="--production --label RC-8.4" + +CMD="pungi-koji --config=$CONFIG --old-composes=$TARGET_DIR $SKIP $LABEL" +#COMPOSE_ID="Rocky-8-20210625.n.0" + +if [ -z "$COMPOSE_ID" ]; then + CMD="$CMD --target-dir=$TARGET_DIR" +else + CMD="$CMD --debug-mode --compose-dir=$TARGET_DIR/$COMPOSE_ID" +fi + +time $CMD