From: Pawel Wieczorkiewicz <wipawel@amazon.de>
To: xen-devel@lists.xen.org
Cc: mpohlack@amazon.de, ross.lagerwall@citrix.com,
Pawel Wieczorkiewicz <wipawel@amazon.de>,
konrad.wilk@oracle.com
Subject: [livepatch-build-tools 3/4] livepatch-build: Do not follow every symlink for patch file
Date: Mon, 8 Apr 2019 08:32:23 +0000 [thread overview]
Message-ID: <20190408083224.104802-3-wipawel@amazon.de> (raw)
In-Reply-To: <20190408083224.104802-1-wipawel@amazon.de>
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 <wipawel@amazon.de>
Reviewed-by: Martin Pohlack <mpohlack@amazon.de>
Reviewed-by: Bjoern Doebel <doebel@amazon.de>
Reviewed-by: Norbert Manthey <nmanthey@amazon.de>
---
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")"
--
2.16.5
Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrer: Christian Schlaeger, Ralf Herbrich
Ust-ID: DE 289 237 879
Eingetragen am Amtsgericht Charlottenburg HRB 149173 B
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-04-08 8:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 8:32 [livepatch-build-tools 1/4] livepatch-gcc: Allow toolchain command with versions Pawel Wieczorkiewicz
2019-04-08 8:32 ` [livepatch-build-tools 2/4] livepatch-gcc: Ignore built_in.o and prelink.o object files Pawel Wieczorkiewicz
2019-04-29 12:27 ` Ross Lagerwall
2019-04-08 8:32 ` Pawel Wieczorkiewicz [this message]
2019-04-29 12:40 ` [livepatch-build-tools 3/4] livepatch-build: Do not follow every symlink for patch file Ross Lagerwall
2019-04-29 15:24 ` Wieczorkiewicz, Pawel
2019-04-08 8:32 ` [livepatch-build-tools 4/4] livepatch-build: Handle newly created object files Pawel Wieczorkiewicz
2019-04-29 12:53 ` Andrew Cooper
2019-04-29 13:53 ` Ross Lagerwall
2019-04-29 13:53 ` Ross Lagerwall
2019-04-29 15:43 ` Wieczorkiewicz, Pawel
2019-04-29 12:27 ` [livepatch-build-tools 1/4] livepatch-gcc: Allow toolchain command with versions Ross Lagerwall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190408083224.104802-3-wipawel@amazon.de \
--to=wipawel@amazon.de \
--cc=konrad.wilk@oracle.com \
--cc=mpohlack@amazon.de \
--cc=ross.lagerwall@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).