Patrick Uiterwijk a3df9ca
%global prever rc1
14d52d4
Summary: DNSSEC key and zone management software
14d52d4
Name: opendnssec
14d52d4
Version: 1.4.0
Patrick Uiterwijk a3df9ca
Release: 0.6.%{?prever}%{?dist}
14d52d4
License: BSD
14d52d4
Url: http://www.opendnssec.org/
4ef9234
Source0: http://www.opendnssec.org/files/source/%{?prever:testing/}%{name}-%{version}%{?prever}.tar.gz
14d52d4
Source1: ods-enforcerd.service
14d52d4
Source2: ods-signerd.service
14d52d4
Source3: ods.sysconfig
14d52d4
Source4: conf.xml
14d52d4
Source5: tmpfiles-opendnssec.conf
Paul Wouters ab9e58c
Source6: opendnssec.cron
Patrick Uiterwijk a3df9ca
Patch1:   opendnssec-ksk-premature-retirement.patch
14d52d4
Group: Applications/System
14d52d4
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
14d52d4
Requires: opencryptoki, softhsm, systemd-units
14d52d4
BuildRequires: ldns-devel >= 1.6.12, sqlite-devel , openssl-devel
14d52d4
BuildRequires: libxml2-devel CUnit-devel, doxygen
5841628
# It tests for pkill/killall and would use /bin/false if not found
5841628
BuildRequires: procps-ng
5841628
14d52d4
Requires(pre): shadow-utils
14d52d4
Requires(post): systemd-units
14d52d4
Requires(preun): systemd-units
14d52d4
Requires(postun): systemd-units
4ef9234
%if 0%{?prever:1}
e682aee
#For building snapshots
4ef9234
Buildrequires: autoconf, automake, libtool, java
4ef9234
%endif
14d52d4
14d52d4
%description
14d52d4
OpenDNSSEC was created as an open-source turn-key solution for DNSSEC.
14d52d4
It secures zone data just before it is published in an authoritative
14d52d4
name server. It requires a PKCS#11 crypto module library, such as softhsm
14d52d4
14d52d4
%prep
4ef9234
%setup -q -n %{name}-%{version}%{?prever}
Patrick Uiterwijk a3df9ca
%patch
9b8ffb6
14d52d4
%build
14d52d4
%configure --with-ldns=%{_libdir}
14d52d4
make %{?_smp_mflags}
14d52d4
14d52d4
%check
14d52d4
# Requires sample db not shipped with upstream
14d52d4
# make check
14d52d4
14d52d4
%install
14d52d4
rm -rf %{buildroot}
14d52d4
make DESTDIR=%{buildroot} install
14d52d4
mkdir -p %{buildroot}/var/opendnssec/{tmp,signed,signconf}
Paul Wouters ab9e58c
install -d -m 0755 %{buildroot}%{_initrddir} %{buildroot}%{_sysconfdir}/cron.d/
Paul Wouters 388d61a
install -m 0644 %{SOURCE6} %{buildroot}/%{_sysconfdir}/cron.d/opendnssec
14d52d4
rm -f %{buildroot}/%{_sysconfdir}/opendnssec/*.sample
14d52d4
install -d -m 0755 %{buildroot}/%{_sysconfdir}/sysconfig 
14d52d4
install -d -m 0755 %{buildroot}%{_unitdir}
14d52d4
install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/
14d52d4
install -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/
14d52d4
install -m 0644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/ods
14d52d4
install -m 0644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/opendnssec/
14d52d4
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d/
14d52d4
install -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/tmpfiles.d/opendnssec.conf
14d52d4
mkdir -p %{buildroot}%{_localstatedir}/run/opendnssec
14d52d4
14d52d4
%clean
14d52d4
rm -rf %{buildroot}
14d52d4
14d52d4
%files 
14d52d4
%{_unitdir}/ods-enforcerd.service
14d52d4
%{_unitdir}/ods-signerd.service
14d52d4
%config(noreplace) %{_sysconfdir}/tmpfiles.d/opendnssec.conf
14d52d4
%attr(0750,root,ods) %dir %{_sysconfdir}/opendnssec
14d52d4
%attr(0770,root,ods) %dir %{_localstatedir}/opendnssec
14d52d4
%attr(0770,root,ods) %dir %{_localstatedir}/opendnssec/tmp
4ef9234
%attr(0775,root,ods) %dir %{_localstatedir}/opendnssec/signed
14d52d4
%attr(0770,root,ods) %dir %{_localstatedir}/opendnssec/signconf
14d52d4
%attr(0660,root,ods) %config(noreplace) %{_sysconfdir}/opendnssec/*.xml
14d52d4
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/ods
14d52d4
%attr(0770,root,ods) %dir %{_localstatedir}/run/opendnssec
Paul Wouters ab9e58c
%attr(0644,root,root) %{_sysconfdir}/cron.d/opendnssec
f49c134
%doc NEWS README LICENSE
14d52d4
%{_mandir}/*/*
14d52d4
%{_sbindir}/*
14d52d4
%{_bindir}/*
4ef9234
%attr(0755,root,root) %dir %{_datadir}/%{name}
4ef9234
%{_datadir}/%{name}/*
14d52d4
14d52d4
%pre
14d52d4
getent group ods >/dev/null || groupadd -r ods
14d52d4
getent passwd ods >/dev/null || \
14d52d4
useradd -r -g ods -d /etc/opendnssec -s /sbin/nologin \
14d52d4
-c "opendnssec daemon account" ods
14d52d4
exit 0
14d52d4
14d52d4
%post
4ef9234
%systemd_post ods-enforcerd.service
4ef9234
%systemd_post ods-signerd.service
4ef9234
14d52d4
# Initialise a slot on the softhsm on first install
14d52d4
if [ "$1" -eq 1 ]; then
14d52d4
        softhsm --init-token --slot 0 --label "OpenDNSSEC" --pin 1234 --so-pin 1234
14d52d4
fi
14d52d4
14d52d4
%preun
4ef9234
%systemd_preun ods-enforcerd.service
4ef9234
%systemd_preun ods-signerd.service
14d52d4
14d52d4
%postun
4ef9234
%systemd_postun_with_restart ods-enforcerd.service
4ef9234
%systemd_postun_with_restart ods-signerd.service
14d52d4
14d52d4
%changelog
Patrick Uiterwijk a3df9ca
* Fri Jan 18 2013 Patrick Uiterwijk <puiterwijk@gmail.com> - 1.4.0-0.6.rc1
Patrick Uiterwijk a3df9ca
- Updated to 1.4.0rc1
Patrick Uiterwijk a3df9ca
- Applied opendnssec-ksk-premature-retirement.patch (svn r6952)
5841628
- Added BuildRequires: procps-ng for bug OPENDNSSEC-345
5841628
4ef9234
* Wed Sep 26 2012 Paul Wouters <pwouters@redhat.com> - 1.4.0-0.3.b1
599e63b
- Just an EVR fix to the proper standard
4ef9234
- Cleanup of spec file
4ef9234
- Introduce new systemd-rpm macros (rhbz#850242)
599e63b
Paul Wouters ab9e58c
* Wed Sep 12 2012 Paul Wouters <pwouters@redhat.com> - 1.4.0-0.b1.1
Paul Wouters ab9e58c
- Updated to 1.4.0b1
Paul Wouters ab9e58c
- Patch for NSEC3PARAM TTL
Paul Wouters ab9e58c
- Cron job to assist narrowing ods-enforcerd timing differences
Paul Wouters ab9e58c
Paul Wouters ab9e58c
* Wed Aug 29 2012 Paul Wouters <pwouters@redhat.com> - 1.4.0-0.a3.1
Paul Wouters ab9e58c
- Updated to 1.4.0a3
Paul Wouters ab9e58c
- Patch to more aggressively try to resign
Paul Wouters ab9e58c
- Patch to fix locking issue eating up cpu
Paul Wouters ab9e58c
c51d9b8
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.0-0.a2.2
c51d9b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
c51d9b8
9b8ffb6
* Tue Jun 12 2012 Paul Wouters <pwouters@redhat.com> - 1.4.0-0.a2.1
9b8ffb6
- Updated to 1.4.0a2
9b8ffb6
- ksm-utils patch for ods-ksmutil to die sooner when it can't lock
9b8ffb6
  the HSM.
9b8ffb6
5a22ec6
* Wed May 16 2012 Paul Wouters <pwouters@redhat.com> - 1.4.0-0.a1.3
5a22ec6
- Patch for crasher with deleted RRsets and NSEC3/OPTOUT chains
5a22ec6
14d52d4
* Mon Mar 26 2012 Paul Wouters <pwouters@redhat.com> - 1.4.0-0.a1.2
14d52d4
- Added opendnssec LICENSE file from trunk (Thanks Jakob!) 
14d52d4
14d52d4
* Mon Mar 26 2012 Paul Wouters <pwouters@redhat.com> - 1.4.0-0.a1.1
14d52d4
- Fix macros in comment
14d52d4
- Added missing -m to install target
14d52d4
14d52d4
* Sun Mar 25 2012 Paul Wouters <pwouters@redhat.com> - 1.4.0-0.a1
14d52d4
- The 1.4.x branch no longer needs ruby, as the auditor has been removed
14d52d4
- Added missing openssl-devel BuildRequire
14d52d4
- Comment out <SkipPublicKey/> so keys generated by ods can be used by bind
14d52d4
14d52d4
* Fri Feb 24 2012 Paul Wouters <pwouters@redhat.com> - 1.3.6-3
14d52d4
- Requires rubygem-soap4r when using ruby-1.9
14d52d4
- Don't ghost /var/run/opendnssec
14d52d4
- Converted initd to systemd
14d52d4
14d52d4
* Thu Nov 24 2011 root - 1.3.2-6
14d52d4
- Added rubygem-dnsruby requires as rpm does not pick it up automatically
14d52d4
14d52d4
* Tue Nov 22 2011 root - 1.3.2-5
14d52d4
- Added /var/opendnssec/signconf/ /as this temp dir is needed
14d52d4
14d52d4
* Mon Nov 21 2011 Paul Wouters <paul@xelerance.com> - 1.3.2-4
14d52d4
- Added /var/opendnssec/signed/ as this is the default output dir
14d52d4
14d52d4
* Sun Nov 20 2011 Paul Wouters <paul@xelerance.com> - 1.3.2-3
14d52d4
- Add ods user for opendnssec tasks
14d52d4
- Added initscripts and services for ods-signerd and ods-enforcerd
14d52d4
- Initialise OpenDNSSEC softhsm token on first install
14d52d4
14d52d4
* Wed Oct 05 2011 Paul Wouters <paul@xelerance.com> - 1.3.2-1
14d52d4
- Updated to 1.3.2
14d52d4
- Added dependancies on opencryptoki and softhsm
14d52d4
- Don't install duplicate unreadable .sample files
14d52d4
- Fix upstream conf.xml to point to actually used library paths
14d52d4
14d52d4
* Thu Mar  3 2011 Paul Wouters <paul@xelerance.com> - 1.2.0-1
14d52d4
- Initial package for Fedora