- Use bcond_with to define optional features instead of %global
- Move export libs closer to PKCS11 libs, simplify soversion updates - Remove unnecesary spec parts
This commit is contained in:
parent
56e7b0f856
commit
5fe0b21885
214
bind.spec
214
bind.spec
@ -6,29 +6,30 @@
|
|||||||
%global PREVER b1
|
%global PREVER b1
|
||||||
%global BINDVERSION %{version}%{?PREVER}%{?PATCHVER:-%{PATCHVER}}
|
%global BINDVERSION %{version}%{?PREVER}%{?PATCHVER:-%{PATCHVER}}
|
||||||
|
|
||||||
|
# bcond_without is built by default, unless --without X is passed
|
||||||
|
# bcond_with is built only when --with X is passed to build
|
||||||
|
%bcond_without UNITTEST
|
||||||
|
%bcond_with SYSTEMTEST
|
||||||
|
%bcond_without SDB
|
||||||
|
%bcond_without GSSTSIG
|
||||||
|
# it is not possible to build the package without PKCS11 sub-package
|
||||||
|
# due to extensive changes to Makefiles
|
||||||
|
%bcond_without PKCS11
|
||||||
|
%bcond_without DEVEL
|
||||||
|
%bcond_with LMDB
|
||||||
|
%bcond_with DLZ
|
||||||
|
%bcond_without EXPORT_LIBS
|
||||||
|
|
||||||
%global with_export_libs 1
|
%{?!bind_uid: %global bind_uid 25}
|
||||||
|
%{?!bind_gid: %global bind_gid 25}
|
||||||
|
%global bind_dir /var/named
|
||||||
|
%global chroot_prefix %{bind_dir}/chroot
|
||||||
|
%if %{with SDB}
|
||||||
|
%global chroot_sdb_prefix %{bind_dir}/chroot_sdb
|
||||||
|
%endif
|
||||||
## The order of libs is important. See lib/Makefile.in for details
|
## The order of libs is important. See lib/Makefile.in for details
|
||||||
%define bind_export_libs isc dns isccfg irs
|
%define bind_export_libs isc dns isccfg irs
|
||||||
%{!?_export_dir:%global _export_dir /bind9-export/}
|
%{!?_export_dir:%global _export_dir /bind9-export/}
|
||||||
|
|
||||||
%{?!SDB: %global SDB 1}
|
|
||||||
%{?!unittest: %global unittest 1}
|
|
||||||
%{?!systemtest:%global systemtest 0}
|
|
||||||
%{?!bind_uid: %global bind_uid 25}
|
|
||||||
%{?!bind_gid: %global bind_gid 25}
|
|
||||||
%{?!GSSTSIG: %global GSSTSIG 1}
|
|
||||||
# it is not possible to build the package without PKCS11 sub-package
|
|
||||||
# due to extensive changes to Makefiles
|
|
||||||
%{?!PKCS11: %global PKCS11 1}
|
|
||||||
%{?!DEVEL: %global DEVEL 1}
|
|
||||||
%{?!LMDB: %global LMDB 0}
|
|
||||||
%{?!DLZ: %global DLZ 0}
|
|
||||||
%global bind_dir /var/named
|
|
||||||
%global chroot_prefix %{bind_dir}/chroot
|
|
||||||
%if %{SDB}
|
|
||||||
%global chroot_sdb_prefix %{bind_dir}/chroot_sdb
|
|
||||||
%endif
|
|
||||||
# libisc-nosym requires to be linked with unresolved symbols
|
# libisc-nosym requires to be linked with unresolved symbols
|
||||||
# When libisc-nosym linking is fixed, it can be defined to 1
|
# When libisc-nosym linking is fixed, it can be defined to 1
|
||||||
# Visit https://bugzilla.redhat.com/show_bug.cgi?id=1540300
|
# Visit https://bugzilla.redhat.com/show_bug.cgi?id=1540300
|
||||||
@ -41,7 +42,6 @@ Version: 9.11.3
|
|||||||
Release: 1%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
|
Release: 1%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
|
||||||
Epoch: 32
|
Epoch: 32
|
||||||
Url: http://www.isc.org/products/BIND/
|
Url: http://www.isc.org/products/BIND/
|
||||||
Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
#
|
#
|
||||||
Source: https://ftp.isc.org/isc/bind9/%{BINDVERSION}/bind-%{BINDVERSION}.tar.gz
|
Source: https://ftp.isc.org/isc/bind9/%{BINDVERSION}/bind-%{BINDVERSION}.tar.gz
|
||||||
@ -133,22 +133,22 @@ BuildRequires: systemd
|
|||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-ply
|
BuildRequires: python3-ply
|
||||||
BuildRequires: findutils sed
|
BuildRequires: findutils sed
|
||||||
%if %{SDB}
|
%if %{with SDB}
|
||||||
BuildRequires: openldap-devel, postgresql-devel, sqlite-devel, mariadb-connector-c-devel
|
BuildRequires: openldap-devel, postgresql-devel, sqlite-devel, mariadb-connector-c-devel
|
||||||
BuildRequires: libdb-devel
|
BuildRequires: libdb-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{unittest}
|
%if %{with UNITTEST}
|
||||||
# make unit dependencies
|
# make unit dependencies
|
||||||
BuildRequires: libatf-c-devel kyua-cli softhsm
|
BuildRequires: libatf-c-devel kyua-cli softhsm
|
||||||
%endif
|
%endif
|
||||||
%if %{systemtest}
|
%if %{with SYSTEMTEST}
|
||||||
# bin/tests/system dependencies
|
# bin/tests/system dependencies
|
||||||
BuildRequires: net-tools perl(Net::DNS) perl(Net::DNS::Nameserver)
|
BuildRequires: net-tools perl(Net::DNS) perl(Net::DNS::Nameserver)
|
||||||
%endif
|
%endif
|
||||||
%if %{GSSTSIG}
|
%if %{with GSSTSIG}
|
||||||
BuildRequires: krb5-devel
|
BuildRequires: krb5-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{LMDB}
|
%if %{with LMDB}
|
||||||
BuildRequires: lmdb-devel
|
BuildRequires: lmdb-devel
|
||||||
%endif
|
%endif
|
||||||
# Needed to regenerate dig.1 manpage
|
# Needed to regenerate dig.1 manpage
|
||||||
@ -161,7 +161,7 @@ which resolves host names to IP addresses; a resolver library
|
|||||||
(routines for applications to use when interfacing with DNS); and
|
(routines for applications to use when interfacing with DNS); and
|
||||||
tools for verifying that the DNS server is operating properly.
|
tools for verifying that the DNS server is operating properly.
|
||||||
|
|
||||||
%if %{PKCS11}
|
%if %{with PKCS11}
|
||||||
%package pkcs11
|
%package pkcs11
|
||||||
Summary: Bind with native PKCS#11 functionality for crypto
|
Summary: Bind with native PKCS#11 functionality for crypto
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -206,7 +206,7 @@ This a set of development files for BIND libraries (dns, isc) compiled
|
|||||||
with native PKCS#11 functionality.
|
with native PKCS#11 functionality.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{SDB}
|
%if %{with SDB}
|
||||||
%package sdb
|
%package sdb
|
||||||
Summary: BIND server with database backends and DLZ support
|
Summary: BIND server with database backends and DLZ support
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -270,7 +270,7 @@ network addresses.
|
|||||||
You should install bind-utils if you need to get information from DNS name
|
You should install bind-utils if you need to get information from DNS name
|
||||||
servers.
|
servers.
|
||||||
|
|
||||||
%if %{DEVEL}
|
%if %{with DEVEL}
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Header files and libraries needed for BIND DNS development
|
Summary: Header files and libraries needed for BIND DNS development
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -306,7 +306,7 @@ This package contains a tree of files which can be used as a
|
|||||||
chroot(2) jail for the named(8) program from the BIND package.
|
chroot(2) jail for the named(8) program from the BIND package.
|
||||||
Based on the code from Jan "Yenya" Kasprzak <kas@fi.muni.cz>
|
Based on the code from Jan "Yenya" Kasprzak <kas@fi.muni.cz>
|
||||||
|
|
||||||
%if %{SDB}
|
%if %{with SDB}
|
||||||
%package sdb-chroot
|
%package sdb-chroot
|
||||||
Summary: A chroot runtime environment for the ISC BIND DNS server, named-sdb(8)
|
Summary: A chroot runtime environment for the ISC BIND DNS server, named-sdb(8)
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -322,7 +322,7 @@ Based on the code from Jan "Yenya" Kasprzak <kas@fi.muni.cz>
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if %{DLZ}
|
%if %{with DLZ}
|
||||||
%package dlz-bdb
|
%package dlz-bdb
|
||||||
Summary: BIND server bdb DLZ module
|
Summary: BIND server bdb DLZ module
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -385,7 +385,7 @@ BuildArch: noarch
|
|||||||
%description -n python3-bind
|
%description -n python3-bind
|
||||||
This package provides a module which allows commands to be sent to rndc directly from Python programs.
|
This package provides a module which allows commands to be sent to rndc directly from Python programs.
|
||||||
|
|
||||||
%if %{with_export_libs}
|
%if %{with EXPORT_LIBS}
|
||||||
%package export-libs
|
%package export-libs
|
||||||
Summary: ISC libs for DHCP application
|
Summary: ISC libs for DHCP application
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -437,7 +437,7 @@ are used for building ISC DHCP.
|
|||||||
%patch152 -p1 -b .kyua-unit-oot
|
%patch152 -p1 -b .kyua-unit-oot
|
||||||
%patch153 -p1 -b .export_suffix
|
%patch153 -p1 -b .export_suffix
|
||||||
|
|
||||||
%if %{PKCS11}
|
%if %{with PKCS11}
|
||||||
cp -r bin/named{,-pkcs11}
|
cp -r bin/named{,-pkcs11}
|
||||||
cp -r bin/dnssec{,-pkcs11}
|
cp -r bin/dnssec{,-pkcs11}
|
||||||
cp -r lib/isc{,-pkcs11}
|
cp -r lib/isc{,-pkcs11}
|
||||||
@ -446,7 +446,7 @@ cp -r lib/dns{,-pkcs11}
|
|||||||
%patch149 -p1 -b .kyua-pkcs11
|
%patch149 -p1 -b .kyua-pkcs11
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{SDB}
|
%if %{with SDB}
|
||||||
%patch101 -p1 -b .old-api
|
%patch101 -p1 -b .old-api
|
||||||
mkdir bin/named-sdb
|
mkdir bin/named-sdb
|
||||||
cp -r bin/named/* bin/named-sdb
|
cp -r bin/named/* bin/named-sdb
|
||||||
@ -530,11 +530,11 @@ export LIBDIR_SUFFIX
|
|||||||
--includedir=%{_includedir}/bind9 \
|
--includedir=%{_includedir}/bind9 \
|
||||||
--with-tuning=large \
|
--with-tuning=large \
|
||||||
--with-geoip \
|
--with-geoip \
|
||||||
%if %{PKCS11}
|
%if %{with PKCS11}
|
||||||
--enable-native-pkcs11 \
|
--enable-native-pkcs11 \
|
||||||
--with-pkcs11=%{_libdir}/pkcs11/libsofthsm2.so \
|
--with-pkcs11=%{_libdir}/pkcs11/libsofthsm2.so \
|
||||||
%endif
|
%endif
|
||||||
%if %{SDB}
|
%if %{with SDB}
|
||||||
--with-dlopen=yes \
|
--with-dlopen=yes \
|
||||||
--with-dlz-ldap=yes \
|
--with-dlz-ldap=yes \
|
||||||
--with-dlz-postgres=yes \
|
--with-dlz-postgres=yes \
|
||||||
@ -542,16 +542,16 @@ export LIBDIR_SUFFIX
|
|||||||
--with-dlz-filesystem=yes \
|
--with-dlz-filesystem=yes \
|
||||||
--with-dlz-bdb=yes \
|
--with-dlz-bdb=yes \
|
||||||
%endif
|
%endif
|
||||||
%if %{GSSTSIG}
|
%if %{with GSSTSIG}
|
||||||
--with-gssapi=yes \
|
--with-gssapi=yes \
|
||||||
--disable-isc-spnego \
|
--disable-isc-spnego \
|
||||||
%endif
|
%endif
|
||||||
%if %{LMDB}
|
%if %{with LMDB}
|
||||||
--with-lmdb=yes \
|
--with-lmdb=yes \
|
||||||
%else
|
%else
|
||||||
--with-lmdb=no \
|
--with-lmdb=no \
|
||||||
%endif
|
%endif
|
||||||
%if %{unittest}
|
%if %{with UNITTEST}
|
||||||
--with-atf=/usr \
|
--with-atf=/usr \
|
||||||
%endif
|
%endif
|
||||||
--enable-fixed-rrset \
|
--enable-fixed-rrset \
|
||||||
@ -575,7 +575,7 @@ pushd bin/python
|
|||||||
make man
|
make man
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%if %{DLZ}
|
%if %{with DLZ}
|
||||||
pushd contrib/dlz
|
pushd contrib/dlz
|
||||||
pushd bin/dlzbdb
|
pushd bin/dlzbdb
|
||||||
make
|
make
|
||||||
@ -592,7 +592,7 @@ popd # build
|
|||||||
%unit_prepare_build build
|
%unit_prepare_build build
|
||||||
%systemtest_prepare_build build
|
%systemtest_prepare_build build
|
||||||
|
|
||||||
%if %{with_export_libs}
|
%if %{with EXPORT_LIBS}
|
||||||
## Create export libs ##
|
## Create export libs ##
|
||||||
mkdir -p export-libs
|
mkdir -p export-libs
|
||||||
pushd export-libs
|
pushd export-libs
|
||||||
@ -610,7 +610,7 @@ export LIBDIR_SUFFIX
|
|||||||
--with-gssapi=yes \
|
--with-gssapi=yes \
|
||||||
--disable-isc-spnego \
|
--disable-isc-spnego \
|
||||||
--enable-fixed-rrset \
|
--enable-fixed-rrset \
|
||||||
%if %{unittest}
|
%if %{with UNITTEST}
|
||||||
--with-atf=/usr \
|
--with-atf=/usr \
|
||||||
%endif
|
%endif
|
||||||
--disable-rpz-nsip \
|
--disable-rpz-nsip \
|
||||||
@ -655,13 +655,13 @@ sed -e '/^\s*include(.*-pkcs11/ d' -e '/^\s*include(.*lwres/ d' \
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{PKCS11}
|
%if %{with PKCS11}
|
||||||
# Tests require initialization of pkcs11 token
|
# Tests require initialization of pkcs11 token
|
||||||
export SOFTHSM2_CONF="`pwd`/softhsm2.conf"
|
export SOFTHSM2_CONF="`pwd`/softhsm2.conf"
|
||||||
sh %{SOURCE48} "${SOFTHSM2_CONF}" "`pwd`/softhsm-tokens"
|
sh %{SOURCE48} "${SOFTHSM2_CONF}" "`pwd`/softhsm-tokens"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{unittest}
|
%if %{with UNITTEST}
|
||||||
pushd build
|
pushd build
|
||||||
make unit
|
make unit
|
||||||
e=$?
|
e=$?
|
||||||
@ -682,7 +682,7 @@ sed -e '/^\s*include(.*-pkcs11/ d' -e '/^\s*include(.*lwres/ d' \
|
|||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{systemtest}
|
%if %{with SYSTEMTEST}
|
||||||
if [ "`whoami`" = 'root' ]; then
|
if [ "`whoami`" = 'root' ]; then
|
||||||
set -e
|
set -e
|
||||||
chmod -R a+rwX .
|
chmod -R a+rwX .
|
||||||
@ -706,8 +706,6 @@ else
|
|||||||
:
|
:
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf ${RPM_BUILD_ROOT}
|
|
||||||
|
|
||||||
# Build directory hierarchy
|
# Build directory hierarchy
|
||||||
mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d
|
mkdir -p ${RPM_BUILD_ROOT}/etc/logrotate.d
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/bind
|
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/bind
|
||||||
@ -736,7 +734,7 @@ touch ${RPM_BUILD_ROOT}/%{chroot_prefix}/etc/named.conf
|
|||||||
#end chroot
|
#end chroot
|
||||||
|
|
||||||
#sdb-chroot
|
#sdb-chroot
|
||||||
%if %{SDB}
|
%if %{with SDB}
|
||||||
mkdir -p ${RPM_BUILD_ROOT}/%{chroot_sdb_prefix}/{dev,etc,var,run/named}
|
mkdir -p ${RPM_BUILD_ROOT}/%{chroot_sdb_prefix}/{dev,etc,var,run/named}
|
||||||
mkdir -p ${RPM_BUILD_ROOT}/%{chroot_sdb_prefix}/var/{log,named,tmp}
|
mkdir -p ${RPM_BUILD_ROOT}/%{chroot_sdb_prefix}/var/{log,named,tmp}
|
||||||
mkdir -p ${RPM_BUILD_ROOT}/%{chroot_sdb_prefix}/etc/crypto-policies/back-ends
|
mkdir -p ${RPM_BUILD_ROOT}/%{chroot_sdb_prefix}/etc/crypto-policies/back-ends
|
||||||
@ -760,7 +758,7 @@ pushd build
|
|||||||
make DESTDIR=${RPM_BUILD_ROOT} install
|
make DESTDIR=${RPM_BUILD_ROOT} install
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%if %{with_export_libs}
|
%if %{with EXPORT_LIBS}
|
||||||
pushd export-libs
|
pushd export-libs
|
||||||
make DESTDIR=${RPM_BUILD_ROOT} install
|
make DESTDIR=${RPM_BUILD_ROOT} install
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/ld.so.conf.d
|
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/ld.so.conf.d
|
||||||
@ -781,13 +779,13 @@ install -m 644 %{SOURCE38} ${RPM_BUILD_ROOT}%{_unitdir}
|
|||||||
install -m 644 %{SOURCE44} ${RPM_BUILD_ROOT}%{_unitdir}
|
install -m 644 %{SOURCE44} ${RPM_BUILD_ROOT}%{_unitdir}
|
||||||
install -m 644 %{SOURCE46} ${RPM_BUILD_ROOT}%{_unitdir}
|
install -m 644 %{SOURCE46} ${RPM_BUILD_ROOT}%{_unitdir}
|
||||||
|
|
||||||
%if %{SDB}
|
%if %{with SDB}
|
||||||
install -m 644 %{SOURCE39} ${RPM_BUILD_ROOT}%{_unitdir}
|
install -m 644 %{SOURCE39} ${RPM_BUILD_ROOT}%{_unitdir}
|
||||||
install -m 644 %{SOURCE40} ${RPM_BUILD_ROOT}%{_unitdir}
|
install -m 644 %{SOURCE40} ${RPM_BUILD_ROOT}%{_unitdir}
|
||||||
install -m 644 %{SOURCE45} ${RPM_BUILD_ROOT}%{_unitdir}
|
install -m 644 %{SOURCE45} ${RPM_BUILD_ROOT}%{_unitdir}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{PKCS11}
|
%if %{with PKCS11}
|
||||||
install -m 644 %{SOURCE47} ${RPM_BUILD_ROOT}%{_unitdir}
|
install -m 644 %{SOURCE47} ${RPM_BUILD_ROOT}%{_unitdir}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -795,20 +793,20 @@ mkdir -p ${RPM_BUILD_ROOT}%{_libexecdir}
|
|||||||
install -m 755 %{SOURCE41} ${RPM_BUILD_ROOT}%{_libexecdir}/setup-named-chroot.sh
|
install -m 755 %{SOURCE41} ${RPM_BUILD_ROOT}%{_libexecdir}/setup-named-chroot.sh
|
||||||
install -m 755 %{SOURCE42} ${RPM_BUILD_ROOT}%{_libexecdir}/generate-rndc-key.sh
|
install -m 755 %{SOURCE42} ${RPM_BUILD_ROOT}%{_libexecdir}/generate-rndc-key.sh
|
||||||
|
|
||||||
%if %{PKCS11}
|
%if %{with PKCS11}
|
||||||
install -m 755 %{SOURCE48} ${RPM_BUILD_ROOT}%{_libexecdir}/setup-named-softhsm.sh
|
install -m 755 %{SOURCE48} ${RPM_BUILD_ROOT}%{_libexecdir}/setup-named-softhsm.sh
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
install -m 644 %SOURCE3 ${RPM_BUILD_ROOT}/etc/logrotate.d/named
|
install -m 644 %SOURCE3 ${RPM_BUILD_ROOT}/etc/logrotate.d/named
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
|
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
|
||||||
install -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/named
|
install -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/named
|
||||||
%if %{SDB}
|
%if %{with SDB}
|
||||||
mkdir -p ${RPM_BUILD_ROOT}/etc/openldap/schema
|
mkdir -p ${RPM_BUILD_ROOT}/etc/openldap/schema
|
||||||
install -m 644 %{SOURCE8} ${RPM_BUILD_ROOT}/etc/openldap/schema/dnszone.schema
|
install -m 644 %{SOURCE8} ${RPM_BUILD_ROOT}/etc/openldap/schema/dnszone.schema
|
||||||
install -m 644 %{SOURCE12} contrib/sdb/pgsql/
|
install -m 644 %{SOURCE12} contrib/sdb/pgsql/
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{DLZ}
|
%if %{with DLZ}
|
||||||
pushd contrib/dlz
|
pushd contrib/dlz
|
||||||
pushd bin/dlzbdb
|
pushd bin/dlzbdb
|
||||||
make DESTDIR=${RPM_BUILD_ROOT} install
|
make DESTDIR=${RPM_BUILD_ROOT} install
|
||||||
@ -834,7 +832,7 @@ popd
|
|||||||
find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';';
|
find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';';
|
||||||
|
|
||||||
# Remove -devel files out of buildroot if not needed
|
# Remove -devel files out of buildroot if not needed
|
||||||
%if !%{DEVEL}
|
%if !%{with DEVEL}
|
||||||
rm -f ${RPM_BUILD_ROOT}/%{_libdir}/bind9/*so
|
rm -f ${RPM_BUILD_ROOT}/%{_libdir}/bind9/*so
|
||||||
rm -rf ${RPM_BUILD_ROOT}/%{_includedir}/bind9
|
rm -rf ${RPM_BUILD_ROOT}/%{_includedir}/bind9
|
||||||
rm -f ${RPM_BUILD_ROOT}/%{_mandir}/man1/isc-config.sh.1*
|
rm -f ${RPM_BUILD_ROOT}/%{_mandir}/man1/isc-config.sh.1*
|
||||||
@ -843,7 +841,7 @@ rm -f ${RPM_BUILD_ROOT}/%{_bindir}/isc-config.sh
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# SDB manpages
|
# SDB manpages
|
||||||
%if %{SDB}
|
%if %{with SDB}
|
||||||
install -m 644 %{SOURCE31} ${RPM_BUILD_ROOT}%{_mandir}/man1/ldap2zone.1
|
install -m 644 %{SOURCE31} ${RPM_BUILD_ROOT}%{_mandir}/man1/ldap2zone.1
|
||||||
install -m 644 %{SOURCE32} ${RPM_BUILD_ROOT}%{_mandir}/man8/named-sdb.8
|
install -m 644 %{SOURCE32} ${RPM_BUILD_ROOT}%{_mandir}/man8/named-sdb.8
|
||||||
install -m 644 %{SOURCE33} ${RPM_BUILD_ROOT}%{_mandir}/man1/zonetodb.1
|
install -m 644 %{SOURCE33} ${RPM_BUILD_ROOT}%{_mandir}/man1/zonetodb.1
|
||||||
@ -851,7 +849,7 @@ install -m 644 %{SOURCE34} ${RPM_BUILD_ROOT}%{_mandir}/man1/zone2sqlite.1
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# PKCS11 versions manpages
|
# PKCS11 versions manpages
|
||||||
%if %{PKCS11}
|
%if %{with PKCS11}
|
||||||
pushd ${RPM_BUILD_ROOT}%{_mandir}/man8
|
pushd ${RPM_BUILD_ROOT}%{_mandir}/man8
|
||||||
ln -s named.8.gz named-pkcs11.8.gz
|
ln -s named.8.gz named-pkcs11.8.gz
|
||||||
ln -s dnssec-checkds.8.gz dnssec-checkds-pkcs11.8.gz
|
ln -s dnssec-checkds.8.gz dnssec-checkds-pkcs11.8.gz
|
||||||
@ -925,7 +923,7 @@ fi
|
|||||||
# Package upgrade, not uninstall
|
# Package upgrade, not uninstall
|
||||||
%systemd_postun_with_restart named.service
|
%systemd_postun_with_restart named.service
|
||||||
|
|
||||||
%if %{SDB}
|
%if %{with SDB}
|
||||||
%post sdb
|
%post sdb
|
||||||
# Initial installation
|
# Initial installation
|
||||||
%systemd_post named-sdb.service
|
%systemd_post named-sdb.service
|
||||||
@ -939,7 +937,7 @@ fi
|
|||||||
%systemd_postun_with_restart named-sdb.service
|
%systemd_postun_with_restart named-sdb.service
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{PKCS11}
|
%if %{with PKCS11}
|
||||||
%post pkcs11
|
%post pkcs11
|
||||||
# Initial installation
|
# Initial installation
|
||||||
%systemd_post named-pkcs11.service
|
%systemd_post named-pkcs11.service
|
||||||
@ -967,11 +965,11 @@ fi
|
|||||||
%ldconfig_scriptlets libs
|
%ldconfig_scriptlets libs
|
||||||
%ldconfig_scriptlets libs-lite
|
%ldconfig_scriptlets libs-lite
|
||||||
|
|
||||||
%if %{PKCS11}
|
%if %{with PKCS11}
|
||||||
%ldconfig_scriptlets pkcs11-libs
|
%ldconfig_scriptlets pkcs11-libs
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_export_libs}
|
%if %{with EXPORT_LIBS}
|
||||||
%post export-libs -p /sbin/ldconfig
|
%post export-libs -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun export-libs -p /sbin/ldconfig
|
%postun export-libs -p /sbin/ldconfig
|
||||||
@ -1008,7 +1006,7 @@ fi
|
|||||||
%systemd_postun_with_restart named-chroot.service
|
%systemd_postun_with_restart named-chroot.service
|
||||||
|
|
||||||
|
|
||||||
%if %{SDB}
|
%if %{with SDB}
|
||||||
|
|
||||||
%post sdb-chroot
|
%post sdb-chroot
|
||||||
%systemd_post named-sdb-chroot.service
|
%systemd_post named-sdb-chroot.service
|
||||||
@ -1047,7 +1045,6 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
:;
|
:;
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_libdir}/bind
|
%{_libdir}/bind
|
||||||
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sysconfig/named
|
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sysconfig/named
|
||||||
%config(noreplace) %attr(0644,root,named) %{_sysconfdir}/named.iscdlv.key
|
%config(noreplace) %attr(0644,root,named) %{_sysconfdir}/named.iscdlv.key
|
||||||
@ -1103,7 +1100,7 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%defattr(-,named,named,-)
|
%defattr(-,named,named,-)
|
||||||
%dir /run/named
|
%dir /run/named
|
||||||
|
|
||||||
%if %{SDB}
|
%if %{with SDB}
|
||||||
%files sdb
|
%files sdb
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_unitdir}/named-sdb.service
|
%{_unitdir}/named-sdb.service
|
||||||
@ -1129,19 +1126,16 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%{_libdir}/liblwres.so.160*
|
%{_libdir}/liblwres.so.160*
|
||||||
|
|
||||||
%files libs-lite
|
%files libs-lite
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_libdir}/libdns.so.1100*
|
%{_libdir}/libdns.so.1100*
|
||||||
%{_libdir}/libirs.so.160*
|
%{_libdir}/libirs.so.160*
|
||||||
%{_libdir}/libisc.so.169*
|
%{_libdir}/libisc.so.169*
|
||||||
%{_libdir}/libisccfg.so.160*
|
%{_libdir}/libisccfg.so.160*
|
||||||
|
|
||||||
%files license
|
%files license
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{!?_licensedir:%global license %%doc}
|
%{!?_licensedir:%global license %%doc}
|
||||||
%license COPYRIGHT
|
%license COPYRIGHT
|
||||||
|
|
||||||
%files utils
|
%files utils
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_bindir}/dig
|
%{_bindir}/dig
|
||||||
%{_bindir}/delv
|
%{_bindir}/delv
|
||||||
%{_bindir}/host
|
%{_bindir}/host
|
||||||
@ -1153,13 +1147,13 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%{_sbindir}/genrandom
|
%{_sbindir}/genrandom
|
||||||
%{_sbindir}/nsec3hash
|
%{_sbindir}/nsec3hash
|
||||||
%{_sbindir}/dnssec*
|
%{_sbindir}/dnssec*
|
||||||
%if %{PKCS11}
|
%if %{with PKCS11}
|
||||||
%exclude %{_sbindir}/dnssec*pkcs11
|
%exclude %{_sbindir}/dnssec*pkcs11
|
||||||
%endif
|
%endif
|
||||||
%{_sbindir}/isc-hmac-fixup
|
%{_sbindir}/isc-hmac-fixup
|
||||||
%{_sbindir}/named-checkzone
|
%{_sbindir}/named-checkzone
|
||||||
%{_sbindir}/named-compilezone
|
%{_sbindir}/named-compilezone
|
||||||
%if %{LMDB}
|
%if %{with LMDB}
|
||||||
%{_sbindir}/named-nzd2nzf
|
%{_sbindir}/named-nzd2nzf
|
||||||
%endif
|
%endif
|
||||||
%{_mandir}/man1/host.1*
|
%{_mandir}/man1/host.1*
|
||||||
@ -1173,20 +1167,19 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%{_mandir}/man8/genrandom.8*
|
%{_mandir}/man8/genrandom.8*
|
||||||
%{_mandir}/man8/nsec3hash.8*
|
%{_mandir}/man8/nsec3hash.8*
|
||||||
%{_mandir}/man8/dnssec*.8*
|
%{_mandir}/man8/dnssec*.8*
|
||||||
%if %{PKCS11}
|
%if %{with PKCS11}
|
||||||
%exclude %{_mandir}/man8/dnssec*-pkcs11.8*
|
%exclude %{_mandir}/man8/dnssec*-pkcs11.8*
|
||||||
%endif
|
%endif
|
||||||
%{_mandir}/man8/isc-hmac-fixup.8*
|
%{_mandir}/man8/isc-hmac-fixup.8*
|
||||||
%{_mandir}/man8/named-checkzone.8*
|
%{_mandir}/man8/named-checkzone.8*
|
||||||
%{_mandir}/man8/named-compilezone.8*
|
%{_mandir}/man8/named-compilezone.8*
|
||||||
%if %{LMDB}
|
%if %{with LMDB}
|
||||||
%{_mandir}/man8/named-nzd2nzf.8*
|
%{_mandir}/man8/named-nzd2nzf.8*
|
||||||
%endif
|
%endif
|
||||||
%{_sysconfdir}/trusted-key.key
|
%{_sysconfdir}/trusted-key.key
|
||||||
|
|
||||||
%if %{DEVEL}
|
%if %{with DEVEL}
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_libdir}/libbind9.so
|
%{_libdir}/libbind9.so
|
||||||
%{_libdir}/libisccc.so
|
%{_libdir}/libisccc.so
|
||||||
%{_libdir}/liblwres.so
|
%{_libdir}/liblwres.so
|
||||||
@ -1202,7 +1195,6 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files lite-devel
|
%files lite-devel
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_libdir}/libdns.so
|
%{_libdir}/libdns.so
|
||||||
%{_libdir}/libirs.so
|
%{_libdir}/libirs.so
|
||||||
%{_libdir}/libisc.so
|
%{_libdir}/libisc.so
|
||||||
@ -1248,7 +1240,7 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%dir %{chroot_prefix}/run/named
|
%dir %{chroot_prefix}/run/named
|
||||||
%{chroot_prefix}/var/run
|
%{chroot_prefix}/var/run
|
||||||
|
|
||||||
%if %{SDB}
|
%if %{with SDB}
|
||||||
%files sdb-chroot
|
%files sdb-chroot
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_unitdir}/named-sdb-chroot.service
|
%{_unitdir}/named-sdb-chroot.service
|
||||||
@ -1282,7 +1274,7 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%{chroot_sdb_prefix}/var/run
|
%{chroot_sdb_prefix}/var/run
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{PKCS11}
|
%if %{with PKCS11}
|
||||||
%files pkcs11
|
%files pkcs11
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_sbindir}/named-pkcs11
|
%{_sbindir}/named-pkcs11
|
||||||
@ -1291,7 +1283,6 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%{_libexecdir}/setup-named-softhsm.sh
|
%{_libexecdir}/setup-named-softhsm.sh
|
||||||
|
|
||||||
%files pkcs11-utils
|
%files pkcs11-utils
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_sbindir}/dnssec*pkcs11
|
%{_sbindir}/dnssec*pkcs11
|
||||||
%{_sbindir}/pkcs11-destroy
|
%{_sbindir}/pkcs11-destroy
|
||||||
%{_sbindir}/pkcs11-keygen
|
%{_sbindir}/pkcs11-keygen
|
||||||
@ -1301,12 +1292,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%{_mandir}/man8/dnssec*-pkcs11.8*
|
%{_mandir}/man8/dnssec*-pkcs11.8*
|
||||||
|
|
||||||
%files pkcs11-libs
|
%files pkcs11-libs
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_libdir}/libdns-pkcs11.so.1100*
|
%{_libdir}/libdns-pkcs11.so.1100*
|
||||||
%{_libdir}/libisc-pkcs11.so.169*
|
%{_libdir}/libisc-pkcs11.so.169*
|
||||||
|
|
||||||
%files pkcs11-devel
|
%files pkcs11-devel
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_includedir}/bind9/pk11/*.h
|
%{_includedir}/bind9/pk11/*.h
|
||||||
%exclude %{_includedir}/bind9/pk11/site.h
|
%exclude %{_includedir}/bind9/pk11/site.h
|
||||||
%{_includedir}/bind9/pkcs11
|
%{_includedir}/bind9/pkcs11
|
||||||
@ -1314,7 +1303,39 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%{_libdir}/libisc-pkcs11.so
|
%{_libdir}/libisc-pkcs11.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{DLZ}
|
%if %{with EXPORT_LIBS}
|
||||||
|
%files export-libs
|
||||||
|
%dir %{_libdir}/%{_export_dir}
|
||||||
|
%{_libdir}/%{_export_dir}/libdns-export.so.1100*
|
||||||
|
%{_libdir}/%{_export_dir}/libirs-export.so.160*
|
||||||
|
%{_libdir}/%{_export_dir}/libisc-export.so.169*
|
||||||
|
%{_libdir}/%{_export_dir}/libisccfg-export.so.160*
|
||||||
|
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-export-%{_arch}.conf
|
||||||
|
# This subpackage has to distribute its own license. Do not conflict with
|
||||||
|
# other subpackages of different version
|
||||||
|
%license COPYRIGHT
|
||||||
|
|
||||||
|
%files export-devel
|
||||||
|
%{_libdir}/%{_export_dir}/libdns-export.so
|
||||||
|
%{_libdir}/%{_export_dir}/libirs-export.so
|
||||||
|
%{_libdir}/%{_export_dir}/libisc-export.so
|
||||||
|
%{_libdir}/%{_export_dir}/libisccfg-export.so
|
||||||
|
%dir %{_includedir}/%{_export_dir}
|
||||||
|
%{_includedir}/%{_export_dir}/dns
|
||||||
|
%{_includedir}/%{_export_dir}/dst
|
||||||
|
%{_includedir}/%{_export_dir}/irs
|
||||||
|
%{_includedir}/%{_export_dir}/isc
|
||||||
|
%dir %{_includedir}/%{_export_dir}/pk11
|
||||||
|
%{_includedir}/%{_export_dir}/pk11/site.h
|
||||||
|
%{_includedir}/%{_export_dir}/isccfg
|
||||||
|
%{_includedir}/%{_export_dir}/config.h
|
||||||
|
%{_mandir}/man1/isc-export-config.sh.1*
|
||||||
|
%{_mandir}/man1/bind9-export-config.1*
|
||||||
|
%attr(0755,root,root) %{_bindir}/isc-export-config.sh
|
||||||
|
%{_bindir}/bind9-export-config
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with DLZ}
|
||||||
%files dlz-bdb
|
%files dlz-bdb
|
||||||
%{_sbindir}/dlzbdb
|
%{_sbindir}/dlzbdb
|
||||||
%{_libdir}/bind/dlz_bdbhpt_dynamic.so
|
%{_libdir}/bind/dlz_bdbhpt_dynamic.so
|
||||||
@ -1343,45 +1364,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n python3-bind
|
%files -n python3-bind
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{python3_sitelib}/*.egg-info
|
%{python3_sitelib}/*.egg-info
|
||||||
%{python3_sitelib}/isc/
|
%{python3_sitelib}/isc/
|
||||||
|
|
||||||
|
|
||||||
%if %{with_export_libs}
|
|
||||||
%files export-libs
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%dir %{_libdir}/%{_export_dir}
|
|
||||||
%{_libdir}/%{_export_dir}/libdns-export.so.1100*
|
|
||||||
%{_libdir}/%{_export_dir}/libirs-export.so.160*
|
|
||||||
%{_libdir}/%{_export_dir}/libisc-export.so.169*
|
|
||||||
%{_libdir}/%{_export_dir}/libisccfg-export.so.160*
|
|
||||||
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-export-%{_arch}.conf
|
|
||||||
# This subpackage has to distribute its own license. Do not conflict with
|
|
||||||
# other subpackages of different version
|
|
||||||
%license COPYRIGHT
|
|
||||||
|
|
||||||
%files export-devel
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_libdir}/%{_export_dir}/libdns-export.so
|
|
||||||
%{_libdir}/%{_export_dir}/libirs-export.so
|
|
||||||
%{_libdir}/%{_export_dir}/libisc-export.so
|
|
||||||
%{_libdir}/%{_export_dir}/libisccfg-export.so
|
|
||||||
%dir %{_includedir}/%{_export_dir}
|
|
||||||
%{_includedir}/%{_export_dir}/dns
|
|
||||||
%{_includedir}/%{_export_dir}/dst
|
|
||||||
%{_includedir}/%{_export_dir}/irs
|
|
||||||
%{_includedir}/%{_export_dir}/isc
|
|
||||||
%dir %{_includedir}/%{_export_dir}/pk11
|
|
||||||
%{_includedir}/%{_export_dir}/pk11/site.h
|
|
||||||
%{_includedir}/%{_export_dir}/isccfg
|
|
||||||
%{_includedir}/%{_export_dir}/config.h
|
|
||||||
%{_mandir}/man1/isc-export-config.sh.1*
|
|
||||||
%{_mandir}/man1/bind9-export-config.1*
|
|
||||||
%attr(0755,root,root) %{_bindir}/isc-export-config.sh
|
|
||||||
%{_bindir}/bind9-export-config
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Feb 15 2018 Petr Menšík <pemensik@redhat.com> - 32:9.11.3-1.b1
|
* Thu Feb 15 2018 Petr Menšík <pemensik@redhat.com> - 32:9.11.3-1.b1
|
||||||
- Rebase to 9.11.3b1
|
- Rebase to 9.11.3b1
|
||||||
|
Loading…
Reference in New Issue
Block a user