Bug#635563: kernel-package: kernel-headers broken by linux-3.0
This has bitted me today when building a custom kernel with kernel-package I have applied the patch suggested by Mihail and it works. I have changed the logic on the first line of the patch to match kernels 3.x and above (who knows when Linus will decide to release kernel 4.x) so we avoid having this issue another time in the not-so-long future. I am attaching the patch here. The patch is above commit 3ead01d of the git repository of the package git://git.debian.org/~srivasta/debian/kernel-package.git Regards! -- ~~~ Carlos Alberto Lopez Perez http://neutrino.es Igalia - Free Software Engineeringhttp://www.igalia.com ~~~ commit ec02b476e5037b22e5f3060a6703f8a93770eb11 Author: Carlos Alberto Lopez Perez clo...@igalia.com Date: Wed Feb 1 03:52:49 2012 +0100 Kernel headers: match kernels from 2.6.23 (including 3.x and above) * Closes #635563 * Closes #639123 diff --git a/kernel/ruleset/targets/headers.mk b/kernel/ruleset/targets/headers.mk index ec3975c..ec1c730 100644 --- a/kernel/ruleset/targets/headers.mk +++ b/kernel/ruleset/targets/headers.mk @@ -31,7 +31,7 @@ ### LINK_ARCH=$(KERNEL_ARCH) -ifeq ($(shell if [ $(PATCHLEVEL) -eq 6 ] [ $(SUBLEVEL) -gt 23 ] ; then \ +ifeq ($(shell if [ $(VERSION) -ge 3 ] || [ $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -gt 23 ] ; then \ if [ $(KERNEL_ARCH) = i386 ] || [ $(KERNEL_ARCH) = x86_64 ] ; then \ echo yes ; fi ; fi ),yes) LINK_ARCH=x86 @@ -101,7 +101,7 @@ debian/stamp/install/$(h_package): -tar cfh - scripts | (cd $(SRCDIR); umask 000; tar xsf -) test ! -e arch/powerpc/lib/crtsavres.o || \ tar cfh - arch/powerpc/lib/crtsavres.o | (cd $(SRCDIR); umask 000; tar xsf -) - (cd $(SRCDIR)/include; rm -rf asm; ln -s asm-$(LINK_ARCH) asm) + (cd $(SRCDIR)/include; rm -rf asm; ln -s ../arch/$(LINK_ARCH)/include/asm asm) find . -path './scripts/*' -prune -o -path './Documentation/*' -prune -o \ -path './debian/*'-prune -o -type f \ \( -name Makefile -o -name 'Kconfig*' \) -print | \ @@ -115,7 +115,7 @@ debian/stamp/install/$(h_package): -tar cf - scripts |(cd $(SRCDIR); umask 000; tar xsf -) test ! -e arch/powerpc/lib/crtsavres.o || \ tar cfh - arch/powerpc/lib/crtsavres.o | (cd $(SRCDIR); umask 000; tar xsf -) - (cd $(SRCDIR)/include; rm -f asm; ln -s asm-$(LINK_ARCH) asm) + (cd $(SRCDIR)/include; rm -f asm; ln -s ../arch/$(LINK_ARCH)/include/asm asm) find . -path './scripts/*' -prune -o -path './Documentation/*' -prune -o \ -path './debian/*' -prune -o -type f \ \( -name Makefile -o -name 'Kconfig*' \) -print | \ signature.asc Description: OpenPGP digital signature
Bug#635563: kernel-package: kernel-headers broken by linux-3.0
Hello! I use this patch to solve the issue with broken symlinks and kernel version 3.x: hamer@h13e:~/download/kernel-package$ cat kernel-package_headers.diff diff -Naurb kernel-package-12.036+nmu1.orig//kernel/ruleset/targets/headers.mk kernel-package-12.036+nmu1.1//kernel/ruleset/targets/headers.mk --- kernel-package-12.036+nmu1.orig//kernel/ruleset/targets/headers.mk 2009-09-11 17:24:42.0 +0300 +++ kernel-package-12.036+nmu1.1//kernel/ruleset/targets/headers.mk 2011-10-10 12:24:47.734584775 +0300 @@ -31,7 +31,7 @@ ### LINK_ARCH=$(KERNEL_ARCH) -ifeq ($(shell if [ $(PATCHLEVEL) -eq 6 ] [ $(SUBLEVEL) -gt 23 ] ; then \ +ifeq ($(shell if [ $(VERSION) -eq 3 ] || [ $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -gt 23 ] ; then \ if [ $(KERNEL_ARCH) = i386 ] || [ $(KERNEL_ARCH) = x86_64 ] ; then \ echo yes ; fi ; fi ),yes) LINK_ARCH=x86 @@ -101,7 +101,7 @@ -tar cfh - scripts | (cd $(SRCDIR); umask 000; tar xsf -) test ! -e arch/powerpc/lib/crtsavres.o || \ tar cfh - arch/powerpc/lib/crtsavres.o | (cd $(SRCDIR); umask 000; tar xsf -) - (cd $(SRCDIR)/include; rm -rf asm; ln -s asm-$(LINK_ARCH) asm) + (cd $(SRCDIR)/include; rm -rf asm; ln -s ../arch/$(LINK_ARCH)/include/asm asm) find . -path './scripts/*' -prune -o -path './Documentation/*' -prune -o \ -path './debian/*'-prune -o -type f \ \( -name Makefile -o -name 'Kconfig*' \) -print | \ @@ -115,7 +115,7 @@ -tar cf - scripts |(cd $(SRCDIR); umask 000; tar xsf -) test ! -e arch/powerpc/lib/crtsavres.o || \ tar cfh - arch/powerpc/lib/crtsavres.o | (cd $(SRCDIR); umask 000; tar xsf -) - (cd $(SRCDIR)/include; rm -f asm; ln -s asm-$(LINK_ARCH) asm) + (cd $(SRCDIR)/include; rm -f asm; ln -s ../arch/$(LINK_ARCH)/include/asm asm) find . -path './scripts/*' -prune -o -path './Documentation/*' -prune -o \ -path './debian/*' -prune -o -type f \ \( -name Makefile -o -name 'Kconfig*' \) -print | \ WBR, Mihail. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#635563: kernel-package: kernel-headers broken by linux-3.0
Package: kernel-package Version: 12.036+nmu1 Severity: normal The following logic for detecting LINK_ARCH in /usr/share/kernel-package/ruleset/targets/headers.mk does not work for linux-3.0, and consequently kernel-package produces an incorrect kernel-headers package: ifeq ($(shell if [ $(PATCHLEVEL) -eq 6 ] [ $(SUBLEVEL) -gt 23 ] ; then \ if [ $(KERNEL_ARCH) = i386 ] || [ $(KERNEL_ARCH) = x86_64 ] ; then \ echo yes ; fi ; fi ),yes) LINK_ARCH=x86 endif 3.0 is treated like 2.6.X with X = 23, and kernel-package looks for include files in arch/x86_64 instead of arch/x86. However, include files are in arch/x86 in linux-3.0 -- System Information: Debian Release: 6.0.2 APT prefers stable APT policy: (900, 'stable'), (10, 'unstable'), (10, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.0.0 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages kernel-package depends on: ii binutils 2.20.1-16 The GNU assembler, linker and bina ii build-essential 11.5Informational list of build-essent ii debianutils 3.4 Miscellaneous utilities specific t ii file 5.04-5 Determines file type using magic ii gettext 0.18.1.1-3 GNU Internationalization utilities ii make 3.81-8 An utility for Directing compilati ii module-init-tools3.12-1 tools for managing Linux kernel mo ii po-debconf 1.0.16+nmu1 tool for managing templates file t ii util-linux 2.17.2-9Miscellaneous system utilities Versions of packages kernel-package recommends: ii cpio 2.11-4 GNU cpio -- a program to manage ar Versions of packages kernel-package suggests: ii btrfs-tools 0.19+20100601-3 Checksumming Copy on Write Filesys ii bzip2 1.0.5-6 high-quality block-sorting file co ii docbook-utils 0.6.14-1.1 Convert Docbook files to other for ii e2fsprogs 1.41.12-4stable1 ext2/ext3/ext4 file system utiliti ii grub0.97-64 GRand Unified Bootloader (dummy pa ii initramfs-tools [linux- 0.98.8 tools for generating an initramfs ii jfsutils1.1.12-2.1 utilities for managing the JFS fil ii libncurses5-dev [libncu 5.7+20100313-5 developer's libraries and docs for pn linux-source | kernel-s none (no description available) ii mcelog 1.0~pre3-3 x86-64 Machine Check Exceptions co pn oprofilenone (no description available) pn pcmciautils none (no description available) ii ppp 2.4.5-4 Point-to-Point Protocol (PPP) - da ii procps 1:3.2.8-9/proc file system utilities pn quota none (no description available) ii reiserfsprogs 1:3.6.21-1 User-level tools for ReiserFS file ii squashfs-tools 1:4.0-8 Tool to create and append to squas ii udev164-3/dev/ and hotplug management daemo ii xfsprogs3.1.4Utilities for managing the XFS fil ii xmlto 0.0.23-2 XML-to-any converter -- no debconf information -- debsums errors found: -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org