From 5f03bbd239a0414e3fcee3dd7ed9c7c1c4e42965 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Wed, 29 Jun 2005 06:14:33 +0000 Subject: [PATCH 01/71] auto-import rbldnsd-0.995-4 on branch devel from rbldnsd-0.995-4.src.rpm --- .cvsignore | 1 + gpl.txt | 340 +++++++++++++++++++++++++++++++++++++++++++++++++++ rbldnsd.init | 157 ++++++++++++++++++++++++ rbldnsd.spec | 83 +++++++++++++ sources | 1 + 5 files changed, 582 insertions(+) create mode 100644 gpl.txt create mode 100644 rbldnsd.init create mode 100644 rbldnsd.spec diff --git a/.cvsignore b/.cvsignore index e69de29..335e55c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +rbldnsd_0.995.tar.gz diff --git a/gpl.txt b/gpl.txt new file mode 100644 index 0000000..b6f92f3 --- /dev/null +++ b/gpl.txt @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/rbldnsd.init b/rbldnsd.init new file mode 100644 index 0000000..b8afdb1 --- /dev/null +++ b/rbldnsd.init @@ -0,0 +1,157 @@ +#!/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 +# pidfile: /var/run/rbldnsd*.pid + +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 networking is up and the rbldnsd binary is available +[ "${NETWORKING}" = "yes" ] || exit 0 +[ -f $DAEMON ] || exit 1 + +# Check that configuration has been set up (RBLDNSD set in /etc/sysconfig/rbldnsd) +[ -n "$RBLDNSD" ] || exit 1 + +# Process multiple instances of the daemon (see /etc/sysconfig/rbldnsd) +for_all_daemons() { + echo "$RBLDNSD" | + 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 + done +} + +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 + RETVAL=$? + [ "$RETVAL" = 1 ] && echo_success || echo_failure + 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 + 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() { + [ -e /var/lock/subsys/$prog ] && restart_one_daemon + return 0 +} + +# See how we were called. +case "$1" in + start) + for_all_daemons start_one_daemon + touch /var/lock/subsys/$prog + ;; + restart) + for_all_daemons restart_one_daemon + touch /var/lock/subsys/$prog + ;; + reload) + for_all_daemons reload_one_daemon + ;; + stop) + for_all_daemons stop_one_daemon + rm -f /var/lock/subsys/$prog + ;; + status) + for_all_daemons check_one_daemon + ;; + condrestart) + for_all_daemons condrestart_one_daemon + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}" >&2 + RETVAL=1 + ;; +esac + +exit $RETVAL + +# vi: shiftwidth=4 tabstop=4 syntax=sh diff --git a/rbldnsd.spec b/rbldnsd.spec new file mode 100644 index 0000000..ece063f --- /dev/null +++ b/rbldnsd.spec @@ -0,0 +1,83 @@ +Summary: Small, fast daemon to serve DNSBLs +Name: rbldnsd +Version: 0.995 +Release: 4%{?dist} +License: GPL +Group: System Environment/Daemons +URL: http://www.corpit.ru/mjt/rbldnsd.html +Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd_%{version}.tar.gz +Source1: rbldnsd.init +Source2: http://www.fsf.org/licensing/licenses/gpl.txt +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +Requires(pre): %{_sbindir}/useradd +Requires(post): /sbin/chkconfig +Requires(post): /sbin/service +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +Requires(postun): /sbin/service + +%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 -n %{name}-%{version} +%{__cp} %{SOURCE2} . +%{__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 + +%build +CFLAGS="%{optflags}" ./configure +%{__make} + +%install +%{__rm} -rf %{buildroot} +%{__mkdir_p} %{buildroot}{%{_sbindir},%{_mandir}/man8,%{_initrddir},%{_sysconfdir}/sysconfig} +%{__mkdir_p} %{buildroot}%{_localstatedir}/lib/rbldnsd +%{__install} -m 755 rbldnsd %{buildroot}%{_sbindir} +%{__install} -m 644 rbldnsd.8 %{buildroot}%{_mandir}/man8 +%{__install} -m 644 debian/rbldnsd.default %{buildroot}%{_sysconfdir}/sysconfig/rbldnsd +%{__install} -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/rbldnsd + +%clean +%{__rm} -rf %{buildroot} + +%pre +%{_sbindir}/useradd -r -s /sbin/nologin -d %{_localstatedir}/lib/rbldnsd \ + -c "rbldns daemon" rbldns &>/dev/null || : + +%post +/sbin/chkconfig --add rbldnsd || : + +%preun +if [ $1 -eq 0 ]; then + /sbin/service rbldnsd stop &>/dev/null || : + /sbin/chkconfig --del rbldnsd || : +fi + +%postun +/sbin/service rbldnsd condrestart &>/dev/null || : + +%files +%defattr (-,root,root,0755) +%doc README.user NEWS TODO debian/changelog CHANGES-0.81 gpl.txt +%{_sbindir}/rbldnsd +%{_mandir}/man8/rbldnsd.8* +%dir %{_localstatedir}/lib/rbldnsd +%config(noreplace) %{_sysconfdir}/sysconfig/rbldnsd +%{_initrddir}/rbldnsd + +%changelog +* Tue Jun 28 2005 Paul Howarth 0.995-4 +- include gpl.txt as %%doc + +* Mon Jun 27 2005 Paul Howarth 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 0.995-2 +- first Fedora Extras build, largely based on upstream spec file diff --git a/sources b/sources index e69de29..f6cb743 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +888a61e9a296a1b76db0c94ca44c612a rbldnsd_0.995.tar.gz From e186d231cfe2e7e1a3dab236489baf198c770ad8 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Wed, 15 Feb 2006 07:09:30 +0000 Subject: [PATCH 02/71] license text not included in upstream tarball, so don't include it --- rbldnsd.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index ece063f..6bacdc2 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,13 +1,12 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.995 -Release: 4%{?dist} +Release: 5%{?dist} License: GPL Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd_%{version}.tar.gz Source1: rbldnsd.init -Source2: http://www.fsf.org/licensing/licenses/gpl.txt BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(pre): %{_sbindir}/useradd @@ -24,7 +23,6 @@ blocklists. %prep %setup -q -n %{name}-%{version} -%{__cp} %{SOURCE2} . %{__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 @@ -62,7 +60,7 @@ fi %files %defattr (-,root,root,0755) -%doc README.user NEWS TODO debian/changelog CHANGES-0.81 gpl.txt +%doc README.user NEWS TODO debian/changelog CHANGES-0.81 %{_sbindir}/rbldnsd %{_mandir}/man8/rbldnsd.8* %dir %{_localstatedir}/lib/rbldnsd @@ -70,6 +68,9 @@ fi %{_initrddir}/rbldnsd %changelog +* Wed Feb 15 2006 Paul Howarth 0.995-5 +- license text not included in upstream tarball, so don't include it + * Tue Jun 28 2005 Paul Howarth 0.995-4 - include gpl.txt as %%doc From 5bf4fe41a1ea37b3502e352ea2a2b3853338ff3e Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Tue, 21 Feb 2006 11:18:05 +0000 Subject: [PATCH 03/71] Forgot to remove this last time --- gpl.txt | 340 -------------------------------------------------------- 1 file changed, 340 deletions(-) delete mode 100644 gpl.txt diff --git a/gpl.txt b/gpl.txt deleted file mode 100644 index b6f92f3..0000000 --- a/gpl.txt +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. From 815c44e138f496efdde72af52ee31b36eb2ddfac Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Tue, 21 Feb 2006 11:57:33 +0000 Subject: [PATCH 04/71] - update to 0.996 - use /usr/sbin/useradd instead of %{_sbindir}/useradd - add buildreq zlib-devel to support gzipped zone files --- .cvsignore | 2 +- rbldnsd.spec | 14 ++++++++++---- sources | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 335e55c..aef60a2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -rbldnsd_0.995.tar.gz +rbldnsd_0.996.tar.gz diff --git a/rbldnsd.spec b/rbldnsd.spec index 6bacdc2..8160042 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,15 +1,16 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd -Version: 0.995 -Release: 5%{?dist} +Version: 0.996 +Release: 1%{?dist} License: GPL Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd_%{version}.tar.gz Source1: rbldnsd.init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: zlib-devel -Requires(pre): %{_sbindir}/useradd +Requires(pre): /usr/sbin/useradd Requires(post): /sbin/chkconfig Requires(post): /sbin/service Requires(preun): /sbin/chkconfig @@ -43,7 +44,7 @@ CFLAGS="%{optflags}" ./configure %{__rm} -rf %{buildroot} %pre -%{_sbindir}/useradd -r -s /sbin/nologin -d %{_localstatedir}/lib/rbldnsd \ +/usr/sbin/useradd -r -s /sbin/nologin -d %{_localstatedir}/lib/rbldnsd \ -c "rbldns daemon" rbldns &>/dev/null || : %post @@ -68,6 +69,11 @@ fi %{_initrddir}/rbldnsd %changelog +* Tue Feb 21 2006 Paul Howarth 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 0.995-5 - license text not included in upstream tarball, so don't include it diff --git a/sources b/sources index f6cb743..40e70ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -888a61e9a296a1b76db0c94ca44c612a rbldnsd_0.995.tar.gz +adba618d40a724a4d07a9b176d86b645 rbldnsd_0.996.tar.gz From 25340e6fdfa29b2333588146316b4863c1ab1b18 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Fri, 28 Jul 2006 11:16:39 +0000 Subject: [PATCH 05/71] update to 0.996a expand tabs in spec escape macro in changelog --- .cvsignore | 2 +- rbldnsd.spec | 29 ++++++++++++++++------------- sources | 2 +- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.cvsignore b/.cvsignore index aef60a2..7f47c70 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -rbldnsd_0.996.tar.gz +rbldnsd_0.996a.tar.gz diff --git a/rbldnsd.spec b/rbldnsd.spec index 8160042..65bca6e 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,14 +1,14 @@ -Summary: Small, fast daemon to serve DNSBLs -Name: rbldnsd -Version: 0.996 -Release: 1%{?dist} -License: GPL -Group: System Environment/Daemons -URL: http://www.corpit.ru/mjt/rbldnsd.html -Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd_%{version}.tar.gz -Source1: rbldnsd.init -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: zlib-devel +Summary: Small, fast daemon to serve DNSBLs +Name: rbldnsd +Version: 0.996a +Release: 1%{?dist} +License: GPL +Group: System Environment/Daemons +URL: http://www.corpit.ru/mjt/rbldnsd.html +Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd_%{version}.tar.gz +Source1: rbldnsd.init +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: zlib-devel Requires(pre): /usr/sbin/useradd Requires(post): /sbin/chkconfig @@ -25,7 +25,7 @@ blocklists. %prep %setup -q -n %{name}-%{version} %{__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 + -e 's@\(-r/[a-z/]*\) -b@\1 -q -b@g' debian/rbldnsd.default %build CFLAGS="%{optflags}" ./configure @@ -69,6 +69,9 @@ fi %{_initrddir}/rbldnsd %changelog +* Fri Jul 28 2006 Paul Howarth 0.996a-1 +- update to 0.996a + * Tue Feb 21 2006 Paul Howarth 0.996-1 - update to 0.996 - use /usr/sbin/useradd instead of %%{_sbindir}/useradd @@ -82,7 +85,7 @@ fi * Mon Jun 27 2005 Paul Howarth 0.995-3 - fix /etc/sysconfig/rbldnsd references to /var/lib/rbldns to point to - %{_localstatedir}/lib/rbldnsd instead + %%{_localstatedir}/lib/rbldnsd instead - don't enable daemons in any runlevel by default - add -q option to sample entries in /etc/sysconfig/rbldnsd diff --git a/sources b/sources index 40e70ad..2891e01 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -adba618d40a724a4d07a9b176d86b645 rbldnsd_0.996.tar.gz +bd2e54e1962408293fcbfaf7ccd66e81 rbldnsd_0.996a.tar.gz From 67807dd9845d7532f0f0ab6542e771b352d239b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 27 Aug 2006 21:05:36 +0000 Subject: [PATCH 06/71] http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild --- needs.rebuild | 1 + 1 file changed, 1 insertion(+) create mode 100644 needs.rebuild diff --git a/needs.rebuild b/needs.rebuild new file mode 100644 index 0000000..815fd29 --- /dev/null +++ b/needs.rebuild @@ -0,0 +1 @@ +http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild From deba83287dc2d285a861b670e9b83b39715a734c Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Wed, 30 Aug 2006 07:42:07 +0000 Subject: [PATCH 07/71] FE6 mass rebuild --- needs.rebuild | 1 - rbldnsd.spec | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 needs.rebuild diff --git a/needs.rebuild b/needs.rebuild deleted file mode 100644 index 815fd29..0000000 --- a/needs.rebuild +++ /dev/null @@ -1 +0,0 @@ -http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild diff --git a/rbldnsd.spec b/rbldnsd.spec index 65bca6e..b328b1d 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,7 +1,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.996a -Release: 1%{?dist} +Release: 2%{?dist} License: GPL Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -69,6 +69,9 @@ fi %{_initrddir}/rbldnsd %changelog +* Wed Aug 30 2006 Paul Howarth 0.996a-2 +- FE6 mass rebuild + * Fri Jul 28 2006 Paul Howarth 0.996a-1 - update to 0.996a From 0071abedea9739b67a4014515ccd0aeabe5261ba Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 13 Jan 2007 13:44:06 +0000 Subject: [PATCH 08/71] Initialize branch EL-5 for rbldnsd --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..42f697a --- /dev/null +++ b/branch @@ -0,0 +1 @@ +EL-5 From 16901f7df3d446995aecc6f792ec81c308c6fd65 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Thu, 19 Apr 2007 16:43:22 +0000 Subject: [PATCH 09/71] rebuild for EL5 --- rbldnsd.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index b328b1d..e595f0c 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,7 +1,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.996a -Release: 2%{?dist} +Release: 2%{?dist}.1 License: GPL Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -60,7 +60,7 @@ fi /sbin/service rbldnsd condrestart &>/dev/null || : %files -%defattr (-,root,root,0755) +%defattr (-,root,root,-) %doc README.user NEWS TODO debian/changelog CHANGES-0.81 %{_sbindir}/rbldnsd %{_mandir}/man8/rbldnsd.8* @@ -69,6 +69,9 @@ fi %{_initrddir}/rbldnsd %changelog +* Thu Apr 19 2007 Paul Howarth 0.996a-2.1 +- rebuild for EL5 + * Wed Aug 30 2006 Paul Howarth 0.996a-2 - FE6 mass rebuild From c52db5e0ff1c5f570e9de45eda9e392ed0ba0ce6 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Thu, 23 Aug 2007 16:05:51 +0000 Subject: [PATCH 10/71] - 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 --- rbldnsd.spec | 70 ++++++++++++++++++++++++++++++---------------------- sources | 2 +- 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index b328b1d..5c72222 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,21 +1,18 @@ -Summary: Small, fast daemon to serve DNSBLs -Name: rbldnsd -Version: 0.996a -Release: 2%{?dist} -License: GPL -Group: System Environment/Daemons -URL: http://www.corpit.ru/mjt/rbldnsd.html -Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd_%{version}.tar.gz -Source1: rbldnsd.init -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: zlib-devel +Summary: Small, fast daemon to serve DNSBLs +Name: rbldnsd +Version: 0.996a +Release: 3%{?dist} +License: GPLv2+ +Group: System Environment/Daemons +URL: http://www.corpit.ru/mjt/rbldnsd.html +Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd_%{version}.tar.gz +Source1: rbldnsd.init +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: zlib-devel -Requires(pre): /usr/sbin/useradd -Requires(post): /sbin/chkconfig -Requires(post): /sbin/service -Requires(preun): /sbin/chkconfig -Requires(preun): /sbin/service -Requires(postun): /sbin/service +Requires(pre): shadow-utils +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig %description Rbldnsd is a small, authoritative-only DNS nameserver designed to serve @@ -24,10 +21,11 @@ blocklists. %prep %setup -q -n %{name}-%{version} -%{__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 +%{__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 %build +# this is not an autotools-generated configure script, and does not support --libdir CFLAGS="%{optflags}" ./configure %{__make} @@ -35,40 +33,52 @@ CFLAGS="%{optflags}" ./configure %{__rm} -rf %{buildroot} %{__mkdir_p} %{buildroot}{%{_sbindir},%{_mandir}/man8,%{_initrddir},%{_sysconfdir}/sysconfig} %{__mkdir_p} %{buildroot}%{_localstatedir}/lib/rbldnsd -%{__install} -m 755 rbldnsd %{buildroot}%{_sbindir} -%{__install} -m 644 rbldnsd.8 %{buildroot}%{_mandir}/man8 -%{__install} -m 644 debian/rbldnsd.default %{buildroot}%{_sysconfdir}/sysconfig/rbldnsd -%{__install} -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/rbldnsd +%{__install} -m 755 rbldnsd %{buildroot}%{_sbindir} +%{__install} -m 644 rbldnsd.8 %{buildroot}%{_mandir}/man8 +%{__install} -m 644 debian/rbldnsd.default %{buildroot}%{_sysconfdir}/sysconfig/rbldnsd +%{__install} -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/rbldnsd %clean %{__rm} -rf %{buildroot} %pre -/usr/sbin/useradd -r -s /sbin/nologin -d %{_localstatedir}/lib/rbldnsd \ - -c "rbldns daemon" rbldns &>/dev/null || : +/usr/bin/getent group rbldns >/dev/null || /usr/sbin/groupadd -r rbldns +/usr/bin/getent passwd rbldns >/dev/null || \ + /usr/sbin/useradd -r -g rbldns -d %{_localstatedir}/lib/rbldnsd \ + -s /sbin/nologin -c "rbldns daemon" rbldns +exit 0 %post /sbin/chkconfig --add rbldnsd || : %preun if [ $1 -eq 0 ]; then - /sbin/service rbldnsd stop &>/dev/null || : - /sbin/chkconfig --del rbldnsd || : + %{_initrddir}/rbldnsd stop &>/dev/null || : + /sbin/chkconfig --del rbldnsd || : fi %postun -/sbin/service rbldnsd condrestart &>/dev/null || : +%{_initrddir}/rbldnsd condrestart &>/dev/null || : %files -%defattr (-,root,root,0755) +%defattr (-,root,root,-) %doc README.user NEWS TODO debian/changelog CHANGES-0.81 %{_sbindir}/rbldnsd %{_mandir}/man8/rbldnsd.8* -%dir %{_localstatedir}/lib/rbldnsd +%dir %{_localstatedir}/lib/rbldnsd/ %config(noreplace) %{_sysconfdir}/sysconfig/rbldnsd %{_initrddir}/rbldnsd %changelog +* Thu Aug 23 2007 Paul Howarth 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 0.996a-2 - FE6 mass rebuild diff --git a/sources b/sources index 2891e01..02e5e87 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bd2e54e1962408293fcbfaf7ccd66e81 rbldnsd_0.996a.tar.gz +306a437fdd36d48f921a4698ba23b2a9 rbldnsd_0.996a.tar.gz From 7ab1269d5c75c3543f8c20dbd1c20454e9ca94d1 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Thu, 23 Aug 2007 17:18:15 +0000 Subject: [PATCH 11/71] add buildreq gawk --- rbldnsd.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 5c72222..e91ea32 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,14 +1,14 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.996a -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd_%{version}.tar.gz Source1: rbldnsd.init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: zlib-devel +BuildRequires: gawk, zlib-devel Requires(pre): shadow-utils Requires(post): /sbin/chkconfig @@ -70,6 +70,9 @@ fi %{_initrddir}/rbldnsd %changelog +* Thu Aug 23 2007 Paul Howarth 0.996a-4 +- add buildreq gawk + * Thu Aug 23 2007 Paul Howarth 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 From d8d1d79fb65197ea23eb9f7c60e83ab0b361e176 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Wed, 13 Feb 2008 18:39:17 +0000 Subject: [PATCH 12/71] - define _GNU_SOURCE for NI_MAXHOST symbol visibility - LSB-ize initscript (#247043) --- rbldnsd.init | 48 +++++++++++++++++++++++++++++++++++++++--------- rbldnsd.spec | 8 ++++++-- 2 files changed, 45 insertions(+), 11 deletions(-) diff --git a/rbldnsd.init b/rbldnsd.init index b8afdb1..da873b0 100644 --- a/rbldnsd.init +++ b/rbldnsd.init @@ -11,6 +11,14 @@ # config: /etc/sysconfig/rbldnsd # pidfile: /var/run/rbldnsd*.pid +### BEGIN INIT INFO +# Provides: rbldnsd +# Required-Start: $local_fs $network $syslog +# Required-Stop: $local_fs $network $syslog +# 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 @@ -22,15 +30,20 @@ DAEMON=/usr/sbin/$prog [ -f /etc/sysconfig/network ] && . /etc/sysconfig/network [ -f /etc/sysconfig/rbldnsd ] && . /etc/sysconfig/rbldnsd -# Check that networking is up and the rbldnsd binary is available -[ "${NETWORKING}" = "yes" ] || exit 0 -[ -f $DAEMON ] || exit 1 +# 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 1 +[ -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 echo "$RBLDNSD" | while read name args; do # generate pidfile name from key @@ -51,6 +64,17 @@ for_all_daemons() { fi # Start/stop this daemon $1 + thisret=$? + if [ "$1" = "check_one_daemon" ]; then + if [ $thisret -ne 0 ]; then + ret=$thisret + fi + else + if [ $thisret -ne 0 ]; then + ret=1 + fi + fi + set_status $ret done } @@ -127,27 +151,33 @@ condrestart_one_daemon() { case "$1" in start) for_all_daemons start_one_daemon - touch /var/lock/subsys/$prog + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog ;; restart) for_all_daemons restart_one_daemon - touch /var/lock/subsys/$prog + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog ;; - reload) + 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) + condrestart|try-restart) for_all_daemons condrestart_one_daemon + RETVAL=$? ;; *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}" >&2 + echo $"Usage: $0 {start|stop|restart|try-restart|reload|force-reload|status}" >&2 RETVAL=1 ;; esac diff --git a/rbldnsd.spec b/rbldnsd.spec index e91ea32..4bc6962 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,7 +1,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.996a -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -26,7 +26,7 @@ blocklists. %build # this is not an autotools-generated configure script, and does not support --libdir -CFLAGS="%{optflags}" ./configure +CFLAGS="-D_GNU_SOURCE %{optflags}" ./configure %{__make} %install @@ -70,6 +70,10 @@ fi %{_initrddir}/rbldnsd %changelog +* Wed Feb 13 2008 Paul Howarth 0.996a-5 +- define _GNU_SOURCE for NI_MAXHOST symbol visibility +- LSB-ize initscript (#247043) + * Thu Aug 23 2007 Paul Howarth 0.996a-4 - add buildreq gawk From efcfe8dfd300cc1b8562f973daf9163dcb1fd5df Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Wed, 20 Feb 2008 13:21:29 +0000 Subject: [PATCH 13/71] fix exit codes for reload, stop, and try-restart actions of initscript --- rbldnsd.init | 21 ++++++++++++++++----- rbldnsd.spec | 5 ++++- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/rbldnsd.init b/rbldnsd.init index da873b0..f587f45 100644 --- a/rbldnsd.init +++ b/rbldnsd.init @@ -65,7 +65,7 @@ for_all_daemons() { # Start/stop this daemon $1 thisret=$? - if [ "$1" = "check_one_daemon" ]; then + if [ "$1" = "check_one_daemon" -o "$1" = "reload_one_daemon" ]; then if [ $thisret -ne 0 ]; then ret=$thisret fi @@ -98,8 +98,13 @@ stop_one_daemon() { kill $pid usleep 500000 checkpid $pid - RETVAL=$? - [ "$RETVAL" = 1 ] && echo_success || echo_failure + if [ $? = 0 ]; then + echo_failure + RETVAL=1 + else + echo_success + RETVAL=0 + fi echo rm -f $pidfile fi @@ -114,6 +119,9 @@ reload_one_daemon() { checkpid $pid && echo_success || echo_failure RETVAL=$? echo + else + # Not running + return 7 fi } @@ -143,8 +151,11 @@ restart_one_daemon() { } condrestart_one_daemon() { - [ -e /var/lock/subsys/$prog ] && restart_one_daemon - return 0 + if [ -e /var/lock/subsys/$prog ]; then + restart_one_daemon + else + return 0 + fi } # See how we were called. diff --git a/rbldnsd.spec b/rbldnsd.spec index 4bc6962..776d5a0 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,7 +1,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.996a -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -70,6 +70,9 @@ fi %{_initrddir}/rbldnsd %changelog +* Wed Feb 20 2008 Paul Howarth 0.996a-6 +- fix exit codes for reload, stop, and try-restart actions of initscript + * Wed Feb 13 2008 Paul Howarth 0.996a-5 - define _GNU_SOURCE for NI_MAXHOST symbol visibility - LSB-ize initscript (#247043) From 2e9d74cab0083bee7ec9d7cca671203b4502b1f7 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Mon, 31 Mar 2008 13:45:29 +0000 Subject: [PATCH 14/71] - update to 0.996b - _GNU_SOURCE no longer needed --- .cvsignore | 2 +- rbldnsd.spec | 10 +++++++--- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 7f47c70..fd51534 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -rbldnsd_0.996a.tar.gz +rbldnsd_0.996b.tar.gz diff --git a/rbldnsd.spec b/rbldnsd.spec index 776d5a0..d2a3d57 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,7 +1,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd -Version: 0.996a -Release: 6%{?dist} +Version: 0.996b +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -26,7 +26,7 @@ blocklists. %build # this is not an autotools-generated configure script, and does not support --libdir -CFLAGS="-D_GNU_SOURCE %{optflags}" ./configure +CFLAGS="%{optflags}" ./configure %{__make} %install @@ -70,6 +70,10 @@ fi %{_initrddir}/rbldnsd %changelog +* Mon Mar 31 2008 Paul Howarth 0.996b-1 +- update to 0.996b +- _GNU_SOURCE no longer needed + * Wed Feb 20 2008 Paul Howarth 0.996a-6 - fix exit codes for reload, stop, and try-restart actions of initscript diff --git a/sources b/sources index 02e5e87..86e4896 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -306a437fdd36d48f921a4698ba23b2a9 rbldnsd_0.996a.tar.gz +9a0f26f3b33764c325a96bd4c61b26fa rbldnsd_0.996b.tar.gz From 775a91059a0cf2114ffea21f91e5754e64f25de1 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 25 Feb 2009 18:58:21 +0000 Subject: [PATCH 15/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index d2a3d57..aaee78f 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,7 +1,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.996b -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -70,6 +70,9 @@ fi %{_initrddir}/rbldnsd %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 0.996b-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Mon Mar 31 2008 Paul Howarth 0.996b-1 - update to 0.996b - _GNU_SOURCE no longer needed From 7e4abf09e496ff7d7dd8a80a56444842ee3a9595 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 27 Jul 2009 02:50:44 +0000 Subject: [PATCH 16/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index aaee78f..8585382 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,7 +1,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.996b -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -70,6 +70,9 @@ fi %{_initrddir}/rbldnsd %changelog +* Sun Jul 26 2009 Fedora Release Engineering - 0.996b-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Wed Feb 25 2009 Fedora Release Engineering - 0.996b-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From 69fa04dee59c8774834d1f7cdf7445614f9de3b8 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 23:13:16 +0000 Subject: [PATCH 17/71] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f509fa6..b657a98 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: rbldnsd -# $Id$ +# $Id: Makefile,v 1.1 2005/06/29 06:11:16 pghmcfc Exp $ 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 +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From bf2181840858d232801ddc8bd2ed4091897ed9b5 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:26:22 +0000 Subject: [PATCH 18/71] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f509fa6..b657a98 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: rbldnsd -# $Id$ +# $Id: Makefile,v 1.1 2005/06/29 06:11:16 pghmcfc Exp $ 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 +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 1d3f5d9311ec2608141b275563ed00a8c2d074df Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:26:22 +0000 Subject: [PATCH 19/71] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f509fa6..b657a98 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: rbldnsd -# $Id$ +# $Id: Makefile,v 1.1 2005/06/29 06:11:16 pghmcfc Exp $ 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 +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 05e4dc1d26f06b3c18d6257e619b711461b0389d Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 8 May 2010 02:20:33 +0000 Subject: [PATCH 20/71] Initialize branch EL-6 for rbldnsd --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..46381b9 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +EL-6 From 9dc8e58abfdf86b1b6108692cd151ad7ef55e497 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 11:18:37 +0000 Subject: [PATCH 21/71] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index b657a98..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: rbldnsd -# $Id: Makefile,v 1.1 2005/06/29 06:11:16 pghmcfc Exp $ -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 $$d/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) diff --git a/branch b/branch deleted file mode 100644 index 42f697a..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -EL-5 From 1b7746dc0d9ce27d0d4d2bb4667bcb377a39911e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 11:18:38 +0000 Subject: [PATCH 22/71] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index b657a98..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: rbldnsd -# $Id: Makefile,v 1.1 2005/06/29 06:11:16 pghmcfc Exp $ -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 $$d/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) From 9eafc8ae76528b24dee1b250e862d74b13d1568e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 11:18:39 +0000 Subject: [PATCH 23/71] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index b657a98..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: rbldnsd -# $Id: Makefile,v 1.1 2005/06/29 06:11:16 pghmcfc Exp $ -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 $$d/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) diff --git a/branch b/branch deleted file mode 100644 index 46381b9..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -EL-6 From f3e8206de5c495ce11f74ccded7f6613d5dc43a0 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 9 Feb 2011 00:40:56 -0600 Subject: [PATCH 24/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 8585382..14b0f44 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,7 +1,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.996b -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -70,6 +70,9 @@ fi %{_initrddir}/rbldnsd %changelog +* Wed Feb 09 2011 Fedora Release Engineering - 0.996b-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Sun Jul 26 2009 Fedora Release Engineering - 0.996b-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild From e2b95d8ed13abc6701c9cb0612cf1085dc1f0fdf Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Thu, 5 Jan 2012 22:18:45 +0000 Subject: [PATCH 25/71] Nobody else likes macros for commands --- rbldnsd.spec | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 14b0f44..75958d3 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,13 +1,13 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.996b -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd_%{version}.tar.gz Source1: rbldnsd.init -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildRequires: gawk, zlib-devel Requires(pre): shadow-utils @@ -21,25 +21,25 @@ blocklists. %prep %setup -q -n %{name}-%{version} -%{__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 +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 %build # this is not an autotools-generated configure script, and does not support --libdir CFLAGS="%{optflags}" ./configure -%{__make} +make %install -%{__rm} -rf %{buildroot} -%{__mkdir_p} %{buildroot}{%{_sbindir},%{_mandir}/man8,%{_initrddir},%{_sysconfdir}/sysconfig} -%{__mkdir_p} %{buildroot}%{_localstatedir}/lib/rbldnsd -%{__install} -m 755 rbldnsd %{buildroot}%{_sbindir} -%{__install} -m 644 rbldnsd.8 %{buildroot}%{_mandir}/man8 -%{__install} -m 644 debian/rbldnsd.default %{buildroot}%{_sysconfdir}/sysconfig/rbldnsd -%{__install} -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/rbldnsd +rm -rf %{buildroot} +mkdir -p %{buildroot}{%{_sbindir},%{_mandir}/man8,%{_initrddir},%{_sysconfdir}/sysconfig} +mkdir -p %{buildroot}%{_localstatedir}/lib/rbldnsd +install -m 755 rbldnsd %{buildroot}%{_sbindir} +install -m 644 rbldnsd.8 %{buildroot}%{_mandir}/man8 +install -m 644 debian/rbldnsd.default %{buildroot}%{_sysconfdir}/sysconfig/rbldnsd +install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/rbldnsd %clean -%{__rm} -rf %{buildroot} +rm -rf %{buildroot} %pre /usr/bin/getent group rbldns >/dev/null || /usr/sbin/groupadd -r rbldns @@ -70,14 +70,17 @@ fi %{_initrddir}/rbldnsd %changelog -* Wed Feb 09 2011 Fedora Release Engineering - 0.996b-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild +* Thu Jan 5 2012 Paul Howarth 0.996b-5 +- nobody else likes macros for commands -* Sun Jul 26 2009 Fedora Release Engineering - 0.996b-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild +* Wed Feb 9 2011 Fedora Release Engineering 0.996b-4 +- rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild -* Wed Feb 25 2009 Fedora Release Engineering - 0.996b-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild +* Sun Jul 26 2009 Fedora Release Engineering 0.996b-3 +- rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering 0.996b-2 +- rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Mon Mar 31 2008 Paul Howarth 0.996b-1 - update to 0.996b From ddfb862ab09a2b23894f4bcbf1d52878dcd365c8 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Mon, 16 Apr 2012 16:47:01 +0100 Subject: [PATCH 26/71] Fix initscript, harden build - Fix some initscript issues (#807504) - Do a hardened build (PIE) where possible --- rbldnsd.init | 5 +++-- rbldnsd.spec | 13 +++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/rbldnsd.init b/rbldnsd.init index f587f45..cb333a8 100644 --- a/rbldnsd.init +++ b/rbldnsd.init @@ -9,12 +9,13 @@ # processname: /usr/sbin/rbldnsd # config: /etc/sysconfig/network # config: /etc/sysconfig/rbldnsd -# pidfile: /var/run/rbldnsd*.pid +# 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 @@ -74,8 +75,8 @@ for_all_daemons() { ret=1 fi fi - set_status $ret done + set_status $ret } start_one_daemon() { diff --git a/rbldnsd.spec b/rbldnsd.spec index 75958d3..d8d476f 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,7 +1,10 @@ +# Build hardened (PIE) where possible +%define _hardened_build 1 + Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.996b -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -26,7 +29,9 @@ sed -i -e 's@/var/lib/rbldns\([/ ]\)@%{_localstatedir}/lib/rbldnsd\1@g' \ %build # this is not an autotools-generated configure script, and does not support --libdir -CFLAGS="%{optflags}" ./configure +CFLAGS="%{optflags}" \ +LDFLAGS="%{?__global_ldflags}" \ +./configure make %install @@ -70,6 +75,10 @@ fi %{_initrddir}/rbldnsd %changelog +* Mon Apr 16 2012 Paul Howarth 0.996b-6 +- fix some initscript issues (#807504) +- do a hardened build (PIE) where possible + * Thu Jan 5 2012 Paul Howarth 0.996b-5 - nobody else likes macros for commands From 482aa3ee3f6d44ff3d27a532cc8d8c86623a4e53 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Tue, 17 Apr 2012 17:52:18 +0100 Subject: [PATCH 27/71] Use native systemd init from F-17 onwards (see README.systemd) --- README.systemd | 76 ++++++++++++++++++++ rbldnsd.conf | 15 ++++ rbldnsd.spec | 80 ++++++++++++++++++--- systemctl-rbldnsd | 175 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 337 insertions(+), 9 deletions(-) create mode 100644 README.systemd create mode 100644 rbldnsd.conf create mode 100644 systemctl-rbldnsd diff --git a/README.systemd b/README.systemd new file mode 100644 index 0000000..e56cef1 --- /dev/null +++ b/README.systemd @@ -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, systemctl-rbldnsd, 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: + + systemctl-rbldnsd create + +This creates unit files /etc/systemd/system/rbldnsd-.service +for each required instance. These units can then be manipulated +individually using /bin/systemctl as usual, or all at once by using +other systemctl-rbldnsd commands: + + systemctl-rbldnsd enable + +This enables all configured rbldnsd instances to start at boot time +(equivalent of chkconfig rbldnsd on). + + systemctl-rbldnsd disable + +This disables all configured rbldnsd instances from starting at boot time +(equivalent of chkconfig rbldnsd off). + + systemctl-rbldnsd start + +This starts all configured rbldnsd instances immediately +(equivalent of service rbldnsd start). + + systemctl-rbldnsd stop + +This stops all configured rbldnsd instances +(equivalent of service rbldnsd stop). + + systemctl-rbldnsd reload + +This reloads all configured rbldnsd instances +(equivalent of service rbldnsd reload). + + systemctl-rbldnsd restart + +This restarts all configured rbldnsd instances +(equivalent of service rbldnsd restart). + + systemctl-rbldnsd condrestart + systemctl-rbldnsd try-restart + +These restart all configured rbldnsd instances immediately, if they are +already running (equivalent of service rbldnsd condrestart). + + systemctl-rbldnsd 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 systemctl-rbldnsd 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, systemctl-rbldnsd will create a unit file + /etc/systemd/system/rbldnsd-single.service, i.e. the instance name will be + set to "single" + diff --git a/rbldnsd.conf b/rbldnsd.conf new file mode 100644 index 0000000..46a8c33 --- /dev/null +++ b/rbldnsd.conf @@ -0,0 +1,15 @@ +# This is boilerplate text for rbldnsd unit files, which can be +# created using "systemctl-rbldnsd 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 + + diff --git a/rbldnsd.spec b/rbldnsd.spec index d8d476f..805ab63 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,21 +1,38 @@ +# This package uses systemd init from Fedora 17, but can use it for +# Fedora 15/16 if built using --with systemd +%if 0%{?fedora} > 16 || 0%{?rhel} > 6 +%global _with_systemd --with-systemd +%endif +%global use_systemd %{!?_with_systemd:0}%{?_with_systemd:1} + # Build hardened (PIE) where possible %define _hardened_build 1 Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.996b -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd_%{version}.tar.gz Source1: rbldnsd.init +Source2: rbldnsd.conf +Source3: systemctl-rbldnsd +Source4: README.systemd BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildRequires: gawk, zlib-devel - Requires(pre): shadow-utils +%if %{use_systemd} +BuildRequires: systemd-units +Requires(pre): systemd-sysv, /sbin/chkconfig +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units +%else Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig +%endif %description Rbldnsd is a small, authoritative-only DNS nameserver designed to serve @@ -26,6 +43,7 @@ blocklists. %setup -q -n %{name}-%{version} 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} ./ %build # this is not an autotools-generated configure script, and does not support --libdir @@ -37,11 +55,16 @@ make %install rm -rf %{buildroot} mkdir -p %{buildroot}{%{_sbindir},%{_mandir}/man8,%{_initrddir},%{_sysconfdir}/sysconfig} -mkdir -p %{buildroot}%{_localstatedir}/lib/rbldnsd -install -m 755 rbldnsd %{buildroot}%{_sbindir} -install -m 644 rbldnsd.8 %{buildroot}%{_mandir}/man8 -install -m 644 debian/rbldnsd.default %{buildroot}%{_sysconfdir}/sysconfig/rbldnsd -install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/rbldnsd +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 systemctl-rbldnsd %{buildroot}%{_sbindir}/ +%else +install -p -m 755 rbldnsd.init %{buildroot}%{_initrddir}/rbldnsd +%endif %clean rm -rf %{buildroot} @@ -51,19 +74,49 @@ rm -rf %{buildroot} /usr/bin/getent passwd rbldns >/dev/null || \ /usr/sbin/useradd -r -g rbldns -d %{_localstatedir}/lib/rbldnsd \ -s /sbin/nologin -c "rbldns daemon" rbldns +%if %{use_systemd} +# SysV-to-systemd migration +if [ $1 -gt 1 -a ! -e /etc/systemd/rbldnsd.conf -a -e %{_initrddir}/rbldnsd ]; then + /usr/bin/systemd-sysv-convert --save rbldnsd &>/dev/null || : + /sbin/chkconfig --del rbldnsd &>/dev/null || : +fi +%endif exit 0 %post -/sbin/chkconfig --add rbldnsd || : +%if %{use_systemd} +/bin/systemctl daemon-reload &>/dev/null || : +%else +if [ $1 -eq 1 ]; then + # Initial installation + /sbin/chkconfig --add rbldnsd || : +fi +%endif %preun if [ $1 -eq 0 ]; then + # Package removal, not upgrade +%if %{use_systemd} + %{_sbindir}/systemctl-rbldnsd stop &>/dev/null || : + %{_sbindir}/systemctl-rbldnsd disable &>/dev/null || : +%else %{_initrddir}/rbldnsd stop &>/dev/null || : /sbin/chkconfig --del rbldnsd || : +%endif fi %postun -%{_initrddir}/rbldnsd condrestart &>/dev/null || : +%if %{use_systemd} +/bin/systemctl daemon-reload &>/dev/null || : +%endif +if [ $1 -ge 1 ]; then + # Package upgrade, not uninstall +%if %{use_systemd} + %{_sbindir}/systemctl-rbldnsd try-restart &>/dev/null || : +%else + %{_initrddir}/rbldnsd condrestart &>/dev/null || : +%endif +fi %files %defattr (-,root,root,-) @@ -72,9 +125,18 @@ fi %{_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}/systemctl-rbldnsd +%else %{_initrddir}/rbldnsd +%endif %changelog +* Tue Apr 17 2012 Paul Howarth 0.996b-7 +- use native systemd init from F-17 onwards (see README.systemd) + * Mon Apr 16 2012 Paul Howarth 0.996b-6 - fix some initscript issues (#807504) - do a hardened build (PIE) where possible diff --git a/systemctl-rbldnsd b/systemctl-rbldnsd new file mode 100644 index 0000000..a3fc118 --- /dev/null +++ b/systemctl-rbldnsd @@ -0,0 +1,175 @@ +#!/bin/bash +# +# systemctl-rbldnsd : 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: +# +# systemctl-rbldnsd create +# Creates unit files /etc/systemd/system/rbldnsd-.service +# for each configured rbldnsd instance +# +# systemctl-rbldnsd enable +# Enables (via systemctl) all configured rbldnsd instances to start +# at boot time +# +# systemctl-rbldnsd disable +# Disables (via systemctl) all configured rbldnsd instances from +# starting at boot time +# +# systemctl-rbldnsd start +# Starts (via systemctl) all configured rbldnsd instances immediately +# +# systemctl-rbldnsd stop +# Stop (via systemctl) all configured rbldnsd instances immediately +# +# systemctl-rbldnsd reload +# Reloads (via systemctl) all configured rbldnsd instances immediately +# +# systemctl-rbldnsd restart +# Restarts (via systemctl) all configured rbldnsd instances immediately +# +# systemctl-rbldnsd condrestart +# systemctl-rbldnsd try-restart +# Restarts (via systemctl) all configured rbldnsd instances immediately, +# if they are already running +# +# systemctl-rbldnsd 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 "systemctl-rbldnsd: 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 + echo "$RBLDNSD" | + 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 + set_status $ret +} + +start_one_daemon() { + /bin/systemctl start "rbldnsd-${name}.service" +} + +stop_one_daemon() { + /bin/systemctl stop "rbldnsd-${name}.service" +} + +reload_one_daemon() { + /bin/systemctl reload "rbldnsd-${name}.service" +} + +check_one_daemon() { + /bin/systemctl status "rbldnsd-${name}.service" +} + +restart_one_daemon() { + /bin/systemctl restart "rbldnsd-${name}.service" +} + +condrestart_one_daemon() { + /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 + echo "Created unit file /etc/systemd/system/rbldnsd-${name}.service" +} + +enable_one_daemon() { + /bin/systemctl enable "rbldnsd-${name}.service" +} + +disable_one_daemon() { + /bin/systemctl disable "rbldnsd-${name}.service" +} + +# See how we were called. +case "$1" in + create) + for_all_daemons create_one_daemon + RETVAL=$? + /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 From 2a1d2f67a491148bb4e124bfb040a36d7344b2fd Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Tue, 17 Apr 2012 23:59:16 +0100 Subject: [PATCH 28/71] Rename systemctl-rbldnsd to rbldnsctl (#807504) --- README.systemd | 34 +++++++++++++++++----------------- systemctl-rbldnsd => rbldnsctl | 24 ++++++++++++------------ rbldnsd.conf | 2 +- rbldnsd.spec | 17 ++++++++++------- 4 files changed, 40 insertions(+), 37 deletions(-) rename systemctl-rbldnsd => rbldnsctl (88%) mode change 100644 => 100755 diff --git a/README.systemd b/README.systemd index e56cef1..474f5f5 100644 --- a/README.systemd +++ b/README.systemd @@ -3,59 +3,59 @@ 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, systemctl-rbldnsd, 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. +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: - systemctl-rbldnsd create + rbldnsctl create This creates unit files /etc/systemd/system/rbldnsd-.service for each required instance. These units can then be manipulated individually using /bin/systemctl as usual, or all at once by using -other systemctl-rbldnsd commands: +other rbldnsctl commands: - systemctl-rbldnsd enable + rbldnsctl enable This enables all configured rbldnsd instances to start at boot time (equivalent of chkconfig rbldnsd on). - systemctl-rbldnsd disable + rbldnsctl disable This disables all configured rbldnsd instances from starting at boot time (equivalent of chkconfig rbldnsd off). - systemctl-rbldnsd start + rbldnsctl start This starts all configured rbldnsd instances immediately (equivalent of service rbldnsd start). - systemctl-rbldnsd stop + rbldnsctl stop This stops all configured rbldnsd instances (equivalent of service rbldnsd stop). - systemctl-rbldnsd reload + rbldnsctl reload This reloads all configured rbldnsd instances (equivalent of service rbldnsd reload). - systemctl-rbldnsd restart + rbldnsctl restart This restarts all configured rbldnsd instances (equivalent of service rbldnsd restart). - systemctl-rbldnsd condrestart - systemctl-rbldnsd try-restart + rbldnsctl condrestart + rbldnsctl try-restart These restart all configured rbldnsd instances immediately, if they are already running (equivalent of service rbldnsd condrestart). - systemctl-rbldnsd status + rbldnsctl status This shows status of all configured rbldnsd instances (equivalent of service rbldnsd status). @@ -64,13 +64,13 @@ 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 systemctl-rbldnsd start rbldnsd with the "-n" option to prevent + 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, systemctl-rbldnsd will create a unit file + 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" diff --git a/systemctl-rbldnsd b/rbldnsctl old mode 100644 new mode 100755 similarity index 88% rename from systemctl-rbldnsd rename to rbldnsctl index a3fc118..75b4808 --- a/systemctl-rbldnsd +++ b/rbldnsctl @@ -1,42 +1,42 @@ #!/bin/bash # -# systemctl-rbldnsd : helper script for managing rbldnsd instances with systemd +# 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: # -# systemctl-rbldnsd create +# rbldnsctl create # Creates unit files /etc/systemd/system/rbldnsd-.service # for each configured rbldnsd instance # -# systemctl-rbldnsd enable +# rbldnsctl enable # Enables (via systemctl) all configured rbldnsd instances to start # at boot time # -# systemctl-rbldnsd disable +# rbldnsctl disable # Disables (via systemctl) all configured rbldnsd instances from # starting at boot time # -# systemctl-rbldnsd start +# rbldnsctl start # Starts (via systemctl) all configured rbldnsd instances immediately # -# systemctl-rbldnsd stop +# rbldnsctl stop # Stop (via systemctl) all configured rbldnsd instances immediately # -# systemctl-rbldnsd reload +# rbldnsctl reload # Reloads (via systemctl) all configured rbldnsd instances immediately # -# systemctl-rbldnsd restart +# rbldnsctl restart # Restarts (via systemctl) all configured rbldnsd instances immediately # -# systemctl-rbldnsd condrestart -# systemctl-rbldnsd try-restart +# rbldnsctl condrestart +# rbldnsctl try-restart # Restarts (via systemctl) all configured rbldnsd instances immediately, # if they are already running # -# systemctl-rbldnsd status +# rbldnsctl status # Shows status of all configured rbldnsd instances # PATH=/sbin:/bin:/usr/bin:/usr/sbin @@ -46,7 +46,7 @@ PATH=/sbin:/bin:/usr/bin:/usr/sbin # Check that configuration has been set up (RBLDNSD set in /etc/sysconfig/rbldnsd) if [ -z "$RBLDNSD" ]; then - echo "systemctl-rbldnsd: RBLDNSD not configured in /etc/sysconfig/rbldnsd" >&2 + echo "rbldnsctl: RBLDNSD not configured in /etc/sysconfig/rbldnsd" >&2 exit 6 fi diff --git a/rbldnsd.conf b/rbldnsd.conf index 46a8c33..db62404 100644 --- a/rbldnsd.conf +++ b/rbldnsd.conf @@ -1,5 +1,5 @@ # This is boilerplate text for rbldnsd unit files, which can be -# created using "systemctl-rbldnsd create" based on the traditional +# created using "rbldnsctl create" based on the traditional # configuration variable RBLDNSD as defined in /etc/sysconfig/rbldnsd [Unit] diff --git a/rbldnsd.spec b/rbldnsd.spec index 805ab63..9653ca0 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,14 +11,14 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.996b -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd_%{version}.tar.gz Source1: rbldnsd.init Source2: rbldnsd.conf -Source3: systemctl-rbldnsd +Source3: rbldnsctl Source4: README.systemd BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildRequires: gawk, zlib-devel @@ -61,7 +61,7 @@ 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 systemctl-rbldnsd %{buildroot}%{_sbindir}/ +install -p -m 755 rbldnsctl %{buildroot}%{_sbindir}/ %else install -p -m 755 rbldnsd.init %{buildroot}%{_initrddir}/rbldnsd %endif @@ -97,8 +97,8 @@ fi if [ $1 -eq 0 ]; then # Package removal, not upgrade %if %{use_systemd} - %{_sbindir}/systemctl-rbldnsd stop &>/dev/null || : - %{_sbindir}/systemctl-rbldnsd disable &>/dev/null || : + %{_sbindir}/rbldnsctl stop &>/dev/null || : + %{_sbindir}/rbldnsctl disable &>/dev/null || : %else %{_initrddir}/rbldnsd stop &>/dev/null || : /sbin/chkconfig --del rbldnsd || : @@ -112,7 +112,7 @@ fi if [ $1 -ge 1 ]; then # Package upgrade, not uninstall %if %{use_systemd} - %{_sbindir}/systemctl-rbldnsd try-restart &>/dev/null || : + %{_sbindir}/rbldnsctl try-restart &>/dev/null || : %else %{_initrddir}/rbldnsd condrestart &>/dev/null || : %endif @@ -128,12 +128,15 @@ fi %if %{use_systemd} %doc README.systemd %config(noreplace) %{_sysconfdir}/systemd/rbldnsd.conf -%{_sbindir}/systemctl-rbldnsd +%{_sbindir}/rbldnsctl %else %{_initrddir}/rbldnsd %endif %changelog +* Tue Apr 17 2012 Paul Howarth 0.996b-8 +- rename systemctl-rbldnsd to rbldnsctl (#807504) + * Tue Apr 17 2012 Paul Howarth 0.996b-7 - use native systemd init from F-17 onwards (see README.systemd) From 91ea58476bf095d8a3e7527890818d821df45e8c Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Jul 2012 10:01:51 -0500 Subject: [PATCH 29/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 9653ca0..f485c20 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.996b -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -134,6 +134,9 @@ fi %endif %changelog +* Sat Jul 21 2012 Fedora Release Engineering - 0.996b-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Tue Apr 17 2012 Paul Howarth 0.996b-8 - rename systemctl-rbldnsd to rbldnsctl (#807504) From 02943808028cff4b201ef1609ab7e77a1593580c Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 15:27:06 -0600 Subject: [PATCH 30/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index f485c20..7f3bf95 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.996b -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -134,6 +134,9 @@ fi %endif %changelog +* Thu Feb 14 2013 Fedora Release Engineering - 0.996b-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Sat Jul 21 2012 Fedora Release Engineering - 0.996b-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 9ee6c8269a95e2d6a7ee26009d1e0c09e9fcb527 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Fri, 15 Feb 2013 08:55:50 +0000 Subject: [PATCH 31/71] Fix up some changelog entries --- rbldnsd.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 7f3bf95..b35f75d 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -134,11 +134,11 @@ fi %endif %changelog -* Thu Feb 14 2013 Fedora Release Engineering - 0.996b-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild +* Thu Feb 14 2013 Fedora Release Engineering 0.996b-10 +- rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild -* Sat Jul 21 2012 Fedora Release Engineering - 0.996b-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild +* Sat Jul 21 2012 Fedora Release Engineering 0.996b-9 +- rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Tue Apr 17 2012 Paul Howarth 0.996b-8 - rename systemctl-rbldnsd to rbldnsctl (#807504) From 13c152a99bff6ea38cca3226c07ee56232158811 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Sun, 30 Jun 2013 17:13:03 +0100 Subject: [PATCH 32/71] 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 --- .gitignore | 3 ++- rbldnsd.spec | 24 ++++++++++++++++++++---- sources | 2 +- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index fd51534..e0f56b8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -rbldnsd_0.996b.tar.gz +/rbldnsd_0.996b.tar.gz +/rbldnsd-0.997.tar.gz diff --git a/rbldnsd.spec b/rbldnsd.spec index b35f75d..51fae3f 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -10,12 +10,12 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd -Version: 0.996b -Release: 10%{?dist} +Version: 0.997 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html -Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd_%{version}.tar.gz +Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd-%{version}.tar.gz Source1: rbldnsd.init Source2: rbldnsd.conf Source3: rbldnsctl @@ -40,7 +40,7 @@ DNS-based blocklists (DNSBLs). It may handle IP-based and name-based blocklists. %prep -%setup -q -n %{name}-%{version} +%setup -q 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} ./ @@ -134,6 +134,22 @@ fi %endif %changelog +* Sun Jun 30 2013 Paul Howarth 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 0.996b-10 - rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild diff --git a/sources b/sources index 86e4896..63bd5fc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9a0f26f3b33764c325a96bd4c61b26fa rbldnsd_0.996b.tar.gz +86bd59ed0f329a9f17b8fb8ef382470d rbldnsd-0.997.tar.gz From 6a3c8f4126574a0bdf1034977fb903dde4cfccdb Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Mon, 29 Jul 2013 14:30:02 +0100 Subject: [PATCH 33/71] 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 --- .gitignore | 2 +- rbldnsd.spec | 7 ++++++- sources | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e0f56b8..fbe89f2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ /rbldnsd_0.996b.tar.gz -/rbldnsd-0.997.tar.gz +/rbldnsd-0.997a.tar.gz diff --git a/rbldnsd.spec b/rbldnsd.spec index 51fae3f..7b50f77 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -10,7 +10,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd -Version: 0.997 +Version: 0.997a Release: 1%{?dist} License: GPLv2+ Group: System Environment/Daemons @@ -134,6 +134,11 @@ fi %endif %changelog +* Mon Jul 29 2013 Paul Howarth 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 0.997-1 - update to 0.997 - main feature of this version is ipv6 support diff --git a/sources b/sources index 63bd5fc..56e9b38 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -86bd59ed0f329a9f17b8fb8ef382470d rbldnsd-0.997.tar.gz +6d53caa511e003ff31391c6e6a63d2b0 rbldnsd-0.997a.tar.gz From 81b9c7c2e472ad12a866877f3d9f46b98a2346fe Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Thu, 21 Nov 2013 11:45:27 +0000 Subject: [PATCH 34/71] Use format string in dslog() invocation --- rbldnsd-0.997a-format.patch | 13 +++++++++++++ rbldnsd.spec | 10 +++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 rbldnsd-0.997a-format.patch diff --git a/rbldnsd-0.997a-format.patch b/rbldnsd-0.997a-format.patch new file mode 100644 index 0000000..ac6be0a --- /dev/null +++ b/rbldnsd-0.997a-format.patch @@ -0,0 +1,13 @@ +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(); + diff --git a/rbldnsd.spec b/rbldnsd.spec index 7b50f77..3392d2a 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.997a -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -20,6 +20,7 @@ Source1: rbldnsd.init Source2: rbldnsd.conf Source3: rbldnsctl Source4: README.systemd +Patch0: rbldnsd-0.997a-format.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildRequires: gawk, zlib-devel Requires(pre): shadow-utils @@ -41,6 +42,10 @@ blocklists. %prep %setup -q + +# Use format string in dslog() invocation +%patch0 + 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} ./ @@ -134,6 +139,9 @@ fi %endif %changelog +* Thu Nov 21 2013 Paul Howarth 0.997a-2 +- use format string in dslog() invocation + * Mon Jul 29 2013 Paul Howarth 0.997a-1 - update to 0.997a - minor fixes/changes in packaging, no code changes From 6f01fb48e9a295c2752ae7c9f9d61f41e2b3f0fe Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 20:59:59 -0500 Subject: [PATCH 35/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 3392d2a..93150f1 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.997a -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -139,6 +139,9 @@ fi %endif %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 0.997a-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Thu Nov 21 2013 Paul Howarth 0.997a-2 - use format string in dslog() invocation From 0e27bd1dd5ca61bcd0eb699a146dcbc1d70cbcc8 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Thu, 10 Jul 2014 12:00:02 +0100 Subject: [PATCH 36/71] 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 --- rbldnsctl | 39 ++++++++++++++++++----------------- rbldnsd.init | 57 ++++++++++++++++++++++++++-------------------------- rbldnsd.spec | 12 +++++++---- 3 files changed, 55 insertions(+), 53 deletions(-) diff --git a/rbldnsctl b/rbldnsctl index 75b4808..cc9e181 100755 --- a/rbldnsctl +++ b/rbldnsctl @@ -58,27 +58,26 @@ set_status() { # Process multiple instances of the daemon (see /etc/sysconfig/rbldnsd) for_all_daemons() { ret=0 - echo "$RBLDNSD" | - 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 + 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 - done + else + if [ $thisret -ne 0 ]; then + ret=1 + fi + fi + done < <(echo "$RBLDNSD") set_status $ret } diff --git a/rbldnsd.init b/rbldnsd.init index cb333a8..be76ad4 100644 --- a/rbldnsd.init +++ b/rbldnsd.init @@ -45,37 +45,36 @@ set_status() { # Process multiple instances of the daemon (see /etc/sysconfig/rbldnsd) for_all_daemons() { ret=0 - echo "$RBLDNSD" | - 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 + 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 - # 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 + # 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 - done + else + if [ $thisret -ne 0 ]; then + ret=1 + fi + fi + done < <(echo "$RBLDNSD") set_status $ret } diff --git a/rbldnsd.spec b/rbldnsd.spec index 93150f1..566976b 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.997a -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -124,7 +124,6 @@ if [ $1 -ge 1 ]; then fi %files -%defattr (-,root,root,-) %doc README.user NEWS TODO debian/changelog CHANGES-0.81 %{_sbindir}/rbldnsd %{_mandir}/man8/rbldnsd.8* @@ -139,8 +138,13 @@ fi %endif %changelog -* Sun Jun 08 2014 Fedora Release Engineering - 0.997a-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild +* Thu Jul 10 2014 Paul Howarth 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 0.997a-3 +- rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Thu Nov 21 2013 Paul Howarth 0.997a-2 - use format string in dslog() invocation From bc7f775579d3959da42932d06de557eaa6faea2f Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 17 Aug 2014 23:34:46 +0000 Subject: [PATCH 37/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 566976b..51db027 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.997a -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -138,6 +138,9 @@ fi %endif %changelog +* Sun Aug 17 2014 Fedora Release Engineering - 0.997a-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Thu Jul 10 2014 Paul Howarth 0.997a-4 - fix return value from initscript, by using process substitution instead of a while loop at the end of a pipe (#1118013) From a0c2fb9c7f23be50dd958480f98dc0bc8333681e Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 18 Jun 2015 22:08:22 +0000 Subject: [PATCH 38/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 51db027..5f046a5 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.997a -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -138,6 +138,9 @@ fi %endif %changelog +* Thu Jun 18 2015 Fedora Release Engineering - 0.997a-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Sun Aug 17 2014 Fedora Release Engineering - 0.997a-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 16e818ccccce97d5bbc704e7bf5976ed12e19f5d Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Fri, 1 Jan 2016 13:04:15 +0000 Subject: [PATCH 39/71] 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 --- .gitignore | 1 + rbldnsd.spec | 19 ++++++++++++++++--- sources | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index fbe89f2..5450b0c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /rbldnsd_0.996b.tar.gz /rbldnsd-0.997a.tar.gz +/rbldnsd-0.998.tar.gz diff --git a/rbldnsd.spec b/rbldnsd.spec index 5f046a5..62b967f 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -10,8 +10,8 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd -Version: 0.997a -Release: 6%{?dist} +Version: 0.998 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -22,7 +22,12 @@ Source3: rbldnsctl Source4: README.systemd Patch0: rbldnsd-0.997a-format.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) -BuildRequires: gawk, zlib-devel +BuildRequires: coreutils +BuildRequires: gawk +BuildRequires: gcc +BuildRequires: make +BuildRequires: sed +BuildRequires: zlib-devel Requires(pre): shadow-utils %if %{use_systemd} BuildRequires: systemd-units @@ -138,6 +143,14 @@ fi %endif %changelog +* Fri Jan 1 2016 Paul Howarth - 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 - 0.997a-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 56e9b38..5b27a41 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6d53caa511e003ff31391c6e6a63d2b0 rbldnsd-0.997a.tar.gz +8311898ba91bf9fc97d836dfb5fd3b6e rbldnsd-0.998.tar.gz From 708a9328e1d3a158cc84f3c0a72ec7d871715888 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 4 Feb 2016 22:00:06 +0000 Subject: [PATCH 40/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 62b967f..af3b1b7 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -143,6 +143,9 @@ fi %endif %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 0.998-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Fri Jan 1 2016 Paul Howarth - 0.998-1 - Update to 0.998 - Correctly handle V4MAPPED (v4 in v6) addresses; the original v6 prefix was From daa6c47308694dd4082ffc038c6e107c84f8214d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 11:34:16 +0000 Subject: [PATCH 41/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index af3b1b7..8c5f91a 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -143,6 +143,9 @@ fi %endif %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 0.998-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Thu Feb 04 2016 Fedora Release Engineering - 0.998-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 1ab629bb982c2ccb368caf56e074d38b033bce2b Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Sat, 6 Feb 2016 19:08:49 +0000 Subject: [PATCH 42/71] Prefer %global over %define --- rbldnsd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 8c5f91a..97e3538 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -6,7 +6,7 @@ %global use_systemd %{!?_with_systemd:0}%{?_with_systemd:1} # Build hardened (PIE) where possible -%define _hardened_build 1 +%global _hardened_build 1 Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd From 70d156313d11dbb40bb375490b5b1217ac686a6a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 12:58:26 +0000 Subject: [PATCH 43/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 97e3538..8454f07 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -143,6 +143,9 @@ fi %endif %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 0.998-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Sat Feb 11 2017 Fedora Release Engineering - 0.998-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 46272c39e2ff6dab86298fad618d9601af7c9f50 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 07:34:44 +0000 Subject: [PATCH 44/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 8454f07..f43c5de 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html @@ -143,6 +143,9 @@ fi %endif %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 0.998-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 0.998-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 42152ecf72c93fbf3e55a3345c068e584db39fa5 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Wed, 31 Jan 2018 15:12:02 +0000 Subject: [PATCH 45/71] 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 --- rbldnsd.spec | 70 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 25 deletions(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index f43c5de..67845b1 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,19 +1,34 @@ # This package uses systemd init from Fedora 17, but can use it for # Fedora 15/16 if built using --with systemd -%if 0%{?fedora} > 16 || 0%{?rhel} > 6 +%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 +%else +%global systemd_units systemd +%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} +%else +%global preset_support 1 +%global sysv_to_systemd 0 +%endif + # Build hardened (PIE) where possible %global _hardened_build 1 Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ -Group: System Environment/Daemons URL: http://www.corpit.ru/mjt/rbldnsd.html Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd-%{version}.tar.gz Source1: rbldnsd.init @@ -21,7 +36,6 @@ Source2: rbldnsd.conf Source3: rbldnsctl Source4: README.systemd Patch0: rbldnsd-0.997a-format.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildRequires: coreutils BuildRequires: gawk BuildRequires: gcc @@ -29,15 +43,17 @@ BuildRequires: make BuildRequires: sed BuildRequires: zlib-devel Requires(pre): shadow-utils +%if %{sysv_to_systemd} +Requires(pre): chkconfig, systemd-sysv +%endif %if %{use_systemd} -BuildRequires: systemd-units -Requires(pre): systemd-sysv, /sbin/chkconfig -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units +BuildRequires: %{systemd_units} +Requires(post): %{systemd_units} +Requires(preun): %{systemd_units} +Requires(postun): %{systemd_units} %else -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/chkconfig +Requires(post): chkconfig +Requires(preun): chkconfig %endif %description @@ -63,7 +79,6 @@ LDFLAGS="%{?__global_ldflags}" \ make %install -rm -rf %{buildroot} mkdir -p %{buildroot}{%{_sbindir},%{_mandir}/man8,%{_initrddir},%{_sysconfdir}/sysconfig} mkdir -p %{buildroot}{/etc/systemd,%{_localstatedir}/lib/rbldnsd} install -p -m 755 rbldnsd %{buildroot}%{_sbindir}/ @@ -76,30 +91,27 @@ install -p -m 755 rbldnsctl %{buildroot}%{_sbindir}/ install -p -m 755 rbldnsd.init %{buildroot}%{_initrddir}/rbldnsd %endif -%clean -rm -rf %{buildroot} - %pre -/usr/bin/getent group rbldns >/dev/null || /usr/sbin/groupadd -r rbldns -/usr/bin/getent passwd rbldns >/dev/null || \ - /usr/sbin/useradd -r -g rbldns -d %{_localstatedir}/lib/rbldnsd \ +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 %{use_systemd} +%if %{sysv_to_systemd} # SysV-to-systemd migration if [ $1 -gt 1 -a ! -e /etc/systemd/rbldnsd.conf -a -e %{_initrddir}/rbldnsd ]; then - /usr/bin/systemd-sysv-convert --save rbldnsd &>/dev/null || : - /sbin/chkconfig --del rbldnsd &>/dev/null || : + systemd-sysv-convert --save rbldnsd &>/dev/null || : + chkconfig --del rbldnsd &>/dev/null || : fi %endif exit 0 %post %if %{use_systemd} -/bin/systemctl daemon-reload &>/dev/null || : +systemctl daemon-reload &>/dev/null || : %else if [ $1 -eq 1 ]; then # Initial installation - /sbin/chkconfig --add rbldnsd || : + chkconfig --add rbldnsd || : fi %endif @@ -111,13 +123,13 @@ if [ $1 -eq 0 ]; then %{_sbindir}/rbldnsctl disable &>/dev/null || : %else %{_initrddir}/rbldnsd stop &>/dev/null || : - /sbin/chkconfig --del rbldnsd || : + chkconfig --del rbldnsd || : %endif fi %postun %if %{use_systemd} -/bin/systemctl daemon-reload &>/dev/null || : +systemctl daemon-reload &>/dev/null || : %endif if [ $1 -ge 1 ]; then # Package upgrade, not uninstall @@ -143,6 +155,14 @@ fi %endif %changelog +* Mon Jan 29 2018 Paul Howarth - 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 - 0.998-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 0169f3fab1e8800ad930a2ad15fe8e100223845b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 12:49:11 +0000 Subject: [PATCH 46/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 67845b1..6d0a7d9 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -27,7 +27,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ URL: http://www.corpit.ru/mjt/rbldnsd.html Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd-%{version}.tar.gz @@ -155,6 +155,9 @@ fi %endif %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 0.998-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Mon Jan 29 2018 Paul Howarth - 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 From 85ca1bb68b7e477bffb19331b532c380ee0f73fb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 03:24:41 +0000 Subject: [PATCH 47/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 6d0a7d9..11e3d25 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -27,7 +27,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2+ URL: http://www.corpit.ru/mjt/rbldnsd.html Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd-%{version}.tar.gz @@ -155,6 +155,9 @@ fi %endif %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 0.998-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Fri Feb 09 2018 Fedora Release Engineering - 0.998-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From e1c84b15d850d7423d8752cad9fd0a9fc697133a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 2 Feb 2019 11:08:09 +0000 Subject: [PATCH 48/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 11e3d25..f59b50d 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -27,7 +27,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2+ URL: http://www.corpit.ru/mjt/rbldnsd.html Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd-%{version}.tar.gz @@ -155,6 +155,9 @@ fi %endif %changelog +* Sat Feb 02 2019 Fedora Release Engineering - 0.998-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Sat Jul 14 2018 Fedora Release Engineering - 0.998-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 91f5bc6c5476c0d556475f917b2312b5ee12ae0d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jul 2019 18:16:47 +0000 Subject: [PATCH 49/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index f59b50d..b27944b 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -27,7 +27,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2+ URL: http://www.corpit.ru/mjt/rbldnsd.html Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd-%{version}.tar.gz @@ -155,6 +155,9 @@ fi %endif %changelog +* Fri Jul 26 2019 Fedora Release Engineering - 0.998-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sat Feb 02 2019 Fedora Release Engineering - 0.998-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 73b079c03028c8f0a68b405d3fc07b03655f72a4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 30 Jan 2020 17:22:14 +0000 Subject: [PATCH 50/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index b27944b..f3d0b46 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -27,7 +27,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2+ URL: http://www.corpit.ru/mjt/rbldnsd.html Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd-%{version}.tar.gz @@ -155,6 +155,9 @@ fi %endif %changelog +* Thu Jan 30 2020 Fedora Release Engineering - 0.998-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Fri Jul 26 2019 Fedora Release Engineering - 0.998-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 48a62b996f0945d64fcc6ad4e0ea789bbe809d18 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Tue, 5 May 2020 16:12:40 +0100 Subject: [PATCH 51/71] 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 --- .gitignore | 1 + rbldnsd-0.997a-format.patch | 13 ------------ rbldnsd.rpmlintrc | 14 +++++++++++++ rbldnsd.spec | 41 ++++++++++++++++++++++--------------- sources | 2 +- 5 files changed, 41 insertions(+), 30 deletions(-) delete mode 100644 rbldnsd-0.997a-format.patch create mode 100644 rbldnsd.rpmlintrc diff --git a/.gitignore b/.gitignore index 5450b0c..effec28 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /rbldnsd_0.996b.tar.gz /rbldnsd-0.997a.tar.gz /rbldnsd-0.998.tar.gz +/rbldnsd-0.998b.tgz diff --git a/rbldnsd-0.997a-format.patch b/rbldnsd-0.997a-format.patch deleted file mode 100644 index ac6be0a..0000000 --- a/rbldnsd-0.997a-format.patch +++ /dev/null @@ -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(); - diff --git a/rbldnsd.rpmlintrc b/rbldnsd.rpmlintrc new file mode 100644 index 0000000..edbeda2 --- /dev/null +++ b/rbldnsd.rpmlintrc @@ -0,0 +1,14 @@ +from Config import * + +# Technical terms +addFilter("spelling-error %description -l en_US (blocklists|nameserver) -> ") + +# 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") + diff --git a/rbldnsd.spec b/rbldnsd.spec index f3d0b46..fdce434 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -26,16 +26,15 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd -Version: 0.998 -Release: 11%{?dist} +Version: 0.998b +Release: 1%{?dist} License: GPLv2+ -URL: http://www.corpit.ru/mjt/rbldnsd.html -Source0: http://www.corpit.ru/mjt/rbldnsd/rbldnsd-%{version}.tar.gz +URL: https://rbldnsd.io/ +Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz Source1: rbldnsd.init Source2: rbldnsd.conf Source3: rbldnsctl Source4: README.systemd -Patch0: rbldnsd-0.997a-format.patch BuildRequires: coreutils BuildRequires: gawk BuildRequires: gcc @@ -64,11 +63,8 @@ blocklists. %prep %setup -q -# Use format string in dslog() invocation -%patch0 - 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 + -e 's@\(-r/[a-z/]*\) -b@\1 -q -b@g' contrib/debian/rbldnsd.default cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} ./ %build @@ -81,14 +77,14 @@ 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 +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 %if %{use_systemd} -install -p -m 644 rbldnsd.conf %{buildroot}/etc/systemd/ -install -p -m 755 rbldnsctl %{buildroot}%{_sbindir}/ +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.init %{buildroot}%{_initrddir}/rbldnsd %endif %pre @@ -141,7 +137,12 @@ if [ $1 -ge 1 ]; then fi %files -%doc README.user NEWS TODO debian/changelog CHANGES-0.81 +%if 0%{?_licensedir:1} +%license LICENSE.txt +%else +%doc LICENSE.txt +%endif +%doc CHANGES-0.81 NEWS README README.user TODO contrib/debian/changelog %{_sbindir}/rbldnsd %{_mandir}/man8/rbldnsd.8* %dir %{_localstatedir}/lib/rbldnsd/ @@ -155,6 +156,14 @@ fi %endif %changelog +* Tue May 5 2020 Paul Howarth - 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 - 0.998-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index 5b27a41..e8638f2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8311898ba91bf9fc97d836dfb5fd3b6e rbldnsd-0.998.tar.gz +SHA512 (rbldnsd-0.998b.tgz) = 8efa1e324475c29baeeb1e64c433d4e28516b01ff871a620938fb72d7ad8bdfa23e541b9546081bdda12622178da2f4d32cec6cb83466b05ee9076f67e31d8fe From 69255fc7f08b42b3dc9fcd2a112ae1c0db5bc3c5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 05:32:20 +0000 Subject: [PATCH 52/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index fdce434..7e7c58b 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -27,7 +27,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://rbldnsd.io/ Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz @@ -156,6 +156,9 @@ fi %endif %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 0.998b-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Tue May 5 2020 Paul Howarth - 0.998b-1 - Update to 0.998b - Minor fixes in copyright and documentation From ba498666f298c1a8891f75cb18e965d93111410d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 15:05:35 +0000 Subject: [PATCH 53/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index 7e7c58b..3ec3edb 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -27,7 +27,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://rbldnsd.io/ Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz @@ -156,6 +156,9 @@ fi %endif %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 0.998b-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 0.998b-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 35ec7889a1a2d756d1bae21be76936ff75735086 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Wed, 27 Jan 2021 17:18:16 +0000 Subject: [PATCH 54/71] Drop EL-6 support - Always assume systemd init - Drop support for sysv-to-systemd migration - Use %license unconditionally - Use %{?systemd_requires} --- rbldnsd.init | 198 --------------------------------------------------- rbldnsd.spec | 87 ++++------------------ 2 files changed, 15 insertions(+), 270 deletions(-) delete mode 100644 rbldnsd.init diff --git a/rbldnsd.init b/rbldnsd.init deleted file mode 100644 index be76ad4..0000000 --- a/rbldnsd.init +++ /dev/null @@ -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 diff --git a/rbldnsd.spec b/rbldnsd.spec index 3ec3edb..ef57841 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -1,24 +1,8 @@ -# 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} +%global systemd_rpm_macros systemd %else -%global systemd_units systemd -%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} -%else -%global preset_support 1 -%global sysv_to_systemd 0 +%global systemd_rpm_macros systemd-rpm-macros %endif # Build hardened (PIE) where possible @@ -27,11 +11,10 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://rbldnsd.io/ Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz -Source1: rbldnsd.init Source2: rbldnsd.conf Source3: rbldnsctl Source4: README.systemd @@ -40,20 +23,10 @@ BuildRequires: gawk BuildRequires: gcc BuildRequires: make BuildRequires: sed +BuildRequires: %{systemd_rpm_macros} BuildRequires: zlib-devel 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 +%{?systemd_requires} %description Rbldnsd is a small, authoritative-only DNS nameserver designed to serve @@ -65,7 +38,7 @@ blocklists. 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 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} ./ +cp -p %{SOURCE2} %{SOURCE3} %{SOURCE4} ./ %build # this is not an autotools-generated configure script, and does not support --libdir @@ -80,82 +53,52 @@ 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 -%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 -%endif %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 %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 -%if 0%{?_licensedir:1} %license LICENSE.txt -%else -%doc LICENSE.txt -%endif %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 -%endif %changelog +* Wed Jan 27 2021 Paul Howarth - 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 - 0.998b-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From a5f75df8f072a6f278821b03031f1248769cbf5d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 11:13:00 +0000 Subject: [PATCH 55/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index ef57841..f0aecd1 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: https://rbldnsd.io/ Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz @@ -92,6 +92,9 @@ fi %{_sbindir}/rbldnsctl %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 0.998b-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Wed Jan 27 2021 Paul Howarth - 0.998b-4 - Drop EL-6 support - Always assume systemd init From 06f019e13e64eccbf33f30f4588bd8614cc51eb3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 17:34:27 +0000 Subject: [PATCH 56/71] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index f0aecd1..c6f7b9b 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ URL: https://rbldnsd.io/ Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz @@ -92,6 +92,9 @@ fi %{_sbindir}/rbldnsctl %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 0.998b-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 0.998b-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 3ec8c179b72ec60242bc40bd6322f40fae6730c2 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Mon, 31 Jan 2022 16:51:07 -0800 Subject: [PATCH 57/71] epel8-playground decommissioned : https://pagure.io/epel/issue/136 --- .cvsignore | 0 Makefile | 21 --------------------- dead.package | 1 + sources | 0 4 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 .cvsignore delete mode 100644 Makefile create mode 100644 dead.package delete mode 100644 sources diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/Makefile b/Makefile deleted file mode 100644 index f509fa6..0000000 --- a/Makefile +++ /dev/null @@ -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) diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..a72aec0 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +epel8-playground decommissioned : https://pagure.io/epel/issue/136 diff --git a/sources b/sources deleted file mode 100644 index e69de29..0000000 From cc189db86b4c49da79ba377630af0d71506ee858 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 00:32:54 +0000 Subject: [PATCH 58/71] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index c6f7b9b..e779d94 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ URL: https://rbldnsd.io/ Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz @@ -92,6 +92,9 @@ fi %{_sbindir}/rbldnsctl %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 0.998b-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Fri Jan 21 2022 Fedora Release Engineering - 0.998b-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From e271ece52c74d1129ebe4ef0e1e8806a92cd8bfa Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 19:30:47 +0000 Subject: [PATCH 59/71] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index e779d94..84bd3a6 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2+ URL: https://rbldnsd.io/ Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz @@ -92,6 +92,9 @@ fi %{_sbindir}/rbldnsctl %changelog +* Fri Jan 20 2023 Fedora Release Engineering - 0.998b-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Jul 23 2022 Fedora Release Engineering - 0.998b-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 329471ee22c72c134d7638706d82bdb25c5146fc Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 30 Jan 2023 16:00:12 +0100 Subject: [PATCH 60/71] Port non-autoconf configure script to C99 Related to: --- rbldnsd-configure-c99.patch | 20 ++++++++++++++++++++ rbldnsd.spec | 8 ++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 rbldnsd-configure-c99.patch diff --git a/rbldnsd-configure-c99.patch b/rbldnsd-configure-c99.patch new file mode 100644 index 0000000..3eb7970 --- /dev/null +++ b/rbldnsd-configure-c99.patch @@ -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: + + + +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" < - 0.998b-9 +- Port non-autoconf configure script to C99 + * Fri Jan 20 2023 Fedora Release Engineering - 0.998b-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 979e1c4e3106f081e5fb277864c98e4635cbcd97 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Mon, 30 Jan 2023 16:20:29 +0000 Subject: [PATCH 61/71] Use SPDX-format license tag --- rbldnsd.rpmlintrc | 5 ----- rbldnsd.spec | 14 ++++++++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/rbldnsd.rpmlintrc b/rbldnsd.rpmlintrc index edbeda2..545ed93 100644 --- a/rbldnsd.rpmlintrc +++ b/rbldnsd.rpmlintrc @@ -1,8 +1,3 @@ -from Config import * - -# Technical terms -addFilter("spelling-error %description -l en_US (blocklists|nameserver) -> ") - # Configure script is not from autotools addFilter("configure-without-libdir-spec") diff --git a/rbldnsd.spec b/rbldnsd.spec index 9da8144..eedf7b3 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,14 +11,14 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 9%{?dist} -License: GPLv2+ +Release: 10%{?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 +Patch0: rbldnsd-configure-c99.patch BuildRequires: coreutils BuildRequires: gawk BuildRequires: gcc @@ -35,7 +35,10 @@ DNS-based blocklists (DNSBLs). It may handle IP-based and name-based blocklists. %prep -%autosetup -p1 +%setup -q + +# Port non-autoconf configure script to C99 +%patch0 -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 @@ -93,6 +96,9 @@ fi %{_sbindir}/rbldnsctl %changelog +* Mon Jan 30 2023 Paul Howarth - 0.998b-10 +- Use SPDX-format license tag + * Mon Jan 30 2023 Florian Weimer - 0.998b-9 - Port non-autoconf configure script to C99 From ae308e0e918707a821c42cff247cfc4b13f62cd7 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Fri, 23 Jun 2023 11:24:19 +0100 Subject: [PATCH 62/71] Avoid use of systemd ".include" directive (rhbz#2216790) Additionally: - Avoid use of deprecated patch syntax - Fix version number reported by rbldnsd --- rbldnsctl | 37 ++++++++++++++++++------------------ rbldnsd-0.998b-version.patch | 16 ++++++++++++++++ rbldnsd.spec | 14 ++++++++++++-- 3 files changed, 47 insertions(+), 20 deletions(-) create mode 100644 rbldnsd-0.998b-version.patch diff --git a/rbldnsctl b/rbldnsctl index cc9e181..f5bb1b9 100755 --- a/rbldnsctl +++ b/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 diff --git a/rbldnsd-0.998b-version.patch b/rbldnsd-0.998b-version.patch new file mode 100644 index 0000000..a193fd9 --- /dev/null +++ b/rbldnsd-0.998b-version.patch @@ -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 + diff --git a/rbldnsd.spec b/rbldnsd.spec index eedf7b3..dd3573b 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 10%{?dist} +Release: 11%{?dist} License: GPL-2.0-or-later URL: https://rbldnsd.io/ Source0: https://rbldnsd.io/dwl/rbldnsd-%{version}.tgz @@ -19,6 +19,7 @@ Source2: rbldnsd.conf Source3: rbldnsctl Source4: README.systemd Patch0: rbldnsd-configure-c99.patch +Patch1: rbldnsd-0.998b-version.patch BuildRequires: coreutils BuildRequires: gawk BuildRequires: gcc @@ -27,6 +28,7 @@ BuildRequires: sed BuildRequires: %{systemd_rpm_macros} BuildRequires: zlib-devel Requires(pre): shadow-utils +Requires: gawk %{?systemd_requires} %description @@ -38,7 +40,10 @@ blocklists. %setup -q # Port non-autoconf configure script to C99 -%patch0 -p1 +%patch -P 0 -p1 + +# Fix version number reported by rbldnsd +%patch -P 1 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 @@ -96,6 +101,11 @@ fi %{_sbindir}/rbldnsctl %changelog +* Fri Jun 23 2023 Paul Howarth - 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 - 0.998b-10 - Use SPDX-format license tag From b453477b2f8e962519b99025dc32acbf15a5fc9d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 16:35:10 +0000 Subject: [PATCH 63/71] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rbldnsd.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rbldnsd.spec b/rbldnsd.spec index dd3573b..264b6fb 100644 --- a/rbldnsd.spec +++ b/rbldnsd.spec @@ -11,7 +11,7 @@ Summary: Small, fast daemon to serve DNSBLs Name: rbldnsd Version: 0.998b -Release: 11%{?dist} +Release: 12%{?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 21 2023 Fedora Release Engineering - 0.998b-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Fri Jun 23 2023 Paul Howarth - 0.998b-11 - Avoid use of systemd ".include" directive (rhbz#2216790) - Avoid use of deprecated patch syntax From 3704bf0c5a76ec7b989f5a7f2ff6bf5f8f627e04 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 22 Jan 2024 10:54:45 +0000 Subject: [PATCH 64/71] 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 65/71] 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 66/71] 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 67/71] 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 68/71] 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 69/71] 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 70/71] 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 71/71] 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