debian: Remove old PKI directory migration code
authorAnsis Atteka <aatteka@nicira.com>
Wed, 23 Dec 2015 02:23:42 +0000 (18:23 -0800)
committerAnsis Atteka <aatteka@nicira.com>
Wed, 23 Dec 2015 21:17:52 +0000 (13:17 -0800)
Open vSwitch 1.3 and older was creating certificates and private
key in /usr/share/openvswitch/pki.  However, since PKI directory
is mutable, then this was considered a bug and PKI directory was
moved to /var directory in Open vSwitch 1.4 Commit 14bd2d51 (debian:
Move PKI directory to FHS-compliant location.)

Note, that Ubuntu 12.04 already was shipping with Open vSwitch 1.4
and should have created (in case of fresh install) or moved (in
case of upgrade from Open vSwitch 1.3) this directory to the right
location.

So I am inclined to remove this code because the only reason for it
to exist would be, if someone would be upgrading from Open vSwitch
1.3 or older version directly to 2.5 without using any intermediary
upgrade releases.

Signed-Off-By: Ansis Atteka <aatteka@nicira.com>
Acked-by: Ben Pfaff <blp@ovn.org>
debian/openvswitch-pki.postinst
debian/openvswitch-pki.postrm
debian/openvswitch-testcontroller.postinst

index f4705e9..75b4777 100755 (executable)
@@ -19,14 +19,6 @@ set -e
 
 case "$1" in
     configure)
-        # Move the pki directory from its previous, non FHS-compliant location,
-        # to its new location, leaving behind a symlink for compatibility.
-        if test -d /usr/share/openvswitch/pki && \
-           test ! -e /var/lib/openvswitch/pki; then
-            mv /usr/share/openvswitch/pki /var/lib/openvswitch
-            ln -s /var/lib/openvswitch/pki /usr/share/openvswitch/pki
-        fi
-
         # Create certificate authorities.
         if test ! -e /var/lib/openvswitch/pki; then
             ovs-pki init
index bc91e13..5db4d6b 100755 (executable)
@@ -22,11 +22,6 @@ set -e
 case "$1" in
     purge)
         rm -f /var/log/openvswitch/ovs-pki.log* || true
-
-        # Remove backward compatibility symlink, if present.
-        if test -h /usr/share/openvswitch/pki; then
-            rm -f /usr/share/openvswitch/pki
-        fi
         ;;
 
     remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
index 7242b4a..7a25083 100755 (executable)
@@ -21,14 +21,6 @@ set -e
 case "$1" in
     configure)
         cd /etc/openvswitch-testcontroller
-
-        # If cacert.pem is a symlink to the old location for cacert.pem,
-        # remove it so that we can symlink it to the new location.
-        if test -h cacert.pem && \
-           test X"`readlink cacert.pem`" = X/usr/share/openvswitch/pki/switchca/cacert.pem; then
-            rm -f cacert.pem
-        fi
-
         if ! test -e cacert.pem; then
             ln -s /var/lib/openvswitch/pki/switchca/cacert.pem cacert.pem
         fi