← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~smoser/maas/packaging.1231693 into lp:~maas-maintainers/maas/packaging

 

Scott Moser has proposed merging lp:~smoser/maas/packaging.1231693 into lp:~maas-maintainers/maas/packaging.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1231693 in MAAS: "maas-dhcp backport does not start on precise"
  https://bugs.launchpad.net/maas/+bug/1231693

For more details, see:
https://code.launchpad.net/~smoser/maas/packaging.1231693/+merge/188932
-- 
https://code.launchpad.net/~smoser/maas/packaging.1231693/+merge/188932
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~smoser/maas/packaging.1231693 into lp:~maas-maintainers/maas/packaging.
=== modified file 'debian/control'
--- debian/control	2013-10-02 19:37:31 +0000
+++ debian/control	2013-10-02 21:34:26 +0000
@@ -249,7 +249,7 @@
 
 Package: maas-dhcp
 Architecture: all
-Depends: isc-dhcp-server, ${misc:Depends}
+Depends: isc-dhcp-server (>= 4.2.4), ${misc:Depends}
 Breaks: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1)
 Replaces: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1)
 Description: Ubuntu MAAS Server - DHCP Configuration (meta-package)

=== modified file 'debian/maas-dhcp.maas-dhcp-server.upstart'
--- debian/maas-dhcp.maas-dhcp-server.upstart	2013-05-21 13:17:57 +0000
+++ debian/maas-dhcp.maas-dhcp-server.upstart	2013-10-02 21:34:26 +0000
@@ -37,7 +37,6 @@
 
 respawn
 script
-    RELEASE=`lsb_release --codename --short`
     INTERFACES=`cat "${INTERFACES_FILE}"`
 
     # Allow dhcp server to write lease and pid file.
@@ -47,22 +46,20 @@
     # As of Quantal, the leases file must be owned by root:root (even though
     # the daemon will run under an unprivileged user).
     # In Precise, ownership was supposed to be dhcpd:dhcpd.
+    #
+    # maas packages on saucy are only supported with newer isc-dhcp via
+    # the cloud-archive.  See bug 1231693 for more information, including
+    # a patch that would actually work to support all, but is complex.
+    
     mkdir -p $LEASES_DIR
-    if [ "$RELEASE" = "precise" ]; then
-        owner_group="dhcpd:dhcpd"
-        dhcpd_owner_opts=""
-    else
-        owner_group="root:root"
-        dhcpd_owner_opts="-user dhcpd -group dhcpd"
-    fi
-    chown $owner_group $LEASES_DIR
+    chown root:root $LEASES_DIR
     [ -e $LEASES_FILE ] || touch $LEASES_FILE
     for LFILE in $LEASES_FILE $LEASES_FILE~; do
         if [ -e $LFILE ]; then
-            chown $owner_group $LFILE
+            chown root:root $LFILE
             chmod a+r $LFILE
         fi
     done
 
-    exec /usr/sbin/dhcpd ${dhcpd_owner_opts} -f -q -4 -pf $PID_FILE -cf $CONFIG_FILE -lf $LEASES_FILE $INTERFACES
+    exec /usr/sbin/dhcpd -user dhcpd -group dhcpd -f -q -4 -pf $PID_FILE -cf $CONFIG_FILE -lf $LEASES_FILE $INTERFACES
 end script


Follow ups