summaryrefslogtreecommitdiff
path: root/scripts/package/buildtar
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2014-06-18 18:21:41 +0400
committerMichal Marek <mmarek@suse.cz>2014-06-18 19:34:59 +0400
commitc7eb3a7a1790e0a3a063b4183894d0d63ffee431 (patch)
tree6ae3488fc80205b76e5c937b16ad07f363ee4daf /scripts/package/buildtar
parenta765a7ce293aa0a072728790ce11088b2f7030e2 (diff)
downloadlinux-c7eb3a7a1790e0a3a063b4183894d0d63ffee431.tar.xz
kbuild: Fix tar-pkg with relative $(objtree)
Commit 7e1c0477 (kbuild: Use relative path for $(objtree)) assumes that the build process does not change its working directory. make tar-pkg was a couterexample, fix this by changing directory only for the tar command and not for the whole script, which at one point references the now relative $(objtree). Reported-and-tested-by: "J. Bruce Fields" <bfields@fieldses.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/package/buildtar')
-rw-r--r--scripts/package/buildtar3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index 995c1eafaff6..e046bff33589 100644
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -125,12 +125,11 @@ esac
# Create the tarball
#
(
- cd "${tmpdir}"
opts=
if tar --owner=root --group=root --help >/dev/null 2>&1; then
opts="--owner=root --group=root"
fi
- tar cf - boot/* lib/* $opts | ${compress} > "${tarball}${file_ext}"
+ tar cf - -C "$tmpdir" boot/ lib/ $opts | ${compress} > "${tarball}${file_ext}"
)
echo "Tarball successfully created in ${tarball}${file_ext}"