Przeglądaj źródła

Dpkg::Source::Archive: Use tar --format=gnu when creating archives

Explicitly instruct Dpkg::Source::Archive to use the gnu format when
creating archives. Some versions of tar (specifically on openSUSE >= 12.2)
have a different default tar format. This change makes the archive
creation more consistent.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Guillem Jover <guillem@debian.org>
Jan Blunck 12 lat temu
rodzic
commit
3f0c739bff
2 zmienionych plików z 4 dodań i 1 usunięć
  1. 3 0
      debian/changelog
  2. 1 1
      scripts/Dpkg/Source/Archive.pm

+ 3 - 0
debian/changelog

@@ -13,6 +13,9 @@ dpkg (1.17.12) UNRELEASED; urgency=low
     columns, shown by default, can be turned off with the new ‘A’ key,
     or bound to another key via the new “archdisplay” keybinding.
   * Fix a descriptor leak on dselect subprocesses when --debug is used.
+  * Use «tar --format=gnu» when creating source archives. This makes sure we
+    get a deterministic output format, regardless of what tar defaults to.
+    Thanks to Jan Blunck <jblunck@infradead.org>..
 
   [ Updated programs translations ]
   * German (Sven Joachim).

+ 1 - 1
scripts/Dpkg/Source/Archive.pm

@@ -49,7 +49,7 @@ sub create {
     # Call tar creation process
     $spawn_opts{delete_env} = [ 'TAR_OPTIONS' ];
     $spawn_opts{exec} = [ 'tar', '--null', '-T', '-', '--numeric-owner',
-                            '--owner', '0', '--group', '0',
+                            '--owner', '0', '--group', '0', '--format=gnu',
                             @{$opts{options}}, '-cf', '-' ];
     *$self->{pid} = spawn(%spawn_opts);
     *$self->{cwd} = getcwd();