This should finally make the build really reproducible.
+t-prot (3.4-3) UNRELEASED; urgency=medium
+
+  * Really make build reproducible by also hardcoding file permissions for
+    files generated by output redirection.
+
+ -- Axel Beckert <abe@debian.org>  Tue, 12 May 2015 22:55:49 +0200
+
 t-prot (3.4-2) unstable; urgency=medium
 
   * debian/rules: Set timestamp of all new files to the same time to make
 
        dpkg-gencontrol -ldebian/changelog -isp -p$(PKG) -P$(TMP)
        cd $(TMP) && find * -type f ! -regex '^DEBIAN/.*' -print0 | \
                xargs -r0 md5sum > DEBIAN/md5sums
+       # Make build reproducible:
+       # Hardcode permissions for files created by output redirection
+       chmod 644 $(TMP)/DEBIAN/md5sums $(TMP)/DEBIAN/templates
+       # Set timestamp of all files to timestamp in debian/changelog entry
        find $(TMP) -depth -newermt '$(BUILD_DATE)' -print0 | \
                xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
        dpkg --build $(TMP) ..