Message ID | 1471354514-12323-1-git-send-email-dmonakhov@openvz.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Aug 16, 2016 at 6:35 AM, Dmitry Monakhov <dmonakhov@openvz.org> wrote: > If build configured w/o modules script fails because lib/ is not exit. "does not exist"? When I ran into this once before, it did seem the tar archive was fine. But it was disconcerting to see an error message, followed by buildtar claiming that the tarball was successfully created... > + tar cf - -C "$tmpdir" . $opts | ${compress} > "${tarball}${file_ext}" If, somehow, there are files in $tmpdir that aren't in /boot (or /lib) then this would put things in the tar archive that weren't there before the patch. I don't offhand see how that could happen, but a more conservative approach would be to test for /lib.
Jim Davis <jim.epost@gmail.com> writes: > On Tue, Aug 16, 2016 at 6:35 AM, Dmitry Monakhov <dmonakhov@openvz.org> wrote: >> If build configured w/o modules script fails because lib/ is not exit. > > "does not exist"? > > When I ran into this once before, it did seem the tar archive was > fine. But it was disconcerting to see an error message, followed by > buildtar claiming that the tarball was successfully created... > > >> + tar cf - -C "$tmpdir" . $opts | ${compress} > "${tarball}${file_ext}" > > If, somehow, there are files in $tmpdir that aren't in /boot (or /lib) > then this would put things in the tar archive that weren't there > before the patch. I don't offhand see how that could happen, but a > more conservative approach would be to test for /lib. $tmpdir dir was created by this script. So any files which in $tmpdir are definitely created with the purpose, and imho it it is reasonable to place it to tarball. But in order to be on a safe side let's preserve original behavior. I'll resend the patch. > > -- > Jim
diff --git a/scripts/package/buildtar b/scripts/package/buildtar index e046bff..c64e6eb 100755 --- a/scripts/package/buildtar +++ b/scripts/package/buildtar @@ -129,7 +129,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" . $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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)