Compare commits
22 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb88638fad | ||
|
|
4cf3052c45 | ||
|
|
adebf8a7cd | ||
|
|
c6c0bf9589 | ||
|
|
a1038609c1 | ||
|
|
617de38995 | ||
|
|
69cc88e578 | ||
|
|
3704bf0c5a | ||
|
|
b453477b2f | ||
|
|
ae308e0e91 | ||
|
|
979e1c4e31 | ||
|
|
329471ee22 | ||
|
|
e271ece52c | ||
|
|
cc189db86b | ||
|
|
06f019e13e | ||
|
|
a5f75df8f0 | ||
|
|
35ec7889a1 | ||
|
|
ba498666f2 | ||
|
|
69255fc7f0 | ||
|
|
48a62b996f | ||
|
|
73b079c030 | ||
|
|
91f5bc6c54 |
10 changed files with 259 additions and 306 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +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
62
85932ec5.patch
Normal 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);
|
||||
37
rbldnsctl
37
rbldnsctl
|
|
@ -82,48 +82,49 @@ for_all_daemons() {
|
|||
}
|
||||
|
||||
start_one_daemon() {
|
||||
/bin/systemctl start "rbldnsd-${name}.service"
|
||||
/usr/bin/systemctl start "rbldnsd-${name}.service"
|
||||
}
|
||||
|
||||
stop_one_daemon() {
|
||||
/bin/systemctl stop "rbldnsd-${name}.service"
|
||||
/usr/bin/systemctl stop "rbldnsd-${name}.service"
|
||||
}
|
||||
|
||||
reload_one_daemon() {
|
||||
/bin/systemctl reload "rbldnsd-${name}.service"
|
||||
/usr/bin/systemctl reload "rbldnsd-${name}.service"
|
||||
}
|
||||
|
||||
check_one_daemon() {
|
||||
/bin/systemctl status "rbldnsd-${name}.service"
|
||||
/usr/bin/systemctl status "rbldnsd-${name}.service"
|
||||
}
|
||||
|
||||
restart_one_daemon() {
|
||||
/bin/systemctl restart "rbldnsd-${name}.service"
|
||||
/usr/bin/systemctl restart "rbldnsd-${name}.service"
|
||||
}
|
||||
|
||||
condrestart_one_daemon() {
|
||||
/bin/systemctl try-restart "rbldnsd-${name}.service"
|
||||
/usr/bin/systemctl try-restart "rbldnsd-${name}.service"
|
||||
}
|
||||
|
||||
create_one_daemon() {
|
||||
cat > "/etc/systemd/system/rbldnsd-${name}.service" <<-END_OF_UNIT
|
||||
.include /etc/systemd/rbldnsd.conf
|
||||
|
||||
[Unit]
|
||||
Description=DNSBL (rbldnsd) ${name} instance
|
||||
|
||||
[Service]
|
||||
ExecStart=/sbin/rbldnsd -n ${args}
|
||||
END_OF_UNIT
|
||||
{
|
||||
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() {
|
||||
/bin/systemctl enable "rbldnsd-${name}.service"
|
||||
/usr/bin/systemctl enable "rbldnsd-${name}.service"
|
||||
}
|
||||
|
||||
disable_one_daemon() {
|
||||
/bin/systemctl disable "rbldnsd-${name}.service"
|
||||
/usr/bin/systemctl disable "rbldnsd-${name}.service"
|
||||
}
|
||||
|
||||
# See how we were called.
|
||||
|
|
@ -131,7 +132,7 @@ case "$1" in
|
|||
create)
|
||||
for_all_daemons create_one_daemon
|
||||
RETVAL=$?
|
||||
/bin/systemctl daemon-reload
|
||||
/usr/bin/systemctl daemon-reload
|
||||
;;
|
||||
enable)
|
||||
for_all_daemons enable_one_daemon
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
Third argument of dslog() is a format string
|
||||
|
||||
--- rbldnsd.c
|
||||
+++ rbldnsd.c
|
||||
@@ -959,7 +959,7 @@
|
||||
# undef kb
|
||||
}
|
||||
#endif /* NO_MEMINFO */
|
||||
- dslog(LOG_INFO, 0, ibuf);
|
||||
+ dslog(LOG_INFO, 0, "%s", ibuf);
|
||||
|
||||
check_expires();
|
||||
|
||||
16
rbldnsd-0.998b-version.patch
Normal file
16
rbldnsd-0.998b-version.patch
Normal 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
|
||||
|
||||
20
rbldnsd-configure-c99.patch
Normal file
20
rbldnsd-configure-c99.patch
Normal 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 :
|
||||
198
rbldnsd.init
198
rbldnsd.init
|
|
@ -1,198 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# rbldnsd This starts and stops rbldnsd.
|
||||
#
|
||||
# chkconfig: - 80 30
|
||||
# description: rbldnsd is a DNS daemon for DNSBLs. Configure it in \
|
||||
# /etc/sysconfig/rbldnsd
|
||||
#
|
||||
# processname: /usr/sbin/rbldnsd
|
||||
# config: /etc/sysconfig/network
|
||||
# config: /etc/sysconfig/rbldnsd
|
||||
# pidfiles: /var/run/rbldnsd*.pid
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: rbldnsd
|
||||
# Required-Start: $local_fs $network $syslog
|
||||
# Required-Stop: $local_fs $network $syslog
|
||||
# Default-Stop: 0 1 2 3 4 5 6
|
||||
# Short-Description: Start or stop DNS daemon for DNSBLs
|
||||
# Description: rbldnsd is a DNS daemon for DNSBLs
|
||||
### END INIT INFO
|
||||
|
||||
PATH=/sbin:/bin:/usr/bin:/usr/sbin
|
||||
prog=rbldnsd
|
||||
DAEMON=/usr/sbin/$prog
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
# Get config.
|
||||
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
|
||||
[ -f /etc/sysconfig/rbldnsd ] && . /etc/sysconfig/rbldnsd
|
||||
|
||||
# Check that the rbldnsd binary is available
|
||||
[ -f $DAEMON ] || exit 5
|
||||
|
||||
# Check that configuration has been set up (RBLDNSD set in /etc/sysconfig/rbldnsd)
|
||||
[ -n "$RBLDNSD" ] || exit 6
|
||||
|
||||
# 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
|
||||
# generate pidfile name from key
|
||||
case "$name" in
|
||||
""|\#*) continue;;
|
||||
-) name=$prog; pidfile=/var/run/$name.pid;;
|
||||
*) pidfile=/var/run/rbldnsd-$name.pid;;
|
||||
esac
|
||||
# if pidfile exists, get pid and check for running rbldnsd
|
||||
pid=
|
||||
if [ -f $pidfile ]; then
|
||||
read p < $pidfile
|
||||
if [ -n "$p" -a -f /proc/$p/cmdline ]; then
|
||||
case "`cat /proc/$p/cmdline 2>/dev/null`" in
|
||||
*$prog*) pid=$p;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
# Start/stop this daemon
|
||||
$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() {
|
||||
RETVAL=0
|
||||
if [ ! "$pid" ]; then
|
||||
echo -n $"Starting $prog: "
|
||||
[ x"$name" != x"$prog" ] && echo -n "$name "
|
||||
daemon $DAEMON -p $pidfile $args
|
||||
RETVAL=$?
|
||||
echo
|
||||
fi
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop_one_daemon() {
|
||||
RETVAL=0
|
||||
if [ "$pid" ]; then
|
||||
echo -n $"Stopping $prog: "
|
||||
[ x"$name" != x"$prog" ] && echo -n "$name "
|
||||
kill $pid
|
||||
usleep 500000
|
||||
checkpid $pid
|
||||
if [ $? = 0 ]; then
|
||||
echo_failure
|
||||
RETVAL=1
|
||||
else
|
||||
echo_success
|
||||
RETVAL=0
|
||||
fi
|
||||
echo
|
||||
rm -f $pidfile
|
||||
fi
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
reload_one_daemon() {
|
||||
if [ "$pid" ]; then
|
||||
echo -n $"Reloading $prog: "
|
||||
[ x"$name" != x"$prog" ] && echo -n "$name "
|
||||
kill -HUP $pid
|
||||
checkpid $pid && echo_success || echo_failure
|
||||
RETVAL=$?
|
||||
echo
|
||||
else
|
||||
# Not running
|
||||
return 7
|
||||
fi
|
||||
}
|
||||
|
||||
check_one_daemon() {
|
||||
echo -n "$prog "
|
||||
[ x"$name" != x"$prog" ] && echo -n "[$name] "
|
||||
if [ "$pid" ]; then
|
||||
echo $"($pid) is running..."
|
||||
return 0
|
||||
fi
|
||||
if [ -f "$pidfile" ]; then
|
||||
echo $"dead but pid file exists"
|
||||
return 1
|
||||
fi
|
||||
if [ -e /var/lock/subsys/$prog ]; then
|
||||
echo $"dead but subsys locked"
|
||||
return 2
|
||||
fi
|
||||
echo $"is stopped"
|
||||
return 3
|
||||
}
|
||||
|
||||
restart_one_daemon() {
|
||||
stop_one_daemon
|
||||
pid=
|
||||
start_one_daemon
|
||||
}
|
||||
|
||||
condrestart_one_daemon() {
|
||||
if [ -e /var/lock/subsys/$prog ]; then
|
||||
restart_one_daemon
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
for_all_daemons start_one_daemon
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
|
||||
;;
|
||||
restart)
|
||||
for_all_daemons restart_one_daemon
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
|
||||
;;
|
||||
force-reload|reload)
|
||||
for_all_daemons reload_one_daemon
|
||||
RETVAL=$?
|
||||
;;
|
||||
stop)
|
||||
for_all_daemons stop_one_daemon
|
||||
RETVAL=$?
|
||||
rm -f /var/lock/subsys/$prog
|
||||
;;
|
||||
status)
|
||||
for_all_daemons check_one_daemon
|
||||
RETVAL=$?
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
for_all_daemons condrestart_one_daemon
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|restart|try-restart|reload|force-reload|status}" >&2
|
||||
RETVAL=1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
|
||||
# vi: shiftwidth=4 tabstop=4 syntax=sh
|
||||
14
rbldnsd.rpmlintrc
Normal file
14
rbldnsd.rpmlintrc
Normal 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',")
|
||||
202
rbldnsd.spec
202
rbldnsd.spec
|
|
@ -1,24 +1,15 @@
|
|||
# This package uses systemd init from Fedora 17, but can use it for
|
||||
# Fedora 15/16 if built using --with systemd
|
||||
%if !((0%{?rhel} && 0%{?rhel} <= 6) || (0%{?fedora} && 0%{?fedora} <= 16))
|
||||
%global _with_systemd --with-systemd
|
||||
%endif
|
||||
%global use_systemd %{!?_with_systemd:0}%{?_with_systemd:1}
|
||||
|
||||
# systemd-units merged into systemd at Fedora 17
|
||||
%if (0%{?fedora} && 0%{?fedora} <= 16)
|
||||
%global systemd_units systemd-units
|
||||
# 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_units systemd
|
||||
%global systemd_rpm_macros systemd-rpm-macros
|
||||
%endif
|
||||
|
||||
# Support systemd presets and drop support for SysV migration from Fedora 18, RHEL 7
|
||||
%if (0%{?rhel} && 0%{?rhel} <= 6) || (0%{?fedora} && 0%{?fedora} <= 17)
|
||||
%global preset_support 0
|
||||
%global sysv_to_systemd %{use_systemd}
|
||||
# Use sysusers from Fedora 43 onwards
|
||||
%if (0%{?rhel} && 0%{?rhel} <= 10) || (0%{?fedora} && 0%{?fedora} <= 42)
|
||||
%global use_sysusers 0
|
||||
%else
|
||||
%global preset_support 1
|
||||
%global sysv_to_systemd 0
|
||||
%global use_sysusers 1
|
||||
%endif
|
||||
|
||||
# Build hardened (PIE) where possible
|
||||
|
|
@ -26,35 +17,29 @@
|
|||
|
||||
Summary: Small, fast daemon to serve DNSBLs
|
||||
Name: rbldnsd
|
||||
Version: 0.998
|
||||
Release: 9%{?dist}
|
||||
License: GPLv2+
|
||||
URL: http://www.corpit.ru/mjt/rbldnsd.html
|
||||
Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd-%{version}.tar.gz
|
||||
Source1: rbldnsd.init
|
||||
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-0.997a-format.patch
|
||||
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
|
||||
%if %{sysv_to_systemd}
|
||||
Requires(pre): chkconfig, systemd-sysv
|
||||
%endif
|
||||
%if %{use_systemd}
|
||||
BuildRequires: %{systemd_units}
|
||||
Requires(post): %{systemd_units}
|
||||
Requires(preun): %{systemd_units}
|
||||
Requires(postun): %{systemd_units}
|
||||
%else
|
||||
Requires(post): chkconfig
|
||||
Requires(preun): chkconfig
|
||||
%endif
|
||||
Requires: gawk
|
||||
%{?systemd_requires}
|
||||
|
||||
%description
|
||||
Rbldnsd is a small, authoritative-only DNS nameserver designed to serve
|
||||
|
|
@ -64,12 +49,26 @@ blocklists.
|
|||
%prep
|
||||
%setup -q
|
||||
|
||||
# Use format string in dslog() invocation
|
||||
%patch0
|
||||
# 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' debian/rbldnsd.default
|
||||
cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} ./
|
||||
-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
|
||||
|
|
@ -81,80 +80,131 @@ 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 debian/rbldnsd.default %{buildroot}%{_sysconfdir}/sysconfig/rbldnsd
|
||||
%if %{use_systemd}
|
||||
install -p -m 644 rbldnsd.conf %{buildroot}/etc/systemd/
|
||||
install -p -m 755 rbldnsctl %{buildroot}%{_sbindir}/
|
||||
%else
|
||||
install -p -m 755 rbldnsd.init %{buildroot}%{_initrddir}/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
|
||||
%if %{sysv_to_systemd}
|
||||
# SysV-to-systemd migration
|
||||
if [ $1 -gt 1 -a ! -e /etc/systemd/rbldnsd.conf -a -e %{_initrddir}/rbldnsd ]; then
|
||||
systemd-sysv-convert --save rbldnsd &>/dev/null || :
|
||||
chkconfig --del rbldnsd &>/dev/null || :
|
||||
fi
|
||||
%endif
|
||||
exit 0
|
||||
%endif
|
||||
|
||||
%post
|
||||
%if %{use_systemd}
|
||||
systemctl daemon-reload &>/dev/null || :
|
||||
%else
|
||||
if [ $1 -eq 1 ]; then
|
||||
# Initial installation
|
||||
chkconfig --add rbldnsd || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
# Package removal, not upgrade
|
||||
%if %{use_systemd}
|
||||
%{_sbindir}/rbldnsctl stop &>/dev/null || :
|
||||
%{_sbindir}/rbldnsctl disable &>/dev/null || :
|
||||
%else
|
||||
%{_initrddir}/rbldnsd stop &>/dev/null || :
|
||||
chkconfig --del rbldnsd || :
|
||||
%endif
|
||||
fi
|
||||
|
||||
%postun
|
||||
%if %{use_systemd}
|
||||
systemctl daemon-reload &>/dev/null || :
|
||||
%endif
|
||||
if [ $1 -ge 1 ]; then
|
||||
# Package upgrade, not uninstall
|
||||
%if %{use_systemd}
|
||||
%{_sbindir}/rbldnsctl try-restart &>/dev/null || :
|
||||
%else
|
||||
%{_initrddir}/rbldnsd condrestart &>/dev/null || :
|
||||
%endif
|
||||
fi
|
||||
|
||||
%files
|
||||
%doc README.user NEWS TODO debian/changelog CHANGES-0.81
|
||||
%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
|
||||
%if %{use_systemd}
|
||||
%doc README.systemd
|
||||
%config(noreplace) %{_sysconfdir}/systemd/rbldnsd.conf
|
||||
%{_sbindir}/rbldnsctl
|
||||
%else
|
||||
%{_initrddir}/rbldnsd
|
||||
%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
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
8311898ba91bf9fc97d836dfb5fd3b6e rbldnsd-0.998.tar.gz
|
||||
SHA512 (rbldnsd-0.998b.tgz) = 8efa1e324475c29baeeb1e64c433d4e28516b01ff871a620938fb72d7ad8bdfa23e541b9546081bdda12622178da2f4d32cec6cb83466b05ee9076f67e31d8fe
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue