Drop remove-binary-diff.pl

This was a workaround for some bad diffs that came in. Upstream
has mostly stopped doing that so we can drop this workaround.
This commit is contained in:
Laura Abbott 2019-11-05 16:58:55 -05:00
parent 4019404bbc
commit c96dd52bfc
2 changed files with 3 additions and 38 deletions

View File

@ -574,7 +574,6 @@ BuildRequires: binutils-%{_build_arch}-linux-gnu, gcc-%{_build_arch}-linux-gnu
Source0: https://www.kernel.org/pub/linux/kernel/v5.x/linux-%{kversion}.tar.xz Source0: https://www.kernel.org/pub/linux/kernel/v5.x/linux-%{kversion}.tar.xz
Source11: x509.genkey Source11: x509.genkey
Source12: remove-binary-diff.pl
Source15: merge.pl Source15: merge.pl
Source16: mod-extra.list Source16: mod-extra.list
Source17: mod-extra.sh Source17: mod-extra.sh
@ -1189,14 +1188,14 @@ cp %{SOURCE12} .
# Update vanilla to the latest upstream. # Update vanilla to the latest upstream.
# (non-released_kernel case only) # (non-released_kernel case only)
%if 0%{?rcrev} %if 0%{?rcrev}
xzcat %{SOURCE5000} | ./remove-binary-diff.pl | patch -p1 -F1 -s xzcat %{SOURCE5000} | patch -p1 -F1 -s
%if 0%{?gitrev} %if 0%{?gitrev}
xzcat %{SOURCE5001} | ./remove-binary-diff.pl | patch -p1 -F1 -s xzcat %{SOURCE5001} | patch -p1 -F1 -s
%endif %endif
%else %else
# pre-{base_sublevel+1}-rc1 case # pre-{base_sublevel+1}-rc1 case
%if 0%{?gitrev} %if 0%{?gitrev}
xzcat %{SOURCE5000} | ./remove-binary-diff.pl | patch -p1 -F1 -s xzcat %{SOURCE5000} | patch -p1 -F1 -s
%endif %endif
%endif %endif
git init git init

View File

@ -1,34 +0,0 @@
#!/usr/bin/perl -w
# A script to remove those terrible binary diffs from the patches which
# screw up everything and rain on my parade.
use strict;
my @args=@ARGV;
my @current_patch;
my $is_binary = 0;
my $cnt = 0;
while(my $row = <>) {
# diff marks the start of a new file to check
if ($row =~ /^diff --git.*?(\S+)$/) {
if (!$is_binary) {
foreach my $line (@current_patch) {
print $line;
}
}
$is_binary = 0;
@current_patch = ();
} elsif ($row =~ /Binary files (.)* differ$/) {
$is_binary = 1;
} elsif ($row =~ /GIT binary patch/) {
$is_binary = 1;
}
push (@current_patch, $row);
}
if (!$is_binary) {
foreach my $line (@current_patch) {
print $line;
}
}