error=${ERR:-"true"}
ARGS=${ARGS:-""}
+
+ log "########## DINSTALL BEGIN: ${FUNC} ${ARGS} ##########"
STAGEFILE="${stagedir}/${FUNC}_${ARGS}"
STAGEFILE=${STAGEFILE// /_}
if [ -f "${STAGEFILE}" ]; then
cat "${STAGEFILE}.log" >> "${LOGFILE}"
rm -f "${STAGEFILE}.log"
+ echo "########## DINSTALL END: ${FUNC} ##########"
+
if [ -f "${LOCK_STOP}" ]; then
log "${LOCK_STOP} exists, exiting immediately"
exit 42
while read SHASUM SIZE NAME; do
if ! [ -f "${subdir}/${NAME}" ]; then
bname=$(basename ${NAME})
- if [[ "${bname}" =~ ^(Packages|Sources|Translation-[a-zA-Z_]+)$ ]]; then
+ if [[ "${bname}" =~ ^(Packages|Sources|Contents-[a-zA-Z0-9-]+|Translation-[a-zA-Z_]+)$ ]]; then
# We don't keep unpacked files, don't check for their existance.
# We might want to go and check their unpacked shasum, but right now
# I don't care. I believe it should be enough if all the packed shasums
)
for group in group_generator:
group_name = group["name"]
+ pkgs = group["packages"]
+ affected_archs = group["architectures"]
+ # If we remove an arch:all package, then the breakage can occur on any
+ # of the architectures.
+ if "all" in affected_archs:
+ affected_archs = all_architectures
+ for pkg_arch in product(pkgs, affected_archs):
+ pkg_arch2groups[pkg_arch].add(group_name)
if group_name not in groups:
- pkgs = group["packages"]
- affected_archs = group["architectures"]
- # If we remove an arch:all package, then the breakage can occur on any
- # of the architectures.
- if "all" in affected_archs:
- affected_archs = all_architectures
- for pkg_arch in product(pkgs, affected_archs):
- pkg_arch2groups[pkg_arch].add(group_name)
groups[group_name] = group
group_order.append(group_name)
else:
-h, --help show this help and exit
-q, --quiet Don't output progress
-SUITE can be a space seperated list, e.g.
+SUITE can be a space separated list, e.g.
--suite=unstable testing
"""
sys.exit(exit_code)
# If we find a file for which we have a compressed version and
# haven't yet seen the uncompressed one, store the possibility
# for future use
- if entry.endswith(".gz") and entry[:-3] not in uncompnotseen.keys():
+ if entry.endswith(".gz") and filename[:-3] not in uncompnotseen:
uncompnotseen[filename[:-3]] = (gzip.GzipFile, filename)
- elif entry.endswith(".bz2") and entry[:-4] not in uncompnotseen.keys():
+ elif entry.endswith(".bz2") and filename[:-4] not in uncompnotseen:
uncompnotseen[filename[:-4]] = (bz2.BZ2File, filename)
- elif entry.endswith(".xz") and entry[:-3] not in uncompnotseen.keys():
+ elif entry.endswith(".xz") and filename[:-3] not in uncompnotseen:
uncompnotseen[filename[:-3]] = (XzFile, filename)
fileinfo[filename]['len'] = len(contents)
for filename, comp in uncompnotseen.items():
# If we've already seen the uncompressed file, we don't
# need to do anything again
- if filename in fileinfo.keys():
- continue
-
- # Skip uncompressed Contents files as they're huge, take ages to
- # checksum and we checksum the compressed ones anyways
- if os.path.basename(filename).startswith("Contents"):
+ if filename in fileinfo:
continue
fileinfo[filename] = {}
for byhand in self.upload.byhand:
src = os.path.join(queue.path, byhand.filename)
dst = os.path.join(directory, byhand.filename)
- if not os.path.exists(dst) or not ignore_existing:
+ if os.path.exists(src) and (not os.path.exists(dst) or not ignore_existing):
fs.copy(src, dst, mode=mode, symlink=symlink)
# copy .changes
-dak (0notforuse0-0) unstable; urgency=low
+dak (0notforuse0) unstable; urgency=low
* Initial non-release. [The packaging is nowhere near complete; don't
bother trying to use it unaltered.]
-- James Troup <james@nocrew.org> Tue, 16 May 2006 21:55:42 -0500
-
-
Source: dak
Section: misc
Priority: extra
-Build-Depends: python-all-dev
+Build-Depends: python-all-dev,
+ python-apt,
+ python-debian,
+ python-debianbts,
+ python-ldap,
+ python-psycopg2,
+ python-rrdtool,
+ python-sqlalchemy (<< 1.0),
+ python-yaml
Maintainer: Debian FTP-Masters <ftpmaster@debian.org>
-Uploaders: Mark Hymers <mhy@debian.org>, Joerg Jaspert <joerg@debian.org>, Torsten Werner <twerner@debian.org>
-Standards-Version: 3.9.2
+Uploaders: Mark Hymers <mhy@debian.org>,
+ Joerg Jaspert <joerg@debian.org>,
+ Torsten Werner <twerner@debian.org>
+Standards-Version: 3.9.6.0
Package: dak
Architecture: all
-Depends: ${python:Depends}, python-psycopg2, python-sqlalchemy, python-apt,
- gnupg, dpkg-dev, lintian, binutils-multiarch, python-yaml, less,
- python-ldap, python-pyrss2gen, python-rrdtool, symlinks
+Depends: binutils-multiarch,
+ dpkg-dev,
+ gnupg,
+ less,
+ lintian,
+ python-apt,
+ python-debian,
+ python-debianbts,
+ python-ldap,
+ python-psycopg2,
+ python-pyrss2gen,
+ python-rrdtool,
+ python-sqlalchemy (<< 1.0),
+ python-yaml,
+ symlinks,
+ ${python:Depends}
Description: Debian's archive maintenance scripts
This is a collection of archive maintenance scripts used by the
Debian project.
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-if [ "$1" = "configure" ]; then
- # Default (blank) files so that programs at least run --help and stuff
- touch /etc/dak/dak.conf
-fi
+++ /dev/null
-import sys;
-
-print "python:Depends=python (>= %s), python (<< %s)" % (sys.version[:3],float(sys.version[:3])+0.1)
#!/usr/bin/make -f
-# debian/rules file - for dak (0.0)
-# Based on sample debian/rules file - for GNU Hello (1.3).
-# Copyright 1994,1995 by Ian Jackson.
-# Copyright 1998,1999,2000,2001,2002,2006 James Troup
-# I hereby give you perpetual unlimited permission to copy,
-# modify and relicense this file, provided that you do not remove
-# my name from the file itself. (I assert my moral right of
-# paternity under the Copyright, Designs and Patents Act 1988.)
-# This file may have to be extensively modified
-PYTHONVER := `/usr/bin/python -c 'import sys;print sys.version[:3]'`
+%:
+ dh $@
-install_dir=install -d -m 755
-install_file=install -m 644
-install_script=install -m 755
-install_binary=install -m 755 -s
-
-build: build-stamp
-build-stamp:
- $(MAKE)
- $(MAKE) -C docs
- touch $@
-
-clean: checkroot
- $(checkdir)
- -rm -rf debian/tmp debian/*~ debian/files* debian/substvars build-stamp
- $(MAKE) clean
-
-binary-indep: checkroot build
- $(checkdir)
- -rm -rf debian/tmp
-
- $(install_dir) debian/tmp/DEBIAN/
- $(install_script) debian/postinst debian/tmp/DEBIAN/
-
- $(install_dir) debian/tmp/usr/lib/python/site-packages/dak/lib/
-
- $(install_file) dak/*.py debian/tmp/usr/lib/python/site-packages/dak/
- $(install_file) dak/lib/*.py debian/tmp/usr/lib/python/site-packages/dak/lib/
-
-
- $(install_dir) debian/tmp/usr/bin/
- $(install_script) dak/shell.py debian/tmp/usr/bin/dak
-
- $(install_dir) -m 755 debian/tmp/usr/share/man/man1/
- $(install_file) docs/manpages/*.1 debian/tmp/usr/share/man/man1/
- gzip -9v debian/tmp/usr/share/man/man1/*
-
- $(install_dir) -m 755 debian/tmp/etc/dak/
-
- $(install_dir) debian/tmp/usr/share/doc/dak/
- $(install_file) debian/changelog debian/tmp/usr/share/doc/dak/changelog.Debian
- $(install_file) README NEWS THANKS TODO debian/tmp/usr/share/doc/dak/
- $(install_file) docs/README* debian/tmp/usr/share/doc/dak/
- $(install_file) ChangeLog debian/tmp/usr/share/doc/dak/changelog
- gzip -9v debian/tmp/usr/share/doc/dak/*
- $(install_file) debian/copyright debian/tmp/usr/share/doc/dak/
-
- $(install_dir) debian/tmp/usr/share/doc/dak/examples/
- $(install_file) examples/dak.conf debian/tmp/usr/share/doc/dak/examples/
- # Hoho (err, rather: FIXME)
- $(install_file) *.sql debian/tmp/usr/share/doc/dak/examples/
- gzip -9v debian/tmp/usr/share/doc/dak/examples/*
-
- dpkg-shlibdeps sql-aptvc.so
- /usr/bin/python debian/python-dep >> debian/substvars
- dpkg-gencontrol -isp
- chown -R root.root debian/tmp
- chmod -R go=rX debian/tmp
- dpkg --build debian/tmp ..
-
-binary-arch:
-
-define checkdir
- test -f dak/ls.py -a -f debian/rules
-endef
-
-# Below here is fairly generic really
-
-binary: binary-indep binary-arch
-
-checkroot:
- $(checkdir)
- test root = "`whoami`"
-
-.PHONY: binary binary-arch binary-indep clean checkroot
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ tests/test_all.py
+endif
--- /dev/null
+3.0 (native)
suite=stable
suitename=jessie
pusuite=proposed-updates
-oldrev=8.0
-newrev=8.1
+oldrev=8.1
+newrev=8.2
export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
. $SCRIPTVARS
. "${configdir}/common"
- ask SRMs if there is anything to be skipped from this release. If so
edit ${pusuite}.list (and later the Changelog too)
- bash:
+skip="squid3 icedove php5"
+if [ -n "${skip}" ]; then
+ mv ${pusuite}.list ${pusuite}.list.ori
+ grep -vFf <(dak ls -f heidi -S -s ${pusuite} ${skip}) ${pusuite}.list.ori > ${pusuite}.list
+fi
dak make-changelog -s ${pusuite} -b ${suite} | cat - ${ftpdir}/dists/${suite}/ChangeLog | sponge ${ftpdir}/dists/${suite}/ChangeLog
+if [ -n "${skip}" ]; then
+ $EDITOR ${ftpdir}/dists/${suite}/ChangeLog
+fi
+
dak control-suite --add ${suite} < ${pusuite}.list
dak control-suite --remove ${pusuite} < ${pusuite}.list
- ask rms if they have RMs to do.
- and then check if they have a d-i update. if so, bash:
# set dioldver to "empty" if there is no old to remove
-diver=20150422+deb8u1
+diver=20150422+deb8u2
dak copy-installer -s ${pusuite} -d ${suite} ${diver}
-dioldver=empty
-cd $ftpdir/dists/${suite}/main
+dioldver=20150422+deb8u1
if [ "${dioldver}" != "empty" ]; then
+ cd $ftpdir/dists/${suite}/main
for iarch in $(dak admin s-a list-arch ${suite}); do
if [ -d "installer-${iarch}/${dioldver}" ]; then
echo "Moving installer-${iarch}/${dioldver} to morgue"
mv "installer-${iarch}/${dioldver}" "${base}/morgue/d-i/installer-${iarch}/"
fi
done
+
+ # Remove old version also from proposed-updates
+ cd $ftpdir/dists/${pusuite}/main
+ for iarch in $(dak admin s-a list-arch ${suite}); do
+ rm -rf -- "installer-${iarch}/${dioldver}"
+ done
fi
cd $ftpdir/dists/${suite}
- Update version number in README, README.html and dists/README,
Clean up dists/stable/ChangeLog (add header, basically). bash:
- $EDITOR ChangeLog ../README ../../README*
- rm -f *~ ../*~ ../../*~
+
+cd ${ftpdir}/dists/${suite}
+
+date_long=$(date "+%A, %-dth %B %Y" | sed 's/1th/1st/; s/2th/2nd/; s/3th/3rd/')
+date_iso=$(date "+%Y-%m-%d")
+date_short=$(date "+%a, %d %b %Y")
+sed -e "1i======================================\n${date_short} - Debian ${newrev} released\n======================================" -i ChangeLog
+sed -e "/^${suite}/ s/Debian ${oldrev}/Debian ${newrev}/" -i ../README
+sed -e "s/Debian ${oldrev}/Debian ${newrev}/g; /Debian ${newrev}/ s/released .*\\./released ${date_long}./" -i ../../README
+sed -e "s/Debian ${oldrev}/Debian ${newrev}/g; /Debian ${newrew}/ s/released .*\\./released ${date_long}./; /meta name=\"Modified\"/ s/content=\".*\"/content=\"${date_iso}\"/" -i ../../README.html
+
+# Inspect changes. Regular expressions might be a bit fragile.
+$EDITOR ChangeLog ../README ../../README ../../README.html
+rm -f -- ./*~ ../*~ ../../*~
- Update the 'Debian<n>.<n>r<n>' symlink in dists/
cd $ftpdir/dists/
dak dominate --force -s ${suite}
- check output from cruft report:
dak cruft-report -s ${suite}
+- if cruft was removed: go back to run dominate again
- Let SRM see if all is ok
- then:
dak generate-packages-sources2 --force -s ${suite} && dak contents generate -f -s ${suite} -a ftp-master
-- For squeeze: merge Contents
-if [ "${suitename}" = "squeeze" ]; then
- cd $ftpdir/dists/${suite}
- for carch in $(dak admin s-a list-arch ${suite}); do
- echo doing ${carch}
- cp $base/dak/templates/contents Contents-${carch}.new;
- zcat {main,contrib,non-free}/Contents-${carch}.gz | ~joerg/mergecontents.pl | sort >> Contents-${carch}.new;
- gzip -9v Contents-${carch}.new;
- mv Contents-${carch}.new.gz Contents-${carch}.gz;
- done
- rm {main,contrib,non-free}/Contents-*
-fi
-
- For wheezy: update main/i18n/Index
-if [[ ${suitename} == wheezy ]] || [[ ${suitename} == jessie ]]; then
+if [[ ${suitename} == wheezy ]]; then
${scriptsdir}/generate-i18n-Index "${ftpdir}/dists/${suite}"
fi
- Generate Releases:
-dak generate-releases -f -s ${suite}
-if [[ ${suitename} != jessie ]]; then
- rm ${ftpdir}/dists/${suite}/InRelease
-fi
+dak generate-releases -f -s ${suite} ${pusuite}
+# Remove InRelease: Release can be signed by both ftpmaster & stable release keys
+rm ${ftpdir}/dists/${suite}/InRelease
- have the SRMs sign it and put the signature in.
cd ${ftpdir}/dists/${suite}
# Check validity of version number
# Expected are: YYYYMMDD, YYYYMMDD.x, YYYYMMDD<suite>x, YYYYMMDD+<suite>x,
# YYYYMMDD+debXuZ and the +b[0-9] on the end
-if ! echo "$VERSION" | grep -Eq "^[0-9]{8}((\.|\+?[a-z]+|\+deb[0-9]+u)[0-9]+)?(\+b[0-9])?$"; then
+if ! echo "$VERSION" | grep -Eq "^[0-9]{8}((\.|\+?[a-z]+|\+deb[0-9]+u|\+kbsd[0-9]+u)[0-9]+)?(\+b[0-9])?$"; then
error "Invalid version: '$VERSION'"
fi
+++ /dev/null
------BEGIN PGP SIGNED MESSAGE OR SO-----
-Hash: SHA512
-
-This: is a bug.
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA512
-
-Question: Is this a bug?
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.11 (GNU/Linux)
-
-iQIcBAEBCgAGBQJN1s1eAAoJEIATJTTdNH3Is4IP/3ppCve+jzobPjacyqYGyAec
-Op2rnYkQulfln1tyaxr8A40MHSWUly1kFebPgO3XNgAQ8mIh7FCeL7tSsaDnrBwq
-v/S/6JK1ZGCSuL6dleoqxoBgViJWQEvd297zAe0CzIdJ+JYgTPxX5cHh4E23rWmG
-zG9ct3v+5J4mSeEGksZPn8/YalnWRwb72hj/0WTagA2SY89TVZ9onT6p8ftWf6aO
-ODXDtclP56GixfnA3jR3reKI5/aLHXSLSYWGDOyEXffr0NoFvgtbsO4Y0FF2+Np3
-MpmJitoIRuJWk3zInYt0GeJskhEbvuF5Fnhiqrg43W5tFxB8pz5QHpDa/oq8Gfea
-MU/2p6FHA12nwD7CVdKWv/ra3nAWcJPqqfV//xgnZaBdS7d4G+3+tMFFYk8sWqc1
-JphkXJ9M8eX67oEuKgwhwHGV/wGu96nkTergnvlqpxk6uesfnsy0ixXX0UgLzwEZ
-ty1sZcCgq8dhdnEatkvRy2M13pS8S9iONmrowAck15YZuHcudBmvh5PFeNbpldmM
-ABLFApnjtD3DljzrjBgnHQS5UHDzDhDiEEAiQrUM3nu/CNi6UPoxasGszJK8W0iV
-MQmYVybk2L2lVV3b1qXURMyaFRcmVnLBNad/IiCbQiWTUCwg8zxzJoty1+f7+EDa
-rPpj3R0qGxz01UsVtS3W
-=/dES
------END PGP SIGNATURE-----
--- /dev/null
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.0.2 (GNU/Linux)
+Comment: For info see http://www.gnupg.org
+
+iD8DBQE5j091iPgEjVqvb1kRAvFtAJ0asUAaac6ebfR3YeaH16HjL7F3GwCfV+AQ
+rhYnRmVuNMa8oYSvL4hl/Yw=
+=EFAA
+-----END PGP SIGNATURE-----
--- /dev/null
+-----BEGIN PGP SIGNED MESSAGE OR SO-----
+Hash: SHA512
+
+This: is a bug.
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA512
+
+Question: Is this a bug?
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.11 (GNU/Linux)
+
+iQIcBAEBCgAGBQJN1s1eAAoJEIATJTTdNH3Is4IP/3ppCve+jzobPjacyqYGyAec
+Op2rnYkQulfln1tyaxr8A40MHSWUly1kFebPgO3XNgAQ8mIh7FCeL7tSsaDnrBwq
+v/S/6JK1ZGCSuL6dleoqxoBgViJWQEvd297zAe0CzIdJ+JYgTPxX5cHh4E23rWmG
+zG9ct3v+5J4mSeEGksZPn8/YalnWRwb72hj/0WTagA2SY89TVZ9onT6p8ftWf6aO
+ODXDtclP56GixfnA3jR3reKI5/aLHXSLSYWGDOyEXffr0NoFvgtbsO4Y0FF2+Np3
+MpmJitoIRuJWk3zInYt0GeJskhEbvuF5Fnhiqrg43W5tFxB8pz5QHpDa/oq8Gfea
+MU/2p6FHA12nwD7CVdKWv/ra3nAWcJPqqfV//xgnZaBdS7d4G+3+tMFFYk8sWqc1
+JphkXJ9M8eX67oEuKgwhwHGV/wGu96nkTergnvlqpxk6uesfnsy0ixXX0UgLzwEZ
+ty1sZcCgq8dhdnEatkvRy2M13pS8S9iONmrowAck15YZuHcudBmvh5PFeNbpldmM
+ABLFApnjtD3DljzrjBgnHQS5UHDzDhDiEEAiQrUM3nu/CNi6UPoxasGszJK8W0iV
+MQmYVybk2L2lVV3b1qXURMyaFRcmVnLBNad/IiCbQiWTUCwg8zxzJoty1+f7+EDa
+rPpj3R0qGxz01UsVtS3W
+=/dES
+-----END PGP SIGNATURE-----
def assertParse(self, filename, *args):
return parse_changes(fixture(filename), *args)
- def assertFails(self, filename, line=None, *args):
- try:
- self.assertParse(filename, *args)
- self.fail('%s was not recognised as invalid' % filename)
- except ParseChangesError:
- pass
- except GpgException:
- pass
- except InvalidDscError as actual_line:
- if line is not None:
- assertEqual(actual_line, line)
-
class ParseDscTestCase(ParseChangesTestCase):
def test_1(self):
self.assertParse('dsc/1.dsc', -1, 1)
def test_4(self):
# No blank lines at all
- self.assertFails('dsc/4.dsc', -1, 1)
+ with self.assertRaises(GpgException):
+ self.assertParse('dsc/4.dsc', -1, 1)
def test_5(self):
# Extra blank line before signature body
# Extra blank line after signature header
self.assertParse('dsc/6.dsc', -1, 1)
+ def test_7(self):
+ # Blank file is an invalid armored GPG file
+ with self.assertRaises(GpgException):
+ self.assertParse('dsc/7.dsc', -1, 1)
+
+ def test_8(self):
+ # No armored contents
+ with self.assertRaisesRegexp(ParseChangesError, "Empty changes"):
+ self.assertParse('dsc/8.dsc', -1, 1)
+
+ def test_9(self):
+ changes = self.assertParse('dsc/9.dsc', -1, 1)
+ self.assert_(changes['question'] == 'Is this a bug?')
+ self.failIf(changes.get('this'))
+
class ParseChangesTestCase(ParseChangesTestCase):
def test_1(self):
# Empty changes
- self.assertFails('changes/1.changes', 5, -1)
+ with self.assertRaises(GpgException):
+ self.assertParse('changes/1.changes', 1)
def test_2(self):
changes = self.assertParse('changes/2.changes', -1)
)
self.failIf(changes.get('you'))
- def test_4(self):
- changes = self.assertParse('changes/two-beginnings.changes', -1, 1)
- self.assert_(changes['question'] == 'Is this a bug?')
- self.failIf(changes.get('this'))
-
if __name__ == '__main__':
unittest.main()