I forgot:

$ git diff 0.60..develop|diffstat
 README.txt                                                               |    
3 
 README_pejacevic.txt                                                     |    
3 
 README_server.txt                                                        |    
2 
 bug-templates/removal_makes_files_disappear.mail                         |    
2 
 conf/distros.conf                                                        |    
2 
 conf/piuparts-master.conf                                                |    
4 
 custom-scripts/scripts-leftovers/post_remove_cleanup                     |    
3 
 custom-scripts/scripts-no-usr-share-doc/post_setup_disable_usr_share_doc |   
14 +
 custom-scripts/scripts-unused-examples/post_chroot_unpack_key_setup.sh   |    
9 
 custom-scripts/scripts/post_distupgrade_experimental                     |    
6 
 custom-scripts/scripts/post_purge_exceptions                             |   
30 --
 custom-scripts/scripts/post_remove_exceptions                            |   
18 +
 custom-scripts/scripts/post_remove_extras                                |    
3 
 custom-scripts/scripts/pre_install_database-server                       |   
25 ++
 custom-scripts/scripts/pre_install_exceptions                            |  
123 ++++++----
 custom-scripts/scripts/pre_install_extras                                |    
9 
 custom-scripts/scripts/pre_install_foreign_architecture                  |   
45 +++
 custom-scripts/scripts/pre_remove_40_find_unowned_lib_links              |   
15 +
 custom-scripts/scripts/pre_remove_exceptions                             |   
16 -
 debian/changelog                                                         |   
39 +++
 htdocs/index.tpl                                                         |    
2 
 instances/piuparts.conf.pejacevic                                        |    
4 
 instances/piuparts.conf.piu-slave-1und1-01                               |    
4 
 known_problems/broken_binfmt_detector_inadequate_issue.conf              |   
11 
 known_problems/broken_binfmt_interpreter_inadequate_issue.conf           |   
11 
 known_problems/missing_alternative_inadequate_issue.conf                 |   
11 
 known_problems/module_build_error_issue.conf                             |    
2 
 known_problems/program_name_collision_inadequate_issue.conf              |   
11 
 known_problems/unowned_lib_symlink_error.conf                            |   
12 
 known_problems/unowned_lib_symlink_issue.conf                            |   
12 
 piuparts-report.py                                                       |   
10 
 piuparts.1.txt                                                           |    
2 
 piuparts.py                                                              |   
37 ++-
 piupartslib/dwke.py                                                      |    
2 
 34 files changed, 377 insertions(+), 125 deletions(-)
$ git log 0.60..develop|grep ^commit|wc -l
31
$ git diff 0.60..develop *.py > pydiff
$ git diff 0.60..develop > fulldiff
# see attached
diff --git a/piuparts-report.py b/piuparts-report.py
index 8212273..390304b 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -425,12 +425,16 @@ linktarget_by_template = [
     ("boring_obsolete_conffile_file_inadequate_issue.tpl", "...and logfile contains tag from adequate 'obsolete-conffile-file'"),
     ("boring_broken_symlink_file_inadequate_issue.tpl", "...and logfile contains tag from adequate 'broken-symlink-file'"),
     ("bin_or_sbin_binary_requires_usr_lib_library_inadequate_issue.tpl", "but adequate found a binary in /bin or /sbin that requires a /usr/lib library"),
-    ("library_not_found_inadequate_issue.tpl", "but adequate couldn't find a required library"),
-    ("ldd_inadequate_issue.tpl", "but adequate encountered unexpected ldd warnings"),
     ("incompatible_licenses_inadequate_issue.tpl", "but adequate found a license incompatibility"),
+    ("broken_binfmt_detector_inadequate_issue.tpl", "but adequate did not find the detector registered with update_binfmts"),
+    ("broken_binfmt_interpreter_inadequate_issue.tpl", "but adequate did not find the interpreter registered with update_binfmts"),
+    ("missing_alternative_inadequate_issue.tpl", "but adequate found a missing alternative"),
     ("missing_copyright_file_inadequate_issue.tpl", "but adequate couldn't find a copyright file"),
+    ("program_name_collision_inadequate_issue.tpl", "but adequate found a program name collision"),
     ("py_file_not_bytecompiled_inadequate_issue.tpl", "but adequate found a .py file that is not byte-compiled"),
     ("pyshared_file_not_bytecompiled_inadequate_issue.tpl", "but adequate found a .py file in /usr/share/pyshared that is not byte-compiled"),
+    ("ldd_inadequate_issue.tpl", "but adequate encountered unexpected ldd warnings"),
+    ("library_not_found_inadequate_issue.tpl", "but adequate couldn't find a required library"),
     ("undefined_symbol_inadequate_issue.tpl", "but adequate found an undefined symbol"),
     ("symbol-size-mismatch_inadequate_issue.tpl", "but adequate found that a symbol has changed size since the package was built"),
     ("missing-symbol-version-information_inadequate_issue.tpl", "but adequate found that a library is missing symbol version information"),
@@ -441,6 +445,7 @@ linktarget_by_template = [
     ("module_build_error_issue.tpl", "but logfile contains dkms module build failures"),
     ("obsolete_conffiles_issue.tpl", "but logfile reports obsolete conffiles"),
     ("missing_md5sums_issue.tpl", "but logfile reports missing md5sums"),
+    ("unowned_lib_symlink_issue.tpl", "but logfile reports unowned lib symlinks"),
     ("piuparts-depends-dummy_issue.tpl", "but logfile reports piuparts-depends-dummy.deb could not be installed"),
     ("used_exception_issue.tpl", "but package used a piuparts exception"),
 
@@ -476,6 +481,7 @@ linktarget_by_template = [
     ("broken_symlinks_error.tpl", "...and logfile also contains 'broken symlinks'"),
     ("obsolete_conffiles_error.tpl", "...and logfile reports obsolete conffiles"),
     ("missing_md5sums_error.tpl", "...and logfile reports missing md5sums"),
+    ("unowned_lib_symlink_error.tpl", "...and logfile reports unowned lib symlinks"),
     ("piuparts-depends-dummy_error.tpl", "...and logfile reports piuparts-depends-dummy.deb could not be installed"),
     ("unclassified_failures.tpl", "due to unclassified failures"),
 ]
diff --git a/piuparts.py b/piuparts.py
index de349ff..b9d1359 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -249,6 +249,7 @@ class Settings:
             "/etc/apt/trusted.gpg~",
             "/usr/share/keyrings/debian-archive-removed-keys.gpg~",
             "/var/cache/apt/archives/lock",
+            "/var/cache/apt/archives/partial/",
             "/var/cache/apt/pkgcache.bin",
             "/var/cache/apt/srcpkgcache.bin",
             "/var/cache/debconf/",
@@ -315,6 +316,7 @@ class Settings:
             # work around broken symlinks
             "/usr/lib/python2.6/dist-packages/python-support.pth",  #635493 and #385775
             "/usr/lib/python2.7/dist-packages/python-support.pth",
+            "/etc/modules-load.d/modules.conf",
             # work around #316521 dpkg: incomplete cleanup of empty directories
             "/etc/apache2/",
             "/etc/apache2/conf.d/",
@@ -706,9 +708,6 @@ class Chroot:
             self.mount_proc()
             self.mount_selinux()
         self.configure_chroot()
-        if settings.basetgz or settings.schroot:
-            self.run(["apt-get", "-yf", "dist-upgrade"])
-        self.minimize()
 
         # Copy scripts dirs into the chroot, merging all dirs together,
         # later files overwriting earlier ones.
@@ -724,6 +723,14 @@ class Chroot:
                             and os.path.isfile(os.path.join(sdir, sfile)):
                         shutil.copy(os.path.join(sdir, sfile), dest)
 
+        # Run custom scripts after chroot has been unpacked/debootstrapped
+        # Useful for adjusting apt configuration e.g. for internal mirror usage
+        self.run_scripts("post_chroot_unpack")
+
+        if settings.basetgz or settings.schroot:
+            self.run(["apt-get", "-yf", "dist-upgrade"])
+        self.minimize()
+
         # Run custom scripts after creating the chroot.
         self.run_scripts("post_setup")
 
@@ -935,6 +942,17 @@ class Chroot:
         os.chmod(full_name, 0755)
         logging.debug("Created policy-rc.d and chmodded it.")
 
+    def create_resolv_conf(self):
+        """Create a resolv.conf containing the nameservers from the host system."""
+        full_name = self.relative("etc/resolv.conf")
+        nameservers = ""
+        with open("/etc/resolv.conf", "r") as f:
+            for line in f:
+                if line.startswith("nameserver"):
+                    nameservers += line
+        create_file(full_name, nameservers)
+        logging.debug("Created resolv.conf.")
+
     def setup_minimal_chroot(self):
         """Set up a minimal Debian system in a chroot."""
         logging.debug("Setting up minimal chroot for %s at %s." %
@@ -974,6 +992,7 @@ class Chroot:
         self.create_apt_conf()
         self.create_dpkg_conf()
         self.create_policy_rc_d()
+        self.create_resolv_conf()
         for bindmount in settings.bindmounts:
             run(["mkdir", "-p", self.relative(bindmount)])
             run(["mount", "-obind", bindmount, self.relative(bindmount)])
@@ -1186,15 +1205,19 @@ class Chroot:
             logging.info("Running adequate version %s now." % output.strip())
             adequate_tags = [
                     'bin-or-sbin-binary-requires-usr-lib-library',
+                    'broken-binfmt-detector',
+                    'broken-binfmt-interpreter',
+                    'incompatible-licenses',
+                    'ldd',
                     'library-not-found',
+                    'missing-alternative',
                     'missing-copyright-file',
+                    'missing-symbol-version-information',
+                    'program-name-collision',
                     'py-file-not-bytecompiled',
                     'pyshared-file-not-bytecompiled',
-                    'undefined-symbol',
-                    'missing-symbol-version-information',
                     'symbol-size-mismatch',
-                    'incompatible-licenses',
-                    'ldd',
+                    'undefined-symbol',
                     ]
             boring_tags = [
                     'obsolete-conffile',
diff --git a/README.txt b/README.txt
index 37faf2e..9c7e4d8 100644
--- a/README.txt
+++ b/README.txt
@@ -213,6 +213,9 @@ PIUPARTS_DISTRIBUTION.
 
 The following prefixes for scripts are recognized:
 
+'post_chroot_unpack' - after the chroot has been unpacked/debootrapped.
+Before the chroot gets updated/dist-upgraded initially.
+
 'post_setup_' - after the *setup* of the chroot is finished.
 Before metadata of the chroot is recorded for later comparison.
 
diff --git a/README_pejacevic.txt b/README_pejacevic.txt
index a49b09b..23b8da4 100644
--- a/README_pejacevic.txt
+++ b/README_pejacevic.txt
@@ -92,7 +92,8 @@ Any other webserver will do but apache is used on pejacevic (and maintained by D
 	CustomLog /var/log/apache2/piuparts.debian.org-access.log combined
 
 	DocumentRoot /srv/piuparts.debian.org/htdocs
-	AddType text/plain log
+	AddType text/plain .log
+	AddDefaultCharset utf-8
 
 	HostnameLookups Off
 	UseCanonicalName Off
diff --git a/README_server.txt b/README_server.txt
index dc5cecb..a5e70bc 100644
--- a/README_server.txt
+++ b/README_server.txt
@@ -1,7 +1,7 @@
 piuparts README_server
 ----------------------
 
-Author: Lars Wirzenius, Holger Levsen and Andreas Beckmann
+Authors: Lars Wirzenius, Holger Levsen and Andreas Beckmann
 Email: <debian...@lists.debian.org>
 
 === piuparts runs itself and other stuff as root
diff --git a/bug-templates/removal_makes_files_disappear.mail b/bug-templates/removal_makes_files_disappear.mail
index 95f1dae..2376dee 100644
--- a/bug-templates/removal_makes_files_disappear.mail
+++ b/bug-templates/removal_makes_files_disappear.mail
@@ -10,7 +10,7 @@ Usertags: piuparts replaces-without-breaks
 
 Hi,
 
-during a test with piuparts and EDOS tools I noticed your package causes
+during a test with piuparts and DOSE tools I noticed your package causes
 removal of files that also belong to another package.
 This is caused by using Replaces without corresponding Breaks.
 
diff --git a/conf/distros.conf b/conf/distros.conf
index 555d2f7..0c55eb8 100644
--- a/conf/distros.conf
+++ b/conf/distros.conf
@@ -60,11 +60,9 @@ depends = squeeze squeeze-backports
 target-release = squeeze-backports-sloppy
 
 [squeeze-lts]
-uri = http://ftp.de.debian.org/debian
 depends = squeeze squeeze/updates
 target-release = squeeze-lts
 
-
 [wheezy/updates]
 uri = http://security.debian.org
 depends = wheezy
diff --git a/conf/piuparts-master.conf b/conf/piuparts-master.conf
index 9aca2ad..bc4ca40 100644
--- a/conf/piuparts-master.conf
+++ b/conf/piuparts-master.conf
@@ -6,7 +6,5 @@ Alias /piuparts /var/lib/piuparts/htdocs
   Options indexes
 
   AddType text/plain .log
+  AddDefaultCharset utf-8
 </Directory>
-
-
-
diff --git a/custom-scripts/scripts-leftovers/post_remove_cleanup b/custom-scripts/scripts-leftovers/post_remove_cleanup
index a1606ab..b9443a2 100755
--- a/custom-scripts/scripts-leftovers/post_remove_cleanup
+++ b/custom-scripts/scripts-leftovers/post_remove_cleanup
@@ -5,9 +5,6 @@ log_debug() {
 	echo "Debug: piuparts exception for package $PIUPARTS_OBJECTS"
 }
 
-#
-# deal with exceptions:
-#
 case ${PIUPARTS_OBJECTS%%=*} in
 	dovecot-core)
 		# #330519 - does not remove certificates on purge
diff --git a/custom-scripts/scripts-no-usr-share-doc/post_setup_disable_usr_share_doc b/custom-scripts/scripts-no-usr-share-doc/post_setup_disable_usr_share_doc
index 239d23f..c8d8f01 100755
--- a/custom-scripts/scripts-no-usr-share-doc/post_setup_disable_usr_share_doc
+++ b/custom-scripts/scripts-no-usr-share-doc/post_setup_disable_usr_share_doc
@@ -14,3 +14,17 @@ cat << EOF > /etc/dpkg/dpkg.cfg.d/piuparts-path-exclude
 path-exclude=/usr/share/doc/*/*
 path-include=/usr/share/doc/*/copyright
 EOF
+
+# switching init systems forth and back will clean out /usr/share/doc
+# reinstalling the affected packages beforehand makes the files disappear
+# before the snapshot of the reference system is created
+CANDIDATES="systemd systemd-sysv sysv-rc"
+CANDIDATES=$(dpkg-query -W $CANDIDATES | awk '{ if ($2) { print $1 } }')
+if [ -n "$CANDIDATES" ]; then
+	echo "Reinstalling $(echo $CANDIDATES)..."
+	# workaround apt bug #770291 - do it one by one, not all at once
+	for package in $CANDIDATES
+	do
+		apt-get -u --reinstall install $package
+	done
+fi
diff --git a/custom-scripts/scripts-unused-examples/post_chroot_unpack_key_setup.sh b/custom-scripts/scripts-unused-examples/post_chroot_unpack_key_setup.sh
new file mode 100644
index 0000000..06f1f96
--- /dev/null
+++ b/custom-scripts/scripts-unused-examples/post_chroot_unpack_key_setup.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# we rely on wget being available, make sure to use "--include=wget" in your deboostrap cmdline
+echo "Setting up https://example.com/internal_key.asc for apt-get usage."
+wget -O - 'https://example.com/internal_key.asc' | apt-key add -
+
+echo "Running apt-get update to have a verified and working Debian repository available."
+apt-get update
+
diff --git a/custom-scripts/scripts/post_distupgrade_experimental b/custom-scripts/scripts/post_distupgrade_experimental
index 84ce4f7..836aa38 100755
--- a/custom-scripts/scripts/post_distupgrade_experimental
+++ b/custom-scripts/scripts/post_distupgrade_experimental
@@ -9,14 +9,16 @@ test "$PIUPARTS_DISTRIBUTION" = "experimental" || exit 0
 # that are in experimental, too, and don't cause problems
 
 PKGS=""
-PKGS="$PKGS libapt-pkg4.12"
 PKGS="$PKGS apt"
 PKGS="$PKGS libc6"
 PKGS="$PKGS libc-bin"
 PKGS="$PKGS libgcc1"
 PKGS="$PKGS libstdc++6"
-PKGS="$PKGS bash"
 PKGS="$PKGS multiarch-support"
 PKGS="$PKGS findutils"
+PKGS="$PKGS insserv"
+PKGS="$PKGS dash"
+PKGS="$PKGS libdbus-1-3"
+PKGS="$PKGS grep"
 
 apt-get -y -t experimental install $PKGS
diff --git a/custom-scripts/scripts/post_purge_exceptions b/custom-scripts/scripts/post_purge_exceptions
index 530f3ac..695edbd 100755
--- a/custom-scripts/scripts/post_purge_exceptions
+++ b/custom-scripts/scripts/post_purge_exceptions
@@ -5,30 +5,14 @@ log_debug() {
 	echo "Debug: piuparts exception for package $PIUPARTS_OBJECTS"
 }
 
-#
-# deal with packages depending on exceptions:
-#
-case ${PIUPARTS_OBJECTS%%=*} in
-	ltsp-client)		log_debug
-				PIUPARTS_OBJECTS=ltsp-client-core
-				;;
-esac
-
-#
-# deal with exceptions:
-#
 case ${PIUPARTS_OBJECTS%%=*} in
 	fai-nfsroot)		log_debug
 				rm -f /.THIS_IS_THE_FAI_NFSROOT
 				;;
+	ltsp-client|\
 	ltsp-client-core)	log_debug
 				rm -f /etc/ltsp_chroot
 				;;
-	file-rc)		log_debug
-				# removal wont work if sysv-rc isn't reinstalled
-				yes 'Yes, do as I say!' | apt-get -y --force-yes install sysv-rc
-				dpkg --purge file-rc
-				;;
 	amd64-libs|amd64-libs-dev)
 		# leaves a superfluous empty line after purge
 		log_debug
@@ -45,16 +29,4 @@ case ${PIUPARTS_OBJECTS%%=*} in
 				;;
 		esac
 		;;
-	gdm3|gnome-session|gnome-shell*|gnome-core|gnome|gnome-desktop-environment|task-gnome-desktop|razorqt|sucrose-0.96|xfswitch-plugin|mate-core|mate-desktop-environment*|task-kde-desktop|kde-standard|kde-plasma-desktop|kde-plasma-netbook|ltsp-server-standalone)
-		# see pre_remove_exceptions for why this is needed
-		log_debug
-		case ${PIUPARTS_DISTRIBUTION} in
-			lenny*|squeeze*|wheezy)
-				echo "PIUPARTS_DISTRIBUTION=$PIUPARTS_DISTRIBUTION, not applying systemd-sysv removal workaround"
-				;;
-			*)
-				dpkg --purge systemd-shim
-				;;
-		esac
-		;;
 esac
diff --git a/custom-scripts/scripts/post_remove_exceptions b/custom-scripts/scripts/post_remove_exceptions
new file mode 100755
index 0000000..7a6258c
--- /dev/null
+++ b/custom-scripts/scripts/post_remove_exceptions
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -e
+
+log_debug() {
+	echo "Debug: piuparts exception for package $PIUPARTS_OBJECTS"
+}
+
+case ${PIUPARTS_OBJECTS%%=*} in
+	file-rc)
+		case "$PIUPARTS_DISTRIBUTION" in
+			lenny|squeeze*)
+				log_debug
+				# removal wont work if sysv-rc isn't reinstalled
+				yes 'Yes, do as I say!' | apt-get -y --force-yes install sysv-rc
+				;;
+		esac
+		;;
+esac
diff --git a/custom-scripts/scripts/post_remove_extras b/custom-scripts/scripts/post_remove_extras
index f36a35e..f1c4a6f 100755
--- a/custom-scripts/scripts/post_remove_extras
+++ b/custom-scripts/scripts/post_remove_extras
@@ -5,9 +5,6 @@ log_debug() {
 	echo "Debug: piuparts exception for package $PIUPARTS_OBJECTS"
 }
 
-#
-# deal with exceptions:
-#
 case ${PIUPARTS_OBJECTS%%=*} in
 	resolvconf)
 		log_debug
diff --git a/custom-scripts/scripts/pre_install_database-server b/custom-scripts/scripts/pre_install_database-server
index 2341395..89521a3 100755
--- a/custom-scripts/scripts/pre_install_database-server
+++ b/custom-scripts/scripts/pre_install_database-server
@@ -20,6 +20,13 @@ case ${PIUPARTS_OBJECTS%%=*} in
 	bacula-director-pgsql)			POSTGRESQL=yes ;;
 	bacula-director-pgsql-dbg)		POSTGRESQL=yes ;;
 	bandwidthd-pgsql)			POSTGRESQL=yes ;;
+	bareos)					POSTGRESQL=yes ;;
+	bareos-database-common)			POSTGRESQL=yes ;;
+	bareos-database-mysql)			POSTGRESQL=yes ; MYSQL=yes ;;
+	bareos-database-postgresql)		POSTGRESQL=yes ;;
+	bareos-database-sqlite3)		POSTGRESQL=yes ; SQLITE3=yes ;;
+	bareos-database-tools)			POSTGRESQL=yes ;;
+	bareos-director)			POSTGRESQL=yes ;;
 	bley)					POSTGRESQL=yes ;;
 	blootbot)				MYSQL=yes ;;
 	buddycloud-server)			POSTGRESQL=yes ;;
@@ -77,9 +84,16 @@ case ${PIUPARTS_OBJECTS%%=*} in
 	icinga-idoutils)			POSTGRESQL=yes ;;
 	icinga-phpapi)				MYSQL=yes ;;
 	icinga-web)				POSTGRESQL=yes ;;
+	icinga-web-config-icinga)		POSTGRESQL=yes ;;
+	icinga-web-config-icinga2-ido-mysql)	MYSQL=yes ;;
+	icinga-web-config-icinga2-ido-pgsql)	POSTGRESQL=yes ;;
 	icinga-web-pnp)				POSTGRESQL=yes ;;
+	icinga2-ido-mysql)			MYSQL=yes ;;
+	icinga2-ido-pgsql)			POSTGRESQL=yes ;;
+	jclicmoodle)				POSTGRESQL=yes ;;
 	jffnms)					MYSQL=yes ;;
 	letodms)				MYSQL=yes ;;
+	letodms-webdav)				MYSQL=yes ;;
 	libchado-perl)				POSTGRESQL=yes ;;
 	libdspam7-drv-mysql)			MYSQL=yes ;;
 	libdspam7-drv-pgsql)			POSTGRESQL=yes ;;
@@ -93,6 +107,9 @@ case ${PIUPARTS_OBJECTS%%=*} in
 	nagvis)					MYSQL=yes ;;
 	ndoutils-common)			MYSQL=yes ;;
 	ndoutils-nagios3-mysql)			MYSQL=yes ;;
+	neutron-common)				SQLITE3=yes ;;
+	neutron-server)				SQLITE3=yes ;;
+	neutron-*-agent)			SQLITE3=yes ;;
 	nginx-naxsi-ui)				MYSQL=yes ;;
 	ocsinventory-reports)			MYSQL=yes ;;
 	ocsinventory-server)			MYSQL=yes ;;
@@ -115,6 +132,10 @@ case ${PIUPARTS_OBJECTS%%=*} in
 	prelude-manager)			MYSQL=yes ;;
 	prewikka)				MYSQL=yes ;;
 	pybit-web)				POSTGRESQL=yes ;;
+	quantum-common)				SQLITE3=yes ;;
+	quantum-plugin-*)			SQLITE3=yes ;;
+	quantum-server)				SQLITE3=yes ;;
+	quantum-*-agent)			SQLITE3=yes ;;
 	redmine)				MYSQL=yes ;;
 	redmine-mysql)				MYSQL=yes ;;
 	redmine-pgsql)				POSTGRESQL=yes ;;
@@ -141,6 +162,10 @@ case ${PIUPARTS_OBJECTS%%=*} in
 	textpattern)				MYSQL=yes ;;
 	torrentflux)				MYSQL=yes ;;
 	tt-rss)					POSTGRESQL=yes ;;
+	tuskar)					SQLITE3=yes ;;
+	tuskar-api)				SQLITE3=yes ;;
+	tuskar-common)				SQLITE3=yes ;;
+	tuskar-manager)				SQLITE3=yes ;;
 	typo3-dummy)				MYSQL=yes ;;
 	ukolovnik)				MYSQL=yes ;;
 	webcalendar)				MYSQL=yes ;;
diff --git a/custom-scripts/scripts/pre_install_exceptions b/custom-scripts/scripts/pre_install_exceptions
index fd5b0b9..ae89cb0 100755
--- a/custom-scripts/scripts/pre_install_exceptions
+++ b/custom-scripts/scripts/pre_install_exceptions
@@ -5,34 +5,50 @@ log_debug() {
 	echo "Debug: piuparts exception for package $PIUPARTS_OBJECTS"
 }
 
-#
-# deal with packages depending on exceptions:
-#
 case ${PIUPARTS_OBJECTS%%=*} in
-	ltsp-client|education-thin-client)
+	file-rc)
+		case "$PIUPARTS_DISTRIBUTION" in
+			lenny|squeeze*)
+				# force installation and removal of essential package sysv-rc
 				log_debug
-				PIUPARTS_OBJECTS=ltsp-client-core
+				yes 'Yes, do as I say!' | apt-get -y --force-yes install file-rc
 				;;
-	upstart-dconf-bridge|upstart-monitor)
+		esac
+		;;
+	live-config-upstart|\
+	netscript-2.4-upstart|\
+	upstart)
+		case "$PIUPARTS_DISTRIBUTION" in
+			squeeze*|wheezy*)
+				# force installation and removal of essential package sysvinit
 				log_debug
-				PIUPARTS_OBJECTS=upstart
-				;;
-	netscript-2.4-upstart)	log_debug
-				PIUPARTS_OBJECTS=upstart
-				;;
-	live-config-upstart)	log_debug
-				PIUPARTS_OBJECTS=upstart
+				yes 'Yes, do as I say!' | apt-get -y --force-yes install upstart
 				;;
-	clvm|dtc-xen|ganeti|ganeti2|mylvmbackup|redhat-cluster-suite|libvirt0|libcollectdclient0|liblinux-lvm-perl|autopkgtest-xenlvm|collectd-dbg|collectd|cman|libsys-virt-perl|libvirt-dev|libvirt-ocaml|libvirt-ruby1.8|libvirt0-dbg|python-libvirt|virt-top|virt-viewer|xenwatch|gfs-tools|gfs2-tools|rgmanager|virtinst|collectd-utils|libcollectdclient-dev|libvirt-ocaml-dev|libvirt-ruby|mozilla-virt-viewer|munin-libvirt-plugins)
-				# skip mini-buildd-bld here due to resource violation, see below
+		esac
+		;;
+	upstart-dconf-bridge|\
+	upstart-monitor)
+		# switch init to upstart before installation
+		apt-get install upstart
+		;;
+	systemd-sysv)
+		case "$PIUPARTS_DISTRIBUTION" in
+			wheezy*)
+				# force installation and removal of essential package sysvinit
 				log_debug
-				PIUPARTS_OBJECTS=lvm2
+				yes 'Yes, do as I say!' | apt-get -y --force-yes install systemd-sysv
 				;;
+		esac
+		;;
 esac
 
 #
-# deal with exceptions:
+# the remaining exceptions are only for the initial package installation
 #
+if [ "$PIUPARTS_PHASE" != "install" ]; then
+	exit 0
+fi
+
 case ${PIUPARTS_OBJECTS%%=*} in
 	samhain)		log_debug
 				# work around #749602
@@ -43,34 +59,12 @@ case ${PIUPARTS_OBJECTS%%=*} in
 				# fai-nfsroot refuses installation unless this file exist
 				touch /.THIS_IS_THE_FAI_NFSROOT
 				;;
+	education-thin-client|\
+	ltsp-client|\
 	ltsp-client-core)	log_debug
 				# ltsp-client-core refuses installation unless this file exist
 				touch /etc/ltsp_chroot
 				;;
-	upstart)		log_debug
-				# force installation and removal of essential package sysvinit
-				yes 'Yes, do as I say!' | apt-get -y --force-yes install upstart
-				;;
-	file-rc)		log_debug
-				# force installation and removal of essential package sysv-rc
-				yes 'Yes, do as I say!' | apt-get -y --force-yes install file-rc
-				;;
-	systemd-sysv)		log_debug
-				# force installation and removal of essential package sysvinit
-				yes 'Yes, do as I say!' | apt-get -y --force-yes install systemd-sysv
-				;;
-	lvm2)
-				if [ "$PIUPARTS_PHASE" = "install" ] && ( \
-					[ "$PIUPARTS_DISTRIBUTION" = "squeeze" ] || \
-					[ "$PIUPARTS_DISTRIBUTION" = "squeeze-proposed" ] || \
-					[ "$PIUPARTS_DISTRIBUTION" = "squeeze-backports" ] || \
-					[ "$PIUPARTS_DISTRIBUTION" = "lenny" ] )
-				then
-					# work around lvm2 bug https://bugs.debian.org/603036 which is squeeze-ignore
-					log_debug
-					apt-get -y install udev
-				fi
-				;;
 	bugzilla3)
 			# checksetup.pl goes into infinite loop asking for them
 			log_debug
@@ -102,6 +96,53 @@ if [ "$PIUPARTS_DISTRIBUTION" = "squeeze-backports" ]; then
 
 fi
 
+if	[ "$PIUPARTS_DISTRIBUTION" = "squeeze" ] || \
+	[ "$PIUPARTS_DISTRIBUTION" = "squeeze-proposed" ] || \
+	[ "$PIUPARTS_DISTRIBUTION" = "squeeze-backports" ] || \
+	[ "$PIUPARTS_DISTRIBUTION" = "lenny" ]; then
+
+	case ${PIUPARTS_OBJECTS%%=*} in
+		autopkgtest-xenlvm|\
+		clvm|\
+		cman|\
+		collectd|\
+		collectd-dbg|\
+		collectd-utils|\
+		dtc-xen|\
+		ganeti|\
+		ganeti2|\
+		gfs-tools|\
+		gfs2-tools|\
+		libcollectdclient0|\
+		libcollectdclient-dev|\
+		liblinux-lvm-perl|\
+		libsys-virt-perl|\
+		libvirt0|\
+		libvirt0-dbg|\
+		libvirt-dev|\
+		libvirt-ocaml|\
+		libvirt-ocaml-dev|\
+		libvirt-ruby|\
+		libvirt-ruby1.8|\
+		mozilla-virt-viewer|\
+		munin-libvirt-plugins|\
+		mylvmbackup|\
+		python-libvirt|\
+		redhat-cluster-suite|\
+		rgmanager|\
+		virtinst|\
+		virt-top|\
+		virt-viewer|\
+		xenwatch|\
+		lvm2)
+			# work around lvm2 bug https://bugs.debian.org/603036 which is squeeze-ignore
+			log_debug
+			apt-get -y install udev
+			;;
+	esac
+
+fi
+
 if [ "$PIUPARTS_DISTRIBUTION" = "squeeze" ]; then
 
 	case ${PIUPARTS_OBJECTS%%=*} in
diff --git a/custom-scripts/scripts/pre_install_extras b/custom-scripts/scripts/pre_install_extras
index b9c7255..653ff68 100755
--- a/custom-scripts/scripts/pre_install_extras
+++ b/custom-scripts/scripts/pre_install_extras
@@ -5,11 +5,9 @@ log_debug() {
 	echo "Debug: piuparts extra for package $PIUPARTS_OBJECTS"
 }
 
-#
-# deal with extras:
-#
 if [ "$PIUPARTS_PHASE" = "install" ]; then
-case ${PIUPARTS_OBJECTS%%=*} in
+
+    case ${PIUPARTS_OBJECTS%%=*} in
 	*dkms)
 		log_debug
 		# Install kernel headers, so that dkms tries to build a module
@@ -37,5 +35,6 @@ case ${PIUPARTS_OBJECTS%%=*} in
 		echo "Debug: contents of /etc/resolv.conf"
 		cat /etc/resolv.conf
 		;;
-esac
+    esac
+
 fi
diff --git a/custom-scripts/scripts/pre_install_foreign_architecture b/custom-scripts/scripts/pre_install_foreign_architecture
new file mode 100755
index 0000000..4840075
--- /dev/null
+++ b/custom-scripts/scripts/pre_install_foreign_architecture
@@ -0,0 +1,45 @@
+#!/bin/sh
+set -e
+
+test "$PIUPARTS_PHASE" = "install" || exit 0
+
+case "$PIUPARTS_DISTRIBUTION" in
+	lenny*|squeeze*|wheezy*) exit 0 ;;
+esac
+
+FOREIGN=
+
+case ${PIUPARTS_OBJECTS%%=*} in
+	crossbuild-essential-arm64|\
+	*-aarch64-linux-gnu)
+		FOREIGN="arm64"
+		;;
+	crossbuild-essential-armel|\
+	*-arm-linux-gnueabi)
+		FOREIGN="armel"
+		;;
+	crossbuild-essential-armhf|\
+	*-arm-linux-gnueabihf)
+		FOREIGN="armhf"
+		;;
+	*-mips-linux-gnu)
+		FOREIGN="mips"
+		;;
+	*-mipsel-linux-gnu)
+		FOREIGN="mipsel"
+		;;
+	crossbuild-essential-powerpc|\
+	*-powerpc-linux-gnu)
+		FOREIGN="powerpc"
+		;;
+	crossbuild-essential-ppc64el|\
+	*-powerpc64le-linux-gnu)
+		FOREIGN="ppc64el"
+		;;
+esac
+
+if [ -n "$FOREIGN" ] && [ "$FOREIGN" != "$(dpkg --print-architecture)" ]; then
+	echo "Enabling foreign architecture $FOREIGN for $PIUPARTS_OBJECTS"
+	dpkg --add-architecture $FOREIGN
+	apt-get update
+fi
diff --git a/custom-scripts/scripts/pre_remove_40_find_unowned_lib_links b/custom-scripts/scripts/pre_remove_40_find_unowned_lib_links
new file mode 100755
index 0000000..d5354e6
--- /dev/null
+++ b/custom-scripts/scripts/pre_remove_40_find_unowned_lib_links
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -e
+
+for libdir in /lib /usr/lib /lib/*-gnu* /usr/lib/*-gnu*
+do
+	test -d "$libdir" || continue
+	for f in "$libdir"/*
+	do
+		test ! -d "$f" || continue
+		test -L "$f" || continue
+		rl=$(readlink "$f")
+		test -n "${rl##/etc/alternatives/*}" || continue
+		dpkg-query -S "$f" >/dev/null 2>&1 || echo "UNOWNED SYMLINK $f -> $rl"
+	done
+done
diff --git a/custom-scripts/scripts/pre_remove_exceptions b/custom-scripts/scripts/pre_remove_exceptions
index b9839c7..ed56aa0 100755
--- a/custom-scripts/scripts/pre_remove_exceptions
+++ b/custom-scripts/scripts/pre_remove_exceptions
@@ -5,9 +5,6 @@ log_debug() {
 	echo "Debug: piuparts exception for package $PIUPARTS_OBJECTS"
 }
 
-#
-# deal with exceptions:
-#
 case ${PIUPARTS_OBJECTS%%=*} in
 	isdnlog|isdnutils)
 		#WORKSAROUND #431855: fails with "There are still files in /etc/isdn/ that you may want to remove manually."
@@ -22,19 +19,6 @@ case ${PIUPARTS_OBJECTS%%=*} in
 		rm -f /usr/sbin/apt-listbugs
 		dpkg-divert --remove --rename /usr/sbin/apt-listbugs
 		;;
-	gdm3|gnome-session|gnome-shell*|gnome-core|gnome|gnome-desktop-environment|task-gnome-desktop|razorqt|sucrose-0.96|xfswitch-plugin|mate-core|mate-desktop-environment*|task-kde-desktop|kde-standard|kde-plasma-desktop|kde-plasma-netbook|ltsp-server-standalone)
-		# these packages cause installation of systemd-sysv which (currently) needs this help for removing it again
-		# also see post_purge_exceptions for further cleanup
-		log_debug
-		case ${PIUPARTS_DISTRIBUTION} in
-			lenny*|squeeze*|wheezy)
-				echo "PIUPARTS_DISTRIBUTION=$PIUPARTS_DISTRIBUTION, not applying systemd-sysv removal workaround"
-				;;
-			*)
-				apt-get -y install sysvinit-core
-				;;
-		esac
-		;;
 esac
 
 # Allow removal of the kernel running on the host from the chroot.
diff --git a/debian/changelog b/debian/changelog
index c0aa39a..66ea03c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,40 @@
+piuparts (0.61) UNRELEASED; urgency=medium
+
+  [ Michael Prokop ]
+  * Support new scripts directive 'post_chroot_unpack', useful for adding
+    apt-keys for custom apt repositories. (Closes: #767485)
+  * Add custom-scripts/scripts-unused-examples/post_chroot_unpack_key_setup.sh
+
+  [ Holger Levsen ]
+  * piuparts.py: Add "/var/cache/apt/archives/partial/" to ignored files.
+    (Closes: #767489)
+  * piuparts.py and piuparts-report: Detect four more (in)adequate issues:
+    - broken-binfmt-detector
+    - broken-binfmt-interpreter
+    - missing-alternative
+    - program-name-collision
+    (Closes: #767499)
+  * distros.conf: Remove unneeded URI for squeeze-lts, it just uses the
+    default repository.
+  * instances/pejacevic+slaves: Do not reschedule passed squeeze logs anymore.
+
+  [ Andreas Beckmann ]
+  * piuparts.py:
+    - Add to ignored_files:
+      + /etc/modules-load.d/modules.conf  (dangling symlink to ../modules)
+    - Create /etc/resolv.conf in the chroot using only the nameserver entries
+      found on the host.
+  * lib/dwke.py: Fix parsing known_problems/*.conf using EXCLUDE_PATTERN.
+  * Add "AddDefaultCharset utf-8" to the apache2 configuration snipplet
+    example, so that logfiles are displayed as UTF-8.
+  * pre_install_foreign_architecture: New script to enable foreign
+    architectures for testing cross toolchain packages.
+  * pre_remove_40_find_unowned_lib_links, unowned_lib_symlink_*.conf: New
+    script and reports for unowned symlinks in [/usr]/lib[/<triplet>].
+  * Rework the file-rc/sysvinit/upstart/systemd specific exceptions.
+
+ -- Holger Levsen <hol...@debian.org>  Sun, 26 Oct 2014 20:19:35 +0100
+
 piuparts (0.60) unstable; urgency=medium
 
   [ Leo Iannacone ]
@@ -6,7 +43,7 @@ piuparts (0.60) unstable; urgency=medium
     are on the same device. (Closes: #754878)
 
   [ Iain Lane ]
-  * Use python-distro-info to get the Debian and Ubuntu devel releases
+  * Use python-distro-info to get the Debian and Ubuntu devel releases.
   * tests: Remove the Ubuntu devel release test.
 
   [ Holger Levsen ]
diff --git a/htdocs/index.tpl b/htdocs/index.tpl
index 112fa90..06482b9 100644
--- a/htdocs/index.tpl
+++ b/htdocs/index.tpl
@@ -128,7 +128,7 @@
     </tr>
     <tr class="normalrow">
      <td class="contentcell2">
-      <b>2013-05-13</b> piuparts.debian.org has been moved to a new hardware and hosting location, now running virtualized on <a href="http://bits.debian.org/2013/04/bytemark-donation.html"; target="_blank">this nice cluster</a> at Bytemark. Thanks to the Debian System Administrators for their assistence in setting up the host and maintaining the Debian infrastructure! Also many thanks and kittos to the <a href="http://cs.helsinki.fi/index.en.html"; target="_blank">Department of Computer Science</a> at the University of Helsinki, Finland, for hosting piatti.debian.org since 2006 (at least)!<br>For maintaining this setup we use the *bikeshed* git branch.
+      <b>2013-05-13</b> piuparts.debian.org has been moved to a new hardware and hosting location, now running virtualized on <a href="http://bits.debian.org/2013/04/bytemark-donation.html"; target="_blank">this nice cluster</a> at Bytemark. Thanks to the Debian System Administrators for their assistence in setting up the host and maintaining the Debian infrastructure! Also many thanks and kittos to the <a href="http://cs.helsinki.fi/index.en.html"; target="_blank">Department of Computer Science</a> at the University of Helsinki, Finland, for hosting piatti.debian.org since 2006 (at least)!<br>For maintaining this setup we used the *bikeshed* git branch.
      </td>
     </tr>
     <tr class="normalrow">
diff --git a/instances/piuparts.conf.pejacevic b/instances/piuparts.conf.pejacevic
index 4e60471..381e6cf 100644
--- a/instances/piuparts.conf.pejacevic
+++ b/instances/piuparts.conf.pejacevic
@@ -78,8 +78,8 @@ sections =
 	squeeze2wheezy
 	squeeze2bpo-sloppy
 	squeeze2bpo2wheezy
-	squeeze
 	squeeze2squeeze-lts
+	squeeze
 	lenny2squeeze
 mirror = http://mirror.bm.debian.org/debian/
 master-host = pejacevic.debian.org
@@ -287,7 +287,7 @@ piuparts-flags =
 	%(flags-start-squeeze)s
 	%(flags-end-squeeze)s
 distro = squeeze
-reschedule-old-count = 50
+reschedule-old-count = 0
 # 1 month (60*60*24*30)
 max-tgz-age = 2592000
 
diff --git a/instances/piuparts.conf.piu-slave-1und1-01 b/instances/piuparts.conf.piu-slave-1und1-01
index d3100b9..8c29b95 100644
--- a/instances/piuparts.conf.piu-slave-1und1-01
+++ b/instances/piuparts.conf.piu-slave-1und1-01
@@ -78,8 +78,8 @@ sections =
 	squeeze2wheezy
 	squeeze2bpo-sloppy
 	squeeze2bpo2wheezy
-	squeeze
 	squeeze2squeeze-lts
+	squeeze
 	lenny2squeeze
 #
 mirror = http://mirror.1und1.de/debian/
@@ -287,7 +287,7 @@ piuparts-flags =
 	%(flags-start-squeeze)s
 	%(flags-end-squeeze)s
 distro = squeeze
-reschedule-old-count = 50
+reschedule-old-count = 0
 # 1 month (60*60*24*30)
 max-tgz-age = 2592000
 
diff --git a/known_problems/broken_binfmt_detector_inadequate_issue.conf b/known_problems/broken_binfmt_detector_inadequate_issue.conf
new file mode 100644
index 0000000..444a11f
--- /dev/null
+++ b/known_problems/broken_binfmt_detector_inadequate_issue.conf
@@ -0,0 +1,11 @@
+#
+# detect packages with some inadequate tag from adequate
+#
+PATTERN='(FAIL|WARN): Running adequate resulted in .* broken-binfmt-detector'
+WHERE='pass fail bugged affected'
+ISSUE=1
+HEADER="Packages tagged 'broken-binfmt-detector' by adequate"
+HELPTEXT="
+<p>Running <a href="https://packages.debian.org/adequate"; target="_blank">adequate</a> resulted in the package being tagged 'broken-binfmt-detector' which indicates a bug: The detector registered with update-binfmts(8) does not exist.
+</p>
+"
diff --git a/known_problems/broken_binfmt_interpreter_inadequate_issue.conf b/known_problems/broken_binfmt_interpreter_inadequate_issue.conf
new file mode 100644
index 0000000..8335ff8
--- /dev/null
+++ b/known_problems/broken_binfmt_interpreter_inadequate_issue.conf
@@ -0,0 +1,11 @@
+#
+# detect packages with some inadequate tag from adequate
+#
+PATTERN='(FAIL|WARN): Running adequate resulted in .* broken-binfmt-interpreter'
+WHERE='pass fail bugged affected'
+ISSUE=1
+HEADER="Packages tagged 'broken-binfmt-interpreter' by adequate"
+HELPTEXT="
+<p>Running <a href="https://packages.debian.org/adequate"; target="_blank">adequate</a> resulted in the package being tagged 'broken-binfmt-interpreter' which indicates a bug: The interpreter registered with update-binfmts(8) does not exist.
+</p>
+"
diff --git a/known_problems/missing_alternative_inadequate_issue.conf b/known_problems/missing_alternative_inadequate_issue.conf
new file mode 100644
index 0000000..20a5ca6
--- /dev/null
+++ b/known_problems/missing_alternative_inadequate_issue.conf
@@ -0,0 +1,11 @@
+#
+# detect packages with some inadequate tag from adequate
+#
+PATTERN='(FAIL|WARN): Running adequate resulted in .* missing-alternative'
+WHERE='pass fail bugged affected'
+ISSUE=1
+HEADER="Packages tagged 'missing-alternative' by adequate"
+HELPTEXT="
+<p>Running <a href="https://packages.debian.org/adequate"; target="_blank">adequate</a> resulted in the package being tagged 'missing-alternative' which indicates a bug similar to this situation: a package is a provider of the virtual package 'x-terminal-emulator', but it  doesn't register itself as an alternative for '/usr/bin/x-terminal-emulator'. See debian-policy 11.8.3 and 11.8.4.
+</p>
+"
diff --git a/known_problems/module_build_error_issue.conf b/known_problems/module_build_error_issue.conf
index 70871cc..eb04917 100644
--- a/known_problems/module_build_error_issue.conf
+++ b/known_problems/module_build_error_issue.conf
@@ -1,5 +1,5 @@
 #
-# detect packages with some inadequate tag from adequate
+# detect dkms module source packages that fail to build for a current kernel
 #
 PATTERN='Error! Bad return status for module build on kernel'
 WHERE='pass fail bugged affected'
diff --git a/known_problems/program_name_collision_inadequate_issue.conf b/known_problems/program_name_collision_inadequate_issue.conf
new file mode 100644
index 0000000..c495dfa
--- /dev/null
+++ b/known_problems/program_name_collision_inadequate_issue.conf
@@ -0,0 +1,11 @@
+#
+# detect packages with some inadequate tag from adequate
+#
+PATTERN='(FAIL|WARN): Running adequate resulted in .* program-name-collision'
+WHERE='pass fail bugged affected'
+ISSUE=1
+HEADER="Packages tagged 'program-name-collision' by adequate"
+HELPTEXT="
+<p>Running <a href="https://packages.debian.org/adequate"; target="_blank">adequate</a> resulted in the package being tagged 'program-name-collision' which indicates that this package ships a program with the same name as another program. This is a violation of debian-policy 10.1.
+</p>
+"
diff --git a/known_problems/unowned_lib_symlink_error.conf b/known_problems/unowned_lib_symlink_error.conf
new file mode 100644
index 0000000..470b197
--- /dev/null
+++ b/known_problems/unowned_lib_symlink_error.conf
@@ -0,0 +1,12 @@
+#
+# detect unowned symlinks in library directories
+#
+PATTERN='UNOWNED SYMLINK'
+WHERE='fail bugged affected'
+ISSUE=0
+HEADER='Unowned symlinks is library directories'
+HELPTEXT='
+<p>
+These should rather be shipped in packages.
+</p>
+'
diff --git a/known_problems/unowned_lib_symlink_issue.conf b/known_problems/unowned_lib_symlink_issue.conf
new file mode 100644
index 0000000..bb02c71
--- /dev/null
+++ b/known_problems/unowned_lib_symlink_issue.conf
@@ -0,0 +1,12 @@
+#
+# detect unowned symlinks in library directories
+#
+PATTERN='UNOWNED SYMLINK'
+WHERE='pass'
+ISSUE=1
+HEADER='Unowned symlinks is library directories'
+HELPTEXT='
+<p>
+These should rather be shipped in packages.
+</p>
+'
diff --git a/piuparts-report.py b/piuparts-report.py
index 8212273..390304b 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -425,12 +425,16 @@ linktarget_by_template = [
     ("boring_obsolete_conffile_file_inadequate_issue.tpl", "...and logfile contains tag from adequate 'obsolete-conffile-file'"),
     ("boring_broken_symlink_file_inadequate_issue.tpl", "...and logfile contains tag from adequate 'broken-symlink-file'"),
     ("bin_or_sbin_binary_requires_usr_lib_library_inadequate_issue.tpl", "but adequate found a binary in /bin or /sbin that requires a /usr/lib library"),
-    ("library_not_found_inadequate_issue.tpl", "but adequate couldn't find a required library"),
-    ("ldd_inadequate_issue.tpl", "but adequate encountered unexpected ldd warnings"),
     ("incompatible_licenses_inadequate_issue.tpl", "but adequate found a license incompatibility"),
+    ("broken_binfmt_detector_inadequate_issue.tpl", "but adequate did not find the detector registered with update_binfmts"),
+    ("broken_binfmt_interpreter_inadequate_issue.tpl", "but adequate did not find the interpreter registered with update_binfmts"),
+    ("missing_alternative_inadequate_issue.tpl", "but adequate found a missing alternative"),
     ("missing_copyright_file_inadequate_issue.tpl", "but adequate couldn't find a copyright file"),
+    ("program_name_collision_inadequate_issue.tpl", "but adequate found a program name collision"),
     ("py_file_not_bytecompiled_inadequate_issue.tpl", "but adequate found a .py file that is not byte-compiled"),
     ("pyshared_file_not_bytecompiled_inadequate_issue.tpl", "but adequate found a .py file in /usr/share/pyshared that is not byte-compiled"),
+    ("ldd_inadequate_issue.tpl", "but adequate encountered unexpected ldd warnings"),
+    ("library_not_found_inadequate_issue.tpl", "but adequate couldn't find a required library"),
     ("undefined_symbol_inadequate_issue.tpl", "but adequate found an undefined symbol"),
     ("symbol-size-mismatch_inadequate_issue.tpl", "but adequate found that a symbol has changed size since the package was built"),
     ("missing-symbol-version-information_inadequate_issue.tpl", "but adequate found that a library is missing symbol version information"),
@@ -441,6 +445,7 @@ linktarget_by_template = [
     ("module_build_error_issue.tpl", "but logfile contains dkms module build failures"),
     ("obsolete_conffiles_issue.tpl", "but logfile reports obsolete conffiles"),
     ("missing_md5sums_issue.tpl", "but logfile reports missing md5sums"),
+    ("unowned_lib_symlink_issue.tpl", "but logfile reports unowned lib symlinks"),
     ("piuparts-depends-dummy_issue.tpl", "but logfile reports piuparts-depends-dummy.deb could not be installed"),
     ("used_exception_issue.tpl", "but package used a piuparts exception"),
 
@@ -476,6 +481,7 @@ linktarget_by_template = [
     ("broken_symlinks_error.tpl", "...and logfile also contains 'broken symlinks'"),
     ("obsolete_conffiles_error.tpl", "...and logfile reports obsolete conffiles"),
     ("missing_md5sums_error.tpl", "...and logfile reports missing md5sums"),
+    ("unowned_lib_symlink_error.tpl", "...and logfile reports unowned lib symlinks"),
     ("piuparts-depends-dummy_error.tpl", "...and logfile reports piuparts-depends-dummy.deb could not be installed"),
     ("unclassified_failures.tpl", "due to unclassified failures"),
 ]
diff --git a/piuparts.1.txt b/piuparts.1.txt
index 3134e9b..b0094f8 100644
--- a/piuparts.1.txt
+++ b/piuparts.1.txt
@@ -283,7 +283,7 @@ piuparts ../foo_1.0-2_i386.changes
 piuparts -m 'http://gytha/debian main' ../foo_1.0-2_i386.changes
 ----
 
-If you want to test that a package installs properly in the stable (currently wheezy) Debian release, then can be upgraded to the testing (currently wheezy) and unstable (sid) versions, and then uninstalled without problems, you would give the following command:
+If you want to test that a package installs properly in the stable (currently wheezy) Debian release, then can be upgraded to the testing (currently jessie) and unstable (sid) versions, and then uninstalled without problems, you would give the following command:
 
 ----
 piuparts -a -d wheezy -d jessie -d sid foo
diff --git a/piuparts.py b/piuparts.py
index de349ff..b9d1359 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -249,6 +249,7 @@ class Settings:
             "/etc/apt/trusted.gpg~",
             "/usr/share/keyrings/debian-archive-removed-keys.gpg~",
             "/var/cache/apt/archives/lock",
+            "/var/cache/apt/archives/partial/",
             "/var/cache/apt/pkgcache.bin",
             "/var/cache/apt/srcpkgcache.bin",
             "/var/cache/debconf/",
@@ -315,6 +316,7 @@ class Settings:
             # work around broken symlinks
             "/usr/lib/python2.6/dist-packages/python-support.pth",  #635493 and #385775
             "/usr/lib/python2.7/dist-packages/python-support.pth",
+            "/etc/modules-load.d/modules.conf",
             # work around #316521 dpkg: incomplete cleanup of empty directories
             "/etc/apache2/",
             "/etc/apache2/conf.d/",
@@ -706,9 +708,6 @@ class Chroot:
             self.mount_proc()
             self.mount_selinux()
         self.configure_chroot()
-        if settings.basetgz or settings.schroot:
-            self.run(["apt-get", "-yf", "dist-upgrade"])
-        self.minimize()
 
         # Copy scripts dirs into the chroot, merging all dirs together,
         # later files overwriting earlier ones.
@@ -724,6 +723,14 @@ class Chroot:
                             and os.path.isfile(os.path.join(sdir, sfile)):
                         shutil.copy(os.path.join(sdir, sfile), dest)
 
+        # Run custom scripts after chroot has been unpacked/debootstrapped
+        # Useful for adjusting apt configuration e.g. for internal mirror usage
+        self.run_scripts("post_chroot_unpack")
+
+        if settings.basetgz or settings.schroot:
+            self.run(["apt-get", "-yf", "dist-upgrade"])
+        self.minimize()
+
         # Run custom scripts after creating the chroot.
         self.run_scripts("post_setup")
 
@@ -935,6 +942,17 @@ class Chroot:
         os.chmod(full_name, 0755)
         logging.debug("Created policy-rc.d and chmodded it.")
 
+    def create_resolv_conf(self):
+        """Create a resolv.conf containing the nameservers from the host system."""
+        full_name = self.relative("etc/resolv.conf")
+        nameservers = ""
+        with open("/etc/resolv.conf", "r") as f:
+            for line in f:
+                if line.startswith("nameserver"):
+                    nameservers += line
+        create_file(full_name, nameservers)
+        logging.debug("Created resolv.conf.")
+
     def setup_minimal_chroot(self):
         """Set up a minimal Debian system in a chroot."""
         logging.debug("Setting up minimal chroot for %s at %s." %
@@ -974,6 +992,7 @@ class Chroot:
         self.create_apt_conf()
         self.create_dpkg_conf()
         self.create_policy_rc_d()
+        self.create_resolv_conf()
         for bindmount in settings.bindmounts:
             run(["mkdir", "-p", self.relative(bindmount)])
             run(["mount", "-obind", bindmount, self.relative(bindmount)])
@@ -1186,15 +1205,19 @@ class Chroot:
             logging.info("Running adequate version %s now." % output.strip())
             adequate_tags = [
                     'bin-or-sbin-binary-requires-usr-lib-library',
+                    'broken-binfmt-detector',
+                    'broken-binfmt-interpreter',
+                    'incompatible-licenses',
+                    'ldd',
                     'library-not-found',
+                    'missing-alternative',
                     'missing-copyright-file',
+                    'missing-symbol-version-information',
+                    'program-name-collision',
                     'py-file-not-bytecompiled',
                     'pyshared-file-not-bytecompiled',
-                    'undefined-symbol',
-                    'missing-symbol-version-information',
                     'symbol-size-mismatch',
-                    'incompatible-licenses',
-                    'ldd',
+                    'undefined-symbol',
                     ]
             boring_tags = [
                     'obsolete-conffile',
diff --git a/piupartslib/dwke.py b/piupartslib/dwke.py
index 5292083..cba3e30 100644
--- a/piupartslib/dwke.py
+++ b/piupartslib/dwke.py
@@ -74,7 +74,7 @@ class Problem():
         probbody = pb.read()
         pb.close()
 
-        tagged = re.sub("^([A-Z]+=)", "<hdr>\g<0>", probbody, 0, re.MULTILINE)
+        tagged = re.sub("^([A-Z_]+=)", "<hdr>\g<0>", probbody, 0, re.MULTILINE)
 
         for chub in re.split('<hdr>', tagged)[1:]:
 

Attachment: signature.asc
Description: This is a digitally signed message part.



Reply via email to