From 52d1bca6f8a9fd75989a2e3b3dd8a659e2195bbe Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Mon, 8 Aug 2022 12:47:16 -0700 Subject: [PATCH] add generate_comps mangler --- mangle/common | 1 + mangle/generate_comps | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100755 mangle/generate_comps diff --git a/mangle/common b/mangle/common index 7b1d1a8..76056a9 100644 --- a/mangle/common +++ b/mangle/common @@ -7,3 +7,4 @@ LIST=${LIST:-mirrorlist} MIRRORLIST_BASE="http://mirrors.rockylinux.org/${LIST}" MIRROR_DISPLAY_COUNT=1 +GIT_URL="https://git.rockylinux.org" diff --git a/mangle/generate_comps b/mangle/generate_comps new file mode 100755 index 0000000..41e9f8a --- /dev/null +++ b/mangle/generate_comps @@ -0,0 +1,23 @@ +#!/bin/bash +source common + +if [ ! -f "/usr/bin/pungi-koji" ]; then + echo "You must have pungi installed." + exit 1 +fi + +if [[ $# -eq 0 ]]; then + echo "You must provide a major version." + exit 1 +fi + +VER="${1}" +BRANCH="r${VER}" +REPO="${GIT_URL}/rocky/pungi-rocky.git" + +CMD="/usr/bin/pungi-koji --production --no-latest-link --just-phase init --config rocky.conf --compose-dir /var/tmp/composes/ --label RC-${VER}" + +git clone ${REPO} -b ${BRANCH} /var/tmp/pungi +pushd /var/tmp/pungi +${CMD} +popd