summaryrefslogtreecommitdiffstats
path: root/scripts/buildrawhide
blob: 793b61ccd71cb268c51e8d7114a3c4618bfd4f9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh

# runs currently on app5.fedora.phx.redhat.com
# invoked by a script on porkchop.redhat.com (internal) that does the rsync afterwards
# the chroot in /mashroot is premade (ick)

DATE=$1

[ -z "$DATE" ] && {
	echo "usage: buildrawhide <date>"
	exit 1
}

cp /home/fedora/notting/mash-latest.rpm /mashroot/tmp
mount -t nfs -o rw,defaults ntap-fedora1.fedora.phx.redhat.com:/vol/fedora/build/koji /mashroot/mnt/koji/
chroot /mashroot bash -- << EOF
set -x
yum -y upgrade
yum -y install koji yum createrepo cvs make intltool findutils
yum -y install /tmp/mash-latest.rpm

OLD=$(find /mnt/koji/mash/ -maxdepth 1 -type d -name "rawhide-20*" 2>/dev/null| sort | tail -1)
mkdir /tmp/mashbuild.$DATE
cd /tmp/mashbuild.$DATE
cvs -d :pserver:anonymous@cvs.fedora.redhat.com:/cvs/extras -z3 co comps && {
	cd comps
	make comps-f7.xml
	cp comps-f7.xml ../comps.xml
	cd ..
}
mkdir -p /mnt/koji/mash/rawhide-$DATE/logs
mash -o /mnt/koji/mash/rawhide-$DATE --compsfile /tmp/mashbuild.$DATE/comps.xml development 2>&1 | tee /mnt/koji/mash/rawhide-$DATE/logs/mash.log
rc=$?
if [ "$rc" = "0" ]; then
	[ -n "$OLD" ] && /usr/share/mash/treediff /mnt/koji/mash/rawhide-$DATE/development $OLD/development > /mnt/koji/mash/rawihde-$DATE/logs/treediff
fi
rm -rf /tmp/mashbuild.$DATE
exit $rc
EOF
rc=$?
umount /mashroot/mnt/koji
# hack
# i386
/home/fedora/notting/pungify $DATE i386 mock@hammer2 2>&1 | tee /mnt/koji/mash/rawhide-$DATE/logs/pungify-i386.log &
/home/fedora/notting/pungify $DATE x86_64 mock@xenbuilder3 2>&1 | tee /mnt/koji/mash/rawhide-$DATE/logs/pungify-x86_64.log &
/home/fedora/notting/pungify $DATE ppc mock@ppc2 2>&1 | tee /mnt/koji/mash/rawhide-$DATE/logs/pungify-ppc.log &
wait
exit $rc