[packages/bird2] - updated to 2.0.10 (named as bird2 inline with other distros)
adamg
adamg at pld-linux.org
Mon Oct 3 20:46:38 CEST 2022
commit b6147e4b3c8b25781a51f256a7012a8441c79440
Author: Adam Gołębiowski <adamg at pld-linux.org>
Date: Mon Oct 3 18:38:40 2022 +0000
- updated to 2.0.10 (named as bird2 inline with other distros)
bird-allowalien.patch | 14 --
bird-ipv4.sysconfig | 7 -
bird-ipv6.init | 82 -----------
bird-ipv6.service | 14 --
bird.spec | 245 ---------------------------------
bird-ipv4.init => bird2.init | 28 ++--
bird-ipv4.service => bird2.service | 0
bird2.spec | 121 ++++++++++++++++
bird-ipv6.sysconfig => bird2.sysconfig | 2 +-
9 files changed, 136 insertions(+), 377 deletions(-)
---
diff --git a/bird.spec b/bird.spec
deleted file mode 100644
index cc52d09..0000000
--- a/bird.spec
+++ /dev/null
@@ -1,245 +0,0 @@
-# TODO:
-# - trigger to clean up after old bird package (stop, chkconfig --del)
-#
-# Conditional build:
-%bcond_without ipv6 # disable IPv6 support (and building bird-ipv6 package)
-%bcond_without ipv4 # disable IPv4 support (and building bird-ipv4 package)
-%bcond_with alien # enable possibility to import 'alien' routes import into bird's routing table
-#
-Summary: The BIRD Internet Routing Daemon
-Summary(pl.UTF-8): Demon BIRD Internetowego Routingu Dynamicznego
-Name: bird
-Version: 1.6.8
-Release: 1
-License: GPL v2+
-Group: Networking/Daemons
-Source0: ftp://bird.network.cz/pub/bird/%{name}-%{version}.tar.gz
-# Source0-md5: abe29a927e21a3d7f8092641f06093c2
-Source1: %{name}-ipv4.init
-Source2: %{name}-ipv4.sysconfig
-Source3: %{name}-ipv6.init
-Source4: %{name}-ipv6.sysconfig
-Source5: ftp://bird.network.cz/pub/bird/%{name}-doc-%{version}.tar.gz
-# Source5-md5: d5b69caeee629479e0261aba18d35758
-Source6: %{name}-ipv4.service
-Source7: %{name}-ipv6.service
-Patch0: %{name}-allowalien.patch
-Patch1: gcc.patch
-URL: http://bird.network.cz/
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: bison
-BuildRequires: flex
-BuildRequires: readline-devel >= 4.2
-BuildRequires: rpmbuild(macros) >= 1.268
-Requires(post,preun): /sbin/chkconfig
-Requires: bird-daemon
-Requires: rc-scripts
-Requires(postun): /usr/sbin/userdel
-Requires(pre): /usr/sbin/useradd
-Obsoletes: gated
-Obsoletes: mrt
-Obsoletes: zebra
-Obsoletes: zebra-guile
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-The BIRD project is an attempt to create a routing daemon running on
-UNIX-like systems (but not necessarily limited to them) with full
-support of all modern routing protocols, easy to use configuration
-interface and powerful route filtering language.
-
-%description -l pl.UTF-8
-Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
-pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
-protokołów routingu, łatwym interfejsem konfiguracji i językiem
-filtrów o dużych możliwościach.
-
-%package ipv4
-Summary: Routing daemon for IPv4
-Summary(pl.UTF-8): Demon dynamicznego routingu IPv4
-Group: Networking/Daemons
-Requires(post,preun): /sbin/chkconfig
-Requires: %{name} = %{version}-%{release}
-Requires: rc-scripts
-Provides: bird-daemon
-Provides: routingdaemon
-Obsoletes: gated
-Obsoletes: mrt
-Obsoletes: zebra
-Obsoletes: zebra-guile
-
-%description ipv4
-The BIRD project is an attempt to create a routing daemon running on
-UNIX-like systems (but not necessarily limited to them) with full
-support of all modern routing protocols, easy to use configuration
-interface and powerful route filtering language.
-
-%description ipv4 -l pl.UTF-8
-Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
-pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
-protokołów routingu, łatwym interfejsem konfiguracji i językiem
-filtrów o dużych możliwościach.
-
-%package ipv6
-Summary: Routing daemon for IPv6
-Summary(pl.UTF-8): Demon dynamicznego routingu IPv6
-Group: Networking/Daemons
-Requires(post,preun): /sbin/chkconfig
-Requires: %{name} = %{version}-%{release}
-Requires: rc-scripts
-Provides: bird-daemon
-Provides: routingdaemon
-Obsoletes: gated
-Obsoletes: mrt
-Obsoletes: zebra
-Obsoletes: zebra-guile
-
-%description ipv6
-The BIRD project is an attempt to create a routing daemon running on
-UNIX-like systems (but not necessarily limited to them) with full
-support of all modern routing protocols, easy to use configuration
-interface and powerful route filtering language.
-
-%description ipv6 -l pl.UTF-8
-Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
-pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
-protokołów routingu, łatwym interfejsem konfiguracji i językiem
-filtrów o dużych możliwościach.
-
-%prep
-%setup -q -a 5
-%{?with_alien:%patch0 -p1}
-%patch1 -p1
-
-%build
-cp -f /usr/share/automake/config.* tools
-%{__autoconf}
-
-export CFLAGS="%{rpmcflags} -I%{_includedir}/ncursesw -fno-strict-aliasing -fno-strict-overflow"
-
-%if %{with ipv6}
-%configure \
- --disable-memcheck \
- --enable-client \
- --enable-ipv6
-%{__make} -j1
-
-mv bird bird-6
-
-%{__make} clean
-%endif
-
-%if %{with ipv4}
-%configure \
- --disable-memcheck \
- --enable-client \
- --disable-ipv6
-%{__make} -j1
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_sbindir}} \
- $RPM_BUILD_ROOT%{systemdunitdir}
-
-install birdc $RPM_BUILD_ROOT%{_sbindir}
-
-%if %{with ipv4}
-install bird $RPM_BUILD_ROOT%{_sbindir}
-install doc/bird.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv4
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv4
-install %{SOURCE6} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-ipv4.service
-%endif
-
-%if %{with ipv6}
-install bird-6 $RPM_BUILD_ROOT%{_sbindir}
-cat <<EOF > $RPM_BUILD_ROOT%{_sbindir}/birdc-6
-#!/bin/sh
-exec %{_sbindir}/birdc -s /var/run/bird6.ctl
-EOF
-:> $RPM_BUILD_ROOT%{_sysconfdir}/%{name}6.conf
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv6
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv6
-install %{SOURCE7} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-ipv6.service
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%pre
-%groupadd -g 271 bird
-%useradd -u 271 -d /usr/share/empty -s /bin/false -c "bird routing daemon" -g bird bird
-
-%postun
-if [ "$1" = "0" ]; then
- %userremove bird
- %groupremove bird
-fi
-
-%post ipv4
-/sbin/chkconfig --add %{name}-ipv4
-%service %{name}-ipv4 restart "routing daemon"
-%systemd_post %{name}-ipv4.service
-
-%preun ipv4
-if [ "$1" = "0" ]; then
- %service %{name}-ipv4 stop
- /sbin/chkconfig --del %{name}-ipv4
-fi
-%systemd_preun %{name}-ipv4.service
-
-%postun ipv4
-%systemd_reload
-
-%post ipv6
-/sbin/chkconfig --add %{name}-ipv6
-%service %{name}-ipv6 restart "routing daemon"
-%systemd_post %{name}-ipv6.service
-
-%preun ipv6
-if [ "$1" = "0" ]; then
- %service %{name}-ipv6 stop
- /sbin/chkconfig --del %{name}-ipv6
-fi
-%systemd_preun %{name}-ipv6.service
-
-%postun ipv6
-%systemd_reload
-
-%triggerpostun ipv4 -- %{name}-ipv4 < 1.3.4-3
-chmod 0640 /etc/bird.conf
-chgrp bird /etc/bird.conf
-
-%triggerpostun -- %{name}-ipv4 < 1.4.5-2
-%systemd_trigger %{name}-ipv4.service
-
-%triggerpostun -- %{name}-ipv6 < 1.4.5-2
-%systemd_trigger %{name}-ipv6.service
-
-%files
-%defattr(644,root,root,755)
-%doc doc/*.html doc/reply_codes %{name}-doc-%{version}/doc/*.pdf ChangeLog NEWS README
-%attr(755,root,root) %{_sbindir}/birdc
-
-%if %{with ipv4}
-%files ipv4
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_sbindir}/bird
-%attr(754,root,root) /etc/rc.d/init.d/bird-ipv4
-%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv4
-%attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird.conf
-%{systemdunitdir}/%{name}-ipv4.service
-%endif
-
-%if %{with ipv6}
-%files ipv6
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_sbindir}/bird-6
-%attr(755,root,root) %{_sbindir}/birdc-6
-%attr(754,root,root) /etc/rc.d/init.d/bird-ipv6
-%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv6
-%attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird6.conf
-%{systemdunitdir}/%{name}-ipv6.service
-%endif
diff --git a/bird2.spec b/bird2.spec
new file mode 100644
index 0000000..ceb6514
--- /dev/null
+++ b/bird2.spec
@@ -0,0 +1,121 @@
+# Conditional build:
+%bcond_without docs # don't build html docs
+%bcond_without libssh # disable libssh support in RPKI
+%bcond_without mpls_kernel # disable MPLS support in kernel protocol
+#
+Summary: The BIRD Internet Routing Daemon
+Summary(pl.UTF-8): Demon BIRD Internetowego Routingu Dynamicznego
+Name: bird2
+Version: 2.0.10
+Release: 0.1
+License: GPL v2+
+Group: Networking/Daemons
+Source0: https://bird.network.cz/download/bird-%{version}.tar.gz
+# Source0-md5: 1026621839e0162844afa991ad9a7355
+Source1: https://bird.network.cz/download/bird-doc-%{version}.tar.gz
+# Source1-md5: ad099b03849730aa7bd6931b89dae490
+Source2: %{name}.init
+Source3: %{name}.sysconfig
+Source4: %{name}.service
+URL: https://bird.network.cz/
+BuildRequires: autoconf
+BuildRequires: automake
+BuildRequires: bison
+BuildRequires: flex
+%{?with_libssh:BuildRequires: libssh-devel}
+%{?with_docs:BuildRequires: opensp}
+BuildRequires: readline-devel >= 4.2
+BuildRequires: rpmbuild(macros) >= 1.268
+%{?with_docs:BuildRequires: sgmls}
+%{?with_docs:BuildRequires: sgml-tools}
+%{?with_docs:BuildRequires: texlive-format-pdflatex}
+%{?with_docs:BuildRequires: texlive-latex-enumitem}
+%{?with_docs:BuildRequires: texlive-xetex}
+Requires(post,preun): /sbin/chkconfig
+Requires: rc-scripts
+Requires(postun): /usr/sbin/userdel
+Requires(pre): /usr/sbin/useradd
+Obsoletes: bird-ipv4
+Obsoletes: bird-ipv6
+Obsoletes: gated
+Obsoletes: mrt
+Obsoletes: zebra
+Obsoletes: zebra-guile
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The BIRD project is an attempt to create a routing daemon running on
+UNIX-like systems (but not necessarily limited to them) with full
+support of all modern routing protocols, easy to use configuration
+interface and powerful route filtering language.
+
+%description -l pl.UTF-8
+Projekt BIRD ma na celu utworzenie daemona dynamicznego routingu
+pracującego na systemach UNIX z pełnym wsparciem dla nowoczesnych
+protokołów routingu, łatwym interfejsem konfiguracji i językiem
+filtrów o dużych możliwościach.
+
+%prep
+%setup -q -n bird-%{version} -a 1
+
+%build
+cp -f /usr/share/automake/config.* tools
+%{__autoconf}
+
+%configure \
+ --disable-memcheck \
+ --enable-client \
+ %{__enable_disable libssh libssh} \
+ %{__enable_disable mpls_kernel mpls-kernel} \
+
+%{__make}
+%{?with_docs:%{__make} docs}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_sbindir}} \
+ $RPM_BUILD_ROOT%{systemdunitdir}
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/bird
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/bird
+install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/bird.service
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%pre
+%groupadd -g 271 bird
+%useradd -u 271 -d /usr/share/empty -s /bin/false -c "bird routing daemon" -g bird bird
+
+%post
+/sbin/chkconfig --add bird
+%service bird restart "routing daemon"
+%systemd_post bird.service
+
+%preun
+if [ "$1" = "0" ]; then
+ %service bird stop
+ /sbin/chkconfig --del bird
+fi
+%systemd_preun bird.service
+
+%postun
+if [ "$1" = "0" ]; then
+ %userremove bird
+ %groupremove bird
+fi
+%systemd_reload
+
+%files
+%defattr(644,root,root,755)
+%doc %{?with_docs:obj/doc/*.html} doc/reply_codes bird-doc-%{version}/doc/*.pdf ChangeLog NEWS README
+%attr(755,root,root) %{_sbindir}/bird
+%attr(755,root,root) %{_sbindir}/birdc
+%attr(755,root,root) %{_sbindir}/birdcl
+%attr(754,root,root) /etc/rc.d/init.d/bird
+%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird
+%attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird.conf
+%{systemdunitdir}/bird.service
diff --git a/bird-allowalien.patch b/bird-allowalien.patch
deleted file mode 100644
index 600640e..0000000
--- a/bird-allowalien.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -ru bird-1.3.9.orig/sysdep/linux/netlink.c bird-1.3.9/sysdep/linux/netlink.c
---- bird-1.3.9.orig/sysdep/linux/netlink.c 2012-08-07 11:15:45.000000000 +0200
-+++ bird-1.3.9/sysdep/linux/netlink.c 2013-02-03 18:58:22.203590335 +0100
-@@ -870,8 +870,9 @@
- * for their 'alien' routes.
- */
-
-- if (i->rtm_protocol == RTPROT_BOOT)
-+ /*if (i->rtm_protocol == RTPROT_BOOT)
- src = KRT_SRC_KERNEL;
-+ */
- }
-
- break;
diff --git a/bird-ipv4.sysconfig b/bird-ipv4.sysconfig
deleted file mode 100644
index 714da4a..0000000
--- a/bird-ipv4.sysconfig
+++ /dev/null
@@ -1,7 +0,0 @@
-# Customized setings for bird IPv4
-
-# Define nice level for bird
-SERVICE_RUN_NICE_LEVEL="+5"
-
-# Additional options
-#BIRD_OPTS="-R"
diff --git a/bird-ipv6.init b/bird-ipv6.init
deleted file mode 100644
index 3a8ef3b..0000000
--- a/bird-ipv6.init
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/sh
-#
-# bird Starts the Dynamic Route Daemon
-#
-# chkconfig: 345 11 90
-#
-# description: Dynamic Route Daemon for IPv6 routers
-#
-# processname: bird-6
-# config: /etc/bird.conf
-
-
-# Source function library
-. /etc/rc.d/init.d/functions
-
-# Get network config
-. /etc/sysconfig/network
-
-# Get service config
-[ -f /etc/sysconfig/bird-ipv6 ] && . /etc/sysconfig/bird-ipv6
-
-# Check that networking is up.
-if is_yes "${NETWORKING}"; then
- if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
- msg_network_down bird
- exit 1
- fi
-else
- exit 0
-fi
-
-# Sanity checks.
-[ -f /etc/bird.conf ] || exit 0
-
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
- # Check if the services are already running?
- if [ ! -f /var/lock/subsys/bird-ipv6 ]; then
- msg_starting "bird for IPv6"
- daemon ${SERVICE_RUN_NICE_LEVEL} /usr/sbin/bird-6 -u bird -g bird
- RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird-ipv6
- else
- msg_already_running "bird for IPv6"
- fi
- ;;
- stop)
- if [ -f /var/lock/subsys/bird-ipv6 ]; then
- msg_stopping "bird for IPv6"
- killproc bird-6
- rm -f /var/lock/subsys/bird-ipv6
- else
- msg_not_running "bird for IPv6"
- fi
- ;;
- reload|force-reload)
- if [ -f /var/lock/subsys/bird-ipv6 ]; then
- msg_reloading "bird for IPv6"
- killproc bird-6 -HUP
- RETVAL=$?
- else
- msg_not_running "bird for IPv6"
- RETVAL=7
- fi
- ;;
- status)
- status bird-ipv6 bird-6
- exit $?
- ;;
- restart|force-reload)
- $0 stop
- $0 start
- exit $?
- ;;
- *)
- msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
- exit 3
-esac
-
-exit $RETVAL
diff --git a/bird-ipv6.service b/bird-ipv6.service
deleted file mode 100644
index af4ab73..0000000
--- a/bird-ipv6.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=BIRD Internet Routing Daemon for IPv6
-After=network.target
-
-[Service]
-Type=forking
-Restart=on-failure
-EnvironmentFile=/etc/sysconfig/bird-ipv6
-ExecStart=/usr/sbin/bird-6 -u bird -g bird $BIRD_OPTS
-ExecReload=/usr/bin/kill -HUP $MAINPID
-
-[Install]
-WantedBy=multi-user.target
-Alias=bird-6.service
diff --git a/bird-ipv4.init b/bird2.init
similarity index 63%
rename from bird-ipv4.init
rename to bird2.init
index 276e400..00f9d6a 100644
--- a/bird-ipv4.init
+++ b/bird2.init
@@ -4,7 +4,7 @@
#
# chkconfig: 345 11 90
#
-# description: Dynamic Route Daemon for IPv4 routers
+# description: Dynamic Route Daemon for IPv4/IPv6 routers
#
# processname: bird
# config: /etc/bird.conf
@@ -17,7 +17,7 @@
. /etc/sysconfig/network
# Get service config
-[ -f /etc/sysconfig/bird-ipv4 ] && . /etc/sysconfig/bird-ipv4
+[ -f /etc/sysconfig/bird ] && . /etc/sysconfig/bird
# Check that networking is up.
if is_yes "${NETWORKING}"; then
@@ -37,36 +37,36 @@ RETVAL=0
case "$1" in
start)
# Check if the services are already running?
- if [ ! -f /var/lock/subsys/bird-ipv4 ]; then
- msg_starting "bird for IPv4"
+ if [ ! -f /var/lock/subsys/bird ]; then
+ msg_starting "bird"
daemon ${SERVICE_RUN_NICE_LEVEL} /usr/sbin/bird -u bird -g bird
RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird-ipv4
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bird
else
- msg_already_running "bird for IPv4"
+ msg_already_running "bird"
fi
;;
stop)
- if [ -f /var/lock/subsys/bird-ipv4 ]; then
- msg_stopping "bird for IPv4"
+ if [ -f /var/lock/subsys/bird ]; then
+ msg_stopping "bird"
killproc bird
- rm -f /var/lock/subsys/bird-ipv4
+ rm -f /var/lock/subsys/bird
else
- msg_not_running "bird for IPv4"
+ msg_not_running "bird"
fi
;;
reload|force-reload)
- if [ -f /var/lock/subsys/bird-ipv4 ]; then
- msg_reloading "bird for IPv4"
+ if [ -f /var/lock/subsys/bird ]; then
+ msg_reloading "bird"
killproc bird -HUP
RETVAL=$?
else
- msg_not_running "bird for IPv4"
+ msg_not_running "bird"
RETVAL=7
fi
;;
status)
- status bird-ipv4 bird
+ status bird bird
exit $?
;;
restart|force-reload)
diff --git a/bird-ipv4.service b/bird2.service
similarity index 100%
rename from bird-ipv4.service
rename to bird2.service
diff --git a/bird-ipv6.sysconfig b/bird2.sysconfig
similarity index 73%
rename from bird-ipv6.sysconfig
rename to bird2.sysconfig
index b6d200c..0eb7a46 100644
--- a/bird-ipv6.sysconfig
+++ b/bird2.sysconfig
@@ -1,4 +1,4 @@
-# Customized setings for bird IPv6
+# Customized setings for bird
# Define nice level for bird
SERVICE_RUN_NICE_LEVEL="+5"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/bird2.git/commitdiff/0fb912a0d0803a1c5db0b238a6cd7af56e1037ce
More information about the pld-cvs-commit
mailing list