Commit c7eb3a7a1790e0a3a063b4183894d0d63ffee431
1 parent
a765a7ce29
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
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>
Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff
scripts/package/buildtar
... | ... | @@ -125,12 +125,11 @@ |
125 | 125 | # Create the tarball |
126 | 126 | # |
127 | 127 | ( |
128 | - cd "${tmpdir}" | |
129 | 128 | opts= |
130 | 129 | if tar --owner=root --group=root --help >/dev/null 2>&1; then |
131 | 130 | opts="--owner=root --group=root" |
132 | 131 | fi |
133 | - tar cf - boot/* lib/* $opts | ${compress} > "${tarball}${file_ext}" | |
132 | + tar cf - -C "$tmpdir" boot/ lib/ $opts | ${compress} > "${tarball}${file_ext}" | |
134 | 133 | ) |
135 | 134 | |
136 | 135 | echo "Tarball successfully created in ${tarball}${file_ext}" |