linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: Add make dir-pkg build option
@ 2019-10-09 15:10 Matteo Croce
  2019-11-03 15:11 ` Matteo Croce
  0 siblings, 1 reply; 3+ messages in thread
From: Matteo Croce @ 2019-10-09 15:10 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel

Add a 'dir-pkg' target which just creates the same directory structures
as in tar-pkg, but doesn't package anything.
Useful when the user wants to copy the kernel tree on a machine using
ssh, rsync or whatever.

Signed-off-by: Matteo Croce <mcroce@redhat.com>
---
 scripts/Makefile.package | 3 ++-
 scripts/package/buildtar | 9 +++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/scripts/Makefile.package b/scripts/Makefile.package
index 56eadcc48d46..36600ad1d5e6 100644
--- a/scripts/Makefile.package
+++ b/scripts/Makefile.package
@@ -103,7 +103,7 @@ snap-pkg:
 
 # tarball targets
 # ---------------------------------------------------------------------------
-tar-pkgs := tar-pkg targz-pkg tarbz2-pkg tarxz-pkg
+tar-pkgs := dir-pkg tar-pkg targz-pkg tarbz2-pkg tarxz-pkg
 PHONY += $(tar-pkgs)
 $(tar-pkgs):
 	$(MAKE) -f $(srctree)/Makefile
@@ -147,6 +147,7 @@ help:
 	@echo '  deb-pkg             - Build both source and binary deb kernel packages'
 	@echo '  bindeb-pkg          - Build only the binary kernel deb package'
 	@echo '  snap-pkg            - Build only the binary kernel snap package (will connect to external hosts)'
+	@echo '  dir-pkg             - Build the kernel as a plain directory structure'
 	@echo '  tar-pkg             - Build the kernel as an uncompressed tarball'
 	@echo '  targz-pkg           - Build the kernel as a gzip compressed tarball'
 	@echo '  tarbz2-pkg          - Build the kernel as a bzip2 compressed tarball'
diff --git a/scripts/package/buildtar b/scripts/package/buildtar
index 2f66c81e4021..ca283079f652 100755
--- a/scripts/package/buildtar
+++ b/scripts/package/buildtar
@@ -2,7 +2,7 @@
 # SPDX-License-Identifier: GPL-2.0
 
 #
-# buildtar 0.0.4
+# buildtar 0.0.5
 #
 # (C) 2004-2006 by Jan-Benedict Glaw <jbglaw@lug-owl.de>
 #
@@ -24,7 +24,7 @@ tarball="${objtree}/linux-${KERNELRELEASE}-${ARCH}.tar"
 # Figure out how to compress, if requested at all
 #
 case "${1}" in
-	tar-pkg)
+	dir-pkg|tar-pkg)
 		opts=
 		;;
 	targz-pkg)
@@ -133,6 +133,11 @@ if tar --owner=root --group=root --help >/dev/null 2>&1; then
 	opts="$opts --owner=root --group=root"
 fi
 
+if [ "${1}" = dir-pkg ]; then
+	echo "Kernel tree successfully created in $tmpdir"
+	exit 0
+fi
+
 tar cf $tarball -C $tmpdir $opts $dirs
 
 echo "Tarball successfully created in $tarball"
-- 
2.21.0


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

* Re: [PATCH] kbuild: Add make dir-pkg build option
  2019-10-09 15:10 [PATCH] kbuild: Add make dir-pkg build option Matteo Croce
@ 2019-11-03 15:11 ` Matteo Croce
  2019-11-04  1:51   ` Masahiro Yamada
  0 siblings, 1 reply; 3+ messages in thread
From: Matteo Croce @ 2019-11-03 15:11 UTC (permalink / raw)
  To: Linux Kbuild mailing list; +Cc: Masahiro Yamada, Michal Marek, LKML

On Wed, Oct 9, 2019 at 5:10 PM Matteo Croce <mcroce@redhat.com> wrote:
>
> Add a 'dir-pkg' target which just creates the same directory structures
> as in tar-pkg, but doesn't package anything.
> Useful when the user wants to copy the kernel tree on a machine using
> ssh, rsync or whatever.
>
> Signed-off-by: Matteo Croce <mcroce@redhat.com>

Hi,

any comment on this?

-- 
Matteo Croce
per aspera ad upstream


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

* Re: [PATCH] kbuild: Add make dir-pkg build option
  2019-11-03 15:11 ` Matteo Croce
@ 2019-11-04  1:51   ` Masahiro Yamada
  0 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2019-11-04  1:51 UTC (permalink / raw)
  To: Matteo Croce; +Cc: Linux Kbuild mailing list, Michal Marek, LKML

On Mon, Nov 4, 2019 at 12:11 AM Matteo Croce <mcroce@redhat.com> wrote:
>
> On Wed, Oct 9, 2019 at 5:10 PM Matteo Croce <mcroce@redhat.com> wrote:
> >
> > Add a 'dir-pkg' target which just creates the same directory structures
> > as in tar-pkg, but doesn't package anything.
> > Useful when the user wants to copy the kernel tree on a machine using
> > ssh, rsync or whatever.
> >
> > Signed-off-by: Matteo Croce <mcroce@redhat.com>
>
> Hi,
>
> any comment on this?
>


Sorry for the late reply.
One nit.


> @@ -133,6 +133,11 @@ if tar --owner=root --group=root --help >/dev/null 2>&1; then
>         opts="$opts --owner=root --group=root"
>  fi
>
> +if [ "${1}" = dir-pkg ]; then
> +       echo "Kernel tree successfully created in $tmpdir"
> +       exit 0
> +fi
> +

The 'opts' assignment is unneeded for dir-pkg.
You can exit before the "# Create the tarball" comment line.






-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2019-11-04  1:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09 15:10 [PATCH] kbuild: Add make dir-pkg build option Matteo Croce
2019-11-03 15:11 ` Matteo Croce
2019-11-04  1:51   ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).