From patchwork Fri Jun 10 11:02:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Lagerwall X-Patchwork-Id: 9169477 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9920B60573 for ; Fri, 10 Jun 2016 11:04:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A9DE1FF45 for ; Fri, 10 Jun 2016 11:04:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F43728325; Fri, 10 Jun 2016 11:04:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5A7D01FF45 for ; Fri, 10 Jun 2016 11:04:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bBKDP-0003N9-6j; Fri, 10 Jun 2016 11:03:03 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bBKDN-0003Ml-Ie for xen-devel@lists.xen.org; Fri, 10 Jun 2016 11:03:01 +0000 Received: from [85.158.139.211] by server-12.bemta-5.messagelabs.com id 9C/04-07320-46E9A575; Fri, 10 Jun 2016 11:03:00 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpkkeJIrShJLcpLzFFi42JxWrrBXjdlXlS 4wcHlYhZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8apnUfYCmZzV6x7Pp+pgfEhRxcjB4eEgL/E q/kaXYycHGwCBhK3Ln1nBrFFBGQlVnfNYQexmQXiJdbPmcgKYgsLmEj8O/SJBcRmEVCVWNd3n g3E5hXwlLi1ex07xEh5iWe360HCQgJqEm+Xn2GBKBGUODnzCQvESAmJgy9eMEOUc0v87bafwM gzC0nVLCRVCxiZVjGqF6cWlaUW6ZrpJRVlpmeU5CZm5ugaGpjq5aYWFyemp+YkJhXrJefnbmI EBgcDEOxgnNrgfIhRkoNJSZR38uSocCG+pPyUyozE4oz4otKc1OJDjDIcHEoSvNZzgXKCRanp qRVpmTnAMIVJS3DwKInwMoCkeYsLEnOLM9MhUqcYdTnmTdp1jEmIJS8/L1VKnFcVpEgApCijN A9uBCxmLjHKSgnzMgIdJcRTkFqUm1mCKv+KUZyDUUmY9+gcoCk8mXklcJteAR3BBHTE8iPhIE eUJCKkpBoY4xTDmsI7T9e/s/pW9uuhTK+/xx2h019umkww6H/O7tqX6rb6moJ9acN7jQ+LVZ8 K/O7TSbyiwW/y+5+FnI3nt9k3TlhrPG0Jvq38J3/FV9b3Cp91rzPnr3TSq/ow6fzSwsSLaisi 1p0wuq45bdO2zJC6efJFVpfulB2c2f98Kf/76zkcJ97zKbEUZyQaajEXFScCAIdAqMiUAgAA X-Env-Sender: prvs=9624cb854=ross.lagerwall@citrix.com X-Msg-Ref: server-10.tower-206.messagelabs.com!1465556578!26996526!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 27220 invoked from network); 10 Jun 2016 11:03:00 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-10.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 10 Jun 2016 11:03:00 -0000 X-IronPort-AV: E=Sophos;i="5.26,449,1459814400"; d="scan'208";a="366463636" From: Ross Lagerwall To: Date: Fri, 10 Jun 2016 12:02:43 +0100 Message-ID: <1465556565-26403-1-git-send-email-ross.lagerwall@citrix.com> X-Mailer: git-send-email 2.4.11 MIME-Version: 1.0 X-DLP: MIA1 Cc: Ross Lagerwall Subject: [Xen-devel] [PATCH 1/3] Don't accept fuzz when patching X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP When testing and applying patches, set fuzz=0 so that patches must apply exactly. Also set "-f" to avoid interactive questions, and reorder so that patches are tested before the output directory is created. Signed-off-by: Ross Lagerwall Reviewed-by: Konrad Rzeszutek Wilk --- livepatch-build | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/livepatch-build b/livepatch-build index a49e0d4..8dc8889 100755 --- a/livepatch-build +++ b/livepatch-build @@ -257,23 +257,22 @@ echo if [ "${SKIP}" != "build" ]; then [ -e "${OUTPUT}" ] && die "Output directory exists" - mkdir -p "${OUTPUT}" || die - - echo "Testing patch file..." cd "$SRCDIR" || die - patch -s -N -p1 --dry-run < "$PATCHFILE" || die "source patch file failed to apply" + patch -s -N -p1 -f --fuzz=0 --dry-run < "$PATCHFILE" || die "Source patch file failed to apply" + + mkdir -p "${OUTPUT}" || die echo "Perform full initial build with ${CPUS} CPU(s)..." build_full echo "Apply patch and build with ${CPUS} CPU(s)..." cd "$SRCDIR" || die - patch -s -N -p1 < "$PATCHFILE" || die + patch -s -N -p1 -f --fuzz=0 < "$PATCHFILE" || die build_special patched echo "Unapply patch and build with ${CPUS} CPU(s)..." cd "$SRCDIR" || die - patch -s -R -p1 < "$PATCHFILE" || die + patch -s -R -p1 -f --fuzz=0 < "$PATCHFILE" || die build_special original fi