Message ID | 1471383577-18173-1-git-send-email-dmonakhov@openvz.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Aug 16, 2016 at 2:39 PM, Dmitry Monakhov <dmonakhov@openvz.org> wrote: > If build configured w/o modules script fails because lib/ is not exit. Tested-by: Jim Davis <jim.epost@gmail.com> (But tweaking "is not exit" in the commit message would still be a good idea.)
On Wed, Aug 17, 2016 at 3:19 PM, Jim Davis <jim.epost@gmail.com> wrote: > On Tue, Aug 16, 2016 at 2:39 PM, Dmitry Monakhov <dmonakhov@openvz.org> wrote: >> If build configured w/o modules script fails because lib/ is not exit. > > Tested-by: Jim Davis <jim.epost@gmail.com> But apparently not tested very well. My script ran the no-modules (no /lib) case and that worked just fine. But for the modules case, which I forgot to script, it oddly failed on my workstation with + tar cf - -C ./tar-install boot lib --owner=root --group=root + cat tar: boot lib: Cannot stat: No such file or directory I've gotta dash, but a quick 'n dirty change of "$tarball_dirs" to $tarball_dirs (no quotes) in the tar command line got by that. Not sure if that's just something weird in my test setup or not...
diff --git a/scripts/package/buildtar b/scripts/package/buildtar index e046bff..27a2ed3 100755 --- a/scripts/package/buildtar +++ b/scripts/package/buildtar @@ -17,7 +17,7 @@ set -e # tmpdir="${objtree}/tar-install" tarball="${objtree}/linux-${KERNELRELEASE}-${ARCH}.tar" - +tarball_dirs="boot" # # Figure out how to compress, if requested at all @@ -58,6 +58,7 @@ mkdir -p -- "${tmpdir}/boot" # if grep -q '^CONFIG_MODULES=y' "${objtree}/.config"; then make ARCH="${ARCH}" O="${objtree}" KBUILD_SRC= INSTALL_MOD_PATH="${tmpdir}" modules_install + tarball_dirs="${tarball_dirs} lib" fi @@ -129,7 +130,7 @@ esac if tar --owner=root --group=root --help >/dev/null 2>&1; then opts="--owner=root --group=root" fi - tar cf - -C "$tmpdir" boot/ lib/ $opts | ${compress} > "${tarball}${file_ext}" + tar cf - -C "$tmpdir" "$tarball_dirs" $opts | ${compress} > "${tarball}${file_ext}" ) echo "Tarball successfully created in ${tarball}${file_ext}"
If build configured w/o modules script fails because lib/ is not exit. Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> --- scripts/package/buildtar | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)