r2068 - in trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8: . bin debian

Joshua Kwan joshk@haydn.debian.org
Mon, 27 Dec 2004 00:47:01 -0700


Author: joshk
Date: 2004-12-27 00:46:51 -0700 (Mon, 27 Dec 2004)
New Revision: 2068

Added:
   trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/header-install
Modified:
   trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/
   trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/bin/
   trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/debian/changelog
   trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/debian/control
   trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/debian/rules
Log:
fix stuff



Property changes on: trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8
___________________________________________________________________
Name: svn:ignore
   - kernel-source-2.6.7

   + kernel-source-2.6.8
build-*
header-install.out
*-stamp



Property changes on: trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/bin
___________________________________________________________________
Name: svn:ignore
   + touch.orig


Modified: trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/debian/changelog
===================================================================
--- trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/debian/changelog	2004-12-26 22:13:37 UTC (rev 2067)
+++ trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/debian/changelog	2004-12-27 07:46:51 UTC (rev 2068)
@@ -3,6 +3,8 @@
   * Bump soname to 2 due to security fixes which break binary
     compatibility.
   * Build from 2.6.8-11.
+  * Remove bogus export CC := gcc-3.4 that was only used for debugging
+    and caused a FTBFS.
 
  -- Joshua Kwan <joshk@triplehelix.org>  Fri, 24 Dec 2004 14:38:26 -0800
 

Modified: trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/debian/control
===================================================================
--- trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/debian/control	2004-12-26 22:13:37 UTC (rev 2067)
+++ trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/debian/control	2004-12-27 07:46:51 UTC (rev 2068)
@@ -20,7 +20,7 @@
 Architecture: sparc
 Section: devel
 Priority: optional
-Depends: coreutils | fileutils (>= 4.0)
+Depends: coreutils | fileutils (>= 4.0), kernel-kbuild-2.6-3
 Provides: kernel-headers, kernel-headers-2.6
 Description: Header files related to Linux kernel version 2.6.8
  This package provides kernel header files for version 2.6.8, for sites

Modified: trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/debian/rules
===================================================================
--- trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/debian/rules	2004-12-26 22:13:37 UTC (rev 2067)
+++ trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/debian/rules	2004-12-27 07:46:51 UTC (rev 2068)
@@ -24,6 +24,9 @@
 appvan := --append_to_version $(debnum)
 endif
 
+export DEBIAN_SRCTOP := $(CURDIR)/kernel-source-$(version)
+export DEBIAN_UPSTREAM_VERSION := $(version)
+
 flavours := sparc32 sparc64 sparc64-smp #$(shell \
 #	find config -maxdepth 1 -type f ! -name default -printf '%f\n' \
 #)
@@ -33,6 +36,12 @@
 	sed -n 's/.*kernel-tree-\([^,]*\).*/\1/p; t e; b; :e q' \
 		debian/control \
 )
+
+kbpkg := $(shell \
+	sed -n 's/^Depends: .*\(kernel-kbuild-[^ ,]*\).*/\1/p; t e; b; :e q' \
+		debian/control \
+)
+
 kdir := kernel-source-$(version)
 
 ifeq (,$(DEB_HOST_ARCH))
@@ -44,8 +53,6 @@
 CROSS		:= sparc-linux-
 endif
 
-export CC := gcc-3.4
-
 unpack: unpack-stamp
 unpack-stamp:
 	tar jxf /usr/src/kernel-source-$(version).tar.bz2
@@ -69,9 +76,10 @@
 	done
 	cp config/default $(kdir)/.config
 	ln -s `command -v touch` bin/touch.orig
+	sed 's/@kbpkg@/$(kbpkg)/g' header-install > header-install.out
+	chmod u+x header-install.out
+	touch $@
 
-	touch unpack-stamp
-
 build: build-stamp
 build-stamp: unpack-stamp
 	PATH=$$PWD/bin:$$PATH; \
@@ -92,8 +100,8 @@
 	@echo $(debnum)
 
 clean:
-	rm -f *-stamp
-	rm -rf kernel-source-$(version) build-* install-* bin/touch.orig
+	rm -f *-stamp header-install.out
+	rm -rf $(kdir) build-* install-* bin/touch.orig
 	dh_clean
 
 install: build
@@ -107,9 +115,15 @@
 binary-arch: install
 	dh_testdir
 
-	cd kernel-source-$(version); \
+# Link asm-offsets.s into main kernel-headers zone
+	for i in $(flavours); do \
+		karch=$${i%-smp}; karch=$${karch%32}; \
+		ln -f build-$$i/arch/$$karch/kernel/asm-offsets.s $(kdir)/arch/$$karch/kernel/; \
+	done
+
+	cd $(kdir); HEADER_CLEAN_HOOK=$(CURDIR)/header-install.out \
 		make-kpkg --subarch sparc64 $(appvan) kernel-headers
-	mv kernel-source-$(version)/debian/files debian
+	mv $(kdir)/debian/files debian
 
 	for i in $(flavours); do \
 		cp -al build-$$i install-$$i; \

Added: trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/header-install
===================================================================
--- trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/header-install	2004-12-26 22:13:37 UTC (rev 2067)
+++ trunk/kernel/sparc/kernel-image-2.6.8-sparc-2.6.8/header-install	2004-12-27 07:46:51 UTC (rev 2068)
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+set -e
+
+kbpkg=@kbpkg@
+
+cd $DEBIAN_SRCTOP
+{
+	find . -path './scripts/*' -prune -o \
+		-path './Documentation/*' -prune -o \
+		-path './debian/*' -prune -o \
+		-type f \( -name Makefile -o -name 'Kconfig*' \) -print
+	echo arch/sparc/kernel/asm-offsets.s
+	echo arch/sparc64/kernel/asm-offsets.s
+} | cpio -pd --preserve-modification-time $OLDPWD
+cd - > /dev/null
+ln -s ../$kbpkg/scripts .
+
+remove=
+cd include
+for i in asm-*; do
+	case ${i#asm-} in
+	generic | sparc | sparc64)
+		;;
+	*)
+		remove="$remove $i"
+		;;
+	esac
+done
+${remove:+rm -r $remove}