[opendnssec] * Wed Sep 26 2012 Paul Wouters <pwouters at redhat.com> - 1.4.0-0.3.b1 - Just an EVR fix to the proper
Paul Wouters
pwouters at fedoraproject.org
Wed Sep 26 21:28:26 UTC 2012
commit 4ef9234db6f41e85faa30f7c5d923ea19a6226e9
Author: Paul Wouters <pwouters at redhat.com>
Date: Wed Sep 26 17:27:55 2012 -0400
* Wed Sep 26 2012 Paul Wouters <pwouters at redhat.com> - 1.4.0-0.3.b1
- Just an EVR fix to the proper standard
- Cleanup of spec file
- Introduce new systemd-rpm macros (rhbz#850242)
opendnssec.spec | 57 +++++++++++++++++++-----------------------------------
1 files changed, 20 insertions(+), 37 deletions(-)
---
diff --git a/opendnssec.spec b/opendnssec.spec
index 6d169fa..89e7b3f 100644
--- a/opendnssec.spec
+++ b/opendnssec.spec
@@ -1,11 +1,11 @@
+%global prever b1
Summary: DNSSEC key and zone management software
Name: opendnssec
Version: 1.4.0
-Release: 0.2.b1%{?dist}
+Release: 0.3.%{?prever}%{?dist}
License: BSD
Url: http://www.opendnssec.org/
-#Source: http://www.opendnssec.org/files/source/% {name}-% {version}.tar.gz
-Source: http://www.opendnssec.org/files/source/testing/%{name}-%{version}b1.tar.gz
+Source0: http://www.opendnssec.org/files/source/%{?prever:testing/}%{name}-%{version}%{?prever}.tar.gz
Source1: ods-enforcerd.service
Source2: ods-signerd.service
Source3: ods.sysconfig
@@ -20,12 +20,13 @@ Requires: opencryptoki, softhsm, systemd-units
BuildRequires: ldns-devel >= 1.6.12, sqlite-devel , openssl-devel
BuildRequires: libxml2-devel CUnit-devel, doxygen
Requires(pre): shadow-utils
-Requires(post): systemd-sysv
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
+%if 0%{?prever:1}
#For building snapshots
-Buildrequires: autoconf, automake, libtool, java
+Buildrequires: autoconf, automake, libtool, java
+%endif
%description
OpenDNSSEC was created as an open-source turn-key solution for DNSSEC.
@@ -33,14 +34,11 @@ It secures zone data just before it is published in an authoritative
name server. It requires a PKCS#11 crypto module library, such as softhsm
%prep
-%setup -q -n %{name}-%{version}b1
+%setup -q -n %{name}-%{version}%{?prever}
%patch1 -p1 -b .aggressive-retry
%patch2 -p1 -b .nsec3param
%build
-# for snapshots enable below
-# sh ./autogen.sh
-
%configure --with-ldns=%{_libdir}
make %{?_smp_mflags}
@@ -52,11 +50,8 @@ make %{?_smp_mflags}
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
mkdir -p %{buildroot}/var/opendnssec/{tmp,signed,signconf}
-
install -d -m 0755 %{buildroot}%{_initrddir} %{buildroot}%{_sysconfdir}/cron.d/
install -m 0644 %{SOURCE6} %{buildroot}/%{_sysconfdir}/cron.d/opendnssec
-
-# cleanup sample files
rm -f %{buildroot}/%{_sysconfdir}/opendnssec/*.sample
install -d -m 0755 %{buildroot}/%{_sysconfdir}/sysconfig
install -d -m 0755 %{buildroot}%{_unitdir}
@@ -64,25 +59,21 @@ install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/
install -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/
install -m 0644 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/ods
install -m 0644 %{SOURCE4} %{buildroot}/%{_sysconfdir}/opendnssec/
-# Install tmpfiles.d config
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d/
install -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/tmpfiles.d/opendnssec.conf
-
mkdir -p %{buildroot}%{_localstatedir}/run/opendnssec
-
%clean
rm -rf %{buildroot}
%files
-%defattr(-,root,root)
%{_unitdir}/ods-enforcerd.service
%{_unitdir}/ods-signerd.service
%config(noreplace) %{_sysconfdir}/tmpfiles.d/opendnssec.conf
%attr(0750,root,ods) %dir %{_sysconfdir}/opendnssec
%attr(0770,root,ods) %dir %{_localstatedir}/opendnssec
%attr(0770,root,ods) %dir %{_localstatedir}/opendnssec/tmp
-%attr(0770,root,ods) %dir %{_localstatedir}/opendnssec/signed
+%attr(0775,root,ods) %dir %{_localstatedir}/opendnssec/signed
%attr(0770,root,ods) %dir %{_localstatedir}/opendnssec/signconf
%attr(0660,root,ods) %config(noreplace) %{_sysconfdir}/opendnssec/*.xml
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/ods
@@ -92,8 +83,8 @@ rm -rf %{buildroot}
%{_mandir}/*/*
%{_sbindir}/*
%{_bindir}/*
-%attr(0755,root,root) %dir %{_prefix}/share/%{name}
-%{_prefix}/share/%{name}/*
+%attr(0755,root,root) %dir %{_datadir}/%{name}
+%{_datadir}/%{name}/*
%pre
getent group ods >/dev/null || groupadd -r ods
@@ -103,35 +94,27 @@ useradd -r -g ods -d /etc/opendnssec -s /sbin/nologin \
exit 0
%post
-if [ $1 -eq 1 ] ; then
- # Initial installation
- /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_post ods-enforcerd.service
+%systemd_post ods-signerd.service
+
# Initialise a slot on the softhsm on first install
if [ "$1" -eq 1 ]; then
softhsm --init-token --slot 0 --label "OpenDNSSEC" --pin 1234 --so-pin 1234
fi
%preun
-if [ $1 -eq 0 ]; then
- # Package removal, not upgrade
- /bin/systemctl --no-reload disable ods-signerd.service > /dev/null 2>&1 || :
- /bin/systemctl stop ods-signerd.service > /dev/null 2>&1 || :
- /bin/systemctl --no-reload disable ods-enforcerd.service > /dev/null 2>&1 || :
- /bin/systemctl stop ods-enforcerd.service > /dev/null 2>&1 || :
-fi
+%systemd_preun ods-enforcerd.service
+%systemd_preun ods-signerd.service
%postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
- # Package upgrade, not uninstall
- /bin/systemctl try-restart ods-enforcerd.service >/dev/null 2>&1 || :
- /bin/systemctl try-restart ods-signerd.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart ods-enforcerd.service
+%systemd_postun_with_restart ods-signerd.service
%changelog
-* Wed Sep 26 2012 Paul Wouters <pwouters at redhat.com> - 1.4.0-0.2.b1
+* Wed Sep 26 2012 Paul Wouters <pwouters at redhat.com> - 1.4.0-0.3.b1
- Just an EVR fix to the proper standard
+- Cleanup of spec file
+- Introduce new systemd-rpm macros (rhbz#850242)
* Wed Sep 12 2012 Paul Wouters <pwouters at redhat.com> - 1.4.0-0.b1.1
- Updated to 1.4.0b1
More information about the scm-commits
mailing list