From 32a27a4b75ee12a8c17a8e1d50912e3a8ba1cceb Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Mon, 30 Oct 2023 14:47:05 +1100 Subject: [PATCH] change bootdstrap for sme10, sme11 and sme12 --- koji-setup/koji-bootstrap-build.sh | 118 ++++++++++++++++++----------- 1 file changed, 72 insertions(+), 46 deletions(-) diff --git a/koji-setup/koji-bootstrap-build.sh b/koji-setup/koji-bootstrap-build.sh index 20b492f..9392d1b 100755 --- a/koji-setup/koji-bootstrap-build.sh +++ b/koji-setup/koji-bootstrap-build.sh @@ -58,50 +58,76 @@ if [[ -n "$SRC_RPM_DIR" && -n "$BIN_RPM_DIR" ]]; then rm -rf "$STAGING_RPM_DIR" "$HOME/.koji" fi -# for RELEASE in (10 11) ; do -# PKGMANAGER = "dnf" -# if [[ $RELEASE == 10 ]] ; then PKGMANAGER = "yum" ; fi -# for REPO in (os contribs addons updates updates-testing testing) ; do -# TAG = "sme$RELEASE-$REPO" -# sudo -u kojiadmin koji add-tag dist-"$TAG" -# sudo -u kojiadmin koji edit-tag dist-"$TAG" -x mock.package_manager=$PKGMANAGER - -for TAG in ${TAG_NAME} ; do - sudo -u kojiadmin koji add-tag dist-"$TAG" - if [[ $TAG == "smeos10" || $TAG == "smecontribs10" ]] ; then - sudo -u kojiadmin koji edit-tag dist-"$TAG" -x mock.package_manager=yum - else - sudo -u kojiadmin koji edit-tag dist-"$TAG" -x mock.package_manager=dnf - fi - if [[ -n "$SRC_RPM_DIR" && -n "$BIN_RPM_DIR" ]]; then - sudo -u kojiadmin koji list-pkgs --quiet | xargs sudo -u kojiadmin koji add-pkg --owner kojiadmin dist-"$TAG" - sudo -u kojiadmin koji list-untagged | xargs -n 1 -P 100 sudo -u kojiadmin koji call tagBuildBypass dist-"$TAG" > /dev/null - fi - sudo -u kojiadmin koji add-tag --parent dist-"$TAG" --arches "$RPM_ARCH" dist-"$TAG"-build - sudo -u kojiadmin koji add-target dist-"$TAG" dist-"$TAG"-build - sudo -u kojiadmin koji add-group dist-"$TAG"-build build - sudo -u kojiadmin koji add-group dist-"$TAG"-build srpm-build - sudo -u kojiadmin koji add-group-pkg dist-"$TAG"-build build autoconf automake automake-dev binutils bzip2 clr-rpm-config coreutils cpio diffutils elfutils file gawk gcc gcc-dev gettext gettext-bin git glibc-dev glibc-locale glibc-utils grep gzip hostname libc6-dev libcap libtool libtool-dev linux-libc-headers m4 make netbase nss-altfiles patch pigz pkg-config pkg-config-dev rpm sed shadow systemd-lib tar unzip which xz - sudo -u kojiadmin koji add-group-pkg dist-"$TAG"-build srpm-build coreutils cpio curl-bin elfutils file git glibc-utils grep gzip make pigz plzip rpm sed shadow tar unzip wget xz - if [[ $TAG == "smeos10" || $TAG == "smecontribs10" ]] ; then - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build os http://buildsys.koozali.org/build/7/os/\$arch/ - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build updates http://buildsys.koozali.org/build/7/updates/\$arch/ - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build smeos http://buildsys.koozali.org/build/10/smeos/\$arch/ - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build smeupdates http://buildsys.koozali.org/build/10/smeupdates/\$arch/ - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build fastrack http://buildsys.koozali.org/build/7/fastrack/\$arch/ - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build opt1 http://buildsys.koozali.org/build/7/opt1/\$arch/ - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build opt2 http://buildsys.koozali.org/build/7/opt2/\$arch/ - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build opt3 http://buildsys.koozali.org/build/7/opt3/\$arch/ - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build epel http://download.fedoraproject.org/pub/epel/7/\$arch/ - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build openfusion http://repo.openfusion.net/centos7-\$arch/ - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build rpmfusion http://download1.rpmfusion.org/free/el/updates/7/\$arch/ - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build sclo-sclo http://mirror.centos.org/centos/7/sclo/\$arch/sclo - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build sclo-rh http://mirror.centos.org/centos/7/sclo/\$arch/rh - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build buildsys-core http://buildsys.koozali.org/build/10/smeserver-core/\$arch/ - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build buildsys-contribs http://buildsys.koozali.org/build/10/smeserver-contribs/\$arch/ - sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build groups http://buildsys.koozali.org/build/10/smeserver-groups/\$arch/ - elif [[ -n "$EXTERNAL_REPO" ]]; then - sudo -u kojiadmin koji add-external-repo -t dist-"$TAG"-build dist-"$TAG"-external-repo "$EXTERNAL_REPO" - fi - sudo -u kojiadmin koji regen-repo dist-"$TAG"-build +# Setup sme10 for building +sme10-os is the parent - all other sme10 repos will inherit most of this... +RELEASE=10 +PKGMANAGER = "yum" +TAG = "sme$RELEASE-os" +sudo -u kojiadmin koji add-tag dist-"$TAG" +sudo -u kojiadmin koji edit-tag dist-"$TAG" -x mock.package_manager=$PKGMANAGER +sudo -u kojiadmin koji add-tag --parent dist-"$TAG" --arches "$RPM_ARCH" dist-"$TAG"-build +sudo -u kojiadmin koji add-target dist-"$TAG" dist-"$TAG"-build +sudo -u kojiadmin koji add-group dist-"$TAG"-build build +sudo -u kojiadmin koji add-group dist-"$TAG"-build srpm-build +sudo -u kojiadmin koji add-group-pkg dist-"$TAG"-build build install @buildsys-build @buildsys scl-utils-build python27-build +sudo -u kojiadmin koji add-group-pkg dist-"$TAG"-build srpm-build coreutils cpio curl-bin elfutils file git glibc-utils grep gzip make pigz plzip rpm sed shadow tar unzip wget xz +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build os http://buildsys.koozali.org/build/7/os/\$arch/ +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build updates http://buildsys.koozali.org/build/7/updates/\$arch/ +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build smeos http://buildsys.koozali.org/build/10/smeos/\$arch/ +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build smeupdates http://buildsys.koozali.org/build/10/smeupdates/\$arch/ +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build fastrack http://buildsys.koozali.org/build/7/fastrack/\$arch/ +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build opt1 http://buildsys.koozali.org/build/7/opt1/\$arch/ +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build opt2 http://buildsys.koozali.org/build/7/opt2/\$arch/ +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build opt3 http://buildsys.koozali.org/build/7/opt3/\$arch/ +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build epel http://download.fedoraproject.org/pub/epel/7/\$arch/ +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build openfusion http://repo.openfusion.net/centos7-\$arch/ +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build rpmfusion http://download1.rpmfusion.org/free/el/updates/7/\$arch/ +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build sclo-sclo http://mirror.centos.org/centos/7/sclo/\$arch/sclo +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build sclo-rh http://mirror.centos.org/centos/7/sclo/\$arch/rh +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build buildsys-core http://buildsys.koozali.org/build/10/smeserver-core/\$arch/ +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build buildsys-contribs http://buildsys.koozali.org/build/10/smeserver-contribs/\$arch/ +sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build groups http://buildsys.koozali.org/build/10/smeserver-groups/\$arch/ +sudo -u kojiadmin koji regen-repo dist-"$TAG"-build +# setup the rest of the sme10 repos +for REPO in (contribs addons updates updates-testing testing) ; do + TAG = "sme$RELEASE-$REPO" + sudo -u kojiadmin koji add-tag --parent dist-sme$RELEASE-os dist-"$TAG" + sudo -u kojiadmin koji regen-repo dist-"$TAG"-build done +# Releases sme11 and sme12 are based on Rocky 8 +PKGMANAGER = "dnf" +for RELEASE in (11 12) ; do +# Setup the os repo - parent of others who will inherit most properties + TAG = "sme$RELEASE-os" + sudo -u kojiadmin koji add-tag dist-"$TAG" + sudo -u kojiadmin koji edit-tag dist-"$TAG" -x mock.package_manager=$PKGMANAGER + sudo -u kojiadmin koji add-tag --parent dist-"$TAG" --arches "$RPM_ARCH" dist-"$TAG"-build + sudo -u kojiadmin koji add-target dist-"$TAG" dist-"$TAG"-build + sudo -u kojiadmin koji add-group dist-"$TAG"-build build + sudo -u kojiadmin koji add-group dist-"$TAG"-build srpm-build + sudo -u kojiadmin koji add-group-pkg dist-"$TAG"-build build install epel-rpm-macros bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz + sudo -u kojiadmin koji add-group-pkg dist-"$TAG"-build srpm-build coreutils cpio curl-bin elfutils file git glibc-utils grep gzip make pigz plzip rpm sed shadow tar unzip wget xz + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build os http://buildsys.koozali.org/build/7/os/\$arch/ + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build updates http://buildsys.koozali.org/build/7/updates/\$arch/ + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build smeos http://buildsys.koozali.org/build/10/smeos/\$arch/ + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build smeupdates http://buildsys.koozali.org/build/10/smeupdates/\$arch/ + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build fastrack http://buildsys.koozali.org/build/7/fastrack/\$arch/ + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build opt1 http://buildsys.koozali.org/build/7/opt1/\$arch/ + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build opt2 http://buildsys.koozali.org/build/7/opt2/\$arch/ + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build opt3 http://buildsys.koozali.org/build/7/opt3/\$arch/ + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build epel http://download.fedoraproject.org/pub/epel/7/\$arch/ + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build openfusion http://repo.openfusion.net/centos7-\$arch/ + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build rpmfusion http://download1.rpmfusion.org/free/el/updates/7/\$arch/ + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build sclo-sclo http://mirror.centos.org/centos/7/sclo/\$arch/sclo + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build sclo-rh http://mirror.centos.org/centos/7/sclo/\$arch/rh + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build buildsys-core http://buildsys.koozali.org/build/10/smeserver-core/\$arch/ + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build buildsys-contribs http://buildsys.koozali.org/build/10/smeserver-contribs/\$arch/ + sudo -u kojiadmin koji add-external-repo -t dist-smeos10-build groups http://buildsys.koozali.org/build/10/smeserver-groups/\$arch/ + sudo -u kojiadmin koji regen-repo dist-"$TAG"-build +# setup the rest of the repos + for REPO in (contribs addons updates updates-testing testing) ; do + TAG = "sme$RELEASE-$REPO" + sudo -u kojiadmin koji add-tag --parent dist-sme$RELEASE-os dist-"$TAG" + sudo -u kojiadmin koji regen-repo dist-"$TAG"-build + done +done