Package: devscripts
Version: 2.18.2
Severity: normal
Tags: patch

Dear Devscripts Maintainers,

glibc now use the new syscall 'openat' instead of 'open' most of the time.

Please update dpkg-depcheck to strace openat too.
The attached patch should do that.

(dpkg-depcheck also need to be updated for multiarch).

Cheers,
Bill.
--- /usr/bin/dpkg-depcheck      2018-04-22 22:33:07.000000000 +0000
+++ dpkg-depcheck       2018-05-11 12:23:59.737520460 +0000
@@ -378,7 +378,7 @@
        $file = $opts{"strace-output"} || `tempfile -p depcheck`;
        chomp $file;
        $file =~ s%^(\s)%./$1%;
-       my @strace_cmd=('strace', '-e', 'trace=open,execve',  '-f',
+       my @strace_cmd=('strace', '-e', 'trace=open,openat,execve',  '-f',
                        '-q', '-o', $file, @_);
        $ENV{'LC_ALL'}="C" if $opts{"C"};
        system(@strace_cmd);
@@ -392,9 +392,10 @@
     open FILE, $file or die "Cannot open $file for reading: $!\n";
     while (<FILE>) {
        # We only consider absolute filenames
-       m/^\d+\s+(\w+)\(\"(\/.*?)\",.*\) = (-?\d+)/ or next;
+       m/^\d+\s+(\w+)\((?:[^,"]+, )\"(\/.*?)\",.*\) = (-?\d+)/ or next;
        my ($syscall, $filename, $status) = ($1, $2, $3);
-       if ($syscall eq 'open') { next unless $status >= 0; }
+       if ($syscall eq 'open' || $syscall eq 'openat')
+        { next unless $status >= 0; }
        elsif ($syscall eq 'execve') { next unless $status == 0; }
        else { next; }  # unrecognised syscall
        next if $feature{"discard-check-version"} and

Reply via email to