Add support for packaging openflowext.
authorBen Pfaff <blp@nicira.com>
Tue, 21 Oct 2008 23:31:50 +0000 (16:31 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 21 Oct 2008 23:31:50 +0000 (16:31 -0700)
boot.sh
debian/.gitignore
debian/control [deleted file]
debian/control.in [new file with mode: 0644]
debian/openflow-switch.default
debian/openflow-switch.init

diff --git a/boot.sh b/boot.sh
index 6a5ac53db622634ff67b9aeeae65356ed15e036f..0f48d43978745d0fb6d2c48ad4a001d782bda537 100755 (executable)
--- a/boot.sh
+++ b/boot.sh
@@ -22,7 +22,7 @@ done
 
 # Generate list of files in debian/ to distribute.
 (echo '# Automatically generated by boot.sh (from Git tree).' &&
echo 'EXTRA_DIST += \' &&
printf 'EXTRA_DIST += \\\n' &&
  git ls-files debian | grep -v '^debian/\.gitignore$' | 
  sed -e 's/\(.*\)/     \1 \\/' -e '$s/ \\//') > debian/automake.mk
 
@@ -31,10 +31,22 @@ if test "$have_ext" = yes; then
     echo 'Enabling openflowext...'
     echo 'include ext/automake.mk' > ext.mk
     echo 'm4_include([ext/configure.m4])' > ext.m4
+    cat debian/control.in ext/debian/control.in > debian/control
+    for d in $(cd ext/debian && git ls-files --exclude-from=debian/dontlink)
+    do
+        test -e debian/$d || ln -s ../ext/debian/$d debian/$d
+        if ! fgrep -q $d debian/.gitignore; then
+            echo "Adding $d to debian/.gitignore"
+            (cat debian/.gitignore && printf '/%s' "$d") \
+               | LC_ALL=C sort > tmp$$ \
+                && mv tmp$$ debian/.gitignore
+        fi
+    done
 else
     echo 'Disabling openflowext...'
     echo '# This file intentionally left blank.' > ext.mk
     echo '# This file intentionally left blank.' > ext.m4
+    cat debian/control.in > debian/control
 fi
 
 # Bootstrap configure system from .ac/.am files
index 1e6be8eb704f77fe5813bfa8ee9de128344882ab..5d50a1d679c4f212a1535169eb05be41753c72ba 100644 (file)
@@ -1,10 +1,20 @@
 *.debhelper
+*.debhelper.log
 *.substvars
 /automake.mk
+/control
 /files
 /openflow
 /openflow-common
+/openflow-common.copyright
 /openflow-controller
 /openflow-datapath-source
 /openflow-pki
 /openflow-switch
+/openflow-switch.copyright
+/openflow-switchmon
+/openflow-switchmon.copyright
+/openflow-switchmon.default
+/openflow-switchmon.dirs
+/openflow-switchmon.init
+/openflow-switchmon.install
diff --git a/debian/control b/debian/control
deleted file mode 100644 (file)
index 2e61374..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-Source: openflow
-Section: net
-Priority: extra
-Maintainer: OpenFlow Team <openflow-dev@lists.stanford.edu>
-Build-Depends: debhelper (>= 5), autoconf (>= 2.60), automake1.10, libssl-dev, pkg-config (>= 0.21), po-debconf, bzip2, openssl
-Standards-Version: 3.7.3
-
-Package: openflow-datapath-source
-Architecture: all
-Depends: module-assistant, bzip2, debhelper (>= 5.0.37)
-Suggests: openflow-switch
-Description: Source code for OpenFlow datapath Linux module
- This package provides the OpenFlow datapath module source code that
- is needed by the kernel-based OpenFlow switch.  The kernel module can
- be built from it using module-assistant or make-kpkg.  README.Debian
- in this package provides further instructions.
- .
- OpenFlow is a protocol for flow-based control over network switching.
-
-Package: openflow-common
-Architecture: any
-Depends: ${shlibs:Depends}
-Description: OpenFlow common components
- openflow-common provides components required by both openflow-switch
- and openflow-controller.
- .
- OpenFlow is a protocol for flow-based control over network switching.
-
-Package: openflow-switch
-Architecture: any
-Suggests: openflow-datapath-module
-Depends: ${shlibs:Depends}, ${misc:Depends}, openflow-common, libwww-perl, libdigest-sha1-perl, dhcp3-client
-Description: OpenFlow switch implementations
- openflow-switch provides the userspace components and utilities for
- the OpenFlow kernel-based switch.  It also includes a userspace-only
- implementation of an OpenFlow switch.
- .
- OpenFlow is a protocol for flow-based control over network switching.
-
-Package: openflow-pki
-Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, openflow-common, apache2
-Description: OpenFlow public key infrastructure
- openflow-pki provides PKI (public key infrastructure) support for
- OpenFlow switches and controllers, reducing the risk of
- man-in-the-middle attacks on the OpenFlow network infrastructure.
- .
- OpenFlow is a protocol for flow-based control over network switching.
-
-Package: openflow-controller
-Architecture: any
-Depends: ${shlibs:Depends}, openflow-common, openflow-pki
-Description: OpenFlow controller implementation
- The OpenFlow controller enables OpenFlow switches that connect to it
- to act as MAC-learning Ethernet switches.
- .
- OpenFlow is a protocol for flow-based control over network switching.
diff --git a/debian/control.in b/debian/control.in
new file mode 100644 (file)
index 0000000..65d537f
--- /dev/null
@@ -0,0 +1,58 @@
+Source: openflow
+Section: net
+Priority: extra
+Maintainer: OpenFlow Team <openflow-dev@lists.stanford.edu>
+Build-Depends: debhelper (>= 5), autoconf (>= 2.60), automake1.10, libssl-dev, pkg-config (>= 0.21), po-debconf, bzip2, openssl
+Standards-Version: 3.7.3
+
+Package: openflow-datapath-source
+Architecture: all
+Depends: module-assistant, bzip2, debhelper (>= 5.0.37)
+Suggests: openflow-switch
+Description: Source code for OpenFlow datapath Linux module
+ This package provides the OpenFlow datapath module source code that
+ is needed by the kernel-based OpenFlow switch.  The kernel module can
+ be built from it using module-assistant or make-kpkg.  README.Debian
+ in this package provides further instructions.
+ .
+ OpenFlow is a protocol for flow-based control over network switching.
+
+Package: openflow-common
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: OpenFlow common components
+ openflow-common provides components required by both openflow-switch
+ and openflow-controller.
+ .
+ OpenFlow is a protocol for flow-based control over network switching.
+
+Package: openflow-switch
+Architecture: any
+Suggests: openflow-datapath-module
+Depends: ${shlibs:Depends}, ${misc:Depends}, openflow-common, libwww-perl, libdigest-sha1-perl, dhcp3-client
+Description: OpenFlow switch implementations
+ openflow-switch provides the userspace components and utilities for
+ the OpenFlow kernel-based switch.  It also includes a userspace-only
+ implementation of an OpenFlow switch.
+ .
+ OpenFlow is a protocol for flow-based control over network switching.
+
+Package: openflow-pki
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, openflow-common, apache2
+Description: OpenFlow public key infrastructure
+ openflow-pki provides PKI (public key infrastructure) support for
+ OpenFlow switches and controllers, reducing the risk of
+ man-in-the-middle attacks on the OpenFlow network infrastructure.
+ .
+ OpenFlow is a protocol for flow-based control over network switching.
+
+Package: openflow-controller
+Architecture: any
+Depends: ${shlibs:Depends}, openflow-common, openflow-pki
+Description: OpenFlow controller implementation
+ The OpenFlow controller enables OpenFlow switches that connect to it
+ to act as MAC-learning Ethernet switches.
+ .
+ OpenFlow is a protocol for flow-based control over network switching.
+
index e4fb07bc65e76b8b7cefab09528b14ed907f278b..a2b19b2cabe406881301ac4fb68dbeb26950812d 100644 (file)
@@ -78,5 +78,12 @@ SWITCH_IP=dhcp
 # Required if SSL enabled.
 #CACERT=/etc/openflow-switch/cacert.pem
 
-# Additional options to pass to secchan, e.g. "--fail=open"
+# MGMT_VCONNS: List of vconns (space-separated) on which secchan
+# should listen for management connections from dpctl, etc.
+# openflow-switchmon by default connects to
+# unix:/var/run/secchan.socket, so do not disable this if you want to
+# use openflow-switchmon.
+MGMT_VCONNS="punix:/var/run/secchan.socket"
+
+# DAEMON_OPTS: Additional options to pass to secchan, e.g. "--fail=open"
 DAEMON_OPTS=""
index 5d658ed6029d5a0292da34b282e16e14d344d4c3..b4e39afcd64b7b2dcbcf59bb8bd7932120cfc248 100755 (executable)
@@ -27,7 +27,6 @@ test -x $DAEMON || exit 0
 
 LOGDIR=/var/log/openflow
 PIDFILE=/var/run/$NAME.pid
-MGMTSOCK=/var/run/$NAME.socket
 DHCLIENT_PIDFILE=/var/run/dhclient.of0.pid
 DODTIME=1                   # Time to wait for the server to die, in seconds
                             # If this value is set too low you might not
@@ -207,11 +206,15 @@ case "$1" in
             must_succeed "Disabling of0" ifconfig of0 down
         fi
 
+        MGMT_OPTS=
+        for vconn in $MGMT_VCONNS; do
+            MGMT_OPTS="$MGMT_OPTS --listen=$vconn"
+        done
+
        echo -n "Starting $DESC: "
        start-stop-daemon --start --quiet --pidfile $PIDFILE \
            --exec $DAEMON -- nl:0 $CONTROLLER --detach --pidfile=$PIDFILE \
-            --verbose=ANY:console:emer --listen=punix:$MGMTSOCK \
-            $DAEMON_OPTS $SSL_OPTS
+            --verbose=ANY:console:emer $DAEMON_OPTS $MGMT_OPTS $SSL_OPTS
         if running; then
             echo "$NAME."
         else