[packages/bird] Up to 3.2.0; incompatible config -> manual migration path
arekm
arekm at pld-linux.org
Wed Mar 18 16:26:28 CET 2026
commit 58656c2d227e0644a82f50659c11fd836636daf1
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Mar 18 16:24:49 2026 +0100
Up to 3.2.0; incompatible config -> manual migration path
bird-allowalien.patch | 14 ---
bird-ipv4.service | 14 ---
bird-ipv4.sysconfig | 7 --
bird-ipv6.init | 82 ----------------
bird-ipv6.service | 14 ---
bird-ipv6.sysconfig | 7 --
bird-xbasename-const.patch | 13 +++
bird-ipv4.init => bird.init | 52 +++++-----
bird.service | 15 +++
bird.spec | 225 ++++++++++----------------------------------
bird.sysconfig | 7 ++
bird.tmpfiles | 1 +
gcc.patch | 11 ---
13 files changed, 117 insertions(+), 345 deletions(-)
---
diff --git a/bird.spec b/bird.spec
index 0d2015c..82f94cd 100644
--- a/bird.spec
+++ b/bird.spec
@@ -1,43 +1,38 @@
-# TODO:
-# - trigger to clean up after old bird package (stop, chkconfig --del)
-#
# Conditional build:
-%bcond_without ipv6 # IPv6 support (and building bird-ipv6 package)
-%bcond_without ipv4 # IPv4 support (and building bird-ipv4 package)
-%bcond_with alien # enable possibility to import 'alien' routes import into bird's routing table
+%bcond_without libssh # RPKI SSH transport support
#
Summary: The BIRD Internet Routing Daemon
Summary(pl.UTF-8): Demon BIRD Internetowego Routingu Dynamicznego
Name: bird
-Version: 1.6.8
-Release: 3
+Version: 3.2.0
+Release: 1
License: GPL v2+
Group: Networking/Daemons
-Source0: https://bird.network.cz/download/%{name}-%{version}.tar.gz
-# Source0-md5: abe29a927e21a3d7f8092641f06093c2
-Source1: %{name}-ipv4.init
-Source2: %{name}-ipv4.sysconfig
-Source3: %{name}-ipv6.init
-Source4: %{name}-ipv6.sysconfig
-Source5: https://bird.network.cz/download/%{name}-doc-%{version}.tar.gz
-# Source5-md5: d5b69caeee629479e0261aba18d35758
-Source6: %{name}-ipv4.service
-Source7: %{name}-ipv6.service
-Patch0: %{name}-allowalien.patch
-Patch1: gcc.patch
-URL: https://bird.network.cz/
+Source0: https://bird.nic.cz/download/%{name}-%{version}.tar.gz
+# Source0-md5: 96c1da55667ca6c08b4d41ecfb871efc
+Source1: %{name}.init
+Source2: %{name}.sysconfig
+Source3: https://bird.nic.cz/download/%{name}-doc-%{version}.tar.gz
+# Source3-md5: 77fd807bdd8ff4369fe7653b5b6a7137
+Source4: %{name}.service
+Source5: %{name}.tmpfiles
+Patch0: %{name}-xbasename-const.patch
+URL: https://bird.nic.cz/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: flex
-BuildRequires: readline-devel >= 4.2
+%{?with_libssh:BuildRequires: libssh-devel}
+BuildRequires: ncurses-devel
+BuildRequires: readline-devel >= 6.0
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
+Provides: bird-daemon
Provides: group(bird)
+Provides: routingdaemon
Provides: user(bird)
Obsoletes: gated
Obsoletes: mrt
@@ -57,115 +52,34 @@ 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}
-%patch -P1 -p1
+%setup -q -a 3
+%patch -P0 -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 \
+ --runstatedir=/var/run/bird \
--enable-client \
- --enable-ipv6
-%{__make} -j1
-
-%{__mv} bird bird-6
+ %{?with_libssh:--enable-libssh}%{!?with_libssh:--disable-libssh}
-%{__make} clean
-%endif
-
-%if %{with ipv4}
-%configure \
- --disable-memcheck \
- --enable-client \
- --disable-ipv6
-%{__make} -j1
-%endif
+%{__make} VERBOSE=1
%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}
+ $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}}
-%if %{with ipv4}
install bird $RPM_BUILD_ROOT%{_sbindir}
+install birdc $RPM_BUILD_ROOT%{_sbindir}
+install birdcl $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
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
+install %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
%clean
rm -rf $RPM_BUILD_ROOT
@@ -174,74 +88,35 @@ rm -rf $RPM_BUILD_ROOT
%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
+%post
+/sbin/chkconfig --add bird
+%service bird restart "routing daemon"
+%systemd_post bird.service
-%preun ipv4
+%preun
if [ "$1" = "0" ]; then
- %service %{name}-ipv4 stop
- /sbin/chkconfig --del %{name}-ipv4
+ %service bird stop
+ /sbin/chkconfig --del bird
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
+%systemd_preun bird.service
-%preun ipv6
+%postun
if [ "$1" = "0" ]; then
- %service %{name}-ipv6 stop
- /sbin/chkconfig --del %{name}-ipv6
+ %userremove bird
+ %groupremove bird
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)
+%doc doc/reply_codes ChangeLog NEWS README
+%doc %{name}-doc-%{version}/doc/*.html
+%doc %{name}-doc-%{version}/doc/*.pdf
%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(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}/%{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
+%{systemdunitdir}/bird.service
+%{systemdtmpfilesdir}/bird.conf
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.service b/bird-ipv4.service
deleted file mode 100644
index 29c36a8..0000000
--- a/bird-ipv4.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=BIRD Internet Routing Daemon for IPv4
-After=network.target
-
-[Service]
-Type=forking
-Restart=on-failure
-EnvironmentFile=/etc/sysconfig/bird-ipv4
-ExecStart=/usr/sbin/bird -u bird -g bird $BIRD_OPTS
-ExecReload=/usr/bin/kill -HUP $MAINPID
-
-[Install]
-WantedBy=multi-user.target
-Alias=bird.service
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-ipv6.sysconfig b/bird-ipv6.sysconfig
deleted file mode 100644
index b6d200c..0000000
--- a/bird-ipv6.sysconfig
+++ /dev/null
@@ -1,7 +0,0 @@
-# Customized setings for bird IPv6
-
-# Define nice level for bird
-SERVICE_RUN_NICE_LEVEL="+5"
-
-# Additional options
-#BIRD_OPTS="-R"
diff --git a/bird-xbasename-const.patch b/bird-xbasename-const.patch
new file mode 100644
index 0000000..906553e
--- /dev/null
+++ b/bird-xbasename-const.patch
@@ -0,0 +1,13 @@
+--- a/lib/string.h
++++ b/lib/string.h
+@@ -47,8 +47,8 @@ int patmatch(const byte *pat, const byte *str);
+
+ static inline char *xbasename(const char *str)
+ {
+- char *s = strrchr(str, '/');
+- return s ? s+1 : (char *) str;
++ const char *s = strrchr(str, '/');
++ return (char *) (s ? s+1 : str);
+ }
+
+ static inline char *
diff --git a/bird-ipv4.init b/bird.init
similarity index 57%
rename from bird-ipv4.init
rename to bird.init
index 276e400..3120eae 100644
--- a/bird-ipv4.init
+++ b/bird.init
@@ -4,7 +4,7 @@
#
# chkconfig: 345 11 90
#
-# description: Dynamic Route Daemon for IPv4 routers
+# description: Dynamic Route Daemon
#
# 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
@@ -32,50 +32,60 @@ fi
# Sanity checks.
[ -f /etc/bird.conf ] || exit 0
+checkconfig() {
+ /usr/sbin/bird -p || exit 1
+}
+
RETVAL=0
# See how we were called.
case "$1" in
start)
# Check if the services are already running?
- if [ ! -f /var/lock/subsys/bird-ipv4 ]; then
- msg_starting "bird for IPv4"
- daemon ${SERVICE_RUN_NICE_LEVEL} /usr/sbin/bird -u bird -g bird
+ if [ ! -f /var/lock/subsys/bird ]; then
+ checkconfig
+ msg_starting bird
+ daemon ${SERVICE_RUN_NICE_LEVEL} /usr/sbin/bird -u bird -g bird $BIRD_OPTS
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
;;
+ restart)
+ checkconfig
+ $0 stop
+ $0 start
+ exit $?
+ ;;
reload|force-reload)
- if [ -f /var/lock/subsys/bird-ipv4 ]; then
- msg_reloading "bird for IPv4"
+ if [ -f /var/lock/subsys/bird ]; then
+ checkconfig
+ 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
- exit $?
+ configtest)
+ checkconfig
;;
- restart|force-reload)
- $0 stop
- $0 start
+ status)
+ status bird
exit $?
;;
*)
- msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+ msg_usage "$0 {start|stop|restart|reload|force-reload|configtest|status}"
exit 3
esac
diff --git a/bird.service b/bird.service
new file mode 100644
index 0000000..a3123dc
--- /dev/null
+++ b/bird.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=BIRD Internet Routing Daemon
+After=network.target
+
+[Service]
+Type=simple
+EnvironmentFile=-/etc/sysconfig/bird
+RuntimeDirectory=bird
+ExecStartPre=/usr/sbin/bird -p
+ExecStart=/usr/sbin/bird -f -u bird -g bird $BIRD_OPTS
+ExecReload=/usr/sbin/birdc configure
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/bird.sysconfig b/bird.sysconfig
new file mode 100644
index 0000000..5615dc5
--- /dev/null
+++ b/bird.sysconfig
@@ -0,0 +1,7 @@
+# Customized settings for bird
+
+# Define nice level for bird
+SERVICE_RUN_NICE_LEVEL="+5"
+
+# Additional options (e.g. "-R" for graceful restart recovery)
+BIRD_OPTS=""
diff --git a/bird.tmpfiles b/bird.tmpfiles
new file mode 100644
index 0000000..40c967c
--- /dev/null
+++ b/bird.tmpfiles
@@ -0,0 +1 @@
+d /var/run/bird 0755 bird bird -
diff --git a/gcc.patch b/gcc.patch
deleted file mode 100644
index 7f1810d..0000000
--- a/gcc.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- bird-1.6.8/sysdep/unix/krt.h~ 2019-08-12 14:59:56.000000000 +0200
-+++ bird-1.6.8/sysdep/unix/krt.h 2020-11-27 12:58:28.686870081 +0100
-@@ -112,7 +112,7 @@ struct kif_proto {
- struct kif_state sys; /* Sysdep state */
- };
-
--struct kif_proto *kif_proto;
-+extern struct kif_proto *kif_proto;
-
- #define KIF_CF ((struct kif_config *)p->p.cf)
-
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/bird.git/commitdiff/58656c2d227e0644a82f50659c11fd836636daf1
More information about the pld-cvs-commit
mailing list