summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-09-04 07:53:06 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-09-04 07:53:06 -0400
commit7b7b2d51f4bd09d67a3c75aaf337a0a0c07c89b5 (patch)
tree2d71dfcd80f45c9c9d64d37e505afd11db3f78b5
downloadbuild_tools-7b7b2d51f4bd09d67a3c75aaf337a0a0c07c89b5.zip
build_tools-7b7b2d51f4bd09d67a3c75aaf337a0a0c07c89b5.tar.gz
build_tools-7b7b2d51f4bd09d67a3c75aaf337a0a0c07c89b5.tar.xz
SSSD Nightly build script for Fedora 11 and RHEL5
-rwxr-xr-xsssd-nightly.sh81
1 files changed, 81 insertions, 0 deletions
diff --git a/sssd-nightly.sh b/sssd-nightly.sh
new file mode 100755
index 0000000..cc711fe
--- /dev/null
+++ b/sssd-nightly.sh
@@ -0,0 +1,81 @@
+mkdir -p /local/sgallagh/logs
+cd /local/sgallagh
+datestamp=`date +%Y%m%d%H`
+LOGFILE=/local/sgallagh/logs/nightly-$datestamp.log
+echo "===== BUILD STARTED AT `date` =====" > $LOGFILE
+
+echo "===== CHECKING OUT CODE =====" >> $LOGFILE
+git clone git://git.fedorahosted.org/sssd.git sssd-$datestamp >> $LOGFILE 2>&1
+cd sssd-$datestamp
+echo $datestamp > VERSION
+mv contrib/sssd.spec.in contrib/sssd.spec.in.orig && \
+sed -e "s/make %/make CFLAGS=\"-ggdb3 -O0\" %/" < contrib/sssd.spec.in.orig > contrib/sssd.spec.in
+echo "===== CONFIGURING CODE =====" >> $LOGFILE
+autoreconf -i -f >> $LOGFILE 2>&1 || exit 1
+./configure >> $LOGFILE 2>&1 || exit 2
+make srpms >> $LOGFILE 2>&1 || exit 3
+cd rpmbuild/SRPMS
+
+echo "===== BUILDING FEDORA 11 i586 =====" >> $LOGFILE
+mock -r fedora-11-i386 sssd-$datestamp-0.fc11.src.rpm >> $LOGFILE 2>&1 || exit 4
+echo "===== BUILDING FEDORA 11 x86_64 =====" >> $LOGFILE
+mock -r fedora-11-x86_64 sssd-$datestamp-0.fc11.src.rpm >> $LOGFILE 2>&1 || exit 5
+
+echo "===== CREATING FEDORA 11 i586 YUM REPOSITORY ====" >> $LOGFILE
+mkdir -p /local/sgallagh/repos/f11/SRPMS
+mkdir -p /local/sgallagh/repos/f11/i386/DEBUGINFO
+mkdir -p /local/sgallagh/repos/f11/i386/RPMS
+cp /var/lib/mock/fedora-11-i386/result/sssd-$datestamp-0.fc11.src.rpm /local/sgallagh/repos/f11/SRPMS
+cp /var/lib/mock/fedora-11-i386/result/sssd-debuginfo-$datestamp-0.fc11.i586.rpm /local/sgallagh/repos/f11/i386/DEBUGINFO
+cp /var/lib/mock/fedora-11-i386/result/sssd-$datestamp-0.fc11.i586.rpm /local/sgallagh/repos/f11/i386/RPMS
+
+createrepo /local/sgallagh/repos/f11/SRPMS >> $LOGFILE 2>&1
+createrepo /local/sgallagh/repos/f11/i386/DEBUGINFO >> $LOGFILE 2>&1
+createrepo /local/sgallagh/repos/f11/i386/RPMS >> $LOGFILE 2>&1
+
+echo "===== CREATING FEDORA 11 x86_64 YUM REPOSITORY ====" >> $LOGFILE
+mkdir -p /local/sgallagh/repos/f11/x86_64/DEBUGINFO
+mkdir -p /local/sgallagh/repos/f11/x86_64/RPMS
+cp /var/lib/mock/fedora-11-x86_64/result/sssd-debuginfo-$datestamp-0.fc11.x86_64.rpm /local/sgallagh/repos/f11/x86_64/DEBUGINFO
+cp /var/lib/mock/fedora-11-x86_64/result/sssd-$datestamp-0.fc11.x86_64.rpm /local/sgallagh/repos/f11/x86_64/RPMS
+
+createrepo /local/sgallagh/repos/f11/x86_64/DEBUGINFO >> $LOGFILE 2>&1
+createrepo /local/sgallagh/repos/f11/x86_64/RPMS >> $LOGFILE 2>&1
+
+echo "===== BUILDING RHEL 5 i386 =====" >> $LOGFILE
+cd /local/sgallagh/sssd-$datestamp/rpmbuild/SRPMS
+mv sssd-$datestamp-0.fc11.src.rpm \
+ sssd-$datestamp-0.el5.src.rpm
+mock -r epel-5-i386 sssd-$datestamp-0.el5.src.rpm >> $LOGFILE 2>&1 || exit 6
+
+echo "===== BUILDING RHEL 5 x86_64 =====" >> $LOGFILE
+mock -r epel-5-x86_64 sssd-$datestamp-0.el5.src.rpm >> $LOGFILE 2>&1 || exit 7
+
+
+echo "===== CREATING RHEL 5 i586 YUM REPOSITORY ====" >> $LOGFILE
+mkdir -p /local/sgallagh/repos/rhel5/SRPMS
+mkdir -p /local/sgallagh/repos/rhel5/i386/DEBUGINFO
+mkdir -p /local/sgallagh/repos/rhel5/i386/RPMS
+cp /var/lib/mock/epel-5-i386/result/sssd-$datestamp-0.el5.src.rpm /local/sgallagh/repos/rhel5/SRPMS
+cp /var/lib/mock/epel-5-i386/result/sssd-debuginfo-$datestamp-0.el5.i386.rpm /local/sgallagh/repos/rhel5/i386/DEBUGINFO
+cp /var/lib/mock/epel-5-i386/result/sssd-$datestamp-0.el5.i386.rpm /local/sgallagh/repos/rhel5/i386/RPMS
+
+createrepo -s sha1 /local/sgallagh/repos/f11/SRPMS >> $LOGFILE 2>&1
+createrepo -s sha1 /local/sgallagh/repos/f11/i386/DEBUGINFO >> $LOGFILE 2>&1
+createrepo -s sha1 /local/sgallagh/repos/f11/i386/RPMS >> $LOGFILE 2>&1
+
+echo "===== CREATING RHEL 5 x86_86 YUM REPOSITORY ====" >> $LOGFILE
+mkdir -p /local/sgallagh/repos/rhel5/x86_64/DEBUGINFO
+mkdir -p /local/sgallagh/repos/rhel5/x86_64/RPMS
+cp /var/lib/mock/epel-5-x86_64/result/sssd-debuginfo-$datestamp-0.el5.x86_64.rpm /local/sgallagh/repos/rhel5/x86_64/DEBUGINFO
+cp /var/lib/mock/epel-5-x86_64/result/sssd-$datestamp-0.el5.x86_64.rpm /local/sgallagh/repos/rhel5/x86_64/RPMS
+
+createrepo -s sha1 /local/sgallagh/repos/f11/SRPMS >> $LOGFILE 2>&1
+createrepo -s sha1 /local/sgallagh/repos/f11/i386/DEBUGINFO >> $LOGFILE 2>&1
+createrepo -s sha1 /local/sgallagh/repos/f11/i386/RPMS >> $LOGFILE 2>&1
+
+
+echo "===== Removing Source Tree =====" >> $LOGFILE
+cd /local/sgallagh && rm -Rf sssd-$datestamp
+
+echo "===== BUILD CONCLUDED AT `date` =====" >> $LOGFILE