auto compiling

1997-06-25 Thread Andreas Jellinghaus
is someone willing to test autocompiling ? my auto compiler script work
fine for me, i will do some cleanup, add command line options and
release them. thanks to sim tailor for a pc where i can test and compile
libc5 binaries. to run a full test, i will need a pc with a big disk
(debian source mirror, work space to compile, and enough space to hold
all binaries).

regards, andreas


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .



auto compiling

1997-06-28 Thread Andreas Jellinghaus
hy.

here are my auto compiling script. there is a bit more management in it,
and i seperated the whole thing in two scripts (the basic idea was, that
they could run on seperated machine, or the build script could run in a
chroot environment for security...).

i only tried to compile my own packages (i don't have a debian source
mirror here, and also no access to a pc with such a mirror).

i started the scripts with :
cd /home/devel

if [ -f builder.pid ] 
then
kill `cat builder.pid`
rm builder.pid
fi

if [ -f manager.pid ] 
then
kill `cat manager.pid`
rm manager.pid
fi


bin/builder -W/home/devel/Work > debug.builder 2>&1 &
bin/manager -I/home/devel/Incoming -O/home/devel/Done -W/home/devel/Work \
-F/home/devel/Failed -L/home/devel/Logs > debug.manager 2>&1 &

regards, andreas
#!/bin/bash 

set -e

version="0.1"

progname="`basename \"$0\"`"

pidfile="${progname}.pid"
workdir=""
arch="`dpkg --print-architecture`"
clean=""
target="binary"
targetparam=""
makeflags=--silent

usageversion () {
cat >&2 <pidfile (default ${pidfile})
 -Wwork directory
 -a   architectute used in file names (default ${arch})
 -c also log cleanup
 -v verbose, don't set MAKEFLAGS to --silent
 -d debug mode (set -x)
 -h print this message 
END
}

while [ $# != 0 ]
do 
value="`echo x\"$1\" | sed -e 's/^x-.//'`" 
case "$1" in
-h) usageversion; exit 0 ;;
-B) target="binary-arch"; targetparam="-B" ;;
-p*)pidfile="${value}" ;;
-W*)workdir="${value}" ;;
-a*)arch="${value}" ;;
-v) makeflags="" ;;
-c) clean="true" ;;
-d) set -x ;;
*)  echo >&2 "${progname}: unknown option or argument $1"
usageversion; exit 2 ;;
esac
shift
done

if [ -z "${workdir}" ]; then
echo "you must specify a workdir with -W" >&2
exit 1
fi

if ! [ -d ${workdir} ]; then 
echo "no such directory : ${workdir}" >&2
exit 1
fi

if [ -e "${pidfile}" ]; then
echo "pidfile already exists : ${pidfile}" >&2
exit 1
fi

trap "rm -f ${pidfile}" 1 2 3 15
echo $$ > ${pidfile}

if [ -n "${makeflags}" ]; then export MAKEFLAGS="${makeflags}"; fi

cd ${workdir}

while true
do
while ! test -e todo 
do
sleep 10
done

file="`cat todo`"
fdir="`dirname ${file}`"
file="`basename ${file}`"
package="`echo ${file} |cut -d_ -f1`"
suffix="`echo ${file} |cut -d_ -f2`"
version="`basename ${suffix} .dsc`"
dirver="`echo ${version}|cut -d- -f1`"
dir="${package}-${dirver}"
changes="${package}_${version}_${arch}.changes"
orig="${package}_${dirver}.orig.tar.gz"
logfile="${package}_${version}_${arch}.buildlog"
cleanlog="/dev/null"

rm todo

if [ -n "${clean}" ]; then cleanlog="${logfile}" ; fi

rm -rf *

echo "BUILD : extracting ${package} ${version}" >> ${logfile}

if ! dpkg-source -x ${fdir}/${file} 2>&1 >> ${logfile}
then
rm -rf ${dir}
echo "BUILD : Couldn't extract ${file}" >> ${logfile}
echo "BUILD : failed ${package} ${version}" >> ${logfile}
echo "failed" > result
continue
fi

rm ${orig}

echo "BUILD : building ${package} ${version}" >> ${logfile}

cd ${dir}

if ! debian/rules build 2>> ../${logfile} >> ../${logfile}
then
build clean 2>> ../${cleanlog} >> ../${cleanlog}
cd ..
rm -rf $DIR
echo "BUILD : Couldn't compile ${file}" >> ${logfile}
echo "BUILD : failed ${package} ${version}" >> ${logfile}
echo "failed" > result
continue
fi

echo "BUILD : packaging ${package} ${version}" >> ../${logfile}

if ! build $target 2>> ../${logfile} >> ../${logfile}
then
build clean 2>> ../${cleanlog} >> ../${cleanlog}
cd ..
rm -rf ${dir}
echo &quo

Re: auto compiling

1997-06-28 Thread Andy Mortimer
On Jun 28, Andreas Jellinghaus wrote
> here are my auto compiling script. there is a bit more management in it,
> and i seperated the whole thing in two scripts (the basic idea was, that
> they could run on seperated machine, or the build script could run in a
> chroot environment for security...).

Thankyou, I'm sure they're very nice. But please don't send things like
this to the list: they aren't very big on their own, but some of us do
have to pay to download email, and the more people do this, the more
stuff I *have* to download that I'll probably never use.

Instead, make up a simple package of it, and stick it up for FTP
somewhere (I would suggest experimental, but that's no longer allowed, is
it? Where's the canonical place for this sort of thing now?). Then post
your changes here, and interested people can download it themselves.

Thanks for your time,

&E

-- 
Andy Mortimer, [EMAIL PROTECTED]
http://www.poboxes.com/andy.mortimer
PGP public key available on key servers
--
Your face! I'll never see you this way again.
I captured it so perfectly, as if I knew you'd disappear away.


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .