diff options
author | Andrew Manison <amanison@anselsystems.com> | 2010-04-28 14:33:44 +0000 |
---|---|---|
committer | Andrew Manison <amanison@anselsystems.com> | 2010-04-28 14:33:44 +0000 |
commit | 64723824fd317225bd675140261c8514acf4cff2 (patch) | |
tree | 97bc1842916d25e03a75d15cb17427d32a6a2d36 | |
parent | 0e1bf50148e1802f3f010d5df4354de0c56924d2 (diff) | |
download | alpine_aports-64723824fd317225bd675140261c8514acf4cff2.tar.bz2 alpine_aports-64723824fd317225bd675140261c8514acf4cff2.tar.xz alpine_aports-64723824fd317225bd675140261c8514acf4cff2.zip |
Added rebuild-alpine.sh script, for running in a build bot. Tweaks to top-level makefile.
-rw-r--r-- | Makefile | 6 | ||||
-rwxr-xr-x | makeall.sh | 5 | ||||
-rwxr-xr-x | rebuild-alpine.sh | 48 |
3 files changed, 57 insertions, 2 deletions
@@ -51,6 +51,12 @@ clean: | |||
51 | abuild cleanpkg; \ | 51 | abuild cleanpkg; \ |
52 | done | 52 | done |
53 | 53 | ||
54 | fetch: | ||
55 | for p in $(all-pkgs) ; do \ | ||
56 | cd $(rootdir)/$$p; \ | ||
57 | abuild fetch; \ | ||
58 | done | ||
59 | |||
54 | distclean: | 60 | distclean: |
55 | for p in $(all-pkgs) ; \ | 61 | for p in $(all-pkgs) ; \ |
56 | do \ | 62 | do \ |
diff --git a/makeall.sh b/makeall.sh index 1566f09026..10966c3fdf 100755 --- a/makeall.sh +++ b/makeall.sh | |||
@@ -1,7 +1,8 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | for p in 1 2 3 4 5 6 | 3 | for p in 1 2 3 |
4 | do | 4 | do |
5 | echo "============>>> ERROR: Pass $p <<<============" | 5 | echo "============>>> ERROR: Pass $p <<<============" |
6 | make main 2>&1 | tee makelog-pass-$p.txt | grep ">>> ERROR:" | 6 | make main 2>&1 | tee makelog-pass-$p-main.txt | grep ">>> ERROR:" |
7 | make testing 2>&1 | tee makelog-pass-$p-testing.txt | grep ">>> ERROR:" | ||
7 | done | 8 | done |
diff --git a/rebuild-alpine.sh b/rebuild-alpine.sh new file mode 100755 index 0000000000..c546a018d9 --- /dev/null +++ b/rebuild-alpine.sh | |||
@@ -0,0 +1,48 @@ | |||
1 | rootdir=$(pwd) | ||
2 | |||
3 | distclean () { | ||
4 | local allpkgs=$(find $rootdir -maxdepth 3 -name APKBUILD -print | sed -e 's/\/APKBUILD//g' | sort) | ||
5 | for p in $allpkgs ; do | ||
6 | cd $p | ||
7 | abuild clean 2>&1 | ||
8 | abuild cleanoldpkg 2>&1 | ||
9 | abuild cleanpkg 2>&1 | ||
10 | abuild cleancache 2>&1 | ||
11 | done | ||
12 | } | ||
13 | |||
14 | build () { | ||
15 | local pkgs | ||
16 | local maintainer | ||
17 | pkgs=$(./aport.lua deplist $rootdir $1) | ||
18 | for p in $pkgs ; do | ||
19 | echo "Building $p" | ||
20 | cd $rootdir/$1/$p | ||
21 | abuild -r > $rootdir/$1_$p.txt 2>&1 | ||
22 | if [ "$?" = "0" ] ; then | ||
23 | rm $rootdir/$1_$p.txt | ||
24 | else | ||
25 | maintainer=$(grep Maintainer APKBUILD | cut -d " " -f 3-) | ||
26 | if [ -z "$maintainer" ] ; then | ||
27 | maintainer="default maintainer" | ||
28 | fi | ||
29 | echo "Package $1/$p failed to build (output in $rootdir/$1_$p.txt)" | ||
30 | echo "Package $1/$p failed to build. Notify $maintainer. Output is attached" | email -s "NOT SPAM $p build report" -a $rootdir/$1_$p.txt -n AlpineBuildBot -f build@alpinelinux.org amanison@anselsystems.com | ||
31 | fi | ||
32 | done | ||
33 | cd $rootdir | ||
34 | } | ||
35 | |||
36 | echo "Removing traces of previous builds" | ||
37 | tmp=$(distclean) | ||
38 | |||
39 | echo "Refresh aports tree" | ||
40 | git pull | ||
41 | |||
42 | for s in main testing nonfree unstable ; do | ||
43 | echo "Building packages in $s" | ||
44 | build $s | ||
45 | done | ||
46 | |||
47 | echo "Done" | ||
48 | |||