Outils pour utilisateurs

Outils du site


doc:dak:analyse_usr_share_doc_dak_crontabs_cron.daily-security
#! /bin/sh
#
# Executed daily via cron, out of katie's crontab.

set -e
export SCRIPTVARS=/org/security.debian.org/katie/vars-security
. $SCRIPTVARS

################################################################################

# Fix overrides

rsync -ql ftp-master::indices/override\* $overridedir

cd $overridedir
find . -name override\*.gz -type f -maxdepth 1 -mindepth 1 | xargs gunzip -f
find . -type l -maxdepth 1 -mindepth 1 | xargs rm

rm -fr non-US
mkdir non-US
cd non-US
rsync -ql non-us::indices/override\* .
find . -name override\*.gz -type f -maxdepth 1 -mindepth 1 | xargs gunzip
find . -type l -maxdepth 1 -mindepth 1 | xargs rm
for i in *; do
    if [ -f ../$i ]; then
	cat $i >> ../$i;
    fi;
done
cd ..
rm -fr non-US

for suite in $suites; do
    case $suite in
	stable) override_suite=woody;;
	testing) override_suite=sarge;;
	*) echo "Unknown suite type ($suite)"; exit 1;;
    esac
    for component in $components; do
	for override_type in $override_types; do
	    case $override_type in
	       deb) type="" ;;
	       dsc) type=".src" ;;
	       udeb) type="skip" ;;
	    esac
	    if [ ! "$type" = "skip" ]; then
		$masterdir/natalie -q -S -t $override_type -s $suite -c updates/$component < override.$override_suite.$component$type
		case $suite in
		    stable)
			$masterdir/natalie -q -a -t $override_type -s $suite -c updates/$component < override.sarge.$component$type
			$masterdir/natalie -q -a -t $override_type -s $suite -c updates/$component < override.sid.$component$type
			;;
		    testing)
			$masterdir/natalie -q -a -t $override_type -s $suite -c updates/$component < override.sid.$component$type
		    	;;
		    *) echo "Unknown suite type ($suite)"; exit 1;;
		esac
	    fi
	done
    done
done

# Generate .all3 overides for the buildd support
for dist in potato woody sarge; do
    rm -f override.$dist.all3
    components="main contrib non-free";
    if [ -f override.$dist.main.debian-installer ]; then
	components="$components main.debian-installer";
    fi
    for component in $components; do
	cat override.$dist.$component >> override.$dist.all3;
    done;
done

################################################################################

# Freshen Packages-Arch-Specific

wget -qN http://buildd.debian.org/quinn-diff/Packages-arch-specific -O $base/buildd/Packages-arch-specific

################################################################################

cd $masterdir
shania
rhona
apt-ftparchive -q clean apt.conf-security
apt-ftparchive -q clean apt.conf.buildd-security

symlinks -d -r $ftpdir

pg_dump obscurity > /org/security.debian.org/katie-backup/dump_$(date +%Y.%m.%d-%H:%M:%S)

# Vacuum the database
set +e
echo "VACUUM; VACUUM ANALYZE;" | psql obscurity 2>&1 | egrep -v "^NOTICE:  Skipping \"pg_.*only table or database owner can VACUUM it$|^VACUUM$"
set -e

################################################################################
doc/dak/analyse_usr_share_doc_dak_crontabs_cron.daily-security.txt · Dernière modification: 2005/09/19 15:25 par lehobey