On Fri, 24 Aug 2018 15:50:22 +1200 Michael Hudson-Doyle <mwhud...@debian.org> wrote: > Package: devscripts > Version: 2.17.12ubuntu1.1 > Severity: wishlist > > Dear Maintainer, > > We've had a few bugs in ubuntu where execute bits have been lost on > scripts for whatever reason. Figuring out what was going on was not > made easier by the fact that these changes are invisible to debdiff, for > example, comparing these two dscs: > > https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/apt-setup/1:0.141ubuntu1/apt-setup_0.141ubuntu1.dsc > https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/apt-setup/1:0.141ubuntu2/apt-setup_0.141ubuntu2.dsc > > Gives just this output: > > diff -Nru apt-setup-0.141ubuntu1/debian/changelog > apt-setup-0.141ubuntu2/debian/changelog > --- apt-setup-0.141ubuntu1/debian/changelog 2018-05-19 03:09:32.000000000 > +0000 > +++ apt-setup-0.141ubuntu2/debian/changelog 2018-08-20 09:58:36.000000000 > +0000 > @@ -1,3 +1,10 @@ > +apt-setup (1:0.141ubuntu2) cosmic; urgency=medium > + > + * Restore execute bits on generators/91security and > + finish-install.d/10apt-cdrom-setup. > + > + -- Michael Hudson-Doyle <michael.hud...@ubuntu.com> Mon, 20 Aug 2018 > 21:58:36 +1200 > + > apt-setup (1:0.141ubuntu1) cosmic; urgency=low > > * Merge from Debian unstable. Remaining changes: > > Not showing the change that was actually the point of the upload. >
Here is one way to implement this. See attached, and sample output of the debdiff.
$ ./scripts/debdiff.pl /tmp/foo/apt-setup*.dsc gpgv: Signature made Sat 19 May 2018 04:17:55 BST gpgv: using RSA key 903F300AF37D2F639C2D7D3A00695A404C9EBDA7 gpgv: issuer "cypher...@ubuntu.com" gpgv: Can't check signature: No public key dpkg-source: warning: failed to verify signature on /tmp/foo/apt-setup_0.141ubuntu1.dsc diff --git a/tmp/xZo8c2Hovx/apt-setup-0.141ubuntu1/debian/changelog b/tmp/_h7lYt4hJi/apt-setup-0.141ubuntu2/debian/changelog index edb8e89970..a6cfeb46f9 100644 --- a/tmp/xZo8c2Hovx/apt-setup-0.141ubuntu1/debian/changelog +++ b/tmp/_h7lYt4hJi/apt-setup-0.141ubuntu2/debian/changelog @@ -1,3 +1,10 @@ +apt-setup (1:0.141ubuntu2) cosmic; urgency=medium + + * Restore execute bits on generators/91security and + finish-install.d/10apt-cdrom-setup. + + -- Michael Hudson-Doyle <michael.hud...@ubuntu.com> Mon, 20 Aug 2018 21:58:36 +1200 + apt-setup (1:0.141ubuntu1) cosmic; urgency=low * Merge from Debian unstable. Remaining changes: diff --git a/tmp/xZo8c2Hovx/apt-setup-0.141ubuntu1/finish-install.d/10apt-cdrom-setup b/tmp/_h7lYt4hJi/apt-setup-0.141ubuntu2/finish-install.d/10apt-cdrom-setup old mode 100644 new mode 100755 diff --git a/tmp/xZo8c2Hovx/apt-setup-0.141ubuntu1/generators/91security b/tmp/_h7lYt4hJi/apt-setup-0.141ubuntu2/generators/91security old mode 100644 new mode 100755
diff -Nru devscripts-2.21.1ubuntu1/debian/changelog devscripts-2.21.1ubuntu2/debian/changelog --- devscripts-2.21.1ubuntu1/debian/changelog 2021-02-25 09:25:09.000000000 +0000 +++ devscripts-2.21.1ubuntu2/debian/changelog 2021-03-04 13:03:57.000000000 +0000 @@ -1,3 +1,9 @@ +devscripts (2.21.1ubuntu2) UNRELEASED; urgency=medium + + * Use git diff in debdiff, if available Closes: #907126 + + -- Dimitri John Ledkov <x...@ubuntu.com> Thu, 04 Mar 2021 13:03:57 +0000 + devscripts (2.21.1ubuntu1) hirsute; urgency=low * Merge from Debian unstable. Remaining changes: diff -Nru devscripts-2.21.1ubuntu1/scripts/debdiff.pl devscripts-2.21.1ubuntu2/scripts/debdiff.pl --- devscripts-2.21.1ubuntu1/scripts/debdiff.pl 2021-02-16 20:46:17.000000000 +0000 +++ devscripts-2.21.1ubuntu2/scripts/debdiff.pl 2021-03-04 13:03:42.000000000 +0000 @@ -756,9 +756,16 @@ closedir(DIR); } - my @command = ("diff", "-Nru", @diff_opts); - for my $exclude (@excludes) { - push @command, ("--exclude", $exclude); + + my @command = (); + system("command -v git >/dev/null 2>&1"); + if ($? == 0) { + @command = ("git", "diff", "--no-index", @diff_opts); + } else { + @command = ("diff", "-Nru", @diff_opts); + for my $exclude (@excludes) { + push @command, ("--exclude", $exclude); + } } push @command, ("$dir1/$sdir1", "$dir2/$sdir2");