5 |
# Normally run as "buildrobot" |
# Normally run as "buildrobot" |
6 |
# Requires CVS/SSH access to cvs.sourceforge.net:/cvsroot/smeserver |
# Requires CVS/SSH access to cvs.sourceforge.net:/cvsroot/smeserver |
7 |
|
|
8 |
PATH=/builds/bin:$PATH |
umask 002 |
|
export PATH |
|
9 |
|
|
10 |
cd ~/work |
PATH=~/bin:$PATH |
11 |
|
export PATH |
12 |
|
|
13 |
for package in $(cat modules) |
check_package() |
14 |
do |
{ |
15 |
|
for NVR in $(rpm -q --qf "%{NAME}-%{VERSION}-%{RELEASE}\n" --specfile $SPEC) |
16 |
|
do |
17 |
|
SRPM=/builds/rpms/SRPMS/$NVR*.src.rpm |
18 |
|
if [ -f $SRPM ] |
19 |
|
then |
20 |
|
echo "$SRPM already exists" |
21 |
|
return |
22 |
|
fi |
23 |
|
done |
24 |
|
|
25 |
case $package in |
case $package in |
26 |
SMEServer) continue ;; |
openssl) |
27 |
builds_bin) continue ;; |
build_package "--arch i386,i586,i686" |
28 |
cdrom.image) continue ;; |
;; |
29 |
e-smith-qpsmtpd) continue ;; |
kmod-*) |
30 |
e-smith-spamassassin) continue ;; |
build_package "--arch i586,i686" |
31 |
|
;; |
32 |
qpsmtpd) echo "$package doesn't build automagically yet" |
*-kmod) |
33 |
continue ;; |
build_package "--arch i686" |
34 |
|
;; |
35 |
perl-CGI-FormMagick) echo "$package doesn't build automagically yet" |
*) |
36 |
continue ;; |
build_package |
37 |
|
;; |
|
*) ;; |
|
38 |
esac |
esac |
39 |
|
} |
40 |
|
|
41 |
echo -n "Checking $package "; date |
build_package() |
42 |
|
{ |
43 |
|
if LANG=en_US mzbuild $1 --specfile $SPEC >> $LOG 2>&1 |
44 |
|
then |
45 |
|
release_rpms *.rpm |
46 |
|
else |
47 |
|
echo "Build of $package failed - check $LOG" |
48 |
|
fi |
49 |
|
} |
50 |
|
|
51 |
[ -d $package ] || mzget $package |
for package in $(ls /mirrors/cvsroot/smeserver | grep "^$1.*$") |
52 |
|
do |
53 |
|
case $package in |
54 |
|
CVSROOT|anaconda|booty|builds_bin|cdrom.image|devguide|isolinux) |
55 |
|
continue |
56 |
|
;; |
57 |
|
esac |
58 |
|
|
59 |
cd $package |
LOG=$HOME/logs/$package.log |
60 |
|
> $LOG |
61 |
|
|
62 |
LOG=$package.log |
echo -n "Checking $package "; date |
63 |
mzclean >$LOG 2>&1 |
(echo -n "Checking $package "; date) >> $LOG |
64 |
|
echo ========================================================== >> $LOG |
|
SPEC=$(echo F/*.spec) # XXX - FIXME - only one SPEC file |
|
|
|
|
|
if [ ! -f $SPEC ] |
|
|
then |
|
|
echo "Sorry - can't find $SPEC" |
|
|
continue |
|
|
fi |
|
65 |
|
|
66 |
NVR=$(rpm -q --qf "%{NAME}-%{VERSION}-%{RELEASE}" --specfile $SPEC) |
cd ~/work |
67 |
|
rm -rf ~/work/$package |
68 |
|
mzget --dir /mirrors/cvsroot/smeserver $package >> $LOG |
69 |
|
|
70 |
SRPM=/builds/rpms/SRPMS/$NVR.src.rpm |
cd ~/work/$package |
71 |
|
|
72 |
if [ -f $SRPM ] |
SPEC=$(ls F/*.spec 2> /dev/null | tail -1) |
73 |
|
if [ -z "$SPEC" ] |
74 |
then |
then |
75 |
echo "$SRPM already exists" |
echo "Not building $package (No SPEC file)" |
76 |
|
rm -f $LOG |
77 |
continue |
continue |
|
fi |
|
|
|
|
|
if mzbuild >>$LOG 2>&1 |
|
|
then |
|
|
release_rpms *.rpm |
|
78 |
else |
else |
79 |
echo "Build of $package failed - check $LOG" |
TAGS=$(cvs status -v $SPEC | awk '/\(branch:/ && !/\(branch: 1\.1\.1\)/ { print $1 }' | sort -u) |
80 |
fi |
fi |
81 |
|
check_package |
82 |
|
|
83 |
cd ~/work |
for tag in $TAGS |
84 |
|
do |
85 |
|
echo >> $LOG |
86 |
|
|
87 |
|
echo -n "Checking $package ($tag) "; date |
88 |
|
(echo -n "Checking $package ($tag) "; date) >> $LOG |
89 |
|
echo ========================================================== >> $LOG |
90 |
|
cd ~/work |
91 |
|
rm -rf ~/work/$package |
92 |
|
mzget --dir /mirrors/cvsroot/smeserver --tag $tag $package >> $LOG |
93 |
|
|
94 |
|
cd ~/work/$package |
95 |
|
|
96 |
|
SPEC=$(ls F/*.spec 2> /dev/null | tail -1) |
97 |
|
if [ -z "$SPEC" ] |
98 |
|
then |
99 |
|
echo "Not building $package (No SPEC file)" |
100 |
|
continue |
101 |
|
fi |
102 |
|
check_package |
103 |
|
done |
104 |
done |
done |