diff options
| author | Yi Zhao <yi.zhao@windriver.com> | 2023-03-05 15:26:48 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-03-05 14:34:38 -0800 |
| commit | 0b3e6c1973d53161fa574e4112e65290d9e0f080 (patch) | |
| tree | f13f12eb89a2654811155f800e6dadb771b3fb44 | |
| parent | 80740b1d3c7ce2910410a7b49ca1e3bb012d3d4a (diff) | |
| download | meta-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>
17 files changed, 0 insertions, 695 deletions
diff --git a/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb b/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb index 11437e2238..b681031c5f 100644 --- a/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb +++ b/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb | |||
| @@ -158,7 +158,6 @@ RDEPENDS:packagegroup-meta-networking-protocols = "\ | |||
| 158 | openl2tp \ | 158 | openl2tp \ |
| 159 | mdns \ | 159 | mdns \ |
| 160 | nopoll \ | 160 | nopoll \ |
| 161 | quagga \ | ||
| 162 | radiusclient-ng \ | 161 | radiusclient-ng \ |
| 163 | tsocks \ | 162 | tsocks \ |
| 164 | openlldp \ | 163 | openlldp \ |
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 @@ | |||
| 1 | From 675b35b7ed416c837267e493b157167319e8f5fa Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 1 Sep 2022 11:01:53 -0700 | ||
| 4 | Subject: [PATCH] configure: Check for readline() instead of main() in | ||
| 5 | libreadline | ||
| 6 | |||
| 7 | while checking for presense of libreadline, poke for a function which is | ||
| 8 | provided by libreadline, main is not provided by it, so modern compiler | ||
| 9 | toolchains may complain about it. | ||
| 10 | |||
| 11 | Upstream-Status: Submitted [https://github.com/Quagga/quagga/pull/9] | ||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | configure.ac | 2 +- | ||
| 15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 16 | |||
| 17 | diff --git a/configure.ac b/configure.ac | ||
| 18 | index 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 | -- | ||
| 31 | 2.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] | ||
| 2 | Description=BGP routing daemon | ||
| 3 | BindTo=zebra.service | ||
| 4 | After=zebra.service | ||
| 5 | ConditionPathExists=@SYSCONFDIR@/quagga/bgpd.conf | ||
| 6 | |||
| 7 | [Service] | ||
| 8 | Type=forking | ||
| 9 | EnvironmentFile=-@SYSCONFDIR@/default/quagga | ||
| 10 | ExecStart=@SBINDIR@/bgpd -d $bgpd_options -f @SYSCONFDIR@/quagga/bgpd.conf | ||
| 11 | ExecStopPost=@base_bindir@/rm -rf /run/quagga/bgpd.pid | ||
| 12 | Restart=on-abort | ||
| 13 | |||
| 14 | [Install] | ||
| 15 | WantedBy=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] | ||
| 2 | Description=IS-IS routing daemon | ||
| 3 | BindTo=zebra.service | ||
| 4 | After=zebra.service | ||
| 5 | ConditionPathExists=@SYSCONFDIR@/quagga/isisd.conf | ||
| 6 | |||
| 7 | [Service] | ||
| 8 | Type=forking | ||
| 9 | EnvironmentFile=-@SYSCONFDIR@/default/quagga | ||
| 10 | ExecStart=@SBINDIR@/isisd -d $isisd_options -f /etc/quagga/isisd.conf | ||
| 11 | Restart=on-abort | ||
| 12 | |||
| 13 | [Install] | ||
| 14 | WantedBy=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] | ||
| 2 | Description=OSPF routing daemon for IPv6 | ||
| 3 | BindTo=zebra.service | ||
| 4 | After=zebra.service | ||
| 5 | ConditionPathExists=@SYSCONFDIR@/quagga/ospf6d.conf | ||
| 6 | |||
| 7 | [Service] | ||
| 8 | Type=forking | ||
| 9 | EnvironmentFile=-@SYSCONFDIR@/default/quagga | ||
| 10 | ExecStart=@SBINDIR@/ospf6d -d $ospf6d_options -f @SYSCONFDIR@/quagga/ospf6d.conf | ||
| 11 | ExecStopPost=@base_bindir@/rm -rf /run/quagga/ospf6d.pid | ||
| 12 | Restart=on-abort | ||
| 13 | |||
| 14 | [Install] | ||
| 15 | WantedBy=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] | ||
| 2 | Description=OSPF routing daemon | ||
| 3 | BindTo=zebra.service | ||
| 4 | After=zebra.service | ||
| 5 | ConditionPathExists=@SYSCONFDIR@/quagga/ospfd.conf | ||
| 6 | |||
| 7 | [Service] | ||
| 8 | Type=forking | ||
| 9 | EnvironmentFile=-@SYSCONFDIR@/default/quagga | ||
| 10 | ExecStart=@SBINDIR@/ospfd -d $ospfd_options -f @SYSCONFDIR@/quagga/ospfd.conf | ||
| 11 | ExecStopPost=@base_bindir@/rm -rf /run/quagga/ospfd.pid | ||
| 12 | Restart=on-abort | ||
| 13 | |||
| 14 | [Install] | ||
| 15 | WantedBy=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. | ||
| 3 | vtysh_enable=yes | ||
| 4 | |||
| 5 | # Bind all daemons to loopback only by default | ||
| 6 | zebra_options=" --daemon -A 127.0.0.1" | ||
| 7 | bgpd_options=" --daemon -A 127.0.0.1" | ||
| 8 | ospfd_options=" --daemon -A 127.0.0.1" | ||
| 9 | ospf6d_options="--daemon -A ::1" | ||
| 10 | ripd_options=" --daemon -A 127.0.0.1" | ||
| 11 | ripngd_options="--daemon -A ::1" | ||
| 12 | isisd_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 | ||
| 24 | PATH=/sbin:/usr/sbin:/bin:/usr/bin:/sbin | ||
| 25 | D_PATH=/usr/sbin | ||
| 26 | C_PATH=/etc/quagga | ||
| 27 | |||
| 28 | # Keep zebra first and do not list watchquagga! | ||
| 29 | DAEMONS="zebra bgpd ripd ripngd ospfd ospf6d isisd" | ||
| 30 | |||
| 31 | # Print the name of the pidfile. | ||
| 32 | pidfile() | ||
| 33 | { | ||
| 34 | echo "/var/run/quagga/$1.pid" | ||
| 35 | } | ||
| 36 | |||
| 37 | # Check if daemon is started by using the pidfile. | ||
| 38 | started() | ||
| 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. | ||
| 45 | vtysh_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 | ||
| 57 | check_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. | ||
| 73 | start() | ||
| 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. | ||
| 87 | stop() | ||
| 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 | |||
| 118 | stop_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 | |||
| 130 | start_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 | |||
| 142 | status_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 | ||
| 169 | test -f /etc/default/quagga && . /etc/default/quagga | ||
| 170 | |||
| 171 | case "$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 | ;; | ||
| 198 | esac | ||
| 199 | |||
| 200 | exit 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 | ||
| 7 | auth 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. | ||
| 12 | auth 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] | ||
| 2 | Description=RIP routing daemon | ||
| 3 | BindTo=zebra.service | ||
| 4 | After=zebra.service | ||
| 5 | ConditionPathExists=@SYSCONFDIR@/quagga/ripd.conf | ||
| 6 | |||
| 7 | [Service] | ||
| 8 | Type=forking | ||
| 9 | EnvironmentFile=-@SYSCONFDIR@/default/quagga | ||
| 10 | ExecStart=@SBINDIR@/ripd -d $ripd_options -f @SYSCONFDIR@/quagga/ripd.conf | ||
| 11 | ExecStopPost=@base_bindir@/rm -rf /run/quagga/ripd.pid | ||
| 12 | Restart=on-abort | ||
| 13 | |||
| 14 | [Install] | ||
| 15 | WantedBy=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] | ||
| 2 | Description=RIP routing daemon for IPv6 | ||
| 3 | BindTo=zebra.service | ||
| 4 | After=zebra.service | ||
| 5 | ConditionPathExists=@SYSCONFDIR@/quagga/ripngd.conf | ||
| 6 | |||
| 7 | [Service] | ||
| 8 | Type=forking | ||
| 9 | EnvironmentFile=-@SYSCONFDIR@/default/quagga | ||
| 10 | ExecStart=@SBINDIR@/ripngd -d $ripngd_options -f @SYSCONFDIR@/quagga/ripngd.conf | ||
| 11 | ExecStopPost=@base_bindir@/rm -rf /run/quagga/ripngd.pid | ||
| 12 | Restart=on-abort | ||
| 13 | |||
| 14 | [Install] | ||
| 15 | WantedBy=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> | ||
| 2 | d quagga quagga 0755 /var/run/quagga none | ||
| 3 | d 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" | ||
| 3 | watch_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. | ||
| 12 | watch_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 | |||
| 12 | PATH=/bin:/usr/bin:/sbin:/usr/sbin | ||
| 13 | |||
| 14 | # Load configuration | ||
| 15 | test -f /etc/default/watchquagga && . /etc/default/watchquagga | ||
| 16 | |||
| 17 | # Check that there are daemons to be monitored. | ||
| 18 | [ -z "$watch_daemons" ] && exit 0 | ||
| 19 | |||
| 20 | pidfile="/var/run/quagga/watchquagga.pid" | ||
| 21 | |||
| 22 | case "$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 | ;; | ||
| 62 | esac | ||
| 63 | |||
| 64 | exit 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] | ||
| 2 | Description=GNU Zebra routing manager | ||
| 3 | Wants=network.target | ||
| 4 | Before=network.target | ||
| 5 | ConditionPathExists=@SYSCONFDIR@/quagga/zebra.conf | ||
| 6 | |||
| 7 | [Service] | ||
| 8 | Type=forking | ||
| 9 | EnvironmentFile=-@SYSCONFDIR@/default/quagga | ||
| 10 | ExecStartPre=@BASE_SBINDIR@/ip route flush proto zebra | ||
| 11 | ExecStart=@SBINDIR@/zebra -d $zebra_options -f @SYSCONFDIR@/quagga/zebra.conf | ||
| 12 | ExecStopPost=@base_bindir@/rm -rf /run/quagga/zebra.pid | ||
| 13 | Restart=on-abort | ||
| 14 | |||
| 15 | [Install] | ||
| 16 | WantedBy=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 @@ | |||
| 1 | SUMMARY = "BGP/OSPF/RIP routing daemon" | ||
| 2 | DESCRIPTION = "Quagga is a routing software suite, providing \ | ||
| 3 | implementations of OSPFv2, OSPFv3, RIP v1 and v2, RIPv3 and BGPv4 for \ | ||
| 4 | Unix platforms, particularly FreeBSD, Linux, Solaris and NetBSD. \ | ||
| 5 | Quagga is a fork of GNU Zebra which was developed by Kunihiro \ | ||
| 6 | Ishiguro. The Quagga tree aims to build a more involved community \ | ||
| 7 | around Quagga than the current centralised model of GNU Zebra." | ||
| 8 | HOMEPAGE = "http://www.nongnu.org/quagga/" | ||
| 9 | SECTION = "net" | ||
| 10 | |||
| 11 | |||
| 12 | LICENSE = "GPL-2.0-only & LGPL-2.0-only" | ||
| 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=81bcece21748c91ba9992349a91ec11d \ | ||
| 14 | file://COPYING.LIB;md5=01ef24401ded36cd8e5d18bfe947240c" | ||
| 15 | |||
| 16 | DEPENDS = "readline ncurses perl-native c-ares" | ||
| 17 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'snmp', 'net-snmp', '', d)}" | ||
| 18 | SNMP_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) | ||
| 21 | RDEPENDS:${PN} += "iproute2" | ||
| 22 | |||
| 23 | SRC_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 | |||
| 39 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" | ||
| 40 | PACKAGECONFIG[cap] = "--enable-capabilities,--disable-capabilities,libcap" | ||
| 41 | PACKAGECONFIG[pam] = "--with-libpam, --without-libpam, libpam" | ||
| 42 | |||
| 43 | inherit autotools update-rc.d useradd systemd pkgconfig multilib_header update-alternatives | ||
| 44 | |||
| 45 | CFLAGS += "-fcommon" | ||
| 46 | |||
| 47 | SYSTEMD_PACKAGES = "${PN} ${PN}-bgpd ${PN}-isisd ${PN}-ospf6d ${PN}-ospfd ${PN}-ripd ${PN}-ripngd" | ||
| 48 | SYSTEMD_SERVICE:${PN}-bgpd = "bgpd.service" | ||
| 49 | SYSTEMD_SERVICE:${PN}-isisd = "isisd.service" | ||
| 50 | SYSTEMD_SERVICE:${PN}-ospf6d = "ospf6d.service" | ||
| 51 | SYSTEMD_SERVICE:${PN}-ospfd = "ospfd.service" | ||
| 52 | SYSTEMD_SERVICE:${PN}-ripd = "ripd.service" | ||
| 53 | SYSTEMD_SERVICE:${PN}-ripngd = "ripngd.service" | ||
| 54 | SYSTEMD_SERVICE:${PN} = "zebra.service" | ||
| 55 | |||
| 56 | EXTRA_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 | |||
| 74 | CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" | ||
| 75 | |||
| 76 | do_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 | |||
| 147 | DEPENDS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-systemctl-native', '', d)}" | ||
| 148 | pkg_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 | ||
| 158 | PACKAGE_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 | |||
| 162 | RDEPENDS:${PN} += "${PN}-bgpd ${PN}-isisd ${PN}-ospf6d ${PN}-ospfd ${PN}-ripd ${PN}-ripngd" | ||
| 163 | |||
| 164 | FILES:${PN}-ospfd = "${sbindir}/ospfd ${libdir}/libospf.so.*" | ||
| 165 | FILES:${PN}-ospf6d = "${sbindir}/ospf6d" | ||
| 166 | FILES:${PN}-bgpd = "${sbindir}/bgpd" | ||
| 167 | FILES:${PN}-ripd = "${sbindir}/ripd" | ||
| 168 | FILES:${PN}-ripngd = "${sbindir}/ripngd" | ||
| 169 | FILES:${PN}-isisd = "${sbindir}/isisd" | ||
| 170 | FILES:${PN}-ospfclient = "${sbindir}/ospfclient ${libdir}/libospfapiclient.so.*" | ||
| 171 | FILES:${PN}-watchquagga = "${sbindir}/watchquagga ${sysconfdir}/default/watchquagga \ | ||
| 172 | ${sysconfdir}/init.d/watchquagga" | ||
| 173 | |||
| 174 | FILES:${PN} += "${nonarch_libdir}/tmpfiles.d/*.conf" | ||
| 175 | |||
| 176 | # Indicate that the default files are configuration files | ||
| 177 | CONFFILES:${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 | " | ||
| 187 | CONFFILES:${PN}-watchquagga = "${sysconfdir}/default/watchquagga" | ||
| 188 | |||
| 189 | # Stop the names being rewritten due to the internal shared libraries | ||
| 190 | DEBIAN_NOAUTONAME:${PN}-ospfd = "1" | ||
| 191 | DEBIAN_NOAUTONAME:${PN}-ospfclient = "1" | ||
| 192 | |||
| 193 | # Main init script starts all deamons | ||
| 194 | # Seperate init script for watchquagga | ||
| 195 | INITSCRIPT_PACKAGES = "${PN} ${PN}-watchquagga" | ||
| 196 | INITSCRIPT_NAME:${PN} = "quagga" | ||
| 197 | INITSCRIPT_PARAMS:${PN} = "defaults 15 85" | ||
| 198 | INITSCRIPT_NAME:${PN}-watchquagga = "watchquagga" | ||
| 199 | INITSCRIPT_PARAMS:${PN}-watchquagga = "defaults 90 10" | ||
| 200 | |||
| 201 | # Add quagga's user and group | ||
| 202 | USERADD_PACKAGES = "${PN}" | ||
| 203 | GROUPADD_PARAM:${PN} = "--system quagga ; --system quaggavty" | ||
| 204 | USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/quagga/ -M -g quagga -G quaggavty --shell /bin/false quagga" | ||
| 205 | |||
| 206 | pkg_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 | ||
| 213 | pkg_prerm:${PN} () { | ||
| 214 | ${sysconfdir}/init.d/quagga stop | ||
| 215 | } | ||
| 216 | |||
| 217 | pkg_prerm:${PN}-ospfd () { | ||
| 218 | ${sysconfdir}/init.d/quagga stop ospfd | ||
| 219 | } | ||
| 220 | |||
| 221 | pkg_prerm:${PN}-ospf6d () { | ||
| 222 | ${sysconfdir}/init.d/quagga stop ospf6d | ||
| 223 | } | ||
| 224 | |||
| 225 | pkg_prerm:${PN}-bgpd () { | ||
| 226 | ${sysconfdir}/init.d/quagga stop bgpd | ||
| 227 | } | ||
| 228 | |||
| 229 | pkg_prerm:${PN}-ripd () { | ||
| 230 | ${sysconfdir}/init.d/quagga stop ripd | ||
| 231 | } | ||
| 232 | |||
| 233 | pkg_prerm:${PN}-ripngd () { | ||
| 234 | ${sysconfdir}/init.d/quagga stop ripngd | ||
| 235 | } | ||
| 236 | |||
| 237 | pkg_prerm:${PN}-isisd () { | ||
| 238 | ${sysconfdir}/init.d/quagga stop isisd | ||
| 239 | } | ||
| 240 | |||
| 241 | ALTERNATIVE:${PN} = "pimd" | ||
| 242 | ALTERNATIVE_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 @@ | |||
| 1 | require quagga.inc | ||
| 2 | |||
| 3 | SRC_URI += "file://0001-configure-Check-for-readline-instead-of-main-in-libr.patch" | ||
| 4 | |||
| 5 | SRC_URI[md5sum] = "eced21b054d71c9e1b7c6ac43286a166" | ||
| 6 | SRC_URI[sha256sum] = "e364c082c3309910e1eb7b068bf39ee298e2f2f3f31a6431a5c115193bd653d3" | ||
| 7 | |||
| 8 | CVE_CHECK_IGNORE += "\ | ||
| 9 | CVE-2016-4049 \ | ||
| 10 | " | ||
