Fix the DHCP server (fixes #44) sipb-xen-python-pydhcplib/0.3.2-2
authorEvan Broder <broder@mit.edu>
Mon, 31 Mar 2008 23:47:09 +0000 (19:47 -0400)
committerEvan Broder <broder@mit.edu>
Mon, 31 Mar 2008 23:47:09 +0000 (19:47 -0400)
svn path=/trunk/packages/sipb-xen-python-pydhcplib/; revision=377

debian/changelog
debian/control
debian/patches/non-standard-options.patch [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]
debian/rules

index cb5c741..735571e 100644 (file)
@@ -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 <sipb-xen@mit.edu>  Mon, 31 Mar 2008 19:33:13 -0400
+
 sipb-xen-python-pydhcplib (0.3.2-1) unstable; urgency=low
 
   * Initial release.
 sipb-xen-python-pydhcplib (0.3.2-1) unstable; urgency=low
 
   * Initial release.
index 68300c1..2368dfa 100644 (file)
@@ -2,7 +2,7 @@ Source: sipb-xen-python-pydhcplib
 Section: python
 Priority: extra
 Maintainer: SIPB Xen Project <sipb-xen@mit.edu>
 Section: python
 Priority: extra
 Maintainer: SIPB Xen Project <sipb-xen@mit.edu>
-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
 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 (file)
index 0000000..53f3605
--- /dev/null
@@ -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 (file)
index 0000000..f87a233
--- /dev/null
@@ -0,0 +1 @@
+non-standard-options.patch
index 79ab8a3..45fd6c0 100755 (executable)
@@ -4,4 +4,5 @@ DEB_AUTO_UPDATE_DEBIAN_CONTROL=1
 DEB_PYTHON_SYSTEM=pysupport
 
 include /usr/share/cdbs/1/rules/debhelper.mk
 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
 include /usr/share/cdbs/1/class/python-distutils.mk