Просмотр исходного кода

dpkg-source: do not store user/group names in generated tarballs

Do not store usernames and group names when creating tarballs
and use numeric UID/GID 0 instead. This concerns native source packages,
debian tarballs in "3.0 (quilt)" source packages, and any other source
format creating new tarballs with Dpkg::Source::Archive.
Raphael Hertzog лет назад: 17
Родитель
Сommit
609294de10
2 измененных файлов с 4 добавлено и 1 удалено
  1. 2 0
      debian/changelog
  2. 2 1
      scripts/Dpkg/Source/Archive.pm

+ 2 - 0
debian/changelog

@@ -61,6 +61,8 @@ dpkg (1.15.1) UNRELEASED; urgency=low
     not going to be included in the debian tarball of a "3.0 (quilt)" source
     package. Closes: #524375
   * Bump Standards-Version to 3.8.1 (no change required).
+  * Do not store usernames and group names in tarballs created by dpkg-source,
+    they are anyway ignored at unpack time. Closes: #523184
 
   [ Guillem Jover ]
   * Fix typo in dpkg output (‘unexecpted’ → ‘unexpected’). Closes: #519082

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

@@ -45,7 +45,8 @@ sub create {
     $fork_opts{"to_handle"} = $self->open_for_write();
     $fork_opts{"from_pipe"} = \$self->{'tar_input'};
     # Call tar creation process
-    $fork_opts{'exec'} = [ 'tar', '--null', '-T', '-',
+    $fork_opts{'exec'} = [ 'tar', '--null', '-T', '-', '--numeric-owner',
+                           '--owner', '0', '--group', '0',
 			   @{$opts{"options"}}, '-cf', '-' ];
     $self->{"pid"} = fork_and_exec(%fork_opts);
     $self->{"cwd"} = getcwd();