From: Joerg Jaspert Date: Thu, 31 Dec 2015 22:05:40 +0000 (+0100) Subject: Move 3 update- scripts into dinstall.functions/tasks proper X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=ddeee80a2f3389f89fb5ee1d7ecc5e36a68279d7;p=dak.git Move 3 update- scripts into dinstall.functions/tasks proper --- diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index f4a1ef3e..acfbee4d 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 diff --git a/config/debian/dinstall.tasks b/config/debian/dinstall.tasks index a817b8a8..6c470e2c 100644 --- a/config/debian/dinstall.tasks +++ b/config/debian/dinstall.tasks @@ -2,8 +2,12 @@ STATE startup none false false NOSTAGE startup none false false savetimestamp none none false false -updates none External\ Updates false false +qa1 none init false true pg_timestamp predinstall pg_dump1 true false +bugdoctxt none External\ Updates false true +mirrorlists none none false true +mailingliststxt none none false true +pseudopackages none none false true i18n1 none i18n\ 1 false false dep11 none dep11\ 1 false false NOSTAGE lockaccepted none false false diff --git a/config/debian/dinstall.variables b/config/debian/dinstall.variables index c4efabeb..09258819 100644 --- a/config/debian/dinstall.variables +++ b/config/debian/dinstall.variables @@ -52,3 +52,6 @@ for suite in testing unstable; do codename=${codename##* } extimportdists="${extimportdists} ${codename}" done + +# Common wget options +wgetopts="-t2 -T20 -q -N --ca-directory=/etc/ssl/ca-debian" diff --git a/scripts/debian/update-mailingliststxt b/scripts/debian/update-mailingliststxt deleted file mode 100755 index 9005a515..00000000 --- a/scripts/debian/update-mailingliststxt +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# -# Fetches latest copy of mailing-lists.txt -# Michael Beattie - -set -e - -export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars -. $SCRIPTVARS - -cd $ftpdir/doc - -echo Updating archive version of mailing-lists.txt -wget -t1 -T20 -q -N --ca-directory=/etc/ssl/ca-debian https://www.debian.org/misc/mailing-lists.txt || \ - echo "Some error occured..." - diff --git a/scripts/debian/update-mirrorlists b/scripts/debian/update-mirrorlists deleted file mode 100755 index a711d8a6..00000000 --- a/scripts/debian/update-mirrorlists +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# Very Very hackish script... dont laugh. -# Michael Beattie - -set -e - -export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars -. $SCRIPTVARS - -prog=$scriptdir/mirrorlist/mirror_list.pl -masterlist=$scriptdir/mirrorlist/Mirrors.masterlist - -test ! -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 - -cd $(dirname $masterlist) -cvs update - -if [ ! -f $ftpdir/README.mirrors.html -o $masterlist -nt $ftpdir/README.mirrors.html ] ; then - rm -f $ftpdir/README.mirrors.html $ftpdir/README.mirrors.txt - $prog -m $masterlist -t html > $ftpdir/README.mirrors.html - $prog -m $masterlist -t text > $ftpdir/README.mirrors.txt - echo Updated archive version of mirrors file -fi diff --git a/scripts/debian/update-pseudopackages.sh b/scripts/debian/update-pseudopackages.sh deleted file mode 100755 index 10c7bba7..00000000 --- a/scripts/debian/update-pseudopackages.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# -# Fetches latest copy of pseudo-packages -# Joerg Jaspert - -set -e - -export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars -. $SCRIPTVARS - -cd ${scriptdir}/masterfiles - -echo Updating archive version of pseudo-packages -for file in maintainers description; do - wget -t2 -T20 -q -N --ca-directory=/etc/ssl/ca-debian https://bugs.debian.org/pseudopackages/pseudo-packages.${file} || echo "Some error occured with $file..." -done