Package: kernel-package
Version: 11.001
Severity: important
Tags: patch

kernel-package does not work on armel, as it uses DEB_HOST_GNU_SYSTEM
and compare it to either linux-gnu or kfreebsd-gnu. DEB_HOST_GNU_SYSTEM
equals to linux-gnueabi on armel.

The correct fix is to use DEB_HOST_ARCH_OS instead which returns linux
on armel as well as on other linux architectures.

Please find a patch to fix that below.

diff -Nru kernel-package-11.001/kernel/ruleset/arches/amd64.mk 
kernel-package-11.001+armel/kernel/ruleset/arches/amd64.mk
--- kernel-package-11.001/kernel/ruleset/arches/amd64.mk        2007-05-05 
07:48:30.000000000 +0200
+++ kernel-package-11.001+armel/kernel/ruleset/arches/amd64.mk  2007-05-24 
22:19:04.000000000 +0200
@@ -31,7 +31,7 @@
 ###############################################################################
 
 KERNEL_ARCH=x86_64
-ifeq ($(DEB_HOST_GNU_SYSTEM), linux-gnu)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
   ifeq ($(strip $(CONFIG_X86_64_XEN)),)
     kimage := bzImage
     loaderdep=lilo (>= 19.1) | grub
diff -Nru kernel-package-11.001/kernel/ruleset/arches/i386.mk 
kernel-package-11.001+armel/kernel/ruleset/arches/i386.mk
--- kernel-package-11.001/kernel/ruleset/arches/i386.mk 2007-05-05 
07:48:30.000000000 +0200
+++ kernel-package-11.001+armel/kernel/ruleset/arches/i386.mk   2007-05-24 
22:18:52.000000000 +0200
@@ -41,7 +41,7 @@
   KPKG_SUBARCH:=$(GUESS_SUBARCH)
 endif
 DEBCONFIG= $(CONFDIR)/config.$(KPKG_SUBARCH)
-ifeq ($(DEB_HOST_GNU_SYSTEM), linux-gnu)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
   ifeq ($(strip $(CONFIG_X86_XEN)),)
     kimagesrc = $(strip arch/$(KERNEL_ARCH)/boot/$(kimage))
     kimagedest = $(INT_IMAGE_DESTDIR)/vmlinuz-$(version)
@@ -68,7 +68,7 @@
 else
   loaderdep=grub | grub2
   loader=grub
-  ifeq ($(DEB_HOST_GNU_SYSTEM), kfreebsd-gnu)
+  ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
     kimagesrc = $(strip $(KERNEL_ARCH)/compile/GENERIC/kernel)
     kimagedest = $(INT_IMAGE_DESTDIR)/kfreebsd-$(version)
   endif
diff -Nru kernel-package-11.001/kernel/ruleset/minimal.mk 
kernel-package-11.001+armel/kernel/ruleset/minimal.mk
--- kernel-package-11.001/kernel/ruleset/minimal.mk     2007-05-05 
07:48:30.000000000 +0200
+++ kernel-package-11.001+armel/kernel/ruleset/minimal.mk       2007-05-24 
22:18:12.000000000 +0200
@@ -68,7 +68,7 @@
 minimal_clean:
        $(REASON)
        @echo $(if $(strip $(kpkg_version)),"This is kernel package version 
$(kpkg_version).","Cleaning.")
-ifeq ($(DEB_HOST_GNU_SYSTEM), linux-gnu)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
        test ! -f .config || cp -pf .config config.precious
        test ! -e stamp-building || rm -f stamp-building
        test ! -f Makefile || \
@@ -76,7 +76,7 @@
        test ! -f config.precious || mv -f config.precious .config
 else
        rm -f .config
-  ifeq ($(DEB_HOST_GNU_SYSTEM), kfreebsd-gnu)
+  ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
        rm -rf bin
        if test -e $(architecture)/compile/GENERIC ; then     \
          $(PMAKE) -C $(architecture)/compile/GENERIC clean ; \
diff -Nru kernel-package-11.001/kernel/ruleset/misc/defaults.mk 
kernel-package-11.001+armel/kernel/ruleset/misc/defaults.mk
--- kernel-package-11.001/kernel/ruleset/misc/defaults.mk       2007-05-05 
07:48:30.000000000 +0200
+++ kernel-package-11.001+armel/kernel/ruleset/misc/defaults.mk 2007-05-24 
22:21:21.000000000 +0200
@@ -140,7 +140,7 @@
 
 include $(DEBDIR)/ruleset/misc/kernel_arch.mk
 
-ifeq ($(DEB_HOST_GNU_SYSTEM), kfreebsd-gnu)
+ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
   PMAKE = PATH=/usr/lib/freebsd/:$(CURDIR)/bin:$(PATH) WERROR= MAKEFLAGS= 
freebsd-make
 endif
 
diff -Nru kernel-package-11.001/kernel/ruleset/misc/modules.mk 
kernel-package-11.001+armel/kernel/ruleset/misc/modules.mk
--- kernel-package-11.001/kernel/ruleset/misc/modules.mk        2007-05-05 
07:48:30.000000000 +0200
+++ kernel-package-11.001+armel/kernel/ruleset/misc/modules.mk  2007-05-24 
22:21:11.000000000 +0200
@@ -65,17 +65,17 @@
                        fi)
 
 
-ifeq ($(DEB_HOST_GNU_SYSTEM), linux-gnu)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
   config = .config
 else
-  ifeq ($(DEB_HOST_GNU_SYSTEM), kfreebsd-gnu)
+  ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
     config = $(architecture)/conf/GENERIC
   endif
 endif
 
 
 # define MODULES_ENABLED if appropriate
-ifneq ($(filter kfreebsd-gnu, $(DEB_HOST_GNU_SYSTEM)):$(strip $(shell grep -E 
^[^\#]*CONFIG_MODULES $(CONFIG_FILE))),:)
+ifneq ($(filter kfreebsd, $(DEB_HOST_ARCH_OS)):$(strip $(shell grep -E 
^[^\#]*CONFIG_MODULES $(CONFIG_FILE))),:)
   MODULES_ENABLED := YES
 endif
 
diff -Nru kernel-package-11.001/kernel/ruleset/misc/version_vars.mk 
kernel-package-11.001+armel/kernel/ruleset/misc/version_vars.mk
--- kernel-package-11.001/kernel/ruleset/misc/version_vars.mk   2007-05-05 
07:48:30.000000000 +0200
+++ kernel-package-11.001+armel/kernel/ruleset/misc/version_vars.mk     
2007-05-24 22:20:54.000000000 +0200
@@ -35,7 +35,7 @@
 ###############################################################################
 
 
-ifeq ($(DEB_HOST_GNU_SYSTEM), linux-gnu)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
   localversion_files := $(wildcard localversion*)
 
   # Could have used :=, but some patches do seem to patch the
@@ -102,7 +102,7 @@
     endif
   endif
 else
-  ifeq ($(DEB_HOST_GNU_SYSTEM), kfreebsd-gnu)
+  ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
     VERSION        =$(call doit,grep '^REVISION=' conf/newvers.sh |            
       \
       sed -e 's/[^0-9]*\([0-9]\)\..*/\1/')
     PATCHLEVEL =$(call doit,grep '^REVISION=' conf/newvers.sh |                
       \
@@ -184,7 +184,7 @@
 AM_OFFICIAL := $(call doit,if [ -f debian/official ]; then echo YES; fi )
 
 # See if we are being run in the kernel directory
-ifeq ($(DEB_HOST_GNU_SYSTEM), linux-gnu)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
   define check_kernel_dir
   IN_KERNEL_DIR := $(call doit,if test -d drivers && test -d kernel && test -d 
fs && test \
                                    -d include/linux ; then                     
       \
@@ -192,7 +192,7 @@
                            fi )
   endef
 else
-  ifeq ($(DEB_HOST_GNU_SYSTEM), kfreebsd-gnu)
+  ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
     define check_kernel_dir
     IN_KERNEL_DIR := $(call doit,if test -d dev && test -d kern && test -d fs 
&&          \
                              test -d i386/include ; then echo YES; fi)
diff -Nru kernel-package-11.001/kernel/ruleset/targets/image.mk 
kernel-package-11.001+armel/kernel/ruleset/targets/image.mk
--- kernel-package-11.001/kernel/ruleset/targets/image.mk       2007-05-05 
07:48:30.000000000 +0200
+++ kernel-package-11.001+armel/kernel/ruleset/targets/image.mk 2007-05-24 
22:20:31.000000000 +0200
@@ -44,7 +44,7 @@
        $(eval $(which_debdir))
        $(make_directory) $(TMPTOP)/$(IMAGEDIR)
        $(make_directory) $(DOCDIR)/examples
-ifeq ($(DEB_HOST_GNU_SYSTEM), linux-gnu)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
        $(install_file) Documentation/Changes $(DOCDIR)/
        gzip -9qf $(DOCDIR)/Changes
 endif
@@ -100,12 +100,12 @@
 ifeq ($(strip $(HAVE_EXTRA_DOCS)),YES)
        $(install_file) $(extra_docs)            $(DOCDIR)/
 endif
-ifneq ($(filter kfreebsd-gnu, $(DEB_HOST_GNU_SYSTEM)):$(strip $(shell grep -E 
^[^\#]*CONFIG_MODULES $(CONFIG_FILE))),:)
-  ifeq  ($(DEB_HOST_GNU_SYSTEM):$(strip $(HAVE_NEW_MODLIB)),linux:)
+ifneq ($(filter kfreebsd, $(DEB_HOST_ARCH_OS)):$(strip $(shell grep -E 
^[^\#]*CONFIG_MODULES $(CONFIG_FILE))),:)
+  ifeq  ($(DEB_HOST_ARCH_OS):$(strip $(HAVE_NEW_MODLIB)),linux:)
        $(mod_inst_cmds)
   else
 # could have also said DEPMOD=/bin/true instead of moving files
-    ifeq ($(DEB_HOST_GNU_SYSTEM), linux-gnu)
+    ifeq ($(DEB_HOST_ARCH_OS), linux)
       ifneq ($(strip $(KERNEL_CROSS)),)
        mv System.map System.precious
       endif
@@ -115,7 +115,7 @@
        mv System.precious System.map
       endif
     else
-      ifeq ($(DEB_HOST_GNU_SYSTEM), kfreebsd-gnu)
+      ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
        mkdir -p $(INSTALL_MOD_PATH)/boot/defaults
        install -o root -g root -m 644                        \
                 $(architecture)/conf/GENERIC.hints            \
diff -Nru kernel-package-11.001/kernel/ruleset/targets/target.mk 
kernel-package-11.001+armel/kernel/ruleset/targets/target.mk
--- kernel-package-11.001/kernel/ruleset/targets/target.mk      2007-05-05 
07:48:30.000000000 +0200
+++ kernel-package-11.001+armel/kernel/ruleset/targets/target.mk        
2007-05-24 22:17:42.000000000 +0200
@@ -89,7 +89,7 @@
        @echo "KPKG_ARCH        = $(KPKG_ARCH)"        >> .mak
 # Fetch the rest of the information from the kernel's Makefile
        $(eval $(which_debdir))
-ifeq ($(DEB_HOST_GNU_SYSTEM), linux-gnu)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
        @$(MAKE) --no-print-directory -sf $(DEBDIR)/ruleset/kernel_version.mk  \
           ARCH=$(KERNEL_ARCH) $(CROSS_ARG) debian_conf_var              >> .mak
 endif
@@ -105,11 +105,11 @@
 
 debian/dummy_do_dep:
        $(REASON)
-ifeq ($(DEB_HOST_GNU_SYSTEM), linux-gnu)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
        +$(MAKE) $(EXTRAV_ARG) $(FLAV_ARG) $(CROSS_ARG) \
                                  ARCH=$(KERNEL_ARCH) $(fast_dep) dep
 else
-  ifeq ($(DEB_HOST_GNU_SYSTEM), kfreebsd-gnu)
+  ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
        $(PMAKE) -C $(architecture)/compile/GENERIC depend
   endif
 endif
@@ -119,12 +119,12 @@
        $(REASON)
        $(eval $(which_debdir))
        $(eval $(deb_rule))
-ifeq ($(DEB_HOST_GNU_SYSTEM), kfreebsd-gnu)
+ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
        mkdir -p bin
        ln -sf `which gcc-3.4` bin/cc
        cd $(architecture)/conf && freebsd-config GENERIC
 endif
-ifeq ($(DEB_HOST_GNU_SYSTEM), linux-gnu)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
        $(MAKE) $(EXTRAV_ARG) $(FLAV_ARG) $(CROSS_ARG) ARCH=$(KERNEL_ARCH) \
                 $(config_target)
   ifeq ($(shell if   [ $(VERSION) -gt 2 ]; then                            \
@@ -254,14 +254,14 @@
           mv -f scripts/package/builddeb.kpkg-dist scripts/package/builddeb
        test ! -f scripts/package/Makefile.kpkg-dist ||                     \
           mv -f scripts/package/Makefile.kpkg-dist scripts/package/Makefile
-ifeq ($(DEB_HOST_GNU_SYSTEM), linux-gnu)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
        test ! -f .config  || cp -pf .config config.precious
        test ! -f Makefile || \
             $(MAKE) $(FLAV_ARG) $(EXTRAV_ARG) $(CROSS_ARG) ARCH=$(KERNEL_ARCH) 
distclean
        test ! -f config.precious || mv -f config.precious .config
 else
        rm -f .config
-  ifeq ($(DEB_HOST_GNU_SYSTEM), kfreebsd-gnu)
+  ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
        rm -rf bin
        if test -e $(architecture)/compile/GENERIC ; then     \
          $(PMAKE) -C $(architecture)/compile/GENERIC clean ; \
@@ -310,7 +310,7 @@
                 touch Makefile;                                                
           \
              fi;                                                               
           \
          fi)
-ifeq ($(DEB_HOST_GNU_SYSTEM), linux-gnu)
+ifeq ($(DEB_HOST_ARCH_OS), linux)
        $(MAKE) $(do_parallel) $(EXTRAV_ARG) $(FLAV_ARG) ARCH=$(KERNEL_ARCH) \
                            $(CROSS_ARG) $(target)
   ifneq ($(strip $(shell grep -E ^[^\#]*CONFIG_MODULES $(CONFIG_FILE))),)
@@ -318,7 +318,7 @@
                            $(CROSS_ARG) modules
   endif
 else
-  ifeq ($(DEB_HOST_GNU_SYSTEM), kfreebsd-gnu)
+  ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
        $(PMAKE) -C $(architecture)/compile/GENERIC
   endif
 endif


-- System Information:
Debian Release: lenny/sid
Architecture: armel (armv5tejl)

Kernel: Linux 2.6.18-4-versatile
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages kernel-package depends on:
ii  dpkg                          1.14.3     package maintenance system for Deb
ii  dpkg-dev                      1.14.3     package building tools for Debian
ii  file                          4.20-5     Determines file type using "magic"
ii  gcc [c-compiler]              4:4.1.1-13 The GNU C compiler
ii  gcc-4.1 [c-compiler]          4.1.2-8    The GNU C compiler
ii  gettext                       0.16.1-1   GNU Internationalization utilities
ii  make                          3.81-3     The GNU version of the "make" util
ii  perl                          5.8.8-7    Larry Wall's Practical Extraction 
ii  po-debconf                    1.0.8      manage translated Debconf template

Versions of packages kernel-package recommends:
ii  bzip2                         1.0.3-7    high-quality block-sorting file co
ii  libc6-dev [libc-dev]          2.5-0exp6  GNU C Library: Development Librari

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to