Sophie

Sophie

distrib > Fedora > 16 > x86_64 > media > updates-src > by-pkgid > 83385438d77d8b2ae1928d72df8e92a3 > files > 2

rbldnsd-0.996b-6.fc16.src.rpm

# Build hardened (PIE) where possible
%define _hardened_build 1

Summary:	Small, fast daemon to serve DNSBLs
Name:		rbldnsd
Version:	0.996b
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
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildRequires:	gawk, zlib-devel

Requires(pre):	shadow-utils
Requires(post):	/sbin/chkconfig
Requires(preun): /sbin/chkconfig

%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}
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}" \
LDFLAGS="%{?__global_ldflags}" \
./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
/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
	%{_initrddir}/rbldnsd stop &>/dev/null || :
	/sbin/chkconfig --del rbldnsd || :
fi

%postun
%{_initrddir}/rbldnsd condrestart &>/dev/null || :

%files
%defattr (-,root,root,-)
%doc README.user NEWS TODO debian/changelog CHANGES-0.81
%{_sbindir}/rbldnsd
%{_mandir}/man8/rbldnsd.8*
%dir %{_localstatedir}/lib/rbldnsd/
%config(noreplace) %{_sysconfdir}/sysconfig/rbldnsd
%{_initrddir}/rbldnsd

%changelog
* Mon Apr 16 2012 Paul Howarth <paul@city-fan.org> 0.996b-6
- fix some initscript issues (#807504)
- do a hardened build (PIE) where possible

* Thu Jan  5 2012 Paul Howarth <paul@city-fan.org> 0.996b-5
- nobody else likes macros for commands

* Wed Feb  9 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.996b-4
- rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.996b-3
- rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.996b-2
- rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Mar 31 2008 Paul Howarth <paul@city-fan.org> 0.996b-1
- update to 0.996b
- _GNU_SOURCE no longer needed

* Wed Feb 20 2008 Paul Howarth <paul@city-fan.org> 0.996a-6
- fix exit codes for reload, stop, and try-restart actions of initscript

* Wed Feb 13 2008 Paul Howarth <paul@city-fan.org> 0.996a-5
- define _GNU_SOURCE for NI_MAXHOST symbol visibility
- LSB-ize initscript (#247043)

* Thu Aug 23 2007 Paul Howarth <paul@city-fan.org> 0.996a-4
- add buildreq gawk

* Thu Aug 23 2007 Paul Howarth <paul@city-fan.org> 0.996a-3
- upstream released a new version without changing the version number (the
  only changes are in debian/control and debian/changelog, neither of which
  are used in the RPM package)
- unexpand tabs in spec
- use the standard scriptlet for user/group creation in %%pre
- drop scriptlet dependencies on /sbin/service by calling initscript directly
- clarify license as GPL version 2 or later

* Wed Aug 30 2006 Paul Howarth <paul@city-fan.org> 0.996a-2
- FE6 mass rebuild

* Fri Jul 28 2006 Paul Howarth <paul@city-fan.org> 0.996a-1
- update to 0.996a

* Tue Feb 21 2006 Paul Howarth <paul@city-fan.org> 0.996-1
- update to 0.996
- use /usr/sbin/useradd instead of %%{_sbindir}/useradd
- add buildreq zlib-devel to support gzipped zone files

* Wed Feb 15 2006 Paul Howarth <paul@city-fan.org> 0.995-5
- license text not included in upstream tarball, so don't include it

* Tue Jun 28 2005 Paul Howarth <paul@city-fan.org> 0.995-4
- include gpl.txt as %%doc

* Mon Jun 27 2005 Paul Howarth <paul@city-fan.org> 0.995-3
- fix /etc/sysconfig/rbldnsd references to /var/lib/rbldns to point to
  %%{_localstatedir}/lib/rbldnsd instead
- don't enable daemons in any runlevel by default
- add -q option to sample entries in /etc/sysconfig/rbldnsd

* Fri Jun 17 2005 Paul Howarth <paul@city-fan.org> 0.995-2
- first Fedora Extras build, largely based on upstream spec file