* [PATCH] Kbuild-Packaging: Create tarballs
@ 2005-05-24 9:27 Jan-Benedict Glaw
2005-05-29 15:16 ` Sam Ravnborg
2005-07-13 17:09 ` Sam Ravnborg
0 siblings, 2 replies; 4+ messages in thread
From: Jan-Benedict Glaw @ 2005-05-24 9:27 UTC (permalink / raw)
To: sam; +Cc: linux-kernel
Hi Sam!
I propose this patch for ./scripts/packag/ . It adds tarball packaging,
which I prefer for distribution. Also one of the two blanks after @echo
is removed. One seems to be enough :)
Signed-off-by: Jan-Benedict Glaw <jbglaw@lug-owl.de>
---
scripts/package/Makefile | 19 ++++++-
scripts/package/buildtar | 111 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 127 insertions(+), 3 deletions(-)
--- linux-2.6.12-rc4-git7/scripts/package/Makefile Wed Mar 2 08:38:11 2005
+++ linux-tarball/scripts/package/Makefile Tue May 24 11:04:41 2005
@@ -80,10 +80,23 @@ deb-pkg:
clean-dirs += $(objtree)/debian/
+# tarball targets
+# ---------------------------------------------------------------------------
+.PHONY: tar%pkg
+tar%pkg:
+ $(MAKE)
+ $(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@
+
+clean-dirs += $(objtree)/tar-install/
+
+
# Help text displayed when executing 'make help'
# ---------------------------------------------------------------------------
help:
- @echo ' rpm-pkg - Build the kernel as an RPM package'
- @echo ' binrpm-pkg - Build an rpm package containing the compiled kernel & modules'
- @echo ' deb-pkg - Build the kernel as an deb package'
+ @echo ' rpm-pkg - Build the kernel as an RPM package'
+ @echo ' binrpm-pkg - Build an rpm package containing the compiled kernel & modules'
+ @echo ' deb-pkg - Build the kernel as an deb package'
+ @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'
--- linux-2.6.12-rc4-git7/scripts/package/buildtar Thu Jan 1 01:00:00 1970
+++ linux-tarball/scripts/package/buildtar Tue May 24 10:58:51 2005
@@ -0,0 +1,111 @@
+#!/bin/sh
+
+#
+# buildtar 0.0.3
+#
+# (C) 2004-2005 by Jan-Benedict Glaw <jbglaw@lug-owl.de>
+#
+# This script is used to compile a tarball from the currently
+# prepared kernel. Based upon the builddeb script from
+# Wichert Akkerman <wichert@wiggy.net>.
+#
+
+set -e
+
+#
+# Some variables and settings used throughout the script
+#
+version="${VERSION}.${PATCHLEVEL}.${SUBLEVEL}${EXTRAVERSION}${EXTRANAME}"
+tmpdir="${objtree}/tar-install"
+tarball="${objtree}/linux-${version}.tar"
+
+
+#
+# Figure out how to compress, if requested at all
+#
+case "${1}" in
+ tar-pkg)
+ compress="cat"
+ file_ext=""
+ ;;
+ targz-pkg)
+ compress="gzip -c9"
+ file_ext=".gz"
+ ;;
+ tarbz2-pkg)
+ compress="bzip2 -c9"
+ file_ext=".bz2"
+ ;;
+ *)
+ echo "Unknown tarball target \"${1}\" requested, please add it to ${0}." >&2
+ exit 1
+ ;;
+esac
+
+
+#
+# Clean-up and re-create the temporary directory
+#
+rm -rf -- "${tmpdir}"
+mkdir -p -- "${tmpdir}/boot"
+
+
+#
+# Try to install modules
+#
+if ! make INSTALL_MOD_PATH="${tmpdir}" modules_install; then
+ echo "" >&2
+ echo "Ignoring error at module_install time, since that could be" >&2
+ echo "a result of missing local modutils/module-init-tools," >&2
+ echo "or you just didn't compile in module support at all..." >&2
+ echo "" >&2
+fi
+
+
+#
+# Install basic kernel files
+#
+cp -v -- System.map "${tmpdir}/boot/System.map-${version}"
+cp -v -- .config "${tmpdir}/boot/config-${version}"
+cp -v -- vmlinux "${tmpdir}/boot/vmlinux-${version}"
+
+
+#
+# Install arch-specific kernel image(s)
+#
+case "${ARCH}" in
+ i386)
+ [ -f arch/i386/boot/bzImage ] && cp -v -- arch/i386/boot/bzImage "${tmpdir}/boot/vmlinuz-${version}"
+ ;;
+ alpha)
+ [ -f arch/alpha/boot/vmlinux.gz ] && cp -v -- arch/alpha/boot/vmlinux.gz "${tmpdir}/boot/vmlinuz-${version}"
+ ;;
+ vax)
+ [ -f vmlinux.SYS ] && cp -v -- vmlinux.SYS "${tmpdir}/boot/vmlinux-${version}.SYS"
+ [ -f vmlinux.dsk ] && cp -v -- vmlinux.dsk "${tmpdir}/boot/vmlinux-${version}.dsk"
+ ;;
+ *)
+ [ -f "${KBUILD_IMAGE}" ] && cp -v -- "${KBUILD_IMAGE}" "${tmpdir}/boot/vmlinux-kbuild-${version}"
+ echo "" >&2
+ echo '** ** ** WARNING ** ** **' >&2
+ echo "" >&2
+ echo "Your architecture did not define any architecture-dependant files" >&2
+ echo "to be placed into the tarball. Please add those to ${0} ..." >&2
+ echo "" >&2
+ sleep 5
+ ;;
+esac
+
+
+#
+# Create the tarball
+#
+(
+ cd "${tmpdir}"
+ tar cf - . | ${compress} > "${tarball}${file_ext}"
+)
+
+echo "Tarball successfully created in ${tarball}${file_ext}"
+
+exit 0
+
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Kbuild-Packaging: Create tarballs
2005-05-24 9:27 [PATCH] Kbuild-Packaging: Create tarballs Jan-Benedict Glaw
@ 2005-05-29 15:16 ` Sam Ravnborg
2005-07-13 17:09 ` Sam Ravnborg
1 sibling, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2005-05-29 15:16 UTC (permalink / raw)
To: linux-kernel
On Tue, May 24, 2005 at 11:27:37AM +0200, Jan-Benedict Glaw wrote:
> Hi Sam!
>
> I propose this patch for ./scripts/packag/ . It adds tarball packaging,
> which I prefer for distribution. Also one of the two blanks after @echo
> is removed. One seems to be enough :)
Thanks for resending this old patch.
Will look into after -final is out.
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Kbuild-Packaging: Create tarballs
2005-05-24 9:27 [PATCH] Kbuild-Packaging: Create tarballs Jan-Benedict Glaw
2005-05-29 15:16 ` Sam Ravnborg
@ 2005-07-13 17:09 ` Sam Ravnborg
2005-07-13 17:29 ` Sam Ravnborg
1 sibling, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2005-07-13 17:09 UTC (permalink / raw)
To: linux-kernel
On Tue, May 24, 2005 at 11:27:37AM +0200, Jan-Benedict Glaw wrote:
> Hi Sam!
>
> I propose this patch for ./scripts/packag/ . It adds tarball packaging,
> which I prefer for distribution. Also one of the two blanks after @echo
> is removed. One seems to be enough :)
Applied after fixing MIME damage.
Thanks,
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Kbuild-Packaging: Create tarballs
2005-07-13 17:09 ` Sam Ravnborg
@ 2005-07-13 17:29 ` Sam Ravnborg
0 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2005-07-13 17:29 UTC (permalink / raw)
To: linux-kernel
On Wed, Jul 13, 2005 at 05:09:31PM +0000, Sam Ravnborg wrote:
> On Tue, May 24, 2005 at 11:27:37AM +0200, Jan-Benedict Glaw wrote:
> > Hi Sam!
> >
> > I propose this patch for ./scripts/packag/ . It adds tarball packaging,
> > which I prefer for distribution. Also one of the two blanks after @echo
> > is removed. One seems to be enough :)
>
> Applied after fixing MIME damage.
Hmm, that was my MTA that did it when I saved the patch.
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-07-13 15:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-24 9:27 [PATCH] Kbuild-Packaging: Create tarballs Jan-Benedict Glaw
2005-05-29 15:16 ` Sam Ravnborg
2005-07-13 17:09 ` Sam Ravnborg
2005-07-13 17:29 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®