# (Of course, koji is supposed to do all this, including updating the repo.)
VERSIONS='1.7 1.9'
+#VERSIONS='1.7 1.9 2.1'
REPO=testing
BRANCH=
DISTROS='centos sles'
-CENTOSVERS='4 5'
+CENTOSVERS='5'
SLESVERS=10
WHICHVERS=
ARCHS='i386 x86_64'
-MOCKARGS='--autocache'
BUILDSYSDIR=`dirname $0`
+MOCKWORK="$BUILDSYSDIR/mockwork"
+
+#MOCKARGS='--autocache'
+MOCKARGS="--configdir=$BUILDSYSDIR/mock --resultdir=$MOCKWORK"
+
+if [ -f $BUILDSYSDIR/buildsysrc ]; then
+ #chmod a+x $BUILDSYSDIR/buildsysrc
+ #echo $BUILDSYSDIR/buildsysrc
+ . $BUILDSYSDIR/buildsysrc
+fi
if [ -f $HOME/buildsysrc ]; then
+ #chmod a+x $HOME/buildsysrc
+ #echo $HOME/buildsysrc
. $HOME/buildsysrc
fi
+EXPECT_ADDSIGN=$BUILDSYSDIR/expect-addsign
+if [ -f /usr/local/bin/expect-addsign ]; then
+ EXPECT_ADDSIGN=/usr/local/bin/expect-addsign
+fi
+
usage() {
echo "build-freeside: build RPMs for all target distros and architectures using mock"
echo "where:"
done
if [ "${SRCFOLDER}x" = "x" ]; then
- echo "No source folder defined!"
+ PWD=`pwd`
+ echo "No source folder defined! (BUILDSYSDIR=$BUILDSYSDIR pwd=$PWD)"
exit
fi
for arch in $ARCHS
do
echo "$os - $arch: $srpm"
+ echo mock $MOCKARGS -r ${os}-${arch} $REFFOLDER/${srpm}
time mock $MOCKARGS -r ${os}-${arch} $REFFOLDER/${srpm}
- if [ -f /var/lib/mock/${os}-${arch}/state/status ] && grep done /var/lib/mock/${os}-${arch}/state/status
+ if true #[ -f $MOCKWORK/${os}-${arch}/state/status ] && grep done $MOCKWORK/${os}-${arch}/state/status
then
for VERSION in $VERSIONS
do
DEST=$BRANCH
fi
# Copy freeside RPMs for this version only
- FILES=`ls -1 /var/lib/mock/${os}-${arch}/result/freeside*-${VERSION}-*.rpm | grep -v .src.rpm | tr '\n' ' '`
+ #FILES=`ls -1 $MOCKWORK/${os}-${arch}/result/freeside*-${VERSION}-*.rpm | grep -v .src.rpm | tr '\n' ' '`
+ FILES=`ls -1 $MOCKWORK/freeside*-${VERSION}-*.rpm | grep -v .src.rpm | tr '\n' ' '`
echo $FILES
if [ "${FILES}x" != "x" ]
then
for FILE in $FILES
do
- $BUILDSYSDIR/expect-addsign $FILE
+ $EXPECT_ADDSIGN $FILE
done
if [ "${REPOMACHINE}x" != "x" ]
then
fi
fi
# Copy non-freeside RPMs to all versions
- FILES=`ls -1 /var/lib/mock/${os}-${arch}/result/*.rpm | grep -v freeside | grep -v .src.rpm | tr '\n' ' '`
+ #FILES=`ls -1 $MOCKWORK/${os}-${arch}/result/*.rpm | grep -v freeside | grep -v .src.rpm | tr '\n' ' '`
+ FILES=`ls -1 $MOCKWORK/*.rpm | grep -v freeside | grep -v .src.rpm | tr '\n' ' '`
echo $FILES
if [ "${FILES}x" != "x" ]
then
for FILE in $FILES
do
- $BUILDSYSDIR/expect-addsign $FILE
+ $EXPECT_ADDSIGN $FILE
done
if [ "${REPOMACHINE}x" != "x" ]
then
done
done
done
+
+echo "build-freeside done"