summaryrefslogtreecommitdiffstats
path: root/scripts/buildrawhide
blob: 7c11f74fc4007d019a8bf17ee1a086c447882dde (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
#!/bin/sh

# runs currently on releng1.fedora.phx.redhat.com
# invoked by a script on porkchop.redhat.com (internal) that does the rsync afterwards

DATE=$1

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

OLD=$(find /mnt/koji/mash/ -maxdepth 1 -type d -name "rawhide-20*" 2>/dev/null| sort | tail -1)

mkdir /tmp/mashbuild.$DATE
mkdir -p /mnt/koji/mash/rawhide-$DATE/logs
pushd /tmp/mashbuild.$DATE
cvs -d :pserver:anonymous@cvs.fedora.redhat.com:/cvs/pkgs -z3 -q co comps && {
	pushd comps
	make comps-rawhide
	cp comps-rawhide.xml /mnt/koji/mash/rawhide-$DATE/logs/
	popd
}
popd

mock -r fedora-rawhide-x86_64 --init
mock -r fedora-rawhide-x86_64 --no-clean --install koji yum createrepo cvs make intltool findutils mash yum-utils rsync repoview
mock -r fedora-rawhide-x86_64 --shell "mash -o /mnt/koji/mash/rawhide-$DATE --compsfile /mnt/koji/mash/rawhide-$DATE/logs/comps-rawhide.xml development > /mnt/koji/mash/rawhide-$DATE/logs/mash.log 2>&1" || exit 1

if [ -n "\$OLD" ]:
  then
  mock -r fedora-rawhide-x86_64 --shell "/usr/share/mash/treediff /mnt/koji/mash/rawhide-$DATE/development \$OLD/development > /mnt/koji/mash/rawhide-$DATE/logs/treediff"
fi

mock -r fedora-rawhide-x86_64 --shell "/usr/share/mash/spam-o-matic /mnt/koji/mash/rawhide-$DATE/development >/mnt/koji/mash/rawhide-$DATE/logs/depcheck" &

for arch in i386 x86_64 ppc ; do
    HOST=$(koji list-hosts --quiet --enabled --ready --arch=$arch | sed 's|/| |g' | sort -gn -k4 -k5r | awk -F '.' '{ print $1 ; exit }')
    /home/fedora/notting/pungify $DATE $arch mock@$HOST > /mnt/koji/mash/rawhide-$DATE/logs/pungify-$arch.log 2>&1 &
    done

wait
mock -r fedora-rawhide-x86_64 --clean