[packages/echoping] Make all plugins work

baggins baggins at pld-linux.org
Mon Aug 20 22:54:31 CEST 2012


commit 723f6cdebacfc5b51b1216c3538fd3e3f542a108
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Aug 20 22:50:29 2012 +0200

    Make all plugins work
    
    Fix https://bugs.launchpad.net/pld-linux/+bug/590720 by making
    plugins non-versioned and applying slightly modified patch from
    reporter.
    Also removed libs package, as it is completely unneeded.
    Release 7

 echoping-no-versioned-modules.patch | 134 ++++++++++++++++++++++++++++++++++++
 echoping-so.patch                   |  12 ++++
 echoping.spec                       |  75 ++++++++++----------
 3 files changed, 184 insertions(+), 37 deletions(-)
---
diff --git a/echoping.spec b/echoping.spec
index 9585c74..0cf8dea 100644
--- a/echoping.spec
+++ b/echoping.spec
@@ -2,23 +2,25 @@ Summary:	Non-suid ping
 Summary(pl.UTF-8):	ping bez suida
 Name:		echoping
 Version:	6.0.2
-Release:	6
+Release:	7
 License:	GPL v2
 Group:		Networking/Admin
 Source0:	http://dl.sourceforge.net/echoping/%{name}-%{version}.tar.gz
 # Source0-md5:	991478532b56ab3b6f46ea9fa332626f
+Patch0:		echoping-no-versioned-modules.patch
+Patch1:		echoping-so.patch
 URL:		http://echoping.sourceforge.net/
+BuildRequires:	autoconf
+BuildRequires:	automake
 BuildRequires:	libidn-devel
+BuildRequires:	libtool
 BuildRequires:	openldap-devel >= 2.4.6
 BuildRequires:	openssl-devel
 BuildRequires:	popt-devel
 BuildRequires:	postgresql-devel
-Requires:	%{name}-libs = %{version}-%{release}
+Obsoletes:	echoping-libs
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%undefine	__cxx
-%define		skip_post_check_so	dns.so.0.0.0 ldap.so.0.0.0 postgresql.so.0.0.0 whois.so.0.0.0
-
 %description
 "echoping" is a small program to test (approximatively) performances
 of a remote host by sending it TCP "echo" (or other protocol, such as
@@ -33,7 +35,7 @@ protokołu, jak np. HTTP).
 Summary:	Header files for echoping library
 Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki echoping
 Group:		Development/Libraries
-Requires:	%{name}-libs = %{version}-%{release}
+Requires:	%{name} = %{version}-%{release}
 
 %description devel
 Header files for echoping library.
@@ -41,25 +43,37 @@ Header files for echoping library.
 %description devel -l pl.UTF-8
 Pliki nagłówkowe echoping library.
 
-%package libs
-Summary:	echoping libraries
-Summary(pl.UTF-8):	Biblioteki echoping
-Group:		Libraries
-
-%description libs
-echoping libraries.
-
-%description libs -l pl.UTF-8
-Biblioteki echoping.
-
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %build
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+cd plugins
+%{__libtoolize}
+%{__aclocal} -I .
+%{__autoconf}
+%{__automake}
+cd -
+for d in dns ldap postgresql random whois ; do
+	cd plugins/$d
+	%{__libtoolize}
+	%{__aclocal}
+	%{__autoconf}
+	%{__autoheader}
+	%{__automake}
+	cd -
+done
 %configure \
 	--with-ssl \
 	--without-gnutls \
 	--disable-static
+
 %{__make}
 
 %install
@@ -68,7 +82,7 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-rm -f $RPM_BUILD_ROOT%{_libdir}/echoping/*.la
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/echoping/*.la
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -77,28 +91,15 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog DETAILS PLUGINS README TODO
 %attr(755,root,root) %{_bindir}/echoping
+%dir %{_libdir}/echoping
+%attr(755,root,root) %{_libdir}/echoping/dns.so
+%attr(755,root,root) %{_libdir}/echoping/ldap.so
+%attr(755,root,root) %{_libdir}/echoping/postgresql.so
+%attr(755,root,root) %{_libdir}/echoping/random.so
+%attr(755,root,root) %{_libdir}/echoping/whois.so
 %{_mandir}/man1/echoping*
 
 %files devel
 %defattr(644,root,root,755)
-%{_libdir}/echoping/dns.so
-%{_libdir}/echoping/ldap.so
-%{_libdir}/echoping/postgresql.so
-%{_libdir}/echoping/random.so
-%{_libdir}/echoping/whois.so
 %dir %{_includedir}/echoping
 %{_includedir}/echoping/*.h
-
-%files libs
-%defattr(644,root,root,755)
-%dir %{_libdir}/echoping
-%attr(755,root,root) %{_libdir}/echoping/dns.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/echoping/dns.so.0
-%attr(755,root,root) %{_libdir}/echoping/ldap.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/echoping/ldap.so.0
-%attr(755,root,root) %{_libdir}/echoping/postgresql.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/echoping/postgresql.so.0
-%attr(755,root,root) %{_libdir}/echoping/random.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/echoping/random.so.0
-%attr(755,root,root) %{_libdir}/echoping/whois.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/echoping/whois.so.0
diff --git a/echoping-no-versioned-modules.patch b/echoping-no-versioned-modules.patch
new file mode 100644
index 0000000..4d91cc8
--- /dev/null
+++ b/echoping-no-versioned-modules.patch
@@ -0,0 +1,134 @@
+--- echoping-6.0.2/configure-common.ac~	2007-04-09 21:52:54.000000000 +0200
++++ echoping-6.0.2/configure-common.ac	2012-08-20 22:39:19.663323545 +0200
+@@ -1,5 +1,4 @@
+ dnl $Id: configure-common.ac 410 2007-04-09 19:49:29Z bortz $
+-AC_INIT(echoping, 6.0.2, bortz at users.sourceforge.net)
+ AC_CANONICAL_HOST
+ AC_PROG_CC(cc gcc)
+ AC_LIBTOOL_DLOPEN
+diff -ur echoping-6.0.2/configure.ac echoping-6.0.2-avoid-version/configure.ac
+--- echoping-6.0.2/configure.ac	2007-04-05 14:40:49.000000000 +0200
++++ echoping-6.0.2-avoid-version/configure.ac	2012-08-20 22:35:50.029991729 +0200
+@@ -1,6 +1,7 @@
+ dnl $Id: configure.ac 401 2007-04-05 12:26:38Z bortz $
+ 
+ dnl Process this file with autoconf to produce a configure script.
++AC_INIT(echoping, 6.0.2, bortz at users.sourceforge.net)
+ 
+ m4_include(configure-common.ac)
+ AM_INIT_AUTOMAKE
+diff -ur echoping-6.0.2/plugins/configure.ac echoping-6.0.2-avoid-version/plugins/configure.ac
+--- echoping-6.0.2/plugins/configure.ac	2007-04-09 21:27:15.000000000 +0200
++++ echoping-6.0.2-avoid-version/plugins/configure.ac	2012-08-20 22:36:18.866658187 +0200
+@@ -1,4 +1,5 @@
+ dnl $Id: configure.ac 407 2007-04-09 19:20:13Z bortz $
++AC_INIT(echoping, 6.0.2, bortz at users.sourceforge.net)
+ 
+ m4_include(../configure-common.ac)
+ AM_INIT_AUTOMAKE(foreign)
+diff -ur echoping-6.0.2/plugins/dns/configure.ac echoping-6.0.2-avoid-version/plugins/dns/configure.ac
+--- echoping-6.0.2/plugins/dns/configure.ac	2007-04-05 14:40:48.000000000 +0200
++++ echoping-6.0.2-avoid-version/plugins/dns/configure.ac	2012-08-20 22:35:56.929991680 +0200
+@@ -1,4 +1,5 @@
+ dnl $Id: configure.ac 377 2007-03-12 20:48:05Z bortz $
++AC_INIT(echoping, 6.0.2, bortz at users.sourceforge.net)
+ 
+ m4_include([../../configure-common.ac])
+ AM_INIT_AUTOMAKE(foreign)
+diff -ur echoping-6.0.2/plugins/dns/Makefile.am echoping-6.0.2-avoid-version/plugins/dns/Makefile.am
+--- echoping-6.0.2/plugins/dns/Makefile.am	2007-04-05 14:40:48.000000000 +0200
++++ echoping-6.0.2-avoid-version/plugins/dns/Makefile.am	2012-08-20 21:49:39.688195883 +0200
+@@ -1,7 +1,7 @@
+ if DNSBUILD
+ pkglib_LTLIBRARIES = dns.la
+ dns_la_SOURCES = dns.c
+-dns_la_LDFLAGS = -module
++dns_la_LDFLAGS = -module -avoid-version
+ endif
+ 
+ man_MANS = echoping_dns.1
+diff -ur echoping-6.0.2/plugins/ldap/configure.ac echoping-6.0.2-avoid-version/plugins/ldap/configure.ac
+--- echoping-6.0.2/plugins/ldap/configure.ac	2007-04-05 14:40:48.000000000 +0200
++++ echoping-6.0.2-avoid-version/plugins/ldap/configure.ac	2012-08-20 22:36:02.746658304 +0200
+@@ -1,4 +1,5 @@
+ dnl $Id: configure.ac 377 2007-03-12 20:48:05Z bortz $
++AC_INIT(echoping, 6.0.2, bortz at users.sourceforge.net)
+ 
+ m4_include([../../configure-common.ac])
+ AM_INIT_AUTOMAKE(foreign)
+diff -ur echoping-6.0.2/plugins/ldap/Makefile.am echoping-6.0.2-avoid-version/plugins/ldap/Makefile.am
+--- echoping-6.0.2/plugins/ldap/Makefile.am	2007-04-05 14:40:48.000000000 +0200
++++ echoping-6.0.2-avoid-version/plugins/ldap/Makefile.am	2012-08-20 21:49:46.858195831 +0200
+@@ -1,7 +1,7 @@
+ if LDAPBUILD
+ pkglib_LTLIBRARIES = ldap.la
+ ldap_la_SOURCES = ldap.c
+-ldap_la_LDFLAGS = -module
++ldap_la_LDFLAGS = -module -avoid-version
+ endif
+ man_MANS = echoping_ldap.1
+ 
+diff -ur echoping-6.0.2/plugins/postgresql/configure.ac echoping-6.0.2-avoid-version/plugins/postgresql/configure.ac
+--- echoping-6.0.2/plugins/postgresql/configure.ac	2007-04-05 14:40:48.000000000 +0200
++++ echoping-6.0.2-avoid-version/plugins/postgresql/configure.ac	2012-08-20 22:36:06.306658278 +0200
+@@ -1,4 +1,5 @@
+ dnl $Id: configure.ac 377 2007-03-12 20:48:05Z bortz $
++AC_INIT(echoping, 6.0.2, bortz at users.sourceforge.net)
+ 
+ m4_include([../../configure-common.ac])
+ AM_INIT_AUTOMAKE(foreign)
+diff -ur echoping-6.0.2/plugins/postgresql/Makefile.am echoping-6.0.2-avoid-version/plugins/postgresql/Makefile.am
+--- echoping-6.0.2/plugins/postgresql/Makefile.am	2007-04-05 14:40:48.000000000 +0200
++++ echoping-6.0.2-avoid-version/plugins/postgresql/Makefile.am	2012-08-20 21:49:52.708195789 +0200
+@@ -1,7 +1,7 @@
+ if PGSQLBUILD
+ pkglib_LTLIBRARIES = postgresql.la
+ postgresql_la_SOURCES = postgresql.c
+-postgresql_la_LDFLAGS = -module
++postgresql_la_LDFLAGS = -module -avoid-version
+ endif
+ man_MANS = echoping_postgresql.1
+ 
+diff -ur echoping-6.0.2/plugins/random/configure.ac echoping-6.0.2-avoid-version/plugins/random/configure.ac
+--- echoping-6.0.2/plugins/random/configure.ac	2007-04-05 14:40:48.000000000 +0200
++++ echoping-6.0.2-avoid-version/plugins/random/configure.ac	2012-08-20 22:36:10.193324918 +0200
+@@ -1,4 +1,5 @@
+ dnl $Id: configure.ac 377 2007-03-12 20:48:05Z bortz $
++AC_INIT(echoping, 6.0.2, bortz at users.sourceforge.net)
+ 
+ m4_include(../../configure-common.ac)
+ AM_INIT_AUTOMAKE(foreign)
+diff -ur echoping-6.0.2/plugins/random/Makefile.am echoping-6.0.2-avoid-version/plugins/random/Makefile.am
+--- echoping-6.0.2/plugins/random/Makefile.am	2007-04-05 14:40:48.000000000 +0200
++++ echoping-6.0.2-avoid-version/plugins/random/Makefile.am	2012-08-20 21:49:57.104862424 +0200
+@@ -1,6 +1,6 @@
+ pkglib_LTLIBRARIES = random.la
+ random_la_SOURCES = random.c
+-random_la_LDFLAGS = -module
++random_la_LDFLAGS = -module -avoid-version
+ man_MANS = echoping_random.1
+ 
+-EXTRA_DIST = $(man_MANS)
+\ No newline at end of file
++EXTRA_DIST = $(man_MANS)
+diff -ur echoping-6.0.2/plugins/whois/configure.ac echoping-6.0.2-avoid-version/plugins/whois/configure.ac
+--- echoping-6.0.2/plugins/whois/configure.ac	2007-04-05 14:40:48.000000000 +0200
++++ echoping-6.0.2-avoid-version/plugins/whois/configure.ac	2012-08-20 22:36:15.036658216 +0200
+@@ -1,4 +1,5 @@
+ dnl $Id: configure.ac 377 2007-03-12 20:48:05Z bortz $
++AC_INIT(echoping, 6.0.2, bortz at users.sourceforge.net)
+ 
+ m4_include([../../configure-common.ac])
+ AM_INIT_AUTOMAKE(foreign)
+diff -ur echoping-6.0.2/plugins/whois/Makefile.am echoping-6.0.2-avoid-version/plugins/whois/Makefile.am
+--- echoping-6.0.2/plugins/whois/Makefile.am	2007-04-05 14:40:48.000000000 +0200
++++ echoping-6.0.2-avoid-version/plugins/whois/Makefile.am	2012-08-20 21:50:01.441529059 +0200
+@@ -2,7 +2,7 @@
+ 
+ pkglib_LTLIBRARIES = whois.la
+ whois_la_SOURCES = whois.c
+-whois_la_LDFLAGS = -module
++whois_la_LDFLAGS = -module -avoid-version
+ man_MANS = echoping_whois.1
+ 
+ EXTRA_DIST = $(man_MANS) test.sh
diff --git a/echoping-so.patch b/echoping-so.patch
new file mode 100644
index 0000000..092fb3a
--- /dev/null
+++ b/echoping-so.patch
@@ -0,0 +1,12 @@
+diff -Nru echoping-6.0.2-orig/echoping.c echoping-6.0.2/echoping.c
+--- echoping-6.0.2-orig/echoping.c	2007-04-05 14:40:49.000000000 +0200
++++ echoping-6.0.2/echoping.c	2010-06-07 10:31:23.000000000 +0200
+@@ -473,7 +473,7 @@
+ 	if (plugin_name) {
+ 		ext = strstr(plugin_name, ".so");
+ 		if ((ext == NULL) || (strcmp(ext, ".so") != 0))
+-			sprintf(plugin_name, "%s.so", plugin_name);
++			strcat(plugin_name, ".so");
+ 		plugin = dlopen(plugin_name, RTLD_NOW);
+ 		if (!plugin) {
+ 			/* Retries with the absolute name */


More information about the pld-cvs-commit mailing list