summaryrefslogtreecommitdiffstats
path: root/patches/fuel-plugin-ovs/0009-install.sh-AArch64-Fix-dpkg-installation-issues.patch
blob: 8f7a259f0fa636d0f2025acc3b2120546f5de2c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Wed, 14 Sep 2016 16:42:48 +0200
Subject: [PATCH] install.sh: AArch64: Fix dpkg installation issues

There are 2 minor issues with our Armband version string of
openvswitch packages shipped for fuel-plugin-ovs:

1. Setting up openvswitch-datapath-dkms (2.5.90~08.08-1+amos1)
   ... Error! Could not find module source directory.

This happens because our version string has a "+" char in it,
and the /usr/src path looked for is trimmed at that char,
hence dkms installation is looking for
"/usr/src/openvswitch-2.5.90~08.08" directory instead of
"/usr/src/openvswitch-2.5.90~08.08+amos1".

Temporary fix will be to add the following to install.sh:
ln -s openvswitch-2.5.90~08.08+amos1/ openvswitch-2.5.90~08.08

2. dpkg -i complains about "breaks" dependencies in debian/control
when reinstalling OVS 2.5.90.

This happens because of faulty dpkg version comparison algorithm:
$ dpkg --compare-versions 2.5.90~08.08-1+amos1
  gt 2.5.90 && echo "This should work!"
$

The temporary fix will be to add --force-breaks to dpkg invocation.

Related-bug: ARMBAND-89

Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
 deployment_scripts/install.sh | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/deployment_scripts/install.sh b/deployment_scripts/install.sh
index 46d74bb..169c64a 100644
--- a/deployment_scripts/install.sh
+++ b/deployment_scripts/install.sh
@@ -17,10 +17,20 @@ if [ $nsh = 'true' ]; then
 fi
  
 curl  http://$host:8080/plugins/fuel-plugin-ovs-0.9/repositories/ubuntu/${ovs} | tar -xzv
-dpkg -i openvswitch-datapath-dkms_*.deb
-dpkg -i openvswitch-common_*.deb
-dpkg -i openvswitch-switch_*.deb
-dpkg -i python-openvswitch_*.deb
+
+# FIXME(armband): https://jira.opnfv.org/browse/ARMBAND-89
+# e.g.: ln -s openvswitch-2.5.90~08.08+amos1 openvswitch-2.5.90~08.08
+for usr_src_ovs in /usr/src/openvswitch-*+*; do
+    echo ${usr_src_ovs}
+    if [ -d ${usr_src_ovs} ]; then
+        ln -sf ${usr_src_ovs} ${usr_src_ovs%+*}
+    fi
+done
+
+dpkg -i --force-breaks openvswitch-datapath-dkms_*.deb
+dpkg -i --force-breaks openvswitch-common_*.deb
+dpkg -i --force-breaks openvswitch-switch_*.deb
+dpkg -i --force-breaks python-openvswitch_*.deb
 if [ $dpdk = 'true' ]; then
     if [ $nsh = 'true' -o -n $dpdk_socket_mem ]; then
         dpkg -i libxenstore3.0*.deb
@@ -28,12 +38,12 @@ if [ $dpdk = 'true' ]; then
           # FIXME(armband): arm64 DPDK ships individual libs, install them all
           dpdk_deb_name=$(ls dpdk_*)
           dpdk_deb_suffix=${dpdk_deb_name#dpdk_}
-          dpkg -i *${dpdk_deb_suffix%_*}*.deb
+          dpkg -i --force-breaks *${dpdk_deb_suffix%_*}*.deb
         else
-          dpkg -i libdpdk0_*.deb
-          dpkg -i dpdk_*.deb
+          dpkg -i --force-breaks libdpdk0_*.deb
+          dpkg -i --force-breaks dpdk_*.deb
         fi
-        dpkg -i openvswitch-switch-dpdk_*.deb
+        dpkg -i --force-breaks openvswitch-switch-dpdk_*.deb
     fi
     if ! [ $nsh = 'true' -a -n $dpdk_socket_mem ]; then
         #Set to 0, dpdk init script mount hugepages but don't change current allocation