The following commit has been merged in the master branch:
commit b3df3f93fcdd59c9de49c7c53461ab558ac2f5b4
Author: James Vega <[email protected]>
Date:   Sun Apr 10 23:15:20 2011 -0400

    Add changelog entry for Christian's uscan patch and use glob instead of ls.
    
    Signed-off-by: James Vega <[email protected]>

diff --git a/debian/changelog b/debian/changelog
index 887fb94..e39512e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,12 @@ devscripts (2.10.72) UNRELEASED; urgency=low
       (Closes: #597963)
     + Fix "Use of uninitialized value" warnings when processing certain
       version 1 watch files.
+    + Fix various issues when repacking a zip to a tarball.  Thanks to
+      Christian Kastner for the patch.  (Closes: #615108)
+      - Run tar from within the temp directory to prevent getting a ‘./’
+        archive member.
+      - Use root/root as the owner for the archive members to prevent leaking
+        the user's login.
   * Remove use of lzma command in favor of xz. (Closes: #599641)
     + debian/control: Remove lzma from Recommends.
     + uscan: Use xz to repack lzma tarballs.
diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index 47b8380..406d3bc 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -1373,10 +1373,11 @@ EOF
        my $newfile_base_gz = "$1.tar.gz";
        my $tempdir = tempdir ( "uscanXXXX", TMPDIR => 1, CLEANUP => 1 );
        my $globpattern = "*";
+       my $hidden = ".[!.]*";
        system("unzip -q -a -d $tempdir $destdir/$newfile_base") == 0
          or die("Repacking from zip to tar.gz failed (could not unzip)\n");
-       if (system("ls -d $tempdir/.[!.]* >/dev/null 2>&1") == 0) {
-           $globpattern .= " .[!.]*";
+       if (defined glob($hidden)) {
+           $globpattern .= " $hidden";
        }
        system("cd $tempdir; GZIP=-9 tar --owner=root --group=root --mode=a+rX 
-czf $destdir/$newfile_base_gz $globpattern") == 0
          or die("Repacking from zip to tar.gz failed (could not create 
tarball)\n");

-- 
Git repository for devscripts


-- 
To unsubscribe, send mail to [email protected].

Reply via email to