add in rpm macro settings

This commit is contained in:
Trevor Batley 2023-11-06 20:23:40 +11:00
parent 0aec385800
commit 9aa9ebe702

View File

@ -58,9 +58,14 @@ if [[ -n "$SRC_RPM_DIR" && -n "$BIN_RPM_DIR" ]]; then
rm -rf "$STAGING_RPM_DIR" "$HOME/.koji" rm -rf "$STAGING_RPM_DIR" "$HOME/.koji"
fi fi
# Generic settings for smeserver
PACKAGER="Koozali.org <http://www.koozali.org>"
VENDOR="Koozali.org <http://www.koozali.org>"
# Setup sme10 for building # Setup sme10 for building
# sme10-os is the parent - all other sme10 repos will inherit most of this... # sme10-os is the parent - all other sme10 repos will inherit most of this...
RELEASE=10 RELEASE=10
DISTRIBUTION="SME Server v$RELEASE"
DIST= ".el7.sme"
PKGMANAGER="yum" PKGMANAGER="yum"
BOOTSTRAPIMAGE="centos:7" BOOTSTRAPIMAGE="centos:7"
CHROOTSETUPCMD=' install @buildsys-build @buildsys scl-utils-build python27-build rpm-build ' CHROOTSETUPCMD=' install @buildsys-build @buildsys scl-utils-build python27-build rpm-build '
@ -71,6 +76,10 @@ sudo -u kojiadmin koji add-tag --parent dist-"$TAG" --arches "$RPM_ARCH" dist-"$
sudo -u kojiadmin koji add-target dist-"$TAG" dist-"$TAG"-build sudo -u kojiadmin koji add-target dist-"$TAG" dist-"$TAG"-build
sudo -u kojiadmin koji edit-tag dist-"$TAG" -x mock.bootstrap_image="$BOOTSTRAPIMAGE" sudo -u kojiadmin koji edit-tag dist-"$TAG" -x mock.bootstrap_image="$BOOTSTRAPIMAGE"
sudo -u kojiadmin koji edit-tag dist-"$TAG" -x mock.chroot_setup_cmd="$CHROOTSETUPCMD" sudo -u kojiadmin koji edit-tag dist-"$TAG" -x mock.chroot_setup_cmd="$CHROOTSETUPCMD"
sudo -u kojiadmin koji edit-tag dist-"$TAG" -x rpm.macro.distribution=$DISTRIBUTION
sudo -u kojiadmin koji edit-tag dist-"$TAG" -x rpm.macro.packager=$PACKAGER
sudo -u kojiadmin koji edit-tag dist-"$TAG" -x rpm.macro.vendor=$VENDOR
sudo -u kojiadmin koji edit-tag dist-"$TAG" -x rpm.macro.dist=$DIST
sudo -u kojiadmin koji add-group dist-"$TAG"-build 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 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 rpm-build sudo -u kojiadmin koji add-group-pkg dist-"$TAG"-build build install @buildsys-build @buildsys scl-utils-build python27-build rpm-build
@ -111,11 +120,12 @@ for REPO in addons updates updates-testing testing ; do
sudo -u kojiadmin koji add-tag --parent dist-sme$RELEASE-os dist-"$TAG" sudo -u kojiadmin koji add-tag --parent dist-sme$RELEASE-os dist-"$TAG"
done done
# Releases sme11 and sme12 are based on Rocky 8 # Releases sme11 and sme12 are based on Rocky 8 (EL8)
PKGMANAGER="dnf"
BOOTSTRAPIMAGE="rockylinux:8"
EL="8" EL="8"
CHROOTSETUPCMD=' install epel-rpm-macros bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpmbuild sed shadow-utils tar unzip util-linux which xz ' DIST= ".el$EL.sme"
PKGMANAGER="dnf"
BOOTSTRAPIMAGE="rockylinux:$EL"
CHROOTSETUPCMD=' install epel-rpm-macros bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpmbuild sed shadow-utils tar unzip util-linux which yum-utils xz '
sudo -u kojiadmin koji add-external-repo os$EL https://dl.rockylinux.org/pub/rocky/$EL/BaseOS/x86_64/os/ sudo -u kojiadmin koji add-external-repo os$EL https://dl.rockylinux.org/pub/rocky/$EL/BaseOS/x86_64/os/
# mirrorList=http://mirrors.rockylinux.org/mirrorlist?release=$EL&arch=x86_64&repo=BaseOS-$EL # mirrorList=http://mirrors.rockylinux.org/mirrorlist?release=$EL&arch=x86_64&repo=BaseOS-$EL
sudo -u kojiadmin koji add-external-repo appstream$EL https://dl.rockylinux.org/pub/rocky/$EL/AppStream/x86_64/os/ sudo -u kojiadmin koji add-external-repo appstream$EL https://dl.rockylinux.org/pub/rocky/$EL/AppStream/x86_64/os/
@ -128,6 +138,7 @@ sudo -u kojiadmin koji add-external-repo openfusion$EL http://repo.openfusion.ne
sudo -u kojiadmin koji add-external-repo rpmfusion$EL http://download1.rpmfusion.org/free/el/updates/$EL/x86_64 sudo -u kojiadmin koji add-external-repo rpmfusion$EL http://download1.rpmfusion.org/free/el/updates/$EL/x86_64
for RELEASE in 11 12 ; do for RELEASE in 11 12 ; do
# Setup the os repo - parent of others who will inherit most properties # Setup the os repo - parent of others who will inherit most properties
DISTRIBUTION="SME Server v$RELEASE"
TAG="sme$RELEASE-os" TAG="sme$RELEASE-os"
sudo -u kojiadmin koji add-tag dist-"$TAG" 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 edit-tag dist-"$TAG" -x mock.package_manager=$PKGMANAGER
@ -137,6 +148,10 @@ for RELEASE in 11 12 ; do
sudo -u kojiadmin koji add-group dist-"$TAG"-build srpm-build sudo -u kojiadmin koji add-group dist-"$TAG"-build srpm-build
sudo -u kojiadmin koji edit-tag dist-"$TAG" -x mock.bootstrap_image="$BOOTSTRAPIMAGE" sudo -u kojiadmin koji edit-tag dist-"$TAG" -x mock.bootstrap_image="$BOOTSTRAPIMAGE"
sudo -u kojiadmin koji edit-tag dist-"$TAG" -x mock.chroot_setup_cmd="$CHROOTSETUPCMD" sudo -u kojiadmin koji edit-tag dist-"$TAG" -x mock.chroot_setup_cmd="$CHROOTSETUPCMD"
sudo -u kojiadmin koji edit-tag dist-"$TAG" -x rpm.macro.distribution=$DISTRIBUTION
sudo -u kojiadmin koji edit-tag dist-"$TAG" -x rpm.macro.packager=$PACKAGER
sudo -u kojiadmin koji edit-tag dist-"$TAG" -x rpm.macro.vendor=$VENDOR
sudo -u kojiadmin koji edit-tag dist-"$TAG" -x rpm.macro.dist=$DIST
sudo -u kojiadmin koji add-group-pkg dist-"$TAG"-build build epel-rpm-macros bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpmbuild sed shadow-utils tar unzip util-linux which yum-utils xz sudo -u kojiadmin koji add-group-pkg dist-"$TAG"-build build epel-rpm-macros bash bzip2 coreutils cpio diffutils findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpmbuild sed shadow-utils tar unzip util-linux which yum-utils 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 rpmbuild sed shadow tar unzip wget 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 rpmbuild sed shadow tar unzip wget xz
sudo -u kojiadmin koji add-external-repo -t dist-"$TAG"-build os$EL sudo -u kojiadmin koji add-external-repo -t dist-"$TAG"-build os$EL