Hi, I had a look to the current packaging of openvswitch, in order to fix this bug (eg: #659685) With all due respect... it's a mess.
The only reason why you are using Quilt is to patch files that are in your openvswitch_<version>.debian.tar.gz. Please don't abuse quilt like this! There's no reason to patch things under the debian folder, it should come already patched. Your debian-changes-1.4.0-2 is reverting some of the patches previously applied, and which would have otherwise let the DKMS module. I have attached a patch which removes all patches in debian/patches, since they aren't needed at all. Also, with this patch, openvswitch-datapath-dkms works as expected (eg: it build the kernel module), because using ${kernel_source_dir} as it should be. Please apply this patch and upload a new 1.4.0-3 of openvswitch. Cheers, Thomas Goirand
diff -u -N -r old/openvswitch-1.4.0/debian/control new/openvswitch-1.4.0/debian/control --- old/openvswitch-1.4.0/debian/control 2012-03-07 06:20:49.000000000 +0000 +++ new/openvswitch-1.4.0/debian/control 2012-03-07 06:25:25.000000000 +0000 @@ -25,7 +25,7 @@ Package: openvswitch-datapath-dkms Architecture: all -Depends: dkms (>= 1.95), make, ${misc:Depends} +Depends: dkms (>= 1.95), make, libc6-dev, ${misc:Depends} Description: Open vSwitch datapath module source - DKMS version This package provides the Open vSwitch datapath module source code that is needed by openvswitch-switch. DKMS can built the kernel diff -u -N -r old/openvswitch-1.4.0/debian/dkms.conf.in new/openvswitch-1.4.0/debian/dkms.conf.in --- old/openvswitch-1.4.0/debian/dkms.conf.in 2012-03-07 06:20:49.000000000 +0000 +++ new/openvswitch-1.4.0/debian/dkms.conf.in 2012-03-07 06:21:34.000000000 +0000 @@ -1,6 +1,6 @@ PACKAGE_NAME="openvswitch" PACKAGE_VERSION="__VERSION__" -MAKE="./configure --with-linux=/usr/src/linux-headers-`uname -r` ; make -C datapath/linux" +MAKE="./configure --with-linux=${kernel_source_dir} && make -C datapath/linux" BUILT_MODULE_NAME[0]=openvswitch_mod BUILT_MODULE_NAME[1]=brcompat_mod BUILT_MODULE_LOCATION[0]=datapath/linux/ diff -u -N -r old/openvswitch-1.4.0/debian/openvswitch-test.install new/openvswitch-1.4.0/debian/openvswitch-test.install --- old/openvswitch-1.4.0/debian/openvswitch-test.install 2012-03-07 06:20:49.000000000 +0000 +++ new/openvswitch-1.4.0/debian/openvswitch-test.install 2012-03-07 06:31:22.000000000 +0000 @@ -1,2 +1,2 @@ -usr/share/openvswitch/python/ovstest usr/lib/python2.4/site-packages/ +usr/share/openvswitch/python/ovstest usr/lib/python2.6/dist-packages/ usr/bin/ovs-test diff -u -N -r old/openvswitch-1.4.0/debian/patches/0001-debian-Do-not-run-make-if-configure-fails-during-DKM.patch new/openvswitch-1.4.0/debian/patches/0001-debian-Do-not-run-make-if-configure-fails-during-DKM.patch --- old/openvswitch-1.4.0/debian/patches/0001-debian-Do-not-run-make-if-configure-fails-during-DKM.patch 2012-02-14 02:41:28.000000000 +0000 +++ new/openvswitch-1.4.0/debian/patches/0001-debian-Do-not-run-make-if-configure-fails-during-DKM.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -From 3d93284f97b96861dbfeec440eda6bb8c7b735c6 Mon Sep 17 00:00:00 2001 -From: Ben Pfaff <b...@nicira.com> -Date: Mon, 13 Feb 2012 10:09:09 -0800 -Subject: [PATCH] debian: Do not run "make" if "configure" fails during DKMS - build. - -There is no point in trying to run "make" if "configure" failed. The -"make" will fail too and the log will be harder to read. - -CC: Thomas Goirand <z...@debian.org> -CC: Simon Horman <ho...@verge.net.au> -Signed-off-by: Ben Pfaff <b...@nicira.com> ---- - debian/dkms.conf.in | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/debian/dkms.conf.in b/debian/dkms.conf.in -index a6dc316..ae1fc7a 100644 ---- a/debian/dkms.conf.in -+++ b/debian/dkms.conf.in -@@ -1,6 +1,6 @@ - PACKAGE_NAME="openvswitch" - PACKAGE_VERSION="__VERSION__" --MAKE="./configure --with-linux=/lib/modules/`uname -r`/build ; make -C datapath/linux" -+MAKE="./configure --with-linux=/lib/modules/`uname -r`/build && make -C datapath/linux" - BUILT_MODULE_NAME[0]=openvswitch_mod - BUILT_MODULE_NAME[1]=brcompat_mod - BUILT_MODULE_LOCATION[0]=datapath/linux/ --- -1.7.6.3 - diff -u -N -r old/openvswitch-1.4.0/debian/patches/0001-debian-Don-t-install-Python-modules-for-obsolete-Pyt.patch new/openvswitch-1.4.0/debian/patches/0001-debian-Don-t-install-Python-modules-for-obsolete-Pyt.patch --- old/openvswitch-1.4.0/debian/patches/0001-debian-Don-t-install-Python-modules-for-obsolete-Pyt.patch 2012-02-14 01:54:40.000000000 +0000 +++ new/openvswitch-1.4.0/debian/patches/0001-debian-Don-t-install-Python-modules-for-obsolete-Pyt.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -From a67fe5159bec790933e61d341cfb7fa27ac786dc Mon Sep 17 00:00:00 2001 -From: Ben Pfaff <b...@nicira.com> -Date: Fri, 3 Feb 2012 13:30:50 -0800 -Subject: [PATCH] debian: Don't install Python modules for obsolete Python - versions. - -Python 2.4 is obsolete, not present in Debian squeeze or sid, so don't -install Python modules for it. - -It would be better to just put the files directly into -/usr/share/pyshared/ovs/, instead of in site-packages for some specific -Python version, but this causes problems for builds on squeeze, as -documented in commit bc3aa0bf5 (debian: Make python-openvswitch packaging -work with squeeze dh_python2.): - - The dh_python2 helper in Debian squeeze has a limitation that is not - mentioned anywhere, as far as I can tell: Python files must be in - /usr/lib/python#.#/site-packages to be installed. The version in Debian - wheezy does not have the same limitation. - - This meant that building the Debian packages on squeeze silently produced - a broken python-openvswitch package, whereas building the same thing on - wheezy built a working package. - - This fixes the problem by putting the .py files where squeeze expects them. - It works on wheezy too. - -A before-and-after "debdiff" shows that the only significant effect of this -commit is to drop python2.4 symlinks. - -CC: ho...@debian.org -Reported-by: Luca Falavigna <ftpmas...@debian.org> -Signed-off-by: Ben Pfaff <b...@nicira.com> - -index a152aff..a36c828 100644 ---- a/debian/openvswitch-test.install -+++ b/debian/openvswitch-test.install -@@ -1,2 +1,2 @@ --usr/share/openvswitch/python/ovstest usr/lib/python2.4/site-packages/ -+usr/share/openvswitch/python/ovstest usr/lib/python2.6/dist-packages/ - usr/bin/ovs-test -diff --git a/debian/python-openvswitch.install b/debian/python-openvswitch.install -index 6779298..9387e68 100644 ---- a/debian/python-openvswitch.install -+++ b/debian/python-openvswitch.install -@@ -1 +1 @@ --usr/share/openvswitch/python/ovs usr/lib/python2.4/site-packages/ -+usr/share/openvswitch/python/ovs usr/lib/python2.6/dist-packages/ --- -1.7.6.3 - diff -u -N -r old/openvswitch-1.4.0/debian/patches/0001-debian-Fix-dependencies-for-openvswitch-datapath-dkm.patch new/openvswitch-1.4.0/debian/patches/0001-debian-Fix-dependencies-for-openvswitch-datapath-dkm.patch --- old/openvswitch-1.4.0/debian/patches/0001-debian-Fix-dependencies-for-openvswitch-datapath-dkm.patch 2012-02-14 01:45:05.000000000 +0000 +++ new/openvswitch-1.4.0/debian/patches/0001-debian-Fix-dependencies-for-openvswitch-datapath-dkm.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -From 30ee46f95c0b16e0e58d059d9c6d71f2e51ac303 Mon Sep 17 00:00:00 2001 -From: Ben Pfaff <b...@nicira.com> -Date: Fri, 10 Feb 2012 11:00:54 -0800 -Subject: [PATCH 1/2] debian: Fix dependencies for openvswitch-datapath-dkms - package. - -The OVS kernel module, like other kernel modules, does not need a working -userspace build environment, but the OVS "configure" script and makefiles -don't support a kernel-only build, so "configure" fails if libc6-dev is -not installed. - -It would be better to change the "configure" script and makefiles to handle -this special case, but that was more work than I initially expected it to -be. - -Bug #8606. -Reported-by: Edwin Chiu <ec...@nicira.com> -Signed-off-by: Ben Pfaff <b...@nicira.com> ---- - debian/control | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/debian/control b/debian/control -index 4f71465..09a26b1 100644 ---- a/debian/control -+++ b/debian/control -@@ -25,7 +25,7 @@ Description: Open vSwitch datapath module source - module-assistant version - - Package: openvswitch-datapath-dkms - Architecture: all --Depends: dkms (>= 1.95), make, ${misc:Depends} -+Depends: dkms (>= 1.95), make, libc6-dev, ${misc:Depends} - Description: Open vSwitch datapath module source - DKMS version - This package provides the Open vSwitch datapath module source code - that is needed by openvswitch-switch. DKMS can built the kernel --- -1.7.6.3 - diff -u -N -r old/openvswitch-1.4.0/debian/patches/0001-debian-Use-provided-kernel-source-dir.patch new/openvswitch-1.4.0/debian/patches/0001-debian-Use-provided-kernel-source-dir.patch --- old/openvswitch-1.4.0/debian/patches/0001-debian-Use-provided-kernel-source-dir.patch 2012-02-14 02:41:14.000000000 +0000 +++ new/openvswitch-1.4.0/debian/patches/0001-debian-Use-provided-kernel-source-dir.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ -Return-Path: <dev-boun...@openvswitch.org> -X-Spam-Checker-Version: SpamAssassin 3.2.5-kirsty.vergenet.net_2010071208 - (2008-06-10) on kirsty.vergenet.net -X-Spam-Level: -X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham - version=3.2.5-kirsty.vergenet.net_2010071208 -X-Original-To: ho...@verge.net.au -Delivered-To: ho...@vergenet.net -Received: from mail.au.vergenet.net [2406:a000:f000:9500::3] - by joe.kanocho.kobe.vergenet.net with IMAP (fetchmail-6.3.18) - for <horms@localhost> (single-drop); Tue, 14 Feb 2012 09:32:07 +0900 (JST) -Received: from archives.nicira.com (li205-44.members.linode.com [173.255.195.44]) - by kirsty.vergenet.net (Postfix) with ESMTP id 7E24025BE8B - for <ho...@verge.net.au>; Tue, 14 Feb 2012 11:15:26 +1100 (EST) -Received: from li205-44.members.linode.com (localhost [127.0.0.1]) - by archives.nicira.com (Postfix) with ESMTP id 49D2216575; - Mon, 13 Feb 2012 16:15:26 -0800 (PST) -X-Original-To: d...@openvswitch.org -Delivered-To: d...@openvswitch.org -Received: from mail-pz0-f49.google.com (mail-pz0-f49.google.com - [209.85.210.49]) - by archives.nicira.com (Postfix) with ESMTPS id 29199164F4 - for <d...@openvswitch.org>; Mon, 13 Feb 2012 16:15:24 -0800 (PST) -Received: by dakp5 with SMTP id p5so6268325dak.22 - for <d...@openvswitch.org>; Mon, 13 Feb 2012 16:15:23 -0800 (PST) -MIME-Version: 1.0 -Received: by 10.68.228.137 with SMTP id si9mr52557629pbc.24.1329178523353; - Mon, 13 Feb 2012 16:15:23 -0800 (PST) -Received: from localhost.localdomain - (107-0-204-137-ip-static.hfc.comcastbusiness.net. [107.0.204.137]) - by mx.google.com with ESMTPS id t10sm43084965pbb.18.2012.02.13.16.15.21 - (version=TLSv1/SSLv3 cipher=OTHER); - Mon, 13 Feb 2012 16:15:22 -0800 (PST) -From: Ben Pfaff <b...@nicira.com> -To: d...@openvswitch.org -Date: Mon, 13 Feb 2012 16:15:17 -0800 -Message-Id: <1329178517-6137-1-git-send-email-...@nicira.com> -X-Mailer: git-send-email 1.7.2.5 -X-Gm-Message-State: ALoCoQlVfmkHrc2GppOHIkw9xtdYwlLlkxf5qOjjh9NTmHWR1EH1L9AkoVf2n8fR6xZK6+5CIQfS -Cc: Ben Pfaff <b...@nicira.com>, Thomas Goirand <tho...@goirand.fr>, - 659...@bugs.debian.org -Subject: [ovs-dev] [PATCH] debian: Use provided kernel source dir instead of - host kernel version. -X-BeenThere: d...@openvswitch.org -X-Mailman-Version: 2.1.11 -Precedence: list -List-Id: <dev.openvswitch.org> -List-Unsubscribe: <http://openvswitch.org/mailman/options/dev>, - <mailto:dev-requ...@openvswitch.org?subject=unsubscribe> -List-Archive: <http://openvswitch.org/pipermail/dev> -List-Post: <mailto:d...@openvswitch.org> -List-Help: <mailto:dev-requ...@openvswitch.org?subject=help> -List-Subscribe: <http://openvswitch.org/mailman/listinfo/dev>, - <mailto:dev-requ...@openvswitch.org?subject=subscribe> -Content-Type: text/plain; charset="us-ascii" -Content-Transfer-Encoding: 7bit -Sender: dev-boun...@openvswitch.org -Errors-To: dev-boun...@openvswitch.org -X-Loop: oathstix_finish by kirsty.vergenet.net -X-Loop: oathstix_finish by joe - -DKMS passes in an explicit variable for the kernel source directory, so we -should use that instead of `uname -r`. - -CC: 659...@bugs.debian.org -Reported-by: Thomas Goirand <tho...@goirand.fr> -Signed-off-by: Ben Pfaff <b...@nicira.com> ---- - debian/dkms.conf.in | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/debian/dkms.conf.in b/debian/dkms.conf.in -index ae1fc7a..d5bc37e 100644 ---- a/debian/dkms.conf.in -+++ b/debian/dkms.conf.in -@@ -1,6 +1,6 @@ - PACKAGE_NAME="openvswitch" - PACKAGE_VERSION="__VERSION__" --MAKE="./configure --with-linux=/lib/modules/`uname -r`/build && make -C datapath/linux" -+MAKE="./configure --with-linux='${kernel_source_dir}' && make -C datapath/linux" - BUILT_MODULE_NAME[0]=openvswitch_mod - BUILT_MODULE_NAME[1]=brcompat_mod - BUILT_MODULE_LOCATION[0]=datapath/linux/ --- -1.7.2.5 - -_______________________________________________ -dev mailing list -d...@openvswitch.org -http://openvswitch.org/mailman/listinfo/dev - diff -u -N -r old/openvswitch-1.4.0/debian/patches/0002-debian-Look-in-lib-modules-instead-of-usr-src-for-DK.patch new/openvswitch-1.4.0/debian/patches/0002-debian-Look-in-lib-modules-instead-of-usr-src-for-DK.patch --- old/openvswitch-1.4.0/debian/patches/0002-debian-Look-in-lib-modules-instead-of-usr-src-for-DK.patch 2012-02-14 01:52:49.000000000 +0000 +++ new/openvswitch-1.4.0/debian/patches/0002-debian-Look-in-lib-modules-instead-of-usr-src-for-DK.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -From 8c36bdd19fafc517b135f744613dfb10e06475f3 Mon Sep 17 00:00:00 2001 -From: Ben Pfaff <b...@nicira.com> -Date: Tue, 10 Jan 2012 14:22:22 -0800 -Subject: [PATCH 2/2] debian: Look in /lib/modules instead of /usr/src for - DKMS kernel sources. - -DKMS packages usually look in /lib/modules for kernel sources, since that -is the "standard" location, but our packages was looking directly in -/usr/src. This fixes the problem. - -Reported-by: Alban Browaeys <pra...@yahoo.com> -Tested-by: Alban Browaeys <pra...@yahoo.com> -Signed-off-by: Ben Pfaff <b...@nicira.com> - ---- a/debian/dkms.conf.in -+++ b/debian/dkms.conf.in -@@ -1,6 +1,6 @@ - PACKAGE_NAME="openvswitch" - PACKAGE_VERSION="__VERSION__" --MAKE="./configure --with-linux=/usr/src/linux-headers-`uname -r` ; make -C datapath/linux" -+MAKE="./configure --with-linux=/lib/modules/`uname -r`/build ; make -C datapath/linux" - BUILT_MODULE_NAME[0]=openvswitch_mod - BUILT_MODULE_NAME[1]=brcompat_mod - BUILT_MODULE_LOCATION[0]=datapath/linux/ --- -1.7.6.3 - diff -u -N -r old/openvswitch-1.4.0/debian/patches/debian-changes-1.4.0-2 new/openvswitch-1.4.0/debian/patches/debian-changes-1.4.0-2 --- old/openvswitch-1.4.0/debian/patches/debian-changes-1.4.0-2 2012-02-14 02:43:24.000000000 +0000 +++ new/openvswitch-1.4.0/debian/patches/debian-changes-1.4.0-2 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -Description: Upstream changes introduced in version 1.4.0-2 - This patch has been created by dpkg-source during the package build. - Here's the last changelog entry, hopefully it gives details on why - those changes were made: - . - openvswitch (1.4.0-2) unstable; urgency=low - . - * Use explicit DKMS variable for kernel source directory - - 0001-debian-Fix-dependencies-for-openvswitch-datapath-dkm.patch - - 0002-debian-Look-in-lib-modules-instead-of-usr-src-for-DK.patch - - 0001-debian-Use-provided-kernel-source-dir.patch - - 0001-debian-Do-not-run-make-if-configure-fails-during-DKM.patch - - (closes: #659685) - * Don't install Python modules for obsolete Python versions - - 0001-debian-Don-t-install-Python-modules-for-obsolete-Pyt.patch - . - The person named in the Author field signed this changelog entry. -Author: Simon Horman <ho...@debian.org> -Bug-Debian: http://bugs.debian.org/659685 - ---- -The information above should follow the Patch Tagging Guidelines, please -checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here -are templates for supplementary fields that you might want to add: - -Origin: <vendor|upstream|other>, <url of original patch> -Bug: <url in upstream bugtracker> -Bug-Debian: http://bugs.debian.org/<bugnumber> -Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber> -Forwarded: <no|not-needed|url proving that it has been forwarded> -Reviewed-By: <name and email of someone who approved the patch> -Last-Update: <YYYY-MM-DD> - ---- openvswitch-1.4.0.orig/AUTHORS -+++ openvswitch-1.4.0/AUTHORS -@@ -89,6 +89,7 @@ Joan Cirer j...@ev0.net - John Galgay j...@galgay.net - Koichi Yagishita yagishita.koi...@jrc.co.jp - Krishna Miriyala kris...@nicira.com -+Luca Falavigna dktrkr...@debian.org - Luiz Henrique Ozaki luiz.oz...@gmail.com - Michael A. Collins mike.a.coll...@ark-net.org - Michael Hu m...@nicira.com ---- openvswitch-1.4.0.orig/debian/openvswitch-test.install -+++ openvswitch-1.4.0/debian/openvswitch-test.install -@@ -1,2 +1,2 @@ --usr/share/openvswitch/python/ovstest usr/lib/python2.6/dist-packages/ -+usr/share/openvswitch/python/ovstest usr/lib/python2.4/site-packages/ - usr/bin/ovs-test ---- openvswitch-1.4.0.orig/debian/control -+++ openvswitch-1.4.0/debian/control -@@ -25,7 +25,7 @@ Description: Open vSwitch datapath modul - - Package: openvswitch-datapath-dkms - Architecture: all --Depends: dkms (>= 1.95), make, libc6-dev, ${misc:Depends} -+Depends: dkms (>= 1.95), make, ${misc:Depends} - Description: Open vSwitch datapath module source - DKMS version - This package provides the Open vSwitch datapath module source code - that is needed by openvswitch-switch. DKMS can built the kernel ---- openvswitch-1.4.0.orig/debian/dkms.conf.in -+++ openvswitch-1.4.0/debian/dkms.conf.in -@@ -1,6 +1,6 @@ - PACKAGE_NAME="openvswitch" - PACKAGE_VERSION="__VERSION__" --MAKE="./configure --with-linux='${kernel_source_dir}' && make -C datapath/linux" -+MAKE="./configure --with-linux=/usr/src/linux-headers-`uname -r` ; make -C datapath/linux" - BUILT_MODULE_NAME[0]=openvswitch_mod - BUILT_MODULE_NAME[1]=brcompat_mod - BUILT_MODULE_LOCATION[0]=datapath/linux/ ---- openvswitch-1.4.0.orig/debian/python-openvswitch.install -+++ openvswitch-1.4.0/debian/python-openvswitch.install -@@ -1 +1 @@ --usr/share/openvswitch/python/ovs usr/lib/python2.6/dist-packages/ -+usr/share/openvswitch/python/ovs usr/lib/python2.4/site-packages/ diff -u -N -r old/openvswitch-1.4.0/debian/patches/series new/openvswitch-1.4.0/debian/patches/series --- old/openvswitch-1.4.0/debian/patches/series 2012-02-14 02:43:24.000000000 +0000 +++ new/openvswitch-1.4.0/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -0001-debian-Don-t-install-Python-modules-for-obsolete-Pyt.patch -0001-debian-Fix-dependencies-for-openvswitch-datapath-dkm.patch -0002-debian-Look-in-lib-modules-instead-of-usr-src-for-DK.patch -0001-debian-Do-not-run-make-if-configure-fails-during-DKM.patch -0001-debian-Use-provided-kernel-source-dir.patch - -debian-changes-1.4.0-2 diff -u -N -r old/openvswitch-1.4.0/debian/python-openvswitch.install new/openvswitch-1.4.0/debian/python-openvswitch.install --- old/openvswitch-1.4.0/debian/python-openvswitch.install 2012-03-07 06:20:49.000000000 +0000 +++ new/openvswitch-1.4.0/debian/python-openvswitch.install 2012-03-07 06:32:00.000000000 +0000 @@ -1 +1 @@ -usr/share/openvswitch/python/ovs usr/lib/python2.4/site-packages/ +usr/share/openvswitch/python/ovs usr/lib/python2.6/dist-packages/