Browse Source

nsd-4.1.3-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@9639 ec354946-7b23-47d6-9f5a-488ba84defc7
tomop 9 years ago
parent
commit
9ebcd2ba07
1 changed files with 30 additions and 15 deletions
  1. 30 15
      n/nsd/nsd-vl.spec

+ 30 - 15
n/nsd/nsd-vl.spec

@@ -1,18 +1,16 @@
 Summary: Fast and lean authoritative DNS Name Server
 Summary(ja): 高速で最小限のAuthoritative専用DNSネームサーバ
 Name: nsd
-Version: 3.2.15
+Version: 4.1.3
 Release: 1%{?_dist_release}
 License: BSD
 Url: http://www.nlnetlabs.nl/%{name}/
 Source: http://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz
 Source1: nsd.init
-Source2: nsd.cron
 Source3: nsd.sysconfig
-Patch0: nsd-install.patch
 Group: System Environment/Daemons
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-BuildRequires: flex, openssl-devel
+BuildRequires: flex, libevent-devel, openssl-devel
 Requires(pre): shadow-utils
 
 %description
@@ -26,14 +24,24 @@ NSD に関する詳しい情報は REQUIREMENTS ドキュメントを参照し
 
 %prep
 %setup -q
-%patch0 -p1
 
 %build
-%configure --enable-bind8-stats --enable-checking --enable-nsec3 \
-           --with-pidfile=%{_localstatedir}/run/%{name}/%{name}.pid --with-ssl \
-           --with-user=nsd --with-difffile=%{_localstatedir}/lib/%{name}/ixfr.db \
-           --with-xfrdfile=%{_localstatedir}/lib/%{name}/ixfr.state \
-           --with-dbfile=%{_localstatedir}/lib/%{name}/nsd.db
+%configure \
+	--with-configdir=%{_sysconfdir}/nsd \
+	--with-nsd_conf_file=%{_sysconfdir}/nsd/nsd.conf \
+	--with-zonesdir=%{_sysconfdir}/nsd \
+	--with-pidfile=%{_localstatedir}/run/%{name}/%{name}.pid \
+	--with-dbfile=%{_localstatedir}/lib/%{name}/nsd.db \
+	--with-difffile=%{_localstatedir}/lib/%{name}/ixfr.db \
+	--with-xfrdfile=%{_localstatedir}/lib/%{name}/ixfr.state \
+	--with-max-ips=1024 \
+	--with-ssl \
+	--with-user=nsd \
+	--enable-bind8-stats \
+	--enable-checking \
+	--enable-mmap \
+	--enable-nsec3 \
+	--enable-ratelimit
 
 %{__make} %{?_smp_mflags}
 #convert to utf8
@@ -47,8 +55,6 @@ mv -f doc/CREDITS.utf8 doc/CREDITS
 rm -rf %{buildroot}
 %{__make} DESTDIR=%{buildroot} install
 install -d -m 0755 %{buildroot}%{_initrddir}
-install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly
-install -c -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/nsd
 install -m 0755 %{SOURCE1} %{buildroot}/%{_initrddir}/nsd
 install -d -m 0700 %{buildroot}%{_localstatedir}/run/%{name}
 install -d -m 0700 %{buildroot}%{_localstatedir}/lib/%{name}
@@ -56,10 +62,11 @@ install -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig
 install -m 0755 %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig/%{name}
 
 # change .sample to normal config files
-head -76 %{buildroot}%{_sysconfdir}/nsd/nsd.conf.sample > %{buildroot}%{_sysconfdir}/nsd/nsd.conf
-rm %{buildroot}%{_sysconfdir}/nsd/nsd.conf.sample 
+head -150 %{buildroot}%{_sysconfdir}/nsd/nsd.conf.sample > %{buildroot}%{_sysconfdir}/nsd/nsd.conf
 echo "database: /var/lib/nsd/nsd.db" >> %{buildroot}%{_sysconfdir}/nsd/nsd.conf
+head -175 %{buildroot}%{_sysconfdir}/nsd/nsd.conf.sample | tail -26 >> %{buildroot}%{_sysconfdir}/nsd/nsd.conf
 echo "# include: \"/some/path/file\"" >> %{buildroot}%{_sysconfdir}/nsd/nsd.conf
+rm %{buildroot}%{_sysconfdir}/nsd/nsd.conf.sample 
 
 %clean
 rm -rf ${RPM_BUILD_ROOT}
@@ -73,7 +80,6 @@ rm -rf ${RPM_BUILD_ROOT}
 #%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/nsd/nsd.zones
 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/nsd
 %attr(0755,root,root) %{_initrddir}/%{name}
-%{_sysconfdir}/cron.hourly/nsd
 %ghost %attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name}
 %attr(0755,%{name},%{name}) %dir %{_localstatedir}/lib/%{name}
 %{_sbindir}/*
@@ -88,6 +94,11 @@ exit 0
 
 %post
 /sbin/chkconfig --add %{name}
+chown -R nsd.nsd %{_localstatedir}/lib/nsd 2>/dev/null ||:
+chown -R nsd.nsd %{_localstatedir}/run/nsd 2>/dev/null ||:
+if [ ! -f %{_sysconfdir}/nsd/nsd_control.pem ]; then
+  /usr/sbin/nsd-control-setup
+fi
 
 %preun
 if [ $1 -eq 0 ]; then
@@ -101,6 +112,10 @@ if [ "$1" -ge "1" ]; then
 fi
 
 %changelog
+* Fri Jun 26 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.1.3-1
+- new upstream release.
+- dropped Source2 (no longer needed).
+
 * Sat Feb 23 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 3.2.15-1
 - new upstream release