diff --git a/bird-2.0.8.tar.gz b/bird-2.0.8.tar.gz new file mode 100644 index 0000000..e00ebaa Binary files /dev/null and b/bird-2.0.8.tar.gz differ diff --git a/bird.service b/bird.service new file mode 100644 index 0000000..fa203c7 --- /dev/null +++ b/bird.service @@ -0,0 +1,13 @@ +[Unit] +Description=BIRD Internet Routing Daemon +Wants=network.target +After=network.target + +[Service] +Type=simple +ExecStart=/usr/sbin/bird -f -u bird -g bird +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/bird.spec b/bird.spec new file mode 100644 index 0000000..1502aeb --- /dev/null +++ b/bird.spec @@ -0,0 +1,96 @@ +%global _hardened_build 1 +Name: bird +Version: 2.0.8 +Release: 1 +Summary: BIRD Internet Routing Daemon +License: GPLv2+ +URL: https://bird.network.cz/ +Source0: https://bird.network.cz/download/bird-%{version}.tar.gz +Source1: bird.service +Source2: bird.tmpfilesd +BuildRequires: flex bison ncurses-devel readline-devel sed gcc make libssh-devel systemd +Requires(pre): shadow-utils +Obsoletes: bird-sysvinit +Obsoletes: bird6 < 2.0.2-1 +Provides: bird6 = %{version}-%{release} +%description +BIRD is a dynamic IP routing daemon supporting both, IPv4 and IPv6, Border +Gateway Protocol (BGPv4), Routing Information Protocol (RIPv2, RIPng), Open +Shortest Path First protocol (OSPFv2, OSPFv3), Babel Routing Protocol (Babel), +Bidirectional Forwarding Detection (BFD), IPv6 router advertisements, static +routes, inter-table protocol, command-line interface allowing on-line control +and inspection of the status of the daemon, soft reconfiguration as well as a +powerful language for route filtering. +%if 0%{!?_without_doc:1} + +%package doc +Summary: Documentation for BIRD Internet Routing Daemon +BuildRequires: linuxdoc-tools sgml-common perl(FindBin) +BuildArch: noarch +%description doc +Documentation for users and programmers of the BIRD Internet Routing Daemon. +BIRD is a dynamic IP routing daemon supporting both, IPv4 and IPv6, Border +Gateway Protocol (BGPv4), Routing Information Protocol (RIPv2, RIPng), Open +Shortest Path First protocol (OSPFv2, OSPFv3), Babel Routing Protocol (Babel), +Bidirectional Forwarding Detection (BFD), IPv6 router advertisements, static +routes, inter-table protocol, command-line interface allowing on-line control +and inspection of the status of the daemon, soft reconfiguration as well as a +powerful language for route filtering. +%endif + +%prep +%setup -q + +%build +%configure --runstatedir=%{_rundir}/bird +%make_build all %{!?_without_doc:docs} + +%install +%make_install +install -d %{buildroot}{%{_localstatedir}/lib/bird,%{_rundir}/bird} +install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/bird.service +install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/bird.conf + +%check +make test + +%pre +getent group bird >/dev/null || groupadd -r bird +getent passwd bird >/dev/null || \ + useradd -r -g bird -d %{_localstatedir}/lib/bird -s /sbin/nologin \ + -c "BIRD daemon user" bird +exit 0 + +%post +%systemd_post bird.service + +%preun +%systemd_preun bird.service + +%postun +%systemd_postun_with_restart bird.service + +%files +%doc NEWS README +%attr(0640,root,bird) %config(noreplace) %{_sysconfdir}/bird.conf +%{_unitdir}/bird.service +%{_tmpfilesdir}/bird.conf +%{_sbindir}/bird +%{_sbindir}/birdc +%{_sbindir}/birdcl +%dir %attr(0750,bird,bird) %{_localstatedir}/lib/bird +%dir %attr(0750,bird,bird) %{_rundir}/bird +%if 0%{!?_without_doc:1} + +%files doc +%doc NEWS README +%doc doc/bird.conf.* +%doc obj/doc/bird*.html +%doc obj/doc/bird.pdf +%doc obj/doc/prog*.html +%doc obj/doc/prog.pdf +%endif + +%changelog +* Mon Sep 6 2021 wulei - 2.0.8-1 +- package init diff --git a/bird.tmpfilesd b/bird.tmpfilesd new file mode 100644 index 0000000..a73133a --- /dev/null +++ b/bird.tmpfilesd @@ -0,0 +1 @@ +d /run/bird 750 bird bird diff --git a/bird.yaml b/bird.yaml new file mode 100644 index 0000000..c92c144 --- /dev/null +++ b/bird.yaml @@ -0,0 +1,4 @@ +version_control: NA +src_repo: https://bird.network.cz/download/ +tag_prefix: ^v +separator: .