Makefile: rules for printing kernel architecture and localversion
Subsystems (3)
PATCH 1/4 Makefile: rules for printing kernel architecture and localversion
trivial rule to print out the kernel arch and localversion, so external tools, like distro packagers, can easily get it.
--- Makefile | 6 ++++++ 1 file changed, 6 insertions(+)
Makefile +6 -0
@@ -1706,6 +1706,12 @@ kernelrelease: kernelversion: @echo $(KERNELVERSION) +kernellocalversion: + @$(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree) | sed -e 's~^\-~~' + +kernelarch: + @echo $(ARCH) + image_name: @echo $(KBUILD_IMAGE)
Signature · 1 line
1.9.1
PATCH 2/4 scripts: mkdebian: allow renaming generated debian/rules via env
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.
--- scripts/package/mkdebian | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
scripts/package/mkdebian +4 -1
@@ -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
@@ -206,7 +209,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 srctree ?= .
Signature · 1 line
1.9.1
PATCH 3/4 scripts: checkpatch.pl: don't complain that debian/rules is executable
In reply to Enrico Weigelt, metux IT consultcheckpatch.pl complains when adding executable "debian/rules", obviously a false alarm. Therefore add an exception for that.
--- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+)
scripts/checkpatch.pl +1 -0
@@ -2587,6 +2587,7 @@ sub process { if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) { my $permhere = $here . "FILE: $realfile\n"; if ($realfile !~ m@scripts/@ && + $realfile !~ "debian/rules" && $realfile !~ /\.(py|pl|awk|sh)$/) { ERROR("EXECUTE_PERMISSIONS", "do not set execute permissions for source files\n" . $permhere);
Signature · 1 line
1.9.1
Joe Perches
maintainerRe: [PATCH 3/4] scripts: checkpatch.pl: don't complain that debian/rules is executable
Quoted 13 lines · metux IT consult
checkpatch.pl complains when adding executable "debian/rules", obviously a false alarm. Therefore add an exception for that.
Signed-off-by Enrico Weigelt, metux IT consult <[email protected]>--- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+)scripts/checkpatch.pl +0
-0
scripts/checkpatch.pl sub process { · line 2593
Quoted 7 lines
scripts/checkpatch.pl +1
-0@@ -2587,6 +2587,7 @@ sub process { if ($line =~ /^new (file )?mode.*[7531]\d{0,2}$/) { my $permhere = $here . "FILE: $realfile\n"; if ($realfile !~ m@scripts/@ && + $realfile !~ "debian/rules" && $realfile !~ /\.(py|pl|awk|sh)$/) { ERROR("EXECUTE_PERMISSIONS", "do not set execute permissions for source files\n" . $permhere);
There are several of these scripts that have
no filename extension type and I suspect just
adding debian/rules isn't all that valuable.
$ git ls-files -s | grep '^100755' | grep -vP '\.(py|pl|awk|sh)$' | grep -v 'scripts/' 100755 b803f4f886b5e5e4046daedbd516e894f0f7e897 0 Documentation/target/target-export-device 100755 532d458333965b80f8f3ea149ad705208893b58f 0 arch/powerpc/boot/wrapper 100755 fbac1732f874e8d117b9c4aaf0a66b203370b933 0 arch/s390/kernel/syscalls/syscalltbl 100755 47c481239e986c35ba4818cb3e96f9ba7a813c2e 0 drivers/staging/greybus/tools/lbtest 100755 d7fc32ea8ac224f0fb6f28c58b196c665e510992 0 lib/build_OID_registry 100755 030a60b0404632ed598e5f5b56267e2a6af4b25f 0 samples/mic/mpssd/micctrl 100755 248ac7313c714d7acb29ceaaadd8fc8ee484e85e 0 samples/mic/mpssd/mpss 100755 2240cb56e6e5e6ed30a75913d4d5fecbb8f193c3 0 tools/debugging/kernel-chktaint 100755 ad1b9e646c4913b31aab9696245bc94b661647ff 0 tools/kvm/kvm_stat/kvm_stat 100755 49af9fe19f5b0533b64c117a363fc1c3785fa1da 0 tools/lib/lockdep/lockdep 100755 459469b7222c1410f7a701561eec004d86568369 0 tools/perf/arch/arm64/entry/syscalls/mksyscalltbl 100755 6c58060aa03beae7456e4f7cb0588e70207314be 0 tools/perf/arch/powerpc/entry/syscalls/mksyscalltbl 100755 72ecbb67637079f709262298981162b6cbb12c9f 0 tools/perf/arch/s390/entry/syscalls/mksyscalltbl 100755 fae26b1cf08f50a8c0caacf7bc0715e948ef0c03 0 tools/perf/tests/perf-targz-src-pkg 100755 3802cee5e1887f5b406324484832305e4a1b29b6 0 tools/perf/util/PERF-VERSION-GEN 100755 6d5e9e87c4b7f51f5904d17fa016a134563ba0d0 0 tools/testing/selftests/ftrace/ftracetest 100755 ea5938ec009a5eb9e28cb1778e081a568e66fd65 0 tools/testing/selftests/net/run_afpackettests 100755 14e41faf2c5740633f9dd30e500543647b736734 0 tools/testing/selftests/net/run_netsocktests 100755 4509f0cc9c918d33c39caf3372f2bcdfc81bceff 0 tools/testing/selftests/pstore/common_tests 100755 2a329bbb4aca3ad391a5aca9a67f554b060fdca2 0 tools/testing/selftests/pstore/pstore_crash_test 100755 d6da5e86efbf89c7f4d7454d9a2c6a11ef2ea9e4 0 tools/testing/selftests/pstore/pstore_post_reboot_tests 100755 1cef54458aff916b2f00af33deef703cb3101ab0 0 tools/testing/selftests/pstore/pstore_tests 100755 951c507a27f7df05f82ce2de78abba2e0d9848f4 0 tools/testing/selftests/vm/run_vmtests
Maybe setting an internal flag and looking at the file content for a shebang might be better.
$ git ls-files -s | grep '^100755' | grep -vP '\.(py|pl|awk|sh)$'|grep -v 'scripts/'|awk '{print $4}'|while read file ; do echo "$file $(head -2 $file | grep '#!')" ; done
Documentation/target/target-export-device #!/bin/sh
arch/powerpc/boot/wrapper #!/bin/sh
arch/s390/kernel/syscalls/syscalltbl #!/bin/sh
drivers/staging/greybus/tools/lbtest #!/usr/bin/env python
lib/build_OID_registry #!/usr/bin/perl -w
samples/mic/mpssd/micctrl #!/bin/bash
samples/mic/mpssd/mpss #!/bin/bash
tools/debugging/kernel-chktaint #! /bin/sh
tools/kvm/kvm_stat/kvm_stat #!/usr/bin/env python3
tools/lib/lockdep/lockdep #!/bin/bash
tools/perf/arch/arm64/entry/syscalls/mksyscalltbl #!/bin/sh
tools/perf/arch/powerpc/entry/syscalls/mksyscalltbl #!/bin/sh
tools/perf/arch/s390/entry/syscalls/mksyscalltbl #!/bin/sh
tools/perf/tests/perf-targz-src-pkg #!/bin/sh
tools/perf/util/PERF-VERSION-GEN #!/bin/sh
tools/testing/selftests/ftrace/ftracetest #!/bin/sh
tools/testing/selftests/net/run_afpackettests #!/bin/sh
tools/testing/selftests/net/run_netsocktests #!/bin/sh
tools/testing/selftests/pstore/common_tests #!/bin/sh
tools/testing/selftests/pstore/pstore_crash_test #!/bin/sh
tools/testing/selftests/pstore/pstore_post_reboot_tests #!/bin/sh
tools/testing/selftests/pstore/pstore_tests #!/bin/sh
tools/testing/selftests/vm/run_vmtests #!/bin/bashPATCH 4/4 debian: add generic rule file
In reply to Enrico Weigelt, metux IT consultAdding a generic debian rule file, so we can build the directly via usual Debian package build tools (eg. git-buildpackage, dck-buildpackage, etc). It expects the .config file already placed in the source tree.
The rule file contains a rule for creating debian/control and other metadata - this is done similar to the 'deb-pkg' make rule, scripts/packaging/mkdebian.
--- .gitignore | 1 + MAINTAINERS | 6 ++++++ debian/rules | 27 +++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100755 debian/rules
.gitignore +1 -0
@@ -69,6 +69,7 @@ modules.builtin # Debian directory (make deb-pkg) # /debian/ +!/debian/rules # # Snap directory (make snap-pkg)
MAINTAINERS +6 -0
@@ -4516,6 +4516,12 @@ F: include/uapi/linux/dccp.h F: include/linux/tfrc.h F: net/dccp/ +DEBIAN PACKAGING FILES +M: Enrico Weigelt <[email protected]> +L: [email protected] +S: Maintained +F: debian/ + DECnet NETWORK LAYER W: http://linux-decnet.sourceforge.net L: [email protected]
debian/rules new file +27 -0
@@ -0,0 +1,27 @@ +#!/usr/bin/make -f +# SPDX-License-Identifier: GPL-2.0 + +export MAKE +export KERNELARCH = $(shell $(MAKE) kernelarch) +export KERNELRELEASE = $(shell $(MAKE) kernelrelease) +export KBUILD_DEBARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH) +export KBUILD_BUILD_VERSION = $(shell $(MAKE) kernellocalversion) +export KDEB_RULES = debian/rules.auto +export KDEB_SOURCENAME = linux-source +export ARCH = $(KERNELARCH) + +debian/control debian/changelong debian/arch debian/copyright: +debian/control: + ./scripts/package/mkdebian + +build: debian/control + $(MAKE) KERNELRELEASE=$(KERNELRELEASE) ARCH=$(KERNELARCH) KBUILD_BUILD_VERSION=$(KBUILD_BUILD_VERSION) KBUILD_SRC= + +binary-arch: debian/control + $(MAKE) KERNELRELEASE=$(KERNELRELEASE) ARCH=$(KERNELARCH) KBUILD_BUILD_VERSION=$(KBUILD_BUILD_VERSION) KBUILD_SRC= intdeb-pkg + +clean: + rm -rf debian/*tmp debian/files debian/changelog debian/control debian/copyright debian/rules.auto debian/arch + $(MAKE) clean + +binary: binary-arch
Signature · 1 line
1.9.1
Re: [PATCH 4/4] debian: add generic rule file
Quoted 9 lines · metux IT consult
Adding a generic debian rule file, so we can build the directly via usual Debian package build tools (eg. git-buildpackage, dck-buildpackage, etc). It expects the .config file already placed in the source tree.
The rule file contains a rule for creating debian/control and other metadata - this is done similar to the 'deb-pkg' make rule,
scripts/packaging/mkdebian.
I saw a similar patch submission before, and negative feedback about it.
Debian maintains its own debian/rules, and it is fine. I do not like to check-in the one in the kernel tree.
Quoted 73 lines
Signed-off-by Enrico Weigelt, metux IT consult <[email protected]>--- .gitignore | 1 + MAINTAINERS | 6 ++++++ debian/rules | 27 +++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100755 debian/rules.gitignore +1
-0@@ -69,6 +69,7 @@ modules.builtin # Debian directory (make deb-pkg) # /debian/ +!/debian/rules # # Snap directory (make snap-pkg)MAINTAINERS +6
-0@@ -4516,6 +4516,12 @@ F: include/uapi/linux/dccp.h F: include/linux/tfrc.h F: net/dccp/ +DEBIAN PACKAGING FILES +M: Enrico Weigelt <[email protected]> +L: [email protected] +S: Maintained +F: debian/ + DECnet NETWORK LAYER W: http://linux-decnet.sourceforge.net L: [email protected]debian/rules new file +27
-1@@ -0,0 +1,27 @@ +#!/usr/bin/make -f +# SPDX-License-Identifier: GPL-2.0 + +export MAKE +export KERNELARCH = $(shell $(MAKE) kernelarch) +export KERNELRELEASE = $(shell $(MAKE) kernelrelease) +export KBUILD_DEBARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH) +export KBUILD_BUILD_VERSION = $(shell $(MAKE) kernellocalversion) +export KDEB_RULES = debian/rules.auto +export KDEB_SOURCENAME = linux-source +export ARCH = $(KERNELARCH) + +debian/control debian/changelong debian/arch debian/copyright: +debian/control: + ./scripts/package/mkdebian + +build: debian/control + $(MAKE) KERNELRELEASE=$(KERNELRELEASE) ARCH=$(KERNELARCH) KBUILD_BUILD_VERSION=$(KBUILD_BUILD_VERSION) KBUILD_SRC= + +binary-arch: debian/control + $(MAKE) KERNELRELEASE=$(KERNELRELEASE) ARCH=$(KERNELARCH) KBUILD_BUILD_VERSION=$(KBUILD_BUILD_VERSION) KBUILD_SRC= intdeb-pkg + +clean: + rm -rf debian/*tmp debian/files debian/changelog debian/control debian/copyright debian/rules.auto debian/arch + $(MAKE) clean + +binary: binary-arch --1.9.1
Signature · 2 lines
Best Regards Masahiro Yamada
Re: [PATCH 4/4] debian: add generic rule file
Quoted 5 lines · Masahiro Yamada
Quoted 3 lines
The rule file contains a rule for creating debian/control and other metadata - this is done similar to the 'deb-pkg' make rule,
scripts/packaging/mkdebian.I saw a similar patch submission before, and negative feedback about it.
Do you recall what negative feedback exactly ?
Quoted 1 line
Debian maintains its own debian/rules, and it is fine.
Not for me, I don't use it - given up trying to make anything useful out of it. It's extremly complex, practically undebuggable and doesn't even work w/o lots of external preparations.
--mtx
Signature · 3 lines
Enrico Weigelt, metux IT consult Free software and Linux embedded engineering [email protected] -- +49-151-27565287
Re: [PATCH 4/4] debian: add generic rule file
Quoted 9 lines · metux IT consult
Quoted 5 lines · Masahiro Yamada
Quoted 3 lines
The rule file contains a rule for creating debian/control and other metadata - this is done similar to the 'deb-pkg' make rule,
scripts/packaging/mkdebian.I saw a similar patch submission before, and negative feedback about it.
Do you recall what negative feedback exactly ?
It's possible I'm not remembering some of the feedback, but the only thing I recall was the comment I made that I'd really like this use case:
make O=/build/linux-build bindeb-pkg
to not break. And as far as I can tell from the proposed patch series (I haven't had a chance to experimentally verify it yet), I don't think it should break anything --- I'm assuming that we will still have a way of creating the debian/rules file in /build/linux-build/debian/rules when doing a O= build, and that the intdeb-pkg rule remains the same. At least, it appears to be the case from my doing a quick look at the patches.
Quoted 5 lines
Quoted 1 line
Debian maintains its own debian/rules, and it is fine.
Not for me, I don't use it - given up trying to make anything useful out of it. It's extremly complex, practically undebuggable and doesn't even work w/o lots of external preparations.
Yeah, the official Debian debian/rules is optimized for doing a distribution release, and in addition to the issues Enrico has raised, last time I tried it, it was S-L-O-W since it was building a fully generic kernel. It's not at all useable for general developer use.
It sounds like what Enrico is trying to do is to enable running "dpkg-buildpackage -us -uc -b" from the the top-level kernel package as being easier than running "make bindeb-pkg". I suspect this might be because his goal is to integrate individual kernel builds from using Debian's hermetic build / chroot systems (e.g., sbuild, pbuilder)?
- Ted
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH 4/4] debian: add generic rule file
Quoted 11 lines · Theodore Y. Ts'o
Quoted 9 lines · metux IT consult
Quoted 5 lines · Masahiro Yamada
Quoted 3 lines
The rule file contains a rule for creating debian/control and other metadata - this is done similar to the 'deb-pkg' make rule,
scripts/packaging/mkdebian.I saw a similar patch submission before, and negative feedback about it.
Do you recall what negative feedback exactly ?
Sorry, my memory was broken.
I did not like this patch set from the beginning,
but missed to express my opinion strongly.
I want debian/ to be kept as a drop-in directory for packagers, without replacing the upstream debian/rules.
If a check-in source file is modified in anyway,scripts/setlocalversion would set -dirty flag,
which I want to avoid.
Quoted 16 lines
It's possible I'm not remembering some of the feedback, but the only thing I recall was the comment I made that I'd really like this use case:
make O=/build/linux-build bindeb-pkg
to not break. And as far as I can tell from the proposed patch series (I haven't had a chance to experimentally verify it yet), I don't think it should break anything --- I'm assuming that we will still have a way of creating the debian/rules file in /build/linux-build/debian/rules when doing a O= build, and that the intdeb-pkg rule remains the same. At least, it appears to be the case from my doing a quick look at the patches.
Quoted 2 lines
Quoted 1 line
Debian maintains its own debian/rules, and it is fine.
Quoted 8 lines
Quoted 3 lines
Not for me, I don't use it - given up trying to make anything useful out of it. It's extremly complex, practically undebuggable and doesn't even work w/o lots of external preparations.
Yeah, the official Debian debian/rules is optimized for doing a distribution release, and in addition to the issues Enrico has raised, last time I tried it, it was S-L-O-W since it was building a fully generic kernel. It's not at all useable for general developer use.
It is OK if the package is targeting normal users instead of kernel developers.
Quoted 5 lines
It sounds like what Enrico is trying to do is to enable running "dpkg-buildpackage -us -uc -b" from the the top-level kernel package as being easier than running "make bindeb-pkg". I suspect this might be because his goal is to integrate individual kernel builds from using Debian's hermetic build / chroot systems (e.g., sbuild, pbuilder)?
I am OK with generating debian/rules with 'make bindeb-pkg', a shell scripts or whatever, but I dislike to commit it in upstream git tree.
debian/rules is a hook for packagers to do their jobs in downstream. "We kindly committed a generic one for you" sounds weird to me.
Signature · 2 lines
Best Regards Masahiro Yamada
Re: [PATCH 4/4] debian: add generic rule file
Quoted 6 lines · Masahiro Yamada
I want debian/ to be kept as a drop-in directory for packagers, without replacing the upstream debian/rules.
If a check-in source file is modified in anyway,
scripts/setlocalversionwould set -dirty flag,
which I want to avoid.
In practice, that's not going to be a problem for most distributions. The traditional way Debian-derived systems have done builds is completely outside of git. So there will be a linux_5.2.orig.tar.gz and a linux_5.2-1.debian.tar.xz. dpkg_source -x will first unpackage the orig.tar.gz, and then the debian.tar.xz, and if the second overwrites the first, it's no big deal.
More modern Debian package maintainer workflows may be using git, but in that case, all of the "Debianizations" are reflected in a separate branch. So it's not going to set the -dirty flag.
There will be potential merge conflicts between Enrico's proposed "upstream default debian/rules" file and the Debian/Ubuntu debian/rules file on their distro branch. However, I don't think that's a big issue, for two reasons.
First, once it's checked in, I expect changes to the default debian/rules file will be relatively rare. Secondly, it's easy enough to use gitattributes and defining a custom merge driver so that a distribution can configure things so that they always use the version of debian/rules from their branch, so the merge conflict resolution can be set up to always do the right thing.
There are certainly other upstreams which ship their own debian/ directories. E2fsprogs is one such example, but in that case I'm cheating because I'm both the Debian package maintainer as well as the
upstream maintainer. :-) However, it's never been an issue for Ubuntu
when they choose to ship their own customized debian/rules file.
Quoted 2 lines
debian/rules is a hook for packagers to do their jobs in downstream. "We kindly committed a generic one for you" sounds weird to me.
It is weird, and it's not common for upstream packages (which are not native Debian packages) to ship their own debian directory. But it certainly does happen, and it won't cause any problems in actual practice.
Regards,
- Ted
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH 4/4] debian: add generic rule file
On 16.07.19 14:34, Theodore Y. Ts'o wrote:
Hi,
Quoted 6 lines
In practice, that's not going to be a problem for most distributions. The traditional way Debian-derived systems have done builds is completely outside of git. So there will be a linux_5.2.orig.tar.gz and a linux_5.2-1.debian.tar.xz.
dpkg_source-x will first unpackage the orig.tar.gz, and then the debian.tar.xz, and if the second overwrites the first, it's no big deal.
ACK. IIRC they already filter out debian/ directories when generating upstream tarballs - other upstreams already provide their debian/ stuff, too.
Quoted 2 lines
First, once it's checked in, I expect changes to the default debian/rules file will be relatively rare.
ACK. I currently don't see much reasons for future changes. If anybody sees something missing, just let me know, and I'll take it up for the next review round.
--mtx
Signature · 3 lines
Enrico Weigelt, metux IT consult Free software and Linux embedded engineering [email protected] -- +49-151-27565287
Re: [PATCH 4/4] debian: add generic rule file
Quoted 11 lines · metux IT consult
Quoted 7 lines
In practice, that's not going to be a problem for most distributions. The traditional way Debian-derived systems have done builds is completely outside of git. So there will be a linux_5.2.orig.tar.gz and a linux_5.2-1.debian.tar.xz.
dpkg_source-x will first unpackage the orig.tar.gz, and then the debian.tar.xz, and if the second overwrites the first, it's no big deal.ACK. IIRC they already filter out debian/ directories when generating upstream tarballs - other upstreams already provide their debian/ stuff, too.
Well, no, actually they don't. That's because as much as possible they want the upstream tarball to be bit-for-bit identical to the one published on the official upstream distribution site. That allows them to include the detached PGP signature from the upstream maintainer, if one is provided.
If there are files in the upstream debian/ directory that they don't need, they can delete in the distro's debian/rules file. Ideally, so we shouldn't include files in the Linux kernel's debian/ directory willy-nilly. But the debian/rules file will *always* be present, and so it will be overwritten by the <package>_<ver>.debian.tar.xz file, and so it's no big deal.
- Ted
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH 4/4] debian: add generic rule file
In reply to Theodore Y. Ts'oOn 15.07.19 21:12, Theodore Y. Ts'o wrote:
Hi,
Quoted 1 line
It's possible I'm not remembering some of the feedback, but the only> thing I recall was the comment I made that I'd really like this use>
case:> > make O=/build/linux-build bindeb-pkg
ah, I yet wanted to test that - thx for reminding me. > to not break. And as far as I can tell from the proposed patch series> (I haven't had a chance to experimentally verify it yet), I don't> think it should break anything --- I'm assuming that we will still> have a way of creating the debian/rules file in> /build/linux-build/debian/rules when doing a O= build, and that the> intdeb-pkg rule remains the same. At least, it appears to be the case> from my doing a quick look at the patches. Yes (unless i've missed something), everything should remain as it is. One thing that could happen (not checked yet) is that running good old 'make bindeb-pkg' without O=... could overwrite the now already existing debian/rules file.
If that's really a problem, we could tweak the machinery to use a different name for the rule file (for now, one the preceeding patch just allows giving a different name for just *generating* the rules file). Another idea could be rewriting the whole process so that no rules file needs to be generated at all.
Quoted 4 lines
Yeah, the official Debian debian/rules is optimized for doing a distribution release, and in addition to the issues Enrico has raised, last time I tried it, it was S-L-O-W since it was building a fully generic kernel. It's not at all useable for general developer use.
I'm a bit reluctant calling this 'optimized' :p
The strangest aspect (IMHO) is they're building several different trees (w/ different huge patch queues) from only one source package. Instead I'd rather:
* try to get as much as possible in one tree
* have separate source packages if there really need to be separate patche queues (IMHO, these things, like RT stuff, just need proper Kconfig's)
* do all the patching in git and skip the text-based patches entirely
Haven't found out, why they're actually doing it that complicated way (didn't get any useful answers from debian kernel folks)
Quoted 5 lines
It sounds like what Enrico is trying to do is to enable running "dpkg-buildpackage -us -uc -b" from the the top-level kernel package as being easier than running "make bindeb-pkg". I suspect this might be because his goal is to integrate individual kernel builds from using Debian's hermetic build / chroot systems (e.g., sbuild, pbuilder)?
Yes, I'm building all deb's by the same process / infrastructure. In my case it's dck-buildpackage (*1) which runs the build in a docker container (kinda pbuilder w/ docker). It always starts with a fresh (minimal) base image, calls debian/rules to create debian/control (if necessary) deploys the dependencies found in the control file and finally fire's up dpkg-buildpackage - the output is collected in an ready-to-use apt repo.
The goal of this is having a canonical build process for all deb packages, not having to care of any special cases anymore. I also have another tool ontop of that, which runs the whole show for dozens of packages and targets (*2).
My first approach was trying to use Debian source packages with new kernel trees, but had to give up after a few days. Then I've found out that the kernel already has *almost* what I needed. The difference between almost and fine is this patch queue (minus local .config files)
--mtx
Signature · 3 lines
Enrico Weigelt, metux IT consult Free software and Linux embedded engineering [email protected] -- +49-151-27565287
Quoted 4 lines · metux IT consult
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 <[email protected]>
Hi,
If accepted, these targets should be added to the top level Makefile's "make help" output also.
Thanks.
Quoted 22 lines
--- Makefile | 6 ++++++ 1 file changed, 6 insertions(+)Makefile +6
-0@@ -1706,6 +1706,12 @@ kernelrelease: kernelversion: @echo $(KERNELVERSION) +kernellocalversion: + @$(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree) | sed -e 's~^\-~~' + +kernelarch: + @echo $(ARCH) + image_name: @echo $(KBUILD_IMAGE)
Signature · 1 line
~Randy