Selaa lähdekoodia

dpkg-deb: Use same timestamp for the ar container as for tar mtime clamping

We use the same timestamp for all ar members, and the tarball mtime
clamping for each tar file entry.
Guillem Jover 11 vuotta sitten
vanhempi
commit
7feab64580
2 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 2 0
      debian/changelog
  2. 2 0
      dpkg-deb/build.c

+ 2 - 0
debian/changelog

@@ -29,6 +29,8 @@ dpkg (1.18.8) UNRELEASED; urgency=medium
     Thanks to Sven Joachim <svenjoac@gmx.de>. Closes: #827265
   * Use new GNU tar --clamp-mtime option in dpkg-deb to make sure no file in
     binary packages has an mtime later than the given time. Closes: #759886
+  * Use the same timestamp for the ar container as for tarball mtime clamping
+    in dpkg-deb.
   * Perl modules:
     - Use warnings::warnif() instead of carp() for deprecated warnings.
     - Add new format_range() method and deprecate dpkg() and rfc822() methods

+ 2 - 0
dpkg-deb/build.c

@@ -524,6 +524,8 @@ do_build(const char *const *argv)
    * build something. Let's start by making the ar-wrapper. */
   ar = dpkg_ar_create(debar, 0644);
 
+  dpkg_ar_set_mtime(ar, timestamp);
+
   unsetenv("TAR_OPTIONS");
 
   /* Create a temporary file to store the control data in. Immediately