X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fdinstall.functions;h=2ee713c98347a9ddbd65f4ce459db50d7dabbd04;hb=813801add25896afc4bd9839f5d1fe0c05eea465;hp=f351ad4aa73258b4a4a43d7ebd9eeb01c182570f;hpb=9639afdb34ea7c5fdaf62e05a78ca0aab288f6de;p=dak.git diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index f351ad4a..2ee713c9 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -56,14 +56,48 @@ function qa1() { ssh -n -2 -i ~dak/.ssh/push_merkel_qa -o BatchMode=yes -o SetupTimeOut=90 -o ConnectTimeout=90 qa@qa.debian.org sleep 1 } +function mirrorlists() { + local mldir="${scriptdir}/mirrorlist" + local masterlist=${mldir}/Mirrors.masterlist + + cd ${mldir} + + [[ -f ${HOME}/.cvspass ]] || touch ${HOME}/.cvspass + + grep -q "anonscm.debian.org:/cvs/webwml" ~/.cvspass || \ + echo ":pserver:anonymous@anonscm.debian.org:/cvs/webwml A" >> ${HOME}/.cvspass + + cvs update + + if [[ ! -f ${ftpdir}/README.mirrors.html ]] || [[ ${masterlist} -nt ${ftpdir}/README.mirrors.html ]]; then + rm -f ${ftpdir}/README.mirrors.{html,txt} + ${mldir}/mirror_list.pl -m ${masterlist} -t html > ${ftpdir}/README.mirrors.html + ${mldir}/mirror_list.pl -m ${masterlist} -t text > ${ftpdir}/README.mirrors.txt + log Updated archive version of mirrors file + fi +} + +function mailingliststxt() { + cd ${ftpdir}/doc + + log "Updating archive version of mailing-lists.txt" + wget ${wgetopts} https://www.debian.org/misc/mailing-lists.txt +} + +function pseudopackages() { + cd ${scriptdir}/masterfiles + + log "Updating archive version of pseudo-packages" + for file in maintainers description; do + wget ${wgetopts} https://bugs.debian.org/pseudopackages/pseudo-packages.${file} + done +} + # Updating various files -function updates() { - log "Updating Bugs docu, Mirror list and mailing-lists.txt" +function bugdoctxt() { + log "Updating Bugs docu" cd $configdir $scriptsdir/update-bugdoctxt - $scriptsdir/update-mirrorlists - $scriptsdir/update-mailingliststxt - $scriptsdir/update-pseudopackages.sh } # The first i18n one, syncing new descriptions @@ -319,11 +353,11 @@ function mkfilesindices() { ARCHES=$( (<$ARCHLIST sed -n 's/^.*|//p'; echo amd64) | grep . | grep -v all | sort -u) for a in $ARCHES; do (sed -n "s/|$a$//p" $ARCHLIST - sed -n 's/|all$//p' $ARCHLIST + sed -n 's/|all$//p' $ARCHLIST - cd $base/ftp - find ./dists -maxdepth 1 \! -type d - find ./dists \! -type d | grep -E "(proposed-updates.*_$a.changes$|/main/disks-$a/|/main/installer-$a/|/Contents-$a|/binary-$a/)" + cd $base/ftp + find ./dists -maxdepth 1 \! -type d + find ./dists \! -type d | grep -E "(proposed-updates.*_$a.changes$|/main/disks-$a/|/main/installer-$a/|/Contents-$a|/binary-$a/)" ) | sort -u | gzip -9 > arch-$a.list.gz done @@ -370,43 +404,43 @@ function mkfilesindices() { } psql -F' ' -At -c "SELECT id, suite_name FROM suite" | - while read id suite; do - [ -e $base/ftp/dists/$suite ] || continue - ( - (cd $base/ftp - distname=$(cd dists; readlink $suite || echo $suite) - find ./dists/$distname \! -type d - for distdir in ./dists/*; do - [ "$(readlink $distdir)" != "$distname" ] || echo $distdir - done - ) - suite_list $id - ) | sort -u | gzip -9 > suite-${suite}.list.gz - done + while read id suite; do + [ -e $base/ftp/dists/$suite ] || continue + ( + (cd $base/ftp + distname=$(cd dists; readlink $suite || echo $suite) + find ./dists/$distname \! -type d + for distdir in ./dists/*; do + [ "$(readlink $distdir)" != "$distname" ] || echo $distdir + done + ) + suite_list $id + ) | sort -u | gzip -9 > suite-${suite}.list.gz + done log "Finding everything on the ftp site to generate sundries" (cd $base/ftp; find . \! -type d \! -name 'Archive_Maintenance_In_Progress' | sort) >$ARCHLIST rm -f sundries.list zcat *.list.gz | cat - *.list | sort -u | - diff - $ARCHLIST | sed -n 's/^> //p' > sundries.list + diff - $ARCHLIST | sed -n 's/^> //p' > sundries.list log "Generating files list" for a in $ARCHES; do (echo ./project/trace; zcat arch-$a.list.gz source.list.gz) | - cat - sundries.list dists.list project.list docs.list indices.list | - sort -u | poolfirst > ../arch-$a.files + cat - sundries.list dists.list project.list docs.list indices.list | + sort -u | poolfirst > ../arch-$a.files done (cd $base/ftp/ - for dist in sid jessie stretch; do - find ./dists/$dist/main/i18n/ \! -type d | sort -u | gzip -9 > $base/ftp/indices/files/components/translation-$dist.list.gz - done + for dist in sid jessie stretch; do + find ./dists/$dist/main/i18n/ \! -type d | sort -u | gzip -9 > $base/ftp/indices/files/components/translation-$dist.list.gz + done ) (cat ../arch-i386.files ../arch-amd64.files; zcat suite-proposed-updates.list.gz ; zcat translation-sid.list.gz ; zcat translation-jessie.list.gz ; zcat translation-stretch.list.gz) | - sort -u | poolfirst > ../typical.files + sort -u | poolfirst > ../typical.files rm -f $ARCHLIST log "Done!" @@ -682,3 +716,9 @@ function startup() { touch "${LOCK_BRITNEY}" TMPFILES="${TMPFILES} ${LOCK_DAILY} ${LOCK_BRITNEY}" } + +function postcronscript() { + logstats ${LOGFILE} + state "all done" + touch "${DINSTALLEND}" +} \ No newline at end of file