Sisyphus repositório
Última atualização: 18 novembro 2019 | SRPMs: 17519 | Visitas: 15779418
en ru br
ALT Linux repositórios
S:9.11.12-alt1
5.0: 9.3.6-alt5
4.1: 9.3.6-alt4.M41.2
+updates:9.3.6-alt4.M41.1
4.0: 9.3.6-alt4.M41.1
+updates:9.3.6-alt4.M41.1
3.0: 9.2.4.rel-alt2

Group :: Sistema/Servidores
RPM: bind

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Name: bind
Version: 9.3.6
Release: alt5

Summary: ISC BIND - DNS server
License: BSD-style
Group: System/Servers
Url: http://www.isc.org/products/BIND/
Packager: Dmitry V. Levin <ldv at altlinux.org>

%define vsuffix %nil
%define srcname %name-%version%vsuffix
# ftp://ftp.isc.org/isc/bind9/%version%vsuffix/bind-%version%vsuffix.tar.gz
Source0: %srcname.tar
Source2: rfc1912.txt
Source3: bind.README.bind-devel
Source4: bind.README.ALT

Source11: bind.init
Source12: lwresd.init

Source21: rndc.conf
Source22: rndc.key

Source31: bind.named.conf
Source32: bind.options.conf
Source33: bind.rndc.conf
Source34: bind.local.conf
Source35: bind.rfc1912.conf
Source36: bind.rfc1918.conf

Source41: bind.localhost
Source42: bind.localdomain
Source43: bind.127.in-addr.arpa
Source44: bind.empty

Patch0: bind-9.3.6-owl-warnings.patch
Patch1: bind-9.3.6-openbsd-owl-pidfile.patch
Patch2: bind-9.3.6-openbsd-owl-chroot-defaults.patch
Patch3: bind-9.3.6-alt-owl-chroot.patch
Patch4: bind-9.3.6-owl-checkconf-chroot.patch
Patch5: bind-9.3.6-rh-h_errno.patch
Patch6: bind-9.3.6-alt-isc-config.patch
Patch7: bind-9.3.6-alt-man.patch
Patch8: bind-9.3.6-alt-owl-rndc-confgen.patch
Patch9: bind-9.3.6-owl-rfc-index.patch
Patch10: bind-9.3.6-alt-nofile.patch
Patch11: bind-9.3.6-up-CVE-2009-0696.patch

# root directory for chrooted environment.

%define _chrootdir %_localstatedir/bind

# common directory for documentation.

%define docdir %_docdir/bind-%version

%ifndef timestamp
%define timestamp %(TZ=UTC LC_TIME=C date +%%Y%%m%%d)
%endif

%def_disable static
%def_disable ipv6
%def_with openssl

Provides: bind-chroot(%_chrootdir)
Obsoletes: bind-chroot, bind-debug, bind-slave, caching-nameserver
# Because of /etc/syslog.d/ feature.
Conflicts: syslogd < 1.4.1-alt11
PreReq: bind-control chrooted syslogd-daemon
PreReq: libbind = %version-%release

# due to %_chrootdir/dev/log

BuildPreReq: coreutils

# due to broken configure script

BuildPreReq: gcc-c++

%{?_with_openssl:BuildPreReq: libssl-devel}

%package utils
Summary: Utilities provided by ISC BIND
Group: Networking/Other
Requires: libbind = %version-%release

%package -n libbind
Summary: Shared library used by ISC BIND
Group: System/Libraries
Provides: libdns = %version-%release
Provides: libisc = %version-%release
Provides: libisccc = %version-%release
Provides: libisccfg = %version-%release
Provides: liblwres = %version-%release
Obsoletes: libdns8, libdns9, libdns10, libdns11, libdns16
Obsoletes: libisc4, libisc7, libisccc0, libisccfg0, liblwres1

%package devel
Summary: ISC BIND development libraries and headers
Group: Development/C
Requires: libbind = %version-%release

%package devel-static
Summary: ISC BIND static development libraries
Group: Development/C
Requires: %name-devel = %version-%release

%package doc
Summary: Documentation for ISC BIND
Group: Development/Other
BuildArch: noarch
Prefix: %prefix

%package -n lwresd
Summary: Lightweight resolver daemon
Group: System/Servers
PreReq: /var/resolv, chkconfig, shadow-utils
Requires: libbind = %version-%release

%description
The Berkeley Internet Name Domain (BIND) implements an Internet domain
name server.  BIND is the most widely-used name server software on the
Internet, and is supported by the Internet Software Consortium (ISC).

This package provides the server and related configuration files.

%description utils
This package contains various utilities related to DNS that are
derived from the BIND source tree, including dig, host, nslookup
and nsupdate.

%description -n libbind
This package contains shared libraries used by BIND's daemons
and clients.

%description devel
This package contains development libraries, header files, and API man
pages for libdns, libisc, libisccc, libisccfg and liblwres.  These are
only needed if you want to compile packages that need more nameserver
API than the resolver code provided by glibc.

%description devel-static
This package contains development static libraries, header files, and
API man pages for libdns, libisc, libisccc, libisccfg and liblwres.
These are only needed if you want to compile statically linked packages
that need more nameserver API than the resolver code provided by glibc.

%description doc
This package provides various documents that are useful for maintaining a
working BIND installation.

%description -n lwresd
This package contains lwresd, the daemon providing name lookup services
to clients that use the BIND 9 lightweight resolver library.  It is
essentially a stripped-down, caching-only name server that answers
queries using the BIND 9 lightweight resolver protocol rather than
the DNS protocol.

%prep
%setup -q -n %srcname
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1

install -pm644 %_sourcedir/rfc1912.txt doc/rfc/
install -pm644 %_sourcedir/bind.README.bind-devel README.bind-devel
install -pm644 %_sourcedir/bind.README.ALT README.ALT

mkdir addon
install -pm644 %_sourcedir/{bind,lwresd}.init addon/
install -pm644 %_sourcedir/bind.{named,options,rndc,local,rfc1912,rfc1918}.conf \
addon/
install -pm644 %_sourcedir/bind.{localhost,localdomain,127.in-addr.arpa,empty} \
addon/
install -pm644 %_sourcedir/rndc.{conf,key} addon/

find -type f -print0 |
xargs -r0 grep -lZ ' at [A-Z_]\+ at ' -- |
xargs -r0 sed -i \
'
s, at ROOT at ,%_chrootdir,g;
s, at LWRESD_ROOT at ,/var/resolv,g;
s, at DOCDIR at ,%docdir,g;
s, at SBINDIR at ,%_sbindir,g;
' --

%build
CPP="%__cpp"; export CPP
%configure \
--localstatedir=/var \
--with-libtool \
--with-randomdev=/dev/random \
--disable-threads \
--disable-linux-caps \
%{subst_with openssl} \
%{subst_enable ipv6} \
%{subst_enable static} \
--disable-openssl-version-check
# SMP-incompatible build.
%__make

# Build queryperf

pushd contrib/queryperf
%configure
%make_build
popd # contrib/queryperf

%install
rln()
{
local target=$1 && shift
local source=$1 && shift
target=`relative "$target" "$source"`
ln -snf "$target" "%buildroot$source"
}

%make_install install DESTDIR=%buildroot

# Install queryperf.

install -pm755 contrib/queryperf/queryperf %buildroot%_sbindir/

# Install startup scripts.

install -pD -m755 addon/bind.init %buildroot%_initdir/bind
install -pD -m755 addon/lwresd.init %buildroot%_initdir/lwresd

# Install configurations files

install -pm600 addon/rndc.conf %buildroot%_sysconfdir/

# Create a chrooted environment...

mkdir -p %buildroot%_chrootdir/{dev,%_sysconfdir,var/{run,tmp},zone/slave}
for n in named options rndc local rfc1912 rfc1918; do
install -pm640 "addon/bind.$n.conf" \
"%buildroot%_chrootdir%_sysconfdir/$n.conf"
done
for n in localhost localdomain 127.in-addr.arpa empty; do
install -pm640 "addon/bind.$n" \
"%buildroot%_chrootdir/zone/$n"
sed -i s/YYYYMMDDNN/%{timestamp}00/ \
"%buildroot%_chrootdir/zone/$n"
done
install -pm640 addon/rndc.key %buildroot%_chrootdir%_sysconfdir/
rln %_chrootdir%_sysconfdir/named.conf %_sysconfdir/

# Make use of syslogd-1.4.1-alt11 /etc/syslog.d/ feature.

/usr/bin/mksock %buildroot%_chrootdir/dev/log
mkdir %buildroot%_sysconfdir/syslog.d
ln -s %_chrootdir/dev/log %buildroot%_sysconfdir/syslog.d/bind
#... end of the chroot configuration.

# Create ndc compatibility symlinks.

ln -s rndc %buildroot%_sbindir/ndc
ln -s rndc.8 %buildroot%_man8dir/ndc.8

# Create ghost files

touch %buildroot/var/run/{named,lwresd}.pid

# Package documentation files

mkdir -p %buildroot%docdir
cp -a CHANGES COPYRIGHT FAQ README* \
doc/{arm,draft,misc,rfc} \
%buildroot%docdir/
install -pm644 contrib/queryperf/README %buildroot%docdir/README.queryperf

bzip2 -9q %buildroot%docdir/{*/*.txt,FAQ,CHANGES}
rm -fv %buildroot%docdir/*/{Makefile*,README-SGML,*.dsl*,*.sh*,*.xml}

%pre
/usr/sbin/groupadd -r -f named
/usr/sbin/useradd -r -g named -d %_chrootdir -s /dev/null -n -c "Domain Name Server" named >/dev/null 2>&1 ||:
[ -f %_initdir/named -a ! -L %_initdir/named ] && /sbin/chkconfig --del named ||:
%pre_control bind-debug bind-slave

%preun
%preun_service bind

%post
SYSLOGD_SCRIPT=/etc/init.d/syslogd
SYSLOGD_CONFIG=/etc/sysconfig/syslogd
if grep -qs '^SYSLOGD_OPTIONS=.*-a %_chrootdir/dev/log' "$SYSLOGD_CONFIG"; then
# Remove artefacts of pre-syslog.d epoch.
sed -i 's|^\(SYSLOGD_OPTIONS=.*\) \?-a %_chrootdir/dev/log|\1|' "$SYSLOGD_CONFIG"
if [ -x "$SYSLOGD_SCRIPT" ]; then
"$SYSLOGD_SCRIPT" condreload ||:
fi
fi

%post_control -s disabled bind-debug bind-slave
%post_service bind

%pre -n lwresd
/usr/sbin/groupadd -r -f lwresd
/usr/sbin/useradd -r -g lwresd -d / -s /dev/null -n -c "Lightweight Resolver Daemon" lwresd >/dev/null 2>&1 ||:

%post -n lwresd
%post_service lwresd

%preun -n lwresd
%preun_service lwresd

%files -n libbind
%_libdir/lib*.so.*
%dir %docdir
%docdir/COPYRIGHT

%files -n lwresd
%config %_initdir/lwresd
%_sbindir/lwresd
%_man8dir/lwresd.*
%ghost %attr(644,root,root) /var/run/lwresd.pid

%files devel
%_libdir/*.so
%_bindir/isc-config.sh
%_includedir/*
%_man3dir/*
%dir %docdir
%docdir/README.bind-devel

%if_enabled static
%files devel-static
%_libdir/*.a
%endif

%files
%exclude %_sbindir/lwresd
%_sbindir/*

%_sysconfdir/named.conf
%config %_initdir/bind
%config(noreplace) %_sysconfdir/rndc.conf

%_man5dir/named.conf.*
%_man5dir/rndc.conf.*
%_man8dir/dnssec*
%_man8dir/named*
%_man8dir/*ndc*

%dir %docdir
%docdir/README*
%docdir/FAQ*
%docdir/misc
%exclude %docdir/README.bind-devel

%ghost %attr(644,root,root) /var/run/named.pid

#chroot

%_sysconfdir/syslog.d/*
%defattr(640,root,named,710)
%dir %_chrootdir
%dir %_chrootdir/dev
%dir %_chrootdir%_sysconfdir
%dir %_chrootdir/zone
%dir %attr(700,root,named) %verify(not mode) %_chrootdir/zone/slave
%dir %attr(700,root,named) %verify(not mode) %_chrootdir/var
%dir %attr(1770,root,named) %_chrootdir/var/run
%dir %attr(1770,root,named) %_chrootdir/var/tmp
%config(noreplace) %_chrootdir%_sysconfdir/*.conf
%config(noreplace) %verify(not md5 mtime size) %_chrootdir%_sysconfdir/rndc.key
%config %_chrootdir/zone/localhost
%config %_chrootdir/zone/localdomain
%config %_chrootdir/zone/127.in-addr.arpa
%config %_chrootdir/zone/empty

%ghost %attr(666,root,root) %_chrootdir/dev/*

%files utils
%_bindir/dig
%_bindir/host
%_bindir/nslookup
%_bindir/nsupdate
%_man1dir/dig.*
%_man1dir/host.*
%_man1dir/nslookup.*
%_man1dir/nsupdate.*

%files doc
%docdir
%exclude %docdir/README.bind-devel

%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009