From dab82c1e27728103d46ccb183948f4f510e1fe361d5852a469c7b7ca4584eb75 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 16 Oct 2014 14:25:14 +0000 Subject: [PATCH] Accepting request 253555 from home:jengelh:branches:network the IDN parts are totally optional OBS-URL: https://build.opensuse.org/request/show/253555 OBS-URL: https://build.opensuse.org/package/show/network/bind?expand=0&rev=151 --- baselibs.conf | 31 ++-- bind.changes | 8 + bind.spec | 408 ++++++++++++++++++++++++++++++++++++++------------ runidn.diff | 34 +++++ 4 files changed, 373 insertions(+), 108 deletions(-) create mode 100644 runidn.diff diff --git a/baselibs.conf b/baselibs.conf index 1785748..0dc2632 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,9 +1,22 @@ -bind-libs - obsoletes "bind-utils-" - provides "bind-utils-" -arch ppc package bind-devel - requires -bind- - requires "bind-libs- = " -arch sparcv9 package bind-devel - requires -bind- - requires "bind-libs- = " +libbind9-90 +libdns100 +libidnkit1 +libidnkitlite1 +libidnkitres1 +libisc95 + obsoletes "bind-libs = " + provides "bind-libs = " +libisccc90 +libisccfg90 +liblwres90 +bind-devel + requires -bind- + requires "libbind9-90- = " + requires "libisc95- = " + requires "libisccc90- = " + requires "libisccfg90- = " + requires "liblwres90- = " +idnkit-devel + requires "libdns100- = " + requires "libidnkit1- = " + requires "libidnkitlite1- = " diff --git a/bind.changes b/bind.changes index c3f8227..5cd6a71 100644 --- a/bind.changes +++ b/bind.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Oct 1 15:26:40 UTC 2014 - jengelh@inai.de + +- Implement shlib packaging guidelines and give an improved + description on the library components +- Put idnkit components in separate packages +- Add runidn.diff to resolve runidn not working at all + ------------------------------------------------------------------- Mon Sep 8 21:10:50 UTC 2014 - werner@suse.de diff --git a/bind.spec b/bind.spec index 1332d39..9daa1d9 100644 --- a/bind.spec +++ b/bind.spec @@ -19,31 +19,14 @@ Name: bind %define pkg_name bind %define pkg_vers 9.9.5-P1 -BuildRequires: krb5-devel -BuildRequires: libcap -BuildRequires: libcap-devel -BuildRequires: libmysqlclient-devel -BuildRequires: libtool -BuildRequires: libxml2-devel -BuildRequires: openldap2-devel -BuildRequires: openssl -BuildRequires: openssl-devel -BuildRequires: python-base -BuildRequires: update-desktop-files +%define rpm_vers 9.9.5P1 +%define idn_vers 1.0 Summary: Domain Name System (DNS) Server (named) License: ISC Group: Productivity/Networking/DNS/Servers -Version: 9.9.5P1 +Version: %rpm_vers Release: 0 -Provides: bind8 -Provides: bind9 -Provides: dns_daemon -Obsoletes: bind8 -Obsoletes: bind9 -Requires: %{name}-chrootenv -Requires: %{name}-utils -PreReq: %fillup_prereq %insserv_prereq bind-utils /bin/grep /bin/sed /bin/mkdir /usr/bin/tee /bin/chmod /bin/chown /bin/mv /bin/cat /usr/bin/dirname /usr/bin/diff /usr/bin/old /usr/sbin/groupadd /usr/sbin/useradd /usr/sbin/usermod -Url: http://isc.org/sw/bind/ + Source: ftp://ftp.isc.org/isc/bind9/%{pkg_vers}/bind-%{pkg_vers}.tar.gz Source3: ftp://ftp.isc.org/isc/bind9/%{pkg_vers}/bind-%{pkg_vers}.tar.gz.asc # from http://www.isc.org/about/openpgp/ ... changes yearly apparently. @@ -60,6 +43,27 @@ Patch51: pie_compile.diff Patch52: named-bootconf.diff Patch53: bind-sdb-ldap.patch Patch100: configure.in.diff2 +Patch101: runidn.diff +BuildRequires: krb5-devel +BuildRequires: libcap +BuildRequires: libcap-devel +BuildRequires: libmysqlclient-devel +BuildRequires: libtool +BuildRequires: libxml2-devel +BuildRequires: openldap2-devel +BuildRequires: openssl +BuildRequires: openssl-devel +BuildRequires: python-base +BuildRequires: update-desktop-files +Provides: bind8 +Provides: bind9 +Provides: dns_daemon +Obsoletes: bind8 +Obsoletes: bind9 +Requires: %{name}-chrootenv +Requires: %{name}-utils +PreReq: %fillup_prereq %insserv_prereq bind-utils /bin/grep /bin/sed /bin/mkdir /usr/bin/tee /bin/chmod /bin/chown /bin/mv /bin/cat /usr/bin/dirname /usr/bin/diff /usr/bin/old /usr/sbin/groupadd /usr/sbin/useradd /usr/sbin/usermod +Url: http://isc.org/sw/bind/ %if 0%{?suse_version} > 1220 BuildRequires: gpg-offline %endif @@ -101,9 +105,167 @@ Name System (DNS) protocols and provides an openly redistributable reference implementation of the major components of the Domain Name System. This package includes the components to operate a DNS server. +%package -n idnkit +Summary: Toolkit for internationalized domain names +Group: Productivity/Networking/DNS/Utilities +Version: %idn_vers +Release: 0 +# Added on 2014-10-01 +Provides: bind-utils:%_bindir/idnconv +Provides: bind-utils:%_bindir/runidn + +%description -n idnkit +idnkit is a toolkit for handling internationalized domain names. It +consists of the following components. + +* library for handling internationalized domain names (libidnkit) +* codeset conversion utility (idnconv) +* a command which adds IDN feature dynamically to Unix applications + (runidn) + +%package -n idnkit-devel +Summary: Development files for idnkit +Group: Development/Libraries/C and C++ +Version: %idn_vers +Release: 0 +Provides: bind-devel:%_includedir/bind/idn +Requires: libidnkit1 = %idn_vers +Requires: libidnkitlite1 = %idn_vers +Requires: libidnkitres1 = %idn_vers + +%description -n idnkit-devel +idnkit is a toolkit for handling internationalized domain names. This +subpackage contains the header files needed for building programs +with it. + +%package -n libbind9-90 +Summary: BIND9 shared library used by BIND +Group: System/Libraries +Version: %rpm_vers +Release: 0 + +%description -n libbind9-90 +This library contains a few utility functions used by the BIND +server and utilities. + +%package -n libdns100 +Summary: DNS library uesd by BIND +Group: System/Libraries +Version: %rpm_vers +Release: 0 + +%description -n libdns100 +This subpackage contains the "DNS client" module. This is a higher +level API that provides an interface to name resolution, single DNS +transaction with a particular server, and dynamic update. Regarding +name resolution, it supports advanced features such as DNSSEC +validation and caching. This module supports both synchronous and +asynchronous mode. + +It also contains the Advanced Database (ADB) and Simple Database +(SDB) APIs. ADB allows user-written routines to replace BIND’s +internal database function for both nominated and all zones. SDB +allows a user-written driver to supply zone data either from +alternate data sources (for instance, a relational database) or using +specialized algorithms (for instance, for load-balancing). +[Book links for SDB: "Pro DNS and BIND 10", R. Aitchison, Apress] + +%package -n libidnkit1 +Summary: BIND Internationalized Domain Names library +Group: System/Libraries +Version: %idn_vers +Release: 0 + +%description -n libidnkit1 +The libidnkit library support various manipulations of +internationalized domain names. + +libidnkit internally uses iconv function to provide encoding +conversion from UTF-8 to the local encoding (such as ISO-8859-1, +usually determined by the current locale), and vise versa. + +%package -n libidnkitlite1 +Summary: BIND Internationalized Domain Names lightweight library +Group: System/Libraries +Version: %idn_vers +Release: 0 + +%description -n libidnkitlite1 +The libidnkitlite library support various manipulations of +internationalized domain names. + +libidnkitlite is lightweight version of libidnkit. It assumes local +encoding is UTF-8 so that it never uses iconv. + +%package -n libidnkitres1 +Summary: Resolver function library with IDN support +Group: System/Libraries +Version: %idn_vers +Release: 0 + +%description -n libidnkitres1 +libidnkitres is a LD_PRELOAD-able library which provides a modified +version of resolver functions (gethostbyname, getaddrinfo, etc.) +which implement features for handling internationalized domain names. + +%package -n libisc95 +Summary: ISC shared library uesd by BIND +Group: System/Libraries +Version: %rpm_vers +Release: 0 +# Added on 2014-10-01. Does not really matter where it is put, we just need to +# flush the old name from the rpmdb. The libs will be automatically pulled in +# by way of rpm symbol requirements already. +Obsoletes: bind-libs = %version-%release +Provides: bind-libs < %version-%release + +%description -n libisc95 +This library contains miscellaneous utility function used by the BIND +server and utilities. It includes functions for assertion handling, +balanced binary (AVL) trees, bit masks comparison, event based +programs, heap-based priority queues, memory handling, and program +logging. + +%package -n libisccc90 +Summary: Command Channel Library used by BIND +Group: System/Libraries +Version: %rpm_vers +Release: 0 + +%description -n libisccc90 +This library is used for communicating with BIND servers' +administrative command channel (port 953 by default). + +%package -n libisccfg90 +Summary: Exported ISC configuration shared library +Group: System/Libraries +Version: %rpm_vers +Release: 0 + +%description -n libisccfg90 +This BIND library contains the configuration file parser + +%package -n liblwres90 +Summary: Lightweight Resolver API library +Group: System/Libraries +Version: %rpm_vers +Release: 0 + +%description -n liblwres90 +The BIND 9 lightweight resolver library is a name service independent +stub resolver library. It provides hostname-to-address and +address-to-hostname lookup services to applications by transmitting +lookup requests to a resolver daemon, lwresd, running on the local +host. The resover daemon performs the lookup using the DNS or +possibly other name service protocols, and returns the results to the +application through the library. The library and resolver daemon +communicate using a UDP-based protocol. + %package chrootenv Summary: Chroot environment for BIND named and lwresd Group: Productivity/Networking/DNS/Servers +Version: %rpm_vers +Release: 0 PreReq: /usr/sbin/groupadd /usr/sbin/useradd %description chrootenv @@ -114,7 +276,14 @@ structure below /var/lib/named. %package devel Summary: Development Libraries and Header Files of BIND Group: Development/Libraries/C and C++ -Requires: %{name}-libs = %{version} +Version: %rpm_vers +Release: 0 +Requires: libbind9-90 = %version +Requires: libdns100 = %version +Requires: libisc95 = %version +Requires: libisccc90 = %version +Requires: libisccfg90 = %version +Requires: liblwres90 = %version Provides: bind8-devel Provides: bind9-devel Obsoletes: bind8-devel @@ -134,6 +303,8 @@ System (DNS) protocols. %package doc Summary: BIND documentation Group: Documentation/Other +Version: %rpm_vers +Release: 0 %if 0%{?suse_version} >= 1120 BuildArch: noarch %endif @@ -143,23 +314,11 @@ Documentation of the Berkeley Internet Name Domain (BIND) Domain Name System implementation of the Domain Name System (DNS) protocols. This includes also the BIND Administrator Reference Manual (ARM). -%package libs -Summary: Shared libraries of BIND -Group: Development/Libraries/C and C++ -# bug437293 -%ifarch ppc64 -Obsoletes: bind-libs-64bit -%endif -# - -%description libs -This package contains the shared libraries of the Berkeley Internet -Name Domain (BIND) Domain Name System implementation of the Domain Name -System (DNS) protocols. - %package lwresd Summary: Lightweight Resolver Daemon Group: Productivity/Networking/DNS/Utilities +Version: %rpm_vers +Release: 0 Requires: %{name}-chrootenv Provides: dns_daemon PreReq: /usr/sbin/groupadd /usr/sbin/useradd @@ -178,6 +337,8 @@ protocol. %package utils Summary: Utilities to query and test DNS Group: Productivity/Networking/DNS/Utilities +Version: %rpm_vers +Release: 0 Provides: bind9-utils Provides: bindutil Provides: dns_utils @@ -214,6 +375,7 @@ Name Domain (BIND) DNS server is found in the package named bind. %if 0%{?suse_version} <= 1010 %patch100 -p1 %endif +%patch101 -p1 %patch200 -p0 # modify settings of some files regarding to OS version and vendor function replaceStrings() @@ -537,6 +699,25 @@ fi %insserv_cleanup %service_del_postun named +%post -n libbind9-90 -p /sbin/ldconfig +%postun -n libbind9-90 -p /sbin/ldconfig +%post -n libdns100 -p /sbin/ldconfig +%postun -n libdns100 -p /sbin/ldconfig +%post -n libidnkit1 -p /sbin/ldconfig +%postun -n libidnkit1 -p /sbin/ldconfig +%post -n libidnkitlite1 -p /sbin/ldconfig +%postun -n libidnkitlite1 -p /sbin/ldconfig +%post -n libidnkitres1 -p /sbin/ldconfig +%postun -n libidnkitres1 -p /sbin/ldconfig +%post -n libisc95 -p /sbin/ldconfig +%postun -n libisc95 -p /sbin/ldconfig +%post -n libisccc90 -p /sbin/ldconfig +%postun -n libisccc90 -p /sbin/ldconfig +%post -n libisccfg90 -p /sbin/ldconfig +%postun -n libisccfg90 -p /sbin/ldconfig +%post -n liblwres90 -p /sbin/ldconfig +%postun -n liblwres90 -p /sbin/ldconfig + %pre chrootenv %{GROUPADD_NAMED} %{USERADD_NAMED} @@ -585,10 +766,6 @@ if [ -x usr/sbin/lwresd -a ! -f etc/rndc.key ]; then fi # --------------------------------------------------------------------------- -%post libs -p /sbin/ldconfig - -%postun libs -p /sbin/ldconfig - %files %defattr(-,root,root) %attr(0644,root,named) %config(noreplace) /%{_sysconfdir}/named.conf @@ -603,12 +780,12 @@ fi %{_sbindir}/named-checkconf %{_sbindir}/named-checkzone %{_sbindir}/named-compilezone -%doc %{_mandir}/man1/bind9-config.1.gz -%doc %{_mandir}/man5/named.conf.5.gz -%doc %{_mandir}/man8/named-checkconf.8.gz -%doc %{_mandir}/man8/named-checkzone.8.gz -%doc %{_mandir}/man8/named.8.gz -%doc %{_mandir}/man8/named-compilezone.8.gz +%{_mandir}/man1/bind9-config.1.gz +%{_mandir}/man5/named.conf.5.gz +%{_mandir}/man8/named-checkconf.8.gz +%{_mandir}/man8/named-checkzone.8.gz +%{_mandir}/man8/named.8.gz +%{_mandir}/man8/named-compilezone.8.gz %dir %{_datadir}/bind %{_datadir}/bind/createNamedConfInclude %{_datadir}/bind/ldapdump @@ -623,6 +800,62 @@ fi %attr(0644,root,named) %ghost %{_var}/lib/named/etc/named.conf.include %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/bind +%files -n idnkit +%defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/idn.conf +%config(noreplace) %{_sysconfdir}/idnalias.conf +%{_bindir}/idnconv +%{_bindir}/runidn +%{_mandir}/man1/idnconv.1.gz +%{_mandir}/man1/runidn.1.gz +%{_mandir}/man5/idn.conf.5.gz +%{_mandir}/man5/idnalias.conf.5.gz +%{_mandir}/man5/idnrc.5.gz +%{_datadir}/idnkit/ + +%files -n idnkit-devel +%defattr(-,root,root) +%dir %_includedir/bind/ +%_includedir/bind/idn/ +%_libdir/libidn*.so +%_mandir/man3/libidn*.3* + +%files -n libbind9-90 +%defattr(-,root,root) +%_libdir/libbind9.so.90* + +%files -n libdns100 +%defattr(-,root,root) +%_libdir/libdns.so.100* + +%files -n libidnkit1 +%defattr(-,root,root) +%_libdir/libidnkit.so.1* + +%files -n libidnkitlite1 +%defattr(-,root,root) +%_libdir/libidnkitlite.so.1* + +%files -n libidnkitres1 +%defattr(-,root,root) +%_libdir/libidnkitres.so.1* + +%files -n libisc95 +%defattr(-,root,root) +%_libdir/libisc.so.95* + +%files -n libisccc90 +%defattr(-,root,root) +%_libdir/libisccc.so.90* + +%files -n libisccfg90 +%defattr(-,root,root) +%_libdir/libisccfg.so.90* + +%files -n liblwres90 +%defattr(-,root,root) +%_libdir/liblwres.so.90* + %files chrootenv %defattr(-,root,root) %dir %{_var}/lib/named @@ -647,41 +880,28 @@ fi %files devel %defattr(-,root,root) %{_bindir}/isc-config.sh -#%{_libdir}/*.a -%{_libdir}/*.so -#%{_libdir}/libbind.la -#%{_libdir}/libbind9.la -#%{_libdir}/libdns.la -#%{_libdir}/libidnkit.la -#%{_libdir}/libidnkitlite.la -#%{_libdir}/libisc.la -#%{_libdir}/libisccc.la -#%{_libdir}/libisccfg.la -#%{_libdir}/liblwres.la +%{_libdir}/libbind9.so +%{_libdir}/libdns.so +%{_libdir}/libisc*.so +%{_libdir}/liblwres.so %{_includedir}/bind -%doc %{_mandir}/man3/* +%exclude %{_includedir}/bind/idn +%{_mandir}/man3/lwres*.3* %files doc -f filelist-bind-doc %defattr(-,root,root) %dir %doc %{_defaultdocdir}/bind %doc %{_datadir}/susehelp -%files libs -%defattr(-,root,root) -%{_libdir}/*.so.* -#%{_libdir}/libidnkitres.la - %files lwresd %defattr(-,root,root) %config /etc/init.d/lwresd %{_sbindir}/rclwresd %{_sbindir}/lwresd -%doc %{_mandir}/man8/lwresd.8.gz +%{_mandir}/man8/lwresd.8.gz %files utils %defattr(-,root,root) -%config(noreplace) %{_sysconfdir}/idn.conf -%config(noreplace) %{_sysconfdir}/idnalias.conf %dir /etc/named.d %config(noreplace) /etc/named.d/rndc-access.conf %config(noreplace) /etc/bind.keys @@ -691,11 +911,9 @@ fi %attr(0444,root,root) %config %{_sysconfdir}/openldap/schema/dlz.schema %{_bindir}/dig %{_bindir}/host -%{_bindir}/idnconv %{_bindir}/nslookup %{_bindir}/nsupdate %{_bindir}/genDDNSkey -%{_bindir}/runidn %{_sbindir}/arpaname %{_sbindir}/ddns-confgen %if 0%{?suse_version} > 1110 @@ -716,40 +934,32 @@ fi %{_sbindir}/nsec3hash %{_sbindir}/rndc %{_sbindir}/rndc-confgen -%dir %{_datadir}/idnkit -%{_datadir}/idnkit/jp.map %dir %doc %{_defaultdocdir}/bind %{_defaultdocdir}/bind/README.%{VENDOR} -%doc %{_mandir}/man1/arpaname.1.gz -%doc %{_mandir}/man1/dig.1.gz -%doc %{_mandir}/man1/host.1.gz -%doc %{_mandir}/man1/isc-config.sh.1.gz -%doc %{_mandir}/man1/nslookup.1.gz -%doc %{_mandir}/man1/nsupdate.1.gz -%doc %{_mandir}/man5/rndc.conf.5.gz -%doc %{_mandir}/man8/ddns-confgen.8.gz +%{_mandir}/man1/arpaname.1.gz +%{_mandir}/man1/dig.1.gz +%{_mandir}/man1/host.1.gz +%{_mandir}/man1/isc-config.sh.1.gz +%{_mandir}/man1/nslookup.1.gz +%{_mandir}/man1/nsupdate.1.gz +%{_mandir}/man5/rndc.conf.5.gz +%{_mandir}/man8/ddns-confgen.8.gz %if 0%{?suse_version} > 1110 -%doc %{_mandir}/man8/dnssec-checkds.8.gz -%doc %{_mandir}/man8/dnssec-coverage.8.gz +%{_mandir}/man8/dnssec-checkds.8.gz +%{_mandir}/man8/dnssec-coverage.8.gz %endif -%doc %{_mandir}/man8/dnssec-dsfromkey.8.gz -%doc %{_mandir}/man8/dnssec-keyfromlabel.8.gz -%doc %{_mandir}/man8/dnssec-keygen.8.gz -%doc %{_mandir}/man8/dnssec-revoke.8.gz -%doc %{_mandir}/man8/dnssec-settime.8.gz -%doc %{_mandir}/man8/dnssec-signzone.8.gz -%doc %{_mandir}/man8/dnssec-verify.8.gz -%doc %{_mandir}/man8/genrandom.8.gz -%doc %{_mandir}/man8/isc-hmac-fixup.8.gz -%doc %{_mandir}/man8/named-journalprint.8.gz -%doc %{_mandir}/man8/nsec3hash.8.gz -%doc %{_mandir}/man8/rndc.8.gz -%doc %{_mandir}/man8/rndc-confgen.8.gz -# idn kit -%doc %{_mandir}/man1/idnconv.1.gz -%doc %{_mandir}/man1/runidn.1.gz -%doc %{_mandir}/man5/idn.conf.5.gz -%doc %{_mandir}/man5/idnalias.conf.5.gz -%doc %{_mandir}/man5/idnrc.5.gz +%{_mandir}/man8/dnssec-dsfromkey.8.gz +%{_mandir}/man8/dnssec-keyfromlabel.8.gz +%{_mandir}/man8/dnssec-keygen.8.gz +%{_mandir}/man8/dnssec-revoke.8.gz +%{_mandir}/man8/dnssec-settime.8.gz +%{_mandir}/man8/dnssec-signzone.8.gz +%{_mandir}/man8/dnssec-verify.8.gz +%{_mandir}/man8/genrandom.8.gz +%{_mandir}/man8/isc-hmac-fixup.8.gz +%{_mandir}/man8/named-journalprint.8.gz +%{_mandir}/man8/nsec3hash.8.gz +%{_mandir}/man8/rndc.8.gz +%{_mandir}/man8/rndc-confgen.8.gz %changelog diff --git a/runidn.diff b/runidn.diff new file mode 100644 index 0000000..4769bb8 --- /dev/null +++ b/runidn.diff @@ -0,0 +1,34 @@ +From: Jan Engelhardt +Date: 2014-10-01 19:52:10.339340849 +0200 + +We do not normally ship the .la files in openSUSE; +make runidn work without it. +And do it portably (\$LIB), too, which the original runidn can't. +--- + contrib/idn/idnkit-1.0-src/tools/runidn/runidn.in | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: bind-9.9.5-P1/contrib/idn/idnkit-1.0-src/tools/runidn/runidn.in +=================================================================== +--- bind-9.9.5-P1.orig/contrib/idn/idnkit-1.0-src/tools/runidn/runidn.in ++++ bind-9.9.5-P1/contrib/idn/idnkit-1.0-src/tools/runidn/runidn.in +@@ -79,6 +79,7 @@ if test "$iconv_file" != none; then + preload="$iconv_file@PRELOAD_SEP@" + fi + ++if false; then + prefix=@prefix@ + exec_prefix=@exec_prefix@ + libdir=`echo @libdir@` +@@ -96,6 +97,11 @@ EOF + exit 1 + fi + preload=$preload$libdir/$dlname ++else ++prefix=$(echo "@prefix@") ++exec_prefix=$(echo "@exec_prefix@") ++preload="$exec_prefix/\$LIB/libidnkitres.so.1" ++fi + + # Set @PRELOAD_VAR@. + if [ X$@PRELOAD_VAR@ = X ]; then