From patchwork Thu Sep 15 13:52:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 16691 X-Patchwork-Delegate: mareklindner@neomailbox.ch Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 484F782F2D; Thu, 15 Sep 2016 15:53:04 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=narfation.org Authentication-Results: open-mesh.org; dkim=fail reason="verification failed; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=fSw8+1D7; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2001:4d88:2000:7::2; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=pass header.from=narfation.org Received: from v3-1039.vlinux.de (narfation.org [IPv6:2001:4d88:2000:7::2]) by open-mesh.org (Postfix) with ESMTPS id 8B47682F26 for ; Thu, 15 Sep 2016 15:52:56 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p2003007C6F7020FE9422C23834D15380.dip0.t-ipconnect.de [IPv6:2003:7c:6f70:20fe:9422:c238:34d1:5380]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 0197F1100B0 for ; Thu, 15 Sep 2016 15:52:55 +0200 (CEST) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1473947576; bh=hRh8hAT4JpwMQimW9Tb1P78xjtJJUo4qiKsHxO08AdU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fSw8+1D7DUQEXfTbV/vwX9e7UH4wwitRg4H8G+GJPJ+YPspWMPvb1XgHq1DP26VOd 5lUAFEKw0X+uB0Bfh4Woy/X9x7frIiSPYcelcHmaNqUcb9RDxBpC+U1JhQQ77rdX9t JrkQeFuFUuDumGMV8+MT3rZ5fqMW0ICh6l84VmJA= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Thu, 15 Sep 2016 15:52:48 +0200 Message-Id: <20160915135249.1925-2-sven@narfation.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160915135249.1925-1-sven@narfation.org> References: <20160915135249.1925-1-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH next v2 2/3] batman-adv: Use simple script to patch minor compat problems X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" Unified diff base patches have the problem that they fix only a single line and depend on the surrounding. This approach can fail relative often when the surrounding code will be changed often. Thus semantic patches (like spatch from coccinelle) or simple find+replace scripts are better for this approach. Introduce a simple script file which will store these kind of find+replace instructions. Signed-off-by: Sven Eckelmann --- v2: - introduce this patch to support the patch 3 Makefile | 3 ++- compat-patches/replacements.sh | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100755 compat-patches/replacements.sh diff --git a/Makefile b/Makefile index b105290..7ef2569 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ install: config $(SOURCE_STAMP) config: $(PWD)/gen-compat-autoconf.sh $(PWD)/compat-autoconf.h -$(SOURCE_STAMP): $(SOURCE) compat-patches/* +$(SOURCE_STAMP): $(SOURCE) compat-patches/* compat-patches/replacements.sh $(MKDIR) $(BUILD_DIR)/net/batman-adv/ @$(RM) $(SOURCE_BUILD) @$(CP) $(SOURCE) $(BUILD_DIR)/net/batman-adv/ @@ -111,6 +111,7 @@ $(SOURCE_STAMP): $(SOURCE) compat-patches/* $(PATCH) ../compat-patches/$${i}; \ cd - > /dev/null; \ done + compat-patches/replacements.sh touch $(SOURCE_STAMP) .PHONY: all clean install config diff --git a/compat-patches/replacements.sh b/compat-patches/replacements.sh new file mode 100755 index 0000000..c7875c0 --- /dev/null +++ b/compat-patches/replacements.sh @@ -0,0 +1,3 @@ +#! /bin/sh + +set -e