/usr/sbin/elidad is in elida 0.4+nmu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | #!/bin/bash
# Copyright 2007-2009 Anibal Monsalve Salazar <anibal@debian.org>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
. /etc/elida/elida.conf
. $FUNCTIONS
$LOGGER -p syslog.info $BASENAME: starting
makedirs
piuparts_mirrors=
pbuilder_mirrors=
piuparts_bindmounts=
pbuilder_bindmounts=
regex="^file:(.*)"
for mirror in $MIRRORS
do
if [ -z "$pbuilder_mirrors" ]
then
pbuilder_mirrors="deb $mirror sid main"
piuparts_mirrors="-m '$mirror main'"
else
pbuilder_mirrors="$pbuilder_mirrors | deb $mirror sid main"
piuparts_mirrors="$piuparts_mirrors -m '$mirror main'"
fi
if [[ $mirror =~ $regex ]]
then
if [ -z "$pbuilder_bindmounts" ]
then
pbuilder_bindmounts="${BASH_REMATCH[1]}"
piuparts_bindmounts="--bindmount ${BASH_REMATCH[1]}"
else
pbuilder_bindmounts="$pbuilder_bindmounts ${BASH_REMATCH[1]}"
piuparts_bindmounts="$piuparts_bindmounts --bindmount ${BASH_REMATCH[1]}"
fi
fi
done
pbuilder_mirrors="'$pbuilder_mirrors'"
if [ -n "$pbuilder_bindmounts" ]
then
pbuilder_bindmounts="'$pbuilder_bindmounts'"
pbuilder_bindmounts_option="--bindmounts"
fi
tmp=$(mktemp $TMP-XXXXXX)
if [ -n "$(ls $ELIDAHOME/inprogress)" ]; then
mv $ELIDAHOME/inprogress/* $ELIDAHOME/ready
fi
while [ ! -f $ELIDAHOME/elida-stop ]
do
#dt=$(perl -e '$dt=time-(stat("'$ELIDAHOME/pbuilder_update_unstable.log'"))[9];print"$dt\n"')
if [ -f $ELIDAHOME/pbuilder_update_unstable.log ]; then
dt=$(( $( date +%s ) - $( date --reference=$ELIDAHOME/pbuilder_update_unstable.log +%s ) ))
else
dt=9999999
fi
if [ $dt -gt 10800 ]; then
log=$ELIDAHOME/pbuilder_update_unstable.log
echo pbuilder update --override-config --distribution unstable $pbuilder_bindmounts_option $pbuilder_bindmounts --othermirror $pbuilder_mirrors >> $log
eval pbuilder update --override-config --distribution unstable $pbuilder_bindmounts_option $pbuilder_bindmounts --othermirror $pbuilder_mirrors >> $log 2>&1
chmod 664 $log
chown $USERNAME:$GROUPNAME $log
fi
for pdv in $(ls -1rt $ELIDAHOME/ready)
do
[ -f $ELIDAHOME/elida-stop ] && break
log=$ELIDAHOME/apt-get_update.log
apt-get update > $log 2>&1
chmod 664 $log
chown $USERNAME:$GROUPNAME $log
[ -f $ELIDAHOME/ready/$pdv ] || continue
mv $ELIDAHOME/ready/$pdv $ELIDAHOME/inprogress/$pdv
pkg=${pdv%_*}
ver=${pdv#*_}
. $ELIDAHOME/inprogress/$pdv
if [ -d "$ELIDAHOME/result/$pkg" ]; then
dsc_old=$( echo $ELIDAHOME/result/$pkg/${pkg}_*.dsc )
if [ -f "$dsc_old" ]; then
pdv_old=${dsc_old##*/}
pdv_old=${pdv_old%*.dsc}
if [ "$pdv" == "$pdv_old" ]; then
rm -fr $ELIDAHOME/result/$pkg/*
else
rm -fr $ELIDAHOME/result/$pdv_old
mv $ELIDAHOME/result/$pkg $ELIDAHOME/result/$pdv_old
makedir $ELIDAHOME/result/$pkg
fi
else
rm -fr $ELIDAHOME/result/$pkg/*
fi
else
makedir $ELIDAHOME/result/$pkg
fi
log=$ELIDAHOME/result/$pkg/${pdv}_$ARCH.result.log
rm -f $ELIDAHOME/result/$pkg/*$ver*
date -R > $log
chmod 664 $log
echo $(hostname; dpkg --print-architecture; dpkg -l elida lintian piuparts pbuilder | grep ^ii | awk '{print $2,$3}') >> $log
echo >> $log
echo pbuilder build --override-config --distribution unstable $pbuilder_bindmounts_option $pbuilder_bindmounts --othermirror $pbuilder_mirrors --buildresult $ELIDAHOME/result/$pkg $ELIDAHOME/source/$pkg/$pdv.dsc "2>&1 | grep -v 'using uid of process'" >> $log
eval pbuilder build --override-config --distribution unstable $pbuilder_bindmounts_option $pbuilder_bindmounts --othermirror $pbuilder_mirrors --buildresult $ELIDAHOME/result/$pkg $ELIDAHOME/source/$pkg/$pdv.dsc 2>&1 | grep -v 'using uid of process' >> $log
chmod 2775 $ELIDAHOME/result $ELIDAHOME/result/$pkg
chmod 664 $ELIDAHOME/result/$pkg/*
chown $USERNAME:$GROUPNAME $ELIDAHOME/result/$pkg/*
if [ -e $ELIDAHOME/result/$pkg/${pdv}_$ARCH.changes ]; then
echo >> $log
echo "$ELIDAHOME/result/$pkg/${pdv}_$ARCH.changes:" >> $log
cat $ELIDAHOME/result/$pkg/${pdv}_$ARCH.changes >> $log
for f in $ELIDAHOME/result/$pkg/*$ver*deb
do
echo >> $log
echo "dpkg -I $f" >> $log
dpkg -I $f >> $log 2>&1
done
for f in $ELIDAHOME/result/$pkg/*$ver*deb
do
echo >> $log
echo "dpkg -c $f" >> $log
dpkg -c $f >> $log 2>&1
done
if [ -x "$LOCALARCHIVESCRIPT" ]
then
su - $USERNAME -c "$LOCALARCHIVESCRIPT $pkg"
fi
for f in $ELIDAHOME/result/$pkg/*$ver*deb
do
echo >> $log
echo piuparts -p -N $piuparts_bindmounts $piuparts_mirrors $f "2>&1 | grep -v '/dev/pts not mounted'" >> $log
eval piuparts -p -N $piuparts_bindmounts $piuparts_mirrors $f 2>&1 | grep -v '/dev/pts not mounted' >> $log 2>&1
done
echo >> $log
echo "lintian -i --show-overrides --pedantic $ELIDAHOME/result/$pkg/${pdv}_$ARCH.changes" >> $log
su - $USERNAME -c "lintian -i --show-overrides --pedantic $ELIDAHOME/result/$pkg/${pdv}_$ARCH.changes" >> $log 2>&1
fi
bzip2 -f -9 $log
log="$log.bz2"
rm -f $tmp
mpack -s "Re: $subject" -o $tmp $log
(echo -e "To: $from\nFrom: $FROM\nBcc: $BCC\nIn-Reply-To: $message_id\nUser-Agent: elida/$ELIDAVERSION"; cat $tmp) | $SENDMAIL -t
mv $ELIDAHOME/inprogress/$pdv "$ELIDAHOME/done/$pdv"
if [ -f $ELIDAHOME/elida-hup ]; then
rm -f $ELIDAHOME/elida-hup
break
fi
done
sleep 10
done
rm -f $ELIDAHOME/elida-stop
exit 0
|