From c96dd52bfc079b0e0f7a5262e844b867636f787e Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Tue, 5 Nov 2019 16:58:55 -0500 Subject: 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. --- kernel.spec | 7 +++---- remove-binary-diff.pl | 34 ---------------------------------- 2 files changed, 3 insertions(+), 38 deletions(-) delete mode 100755 remove-binary-diff.pl diff --git a/kernel.spec b/kernel.spec index 1ff43fb0a..8822508d7 100644 --- a/kernel.spec +++ b/kernel.spec @@ -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 Source11: x509.genkey -Source12: remove-binary-diff.pl Source15: merge.pl Source16: mod-extra.list Source17: mod-extra.sh @@ -1189,14 +1188,14 @@ cp %{SOURCE12} . # Update vanilla to the latest upstream. # (non-released_kernel case only) %if 0%{?rcrev} - xzcat %{SOURCE5000} | ./remove-binary-diff.pl | patch -p1 -F1 -s + xzcat %{SOURCE5000} | patch -p1 -F1 -s %if 0%{?gitrev} - xzcat %{SOURCE5001} | ./remove-binary-diff.pl | patch -p1 -F1 -s + xzcat %{SOURCE5001} | patch -p1 -F1 -s %endif %else # pre-{base_sublevel+1}-rc1 case %if 0%{?gitrev} - xzcat %{SOURCE5000} | ./remove-binary-diff.pl | patch -p1 -F1 -s + xzcat %{SOURCE5000} | patch -p1 -F1 -s %endif %endif git init diff --git a/remove-binary-diff.pl b/remove-binary-diff.pl deleted file mode 100755 index 9048490ca..000000000 --- a/remove-binary-diff.pl +++ /dev/null @@ -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; - } -} -- cgit