/[smeserver]/builds_bin/build_all
ViewVC logotype

Diff of /builds_bin/build_all

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by gordonr, Fri Nov 18 06:43:11 2005 UTC Revision 1.18 by slords, Sat Apr 14 21:21:22 2007 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/bash
2    # Build all locally maintained packages from CVS
3    # Check whether anything is new and let us know if there is
4    
5  cd /mirrors/mitel/devel/repo/SRPMS  # Normally run as "buildrobot"
6    # Requires CVS/SSH access to cvs.sourceforge.net:/cvsroot/smeserver
7    
8  FAILED=""  umask 002
9    
10  for file in e-smith*  PATH=~/bin:$PATH
11  do  export PATH
12      if [ -f /builds/rpms/SRPMS/$file ]  
13    check_package()
14    {
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
26            openssl)
27                build_package "--arch i386,i586,i686"
28                ;;
29            kmod-*)
30                build_package "--arch i586,i686"
31                ;;
32            *)
33                build_package
34                ;;
35        esac
36    }
37    
38    build_package()
39    {
40        if LANG=en_US mzbuild $1 --specfile $SPEC >> $LOG 2>&1
41      then      then
42          echo "Already built: $file"          release_rpms *.rpm
43          continue      else
44            echo "Build of $package failed - check $LOG"
45      fi      fi
46    }
47    
48    for package in $(ls /mirrors/cvsroot/smeserver | grep "^$1.*$")
49    do
50        case $package in
51            CVSROOT|anaconda|booty|builds_bin|cdrom.image|devguide|isolinux)
52                    continue
53                    ;;
54        esac
55    
56        LOG=$HOME/logs/$package.log
57        > $LOG
58    
59      echo "Building: $file"      echo -n "Checking $package "; date
60      if rpmbuild --rebuild $file      (echo -n "Checking $package "; date) >> $LOG
61        echo ========================================================== >> $LOG
62    
63        cd ~/work
64        rm -rf ~/work/$package
65        mzget --dir /mirrors/cvsroot/smeserver $package >> $LOG
66    
67        cd ~/work/$package
68    
69        SPEC=$(ls F/*.spec 2> /dev/null | tail -1)
70        if [ -z "$SPEC" ]
71      then      then
72          cp -p $file /builds/rpms/SRPMS          echo "Not building $package (No SPEC file)"
73            rm -f $LOG
74            continue
75      else      else
76          echo "FAILED: $file"          TAGS=$(cvs status -v $SPEC | awk '/\(branch:/ && !/\(branch: 1\.1\.1\)/ { print $1 }' | sort -u)
         FAILED="$FAILED $file"  
77      fi      fi
78  done      check_package
79    
80  echo "Failed to build: $FAILED"      for tag in $TAGS
81        do
82            echo >> $LOG
83    
84            echo -n "Checking $package ($tag) "; date
85            (echo -n "Checking $package ($tag) "; date) >> $LOG
86            echo ========================================================== >> $LOG
87            cd ~/work
88            rm -rf ~/work/$package
89            mzget --dir /mirrors/cvsroot/smeserver --tag $tag $package >> $LOG
90    
91            cd ~/work/$package
92    
93            SPEC=$(ls F/*.spec 2> /dev/null | tail -1)
94            if [ -z "$SPEC" ]
95            then
96                echo "Not building $package (No SPEC file)"
97                continue
98            fi
99            check_package
100        done
101    done


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed