From 77e8af6a960f1fe9b27721c93a01a819d696906c Mon Sep 17 00:00:00 2001 From: Paul Wouters Date: Fri, 22 Jan 2010 16:50:31 +0000 Subject: [PATCH] - Fix missing _ldns.so causing ldns-python to not work - Patch for installing ldns-python files - Patch for rpath in ldns-python - Don't install .a file for ldns-python --- ldns-installfix-r3167.patch | 13 +++++++++++++ ldns-rpathfix.patch | 23 +++++++++++++++++++++++ ldns.spec | 30 ++++++++++++++++++++---------- 3 files changed, 56 insertions(+), 10 deletions(-) create mode 100644 ldns-installfix-r3167.patch create mode 100644 ldns-rpathfix.patch diff --git a/ldns-installfix-r3167.patch b/ldns-installfix-r3167.patch new file mode 100644 index 0000000..1fbdfc8 --- /dev/null +++ b/ldns-installfix-r3167.patch @@ -0,0 +1,13 @@ +--- Makefile.in.org 2010-01-22 11:09:15.671232722 -0500 ++++ Makefile.in 2010-01-22 11:10:08.346392415 -0500 +@@ -203,8 +203,8 @@ + + install-pyldns: @PYLDNS@ + $(INSTALL) -m 755 -d $(DESTDIR)$(python_site)/ldns +- $(INSTALL) -c -m 644 $(pywrapdir)/ldns.py $(DESTDIR)$(python_site)/ldns/__init__.py +- $(INSTALL) -c -m 755 _ldns.* $(DESTDIR)$(python_site)/ldns/ ++ $(INSTALL) -c -m 644 $(pywrapdir)/ldns.py $(DESTDIR)$(python_site)/ldns.py ++ $(LIBTOOL) --mode=install cp _ldns.la $(DESTDIR)$(python_site) + + uninstall-pyldns: + rm -f $(DESTDIR)$(python_site)/ldns/* diff --git a/ldns-rpathfix.patch b/ldns-rpathfix.patch new file mode 100644 index 0000000..ed5b4d1 --- /dev/null +++ b/ldns-rpathfix.patch @@ -0,0 +1,23 @@ +Index: configure.ac +=================================================================== +--- configure.ac (revision 3167) ++++ configure.ac (working copy) +@@ -163,16 +163,8 @@ + fi + AC_SUBST(INSTALL_LDNS_CONFIG) + +-# add option to disable the evil rpath +-dnl Check whether to use rpath or not +-AC_ARG_ENABLE(rpath, +- [ --disable-rpath disable hardcoded rpath (default=enabled)], +- enable_rpath=$enableval, enable_rpath=yes) ++ACX_ARG_RPATH + +-if test "x$enable_rpath" = xyes; then +- RPATH_VAL="-Wl,-rpath=\${libdir}" +-fi +- + #AC_TRY_RUN( + #[ + #int main() + diff --git a/ldns.spec b/ldns.spec index 953f725..1010d35 100644 --- a/ldns.spec +++ b/ldns.spec @@ -8,7 +8,7 @@ Summary: Lowlevel DNS(SEC) library with API Name: ldns Version: 1.6.4 -Release: 1%{?dist} +Release: 2%{?dist} License: BSD Url: http://www.nlnetlabs.nl/%{name}/ Source: http://www.nlnetlabs.nl/downloads/%{name}-%{version}.tar.gz @@ -16,6 +16,8 @@ Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libtool, autoconf, automake, gcc-c++, doxygen, BuildRequires: perl, libpcap-devel, openssl-devel +Patch1: ldns-installfix-r3167.patch +Patch2: ldns-rpathfix.patch %if %{with_python} BuildRequires: python-devel, swig @@ -39,7 +41,7 @@ The devel package contains the ldns library and the include files %package python Summary: Python extensions for ldns Group: Applications/System -Requires: %{name}-libs = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description python Python extensions for ldns @@ -48,19 +50,22 @@ Python extensions for ldns %prep %setup -q +%patch1 +%patch2 # To built svn snapshots -#rm config.guess config.sub ltmain.sh -#libtoolize -#autoreconf +rm config.guess config.sub ltmain.sh +aclocal +libtoolize -c --install +autoreconf --install %build -%configure --disable-rpath --with-sha2 \ +%configure --disable-rpath --disable-static --with-sha2 \ %if %{with_python} --with-pyldns %endif -(cd drill ; %configure --disable-rpath --with-ldns=%{buildroot}/lib/ ) -(cd examples ; %configure --disable-rpath --with-ldns=%{buildroot}/lib/ ) +(cd drill ; %configure --disable-rpath --disable-static --with-ldns=%{buildroot}/lib/ ) +(cd examples ; %configure --disable-rpath --disable-static --with-ldns=%{buildroot}/lib/ ) make %{?_smp_mflags} ( cd drill ; make %{?_smp_mflags} ) @@ -75,7 +80,7 @@ make DESTDIR=%{buildroot} INSTALL="%{__install} -p" install-doc %if %{with_python} # remove execute perms from python files -chmod a-x %{buildroot}%{python_sitelib}/ldns/*py +chmod a-x %{buildroot}%{python_sitelib}/*py %endif # don't package building script in doc @@ -107,7 +112,6 @@ rm -rf %{buildroot} %files devel %defattr(-,root,root,-) -%{_libdir}/libldns.a %{_libdir}/libldns*so %{_bindir}/ldns-config %dir %{_includedir}/ldns @@ -125,6 +129,12 @@ rm -rf %{buildroot} %postun -p /sbin/ldconfig %changelog +* Fri Jan 22 2010 Paul Wouters - 1.6.4-2 +- Fix missing _ldns.so causing ldns-python to not work +- Patch for installing ldns-python files +- Patch for rpath in ldns-python +- Don't install .a file for ldns-python + * Wed Jan 20 2010 Paul Wouters - 1.6.4-1 - Upgraded to 1.6.4. - Added ldns-python sub package