Compare commits

...
Sign in to create a new pull request.

72 commits

Author SHA1 Message Date
Paul Howarth
bb88638fad Fix base template replacement issue (GH#18, GH#19, GH#22, rhbz#2398024) 2025-09-26 14:51:08 +01:00
Fedora Release Engineering
4cf3052c45 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 11:48:01 +00:00
Paul Howarth
adebf8a7cd Use sysusers from Fedora 43 onwards 2025-02-12 14:07:22 +00:00
Paul Howarth
c6c0bf9589 Update rpmlintrc 2025-02-12 14:06:29 +00:00
Fedora Release Engineering
a1038609c1 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 22:07:52 +00:00
Fedora Release Engineering
617de38995 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-19 18:18:03 +00:00
Fedora Release Engineering
69cc88e578 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-26 14:50:16 +00:00
Fedora Release Engineering
3704bf0c5a Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 10:54:45 +00:00
Fedora Release Engineering
b453477b2f Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-21 16:35:10 +00:00
Paul Howarth
ae308e0e91 Avoid use of systemd ".include" directive (rhbz#2216790)
Additionally:
- Avoid use of deprecated patch syntax
- Fix version number reported by rbldnsd
2023-06-23 11:24:19 +01:00
Paul Howarth
979e1c4e31 Use SPDX-format license tag 2023-01-30 16:23:58 +00:00
Florian Weimer
329471ee22 Port non-autoconf configure script to C99
Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2023-01-30 16:00:12 +01:00
Fedora Release Engineering
e271ece52c Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 19:30:47 +00:00
Fedora Release Engineering
cc189db86b Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 00:32:54 +00:00
Fedora Release Engineering
06f019e13e - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-21 17:34:27 +00:00
Fedora Release Engineering
a5f75df8f0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 11:13:00 +00:00
Paul Howarth
35ec7889a1 Drop EL-6 support
- Always assume systemd init
- Drop support for sysv-to-systemd migration
- Use %license unconditionally
- Use %{?systemd_requires}
2021-01-27 17:18:16 +00:00
Fedora Release Engineering
ba498666f2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 15:05:35 +00:00
Fedora Release Engineering
69255fc7f0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 05:32:20 +00:00
Paul Howarth
48a62b996f Update to 0.998b
- Upstream is now at rbldnsd.io
- New upstream release 0.998b
  - Minor fixes in copyright and documentation
  - Bugfix: Minor fix to prevent errors on newer compilers
  - Fix for memory errors on very large datasets
- Package new LICENSE.txt and README files
2020-05-05 16:12:40 +01:00
Fedora Release Engineering
73b079c030 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-30 17:22:14 +00:00
Fedora Release Engineering
91f5bc6c54 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-26 18:16:47 +00:00
Fedora Release Engineering
e1c84b15d8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-02 11:08:09 +00:00
Fedora Release Engineering
85ca1bb68b - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 03:24:41 +00:00
Fedora Release Engineering
0169f3fab1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-09 12:49:11 +00:00
Paul Howarth
42152ecf72 Spec clean-up
- Account for systemd-units being merged into systemd at Fedora 17
- Drop support for SysV-to-systemd migration from Fedora 18, RHEL 7
- Use forward-looking conditionals
- Use fewer full paths from commands in scriptlets, to aid readability
- Drop legacy BuildRoot: and Group: tags
- Drop explicit buildroot cleaning in %clean and %install
2018-01-31 15:12:02 +00:00
Fedora Release Engineering
46272c39e2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 07:34:44 +00:00
Fedora Release Engineering
70d156313d - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 12:58:26 +00:00
Paul Howarth
1ab629bb98 Prefer %global over %define 2017-02-12 14:22:13 +00:00
Fedora Release Engineering
daa6c47308 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 11:34:16 +00:00
Fedora Release Engineering
708a9328e1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-04 22:00:06 +00:00
Paul Howarth
16e818cccc Update to 0.998
- New upstream release 0.998
  - Correctly handle V4MAPPED (v4 in v6) addresses; the original v6 prefix was
    wrong
  - Sometimes IP4-based datasets gave false positives when an IP6 dataset was
    present, and it was also possible to have false positives in IP6 datasets;
    both have been fixed
2016-01-01 13:04:15 +00:00
Dennis Gilmore
a0c2fb9c7f - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-18 22:08:22 +00:00
Peter Robinson
bc7f775579 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-17 23:34:46 +00:00
Paul Howarth
0e27bd1dd5 Fix return value from initscript (#1118013)
- Fix return value from initscript, by using process substitution instead of
  a while loop at the end of a pipe (#1118013)
- Drop %defattr, redundant since rpm 4.4
2014-07-10 12:00:02 +01:00
Dennis Gilmore
6f01fb48e9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 20:59:59 -05:00
Paul Howarth
81b9c7c2e4 Use format string in dslog() invocation 2013-11-21 11:45:27 +00:00
Paul Howarth
6a3c8f4126 Update to 0.997a
- New upstream release 0.997a
  - Minor fixes/changes in packaging, no code changes
  - In particular, fixes a build failure on *BSD introduced in 0.997
2013-07-29 14:30:02 +01:00
Paul Howarth
13c152a99b Update to 0.997
- New upstream release 0.997
  - Main feature of this version is ipv6 support
  - Feature: ip6trie - new dataset supports listing of arbitrary length ip6
    CIDRs, along with individual A/TXT values for each prefix
  - Feature: ip6tset - new dataset supports listing of ip6 /64 subnets and the
    exclusion of /128 subnets; only supports a single A/TXT value for the
    entire dataset
  - Optimization: ip4trie - using new trie implementation (developed for the
    ip6trie dataset) decreases memory consumption by roughly a factor of three
  - Feature: acl dataset - ip6 addresses are now supported in ACLs
  - Feature: added --enable-asserts configure option to enable compilation of
    debugging assertions; assertion checking is disabled by default
  - Featurette: zero-length "wildcard" IP4 CIDR prefixes are now allowed in
    ip4trie and acl datasets
2013-06-30 17:13:52 +01:00
Paul Howarth
9ee6c8269a Fix up some changelog entries 2013-02-15 08:55:50 +00:00
Dennis Gilmore
0294380802 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-14 15:27:06 -06:00
Dennis Gilmore
91ea58476b - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-21 10:01:51 -05:00
Paul Howarth
2a1d2f67a4 Rename systemctl-rbldnsd to rbldnsctl (#807504) 2012-04-17 23:59:16 +01:00
Paul Howarth
482aa3ee3f Use native systemd init from F-17 onwards (see README.systemd) 2012-04-17 17:52:33 +01:00
Paul Howarth
2c722364b3 Merge branch 'master' into el5
Conflicts:
	.gitignore
	rbldnsd.spec
2012-04-16 18:00:39 +01:00
Paul Howarth
3dc535f2ab Merge branch 'master' into el6 2012-04-16 17:48:11 +01:00
Paul Howarth
ddfb862ab0 Fix initscript, harden build
- Fix some initscript issues (#807504)
- Do a hardened build (PIE) where possible
2012-04-16 16:47:25 +01:00
Paul Howarth
e2b95d8ed1 Nobody else likes macros for commands 2012-01-05 22:18:45 +00:00
Dennis Gilmore
f3e8206de5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-09 00:40:56 -06:00
Fedora Release Engineering
9eafc8ae76 dist-git conversion 2010-07-29 11:18:39 +00:00
Fedora Release Engineering
1b7746dc0d dist-git conversion 2010-07-29 11:18:38 +00:00
Fedora Release Engineering
9dc8e58abf dist-git conversion 2010-07-29 11:18:37 +00:00
Dennis Gilmore
05e4dc1d26 Initialize branch EL-6 for rbldnsd 2010-05-08 02:20:33 +00:00
Bill Nottingham
1d3f5d9311 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:26:22 +00:00
Bill Nottingham
bf21818408 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:26:22 +00:00
Bill Nottingham
69fa04dee5 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 23:13:16 +00:00
Jesse Keating
7e4abf09e4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-27 02:50:44 +00:00
Jesse Keating
775a91059a - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild 2009-02-25 18:58:21 +00:00
Paul Howarth
2e9d74cab0 - update to 0.996b
- _GNU_SOURCE no longer needed
2008-03-31 13:45:29 +00:00
Paul Howarth
efcfe8dfd3 fix exit codes for reload, stop, and try-restart actions of initscript 2008-02-20 13:21:29 +00:00
Paul Howarth
d8d1d79fb6 - define _GNU_SOURCE for NI_MAXHOST symbol visibility
- LSB-ize initscript (#247043)
2008-02-13 18:39:17 +00:00
Paul Howarth
7ab1269d5c add buildreq gawk 2007-08-23 17:18:15 +00:00
Paul Howarth
c52db5e0ff - upstream released a new version without changing the version number (the
only changes are in debian/control and debian/changelog, neither of
    which are used in the RPM package)
- unexpand tabs in spec
- use the standard scriptlet for user/group creation in %%pre
- drop scriptlet dependencies on /sbin/service by calling initscript
    directly
- clarify license as GPL version 2 or later
2007-08-23 16:05:51 +00:00
Paul Howarth
16901f7df3 rebuild for EL5 2007-04-19 16:43:22 +00:00
Dennis Gilmore
0071abedea Initialize branch EL-5 for rbldnsd 2007-01-13 13:44:06 +00:00
Paul Howarth
deba83287d FE6 mass rebuild 2006-08-30 07:42:07 +00:00
Ville Skyttä
67807dd984 http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild 2006-08-27 21:05:36 +00:00
Paul Howarth
25340e6fdf update to 0.996a expand tabs in spec escape macro in changelog 2006-07-28 11:16:39 +00:00
Paul Howarth
815c44e138 - update to 0.996
- use /usr/sbin/useradd instead of %{_sbindir}/useradd
- add buildreq zlib-devel to support gzipped zone files
2006-02-21 11:57:33 +00:00
Paul Howarth
5bf4fe41a1 Forgot to remove this last time 2006-02-21 11:18:05 +00:00
Paul Howarth
e186d231cf license text not included in upstream tarball, so don't include it 2006-02-15 07:09:30 +00:00
Paul Howarth
5f03bbd239 auto-import rbldnsd-0.995-4 on branch devel from rbldnsd-0.995-4.src.rpm 2005-06-29 06:14:33 +00:00
12 changed files with 741 additions and 21 deletions

View file

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
/rbldnsd_0.996b.tar.gz
/rbldnsd-0.997a.tar.gz
/rbldnsd-0.998.tar.gz
/rbldnsd-0.998b.tgz

62
85932ec5.patch Normal file
View file

@ -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);

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: rbldnsd
# $Id$
NAME := rbldnsd
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

76
README.systemd Normal file
View file

@ -0,0 +1,76 @@
Using rbldnsd with systemd
==========================
The traditional SysV initscript shipped with rbldnsd supports using
multiple instances with arbitrary command lines. This is difficult
to achieve with systemd so a wrapper script, rbldnsctl, has been
provided to assist with the creation and use of native systemd unit
files for each required instance, using exactly the same configuration
in /etc/sysconfig/rbldnsd as the SysV initscript used.
Having edited /etc/sysconfig/rbldnsd to specify the rbldnsd
instance(s) required, individual unit files for each instance can be
created by:
rbldnsctl create
This creates unit files /etc/systemd/system/rbldnsd-<instancename>.service
for each required instance. These units can then be manipulated
individually using /bin/systemctl as usual, or all at once by using
other rbldnsctl commands:
rbldnsctl enable
This enables all configured rbldnsd instances to start at boot time
(equivalent of chkconfig rbldnsd on).
rbldnsctl disable
This disables all configured rbldnsd instances from starting at boot time
(equivalent of chkconfig rbldnsd off).
rbldnsctl start
This starts all configured rbldnsd instances immediately
(equivalent of service rbldnsd start).
rbldnsctl stop
This stops all configured rbldnsd instances
(equivalent of service rbldnsd stop).
rbldnsctl reload
This reloads all configured rbldnsd instances
(equivalent of service rbldnsd reload).
rbldnsctl restart
This restarts all configured rbldnsd instances
(equivalent of service rbldnsd restart).
rbldnsctl condrestart
rbldnsctl try-restart
These restart all configured rbldnsd instances immediately, if they are
already running (equivalent of service rbldnsd condrestart).
rbldnsctl status
This shows status of all configured rbldnsd instances
(equivalent of service rbldnsd status).
When editing /etc/sysconfig/rbldnsd to specify rbldnsd instance options,
bear in mind:
* systemd prefers the daemons it controls not to fork, so the unit files
created by rbldnsctl start rbldnsd with the "-n" option to prevent
it from forking; this also means that systemd knows the PIDs of all
instances itself, so there is no need to specify any forking/pidfile related
options in /etc/sysconfig/rbldnsd
* if you want just a single instance of rbldnsd and use the traditional "-"
identifier for it, rbldnsctl will create a unit file
/etc/systemd/system/rbldnsd-single.service, i.e. the instance name will be
set to "single"

175
rbldnsctl Executable file
View file

@ -0,0 +1,175 @@
#!/bin/bash
#
# rbldnsctl : helper script for managing rbldnsd instances with systemd
#
# Configuration is via the RBLDNSD variable in /etc/sysconfig/rbldnsd,
# exactly as used with the traditional sysv initscript.
#
# Usage:
#
# rbldnsctl create
# Creates unit files /etc/systemd/system/rbldnsd-<instance>.service
# for each configured rbldnsd instance
#
# rbldnsctl enable
# Enables (via systemctl) all configured rbldnsd instances to start
# at boot time
#
# rbldnsctl disable
# Disables (via systemctl) all configured rbldnsd instances from
# starting at boot time
#
# rbldnsctl start
# Starts (via systemctl) all configured rbldnsd instances immediately
#
# rbldnsctl stop
# Stop (via systemctl) all configured rbldnsd instances immediately
#
# rbldnsctl reload
# Reloads (via systemctl) all configured rbldnsd instances immediately
#
# rbldnsctl restart
# Restarts (via systemctl) all configured rbldnsd instances immediately
#
# rbldnsctl condrestart
# rbldnsctl try-restart
# Restarts (via systemctl) all configured rbldnsd instances immediately,
# if they are already running
#
# rbldnsctl status
# Shows status of all configured rbldnsd instances
#
PATH=/sbin:/bin:/usr/bin:/usr/sbin
# Get config and check that RBLDNSD is set
[ -f /etc/sysconfig/rbldnsd ] && . /etc/sysconfig/rbldnsd
# Check that configuration has been set up (RBLDNSD set in /etc/sysconfig/rbldnsd)
if [ -z "$RBLDNSD" ]; then
echo "rbldnsctl: RBLDNSD not configured in /etc/sysconfig/rbldnsd" >&2
exit 6
fi
# Set an exit status
set_status() {
exit $1
}
# Process multiple instances of the daemon (see /etc/sysconfig/rbldnsd)
for_all_daemons() {
ret=0
while read name args; do
# For a single instance (name = "-"), use "single" as name
case "$name" in
""|\#*) continue;;
-) name=single;;
*) ;;
esac
# Process this instance
$1
thisret=$?
if [ "$1" = "check_one_daemon" -o "$1" = "reload_one_daemon" ]; then
if [ $thisret -ne 0 ]; then
ret=$thisret
fi
else
if [ $thisret -ne 0 ]; then
ret=1
fi
fi
done < <(echo "$RBLDNSD")
set_status $ret
}
start_one_daemon() {
/usr/bin/systemctl start "rbldnsd-${name}.service"
}
stop_one_daemon() {
/usr/bin/systemctl stop "rbldnsd-${name}.service"
}
reload_one_daemon() {
/usr/bin/systemctl reload "rbldnsd-${name}.service"
}
check_one_daemon() {
/usr/bin/systemctl status "rbldnsd-${name}.service"
}
restart_one_daemon() {
/usr/bin/systemctl restart "rbldnsd-${name}.service"
}
condrestart_one_daemon() {
/usr/bin/systemctl try-restart "rbldnsd-${name}.service"
}
create_one_daemon() {
{
awk '/^\[Unit\]/, 1 == 2' /etc/systemd/rbldnsd.conf
cat <<-END_OF_UNIT
[Unit]
Description=DNSBL (rbldnsd) ${name} instance
[Service]
ExecStart=/sbin/rbldnsd -n ${args}
END_OF_UNIT
} > "/etc/systemd/system/rbldnsd-${name}.service"
echo "Created unit file /etc/systemd/system/rbldnsd-${name}.service"
}
enable_one_daemon() {
/usr/bin/systemctl enable "rbldnsd-${name}.service"
}
disable_one_daemon() {
/usr/bin/systemctl disable "rbldnsd-${name}.service"
}
# See how we were called.
case "$1" in
create)
for_all_daemons create_one_daemon
RETVAL=$?
/usr/bin/systemctl daemon-reload
;;
enable)
for_all_daemons enable_one_daemon
RETVAL=$?
;;
disable)
for_all_daemons disable_one_daemon
RETVAL=$?
;;
start)
for_all_daemons start_one_daemon
RETVAL=$?
;;
restart)
for_all_daemons restart_one_daemon
RETVAL=$?
;;
reload)
for_all_daemons reload_one_daemon
RETVAL=$?
;;
stop)
for_all_daemons stop_one_daemon
RETVAL=$?
;;
status)
for_all_daemons check_one_daemon
RETVAL=$?
;;
condrestart|try-restart)
for_all_daemons condrestart_one_daemon
RETVAL=$?
;;
*)
echo $"Usage: $0 {create|enable|disable|start|stop|restart|try-restart|reload|status}" >&2
RETVAL=1
;;
esac
exit $RETVAL

View file

@ -0,0 +1,16 @@
This addition of the release date for version 0.998b fixes the
version number that rbldnsd reports in its logging output. The
version is extracted from the NEWS file by the configure script
but the pattern matching requires the date to be present.
--- NEWS
+++ NEWS
@@ -1,7 +1,7 @@
This file describes user-visible changes in rbldnsd.
Newer news is at the top.
-0.998b
+0.998b (21 Dec 2016)
- Fix for memory errors on very large datasets.
Patch by Andrew Clayton

View file

@ -0,0 +1,20 @@
Avoid implicit declarations of gethostbyname and connect in the
non-autoconf configure script. This prevents altering the test result
with compilers which do not support implicit function declarations.
A more elaborate pull request has been submitted upstream:
<https://github.com/spamhaus/rbldnsd/pull/28>
diff --git a/configure b/configure
index b0cb655797639dac..978f480e391a46a8 100755
--- a/configure
+++ b/configure
@@ -173,6 +173,7 @@ else
fi
if ac_library_find_v 'connect()' "" "-lsocket -lnsl" <<EOF
+char gethostbyname(void); char connect(void);
int main() { gethostbyname(); connect(); return 0; }
EOF
then :

15
rbldnsd.conf Normal file
View file

@ -0,0 +1,15 @@
# This is boilerplate text for rbldnsd unit files, which can be
# created using "rbldnsctl create" based on the traditional
# configuration variable RBLDNSD as defined in /etc/sysconfig/rbldnsd
[Unit]
Description=DNS daemon for DNSBLs
After=network.target
[Service]
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

14
rbldnsd.rpmlintrc Normal file
View file

@ -0,0 +1,14 @@
# Configure script is not from autotools
addFilter("configure-without-libdir-spec")
# No manpage but see README.systemd
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',")

358
rbldnsd.spec Normal file
View file

@ -0,0 +1,358 @@
# systemd-rpm-macros split out from systemd at Fedora 30
%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: 19%{?dist}
License: GPL-2.0-or-later
URL: https://rbldnsd.io/
Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz
Source2: rbldnsd.conf
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
BuildRequires: make
BuildRequires: sed
BuildRequires: %{systemd_rpm_macros}
BuildRequires: zlib-devel
%if !%{use_sysusers}
Requires(pre): shadow-utils
%endif
Requires: gawk
%{?systemd_requires}
%description
Rbldnsd is a small, authoritative-only DNS nameserver designed to serve
DNS-based blocklists (DNSBLs). It may handle IP-based and name-based
blocklists.
%prep
%setup -q
# Port non-autoconf configure script to C99
%patch -P 0 -p1
# 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} ./
# Create a sysusers.d config file
cat >rbldnsd.sysusers.conf <<EOF
u rbldns - 'rbldns daemon' %{_localstatedir}/lib/rbldnsd -
EOF
%build
# this is not an autotools-generated configure script, and does not support --libdir
CFLAGS="%{optflags}" \
LDFLAGS="%{?__global_ldflags}" \
./configure
make
%install
mkdir -p %{buildroot}{%{_sbindir},%{_mandir}/man8,%{_initrddir},%{_sysconfdir}/sysconfig}
mkdir -p %{buildroot}{/etc/systemd,%{_localstatedir}/lib/rbldnsd}
install -p -m 755 rbldnsd %{buildroot}%{_sbindir}/
install -p -m 644 rbldnsd.8 %{buildroot}%{_mandir}/man8/
install -p -m 644 contrib/debian/rbldnsd.default %{buildroot}%{_sysconfdir}/sysconfig/rbldnsd
install -p -m 644 rbldnsd.conf %{buildroot}/etc/systemd/
install -p -m 755 rbldnsctl %{buildroot}%{_sbindir}/
%if %{use_sysusers}
install -m0644 -D rbldnsd.sysusers.conf %{buildroot}%{_sysusersdir}/rbldnsd.conf
%endif
%if !%{use_sysusers}
%pre
getent group rbldns >/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 || :
%preun
if [ $1 -eq 0 ]; then
# Package removal, not upgrade
%{_sbindir}/rbldnsctl stop &>/dev/null || :
%{_sbindir}/rbldnsctl disable &>/dev/null || :
fi
%postun
systemctl daemon-reload &>/dev/null || :
if [ $1 -ge 1 ]; then
# Package upgrade, not uninstall
%{_sbindir}/rbldnsctl try-restart &>/dev/null || :
fi
%files
%license LICENSE.txt
%doc CHANGES-0.81 NEWS README README.user TODO contrib/debian/changelog
%{_sbindir}/rbldnsd
%{_mandir}/man8/rbldnsd.8*
%dir %{_localstatedir}/lib/rbldnsd/
%config(noreplace) %{_sysconfdir}/sysconfig/rbldnsd
%doc README.systemd
%config(noreplace) %{_sysconfdir}/systemd/rbldnsd.conf
%{_sbindir}/rbldnsctl
%if %{use_sysusers}
%{_sysusersdir}/rbldnsd.conf
%endif
%changelog
* Fri Sep 26 2025 Paul Howarth <paul@city-fan.org> - 0.998b-19
- Fix base template replacement issue (GH#18, GH#19, GH#22, rhbz#2398024)
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.998b-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Wed Feb 12 2025 Paul Howarth <paul@city-fan.org> - 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 <releng@fedoraproject.org> - 0.998b-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.998b-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.998b-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.998b-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.998b-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jun 23 2023 Paul Howarth <paul@city-fan.org> - 0.998b-11
- Avoid use of systemd ".include" directive (rhbz#2216790)
- Avoid use of deprecated patch syntax
- Fix version number reported by rbldnsd
* Mon Jan 30 2023 Paul Howarth <paul@city-fan.org> - 0.998b-10
- Use SPDX-format license tag
* Mon Jan 30 2023 Florian Weimer <fweimer@redhat.com> - 0.998b-9
- Port non-autoconf configure script to C99
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.998b-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.998b-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.998b-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.998b-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jan 27 2021 Paul Howarth <paul@city-fan.org> - 0.998b-4
- Drop EL-6 support
- Always assume systemd init
- Drop support for sysv-to-systemd migration
- Use %%license unconditionally
- Use %%{?systemd_requires}
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.998b-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.998b-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 5 2020 Paul Howarth <paul@city-fan.org> - 0.998b-1
- Update to 0.998b
- Minor fixes in copyright and documentation
- Bugfix: Minor fix to prevent errors on newer compilers
- Fix for memory errors on very large datasets
- Upstream is now at rbldnsd.io
- Package new LICENSE.txt and README files
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.998-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.998-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.998-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.998-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.998-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Mon Jan 29 2018 Paul Howarth <paul@city-fan.org> - 0.998-6
- Account for systemd-units being merged into systemd at Fedora 17
- Drop support for SysV-to-systemd migration from Fedora 18, RHEL 7
- Use forward-looking conditionals
- Use fewer full paths from commands in scriptlets, to aid readability
- Drop legacy BuildRoot: and Group: tags
- Drop explicit buildroot cleaning in %%clean and %%install
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.998-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.998-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.998-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.998-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jan 1 2016 Paul Howarth <paul@city-fan.org> - 0.998-1
- Update to 0.998
- Correctly handle V4MAPPED (v4 in v6) addresses; the original v6 prefix was
wrong
- Sometimes IP4-based datasets gave false positives when an IP6 dataset was
present, and it was also possible to have false positives in IP6 datasets;
both have been fixed
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.997a-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.997a-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Thu Jul 10 2014 Paul Howarth <paul@city-fan.org> 0.997a-4
- fix return value from initscript, by using process substitution instead of
a while loop at the end of a pipe (#1118013)
- drop %%defattr, redundant since rpm 4.4
* Sun Jun 8 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.997a-3
- rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu Nov 21 2013 Paul Howarth <paul@city-fan.org> 0.997a-2
- use format string in dslog() invocation
* Mon Jul 29 2013 Paul Howarth <paul@city-fan.org> 0.997a-1
- update to 0.997a
- minor fixes/changes in packaging, no code changes
- in particular, fixes a build failure on *BSD introduced in 0.997
* Sun Jun 30 2013 Paul Howarth <paul@city-fan.org> 0.997-1
- update to 0.997
- main feature of this version is ipv6 support
- feature: ip6trie - new dataset supports listing of arbitrary length ip6
CIDRs, along with individual A/TXT values for each prefix
- feature: ip6tset - new dataset supports listing of ip6 /64 subnets and the
exclusion of /128 subnets; only supports a single A/TXT value for the
entire dataset
- optimization: ip4trie - using new trie implementation (developed for the
ip6trie dataset) decreases memory consumption by roughly a factor of three
- feature: acl dataset - ip6 addresses are now supported in ACLs
- feature: added --enable-asserts configure option to enable compilation of
debugging assertions; assertion checking is disabled by default
- featurette: zero-length "wildcard" IP4 CIDR prefixes are now allowed in
ip4trie and acl datasets
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.996b-10
- rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.996b-9
- rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Apr 17 2012 Paul Howarth <paul@city-fan.org> 0.996b-8
- rename systemctl-rbldnsd to rbldnsctl (#807504)
* Tue Apr 17 2012 Paul Howarth <paul@city-fan.org> 0.996b-7
- use native systemd init from F-17 onwards (see README.systemd)
* Mon Apr 16 2012 Paul Howarth <paul@city-fan.org> 0.996b-6
- fix some initscript issues (#807504)
- do a hardened build (PIE) where possible
* Thu Jan 5 2012 Paul Howarth <paul@city-fan.org> 0.996b-5
- nobody else likes macros for commands
* Wed Feb 9 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.996b-4
- rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.996b-3
- rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.996b-2
- rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Mon Mar 31 2008 Paul Howarth <paul@city-fan.org> 0.996b-1
- update to 0.996b
- _GNU_SOURCE no longer needed
* Wed Feb 20 2008 Paul Howarth <paul@city-fan.org> 0.996a-6
- fix exit codes for reload, stop, and try-restart actions of initscript
* Wed Feb 13 2008 Paul Howarth <paul@city-fan.org> 0.996a-5
- define _GNU_SOURCE for NI_MAXHOST symbol visibility
- LSB-ize initscript (#247043)
* Thu Aug 23 2007 Paul Howarth <paul@city-fan.org> 0.996a-4
- add buildreq gawk
* Thu Aug 23 2007 Paul Howarth <paul@city-fan.org> 0.996a-3
- upstream released a new version without changing the version number (the
only changes are in debian/control and debian/changelog, neither of which
are used in the RPM package)
- unexpand tabs in spec
- use the standard scriptlet for user/group creation in %%pre
- drop scriptlet dependencies on /sbin/service by calling initscript directly
- clarify license as GPL version 2 or later
* Wed Aug 30 2006 Paul Howarth <paul@city-fan.org> 0.996a-2
- FE6 mass rebuild
* Fri Jul 28 2006 Paul Howarth <paul@city-fan.org> 0.996a-1
- update to 0.996a
* Tue Feb 21 2006 Paul Howarth <paul@city-fan.org> 0.996-1
- update to 0.996
- use /usr/sbin/useradd instead of %%{_sbindir}/useradd
- add buildreq zlib-devel to support gzipped zone files
* Wed Feb 15 2006 Paul Howarth <paul@city-fan.org> 0.995-5
- license text not included in upstream tarball, so don't include it
* Tue Jun 28 2005 Paul Howarth <paul@city-fan.org> 0.995-4
- include gpl.txt as %%doc
* Mon Jun 27 2005 Paul Howarth <paul@city-fan.org> 0.995-3
- fix /etc/sysconfig/rbldnsd references to /var/lib/rbldns to point to
%%{_localstatedir}/lib/rbldnsd instead
- don't enable daemons in any runlevel by default
- add -q option to sample entries in /etc/sysconfig/rbldnsd
* Fri Jun 17 2005 Paul Howarth <paul@city-fan.org> 0.995-2
- first Fedora Extras build, largely based on upstream spec file

View file

@ -0,0 +1 @@
SHA512 (rbldnsd-0.998b.tgz) = 8efa1e324475c29baeeb1e64c433d4e28516b01ff871a620938fb72d7ad8bdfa23e541b9546081bdda12622178da2f4d32cec6cb83466b05ee9076f67e31d8fe