From 51fd48add1a94effa5378803a63d0c5ba9d34a8c Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Mon, 31 Mar 2008 19:47:09 -0400 Subject: [PATCH] Fix the DHCP server (fixes #44) svn path=/trunk/packages/sipb-xen-python-pydhcplib/; revision=377 --- debian/changelog | 6 ++++++ debian/control | 2 +- debian/patches/non-standard-options.patch | 16 ++++++++++++++++ debian/patches/series | 1 + debian/rules | 1 + 5 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 debian/patches/non-standard-options.patch create mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index cb5c741..735571e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +sipb-xen-python-pydhcplib (0.3.2-2) unstable; urgency=low + + * Add a patch to allow DHCP option 119 (domain-search) to work + + -- SIPB Xen Project Mon, 31 Mar 2008 19:33:13 -0400 + sipb-xen-python-pydhcplib (0.3.2-1) unstable; urgency=low * Initial release. diff --git a/debian/control b/debian/control index 68300c1..2368dfa 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: sipb-xen-python-pydhcplib Section: python Priority: extra Maintainer: SIPB Xen Project -Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5), debhelper (>= 5.0.37.2), cdbs (>= 0.4.43), python-all-dev (>= 2.3.5-11), python-support (>= 0.3.2) +Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5), quilt, patchutils (>= 0.2.25), cdbs (>= 0.4.27-1), debhelper (>= 5.0.37.2), cdbs (>= 0.4.43), python-all-dev (>= 2.3.5-11), python-support (>= 0.3.2) Standards-Version: 3.7.2 Package: sipb-xen-python-pydhcplib diff --git a/debian/patches/non-standard-options.patch b/debian/patches/non-standard-options.patch new file mode 100644 index 0000000..53f3605 --- /dev/null +++ b/debian/patches/non-standard-options.patch @@ -0,0 +1,16 @@ +Index: pydhcplib/dhcp_basic_packet.py +=================================================================== +--- sipb-xen-python-pydhcp/pydhcplib/dhcp_basic_packet.py ++++ sipb-xen-python-pydhcp/pydhcplib/dhcp_basic_packet.py +@@ -99,9 +99,9 @@ + "char":[1,0,1], "16-bits":[2,0,1], + "32-bits":[4,0,1], "identifier":[0,2,1]} + +- specs = fields_specs[DhcpOptionsTypes[DhcpOptions[name]]] ++ specs = fields_specs.get(DhcpOptionsTypes[DhcpOptions[name]], []) + length = len(value) +- if (specs[0]!=0 and specs==length) or (specs[1]<=length and length%specs[2]==0): ++ if specs == [] or (specs[0]!=0 and specs==length) or (specs[1]<=length and length%specs[2]==0): + self.options_data[name] = value + return True + else : diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..f87a233 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +non-standard-options.patch diff --git a/debian/rules b/debian/rules index 79ab8a3..45fd6c0 100755 --- a/debian/rules +++ b/debian/rules @@ -4,4 +4,5 @@ DEB_AUTO_UPDATE_DEBIAN_CONTROL=1 DEB_PYTHON_SYSTEM=pysupport include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk include /usr/share/cdbs/1/class/python-distutils.mk -- 1.7.9.5