summaryrefslogtreecommitdiffstats
path: root/build/patches
diff options
context:
space:
mode:
authorRomanos Skiadas <rski@intracom-telecom.com>2017-01-20 16:49:26 -0500
committerTim Rozet <trozet@redhat.com>2017-02-17 20:41:45 -0500
commita7155293dba7c21f060b671b15fc36a66b84de83 (patch)
tree104967a3691d4e042f086d2a2dba57a6b93da9cf /build/patches
parent5e4c2ffc86d0426113f60b8069e81482f82bbc8d (diff)
Adding Quagga to build
Builds 6Wind ZRPC, Quagga, and dependencies required for OpenDaylight with BGPVPN scenario. Packages are built into RPMs, and left on the overcloud disk in /root/quagga. They are then installed at deploy time if VPN feature flag is enabled. Note, for proper upstream we should create a zrpc OOO service, but that can be a follow up patch. For that we would also need official packaging/build system upstream somewhere. JIRA: APEX-357 Changes Include: - Build thrift rpm - Build c-capnproto rpm - Build quagga rpm - Build zrpcd rpm - Configure bgpd - Detect deploy with VPN and install pkgs - Enable zrpcd with systemd Change-Id: I9825694f46aaab48a3d1cd5fc4d9a24c7370e8fa Signed-off-by: Tim Rozet <trozet@redhat.com> Signed-off-by: Nikolas Hermanns <nikolas.hermanns@ericsson.com> Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
Diffstat (limited to 'build/patches')
-rw-r--r--build/patches/fix_quagga_make_dist.patch28
-rw-r--r--build/patches/fix_zrpcd_make_dist.patch29
-rw-r--r--build/patches/zrpcd_hardcoded_paths.patch58
3 files changed, 115 insertions, 0 deletions
diff --git a/build/patches/fix_quagga_make_dist.patch b/build/patches/fix_quagga_make_dist.patch
new file mode 100644
index 00000000..8f854e50
--- /dev/null
+++ b/build/patches/fix_quagga_make_dist.patch
@@ -0,0 +1,28 @@
+From c31749157aabca758ef731ad4d15ddf4cc2efe66 Mon Sep 17 00:00:00 2001
+From: Romanos Skiadas <rski@intracom-telecom.com>
+Date: Mon, 6 Feb 2017 15:28:44 +0200
+Subject: [PATCH] lib: Include missing ccapnproto header in Makefile
+
+Without this make dist doesn't include the header and the resulting
+archive doesn't build.
+
+Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
+---
+ lib/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index c286833..c7682ed 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -43,6 +43,7 @@ endif
+ if HAVE_CCAPNPROTO
+ libzebra_la_SOURCES += qzc.capnp.c
+ BUILT_SOURCES += qzc.capnp.c
++pkginclude_HEADERS += qzc.capnp.h
+ endif
+
+ EXTRA_DIST = \
+--
+1.8.3.1
+
diff --git a/build/patches/fix_zrpcd_make_dist.patch b/build/patches/fix_zrpcd_make_dist.patch
new file mode 100644
index 00000000..a0f65b7f
--- /dev/null
+++ b/build/patches/fix_zrpcd_make_dist.patch
@@ -0,0 +1,29 @@
+From ad66cdee4ffe8225d4534137734cf62944ce45c8 Mon Sep 17 00:00:00 2001
+From: Romanos Skiadas <rski@intracom-telecom.com>
+Date: Mon, 6 Feb 2017 18:43:12 +0000
+Subject: [PATCH] make dist: Include all headers required for compilation
+
+Some headers where missing from the archive resulting from 'make dist'.
+
+Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
+---
+ zrpcd/Makefile.am | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/zrpcd/Makefile.am b/zrpcd/Makefile.am
+index 50db7fa..f4081d3 100644
+--- a/zrpcd/Makefile.am
++++ b/zrpcd/Makefile.am
+@@ -18,6 +18,9 @@ libzrpc_a_SOURCES = \
+ qzmqclient.c qzcclient.capnp.c qzcclient.c zrpc_util.c \
+ zrpc_bgp_capnp.c
+
++pkginclude_HEADERS = \
++ zrpc_os_wrapper.h zrpc_global.h
++
+ noinst_HEADERS = \
+ bgp_configurator.h bgp_updater.h vpnservice_types.h zrpc_bgp_updater.h \
+ zrpc_bgp_configurator.h zrpc_bgp_updater.h zrpc_debug.h zrpc_memory.h \
+--
+1.8.3.1
+
diff --git a/build/patches/zrpcd_hardcoded_paths.patch b/build/patches/zrpcd_hardcoded_paths.patch
new file mode 100644
index 00000000..27115ca7
--- /dev/null
+++ b/build/patches/zrpcd_hardcoded_paths.patch
@@ -0,0 +1,58 @@
+From 48125816cf99b03f20496bce06850f05cdf2914a Mon Sep 17 00:00:00 2001
+From: Romanos Skiadas <rski@intracom-telecom.com>
+Date: Fri, 10 Feb 2017 12:48:46 +0000
+Subject: [PATCH] Change hardcoded paths
+
+The path to the bgpd executable and bgpd's pid file were hardcoded
+and not correct when zrpcd is packaged for Apex.
+This patch is a temporary fix until the paths are no longer hardcoded
+in the upstream project.
+---
+ zrpcd/zrpc_vpnservice.c | 8 +-------
+ zrpcd/zrpc_vpnservice.h | 4 ++--
+ 2 files changed, 3 insertions(+), 9 deletions(-)
+
+diff --git a/zrpcd/zrpc_vpnservice.c b/zrpcd/zrpc_vpnservice.c
+index a9de91d..28c8293 100644
+--- a/zrpcd/zrpc_vpnservice.c
++++ b/zrpcd/zrpc_vpnservice.c
+@@ -217,20 +217,14 @@ static void zrpc_vpnservice_callback (void *arg, void *zmqsock, struct zmq_msg_t
+ return;
+ }
+
+-#define SBIN_DIR "/sbin"
+
+ void zrpc_vpnservice_setup(struct zrpc_vpnservice *setup)
+ {
+- char bgpd_location_path[128];
+- char *ptr = bgpd_location_path;
+-
+ setup->zrpc_listen_port = ZRPC_LISTEN_PORT;
+ setup->zrpc_notification_port = ZRPC_NOTIFICATION_PORT;
+ setup->zmq_sock = ZRPC_STRDUP(ZMQ_SOCK);
+ setup->zmq_subscribe_sock = ZRPC_STRDUP(ZMQ_NOTIFY);
+- ptr+=sprintf(ptr, "%s", BGPD_PATH_QUAGGA);
+- ptr+=sprintf(ptr, "%s/bgpd",SBIN_DIR);
+- setup->bgpd_execution_path = ZRPC_STRDUP(bgpd_location_path);
++ setup->bgpd_execution_path = ZRPC_STRDUP(BGPD_EXECUTION_PATH);
+ }
+
+ void zrpc_vpnservice_terminate(struct zrpc_vpnservice *setup)
+diff --git a/zrpcd/zrpc_vpnservice.h b/zrpcd/zrpc_vpnservice.h
+index 12863a4..96331e2 100644
+--- a/zrpcd/zrpc_vpnservice.h
++++ b/zrpcd/zrpc_vpnservice.h
+@@ -21,8 +21,8 @@
+ #define BGPD_ARGS_STRING_1 "-p"
+ #define BGPD_ARGS_STRING_3 "-Z"
+
+-#define BGPD_PATH_BGPD_PID "/opt/quagga/var/run/quagga/bgpd.pid"
+-#define BGPD_PATH_QUAGGA "/opt/quagga"
++#define BGPD_PATH_BGPD_PID "/var/run/quagga/bgpd.pid"
++#define BGPD_EXECUTION_PATH "/usr/sbin/bgpd"
+
+ #define ZRPC_CONFIG_FILE "zrpcd.conf"
+
+--
+1.8.3.1
+