Browse Source

bind-9.18.24-1

Tomohiro "Tomo-p" KATO 8 months ago
parent
commit
4071cdd2b3
1 changed files with 56 additions and 32 deletions
  1. 56 32
      b/bind/bind-vl.spec

+ 56 - 32
b/bind/bind-vl.spec

@@ -9,9 +9,9 @@
 %define sname bind
 %define pname bind
 # example: 9.9.13.P1
-%define pversion 9.16.44
+%define pversion 9.18.24
 # example: 9.9.13-P1
-%define sversion 9.16.44
+%define sversion 9.18.24
 %define bind_epoch 1
 # fixed <BTS:VineLinux:1139>
 %define old_bind_version 1:9.9.2p2-1vl7
@@ -40,14 +40,13 @@ Source2: named.sysconfig
 Source3: named.init
 Source4: named.logrotate
 Source5: keygen.c
+Source42: generate-rndc-key.sh
 Source100: named.service
 Source101: named-setup-rndc.service
 Source102: named.sysconfig.systemd
 Source103: bind.tmpfiles.d
 Source104: named.conf
 
-Patch1: bind-9.11.5-rndckey.patch
-
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 %if %{with python}
 BuildRequires: python
@@ -61,6 +60,7 @@ BuildRequires: libcap-devel
 BuildRequires: readline-devel
 %endif
 BuildRequires: libuv-devel
+BuildRequires: libnghttp2-devel
 Requires: %{pname}-libs = %{bind_epoch}:%{version}-%{release}
 Requires(pre): %{pname}-utils = %{bind_epoch}:%{version}-%{release}
 Requires(pre): shadow-utils
@@ -151,14 +151,16 @@ bind.
 
 %prep
 %setup -n bind-%{sversion} -q
-%patch1 -p1 -b .key
 perl -pi -e 's/^(SUBDIRS =.+)dlzexternal(.+)$/\1\2/' bin/tests/system/Makefile.in
 
 
 %build
-libtoolize --copy --force
-aclocal
-autoconf
+CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
+CPPFLAGS="$CPPFLAGS -DOPENSSL_API_COMPAT=10100"
+export CFLAGS CPPFLAGS
+export STD_CDEFINES="$CPPFLAGS"
+
+autoreconf -vif
 %configure \
   --with-libtool \
   --with-openssl=/usr \
@@ -182,16 +184,19 @@ make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
+
+# Build directory hierarchy
 mkdir -p %{buildroot}%{_sysconfdir}/{logrotate.d,sysconfig}
-mkdir -p %{buildroot}/usr/{bin,lib,sbin,include}
-mkdir -p %{buildroot}/var/named/data
+mkdir -p %{buildroot}%{_libdir}/{bind,named}
+mkdir -p %{buildroot}%{_localstatedir}/named/{slaves,data,dynamic}
 mkdir -p %{buildroot}%{_mandir}/{man1,man5,man8}
 mkdir -p %{buildroot}/var/run/named
+mkdir -p %{buildroot}/run/named
+mkdir -p %{buildroot}%{_localstatedir}/log
 
 make DESTDIR=%{buildroot} install
-install -c -m 640 bin/rndc/rndc.conf %{buildroot}/etc
 install -c -m 644 %SOURCE4 %{buildroot}%{_sysconfdir}/logrotate.d/named
-touch %{buildroot}%{_sysconfdir}/rndc.key
+touch %{buildroot}%{_sysconfdir}/rndc.{key,conf}
 gcc %{optflags} -o %{buildroot}/usr/sbin/dns-keygen %{SOURCE5}
 cd %{buildroot}%{_mandir}
 tar xjf %{SOURCE1}
@@ -208,12 +213,22 @@ install -m 644 %{SOURCE101} %{buildroot}%{_unitdir}
 install -m 644 %{SOURCE102} %{buildroot}%{_sysconfdir}/sysconfig/named
 mkdir -p %{buildroot}%{_tmpfilesdir}
 install -m 644 %{SOURCE103} %{buildroot}%{_tmpfilesdir}/named.conf
+mkdir -p %{buildroot}%{_libexecdir}
+install -m 755 %{SOURCE42} %{buildroot}%{_libexecdir}/generate-rndc-key.sh
 %else
 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
 install -c -m 755 %SOURCE3 %{buildroot}%{_sysconfdir}/rc.d/init.d/named
 cp %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/named
 %endif
 
+pushd ${RPM_BUILD_ROOT}%{_sbindir}
+# Compatibility with previous major versions, only for selected binaries
+for BIN in named-checkconf named-checkzone named-compilezone
+do
+  ln -s ../bin/$BIN $BIN
+done
+popd
+
 rm -f %{buildroot}%{_libdir}/*.la
 
 
@@ -296,53 +311,58 @@ exit 0
 %if %{with systemd}
 %{_unitdir}/named.service
 %{_unitdir}/named-setup-rndc.service
+%{_libexecdir}/generate-rndc-key.sh
 %{_tmpfilesdir}/named.conf
 %else
 %config %{_sysconfdir}/rc.d/init.d/named
 %attr(-,named,named) %dir %{_var}/run/named
 %endif
 %config(noreplace) %{_sysconfdir}/sysconfig/named
-%config(noreplace) %attr(0640,root,named) %{_sysconfdir}/rndc.conf
-%config(noreplace) %attr(0640,root,named) %{_sysconfdir}/rndc.key
+%ghost %config(noreplace) %attr(0640,root,named) %{_sysconfdir}/rndc.conf
+%ghost %config(noreplace) %attr(0640,root,named) %{_sysconfdir}/rndc.key
 %config(noreplace) %attr(0640,root,named) %{_sysconfdir}/bind.keys
 
 %attr(-,named,named) %dir %{_var}/named
 %attr(-,named,named) %dir %{_var}/named/data
 
-%{_sbindir}/dnssec*
+%{_bindir}/dnssec-*
+%{_bindir}/named-journalprint
+%{_bindir}/named-checkconf
+%{_bindir}/named-checkzone
+%{_bindir}/named-compilezone
+%{_bindir}/nsec3hash
+%{_sbindir}/ddns-confgen
+%{_sbindir}/dns-keygen
 %{_sbindir}/named
-%{_sbindir}/named-check*
-%{_sbindir}/named-compilezone
 %{_sbindir}/rndc*
-%{_sbindir}/dns-keygen
-%{_bindir}/arpaname
-%{_sbindir}/ddns-confgen
-%{_sbindir}/named-journalprint
-%{_sbindir}/nsec3hash
+%{_sbindir}/named-checkconf
+%{_sbindir}/named-checkzone
+%{_sbindir}/named-compilezone
 %{_sbindir}/tsig-keygen
 
 %dir %{_libdir}/named
-%{_libdir}/named/*
+%dir %{_libdir}/bind
+%{_libdir}/bind/filter*.so
+%exclude %{_libdir}/bind/filter*.la
 
 %if %{with python}
 %{python_sitelib}/*
 %endif
 
-%{_mandir}/man1/arpaname.1*
+%{_mandir}/man1/dnssec-*.1*
+%{_mandir}/man1/named-checkconf.1*
+%{_mandir}/man1/named-checkzone.1*
+%{_mandir}/man1/named-compilezone.1*
+%{_mandir}/man1/named-journalprint.1*
+%{_mandir}/man1/nsec3hash.1*
 %{_mandir}/man5/resolv.conf.5*
 %{_mandir}/man5/named.conf.5*
 %{_mandir}/man5/rndc.conf.5*
 %{_mandir}/man8/rndc.8*
 %{_mandir}/man8/named.8*
-%{_mandir}/man8/dnssec*.8*
-%{_mandir}/man8/filter-aaaa*.8*
-%{_mandir}/man8/named-checkconf.8*
-%{_mandir}/man8/named-checkzone.8*
-%{_mandir}/man8/named-compilezone.8*
+%{_mandir}/man8/filter-*.8*
 %{_mandir}/man8/rndc-confgen.8*
 %{_mandir}/man8/ddns-confgen.8*
-%{_mandir}/man8/named-journalprint.8*
-%{_mandir}/man8/nsec3hash.8*
 %{_mandir}/man8/tsig-keygen.8*
 
 %files libs
@@ -351,6 +371,7 @@ exit 0
 
 %files utils
 %defattr(-,root,root)
+%{_bindir}/arpaname
 %{_bindir}/delv
 %{_bindir}/dig
 %{_bindir}/host
@@ -358,6 +379,7 @@ exit 0
 %{_bindir}/named-rrchecker
 %{_bindir}/nslookup
 %{_bindir}/nsupdate
+%{_mandir}/man1/arpaname.1*
 %{_mandir}/man1/delv.1*
 %{_mandir}/man1/dig.1*
 %{_mandir}/man1/host.1*
@@ -372,11 +394,13 @@ exit 0
 %defattr(-,root,root)
 %{_libdir}/*.so
 %exclude %{_libdir}/*-%{version}.so
-%{_libdir}/*.a
 %{_includedir}/*
 
 
 %changelog
+* Mon Feb 19 2024 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.18.24-1
+- updated to 9.18.24.
+
 * Sat Sep 23 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.16.44-1
 - updated to 9.16.44.