Compare commits
3 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 628eea18fe | |||
| 2a80aefbb8 | |||
| 8f1b3d7653 |
176
0002-frr-logrotate.patch
Normal file
176
0002-frr-logrotate.patch
Normal file
@@ -0,0 +1,176 @@
|
||||
--- frr/redhat/frr.logrotate
|
||||
+++ frr/redhat/frr.logrotate 2025/09/29 12:53:35
|
||||
@@ -1,4 +1,5 @@
|
||||
/var/log/frr/frr.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -7,6 +8,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/zebra.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -15,6 +17,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/babeld.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -23,6 +26,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/bgpd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -31,6 +35,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/isisd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -39,6 +44,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/ospfd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -47,6 +53,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/ospf6d.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -55,6 +62,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/ripd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -63,6 +71,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/ripngd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -71,6 +80,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/ldpd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -79,6 +89,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/mgmtd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -87,6 +98,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/nhrpd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -95,6 +107,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/eigrpd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -103,6 +116,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/bfdd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -111,6 +125,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/fabricd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -119,6 +134,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/pathd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -127,6 +143,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/pbrd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -135,6 +152,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/pimd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -143,6 +161,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/pim6d.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -151,6 +170,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/sharpd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -159,6 +179,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/staticd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
@@ -167,6 +188,7 @@
|
||||
}
|
||||
|
||||
/var/log/frr/vrrpd.log {
|
||||
+ su frr frr
|
||||
notifempty
|
||||
missingok
|
||||
postrotate
|
||||
14
frr.changes
14
frr.changes
@@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 3 20:47:21 UTC 2025 - Erico Mendonca <erico.mendonca@suse.com>
|
||||
|
||||
- Adding updated copyright notice
|
||||
- 0002-frr-logrotate.patch: rotating logfiles under the frr user
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 30 12:26:48 UTC 2025 - Marius Tomaschewski <mt@suse.com>
|
||||
|
||||
- Drop rcfrr service symlink (jsc#PED-266)
|
||||
- Change to sysuser-tools and macros to create user+groups
|
||||
- rpmlint: add su option to logrotate file definitions
|
||||
- rpmlint: use python3_fix_shebang_path to adjust interpreter
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 21 20:34:27 UTC 2025 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
|
||||
34
frr.spec
34
frr.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package frr
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
# Copyright (c) 2019-2021, Martin Hauke <mardnh@gmx.de>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@@ -43,6 +43,7 @@ Source: https://github.com/FRRouting/frr/archive/refs/tags/%{name}-%{ver
|
||||
Source1: %{name}-tmpfiles.d
|
||||
Patch0: harden_frr.service.patch
|
||||
Patch1: 0001-disable-zmq-test.patch
|
||||
Patch2: 0002-frr-logrotate.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: bison >= 2.7
|
||||
@@ -74,14 +75,15 @@ BuildRequires: pkgconfig(libprotobuf-c)
|
||||
BuildRequires: libprotoc25_1_0
|
||||
BuildRequires: libyang1
|
||||
%endif
|
||||
BuildRequires: sysuser-tools
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
BuildRequires: pkgconfig(libyang) >= 2.0.0
|
||||
BuildRequires: pkgconfig(libzmq) >= 4.0.0
|
||||
BuildRequires: pkgconfig(rtrlib) >= 0.5.0
|
||||
BuildRequires: pkgconfig(sqlite3)
|
||||
%sysusers_requires
|
||||
Requires(post): %{install_info_prereq}
|
||||
Requires(pre): %{install_info_prereq}
|
||||
Requires(pre): shadow
|
||||
Requires(preun): %{install_info_prereq}
|
||||
Recommends: logrotate
|
||||
Conflicts: quagga
|
||||
@@ -266,11 +268,21 @@ autoreconf -fiv
|
||||
--enable-grpc
|
||||
%endif
|
||||
|
||||
echo "pwd: $(pwd)"
|
||||
make %{?_smp_mflags} MAKEINFO="makeinfo --no-split"
|
||||
|
||||
# Create frr user/groups
|
||||
cat > %{name}-user.conf << __EOF__
|
||||
g %{frr_group}
|
||||
g %{frrvty_group}
|
||||
u %{frr_user} - "FRRouting suite" %{frr_home}
|
||||
m %{frr_user} %{frrvty_group}
|
||||
__EOF__
|
||||
%sysusers_generate_pre %{name}-user.conf %{name} %{name}-user.conf
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} INSTALL="install -p" CP="cp -p" install
|
||||
perl -p -i -e 's|#!/usr/bin/python|#!/usr/bin/python3|g' %{buildroot}/usr/lib/frr/{frr-reload.py,generate_support_bundle.py}
|
||||
%python3_fix_shebang_path %{buildroot}%{frr_daemondir}/*.py
|
||||
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
@@ -306,8 +318,6 @@ install -d -m 0750 %{buildroot}%{_localstatedir}/log/frr
|
||||
install -D -m 0644 %{SOURCE1} %{buildroot}/%{_tmpfilesdir}/%{name}.conf
|
||||
sed -e "s|@frr_statedir@|%{frr_statedir}|g" -i %{buildroot}/%{_tmpfilesdir}/%{name}.conf
|
||||
|
||||
install -d %{buildroot}%{_sbindir}
|
||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcfrr
|
||||
rm -f %{buildroot}%{frr_daemondir}/ssd
|
||||
|
||||
cat > %{buildroot}%{_sysconfdir}/frr/frr.conf << __EOF__
|
||||
@@ -322,14 +332,12 @@ cat > %{buildroot}%{_sysconfdir}/frr/vtysh.conf << __EOF__
|
||||
! vtysh is using PAM authentication allowing root to use it.
|
||||
__EOF__
|
||||
|
||||
install -D -m 0644 %{name}-user.conf %{buildroot}%{_sysusersdir}/%{name}-user.conf
|
||||
|
||||
%check
|
||||
make %{?_smp_mflags} -C tests
|
||||
|
||||
%pre
|
||||
# Create frr user/groups
|
||||
getent group %{frr_group} >/dev/null || groupadd -r %{frr_group}
|
||||
getent group %{frrvty_group} >/dev/null || groupadd -r %{frrvty_group}
|
||||
getent passwd %{frr_user} >/dev/null || useradd -r -g %{frr_group} -G %{frrvty_group} -d %{frr_home} -s /sbin/nologin -c "FRRouting suite" %{frr_user}
|
||||
%pre -f %{name}.pre
|
||||
|
||||
%service_add_pre %{name}.service
|
||||
%if 0%{?suse_version} > 1500
|
||||
@@ -361,10 +369,12 @@ done
|
||||
|
||||
%post -n libfrr_pb0 -p /sbin/ldconfig
|
||||
%postun -n libfrr_pb0 -p /sbin/ldconfig
|
||||
|
||||
%if %{with grpc}
|
||||
%post -n libfrrgrpc_pb0 -p /sbin/ldconfig
|
||||
%postun -n libfrrgrpc_pb0 -p /sbin/ldconfig
|
||||
%endif
|
||||
|
||||
%post -n libfrrfpm_pb0 -p /sbin/ldconfig
|
||||
%postun -n libfrrfpm_pb0 -p /sbin/ldconfig
|
||||
|
||||
@@ -412,7 +422,6 @@ done
|
||||
%{_tmpfilesdir}/%{name}.conf
|
||||
%dir %attr(0750,%{frr_user},%{frr_group}) %{_localstatedir}/log/frr
|
||||
%dir %attr(0751,%{frr_user},%{frr_group}) %ghost %{frr_statedir}
|
||||
%{_sbindir}/rc%{name}
|
||||
%dir %attr(0750,%{frr_user},%{frr_group}) %{frr_home}
|
||||
%dir %{_prefix}/lib/frr
|
||||
%{_prefix}/lib/frr/fabricd
|
||||
@@ -430,6 +439,7 @@ done
|
||||
%{frr_daemondir}/frr_babeltrace.py
|
||||
%{frr_daemondir}/frrcommon.sh
|
||||
%{frr_daemondir}/frrinit.sh
|
||||
%{frr_daemondir}/generate_support_bundle.py
|
||||
%{frr_daemondir}/isisd
|
||||
%{frr_daemondir}/ldpd
|
||||
%{frr_daemondir}/mgmtd
|
||||
@@ -461,7 +471,7 @@ done
|
||||
%endif
|
||||
%{_libdir}/frr/modules/dplane_fpm_nl.so
|
||||
%{_libdir}/frr/modules/bgpd_bmp.so
|
||||
%{_prefix}/lib/frr/generate_support_bundle.py
|
||||
%{_sysusersdir}/%{name}-user.conf
|
||||
|
||||
%files -n libfrr_pb0
|
||||
%{_libdir}/libfrr_pb.so.0*
|
||||
|
||||
Reference in New Issue
Block a user