diff options
author | asami <asami@FreeBSD.org> | 1999-09-11 08:35:51 +0800 |
---|---|---|
committer | asami <asami@FreeBSD.org> | 1999-09-11 08:35:51 +0800 |
commit | 2799fda495173666355f148a67cc029d8b32e51c (patch) | |
tree | 809c860b5393ea502e9b1a476ffa0dbbe31c89fc /Tools | |
parent | 1aef60cffe4b0b7c15c64cbdf59c3e53b56a7055 (diff) | |
download | freebsd-ports-gnome-2799fda495173666355f148a67cc029d8b32e51c.tar.gz freebsd-ports-gnome-2799fda495173666355f148a67cc029d8b32e51c.tar.zst freebsd-ports-gnome-2799fda495173666355f148a67cc029d8b32e51c.zip |
(1) Instead of specifying list of package names of dummy ports (i.e.,
XFree86, Motif) to copy, make a variable hold directory names, and
do a "make package-name" in there to obtain the package names.
(2) Exit if there is problem in INDEX. A line that contains
"non-existent" (suggesting a dangling dependency) or a line that
has less or more than nine |'s flag errors.
(3) Pass the fifth argument (bindist.tar's md5) to setupnode.
(4) Typo in spelling "restricted".
Submitted by: marcel
(5) Run cvsup at verbosity level 0 instead of 1.
(6) Print out only ${PKGNAME}, not ${PKGNAME}.log or ${PKGNAME}.tgz
when reporting new or old packages/failures.
(7) Archive /usr/ports used to build packages in ${branch}/tarballs.
Requested by: steve
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/dopackages | 55 |
1 files changed, 36 insertions, 19 deletions
diff --git a/Tools/portbuild/scripts/dopackages b/Tools/portbuild/scripts/dopackages index 49915a086025..81363ebb794d 100755 --- a/Tools/portbuild/scripts/dopackages +++ b/Tools/portbuild/scripts/dopackages @@ -4,6 +4,9 @@ pb=/a/asami/portbuild user=asami +# packages for dependencies only +dummyports="x11/XFree86 x11-toolkits/Motif-dummy" + usage () { echo "usage: [-nobuild] [-noindex] [-noduds] [-nocvsup] branch" exit 1 @@ -25,12 +28,18 @@ makeindex () { echo "index generation ended at $(date)" if grep -q non-existent INDEX; then echo "errors in INDEX:" - grep -C non-existent INDEX - grep -v non-existent INDEX > INDEX.tmp - mv -f INDEX.tmp INDEX + grep non-existent INDEX + exit 1 +# grep -C non-existent INDEX +# grep -v non-existent INDEX > INDEX.tmp +# mv -f INDEX.tmp INDEX fi echo $(wc -l <INDEX) "lines in INDEX" chown ${user} INDEX + if ! awk -F '|' '{if (NF != 10) { error=1; printf("line %d: %s\n", NR, $0)}} END {if (error == 1) exit(1)}' INDEX; then + echo "error in INDEX" + exit 1 + fi } # usage: makeduds pb scripts branch @@ -55,17 +64,18 @@ makeduds () { cp -p ${pb}/${branch}/duds ${pb}/${branch}/duds.old } -# usage: setupnode pb scripts branch me node +# usage: setupnode pb scripts branch me node md5 setupnode () { pb=$1 scripts=$2 branch=$3 me=$4 node=$5 + md5=$6 echo "setting up of $node started at $(date)" scp -p -a ${scripts}/setupnode ${node}:${scripts} - ssh -n ${node} ${scripts}/setupnode ${me} ${pb} ${branch} + ssh -n ${node} ${scripts}/setupnode ${me} ${pb} ${branch} ${md5} echo "setting up of $node ended at $(date)" } @@ -79,9 +89,9 @@ restrictedlist () { echo "================================================" echo "creating restricted list" echo "================================================" - echo "restricted list genaration started at $(date)" + echo "restricted list generation started at $(date)" make ECHO_MSG=/usr/bin/true clean-restricted-list > ${pb}/${branch}/restricted.sh - echo "restricted list genaration ended at $(date)" + echo "restricted list generation ended at $(date)" echo $(grep -c '^#' ${pb}/${branch}/restricted.sh) "ports in ${pb}/${branch}/restricted.sh" } @@ -157,7 +167,7 @@ if [ "$nocvsup" = 0 ]; then echo "================================================" echo "running cvsup" echo "================================================" - su ${user} -c 'cvsup -g -L 1 /etc/supfile.cvsup' + su ${user} -c 'cvsup -g -L 0 /etc/supfile.cvsup' echo "================================================" echo "running cvs update on /usr/ports" echo "================================================" @@ -173,22 +183,22 @@ if [ "$nocvsup" = 0 ]; then su ${user} -c 'cvs -q update -d -P' fi -# this one not in background to check return status +# these two not in background to check return status + if [ "$noduds" = 0 ]; then makeduds ${pb} ${scripts} ${branch} fi -# generate new Makefile if [ "$noindex" = 0 ]; then - makeindex ${pb} ${scripts} ${branch} ${user} & - sleep 2 + makeindex ${pb} ${scripts} ${branch} ${user} fi +md5=$(/sbin/md5 ${pb}/${branch}/tarballs/bindist.tar | awk '{print $4}') echo "================================================" echo "setting up nodes" echo "================================================" for node in $(awk '{print $1}' ${pb}/mlist); do - setupnode ${pb} ${scripts} ${branch} ${me} ${node} & + setupnode ${pb} ${scripts} ${branch} ${me} ${node} ${md5} & sleep 2 done @@ -216,8 +226,9 @@ if [ "$nobuild" = 0 ]; then mv -f errors logs packages old-errors make.* bak mkdir -p errors logs packages/All chown -R ${user} errors logs packages - cp -p tarballs/XFree86-3.3.4.tgz packages/All - cp -p tarballs/Motif-*.tgz packages/All + for dir in ${dummyports}; do + cp -p tarballs/$(cd ${pb}/usr/ports/$dir; make package-name).tgz packages/All + done count=$(awk '{sum+=$2}END{print sum+NR/2}' ${pb}/mlist) cd ${pb}/${branch}/packages/All echo "================================================" @@ -273,7 +284,7 @@ if [ "$nobuild" = 0 ]; then cd ${pb}/${branch}/errors for i in *.log; do if [ ! -f ../bak/errors/$i ]; then - echo -n " $i" + echo -n " $(basename $i .log)" fi done echo @@ -283,7 +294,7 @@ if [ "$nobuild" = 0 ]; then cd ${pb}/${branch}/bak/packages/All for i in *.tgz; do if [ ! -f ../../../packages/All/$i ]; then - echo -n " $i" + echo -n " $(basename $i .tgz)" fi done echo @@ -293,7 +304,7 @@ if [ "$nobuild" = 0 ]; then cd ${pb}/${branch}/bak/errors for i in *.log; do if [ ! -f ../../errors/$i ]; then - echo -n " $i" + echo -n " $(basename $i .log)" fi done echo @@ -303,10 +314,16 @@ if [ "$nobuild" = 0 ]; then cd ${pb}/${branch}/packages/All for i in *.tgz; do if [ ! -f ../../bak/packages/All/$i ]; then - echo -n " $i" + echo -n " $(basename $i .tgz)" fi done echo + echo "================================================" + echo "archiving /usr/ports" + echo "================================================" + cd ${pb}/usr + tar --exclude CVS -czf ${pb}/${branch}/tarballs/ports.tar.gz ports + echo fi echo "================================================" echo "all done at $(date)" |