linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* debian packaging refinements
@ 2019-02-11 12:03 Enrico Weigelt, metux IT consult
  2019-02-11 12:03 ` [PATCH 1/3] Makefile: add kernelarch target for printing arch and localversion Enrico Weigelt, metux IT consult
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-02-11 12:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: michal.lkml, yamada.masahiro, linux-kbuild

Hi folks,

here're some small patches for making mkdebian a bit more flexible, so it
can be used eg. with an given debian/rules file.

I'm using this along w/ local (adding debian/rules and .config) in order
to build the kernel via usual debian toolchains (git-buildpackage,
git-buildpackage, ...) in a canonical way.

Didn't post the patch for debian/rules yet, as it's likely not suited for
mainline yet. (I can post it, if you wish).


--mtx


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

* [PATCH 1/3] Makefile: add kernelarch target for printing arch and localversion
  2019-02-11 12:03 debian packaging refinements Enrico Weigelt, metux IT consult
@ 2019-02-11 12:03 ` Enrico Weigelt, metux IT consult
  2019-02-11 12:03 ` [PATCH 2/3] scripts: mkdebian: allow renaming generated debian/rules Enrico Weigelt, metux IT consult
  2019-02-11 12:03 ` [PATCH 3/3] scripts: mkdebian: fix dependencies Enrico Weigelt, metux IT consult
  2 siblings, 0 replies; 4+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-02-11 12:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: michal.lkml, yamada.masahiro, linux-kbuild

trivial rule to print out the kernel arch and localversion, so
external tools, like distro packagers, can easily get it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Makefile b/Makefile
index 86cf35d..68c3e08 100644
--- a/Makefile
+++ b/Makefile
@@ -1664,6 +1664,12 @@ kernelrelease:
 kernelversion:
 	@echo $(KERNELVERSION)
 
+kernellocalversion:
+	@$(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree) | sed -e 's~^\-~~'
+
+kernelarch:
+	@echo $(ARCH)
+
 image_name:
 	@echo $(KBUILD_IMAGE)
 
-- 
1.9.1


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

* [PATCH 2/3] scripts: mkdebian: allow renaming generated debian/rules
  2019-02-11 12:03 debian packaging refinements Enrico Weigelt, metux IT consult
  2019-02-11 12:03 ` [PATCH 1/3] Makefile: add kernelarch target for printing arch and localversion Enrico Weigelt, metux IT consult
@ 2019-02-11 12:03 ` Enrico Weigelt, metux IT consult
  2019-02-11 12:03 ` [PATCH 3/3] scripts: mkdebian: fix dependencies Enrico Weigelt, metux IT consult
  2 siblings, 0 replies; 4+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-02-11 12:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: michal.lkml, yamada.masahiro, linux-kbuild

Add new environment variable KDEB_RULES for controlling where the
generated debian rules are written to. By defaults, it's debian/rules,
but packagers might override it for providing their own rules file.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 scripts/package/mkdebian | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index edcad61..ff226be 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -99,6 +99,9 @@ kernel_headers_packagename=linux-headers-$version
 dbg_packagename=$packagename-dbg
 debarch=
 set_debarch
+if [ -z "$KDEB_RULES" ]; then
+    KDEB_RULES=debian/rules
+fi
 
 if [ "$ARCH" = "um" ] ; then
 	packagename=user-mode-linux-$version
@@ -202,7 +205,7 @@ Description: Linux kernel debugging symbols for $version
  all the necessary debug symbols for the kernel and its modules.
 EOF
 
-cat <<EOF > debian/rules
+cat <<EOF > $KDEB_RULES
 #!$(command -v $MAKE) -f
 
 build:
-- 
1.9.1


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

* [PATCH 3/3] scripts: mkdebian: fix dependencies
  2019-02-11 12:03 debian packaging refinements Enrico Weigelt, metux IT consult
  2019-02-11 12:03 ` [PATCH 1/3] Makefile: add kernelarch target for printing arch and localversion Enrico Weigelt, metux IT consult
  2019-02-11 12:03 ` [PATCH 2/3] scripts: mkdebian: allow renaming generated debian/rules Enrico Weigelt, metux IT consult
@ 2019-02-11 12:03 ` Enrico Weigelt, metux IT consult
  2 siblings, 0 replies; 4+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-02-11 12:03 UTC (permalink / raw)
  To: linux-kernel; +Cc: michal.lkml, yamada.masahiro, linux-kbuild

We missed some build dependencies in the generated debian/control file.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
 scripts/package/mkdebian | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index ff226be..1caaf0b 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -173,7 +173,7 @@ Source: $sourcename
 Section: kernel
 Priority: optional
 Maintainer: $maintainer
-Build-Depends: bc, kmod, cpio
+Build-Depends: bc, kmod, cpio, bison, libelf-dev, libssl-dev, flex
 Homepage: http://www.kernel.org/
 
 Package: $packagename
-- 
1.9.1


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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 12:03 debian packaging refinements Enrico Weigelt, metux IT consult
2019-02-11 12:03 ` [PATCH 1/3] Makefile: add kernelarch target for printing arch and localversion Enrico Weigelt, metux IT consult
2019-02-11 12:03 ` [PATCH 2/3] scripts: mkdebian: allow renaming generated debian/rules Enrico Weigelt, metux IT consult
2019-02-11 12:03 ` [PATCH 3/3] scripts: mkdebian: fix dependencies Enrico Weigelt, metux IT consult

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