summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2023-03-05 15:26:48 +0800
committerKhem Raj <raj.khem@gmail.com>2023-03-05 14:34:38 -0800
commit0b3e6c1973d53161fa574e4112e65290d9e0f080 (patch)
treef13f12eb89a2654811155f800e6dadb771b3fb44 /meta-networking/recipes-protocols
parent80740b1d3c7ce2910410a7b49ca1e3bb012d3d4a (diff)
downloadmeta-openembedded-0b3e6c1973d53161fa574e4112e65290d9e0f080.tar.gz
quagga: drop recipe
Quagga is no longer maintained since 2018[1]. Its official repository is not even available[2]. As an alternative, users can use FRRouting[3] which has been added to meta-networking[4]. [1] https://github.com/Quagga/quagga [2] https://git.savannah.gnu.org/cgit/quagga.git [3] https://frrouting.org [4] https://git.openembedded.org/meta-openembedded/tree/meta-networking/recipes-protocols/frr Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-protocols')
-rw-r--r--meta-networking/recipes-protocols/quagga/files/0001-configure-Check-for-readline-instead-of-main-in-libr.patch32
-rw-r--r--meta-networking/recipes-protocols/quagga/files/bgpd.service15
-rw-r--r--meta-networking/recipes-protocols/quagga/files/isisd.service14
-rw-r--r--meta-networking/recipes-protocols/quagga/files/ospf6d.service15
-rw-r--r--meta-networking/recipes-protocols/quagga/files/ospfd.service15
-rw-r--r--meta-networking/recipes-protocols/quagga/files/quagga.default12
-rw-r--r--meta-networking/recipes-protocols/quagga/files/quagga.init200
-rw-r--r--meta-networking/recipes-protocols/quagga/files/quagga.pam13
-rw-r--r--meta-networking/recipes-protocols/quagga/files/ripd.service15
-rw-r--r--meta-networking/recipes-protocols/quagga/files/ripngd.service15
-rw-r--r--meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga3
-rw-r--r--meta-networking/recipes-protocols/quagga/files/watchquagga.default12
-rw-r--r--meta-networking/recipes-protocols/quagga/files/watchquagga.init64
-rw-r--r--meta-networking/recipes-protocols/quagga/files/zebra.service16
-rw-r--r--meta-networking/recipes-protocols/quagga/quagga.inc243
-rw-r--r--meta-networking/recipes-protocols/quagga/quagga_1.2.4.bb10
16 files changed, 0 insertions, 694 deletions
diff --git a/meta-networking/recipes-protocols/quagga/files/0001-configure-Check-for-readline-instead-of-main-in-libr.patch b/meta-networking/recipes-protocols/quagga/files/0001-configure-Check-for-readline-instead-of-main-in-libr.patch
deleted file mode 100644
index 776c0958fa..0000000000
--- a/meta-networking/recipes-protocols/quagga/files/0001-configure-Check-for-readline-instead-of-main-in-libr.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From 675b35b7ed416c837267e493b157167319e8f5fa Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 1 Sep 2022 11:01:53 -0700
4Subject: [PATCH] configure: Check for readline() instead of main() in
5 libreadline
6
7while checking for presense of libreadline, poke for a function which is
8provided by libreadline, main is not provided by it, so modern compiler
9toolchains may complain about it.
10
11Upstream-Status: Submitted [https://github.com/Quagga/quagga/pull/9]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 configure.ac | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/configure.ac b/configure.ac
18index ed279f48..d444ab4a 100755
19--- a/configure.ac
20+++ b/configure.ac
21@@ -754,7 +754,7 @@ dnl [TODO] on Linux, and in [TODO] on Solaris.
22 )]
23 )]
24 )
25- AC_CHECK_LIB(readline, main, LIBREADLINE="-lreadline $LIBREADLINE",,
26+ AC_CHECK_LIB(readline, readline, LIBREADLINE="-lreadline $LIBREADLINE",,
27 "$LIBREADLINE")
28 if test $ac_cv_lib_readline_main = no; then
29 AC_MSG_ERROR([vtysh needs libreadline but was not found and usable on your system.])
30--
312.37.3
32
diff --git a/meta-networking/recipes-protocols/quagga/files/bgpd.service b/meta-networking/recipes-protocols/quagga/files/bgpd.service
deleted file mode 100644
index 818b59cb27..0000000000
--- a/meta-networking/recipes-protocols/quagga/files/bgpd.service
+++ /dev/null
@@ -1,15 +0,0 @@
1[Unit]
2Description=BGP routing daemon
3BindTo=zebra.service
4After=zebra.service
5ConditionPathExists=@SYSCONFDIR@/quagga/bgpd.conf
6
7[Service]
8Type=forking
9EnvironmentFile=-@SYSCONFDIR@/default/quagga
10ExecStart=@SBINDIR@/bgpd -d $bgpd_options -f @SYSCONFDIR@/quagga/bgpd.conf
11ExecStopPost=@base_bindir@/rm -rf /run/quagga/bgpd.pid
12Restart=on-abort
13
14[Install]
15WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/quagga/files/isisd.service b/meta-networking/recipes-protocols/quagga/files/isisd.service
deleted file mode 100644
index 9bfe7b65ef..0000000000
--- a/meta-networking/recipes-protocols/quagga/files/isisd.service
+++ /dev/null
@@ -1,14 +0,0 @@
1[Unit]
2Description=IS-IS routing daemon
3BindTo=zebra.service
4After=zebra.service
5ConditionPathExists=@SYSCONFDIR@/quagga/isisd.conf
6
7[Service]
8Type=forking
9EnvironmentFile=-@SYSCONFDIR@/default/quagga
10ExecStart=@SBINDIR@/isisd -d $isisd_options -f /etc/quagga/isisd.conf
11Restart=on-abort
12
13[Install]
14WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/quagga/files/ospf6d.service b/meta-networking/recipes-protocols/quagga/files/ospf6d.service
deleted file mode 100644
index 50645fe2a9..0000000000
--- a/meta-networking/recipes-protocols/quagga/files/ospf6d.service
+++ /dev/null
@@ -1,15 +0,0 @@
1[Unit]
2Description=OSPF routing daemon for IPv6
3BindTo=zebra.service
4After=zebra.service
5ConditionPathExists=@SYSCONFDIR@/quagga/ospf6d.conf
6
7[Service]
8Type=forking
9EnvironmentFile=-@SYSCONFDIR@/default/quagga
10ExecStart=@SBINDIR@/ospf6d -d $ospf6d_options -f @SYSCONFDIR@/quagga/ospf6d.conf
11ExecStopPost=@base_bindir@/rm -rf /run/quagga/ospf6d.pid
12Restart=on-abort
13
14[Install]
15WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/quagga/files/ospfd.service b/meta-networking/recipes-protocols/quagga/files/ospfd.service
deleted file mode 100644
index 2cab1cd147..0000000000
--- a/meta-networking/recipes-protocols/quagga/files/ospfd.service
+++ /dev/null
@@ -1,15 +0,0 @@
1[Unit]
2Description=OSPF routing daemon
3BindTo=zebra.service
4After=zebra.service
5ConditionPathExists=@SYSCONFDIR@/quagga/ospfd.conf
6
7[Service]
8Type=forking
9EnvironmentFile=-@SYSCONFDIR@/default/quagga
10ExecStart=@SBINDIR@/ospfd -d $ospfd_options -f @SYSCONFDIR@/quagga/ospfd.conf
11ExecStopPost=@base_bindir@/rm -rf /run/quagga/ospfd.pid
12Restart=on-abort
13
14[Install]
15WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/quagga/files/quagga.default b/meta-networking/recipes-protocols/quagga/files/quagga.default
deleted file mode 100644
index 4c4bc23071..0000000000
--- a/meta-networking/recipes-protocols/quagga/files/quagga.default
+++ /dev/null
@@ -1,12 +0,0 @@
1# If this option is set the /etc/init.d/quagga script automatically loads
2# the config via "vtysh -b" when the servers are started.
3vtysh_enable=yes
4
5# Bind all daemons to loopback only by default
6zebra_options=" --daemon -A 127.0.0.1"
7bgpd_options=" --daemon -A 127.0.0.1"
8ospfd_options=" --daemon -A 127.0.0.1"
9ospf6d_options="--daemon -A ::1"
10ripd_options=" --daemon -A 127.0.0.1"
11ripngd_options="--daemon -A ::1"
12isisd_options=" --daemon -A 127.0.0.1"
diff --git a/meta-networking/recipes-protocols/quagga/files/quagga.init b/meta-networking/recipes-protocols/quagga/files/quagga.init
deleted file mode 100644
index df1beb7123..0000000000
--- a/meta-networking/recipes-protocols/quagga/files/quagga.init
+++ /dev/null
@@ -1,200 +0,0 @@
1#!/bin/sh
2#
3# /etc/init.d/quagga -- start/stop the Quagga routing daemons
4#
5# Based on debian version by Endre Hirling <endre@mail.elte.hu> and
6# Christian Hammers <ch@debian.org>.
7#
8
9### BEGIN INIT INFO
10# Provides: quagga
11# Required-Start: $local_fs $network $remote_fs $syslog
12# Required-Stop: $local_fs $network $remote_fs $syslog
13# Default-Start: 2 3 4 5
14# Default-Stop: 0 1 6
15# Short-Description: start and stop the Quagga routing suite
16# Description: Quagga is a routing suite for IP routing protocols like
17# BGP, OSPF, RIP and others. This script contols the main
18# daemon "quagga" as well as the individual protocol daemons.
19### END INIT INFO
20
21# NOTE: sbin must be before bin so we get the iproute2 ip and not the
22# busybox ip command. The busybox one flushes all routes instead of just
23# the dynamic routes
24PATH=/sbin:/usr/sbin:/bin:/usr/bin:/sbin
25D_PATH=/usr/sbin
26C_PATH=/etc/quagga
27
28# Keep zebra first and do not list watchquagga!
29DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd"
30
31# Print the name of the pidfile.
32pidfile()
33{
34 echo "/var/run/quagga/$1.pid"
35}
36
37# Check if daemon is started by using the pidfile.
38started()
39{
40 [ -e `pidfile $1` ] && kill -0 `cat \`pidfile $1\`` 2> /dev/null && return 0
41 return 1
42}
43
44# Loads the config via vtysh -b if configured to do so.
45vtysh_b ()
46{
47 # Rember, that all variables have been incremented by 1 in convert_daemon_prios()
48 if [ "$vtysh_enable" = 2 -a -f $C_PATH/Quagga.conf ]; then
49 /usr/bin/vtysh -b
50 fi
51}
52
53# Check if the daemon is activated and if its executable and config files
54# are in place.
55# params: daemon name
56# returns: 0=ok, 1=error
57check_daemon()
58{
59 # If the integrated config file is used the others are not checked.
60 if [ -r "$C_PATH/Quagga.conf" ]; then
61 return 0
62 fi
63
64 # check for config file
65 if [ ! -r "$C_PATH/$1.conf" ]; then
66 return 1
67 fi
68 return 0
69}
70
71# Starts the server if it's not alrady running according to the pid file.
72# The Quagga daemons creates the pidfile when starting.
73start()
74{
75 if ! check_daemon $1; then echo -n " (!$1)"; return; fi
76 echo -n " $1"
77 start-stop-daemon \
78 --start \
79 --pidfile=`pidfile $1` \
80 --exec "$D_PATH/$1" \
81 -- \
82 `eval echo "$""$1""_options"`
83
84}
85
86# Stop the daemon given in the parameter, printing its name to the terminal.
87stop()
88{
89 if ! started "$1" ; then
90 echo -n " (!$1)"
91 return 0
92 else
93 PIDFILE=`pidfile $1`
94 PID=`cat $PIDFILE 2>/dev/null`
95 start-stop-daemon --stop --quiet --exec "$D_PATH/$1"
96 #
97 # Now we have to wait until $DAEMON has _really_ stopped.
98 #
99 if test -n "$PID" && kill -0 $PID 2>/dev/null; then
100 echo -n " (waiting) ."
101 cnt=0
102 while kill -0 $PID 2>/dev/null; do
103 cnt=`expr $cnt + 1`
104 if [ $cnt -gt 60 ]; then
105 # Waited 120 secs now, fail.
106 echo -n "Failed.. "
107 break
108 fi
109 sleep 2
110 echo -n "."
111 done
112 fi
113 echo -n " $1"
114 rm -f `pidfile $1`
115 fi
116}
117
118stop_all()
119{
120 local daemon_list
121 daemon_list=${1:-$DAEMONS}
122
123 echo -n "Stopping Quagga daemons:"
124 for daemon_name in $daemon_list; do
125 stop "$daemon_name"
126 done
127 echo "."
128}
129
130start_all()
131{
132 local daemon_list
133 daemon_list=${1:-$DAEMONS}
134
135 echo -n "Starting Quagga daemons:"
136 for daemon_name in $daemon_list; do
137 start "$daemon_name"
138 done
139 echo "."
140}
141
142status_all()
143{
144 local daemon_list
145 daemon_list=${1:-$DAEMONS}
146 res=1
147
148 echo -n "quagga: "
149 for daemon_name in $daemon_list; do
150 if started "$daemon_name" ; then
151 id=`cat \`pidfile $daemon_name\``
152 echo -n "$daemon_name (pid $id) "
153 res=0
154 fi
155 done
156 if [ $res -eq 0 ]; then
157 echo "is running..."
158 else
159 echo "is stopped..."
160 fi
161 exit $res
162}
163
164#########################################################
165# Main program #
166#########################################################
167
168# Load configuration
169test -f /etc/default/quagga && . /etc/default/quagga
170
171case "$1" in
172 start)
173 cd $C_PATH/
174 start_all $2
175 vtysh_b
176 ;;
177
178 stop)
179 stop_all $2
180 echo "Removing all routes made by zebra."
181 ip route flush proto zebra
182 ;;
183
184 status)
185 status_all $2
186 ;;
187
188 restart|force-reload)
189 $0 stop $2
190 sleep 1
191 $0 start $2
192 ;;
193
194 *)
195 echo "Usage: /etc/init.d/quagga {start|stop|restart|status|force-reload} [daemon]"
196 exit 1
197 ;;
198esac
199
200exit 0
diff --git a/meta-networking/recipes-protocols/quagga/files/quagga.pam b/meta-networking/recipes-protocols/quagga/files/quagga.pam
deleted file mode 100644
index 3541a975ae..0000000000
--- a/meta-networking/recipes-protocols/quagga/files/quagga.pam
+++ /dev/null
@@ -1,13 +0,0 @@
1#
2# The PAM configuration file for the quagga `vtysh' service
3#
4
5# This allows root to change user infomation without being
6# prompted for a password
7auth sufficient pam_rootok.so
8
9# The standard Unix authentication modules, used with
10# NIS (man nsswitch) as well as normal /etc/passwd and
11# /etc/shadow entries.
12auth include common-auth
13
diff --git a/meta-networking/recipes-protocols/quagga/files/ripd.service b/meta-networking/recipes-protocols/quagga/files/ripd.service
deleted file mode 100644
index 2c824318a1..0000000000
--- a/meta-networking/recipes-protocols/quagga/files/ripd.service
+++ /dev/null
@@ -1,15 +0,0 @@
1[Unit]
2Description=RIP routing daemon
3BindTo=zebra.service
4After=zebra.service
5ConditionPathExists=@SYSCONFDIR@/quagga/ripd.conf
6
7[Service]
8Type=forking
9EnvironmentFile=-@SYSCONFDIR@/default/quagga
10ExecStart=@SBINDIR@/ripd -d $ripd_options -f @SYSCONFDIR@/quagga/ripd.conf
11ExecStopPost=@base_bindir@/rm -rf /run/quagga/ripd.pid
12Restart=on-abort
13
14[Install]
15WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/quagga/files/ripngd.service b/meta-networking/recipes-protocols/quagga/files/ripngd.service
deleted file mode 100644
index c3555b345b..0000000000
--- a/meta-networking/recipes-protocols/quagga/files/ripngd.service
+++ /dev/null
@@ -1,15 +0,0 @@
1[Unit]
2Description=RIP routing daemon for IPv6
3BindTo=zebra.service
4After=zebra.service
5ConditionPathExists=@SYSCONFDIR@/quagga/ripngd.conf
6
7[Service]
8Type=forking
9EnvironmentFile=-@SYSCONFDIR@/default/quagga
10ExecStart=@SBINDIR@/ripngd -d $ripngd_options -f @SYSCONFDIR@/quagga/ripngd.conf
11ExecStopPost=@base_bindir@/rm -rf /run/quagga/ripngd.pid
12Restart=on-abort
13
14[Install]
15WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga b/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga
deleted file mode 100644
index 1f28c0b24d..0000000000
--- a/meta-networking/recipes-protocols/quagga/files/volatiles.03_quagga
+++ /dev/null
@@ -1,3 +0,0 @@
1# <type> <owner> <group> <mode> <path> <linksource>
2d quagga quagga 0755 /var/run/quagga none
3d quagga quagga 0755 /var/log/quagga none
diff --git a/meta-networking/recipes-protocols/quagga/files/watchquagga.default b/meta-networking/recipes-protocols/quagga/files/watchquagga.default
deleted file mode 100644
index 2d601ec97d..0000000000
--- a/meta-networking/recipes-protocols/quagga/files/watchquagga.default
+++ /dev/null
@@ -1,12 +0,0 @@
1# Watchquagga configuration
2#watch_daemons="zebra bgpd ospfd ospf6d ripd ripngd"
3watch_daemons="zebra"
4
5# To enable restarts when multiple daemons are being used, uncomment this line (but first be sure to edit
6# the WATCH_DAEMONS line to reflect the daemons you are actually using):
7#watch_options="-Az -b_ -r/etc/init.d/quagga_restart_%s -s/etc/init.d/quagga_start_%s -k/etc/init.d/quagga_stop_%s"
8
9# Since we are using one quagga daemon for now, use the following line. If using
10# multiple daemons, comment the line below and uncoment the line mentioned
11# above.
12watch_options="-z -b_ -r/etc/init.d/quagga_restart_%s"
diff --git a/meta-networking/recipes-protocols/quagga/files/watchquagga.init b/meta-networking/recipes-protocols/quagga/files/watchquagga.init
deleted file mode 100644
index 5ddd94a3d6..0000000000
--- a/meta-networking/recipes-protocols/quagga/files/watchquagga.init
+++ /dev/null
@@ -1,64 +0,0 @@
1#!/bin/sh
2#
3### BEGIN INIT INFO
4# Provides: watchquagga
5# Required-Start: $local_fs $network $remote_fs $syslog
6# Required-Stop: $local_fs $network $remote_fs $syslog
7# Default-Start: 2 3 4 5
8# Default-Stop: 0 1 6
9# Short-Description: start and stop the Quagga watchdog
10### END INIT INFO
11
12PATH=/bin:/usr/bin:/sbin:/usr/sbin
13
14# Load configuration
15test -f /etc/default/watchquagga && . /etc/default/watchquagga
16
17# Check that there are daemons to be monitored.
18[ -z "$watch_daemons" ] && exit 0
19
20pidfile="/var/run/quagga/watchquagga.pid"
21
22case "$1" in
23 start)
24 echo -n "Starting quagga watchdog daemon: watchquagga"
25 start-stop-daemon --start \
26 --pidfile $pidfile \
27 --exec /usr/sbin/watchquagga \
28 -- -d $watch_options $watch_daemons
29 echo "."
30 ;;
31
32 stop)
33 echo -n "Stopping quagga watchdog daemon: watchquagga"
34 start-stop-daemon --stop --quiet \
35 --pidfile $pidfile
36 echo "."
37 ;;
38
39 status)
40 echo -n "watchquagga "
41 res=1
42 [ -e $pidfile ] && kill -0 `cat $pidfile` 2> /dev/null
43 if [ $? -eq 0 ]; then
44 echo "(pid `cat $pidfile`) is running..."
45 res=0
46 else
47 echo "is stopped..."
48 fi
49 exit $res
50 ;;
51
52 restart|force-reload)
53 $0 stop $2
54 sleep 1
55 $0 start $2
56 ;;
57
58 *)
59 echo "Usage: /etc/init.d/watchquagga {start|stop|restart|force-reload}"
60 exit 1
61 ;;
62esac
63
64exit 0
diff --git a/meta-networking/recipes-protocols/quagga/files/zebra.service b/meta-networking/recipes-protocols/quagga/files/zebra.service
deleted file mode 100644
index 9186041ae6..0000000000
--- a/meta-networking/recipes-protocols/quagga/files/zebra.service
+++ /dev/null
@@ -1,16 +0,0 @@
1[Unit]
2Description=GNU Zebra routing manager
3Wants=network.target
4Before=network.target
5ConditionPathExists=@SYSCONFDIR@/quagga/zebra.conf
6
7[Service]
8Type=forking
9EnvironmentFile=-@SYSCONFDIR@/default/quagga
10ExecStartPre=@BASE_SBINDIR@/ip route flush proto zebra
11ExecStart=@SBINDIR@/zebra -d $zebra_options -f @SYSCONFDIR@/quagga/zebra.conf
12ExecStopPost=@base_bindir@/rm -rf /run/quagga/zebra.pid
13Restart=on-abort
14
15[Install]
16WantedBy=multi-user.target
diff --git a/meta-networking/recipes-protocols/quagga/quagga.inc b/meta-networking/recipes-protocols/quagga/quagga.inc
deleted file mode 100644
index d368311d13..0000000000
--- a/meta-networking/recipes-protocols/quagga/quagga.inc
+++ /dev/null
@@ -1,243 +0,0 @@
1SUMMARY = "BGP/OSPF/RIP routing daemon"
2DESCRIPTION = "Quagga is a routing software suite, providing \
3implementations of OSPFv2, OSPFv3, RIP v1 and v2, RIPv3 and BGPv4 for \
4Unix platforms, particularly FreeBSD, Linux, Solaris and NetBSD. \
5Quagga is a fork of GNU Zebra which was developed by Kunihiro \
6Ishiguro. The Quagga tree aims to build a more involved community \
7around Quagga than the current centralised model of GNU Zebra."
8HOMEPAGE = "http://www.nongnu.org/quagga/"
9SECTION = "net"
10
11
12LICENSE = "GPL-2.0-only & LGPL-2.0-only"
13LIC_FILES_CHKSUM = "file://COPYING;md5=81bcece21748c91ba9992349a91ec11d \
14 file://COPYING.LIB;md5=01ef24401ded36cd8e5d18bfe947240c"
15
16DEPENDS = "readline ncurses perl-native c-ares"
17DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'snmp', 'net-snmp', '', d)}"
18SNMP_CONF="${@bb.utils.contains('DISTRO_FEATURES', 'snmp', '--enable-snmp', '', d)}"
19
20# the "ip" command from busybox is not sufficient (flush by protocol flushes all routes)
21RDEPENDS:${PN} += "iproute2"
22
23SRC_URI = "https://github.com/Quagga/quagga/releases/download/quagga-${PV}/quagga-${PV}.tar.gz \
24 file://quagga.init \
25 file://quagga.default \
26 file://watchquagga.init \
27 file://watchquagga.default \
28 file://volatiles.03_quagga \
29 file://quagga.pam \
30 file://bgpd.service \
31 file://isisd.service \
32 file://ospf6d.service \
33 file://ospfd.service \
34 file://ripd.service \
35 file://ripngd.service \
36 file://zebra.service \
37 "
38
39PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
40PACKAGECONFIG[cap] = "--enable-capabilities,--disable-capabilities,libcap"
41PACKAGECONFIG[pam] = "--with-libpam, --without-libpam, libpam"
42
43inherit autotools update-rc.d useradd systemd pkgconfig multilib_header update-alternatives
44
45CFLAGS += "-fcommon"
46
47SYSTEMD_PACKAGES = "${PN} ${PN}-bgpd ${PN}-isisd ${PN}-ospf6d ${PN}-ospfd ${PN}-ripd ${PN}-ripngd"
48SYSTEMD_SERVICE:${PN}-bgpd = "bgpd.service"
49SYSTEMD_SERVICE:${PN}-isisd = "isisd.service"
50SYSTEMD_SERVICE:${PN}-ospf6d = "ospf6d.service"
51SYSTEMD_SERVICE:${PN}-ospfd = "ospfd.service"
52SYSTEMD_SERVICE:${PN}-ripd = "ripd.service"
53SYSTEMD_SERVICE:${PN}-ripngd = "ripngd.service"
54SYSTEMD_SERVICE:${PN} = "zebra.service"
55
56EXTRA_OECONF = "--sysconfdir=${sysconfdir}/quagga \
57 --localstatedir=${localstatedir}/run/quagga \
58 --enable-exampledir=${docdir}/quagga/examples/ \
59 --enable-vtysh \
60 --enable-isisd \
61 ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '--enable-watchquagga', '--disable-watchquagga', d)} \
62 --enable-ospfclient=yes \
63 --enable-multipath=64 \
64 --enable-user=quagga \
65 --enable-group=quagga \
66 --enable-vty-group=quaggavty \
67 --enable-configfile-mask=0640 \
68 --enable-logfile-mask=0640 \
69 --enable-rtadv \
70 --enable-linux24-tcp-md5 \
71 ap_cv_cc_pie=no \
72 ${SNMP_CONF}"
73
74CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
75
76do_install () {
77 # Install init script and default settings
78 install -m 0755 -d ${D}${sysconfdir}/default ${D}${sysconfdir}/init.d \
79 ${D}${sysconfdir}/quagga ${D}${sysconfdir}/default/volatiles
80 install -m 0644 ${WORKDIR}/quagga.default ${D}${sysconfdir}/default/quagga
81 install -m 0644 ${WORKDIR}/watchquagga.default ${D}${sysconfdir}/default/watchquagga
82 install -m 0755 ${WORKDIR}/quagga.init ${D}${sysconfdir}/init.d/quagga
83 install -m 0755 ${WORKDIR}/watchquagga.init ${D}${sysconfdir}/init.d/watchquagga
84 install -m 0644 ${WORKDIR}/volatiles.03_quagga ${D}${sysconfdir}/default/volatiles/03_quagga
85
86 # Install sample configurations for the daemons
87 for f in bgpd vtysh isisd ospfd ripngd zebra ripd ospf6d; do
88 install -m 0640 ${S}/$f/$f.conf.sample ${D}${sysconfdir}/quagga/$f.conf.sample
89 done
90
91 for f in bgpd vtysh isisd ospfd ripngd zebra ripd ospf6d; do
92 touch ${D}${sysconfdir}/quagga/$f.conf
93 done
94 chown quagga:quaggavty ${D}${sysconfdir}/quagga
95 chown quagga:quagga ${D}${sysconfdir}/quagga/*.conf
96 chmod 750 ${D}${sysconfdir}/quagga
97 chmod 640 ${D}${sysconfdir}/quagga/*.conf
98
99 # Install quagga
100 oe_runmake install DESTDIR=${D} prefix=${prefix} \
101 sbindir=${sbindir} \
102 sysconfdir=${sysconfdir}/quagga \
103 localstatedir=${localstatedir}/run/quagga
104
105 # Fix hardcoded paths
106 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/*
107 sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/quagga
108 sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/* ${D}${sysconfdir}/default/watchquagga
109 sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/* ${D}${sysconfdir}/default/volatiles/03_quagga
110 sed -i 's!^PATH=.*!PATH=${base_sbindir}:${sbindir}:${base_bindir}:${bindir}!' ${D}${sysconfdir}/init.d/*
111 sed -i 's!--with-libtool-sysroot=[^ "]*!!' ${D}${includedir}/quagga/version.h
112
113 oe_multilib_header quagga/version.h
114
115 # For PAM
116 for feature in ${DISTRO_FEATURES}; do
117 if [ "$feature" = "pam" ]; then
118 install -D -m 644 ${WORKDIR}/quagga.pam ${D}/${sysconfdir}/pam.d/quagga
119 break
120 fi
121 done
122
123 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
124 install -d ${D}${nonarch_libdir}/tmpfiles.d
125 echo "d /run/quagga 0755 quagga quagga -" \
126 > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf
127 fi
128
129 # Remove sysinit script if sysvinit is not in DISTRO_FEATURES
130 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
131 rm -rf ${D}${sysconfdir}/init.d/
132 rm -f ${D}${sysconfdir}/default/watchquagga
133 fi
134
135 install -d ${D}${systemd_unitdir}/system
136 for i in bgpd isisd ospf6d ospfd ripd ripngd zebra; do
137 install -m 0644 ${WORKDIR}/$i.service ${D}${systemd_unitdir}/system
138 done
139 sed -e 's,@BASE_SBINDIR@,${base_sbindir},g' \
140 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
141 -e 's,@SBINDIR@,${sbindir},g' \
142 -e 's,@base_bindir@,${base_bindir},g' \
143 -e 's,@localstatedir@,${localstatedir},g' \
144 -i ${D}${systemd_unitdir}/system/*.service
145}
146
147DEPENDS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-systemctl-native', '', d)}"
148pkg_postinst:${PN} () {
149 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd sysvinit', 'true', 'false', d)}; then
150 if [ -n "$D" ]; then
151 OPTS="--root=$D"
152 fi
153 systemctl $OPTS mask quagga.service
154 fi
155}
156
157# Split into a main package and separate per-protocol packages
158PACKAGE_BEFORE_PN = "${PN}-ospfd ${PN}-ospf6d ${PN}-bgpd \
159 ${PN}-ripd ${PN}-ripngd ${PN}-isisd \
160 ${PN}-ospfclient ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '${PN}-watchquagga', '', d)}"
161
162RDEPENDS:${PN} += "${PN}-bgpd ${PN}-isisd ${PN}-ospf6d ${PN}-ospfd ${PN}-ripd ${PN}-ripngd"
163
164FILES:${PN}-ospfd = "${sbindir}/ospfd ${libdir}/libospf.so.*"
165FILES:${PN}-ospf6d = "${sbindir}/ospf6d"
166FILES:${PN}-bgpd = "${sbindir}/bgpd"
167FILES:${PN}-ripd = "${sbindir}/ripd"
168FILES:${PN}-ripngd = "${sbindir}/ripngd"
169FILES:${PN}-isisd = "${sbindir}/isisd"
170FILES:${PN}-ospfclient = "${sbindir}/ospfclient ${libdir}/libospfapiclient.so.*"
171FILES:${PN}-watchquagga = "${sbindir}/watchquagga ${sysconfdir}/default/watchquagga \
172 ${sysconfdir}/init.d/watchquagga"
173
174FILES:${PN} += "${nonarch_libdir}/tmpfiles.d/*.conf"
175
176# Indicate that the default files are configuration files
177CONFFILES:${PN} = "${sysconfdir}/default/quagga \
178 ${sysconfdir}/quagga/bgpd.conf \
179 ${sysconfdir}/quagga/vtysh.conf \
180 ${sysconfdir}/quagga/isisd.conf \
181 ${sysconfdir}/quagga/ospfd.conf \
182 ${sysconfdir}/quagga/ripngd.conf \
183 ${sysconfdir}/quagga/zebra.conf \
184 ${sysconfdir}/quagga/ripd.conf \
185 ${sysconfdir}/quagga/ospf6d.conf \
186 "
187CONFFILES:${PN}-watchquagga = "${sysconfdir}/default/watchquagga"
188
189# Stop the names being rewritten due to the internal shared libraries
190DEBIAN_NOAUTONAME:${PN}-ospfd = "1"
191DEBIAN_NOAUTONAME:${PN}-ospfclient = "1"
192
193# Main init script starts all deamons
194# Seperate init script for watchquagga
195INITSCRIPT_PACKAGES = "${PN} ${PN}-watchquagga"
196INITSCRIPT_NAME:${PN} = "quagga"
197INITSCRIPT_PARAMS:${PN} = "defaults 15 85"
198INITSCRIPT_NAME:${PN}-watchquagga = "watchquagga"
199INITSCRIPT_PARAMS:${PN}-watchquagga = "defaults 90 10"
200
201# Add quagga's user and group
202USERADD_PACKAGES = "${PN}"
203GROUPADD_PARAM:${PN} = "--system quagga ; --system quaggavty"
204USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/quagga/ -M -g quagga -G quaggavty --shell /bin/false quagga"
205
206pkg_postinst:${PN} () {
207 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
208 ${sysconfdir}/init.d/populate-volatile.sh update
209 fi
210}
211
212# Stop apps before uninstall
213pkg_prerm:${PN} () {
214 ${sysconfdir}/init.d/quagga stop
215}
216
217pkg_prerm:${PN}-ospfd () {
218 ${sysconfdir}/init.d/quagga stop ospfd
219}
220
221pkg_prerm:${PN}-ospf6d () {
222 ${sysconfdir}/init.d/quagga stop ospf6d
223}
224
225pkg_prerm:${PN}-bgpd () {
226 ${sysconfdir}/init.d/quagga stop bgpd
227}
228
229pkg_prerm:${PN}-ripd () {
230 ${sysconfdir}/init.d/quagga stop ripd
231}
232
233pkg_prerm:${PN}-ripngd () {
234 ${sysconfdir}/init.d/quagga stop ripngd
235}
236
237pkg_prerm:${PN}-isisd () {
238 ${sysconfdir}/init.d/quagga stop isisd
239}
240
241ALTERNATIVE:${PN} = "pimd"
242ALTERNATIVE_LINK_NAME[pimd] = "${sbindir}/pimd"
243
diff --git a/meta-networking/recipes-protocols/quagga/quagga_1.2.4.bb b/meta-networking/recipes-protocols/quagga/quagga_1.2.4.bb
deleted file mode 100644
index 37cfc131c2..0000000000
--- a/meta-networking/recipes-protocols/quagga/quagga_1.2.4.bb
+++ /dev/null
@@ -1,10 +0,0 @@
1require quagga.inc
2
3SRC_URI += "file://0001-configure-Check-for-readline-instead-of-main-in-libr.patch"
4
5SRC_URI[md5sum] = "eced21b054d71c9e1b7c6ac43286a166"
6SRC_URI[sha256sum] = "e364c082c3309910e1eb7b068bf39ee298e2f2f3f31a6431a5c115193bd653d3"
7
8CVE_CHECK_IGNORE += "\
9 CVE-2016-4049 \
10"