[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#456490: qc-usb-source: please add kernel 2.6.24 compatibility



Package: qc-usb-source
Version: 0.6.6-2
Severity: wishlist

*** Please type your report below this line ***

Trying to build qc-usb against kernel 2.6.24-rc5-git3 fails with the 
following error message:

mkdir -p /tmp/pkg/modules/qc-usb-source/.tmp_versions ; rm -f /tmp/pkg/modules/qc-usb-source/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/pkg/modules/qc-usb-source
  gcc -Wp,-MD,/tmp/pkg/modules/qc-usb-source/.qc-driver.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.2.3/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2  -mtune=generic -m64 -mno-red-zone -mcmodel=kernel -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -fomit-frame-pointer  -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign   -DNOKERNEL -DHAVE_UTSRELEASE_H=1  -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(qc_driver)"  -D"KBUILD_MODNAME=KBUILD_STR(quickcam)" -c -o /tmp/pkg/modules/qc-usb-source/.tmp_qc-driver.o /tmp/pkg/modules/qc-usb-source/qc-driver.c
In file included from /tmp/pkg/modules/qc-usb-source/qc-driver.c:47:
/tmp/pkg/modules/qc-usb-source/quickcam.h:129:1: warning: "BIT" redefined
In file included from include/linux/kernel.h:15,
                 from include/linux/cache.h:4,
                 from include/linux/time.h:7,
                 from include/linux/videodev2.h:59,
                 from include/linux/videodev.h:15,
                 from /tmp/pkg/modules/qc-usb-source/quickcam.h:95,
                 from /tmp/pkg/modules/qc-usb-source/qc-driver.c:47:
include/linux/bitops.h:6:1: warning: this is the location of the previous definition
/tmp/pkg/modules/qc-usb-source/qc-driver.c: In function 'qc_i2c_init':
/tmp/pkg/modules/qc-usb-source/qc-driver.c:824: error: 'struct urb' has no member named 'lock'
/tmp/pkg/modules/qc-usb-source/qc-driver.c:825: warning: assignment from incompatible pointer type
/tmp/pkg/modules/qc-usb-source/qc-driver.c: In function 'qc_isoc_start':
/tmp/pkg/modules/qc-usb-source/qc-driver.c:1867: warning: assignment from incompatible pointer type
/tmp/pkg/modules/qc-usb-source/qc-driver.c: At top level:
/tmp/pkg/modules/qc-usb-source/qc-driver.c:2998: warning: initialization from incompatible pointer type
/tmp/pkg/modules/qc-usb-source/qc-driver.c:3009: error: unknown field 'hardware' specified in initializer
make[6]: *** [/tmp/pkg/modules/qc-usb-source/qc-driver.o] Error 1
make[5]: *** [_module_/tmp/pkg/modules/qc-usb-source] Error 2 

The attached patch "02_kcompat-2.6.24.dpatch" fixes compilation and has 
been confirmed to be working on an i386 system.

"qc-usb_debdiff_use-depatch_bts445434_kcompat-2.6.24.diff" moves the 
already applied patches (Makefile --> 01_makefile.dpatch) under dpatch 
control (debian/control, debian/control, debian/patches/00list, 
debian/rules), fixes #445434 (debian/rules), fixes the lintian complaints 
about ignored clean errors, bumps the standards version to 3.7.3 and adds 
"02_kcompat-2.6.24.dpatch".

 Makefile                                |   16 ++++-----
 debian/control                          |    4 +-
 debian/patches/00list                   |    2 +
 debian/patches/01_makefile.dpatch       |   52 ++++++++++++++++++++++++++++++++
 debian/patches/02_kcompat-2.6.24.dpatch |   43 ++++++++++++++++++++++++++
 debian/rules                            |   12 ++++---
 6 files changed, 115 insertions(+), 14 deletions(-)

Proposed changelog entries:
  * use dpatch for patch management.
  * add kdist target for make-kpkg (Closes: #445434).
  * add kernel 2.6.24 compatibility (Closes: $THIS_BUG).
  * don't ignore make clean error.
  * bump standards version to 3.7.3 (no changes necessary).

Regards
	Stefan Lippers-Hollmann

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-rc5-git1-slh64-smp-1 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages qc-usb-source depends on:
ii  debhelper                     5.0.62     helper programs for debian/rules

Versions of packages qc-usb-source recommends:
ii  kernel-package                11.001     A utility for building Linux kerne

-- no debconf information

Attachment: 02_kcompat-2.6.24.dpatch
Description: application/shellscript

diff -u qc-usb-0.6.6/debian/rules qc-usb-0.6.6/debian/rules
--- qc-usb-0.6.6/debian/rules
+++ qc-usb-0.6.6/debian/rules
@@ -2,6 +2,9 @@
 
 #export DH_OPTIONS=""
 
+# Include dpatch stuff.
+include /usr/share/dpatch/dpatch.make
+
 # unset ROOT_CMD if already running as root
 ifeq ($(shell id -u),0)
 ROOT_CMD =
@@ -129,6 +132,7 @@
 kdist_image:
 	$(ROOT_CMD) $(MAKE) -f debian/rules clean binary-modules
 
+kdist: kdist_image
 
 # the kdist_clean target is called by make-kpkg modules_clean. It is
 # responsible for cleaning up any changes that have been made by the
@@ -139,7 +143,7 @@
 # the binary-source target creates the kernmod-source package. It does
 # this by copying the entire package source into debian/tmp and running
 # clean in the copy
-binary-source: 
+binary-source: patch-stamp
 # Perform some simple tests
 	dh_testdir
 	dh_testroot
@@ -237,7 +241,7 @@
 	dh_testdir
 	dh_testroot
 
-	-$(MAKE) VERSION_CODE=4 clean
+	[ ! -f Makefile ] || $(MAKE) VERSION_CODE=4 clean
 	-rm -rf debian/$(package)-modules-*
 	-rm -f debian/control.modules
 
@@ -250,2 +254,2 @@
-.PHONY: binary binary-indep binary-arch kdist_config kdist_image kdist_clean \
-	binary-source binary-modules binary-common clean
+.PHONY: binary binary-indep binary-arch kdist kdist_config kdist_image \
+	kdist_clean binary-source binary-modules binary-common clean
diff -u qc-usb-0.6.6/debian/control qc-usb-0.6.6/debian/control
--- qc-usb-0.6.6/debian/control
+++ qc-usb-0.6.6/debian/control
@@ -1,9 +1,9 @@
 Source: qc-usb
 Section: misc
 Priority: extra
-Build-Depends: debhelper (>> 4.0.0)
+Build-Depends: debhelper (>> 4.0.0), dpatch
 Maintainer: Debian QA Group <packages@qa.debian.org>
-Standards-Version: 3.7.2.2
+Standards-Version: 3.7.3
 XS-Vcs-Git: git://git.debian.org/git/collab-maint/qc-usb.git
 XS-Vcs-Browser: http://git.debian.org/?p=collab-maint/qc-usb.git
 
reverted:
--- qc-usb-0.6.6/Makefile
+++ qc-usb-0.6.6.orig/Makefile
@@ -72,7 +72,7 @@
 
 ARCH    := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 INSTALL := $(shell which install)
+DEPMOD  := $(shell which depmod || which /sbin/depmod || echo "true You should now run depmod")
-DEPMOD  := $(shell echo "true You should now run depmod")
 
 # Get VERSION_CODE (from version.h in kernel source directory)
 VERSION_CODE := $(shell awk '/[ 	]*\#[ 	]*define[ 	]*LINUX_VERSION_CODE[ 	]*/ { print $$3 }' $(LINUX_DIR)/include/linux/version.h|tail -n 1)
@@ -141,16 +141,16 @@
 # By not including Makefile, kernel headers are sufficient for compilation.
 # Otherwise, full kernel source package is required to be installed.
 ifeq ($(ARCH),alpha)
+include $(LINUX_DIR)/Rules.make
+include $(LINUX_DIR)/arch/$(ARCH)/Makefile
--include $(LINUX_DIR)/Rules.make
--include $(LINUX_DIR)/arch/$(ARCH)/Makefile
 endif
 ifeq ($(ARCH),sparc)
+include $(LINUX_DIR)/Rules.make
+include $(LINUX_DIR)/arch/$(ARCH)/Makefile
--include $(LINUX_DIR)/Rules.make
--include $(LINUX_DIR)/arch/$(ARCH)/Makefile
 endif
 ifeq ($(ARCH),sparc64)
+include $(LINUX_DIR)/Rules.make
+include $(LINUX_DIR)/arch/$(ARCH)/Makefile
--include $(LINUX_DIR)/Rules.make
--include $(LINUX_DIR)/arch/$(ARCH)/Makefile
 endif
 
 ifndef LD
@@ -179,7 +179,7 @@
 .PHONY: install
 install: $(MODULE_NAME)
 	$(INSTALL) -c -D -m 644 $(MODULE_NAME) $(MODULE_DIR)/misc/$(MODULE_NAME)
+	$(INSTALL) -c -D -m 755 qcset $(PREFIX)/bin/qcset
-#	$(INSTALL) -c -D -m 755 qcset $(PREFIX)/bin/qcset
 	-$(DEPMOD) -a
 
 qcset: qcset.c quickcam.h
only in patch2:
unchanged:
--- qc-usb-0.6.6.orig/debian/patches/00list
+++ qc-usb-0.6.6/debian/patches/00list
@@ -0,0 +1,2 @@
+01_makefile.dpatch
+02_kcompat-2.6.24.dpatch
only in patch2:
unchanged:
--- qc-usb-0.6.6.orig/debian/patches/01_makefile.dpatch
+++ qc-usb-0.6.6/debian/patches/01_makefile.dpatch
@@ -0,0 +1,52 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_makefile.dpatch by Stefan Lippers-Hollmann <s.l-h@gmx.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: import previous patches into dpatch
+## DP: don't run depmod, various packaging related changes.
+
+@DPATCH@
+diff -urNad qc-usb-0.6.6~/Makefile qc-usb-0.6.6/Makefile
+--- qc-usb-0.6.6~/Makefile	2007-12-09 17:10:46.000000000 +0100
++++ qc-usb-0.6.6/Makefile	2007-12-09 17:15:22.000000000 +0100
+@@ -72,7 +72,7 @@
+ 
+ ARCH    := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
+ INSTALL := $(shell which install)
+-DEPMOD  := $(shell which depmod || which /sbin/depmod || echo "true You should now run depmod")
++DEPMOD  := $(shell echo "true You should now run depmod")
+ 
+ # Get VERSION_CODE (from version.h in kernel source directory)
+ VERSION_CODE := $(shell awk '/[ 	]*\#[ 	]*define[ 	]*LINUX_VERSION_CODE[ 	]*/ { print $$3 }' $(LINUX_DIR)/include/linux/version.h|tail -n 1)
+@@ -141,16 +141,16 @@
+ # By not including Makefile, kernel headers are sufficient for compilation.
+ # Otherwise, full kernel source package is required to be installed.
+ ifeq ($(ARCH),alpha)
+-include $(LINUX_DIR)/Rules.make
+-include $(LINUX_DIR)/arch/$(ARCH)/Makefile
++-include $(LINUX_DIR)/Rules.make
++-include $(LINUX_DIR)/arch/$(ARCH)/Makefile
+ endif
+ ifeq ($(ARCH),sparc)
+-include $(LINUX_DIR)/Rules.make
+-include $(LINUX_DIR)/arch/$(ARCH)/Makefile
++-include $(LINUX_DIR)/Rules.make
++-include $(LINUX_DIR)/arch/$(ARCH)/Makefile
+ endif
+ ifeq ($(ARCH),sparc64)
+-include $(LINUX_DIR)/Rules.make
+-include $(LINUX_DIR)/arch/$(ARCH)/Makefile
++-include $(LINUX_DIR)/Rules.make
++-include $(LINUX_DIR)/arch/$(ARCH)/Makefile
+ endif
+ 
+ ifndef LD
+@@ -179,7 +179,7 @@
+ .PHONY: install
+ install: $(MODULE_NAME)
+ 	$(INSTALL) -c -D -m 644 $(MODULE_NAME) $(MODULE_DIR)/misc/$(MODULE_NAME)
+-	$(INSTALL) -c -D -m 755 qcset $(PREFIX)/bin/qcset
++#	$(INSTALL) -c -D -m 755 qcset $(PREFIX)/bin/qcset
+ 	-$(DEPMOD) -a
+ 
+ qcset: qcset.c quickcam.h
only in patch2:
unchanged:
--- qc-usb-0.6.6.orig/debian/patches/02_kcompat-2.6.24.dpatch
+++ qc-usb-0.6.6/debian/patches/02_kcompat-2.6.24.dpatch
@@ -0,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_kcompat-2.6.24.dpatch by Stefan Lippers-Hollmann <s.l-h@gmx.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fix kernel 2.6.24 compatibility.
+
+@DPATCH@
+diff -urNad qc-usb-0.6.6~/qc-driver.c qc-usb-0.6.6/qc-driver.c
+--- qc-usb-0.6.6~/qc-driver.c	2006-10-24 04:06:19.000000000 +0200
++++ qc-usb-0.6.6/qc-driver.c	2007-12-09 17:20:30.000000000 +0100
+@@ -821,7 +821,9 @@
+ 	if (!cr) goto fail2;
+ 	urb->transfer_buffer = kmalloc(qc_i2c_maxbufsize*sizeof(u8), GFP_KERNEL);	/* Allocate maximum ever needed */
+ 	if (!urb->transfer_buffer) goto fail3;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+ 	spin_lock_init(&urb->lock);
++#endif
+ 	urb->complete = qc_i2c_handler;
+ 	urb->context  = qc;
+ #if (LINUX_VERSION_CODE<KERNEL_VERSION(2,6,9) && !defined(CONFIG_SUSE_KERNEL)) || LINUX_VERSION_CODE<KERNEL_VERSION(2,6,8)
+@@ -3006,7 +3008,9 @@
+ static struct video_device qc_v4l_template = {
+ 	name:		"QuickCam USB",
+ 	type:		VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+ 	hardware:	VID_HARDWARE_QCAM_USB,
++#endif
+ 	minor:		-1,
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+ 	release:	qc_v4l_release,
+diff -urNad qc-usb-0.6.6~/quickcam.h qc-usb-0.6.6/quickcam.h
+--- qc-usb-0.6.6~/quickcam.h	2006-11-04 14:38:27.000000000 +0100
++++ qc-usb-0.6.6/quickcam.h	2007-12-09 17:17:01.000000000 +0100
+@@ -126,7 +126,9 @@
+ #define FALSE			0
+ #define TRUE			(!FALSE)
+ typedef unsigned char Bool;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+ #define BIT(x)		(1<<(x))
++#endif
+ #define SIZE(a)		(sizeof(a)/sizeof((a)[0]))
+ #define MAX(a,b)	((a)>(b)?(a):(b))
+ #define MIN(a,b)	((a)<(b)?(a):(b))

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: