From patchwork Mon Apr 8 08:32:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wieczorkiewicz, Pawel" X-Patchwork-Id: 10889035 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 39DC0139A for ; Mon, 8 Apr 2019 08:59:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21FE528414 for ; Mon, 8 Apr 2019 08:59:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 157C528630; Mon, 8 Apr 2019 08:59:25 +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,DKIM_ADSP_ALL, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,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 AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BB47E28414 for ; Mon, 8 Apr 2019 08:59:24 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hDQ5W-0004wt-DA; Mon, 08 Apr 2019 08:57:10 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hDQ5V-0004wo-9D for xen-devel@lists.xen.org; Mon, 08 Apr 2019 08:57:09 +0000 X-Inumbo-ID: 49c26b26-59dc-11e9-b83b-ab0784f4acb5 Received: from smtp-fw-9102.amazon.com (unknown [207.171.184.29]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 49c26b26-59dc-11e9-b83b-ab0784f4acb5; Mon, 08 Apr 2019 08:57:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1554713828; x=1586249828; h=from:to:cc:subject:date:message-id:mime-version; bh=gMa2Gtx4rS5BNTBrJtnX6EgyYNiBWmPuPBq8/pKN4mY=; b=JsnCy18dnam1o7CsFUffvgdGNzjXZm3Z82gGOZ2559rXO2VVaSL2xU+w B5riEixd8EuXWQIvFuMgH2l/n3NNaN99DVIfJS2iF/tMMrmnVCkhFvTYj bHE6ppV3WmkiZ6p3i8wkOEzTbp8YtxfISPHUvMqBpzMv44cYJ0w5NHXtX o=; X-IronPort-AV: E=Sophos;i="5.60,324,1549929600"; d="scan'208";a="670468171" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-1a-715bee71.us-east-1.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Apr 2019 08:32:45 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1a-715bee71.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id x388Wfek122448 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 8 Apr 2019 08:32:43 GMT Received: from EX13D05EUC003.ant.amazon.com (10.43.164.207) by EX13MTAUEA001.ant.amazon.com (10.43.61.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 8 Apr 2019 08:32:43 +0000 Received: from EX13MTAUEB001.ant.amazon.com (10.43.60.96) by EX13D05EUC003.ant.amazon.com (10.43.164.207) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 8 Apr 2019 08:32:42 +0000 Received: from dev-dsk-wipawel-1a-0c4e6d58.eu-west-1.amazon.com (10.4.134.33) by mail-relay.amazon.com (10.43.60.129) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 8 Apr 2019 08:32:41 +0000 From: Pawel Wieczorkiewicz To: Date: Mon, 8 Apr 2019 08:32:21 +0000 Message-ID: <20190408083224.104802-1-wipawel@amazon.de> X-Mailer: git-send-email 2.16.5 MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [livepatch-build-tools 1/4] livepatch-gcc: Allow toolchain command with versions X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: mpohlack@amazon.de, ross.lagerwall@citrix.com, Pawel Wieczorkiewicz , konrad.wilk@oracle.com Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Xen build system may enforce particular gcc version (e.g. gcc72). Make sure the livepatch-gcc script accepts all input toolchain gcc commands with or without version specified. Signed-off-by: Pawel Wieczorkiewicz Reviewed-by: Martin Mazein Reviewed-by: Bjoern Doebel Reviewed-by: Ross Lagerwall --- livepatch-gcc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/livepatch-gcc b/livepatch-gcc index 634157a..617f865 100755 --- a/livepatch-gcc +++ b/livepatch-gcc @@ -25,7 +25,8 @@ shift declare -a args=("$@") keep=no -if [[ "$TOOLCHAINCMD" = "gcc" ]] ; then +declare -r GCC_RE='gcc.*' +if [[ "$TOOLCHAINCMD" =~ $GCC_RE ]] ; then while [ "$#" -gt 0 ]; do if [ "$1" = "-o" ]; then obj=$2 From patchwork Mon Apr 8 08:32:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wieczorkiewicz, Pawel" X-Patchwork-Id: 10888983 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3045F17EF for ; Mon, 8 Apr 2019 08:34:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19EBD26E69 for ; Mon, 8 Apr 2019 08:34:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E0E527F90; Mon, 8 Apr 2019 08:34:58 +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,DKIM_ADSP_ALL, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,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 AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0678C26E69 for ; Mon, 8 Apr 2019 08:34:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hDPi1-00034E-Tl; Mon, 08 Apr 2019 08:32:53 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hDPi0-000348-If for xen-devel@lists.xen.org; Mon, 08 Apr 2019 08:32:52 +0000 X-Inumbo-ID: e3ab248e-59d8-11e9-9183-ab76d8c7835b Received: from smtp-fw-6002.amazon.com (unknown [52.95.49.90]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e3ab248e-59d8-11e9-9183-ab76d8c7835b; Mon, 08 Apr 2019 08:32:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1554712368; x=1586248368; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=ZvAuf2ypdIpJxn8B8vFfr2CqyXPhOOcUIpHkBjoay00=; b=L/Tp7fXSJWzR+tnrW5yNI7a4W2cZZCzGjiSexGGscXGA/FT0bLlCDvkS lw39/bVHFXhOGr6y7SJAGva2jdGoj60Eq5juuzZpOZ4ze48hPVGucaxhl 4Q3kOK2l20/nzvkufWpkXEvHJTnOCJVpkC4vR8XvNvjqqOwRjcDm/7jvc Q=; X-IronPort-AV: E=Sophos;i="5.60,324,1549929600"; d="scan'208";a="395344106" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1e-a70de69e.us-east-1.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Apr 2019 08:32:46 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1e-a70de69e.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id x388WjPC054996 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 8 Apr 2019 08:32:45 GMT Received: from EX13D03EUC004.ant.amazon.com (10.43.164.33) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 8 Apr 2019 08:32:45 +0000 Received: from EX13MTAUEB001.ant.amazon.com (10.43.60.96) by EX13D03EUC004.ant.amazon.com (10.43.164.33) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 8 Apr 2019 08:32:44 +0000 Received: from dev-dsk-wipawel-1a-0c4e6d58.eu-west-1.amazon.com (10.4.134.33) by mail-relay.amazon.com (10.43.60.129) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 8 Apr 2019 08:32:42 +0000 From: Pawel Wieczorkiewicz To: Date: Mon, 8 Apr 2019 08:32:22 +0000 Message-ID: <20190408083224.104802-2-wipawel@amazon.de> X-Mailer: git-send-email 2.16.5 In-Reply-To: <20190408083224.104802-1-wipawel@amazon.de> References: <20190408083224.104802-1-wipawel@amazon.de> MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [livepatch-build-tools 2/4] livepatch-gcc: Ignore built_in.o and prelink.o object files X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: mpohlack@amazon.de, ross.lagerwall@citrix.com, Pawel Wieczorkiewicz , konrad.wilk@oracle.com Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Do not copy over the built_in.o and prelink.o object files when they get rebuilt as they are used for transient linking by Xen's build system. Signed-off-by: Pawel Wieczorkiewicz Reviewed-by: Martin Pohlack Reviewed-by: Petre Eftime Reviewed-by: Ross Lagerwall --- livepatch-gcc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/livepatch-gcc b/livepatch-gcc index 617f865..01e4b8c 100755 --- a/livepatch-gcc +++ b/livepatch-gcc @@ -35,6 +35,8 @@ if [[ "$TOOLCHAINCMD" =~ $GCC_RE ]] ; then version.o|\ debug.o|\ *.xen-syms.*.o|\ + built_in.o|\ + prelink.o|\ .*.o) break ;; From patchwork Mon Apr 8 08:32:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wieczorkiewicz, Pawel" X-Patchwork-Id: 10888987 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F310C14DB for ; Mon, 8 Apr 2019 08:34:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD3FD27F10 for ; Mon, 8 Apr 2019 08:34:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D17FD27FA1; Mon, 8 Apr 2019 08:34:59 +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,DKIM_ADSP_ALL, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,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 AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 55BE827F10 for ; Mon, 8 Apr 2019 08:34:58 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hDPi3-00034O-67; Mon, 08 Apr 2019 08:32:55 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hDPi1-00034D-Sl for xen-devel@lists.xen.org; Mon, 08 Apr 2019 08:32:53 +0000 X-Inumbo-ID: e684d510-59d8-11e9-be58-b38b6b2feea9 Received: from smtp-fw-6002.amazon.com (unknown [52.95.49.90]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e684d510-59d8-11e9-be58-b38b6b2feea9; Mon, 08 Apr 2019 08:32:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1554712372; x=1586248372; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=OdwuAO6JOVlKNjc+eYxwAklQl7KXdifIF1i35CsFSas=; b=fPKhwcFIdKJavOA91VE28Q/5D2X2NpTV+44DFxjJVWKlvTeqD+G3whoQ zo3Hi41LZYZ6rDLlOKk872GHZWn/o72DbxcrPlrSAzRyB+Ih8wp9180rJ GaZOW02yZRakODeaWjcnczClrfI4cSJvWwrd7E77+07MFUhvCtF7lsra7 k=; X-IronPort-AV: E=Sophos;i="5.60,324,1549929600"; d="scan'208";a="395344115" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1a-e34f1ddc.us-east-1.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Apr 2019 08:32:47 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1a-e34f1ddc.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id x388WiO5125891 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 8 Apr 2019 08:32:47 GMT Received: from EX13D03EUA002.ant.amazon.com (10.43.165.166) by EX13MTAUEA001.ant.amazon.com (10.43.61.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 8 Apr 2019 08:32:46 +0000 Received: from EX13MTAUEB001.ant.amazon.com (10.43.60.96) by EX13D03EUA002.ant.amazon.com (10.43.165.166) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 8 Apr 2019 08:32:45 +0000 Received: from dev-dsk-wipawel-1a-0c4e6d58.eu-west-1.amazon.com (10.4.134.33) by mail-relay.amazon.com (10.43.60.129) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 8 Apr 2019 08:32:44 +0000 From: Pawel Wieczorkiewicz To: Date: Mon, 8 Apr 2019 08:32:23 +0000 Message-ID: <20190408083224.104802-3-wipawel@amazon.de> X-Mailer: git-send-email 2.16.5 In-Reply-To: <20190408083224.104802-1-wipawel@amazon.de> References: <20190408083224.104802-1-wipawel@amazon.de> MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [livepatch-build-tools 3/4] livepatch-build: Do not follow every symlink for patch file X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: mpohlack@amazon.de, ross.lagerwall@citrix.com, Pawel Wieczorkiewicz , konrad.wilk@oracle.com Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP In some build systems symlinks might be used for patch file names to point from target directories to actual patches. Following those symlinks breaks naming convention as the resulting built modules would be named after the actual hardlink insteads of the symlink. Livepatch-build obtains hotpatch name from the patch file, so it should not canonicalize the file path resolving all the symlinks to not lose the original symlink name. Signed-off-by: Pawel Wieczorkiewicz Reviewed-by: Martin Pohlack Reviewed-by: Bjoern Doebel Reviewed-by: Norbert Manthey Reviewed-by: Ross Lagerwall --- livepatch-build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/livepatch-build b/livepatch-build index c057fa1..796838c 100755 --- a/livepatch-build +++ b/livepatch-build @@ -265,7 +265,9 @@ done [ -z "$DEPENDS" ] && die "Build-id dependency not given" SRCDIR="$(readlink -m -- "$srcarg")" -PATCHFILE="$(readlink -m -- "$patcharg")" +# We need an absolute path because we move around, but we need to +# retain the name of the symlink (= realpath -s) +PATCHFILE="$(readlink -f "$(dirname "$patcharg")")/$(basename "$patcharg")" CONFIGFILE="$(readlink -m -- "$configarg")" OUTPUT="$(readlink -m -- "$outputarg")" From patchwork Mon Apr 8 08:32:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wieczorkiewicz, Pawel" X-Patchwork-Id: 10888985 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C2B5714DB for ; Mon, 8 Apr 2019 08:34:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADA1F26E69 for ; Mon, 8 Apr 2019 08:34:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1B0827FA9; Mon, 8 Apr 2019 08:34:58 +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,DKIM_ADSP_ALL, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,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 AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4E70726E69 for ; Mon, 8 Apr 2019 08:34:58 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hDPiD-00035S-FX; Mon, 08 Apr 2019 08:33:05 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hDPiC-00035G-8y for xen-devel@lists.xen.org; Mon, 08 Apr 2019 08:33:04 +0000 X-Inumbo-ID: ec34bff2-59d8-11e9-8e2c-fffd6837be56 Received: from smtp-fw-33001.amazon.com (unknown [207.171.190.10]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id ec34bff2-59d8-11e9-8e2c-fffd6837be56; Mon, 08 Apr 2019 08:33:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1554712382; x=1586248382; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=PiRQXrNLUBQPxAnEfwwT0puIXq/IZ541l7gyaiO8/jA=; b=dSVs3g3i9g2+8dZMRXXDhhMzvk+wPGOgUAj+Rf5wd2/kyPK+aYdgrouG In57i212Yw9DfNazGLELbnX9cAVrYVFQp5rhGW06npzFIt02VlMc/4Et0 FqbFMBvE6AHQCxO6+wysveIsd5o23VDtzxvzPBd2/KGrJJYEGeLEsDiM+ Q=; X-IronPort-AV: E=Sophos;i="5.60,324,1549929600"; d="scan'208";a="792856359" Received: from sea3-co-svc-lb6-vlan2.sea.amazon.com (HELO email-inbound-relay-1a-807d4a99.us-east-1.amazon.com) ([10.47.22.34]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Apr 2019 08:32:52 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1a-807d4a99.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id x388Wllv053904 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 8 Apr 2019 08:32:48 GMT Received: from EX13D03EUC003.ant.amazon.com (10.43.164.192) by EX13MTAUEA001.ant.amazon.com (10.43.61.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 8 Apr 2019 08:32:48 +0000 Received: from EX13MTAUEB001.ant.amazon.com (10.43.60.96) by EX13D03EUC003.ant.amazon.com (10.43.164.192) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 8 Apr 2019 08:32:47 +0000 Received: from dev-dsk-wipawel-1a-0c4e6d58.eu-west-1.amazon.com (10.4.134.33) by mail-relay.amazon.com (10.43.60.129) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 8 Apr 2019 08:32:46 +0000 From: Pawel Wieczorkiewicz To: Date: Mon, 8 Apr 2019 08:32:24 +0000 Message-ID: <20190408083224.104802-4-wipawel@amazon.de> X-Mailer: git-send-email 2.16.5 In-Reply-To: <20190408083224.104802-1-wipawel@amazon.de> References: <20190408083224.104802-1-wipawel@amazon.de> MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [livepatch-build-tools 4/4] livepatch-build: Handle newly created object files X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: mpohlack@amazon.de, ross.lagerwall@citrix.com, Pawel Wieczorkiewicz , konrad.wilk@oracle.com Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Up to now the livepatch-build ignores newly created object files. When patch applies new .c file and augments its Makefile to build it the resulting object file is not taken into account for final linking step. Such newly created object files can be detected by comparing patched/ and original/ directories and copied over to the output directory for the final linking step. Signed-off-by: Pawel Wieczorkiewicz Reviewed-by: Andra-Irina Paraschiv Reviewed-by: Bjoern Doebel Reviewed-by: Norbert Manthey --- livepatch-build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/livepatch-build b/livepatch-build index 796838c..b43730c 100755 --- a/livepatch-build +++ b/livepatch-build @@ -146,6 +146,12 @@ function create_patch() fi done + NEW_FILES=$(comm -23 <(find patched -type f -name '*.o' | cut -f2- -d'/' | sort -u) <(find original -type f -name '*.o' | cut -f2- -d'/' | sort -u)) + for i in $NEW_FILES; do + cp "patched/$i" "output/$i" + CHANGED=1 + done + if [[ $ERROR -ne 0 ]]; then die "$ERROR error(s) encountered" fi