quagga: remove

Upstream repositories do no longer exists. There has been no release in
a while. - Not a good combination for a network daemon running as root
in C that parses network packets...
master
Jörg Thalheim 2021-04-22 12:27:22 +02:00
parent 3d67a40004
commit 40945d399d
No known key found for this signature in database
GPG Key ID: B3F5D81B0C6967C4
8 changed files with 2 additions and 358 deletions

View File

@ -767,7 +767,6 @@
./services/networking/prayer.nix
./services/networking/privoxy.nix
./services/networking/prosody.nix
./services/networking/quagga.nix
./services/networking/quassel.nix
./services/networking/quorum.nix
./services/networking/quicktun.nix

View File

@ -18,6 +18,7 @@ with lib;
# Completely removed modules
(mkRemovedOptionModule [ "fonts" "fontconfig" "penultimate" ] "The corresponding package has removed from nixpkgs.")
(mkRemovedOptionModule [ "services" "quagga" ] "the corresponding package has been removed from nixpkgs")
(mkRemovedOptionModule [ "services" "chronos" ] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [ "services" "deepin" ] "The corresponding packages were removed from nixpkgs.")
(mkRemovedOptionModule [ "services" "firefox" "syncserver" "user" ] "")

View File

@ -1,185 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.quagga;
services = [ "babel" "bgp" "isis" "ospf6" "ospf" "pim" "rip" "ripng" ];
allServices = services ++ [ "zebra" ];
isEnabled = service: cfg.${service}.enable;
daemonName = service: if service == "zebra" then service else "${service}d";
configFile = service:
let
scfg = cfg.${service};
in
if scfg.configFile != null then scfg.configFile
else pkgs.writeText "${daemonName service}.conf"
''
! Quagga ${daemonName service} configuration
!
hostname ${config.networking.hostName}
log syslog
service password-encryption
!
${scfg.config}
!
end
'';
serviceOptions = service:
{
enable = mkEnableOption "the Quagga ${toUpper service} routing protocol";
configFile = mkOption {
type = types.nullOr types.path;
default = null;
example = "/etc/quagga/${daemonName service}.conf";
description = ''
Configuration file to use for Quagga ${daemonName service}.
By default the NixOS generated files are used.
'';
};
config = mkOption {
type = types.lines;
default = "";
example =
let
examples = {
rip = ''
router rip
network 10.0.0.0/8
'';
ospf = ''
router ospf
network 10.0.0.0/8 area 0
'';
bgp = ''
router bgp 65001
neighbor 10.0.0.1 remote-as 65001
'';
};
in
examples.${service} or "";
description = ''
${daemonName service} configuration statements.
'';
};
vtyListenAddress = mkOption {
type = types.str;
default = "127.0.0.1";
description = ''
Address to bind to for the VTY interface.
'';
};
vtyListenPort = mkOption {
type = types.nullOr types.int;
default = null;
description = ''
TCP Port to bind to for the VTY interface.
'';
};
};
in
{
###### interface
imports = [
{
options.services.quagga = {
zebra = (serviceOptions "zebra") // {
enable = mkOption {
type = types.bool;
default = any isEnabled services;
description = ''
Whether to enable the Zebra routing manager.
The Zebra routing manager is automatically enabled
if any routing protocols are configured.
'';
};
};
};
}
{ options.services.quagga = (genAttrs services serviceOptions); }
];
###### implementation
config = mkIf (any isEnabled allServices) {
environment.systemPackages = [
pkgs.quagga # for the vtysh tool
];
users.users.quagga = {
description = "Quagga daemon user";
isSystemUser = true;
group = "quagga";
};
users.groups = {
quagga = {};
# Members of the quaggavty group can use vtysh to inspect the Quagga daemons
quaggavty = { members = [ "quagga" ]; };
};
systemd.services =
let
quaggaService = service:
let
scfg = cfg.${service};
daemon = daemonName service;
in
nameValuePair daemon ({
wantedBy = [ "multi-user.target" ];
restartTriggers = [ (configFile service) ];
serviceConfig = {
Type = "forking";
PIDFile = "/run/quagga/${daemon}.pid";
ExecStart = "@${pkgs.quagga}/libexec/quagga/${daemon} ${daemon} -d -f ${configFile service}"
+ optionalString (scfg.vtyListenAddress != "") " -A ${scfg.vtyListenAddress}"
+ optionalString (scfg.vtyListenPort != null) " -P ${toString scfg.vtyListenPort}";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
Restart = "on-abort";
};
} // (
if service == "zebra" then
{
description = "Quagga Zebra routing manager";
unitConfig.Documentation = "man:zebra(8)";
after = [ "network.target" ];
preStart = ''
install -m 0755 -o quagga -g quagga -d /run/quagga
${pkgs.iproute2}/bin/ip route flush proto zebra
'';
}
else
{
description = "Quagga ${toUpper service} routing daemon";
unitConfig.Documentation = "man:${daemon}(8) man:zebra(8)";
bindsTo = [ "zebra.service" ];
after = [ "network.target" "zebra.service" ];
}
));
in
listToAttrs (map quaggaService (filter isEnabled allServices));
};
meta.maintainers = with lib.maintainers; [ ];
}

View File

@ -342,7 +342,6 @@ in
proxy = handleTest ./proxy.nix {};
pt2-clone = handleTest ./pt2-clone.nix {};
qboot = handleTestOn ["x86_64-linux" "i686-linux"] ./qboot.nix {};
quagga = handleTest ./quagga.nix {};
quorum = handleTest ./quorum.nix {};
rabbitmq = handleTest ./rabbitmq.nix {};
radarr = handleTest ./radarr.nix {};

View File

@ -1,96 +0,0 @@
# This test runs Quagga and checks if OSPF routing works.
#
# Network topology:
# [ client ]--net1--[ router1 ]--net2--[ router2 ]--net3--[ server ]
#
# All interfaces are in OSPF Area 0.
import ./make-test-python.nix ({ pkgs, ... }:
let
ifAddr = node: iface: (pkgs.lib.head node.config.networking.interfaces.${iface}.ipv4.addresses).address;
ospfConf = ''
interface eth2
ip ospf hello-interval 1
ip ospf dead-interval 5
!
router ospf
network 192.168.0.0/16 area 0
'';
in
{
name = "quagga";
meta = with pkgs.lib.maintainers; {
maintainers = [ ];
};
nodes = {
client =
{ nodes, ... }:
{
virtualisation.vlans = [ 1 ];
networking.defaultGateway = ifAddr nodes.router1 "eth1";
};
router1 =
{ ... }:
{
virtualisation.vlans = [ 1 2 ];
boot.kernel.sysctl."net.ipv4.ip_forward" = "1";
networking.firewall.extraCommands = "iptables -A nixos-fw -i eth2 -p ospf -j ACCEPT";
services.quagga.ospf = {
enable = true;
config = ospfConf;
};
};
router2 =
{ ... }:
{
virtualisation.vlans = [ 3 2 ];
boot.kernel.sysctl."net.ipv4.ip_forward" = "1";
networking.firewall.extraCommands = "iptables -A nixos-fw -i eth2 -p ospf -j ACCEPT";
services.quagga.ospf = {
enable = true;
config = ospfConf;
};
};
server =
{ nodes, ... }:
{
virtualisation.vlans = [ 3 ];
networking.defaultGateway = ifAddr nodes.router2 "eth1";
networking.firewall.allowedTCPPorts = [ 80 ];
services.httpd.enable = true;
services.httpd.adminAddr = "foo@example.com";
};
};
testScript =
{ ... }:
''
start_all()
# Wait for the networking to start on all machines
for machine in client, router1, router2, server:
machine.wait_for_unit("network.target")
with subtest("Wait for OSPF to form adjacencies"):
for gw in router1, router2:
gw.wait_for_unit("ospfd")
gw.wait_until_succeeds("vtysh -c 'show ip ospf neighbor' | grep Full")
gw.wait_until_succeeds("vtysh -c 'show ip route' | grep '^O>'")
with subtest("Test ICMP"):
client.wait_until_succeeds("ping -c 3 server >&2")
with subtest("Test whether HTTP works"):
server.wait_for_unit("httpd")
client.succeed("curl --fail http://server/ >&2")
'';
})

View File

@ -1,73 +0,0 @@
{ lib, stdenv, fetchurl, libcap, libnl, readline, net-snmp, less, perl, texinfo,
pkg-config, c-ares }:
stdenv.mkDerivation rec {
pname = "quagga";
version = "1.2.4";
src = fetchurl {
url = "mirror://savannah/quagga/${pname}-${version}.tar.gz";
sha256 = "1lsksqxij5f1llqn86pkygrf5672kvrqn1kvxghi169hqf1c0r73";
};
buildInputs =
[ readline net-snmp c-ares ]
++ lib.optionals stdenv.isLinux [ libcap libnl ];
nativeBuildInputs = [ pkg-config perl texinfo ];
configureFlags = [
"--sysconfdir=/etc/quagga"
"--localstatedir=/run/quagga"
"--sbindir=$(out)/libexec/quagga"
"--disable-exampledir"
"--enable-user=quagga"
"--enable-group=quagga"
"--enable-configfile-mask=0640"
"--enable-logfile-mask=0640"
"--enable-vtysh"
"--enable-vty-group=quaggavty"
"--enable-snmp"
"--enable-multipath=64"
"--enable-rtadv"
"--enable-irdp"
"--enable-opaque-lsa"
"--enable-ospf-te"
"--enable-pimd"
"--enable-isis-topology"
];
preConfigure = ''
substituteInPlace vtysh/vtysh.c --replace \"more\" \"${less}/bin/less\"
'';
postInstall = ''
rm -f $out/bin/test_igmpv3_join
mv -f $out/libexec/quagga/ospfclient $out/bin/
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Quagga BGP/OSPF/ISIS/RIP/RIPNG routing daemon suite";
longDescription = ''
GNU Quagga is free software which manages TCP/IP based routing protocols.
It supports BGP4, BGP4+, OSPFv2, OSPFv3, IS-IS, RIPv1, RIPv2, and RIPng as
well as the IPv6 versions of these.
As the predecessor Zebra has been considered orphaned, the Quagga project
has been formed by members of the zebra mailing list and the former
zebra-pj project to continue developing.
Quagga uses threading if the kernel supports it, but can also run on
kernels that do not support threading. Each protocol has its own daemon.
It is more than a routed replacement, it can be used as a Route Server and
a Route Reflector.
'';
homepage = "https://www.nongnu.org/quagga/";
license = licenses.gpl2;
platforms = platforms.unix;
maintainers = with maintainers; [ ];
};
}

View File

@ -602,6 +602,7 @@ mapAliases ({
phonon = throw "phonon: Please use libsForQt5.phonon, as Qt4 support in this package has been removed."; # added 2019-11-22
pynagsystemd = throw "pynagsystemd was removed as it was unmaintained and incompatible with recent systemd versions. Instead use its fork check_systemd."; # added 2020-10-24
python2nix = throw "python2nix has been removed as it is outdated. Use e.g. nixpkgs-pytools instead."; # added 2021-03-08
quagga = throw "quagga is no longer maintained upstream"; # added 2021-04-22
qca-qt5 = libsForQt5.qca-qt5; # added 2015-12-19
qcsxcad = libsForQt5.qcsxcad; # added 2020-11-05
qmk_firmware = throw "qmk_firmware has been removed because it was broken"; # added 2021-04-02

View File

@ -19135,8 +19135,6 @@ in
qremotecontrol-server = callPackage ../servers/misc/qremotecontrol-server { };
quagga = callPackage ../servers/quagga { };
rabbitmq-server = callPackage ../servers/amqp/rabbitmq-server {
inherit (darwin.apple_sdk.frameworks) AppKit Carbon Cocoa;
elixir = beam_nox.interpreters.elixir_1_8;