All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] scripts: buildtar fix build w/o modules
@ 2016-08-16 13:35 Dmitry Monakhov
  2016-08-16 13:35 ` [PATCH 2/2] scripts: buildtar use parallel compress if available Dmitry Monakhov
  2016-08-16 21:10 ` [PATCH 1/2] scripts: buildtar fix build w/o modules Jim Davis
  0 siblings, 2 replies; 6+ messages in thread
From: Dmitry Monakhov @ 2016-08-16 13:35 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Dmitry Monakhov

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(-)

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}"
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] scripts: buildtar use parallel compress if available
  2016-08-16 13:35 [PATCH 1/2] scripts: buildtar fix build w/o modules Dmitry Monakhov
@ 2016-08-16 13:35 ` Dmitry Monakhov
  2016-08-16 20:06   ` Jim Davis
  2016-08-16 21:10 ` [PATCH 1/2] scripts: buildtar fix build w/o modules Jim Davis
  1 sibling, 1 reply; 6+ messages in thread
From: Dmitry Monakhov @ 2016-08-16 13:35 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Dmitry Monakhov

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
 scripts/package/buildtar | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index c64e6eb..d0d790f 100755
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -29,14 +29,17 @@ case "${1}" in
 		;;
 	targz-pkg)
 		compress="gzip"
+		type pigz >/dev/null 2>&1 && compress="pigz"
 		file_ext=".gz"
 		;;
 	tarbz2-pkg)
 		compress="bzip2"
+		type lbzip2 >/dev/null 2>&1 && compress="lbzip2"
 		file_ext=".bz2"
 		;;
 	tarxz-pkg)
 		compress="xz"
+		type pxz >/dev/null 2>&1 && compress="pxz"
 		file_ext=".xz"
 		;;
 	*)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] scripts: buildtar use parallel compress if available
  2016-08-16 13:35 ` [PATCH 2/2] scripts: buildtar use parallel compress if available Dmitry Monakhov
@ 2016-08-16 20:06   ` Jim Davis
  2016-08-16 21:34     ` Dmitry Monakhov
  0 siblings, 1 reply; 6+ messages in thread
From: Jim Davis @ 2016-08-16 20:06 UTC (permalink / raw)
  To: Dmitry Monakhov; +Cc: linux-kbuild

On Tue, Aug 16, 2016 at 6:35 AM, Dmitry Monakhov <dmonakhov@openvz.org> wrote:

> +               type pigz >/dev/null 2>&1 && compress="pigz"

Isn't the "type" builtin a feature of the bash shell?  The buildtar
script won't necessarily be executed by bash.

-- 
Jim

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] scripts: buildtar fix build w/o modules
  2016-08-16 13:35 [PATCH 1/2] scripts: buildtar fix build w/o modules Dmitry Monakhov
  2016-08-16 13:35 ` [PATCH 2/2] scripts: buildtar use parallel compress if available Dmitry Monakhov
@ 2016-08-16 21:10 ` Jim Davis
  2016-08-16 21:37   ` Dmitry Monakhov
  1 sibling, 1 reply; 6+ messages in thread
From: Jim Davis @ 2016-08-16 21:10 UTC (permalink / raw)
  To: Dmitry Monakhov; +Cc: linux-kbuild

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] scripts: buildtar use parallel compress if available
  2016-08-16 20:06   ` Jim Davis
@ 2016-08-16 21:34     ` Dmitry Monakhov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Monakhov @ 2016-08-16 21:34 UTC (permalink / raw)
  To: Jim Davis; +Cc: linux-kbuild

[-- Attachment #1: Type: text/plain, Size: 409 bytes --]

Jim Davis <jim.epost@gmail.com> writes:

> On Tue, Aug 16, 2016 at 6:35 AM, Dmitry Monakhov <dmonakhov@openvz.org> wrote:
>
>> +               type pigz >/dev/null 2>&1 && compress="pigz"
>
> Isn't the "type" builtin a feature of the bash shell?  The buildtar
> script won't necessarily be executed by bash.
Yes, you are right.  Let's use '/usr/bin/which'. I'll resend new version. 
>
> -- 
> Jim

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] scripts: buildtar fix build w/o modules
  2016-08-16 21:10 ` [PATCH 1/2] scripts: buildtar fix build w/o modules Jim Davis
@ 2016-08-16 21:37   ` Dmitry Monakhov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Monakhov @ 2016-08-16 21:37 UTC (permalink / raw)
  To: Jim Davis; +Cc: linux-kbuild

[-- Attachment #1: Type: text/plain, Size: 1071 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-08-16 21:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-16 13:35 [PATCH 1/2] scripts: buildtar fix build w/o modules Dmitry Monakhov
2016-08-16 13:35 ` [PATCH 2/2] scripts: buildtar use parallel compress if available Dmitry Monakhov
2016-08-16 20:06   ` Jim Davis
2016-08-16 21:34     ` Dmitry Monakhov
2016-08-16 21:10 ` [PATCH 1/2] scripts: buildtar fix build w/o modules Jim Davis
2016-08-16 21:37   ` Dmitry Monakhov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.