From 3704bf0c5a76ec7b989f5a7f2ff6bf5f8f627e04 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 10:54:45 +0000 Subject: [PATCH 1/8] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 264b6fb..ad85926 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 12%{?dist} +Release: 13%{?dist} License: GPL-2.0-or-later URL: https://rbldnsd.io/ Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz @@ -101,6 +101,9 @@ fi %{_sbindir}/rbldnsctl %changelog +* Mon Jan 22 2024 Fedora Release Engineering - 0.998b-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jul 21 2023 Fedora Release Engineering - 0.998b-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 69cc88e57895f4782419fab79920b404498a4d3d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jan 2024 14:50:16 +0000 Subject: [PATCH 2/8] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index ad85926..30c6cec 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 13%{?dist} +Release: 14%{?dist} License: GPL-2.0-or-later URL: https://rbldnsd.io/ Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz @@ -101,6 +101,9 @@ fi %{_sbindir}/rbldnsctl %changelog +* Fri Jan 26 2024 Fedora Release Engineering - 0.998b-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Mon Jan 22 2024 Fedora Release Engineering - 0.998b-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 617de389952aac60468978ab1f9a180502a7e849 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 18:18:03 +0000 Subject: [PATCH 3/8] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 30c6cec..996fe97 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 14%{?dist} +Release: 15%{?dist} License: GPL-2.0-or-later URL: https://rbldnsd.io/ Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz @@ -101,6 +101,9 @@ fi %{_sbindir}/rbldnsctl %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 0.998b-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jan 26 2024 Fedora Release Engineering - 0.998b-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From a1038609c1b5216bb69e353c8e0a01b5ae31c634 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 22:07:52 +0000 Subject: [PATCH 4/8] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 996fe97..53b7233 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 15%{?dist} +Release: 16%{?dist} License: GPL-2.0-or-later URL: https://rbldnsd.io/ Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz @@ -101,6 +101,9 @@ fi %{_sbindir}/rbldnsctl %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 0.998b-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Fri Jul 19 2024 Fedora Release Engineering - 0.998b-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From c6c0bf9589688792c2f91f123abd5f03c2527ee6 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Wed, 12 Feb 2025 14:06:29 +0000 Subject: [PATCH 5/8] Update rpmlintrc --- rbldnsd.rpmlintrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rbldnsd.rpmlintrc b/rbldnsd.rpmlintrc index 545ed93..42b7753 100644 --- a/rbldnsd.rpmlintrc +++ b/rbldnsd.rpmlintrc @@ -7,3 +7,8 @@ addFilter("no-manual-page-for-binary rbldnsctl") # Not a strange permission for a script addFilter("strange-permission rbldnsctl 775") +# DNS server +addFilter("spelling-error \('nameserver',") + +# List of unwelcome IP addresses, made available over DNS using rbldnsd +addFilter("spelling-error \('blocklists',") From adebf8a7cd4b5de189fe4d2f2b659f122c9ba6d5 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Wed, 12 Feb 2025 14:07:22 +0000 Subject: [PATCH 6/8] Use sysusers from Fedora 43 onwards --- rbldnsd.spec | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 53b7233..f158615 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,17 +1,24 @@ # systemd-rpm-macros split out from systemd at Fedora 30 -%if (0%{?fedora} && 0%{?fedora} <= 29) || 0%{?rhel} +%if (0%{?fedora} && 0%{?fedora} <= 29) || (0%{?rhel} && 0%{?rhel} <= 8) %global systemd_rpm_macros systemd %else %global systemd_rpm_macros systemd-rpm-macros %endif +# Use sysusers from Fedora 43 onwards +%if (0%{?rhel} && 0%{?rhel} <= 10) || (0%{?fedora} && 0%{?fedora} <= 42) +%global use_sysusers 0 +%else +%global use_sysusers 1 +%endif + # Build hardened (PIE) where possible %global _hardened_build 1 Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 16%{?dist} +Release: 17%{?dist} License: GPL-2.0-or-later URL: https://rbldnsd.io/ Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz @@ -27,7 +34,9 @@ BuildRequires: make BuildRequires: sed BuildRequires: %{systemd_rpm_macros} BuildRequires: zlib-devel +%if !%{use_sysusers} Requires(pre): shadow-utils +%endif Requires: gawk %{?systemd_requires} @@ -49,6 +58,11 @@ sed -i -e 's@/var/lib/rbldns\([/ ]\)@%{_localstatedir}/lib/rbldnsd\1@g' \ -e 's@\(-r/[a-z/]*\) -b@\1 -q -b@g' contrib/debian/rbldnsd.default cp -p %{SOURCE2} %{SOURCE3} %{SOURCE4} ./ +# Create a sysusers.d config file +cat >rbldnsd.sysusers.conf </dev/null || groupadd -r rbldns getent passwd rbldns >/dev/null || \ useradd -r -g rbldns -d %{_localstatedir}/lib/rbldnsd \ -s /sbin/nologin -c "rbldns daemon" rbldns exit 0 +%endif %post systemctl daemon-reload &>/dev/null || : @@ -99,8 +118,15 @@ fi %doc README.systemd %config(noreplace) %{_sysconfdir}/systemd/rbldnsd.conf %{_sbindir}/rbldnsctl +%if %{use_sysusers} +%{_sysusersdir}/rbldnsd.conf +%endif %changelog +* Wed Feb 12 2025 Paul Howarth - 0.998b-17 +- Add sysusers.d config file to allow rpm to create users/groups automatically + from Fedora 43 onwards + * Sat Jan 18 2025 Fedora Release Engineering - 0.998b-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 4cf3052c450d1acc6790d0ed84dc5001a852752b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 11:48:01 +0000 Subject: [PATCH 7/8] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index f158615..a173886 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -18,7 +18,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 17%{?dist} +Release: 18%{?dist} License: GPL-2.0-or-later URL: https://rbldnsd.io/ Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz @@ -123,6 +123,9 @@ fi %endif %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 0.998b-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Wed Feb 12 2025 Paul Howarth - 0.998b-17 - Add sysusers.d config file to allow rpm to create users/groups automatically from Fedora 43 onwards From bb88638fad6a97040a23ee41819e164b62a90f1f Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Fri, 26 Sep 2025 14:51:08 +0100 Subject: [PATCH 8/8] Fix base template replacement issue (GH#18, GH#19, GH#22, rhbz#2398024) --- 85932ec5.patch | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ rbldnsd.spec | 12 +++++++++- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 85932ec5.patch diff --git a/85932ec5.patch b/85932ec5.patch new file mode 100644 index 0000000..8b919ef --- /dev/null +++ b/85932ec5.patch @@ -0,0 +1,62 @@ +From 85932ec5d89041424cf6d20c71b482e23cf17d2f Mon Sep 17 00:00:00 2001 +From: "Antonio \"Criddi\" Mammita" + <77116213+ammammita@users.noreply.github.com> +Date: Wed, 13 Jan 2021 17:17:31 +0000 +Subject: [PATCH] Ticket 18 and 19 (#22) + +Fix issue #18 and issue #19 + +Base template replacement issue +--- + rbldnsd.8 | 4 ++-- + rbldnsd_util.c | 8 ++++++-- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/rbldnsd.8 b/rbldnsd.8 +index 36e70fa..addb737 100644 +--- a/rbldnsd.8 ++++ b/rbldnsd.8 +@@ -726,7 +726,7 @@ the above example may be simplified to: + .fi + There is no default TXT value, so + .B rbldnsd +-will not return anything for TXT queries it TXT isn't ++will not return anything for TXT queries unless TXT isn't + specified. + .PP + When A value is specified for a given entry, but TXT template +@@ -782,7 +782,7 @@ text given for individual entries. In order to stop usage of base template + \fB$=\fR for a single record, start it with \fB=\fR (which will be omitted + from the resulting TXT value). For example, + .nf +- $0 See http://www.example.com/bl?$= ($) for details ++ $= See http://www.example.com/bl?$= ($) for details + 127.0.0.2 r123 + 127.0.0.3 + 127.0.0.4 =See other blocklists for details about $ +diff --git a/rbldnsd_util.c b/rbldnsd_util.c +index c6d628d..eeafd07 100644 +--- a/rbldnsd_util.c ++++ b/rbldnsd_util.c +@@ -243,6 +243,8 @@ int txtsubst(char sb[TXTBUFSIZ], const char *txt, + char *const e = sb + 254; + char *lp = sb; + const char *s, *si, *sx; ++ const char *srec = s0; ++ + if (txt[0] == '=') + sx = ++txt; + else if (sn[SUBST_BASE_TEMPLATE] && *sn[SUBST_BASE_TEMPLATE]) { +@@ -273,8 +275,10 @@ int txtsubst(char sb[TXTBUFSIZ], const char *txt, + sl = strlen(si); + ++s; + } +- else +- sl = strlen(si = s0); ++ else { ++ sl = strlen(si = srec); ++ } ++ + if (lp + sl > e) /* silently truncate TXT RR >255 bytes */ + sl = e - lp; + memcpy(lp, si, sl); diff --git a/rbldnsd.spec b/rbldnsd.spec index a173886..14e90fd 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -18,7 +18,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 18%{?dist} +Release: 19%{?dist} License: GPL-2.0-or-later URL: https://rbldnsd.io/ Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz @@ -27,6 +27,7 @@ Source3: rbldnsctl Source4: README.systemd Patch0: rbldnsd-configure-c99.patch Patch1: rbldnsd-0.998b-version.patch +Patch2: https://github.com/spamhaus/rbldnsd/commit/85932ec5.patch BuildRequires: coreutils BuildRequires: gawk BuildRequires: gcc @@ -54,6 +55,12 @@ blocklists. # Fix version number reported by rbldnsd %patch -P 1 +# Fix base template replacement issue +# https://github.com/spamhaus/rbldnsd/issues/18 +# https://github.com/spamhaus/rbldnsd/issues/19 +# https://github.com/spamhaus/rbldnsd/pull/22 +%patch -P 2 -p1 + sed -i -e 's@/var/lib/rbldns\([/ ]\)@%{_localstatedir}/lib/rbldnsd\1@g' \ -e 's@\(-r/[a-z/]*\) -b@\1 -q -b@g' contrib/debian/rbldnsd.default cp -p %{SOURCE2} %{SOURCE3} %{SOURCE4} ./ @@ -123,6 +130,9 @@ fi %endif %changelog +* Fri Sep 26 2025 Paul Howarth - 0.998b-19 +- Fix base template replacement issue (GH#18, GH#19, GH#22, rhbz#2398024) + * Fri Jul 25 2025 Fedora Release Engineering - 0.998b-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild