diff options
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | man/dpkg-source.1 | 11 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Package.pm | 6 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Package/V1.pm | 7 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Package/V2.pm | 5 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Package/V3/quilt.pm | 5 |
6 files changed, 25 insertions, 12 deletions
diff --git a/debian/changelog b/debian/changelog index 66b369c51..94cfbe7cf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -33,6 +33,9 @@ dpkg (1.16.1) UNRELEASED; urgency=low * Check presence of required parameters in dpkg-vendor. Closes: #628726 Thanks to Niels Thykier <niels@thykier.net> for the patch. * Avoid a Perl warning in dpkg-buildflags when HOME is not set. + * dpkg-source can now also use debian/source/local-patch-header (that is not + included in the generated source package) instead of + debian/source/patch-header. Closes: #629582 [ Guillem Jover ] * Install deb-src-control(5) man pages in dpkg-dev. Closes: #620520 diff --git a/man/dpkg-source.1 b/man/dpkg-source.1 index 8dbbb7e29..550cb0d09 100644 --- a/man/dpkg-source.1 +++ b/man/dpkg-source.1 @@ -504,9 +504,10 @@ Use \fBdebian/patches/debian-changes\fP instead of automatic patch generated during build. This option is particularly useful when the package is maintained in a VCS and a patch set can't reliably be generated. Instead the current diff with upstream should be stored in a -single patch. When using this option, it is recommended to create -a debian/source/patch-header file explaining how the Debian changes can be -best reviewed, for example in the VCS that is used. +single patch. The option would be put in \fBdebian/source/local-options\fP +and would be accompanied by a \fBdebian/source/local-patch-header\fP file +explaining how the Debian changes can be best reviewed, for example in the +VCS that is used. .TP .B \-\-create\-empty\-orig Automatically create the main original tarball as empty if it's missing @@ -683,9 +684,11 @@ Exactly like \fBdebian/source/options\fP except that the file is not included in the generated source package. It can be useful to store a preference tied to the maintainer or to the VCS repository where the source package is maintained. +.SS debian/source/local-patch-header .SS debian/source/patch-header Free form text that is put on top of the automatic patch generated -in formats "2.0" or "3.0 (quilt)". +in formats "2.0" or "3.0 (quilt)". \fBlocal-patch-header\fP is not +included in the generated source package while \fBpatch-header\fP is. .SS debian/patches/series This file lists all patches that have to be applied (in the given order) on top of the upstream source package. Leading and trailing spaces are diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm index 7b0520877..21089a28b 100644 --- a/scripts/Dpkg/Source/Package.pm +++ b/scripts/Dpkg/Source/Package.pm @@ -61,8 +61,6 @@ our $diff_ignore_default_regexp = ' (?:^|/)\..*\.sw.$| # Ignore baz-style junk files or directories (?:^|/),,.*(?:$|/.*$)| -# local-options must not be exported in the resulting source package -(?:^|/)debian/source/local-options$| # File-names that should be ignored (never directories) (?:^|/)(?:DEADJOE|\.arch-inventory|\.(?:bzr|cvs|hg|git)ignore)$| # File or directory names that should be ignored @@ -170,13 +168,15 @@ sub init_options { # Use full ignore list by default # note: this function is not called by V1 packages $self->{'options'}{'diff_ignore_regexp'} ||= $diff_ignore_default_regexp; + $self->{'options'}{'diff_ignore_regexp'} .= '|(?:^|/)debian/source/local-.*$'; if (defined $self->{'options'}{'tar_ignore'}) { $self->{'options'}{'tar_ignore'} = [ @tar_ignore_default_pattern ] unless @{$self->{'options'}{'tar_ignore'}}; } else { $self->{'options'}{'tar_ignore'} = [ @tar_ignore_default_pattern ]; } - push @{$self->{'options'}{'tar_ignore'}}, "debian/source/local-options"; + push @{$self->{'options'}{'tar_ignore'}}, "debian/source/local-options", + "debian/source/local-patch-header"; # Skip debianization while specific to some formats has an impact # on code common to all formats $self->{'options'}{'skip_debianization'} ||= 0; diff --git a/scripts/Dpkg/Source/Package/V1.pm b/scripts/Dpkg/Source/Package/V1.pm index 8772e8df8..35704c52e 100644 --- a/scripts/Dpkg/Source/Package/V1.pm +++ b/scripts/Dpkg/Source/Package/V1.pm @@ -44,11 +44,12 @@ sub init_options { # Don't call $self->SUPER::init_options() on purpose, V1.0 has no # ignore by default if ($self->{'options'}{'diff_ignore_regexp'}) { - $self->{'options'}{'diff_ignore_regexp'} .= '|(?:^|/)debian/source/local-options$'; + $self->{'options'}{'diff_ignore_regexp'} .= '|(?:^|/)debian/source/local-.*$'; } else { - $self->{'options'}{'diff_ignore_regexp'} = '(?:^|/)debian/source/local-options$'; + $self->{'options'}{'diff_ignore_regexp'} = '(?:^|/)debian/source/local-.*$'; } - push @{$self->{'options'}{'tar_ignore'}}, "debian/source/local-options"; + push @{$self->{'options'}{'tar_ignore'}}, "debian/source/local-options", + "debian/source/local-patch-header"; $self->{'options'}{'sourcestyle'} ||= 'X'; $self->{'options'}{'skip_debianization'} ||= 0; $self->{'options'}{'abort_on_upstream_changes'} ||= 0; diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm index e3e0ec883..b59affce6 100644 --- a/scripts/Dpkg/Source/Package/V2.pm +++ b/scripts/Dpkg/Source/Package/V2.pm @@ -499,7 +499,10 @@ sub do_build { sub get_patch_header { my ($self, $dir, $previous) = @_; - my $ph = File::Spec->catfile($dir, "debian", "source", "patch-header"); + my $ph = File::Spec->catfile($dir, "debian", "source", "local-patch-header"); + unless (-f $ph) { + $ph = File::Spec->catfile($dir, "debian", "source", "patch-header"); + } my $text; if (-f $ph) { open(PH, "<", $ph) || syserr(_g("cannot read %s"), $ph); diff --git a/scripts/Dpkg/Source/Package/V3/quilt.pm b/scripts/Dpkg/Source/Package/V3/quilt.pm index 63bb04ec5..0a84ac7a5 100644 --- a/scripts/Dpkg/Source/Package/V3/quilt.pm +++ b/scripts/Dpkg/Source/Package/V3/quilt.pm @@ -371,7 +371,10 @@ sub register_autopatch { sub get_patch_header { my ($self, $dir, $previous) = @_; - my $ph = File::Spec->catfile($dir, "debian", "source", "patch-header"); + my $ph = File::Spec->catfile($dir, "debian", "source", "local-patch-header"); + unless (-f $ph) { + $ph = File::Spec->catfile($dir, "debian", "source", "patch-header"); + } my $text; if (-f $ph) { open(PH, "<", $ph) || syserr(_g("cannot read %s"), $ph); |