From patchwork Wed Aug 21 08:20:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wieczorkiewicz, Pawel" X-Patchwork-Id: 11106053 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 67B001395 for ; Wed, 21 Aug 2019 08:22:48 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 44B262339F for ; Wed, 21 Aug 2019 08:22:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazon.de header.i=@amazon.de header.b="BDgOnt/7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 44B262339F Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i0Ls9-0001JZ-H4; Wed, 21 Aug 2019 08:21:37 +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 1i0Ls7-0001FH-8u for xen-devel@lists.xen.org; Wed, 21 Aug 2019 08:21:35 +0000 X-Inumbo-ID: abc3ae1e-c3ec-11e9-adc2-12813bfff9fa Received: from smtp-fw-9102.amazon.com (unknown [207.171.184.29]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id abc3ae1e-c3ec-11e9-adc2-12813bfff9fa; Wed, 21 Aug 2019 08:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1566375687; x=1597911687; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=yjHoo2p+vw3cgZRsjQ4lY3ttQjWxdvrgMGCB7ylyfAU=; b=BDgOnt/71FUxWw2bCVF+kJPfczCFG/PLMwK448UAogjs3SDRBKcDwWwg zGmyVJSLvPpdwzlZfZz3FXAT5IaJt3cjIOT8PapOC0jMfL3+fA1bqKk7H 0KunQFfpgNA5O7b7LSpI+byFqzuWemZIP6oqF+q3XKpkCvXkJNPxuJz73 s=; X-IronPort-AV: E=Sophos;i="5.64,412,1559520000"; d="scan'208";a="695968514" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-2a-8549039f.us-west-2.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 21 Aug 2019 08:21:26 +0000 Received: from EX13MTAUEA001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2a-8549039f.us-west-2.amazon.com (Postfix) with ESMTPS id 96A51A1BCD; Wed, 21 Aug 2019 08:21:26 +0000 (UTC) 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; Wed, 21 Aug 2019 08:21:10 +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; Wed, 21 Aug 2019 08:21:09 +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; Wed, 21 Aug 2019 08:21:08 +0000 From: Pawel Wieczorkiewicz To: Date: Wed, 21 Aug 2019 08:20:39 +0000 Message-ID: <20190821082056.91090-4-wipawel@amazon.de> X-Mailer: git-send-email 2.16.5 In-Reply-To: <20190821082056.91090-1-wipawel@amazon.de> References: <20190821082056.91090-1-wipawel@amazon.de> MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH 03/20] 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: wipawel@amazon.com, Konrad Rzeszutek Wilk , Andrew Cooper , Ross Lagerwall , mpohlack@amazon.com, Pawel Wieczorkiewicz Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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")"