diff options
author | Andrew Manison <amanison@anselsystems.com> | 2012-01-03 07:51:02 +0000 |
---|---|---|
committer | Andrew Manison <amanison@anselsystems.com> | 2012-01-03 07:51:02 +0000 |
commit | 12ad231161f7f816c875ea3dd46d135fd20a5d1c (patch) | |
tree | 3daf8ecaa5428dece7099e6b64bb7657186b0b8c | |
parent | 729bf5217292d082dcadf37a7e19424a156eca5d (diff) | |
download | aports-12ad231161f7f816c875ea3dd46d135fd20a5d1c.tar.bz2 aports-12ad231161f7f816c875ea3dd46d135fd20a5d1c.tar.xz |
aports tree: Removed QA build scripts to new repo
-rw-r--r-- | Makefile | 75 | ||||
-rw-r--r-- | acceptable-package-list.txt | 67 | ||||
-rwxr-xr-x | aport.lua | 244 | ||||
-rwxr-xr-x | makeall.sh | 8 | ||||
-rwxr-xr-x | rebuild-alpine.sh | 129 |
5 files changed, 0 insertions, 523 deletions
diff --git a/Makefile b/Makefile deleted file mode 100644 index a85a3ff569..0000000000 --- a/Makefile +++ /dev/null @@ -1,75 +0,0 @@ -.PHONY: main testing non-free unstable - -rootdir := $(shell pwd) - -all: main testing non-free unstable - -apkbuilds := $(shell find . -maxdepth 3 -name APKBUILD -print) - -all-pkgs := $(sort $(subst ./,,$(patsubst %/,%,$(dir $(apkbuilds))))) - -main-pkgs := $(shell ./aport.lua deplist $(rootdir) main) - -testing-pkgs := $(shell ./aport.lua deplist $(rootdir) testing) - -non-free-pkgs := $(shell ./aport.lua deplist $(rootdir) non-free) - -unstable-pkgs := $(shell ./aport.lua deplist $(rootdir) unstable) - -main: - for p in $(main-pkgs) ; \ - do \ - cd $(rootdir)/$@/$$p; \ - abuild -r; \ - done - -testing: - for p in $(testing-pkgs) ; \ - do \ - cd $(rootdir)/$@/$$p; \ - abuild -r; \ - done - -non-free: - for p in $(non-free-pkgs) ; \ - do \ - cd $(rootdir)/$@/$$p; \ - abuild -r; \ - done - -unstable: - for p in $(unstable-pkgs) ; \ - do \ - cd $(rootdir)/$@/$$p; \ - abuild -r; \ - done - -clean: - for p in $(all-pkgs) ; do \ - cd $(rootdir)/$$p; \ - abuild clean; \ - abuild cleanpkg; \ - done - -cleanold: - for p in $(all-pkgs) ; do \ - cd $(rootdir)/$$p; \ - abuild cleanoldpkg; \ - done - -fetch: - for p in $(all-pkgs) ; do \ - cd $(rootdir)/$$p; \ - abuild fetch; \ - done - -distclean: - for p in $(all-pkgs) ; \ - do \ - cd $(rootdir)/$$p; \ - abuild clean; \ - abuild cleanoldpkg; \ - abuild cleanpkg; \ - abuild cleancache; \ - done - diff --git a/acceptable-package-list.txt b/acceptable-package-list.txt deleted file mode 100644 index 99d3a2138b..0000000000 --- a/acceptable-package-list.txt +++ /dev/null @@ -1,67 +0,0 @@ -busybox-initscripts -<<<<<<< HEAD -======= -abuildhelper ->>>>>>> 0c5d733db74cad4285bc792567963c45a0b7ba2d -file -libcap -alpine-baselayout -openrc -libcrypto1.0 -bbsuid -sudo -libssl1.0 -openssl -libgcc -libstdc++ -binutils -libgomp -libobjc -libmpc -gcc -g++ -mkinitfs -mtools -libc0.9.32 -busybox -alpine-conf -zlib -apk-tools -uclibc-utils -alpine-base -openssh-client -openssh -fakeroot -pax-utils -abuild -email -lua -ncurses-base -ncurses-libs -screen -pkgconfig -gmp5 -mpfr3 -make -patch -linux-headers -libthread_db -uclibc-dev -build-base -curl -expat -git -cramfs -bzip2 -libbz2 -cdrkit -acct -alpine-sdk -<<<<<<< HEAD -======= -squashfs-tools -xz-libs -lzo -libssh2 -libattr ->>>>>>> 0c5d733db74cad4285bc792567963c45a0b7ba2d diff --git a/aport.lua b/aport.lua deleted file mode 100755 index 71113475af..0000000000 --- a/aport.lua +++ /dev/null @@ -1,244 +0,0 @@ -#!/usr/bin/lua - - --- those should be read from some config file -aportsdir = "~/aports" -repos = { "main", "testing" } - - -function split(str) - local t = {} - if (str == nil) then - return nil - end - for e in string.gmatch(str, "%S+") do - table.insert(t, e) - end - return t -end - -function split_apkbuild(line) - local r = {} - local dir, pkgname, pkgver, pkgrel, depends, makedepends, subpackages, source = string.match(line, "([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)|([^|]*)") - r.dir = dir - r.pkgname = pkgname - r.pkgver = pkgver - r.pkgrel = pkgrel - r.depends = split(depends) - r.makedepends = split(makedepends) - r.subpackages = split(subpackages) - r.source = split(source) - return r -end - --- parse the APKBUILDs and return a list -function parse_apkbuilds(dir, repos) - local i,v, p - local str="" - if repos == nil then - return - end - --expand repos - for i,v in ipairs(repos) do - str = str..dir.."/"..v.."/*/APKBUILD " - end - - local p = io.popen([[ - for i in ]]..str..[[; do - pkgname= - pkgver= - pkgrel= - depends= - makedepends= - subpackages= - source= - dir="${i%/APKBUILD}" - cd "$dir" - . ./APKBUILD - echo $dir\|$pkgname\|$pkgver\|$pkgrel\|$depends\|$makedepends\|$subpackages\|$source - done - ]]) - return function() - local line = p:read("*line") - if line == nil then - p:close() - return nil - end - return split_apkbuild(line) - end -end - -function target_packages(pkgdb, pkgname) - local i,v - local t = {} - for i,v in ipairs(pkgdb[pkgname]) do - table.insert(t, pkgname.."-"..v.pkgver.."-r"..v.pkgrel..".apk") - end - return t -end - -function list_depends( pkg, pkgdb ) - local dl = {} - local s - if pkg and not pkg.added then - pkg.added = true - - if pkg.depends then - for i,v in ipairs(pkg.depends) do - --print("v = <"..v..">") - s = list_depends( pkgdb[v], pkgdb ) - if #s > 0 then - dl[#dl + 1] = s - end - end - end - if pkg.makedepends then - for i,v in ipairs(pkg.makedepends) do - --print("v = {"..v.."}") - s = list_depends( pkgdb[v], pkgdb ) - if #s > 0 then - dl[#dl + 1] = s - end - end - end - dl[#dl + 1] = pkg.pkgname - end - - s = table.concat(dl," ") - --print("s = ["..s.."]") - return s -end - -function init_apkdb(aportsdir, repos) - local pkgdb = {} - local revdeps = {} - local a - - for a in parse_apkbuilds(aportsdir, repos) do - -- io.write(a.pkgname.." "..a.pkgver.."\t"..a.dir.."\n") - if pkgdb[a.pkgname] == nil then - pkgdb[a.pkgname] = {} - end - --table.insert(pkgdb[a.pkgname], a) - pkgdb[a.pkgname] = a - --print("pk "..a.pkgname.." is a "..type(a).." ("..pkgdb[a.pkgname].pkgname..")") - -- add subpackages to package db - local k,v - for k,v in ipairs(a.subpackages) do - if pkgdb[v] == nil then - pkgdb[v] = {} - end - --table.insert(pkgdb[v], a) - pkgdb[v] = a - end - -- add to reverse dependencies - for k,v in ipairs(a.makedepends) do - if revdeps[v] == nil then - revdeps[v] = {} - end - table.insert(revdeps[v], a) - end - end - return pkgdb, revdeps -end - --- PKGBUILD import -function split_pkgbuild(line) - local r = {} - local pkgname, pkgver = string.match(line, "([^|]*)|([^|]*)") - r.pkgname = pkgname - r.pkgver = pkgver - return r -end - -function parse_pkgbuilds(dir, repos) - local i,v, p - local str="" - if repos == nil then - return - end - --expand repos - for i,v in ipairs(repos) do - str = str..dir.."/"..v.."/*/PKGBUILD " - end - - local p = io.popen([[/bin/bash -c ' - for i in ]]..str..[[; do - pkgname= - pkgver= - source $i - echo $pkgname\|$pkgver - done - ' 2>/dev/null - ]]) - return function() - local line = p:read("*line") - if line == nil then - p:close() - return nil - end - return split_pkgbuild(line) - end -end - -function init_absdb(dir, repos) - local p - local db = {} - for p in parse_pkgbuilds(dir, repos) do - if db[p.pkgname] == nil then - db[p.pkgname] = {} - end - table.insert(db[p.pkgname], p.pkgver) - end - return db -end - - --- Applets ----------------------- -applet = {} -function applet.revdep(arg) - local pkg = arg[2] - if pkg == nil then - -- usage? - return nil - end - local apkdb, rev = init_apkdb(aportsdir, repos) - local _,p - for _,p in ipairs(rev[pkg] or {}) do - print(p.pkgname) - end -end ---absdb = init_absdb("/var/abs", { "core", "extra", "community" }) - -function applet.deplist(arg) - local apkdb, rev = init_apkdb(arg[2],{ arg[3] }) - - local deplist = {} - local nm,pk - for nm,pk in pairs(apkdb) do - local dl - --print("pk "..nm.." is a "..type(pk).." ("..apkdb[nm].pkgname..")") - --deplist[#deplist + 1] = "***" - dl = list_depends(pk,apkdb) - -- print("deplist for "..nm..": "..deplist) - if #dl > 0 then - deplist[#deplist + 1] = dl - end - end - print(table.concat(deplist," ")) -end - -cmd = arg[1] - -if cmd == nil then - -- usage - io.stderr:write( "no command given\n" ); - return -end - -if type(applet[cmd]) == "function" then - applet[cmd](arg) -else - io.stderr:write(cmd..": invalid applet\n") -end - diff --git a/makeall.sh b/makeall.sh deleted file mode 100755 index 10966c3fdf..0000000000 --- a/makeall.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -for p in 1 2 3 -do - echo "============>>> ERROR: Pass $p <<<============" - make main 2>&1 | tee makelog-pass-$p-main.txt | grep ">>> ERROR:" - make testing 2>&1 | tee makelog-pass-$p-testing.txt | grep ">>> ERROR:" -done diff --git a/rebuild-alpine.sh b/rebuild-alpine.sh deleted file mode 100755 index 0b79eeb9df..0000000000 --- a/rebuild-alpine.sh +++ /dev/null @@ -1,129 +0,0 @@ -rootdir=$(pwd -P) -pkglist="$rootdir/acceptable-package-list.txt" - -distclean () { - echo "Removing traces of previous builds from $rootdir" - local allpkgs=$(find $rootdir -maxdepth 3 -name APKBUILD -print | sed -e 's/\/APKBUILD//g' | sort) - for p in $allpkgs ; do - cd $p - pwd - abuild clean 2>&1 - abuild cleanoldpkg 2>&1 - abuild cleanpkg 2>&1 - abuild cleancache 2>&1 - done -} - -pkgcheck () { - local installed - installed=$(apk info) - for q in $installed ; do - if [ -z "$(grep $q $pkglist)" ] ; then - echo "Removing unwanted installed package $q" - sudo apk del $q - fi - done -} - -build () { - local pkgs - local maintainer - local pkgno - local failed - pkgs=$($rootdir/aport.lua deplist $rootdir $1) - pktcnt=$(echo $pkgs | wc -w) - pkgno=0 - failed=0 - for p in $pkgs ; do - if [ ! -d "$rootdir/$1/$p" ] ; then - continue - fi - - pkgcheck - pkgno=$(expr "$pkgno" + 1) - echo "Building $p ($pkgno of $pktcnt in $1 - $failed failed)" - cd $rootdir/$1/$p - if [ -n "$debug" ] ; then - apk info | sort > $rootdir/packages.$1.$pkgno.$p.before - fi - abuild -rm > $rootdir/$1_$p.txt 2>&1 - if [ "$?" = "0" ] ; then - if [ -z "$debug" ] ; then - rm $rootdir/$1_$p.txt - fi - else - echo "Package $1/$p failed to build (output in $rootdir/$1_$p.txt)" - if [ -n "$mail" ] ; then - maintainer=$(grep Maintainer APKBUILD | cut -d " " -f 3- | sed 's/.*< *//;s/ *>.*//;' ) - if [ -n "$maintainer" ] ; then - recipients="$maintainer,alpine-devel@lists.alpinelinux.org" - else - recipients="alpine-devel@lists.alpinelinux.org" - fi - echo "$1/$p: sending mail to [$recipients]" >> $rootdir/mail.lst - if [ $(wc -l $rootdir/$1_$p.txt | cut -f 1 -d ' ') -gt 400 ]; then - TMPFILE="$(mktemp $1_$p.XXXXXX).txt" || exit 1 - head -n 200 $rootdir/$1_$p.txt >> $TMPFILE - echo "-------" >> $TMPFILE - echo "snip..." >> $TMPFILE - echo "-------" >> $TMPFILE - tail -n 200 $rootdir/$1_$p.txt >> $TMPFILE - BUILDLOG="$TMPFILE" - else - BUILDLOG="$rootdir/$1_$p.txt" - fi - - echo "Package $1/$p failed to build. Build output is attached" | \ - email -s "NOT SPAM $p build report" -n "AlpineBuildBot" -f "buildbot@alpinelinux.org" -a "$BUILDLOG" "$recipients" - if [ "$BUILDLOG" = "$TMPFILE" ]; then - rm $BUILDLOG - fi - fi - failed=$(expr "$failed" + 1) - fi - if [ -n "$debug" ] ; then - apk info | sort > $rootdir/packages.$1.$pkgno.$p.after - fi - done - - if [ "$failed" = "0" ] ; then - echo "All $pktcnt packages in $1 built successfully" >> aport-build-log.txt - fi - - cd $rootdir -} - -touch START_OF_BUILD.txt -rm -f mail.lst - -unset clean -unset mail -while getopts "cmd" opt; do - case $opt in - 'c') clean="--clean";; - 'm') mail="--mail";; - 'd') debug="--debug";; - esac -done - -if [ -n "$clean" ] ; then - echo "Invoked with 'clean' option. This will take a while ..." - tmp=$(distclean) - echo "Done" -fi - -echo "Refresh aports tree" -git pull - -sudo apk -U upgrade - -for s in main testing unstable ; do - echo "Building packages in $s" - pkgcheck - build $s -done - -touch END_OF_BUILD.txt - -echo "Done" - |