Break HTTP parts of openflow-pki package into new openflow-pki-server package.
authorBen Pfaff <blp@nicira.com>
Thu, 30 Oct 2008 17:24:02 +0000 (10:24 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 30 Oct 2008 17:24:02 +0000 (10:24 -0700)
debian/control.in
debian/openflow-pki-server.apache2 [new file with mode: 0644]
debian/openflow-pki-server.dirs [new file with mode: 0644]
debian/openflow-pki-server.install [new file with mode: 0644]
debian/openflow-pki-server.postinst [new file with mode: 0755]
debian/openflow-pki.apache2 [deleted file]
debian/openflow-pki.dirs [deleted file]
debian/openflow-pki.install [deleted file]
debian/openflow-pki.postinst
debian/rules

index 65d537f179f502c71ecb3d2ecdc925652077e755..b7aa8b54410f680bcb2e1afd2ba51e1c0054ae02 100644 (file)
@@ -39,7 +39,7 @@ Description: OpenFlow switch implementations
 
 Package: openflow-pki
 Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, openflow-common, apache2
+Depends: ${shlibs:Depends}, ${misc:Depends}, openflow-common
 Description: OpenFlow public key infrastructure
  openflow-pki provides PKI (public key infrastructure) support for
  OpenFlow switches and controllers, reducing the risk of
@@ -47,6 +47,18 @@ Description: OpenFlow public key infrastructure
  .
  OpenFlow is a protocol for flow-based control over network switching.
 
+Package: openflow-pki-server
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, openflow-pki, apache2
+Description: OpenFlow public key infrastructure (HTTP server support)
+ openflow-pki-server provides HTTP access to the OpenFlow PKI (public
+ key infrastructure) maintained on the local machine by the
+ openflow-pki package.  This HTTP access is needed for secure and
+ convenient OpenFlow switch setup using the ofp-switch-setup program
+ in the openflow-switch package.
+ .
+ OpenFlow is a protocol for flow-based control over network switching.
+
 Package: openflow-controller
 Architecture: any
 Depends: ${shlibs:Depends}, openflow-common, openflow-pki
diff --git a/debian/openflow-pki-server.apache2 b/debian/openflow-pki-server.apache2
new file mode 100644 (file)
index 0000000..a341c50
--- /dev/null
@@ -0,0 +1 @@
+Alias /openflow/pki/ /usr/share/openflow/pki/
diff --git a/debian/openflow-pki-server.dirs b/debian/openflow-pki-server.dirs
new file mode 100644 (file)
index 0000000..7307777
--- /dev/null
@@ -0,0 +1 @@
+etc/apache2/sites-available
diff --git a/debian/openflow-pki-server.install b/debian/openflow-pki-server.install
new file mode 100644 (file)
index 0000000..cd530ca
--- /dev/null
@@ -0,0 +1 @@
+_debian/utilities/ofp-pki-cgi usr/lib/cgi-bin
diff --git a/debian/openflow-pki-server.postinst b/debian/openflow-pki-server.postinst
new file mode 100755 (executable)
index 0000000..d161a98
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/sh
+# postinst script for openflow
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+case "$1" in
+    configure)
+        # Enable site under Apache.
+        a2ensite openflow-pki >/dev/null
+        if command -v invoke-rc.d >/dev/null 2>&1; then
+                invoke-rc.d apache2 force-reload || :
+        else
+                [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 force-reload || :
+        fi
+        ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+        ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+        ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/openflow-pki.apache2 b/debian/openflow-pki.apache2
deleted file mode 100644 (file)
index a341c50..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Alias /openflow/pki/ /usr/share/openflow/pki/
diff --git a/debian/openflow-pki.dirs b/debian/openflow-pki.dirs
deleted file mode 100644 (file)
index 7307777..0000000
+++ /dev/null
@@ -1 +0,0 @@
-etc/apache2/sites-available
diff --git a/debian/openflow-pki.install b/debian/openflow-pki.install
deleted file mode 100644 (file)
index cd530ca..0000000
+++ /dev/null
@@ -1 +0,0 @@
-_debian/utilities/ofp-pki-cgi usr/lib/cgi-bin
index 8a687179e7149287da1a16b977a3faeb3fead8dd..5cf6515dbfb12cd82a9ef31ed9f291e2dbdb1064 100755 (executable)
@@ -23,14 +23,6 @@ case "$1" in
         if test ! -d /usr/share/openflow/pki; then
             ofp-pki init
         fi
-
-        # Enable site under Apache.
-        a2ensite openflow-pki >/dev/null
-        if command -v invoke-rc.d >/dev/null 2>&1; then
-                invoke-rc.d apache2 force-reload || :
-        else
-                [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 force-reload || :
-        fi
         ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
index 238414fc80f52dd23008a4864efb869b92f0d666..d5f55c0815077104ffc6526c069a7ab30bd125dc 100755 (executable)
@@ -104,7 +104,7 @@ install-indep: build-indep
        cp _debian/openflow.tar.gz $(MODDIR)
        cd debian; cp changelog control compat *.modules.in rules $(MODDIR)/debian
        cd debian/openflow-datapath-source/usr/src && tar -c modules | bzip2 -9 > openflow-datapath.tar.bz2 && rm -rf modules
-       install -m644 debian/openflow-pki.apache2 debian/openflow-pki/etc/apache2/sites-available/openflow-pki
+       install -m644 debian/openflow-pki-server.apache2 debian/openflow-pki-server/etc/apache2/sites-available/openflow-pki
        dh_install -i
 
 install-arch: build-arch