tag 306125 patch
usertag 306125 fixed-in-my-arch-branch
thanks
Proposed patch for this bug is attached.
([EMAIL PROTECTED]/dpkg--devel--1.13--patch-27)
Gruesse,
--
Frank Lichtenheld <[EMAIL PROTECTED]>
www: http://www.djpig.de/
* looking for [EMAIL PROTECTED]/dpkg--devel--1.13--patch-26 to compare with
* comparing to [EMAIL PROTECTED]/dpkg--devel--1.13--patch-26
M scripts/dpkg-source.pl
M debian/changelog
M ChangeLog
* modified files
--- orig/ChangeLog
+++ mod/ChangeLog
@@ -10,6 +10,10 @@
([dpkg-dev]Replaces) Remove dpkgname and versioned
replaces on dpkg.
+ * scripts/dpkg-source.pl: Warn on -b if we add a file with
+ special (i.e. exectuable or set{u,g}id) permission in the
+ diff since this mode will get lost.
+
2005-10-07 Frank Lichtenheld <[EMAIL PROTECTED]>
* scripts/controllib.pl:
--- orig/debian/changelog
+++ mod/debian/changelog
@@ -28,6 +28,8 @@
- Let dpkg-source ensure (as good as possible) that all
build source packages can also be unpacked.
Closes: #6820, #7014
+ - Let dpkg-source -b warn about special permissions of files added
+ in the diff since these will get lost. Closes: #306125
--
--- orig/scripts/dpkg-source.pl
+++ mod/scripts/dpkg-source.pl
@@ -34,6 +34,7 @@
use POSIX;
use POSIX qw (:errno_h :signal_h);
+use Fcntl qw (:mode);
use strict 'refs';
@@ -405,6 +406,7 @@
next file if $fn =~ m/$diff_ignore_regexp/o;
$fn =~ s,^\./,,;
lstat("$dir/$fn") || &syserr("cannot stat file $dir/$fn");
+ my $mode = S_IMODE((lstat(_))[2]);
if (-l _) {
$type{$fn}= 'symlink';
&checktype('-l') || next;
@@ -418,6 +420,13 @@
if (!lstat("$origdir/$fn")) {
$! == ENOENT || &syserr("cannot stat orig file
$origdir/$fn");
$ofnread= '/dev/null';
+ if( $mode & ( S_IXUSR | SIXGRP | S_IXOTH ) ) {
+ &warn( sprintf( "executable mode %04o of `$fn' will not
be represented in diff", $mode ) )
+ unless $fn eq 'debian/rules';
+ }
+ if( $mode & ( S_ISUID | S_IGID | S_ISVTX ) ) {
+ &warn( sprintf( "special mode %04o of `$fn' will not be
represented in diff", $mode ) );
+ }
} elsif (-f _) {
$ofnread= "$origdir/$fn";
} else {