From ee51a78c13322c675fe8e0e8ba819358982d78cc Mon Sep 17 00:00:00 2001 From: Raphael Hertzog Date: Sat, 26 Jan 2008 19:25:31 +0100 Subject: [PATCH] dpkg-gensymbols: skip directories during scan of package build dir * scripts/dpkg-gensymbols: Don't scan directories which are symlinks. They might point outside of the package build dir which results in addition of libraries which are not in the package. The libc6 package on amd64 is affected with a symlink "lib64" -> "/lib". --- ChangeLog | 8 ++++++++ debian/changelog | 7 +++++++ scripts/dpkg-gensymbols.pl | 4 +++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9be877a2..1ec4fe40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-01-26 Raphael Hertzog + + * scripts/dpkg-gensymbols: Don't scan directories which are + symlinks. They might point outside of the package build dir which + results in addition of libraries which are not in the package. + The libc6 package on amd64 is affected with a symlink "lib64" -> + "/lib". + 2008-01-24 Raphael Hertzog * configure.ac: Release 1.14.16.5. diff --git a/debian/changelog b/debian/changelog index 749f9fab..9914ff2a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +dpkg (1.14.16.6) UNRELEASED; urgency=low + + * Let dpkg-gensymbols skip directories which are just symlinks when scanning + the package build dir. + + -- Raphael Hertzog Sat, 26 Jan 2008 19:20:40 +0100 + dpkg (1.14.16.5) unstable; urgency=low * Fix dpkg-gensymbols handling of #include so that one can include multiple diff --git a/scripts/dpkg-gensymbols.pl b/scripts/dpkg-gensymbols.pl index 9b8515a9..58aaa091 100755 --- a/scripts/dpkg-gensymbols.pl +++ b/scripts/dpkg-gensymbols.pl @@ -140,7 +140,9 @@ if (not scalar @files) { foreach my $path (@librarypaths) { my $libdir = "$packagebuilddir$path"; $libdir =~ s{/+}{/}g; - next if not -d $libdir; + lstat $libdir; + next if not -d _; + next if -l _; # Skip directories which are symlinks opendir(DIR, "$libdir") || syserr(_g("Can't read directory %s: %s"), $libdir, $!); push @files, grep { -- 2.39.5