From 3946d682cba063c1d43e025d92e765e9ec239a24 Mon Sep 17 00:00:00 2001 From: Thomas Oulevey Date: Dec 17 2014 10:10:47 +0000 Subject: - added support for collections - fix updates/os repo priority --- diff --git a/scripts/create_sig.sh b/scripts/create_sig.sh index fc8d069..9d77b90 100755 --- a/scripts/create_sig.sh +++ b/scripts/create_sig.sh @@ -11,14 +11,16 @@ OPTIONS: -d Distribution : 5 6 7 -s SIG name : bananas, storage -t DISTTAGS : "el7 el7.centos el7_0" + -c COLLECTION : mariadb100 (a single collection can be used at this time) EOF } optiond=false options=false optiont=false +optionc=false -while getopts ":hd:s:t:" OPTION +while getopts ":hd:s:t:c:" OPTION do case $OPTION in h) @@ -37,6 +39,10 @@ do optiont=true TAGS="${OPTARG}" ;; + c) + optionc=true + COLLECTIONS="${OPTARG}" + ;; ?) exit 0 ;; @@ -100,25 +106,38 @@ do for TAG in $TAGS do + # Add collection support abuse TAG variable + REALTAG=$TAG + if ( $optionc ) + then + TAG="$TAG-$COLLECTIONS" + fi $KOJI list-tags | grep $SIG-$TAG-build &> /dev/null [ $? -eq 0 ] && echo " -> $SIG-$TAG target already exists. skipping." && continue echo " -> creating $SIG-$TAG" $KOJI add-tag --arches "$ARCHES" $SIG-$TAG-build $KOJI add-target $SIG-$TAG $SIG-$TAG-build $SIG-testing - $KOJI add-external-repo --tag=$SIG-$TAG-build centos${DIST}-os $KOJI add-external-repo --tag=$SIG-$TAG-build centos${DIST}-updates + $KOJI add-external-repo --tag=$SIG-$TAG-build centos${DIST}-os $KOJI add-group $SIG-$TAG-build build $KOJI add-group $SIG-$TAG-build srpm-build - $KOJI add-group-pkg $SIG-$TAG-build build bash bzip2 coreutils cpio diffutils redhat-release findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux-ng which buildsys-macros-$TAG tar buildsys-tools - $KOJI add-group-pkg $SIG-$TAG-build srpm-build bash buildsys-macros curl cvs redhat-release gnupg make redhat-rpm-config rpm-build shadow-utils buildsys-macros-$TAG tar buildsys-tools + # Add -build to the buildroot if collection enabled + if ( $optionc ) + then + $KOJI add-group-pkg $SIG-$TAG-build build bash bzip2 coreutils cpio diffutils redhat-release findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux-ng which buildsys-macros-$TAG tar buildsys-tools $COLLECTIONS-build + $KOJI add-group-pkg $SIG-$TAG-build srpm-build bash buildsys-macros curl cvs redhat-release gnupg make redhat-rpm-config rpm-build shadow-utils buildsys-macros-$REALTAG tar buildsys-tools $COLLECTIONS-build + else + $KOJI add-group-pkg $SIG-$TAG-build build bash bzip2 coreutils cpio diffutils redhat-release findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux-ng which buildsys-macros-$TAG tar buildsys-tools + $KOJI add-group-pkg $SIG-$TAG-build srpm-build bash buildsys-macros curl cvs redhat-release gnupg make redhat-rpm-config rpm-build shadow-utils buildsys-macros-$REALTAG tar buildsys-tools + fi $KOJI add-tag-inheritance --priority 1 $SIG-$TAG-build buildsys${DIST} $KOJI add-tag-inheritance --priority 2 $SIG-$TAG-build $SIG-testing - $KOJI list-tagged buildsys${DIST} | grep buildsys-macros-$TAG &> /dev/null + $KOJI list-tagged buildsys${DIST} | grep buildsys-macros-$REALTAG &> /dev/null if [ $? -gt 0 ] then - if [ "x$TAG" != "x$DEFAULT_DISTTAG" ] + if [ "x$REALTAG" != "x$DEFAULT_DISTTAG" ] then - echo " -> [WARN] buildsys-macros-$TAG rpm not found. Please build it within koji." + echo " -> [WARN] buildsys-macros-$REALTAG rpm not found. Please build it within koji." [ -f $PWD/etc/buildsys.spec.template ] && echo " -> Generating buildsys-macros-$TAG.spec" fi fi