[bitlbee/el5/master] It should build again.

Matej Cepl mcepl at fedoraproject.org
Mon Nov 22 02:29:43 UTC 2010


commit 72ecaeaa7e3f969e0fc866ff196bb6066310b139
Author: Matěj Cepl <mcepl at redhat.com>
Date:   Mon Nov 22 02:57:16 2010 +0100

    It should build again.

 bitlbee-1.2.8-strtoll.patch                        |   23 ---
 bitlbee-3.0-configure-eclipse.patch                |   16 --
 bitlbee-configure-eclipse.patch                    |   15 ++
 ....2.7-libresolv.patch => bitlbee-libresolv.patch |  152 ++++++++++----------
 bitlbee-3.0-nss.patch => bitlbee-nss.patch         |   34 ++----
 bitlbee-syslibdirs.patch                           |   12 ++
 bitlbee.spec                                       |   16 ++-
 7 files changed, 124 insertions(+), 144 deletions(-)
---
diff --git a/bitlbee-configure-eclipse.patch b/bitlbee-configure-eclipse.patch
new file mode 100644
index 0000000..2b16641
--- /dev/null
+++ b/bitlbee-configure-eclipse.patch
@@ -0,0 +1,15 @@
+diff -up bitlbee-3.0/configure.configureEclipse bitlbee-3.0/configure
+--- bitlbee-3.0/configure.configureEclipse	2010-11-22 02:37:09.000000000 +0100
++++ bitlbee-3.0/configure	2010-11-22 02:37:45.000000000 +0100
+@@ -128,8 +128,9 @@ LFLAGS=
+ EFLAGS=
+ EOF
+ 
+-srcdir="$(dirname $0)"
+-if [ "$srcdir" != "." ]; then
++srcdir=$(cd $(dirname $0);pwd)
++currdir=$(pwd)
++if [ "$srcdir" != "$currdir" ]; then
+ 	echo
+ 	echo "configure script run from a different directory. Will create some symlinks..."
+ 	if [ ! -e Makefile -o -L Makefile ]; then
diff --git a/bitlbee-1.2.7-libresolv.patch b/bitlbee-libresolv.patch
similarity index 69%
rename from bitlbee-1.2.7-libresolv.patch
rename to bitlbee-libresolv.patch
index 782e06e..e38171c 100644
--- a/bitlbee-1.2.7-libresolv.patch
+++ b/bitlbee-libresolv.patch
@@ -1,23 +1,7 @@
-Patch by Robert Scheck <robert at fedoraproject.org>, based on a patch by Matěj Cepl
-<mcepl at redhat.com> for bitlbee >= 1.2, to avoid static linking to a private glibc
-function, normally visible as libc.so.6(GLIBC_PRIVATE) in the binary RPM package.
-Glibc >= 2.9 allows dynamic linking using -lresolv for ns_initparse()/ns_parserr(),
-but Red Hat Enterprise Linux 4 and 5 (including derivates) are shipping older glibc
-versions. A few more information and details regarding this patch are mentioned in
-Red Hat Bugzilla ID #439047: https://bugzilla.redhat.com/show_bug.cgi?id=439047
-
---- bitlbee-1.2.7/configure			2010-04-19 15:10:03.000000000 +0200
-+++ bitlbee-1.2.7/configure.libresolv		2010-04-25 14:52:00.000000000 +0200
-@@ -19,7 +19,7 @@
- pidfile='/var/run/bitlbee.pid'
- ipcsocket='/var/run/bitlbee.sock'
- pcdir='$prefix/lib/pkgconfig'
--systemlibdirs="/lib /lib64 /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64"
-+systemlibdirs="/lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib"
- 
- msn=1
- jabber=1
-@@ -313,10 +313,10 @@
+diff -up bitlbee-3.0/configure.libresolv bitlbee-3.0/configure
+--- bitlbee-3.0/configure.libresolv	2010-11-22 02:38:33.000000000 +0100
++++ bitlbee-3.0/configure	2010-11-22 02:38:33.000000000 +0100
+@@ -348,10 +349,10 @@ detect_resolv_static()
  	TMPFILE=$(mktemp /tmp/bitlbee-configure.XXXXXX)
  	ret=1
  	for i in $systemlibdirs; do
@@ -30,19 +14,21 @@ Red Hat Bugzilla ID #439047: https://bugzilla.redhat.com/show_bug.cgi?id=439047
  				ret=0
  			fi
  		fi
---- bitlbee-1.2.7/lib/Makefile			2010-04-19 15:10:03.000000000 +0200
-+++ bitlbee-1.2.7/lib/Makefile.libresolv	2010-04-25 14:52:00.000000000 +0200
-@@ -9,7 +9,7 @@
- -include ../Makefile.settings
+diff -up bitlbee-3.0/lib/Makefile.libresolv bitlbee-3.0/lib/Makefile
+--- bitlbee-3.0/lib/Makefile.libresolv	2010-10-22 02:51:31.000000000 +0200
++++ bitlbee-3.0/lib/Makefile	2010-11-22 02:38:33.000000000 +0100
+@@ -12,7 +12,7 @@ SRCDIR := $(SRCDIR)lib/
+ endif
  
  # [SH] Program variables
--objects = arc.o base64.o $(EVENT_HANDLER) http_client.o ini.o md5.o misc.o oauth.o proxy.o sha1.o $(SSL_CLIENT) url.o xmltree.o
-+objects = arc.o base64.o $(EVENT_HANDLER) http_client.o ini.o md5.o misc.o oauth.o proxy.o sha1.o srv.o $(SSL_CLIENT) url.o xmltree.o
+-objects = arc.o base64.o $(DES) $(EVENT_HANDLER) ftutil.o http_client.o ini.o md5.o misc.o oauth.o proxy.o sha1.o $(SSL_CLIENT) url.o xmltree.o
++objects = arc.o base64.o $(DES) $(EVENT_HANDLER) ftutil.o http_client.o ini.o md5.o misc.o oauth.o proxy.o sha1.o srv.o $(SSL_CLIENT) url.o xmltree.o
  
- CFLAGS += -Wall
  LFLAGS += -r
---- bitlbee-1.2.7/lib/misc.c			2010-04-19 15:10:03.000000000 +0200
-+++ bitlbee-1.2.7/lib/misc.c.libresolv		2010-04-25 14:58:57.000000000 +0200
+ 
+diff -up bitlbee-3.0/lib/misc.c.libresolv bitlbee-3.0/lib/misc.c
+--- bitlbee-3.0/lib/misc.c.libresolv	2010-10-22 02:51:31.000000000 +0200
++++ bitlbee-3.0/lib/misc.c	2010-11-22 02:38:33.000000000 +0100
 @@ -44,6 +44,7 @@
  #ifdef HAVE_RESOLV_A
  #include <arpa/nameser.h>
@@ -51,20 +37,21 @@ Red Hat Bugzilla ID #439047: https://bugzilla.redhat.com/show_bug.cgi?id=439047
  #endif
  
  #include "md5.h"
-@@ -505,58 +506,6 @@
+@@ -514,66 +515,6 @@ int bool2int( char *value )
  	return 0;
  }
  
--struct ns_srv_reply *srv_lookup( char *service, char *protocol, char *domain )
+-struct ns_srv_reply **srv_lookup( char *service, char *protocol, char *domain )
 -{	
--	struct ns_srv_reply *reply = NULL;
+-	struct ns_srv_reply **replies = NULL;
 -#ifdef HAVE_RESOLV_A
+-	struct ns_srv_reply *reply = NULL;
 -	char name[1024];
 -	unsigned char querybuf[1024];
 -	const unsigned char *buf;
 -	ns_msg nsh;
 -	ns_rr rr;
--	int i, len, size;
+-	int i, n, len, size;
 -	
 -	g_snprintf( name, sizeof( name ), "_%s._%s.%s", service, protocol, domain );
 -	
@@ -74,44 +61,52 @@ Red Hat Bugzilla ID #439047: https://bugzilla.redhat.com/show_bug.cgi?id=439047
 -	if( ns_initparse( querybuf, size, &nsh ) != 0 )
 -		return NULL;
 -	
--	if( ns_parserr( &nsh, ns_s_an, 0, &rr ) != 0 )
--		return NULL;
--	
--	size = ns_rr_rdlen( rr );
--	buf = ns_rr_rdata( rr );
--	
--	len = 0;
--	for( i = 6; i < size && buf[i]; i += buf[i] + 1 )
--		len += buf[i] + 1;
--	
--	if( i > size )
--		return NULL;
--	
--	reply = g_malloc( sizeof( struct ns_srv_reply ) + len );
--	memcpy( reply->name, buf + 7, len );
--	
--	for( i = buf[6]; i < len && buf[7+i]; i += buf[7+i] + 1 )
--		reply->name[i] = '.';
--	
--	if( i > len )
+-	n = 0;
+-	while( ns_parserr( &nsh, ns_s_an, n, &rr ) == 0 )
 -	{
--		g_free( reply );
--		return NULL;
+-		size = ns_rr_rdlen( rr );
+-		buf = ns_rr_rdata( rr );
+-		
+-		len = 0;
+-		for( i = 6; i < size && buf[i]; i += buf[i] + 1 )
+-			len += buf[i] + 1;
+-		
+-		if( i > size )
+-			break;
+-		
+-		reply = g_malloc( sizeof( struct ns_srv_reply ) + len );
+-		memcpy( reply->name, buf + 7, len );
+-		
+-		for( i = buf[6]; i < len && buf[7+i]; i += buf[7+i] + 1 )
+-			reply->name[i] = '.';
+-		
+-		if( i > len )
+-		{
+-			g_free( reply );
+-			break;
+-		}
+-		
+-		reply->prio = ( buf[0] << 8 ) | buf[1];
+-		reply->weight = ( buf[2] << 8 ) | buf[3];
+-		reply->port = ( buf[4] << 8 ) | buf[5];
+-		
+-		n ++;
+-		replies = g_renew( struct ns_srv_reply *, replies, n + 1 );
+-		replies[n-1] = reply;
 -	}
--	
--	reply->prio = ( buf[0] << 8 ) | buf[1];
--	reply->weight = ( buf[2] << 8 ) | buf[3];
--	reply->port = ( buf[4] << 8 ) | buf[5];
+-	if( replies )
+-		replies[n] = NULL;
 -#endif
 -	
--	return reply;
+-	return replies;
 -}
 -
- /* Word wrapping. Yes, I know this isn't UTF-8 clean. I'm willing to take the risk. */
- char *word_wrap( const char *msg, int line_len )
+ void srv_free( struct ns_srv_reply **srv )
  {
---- bitlbee-1.2.7/lib/misc.h			2010-04-19 15:10:03.000000000 +0200
-+++ bitlbee-1.2.7/lib/misc.h.libresolv		2010-04-25 14:56:02.000000000 +0200
+ 	int i;
+diff -up bitlbee-3.0/lib/misc.h.libresolv bitlbee-3.0/lib/misc.h
+--- bitlbee-3.0/lib/misc.h.libresolv	2010-10-22 02:51:31.000000000 +0200
++++ bitlbee-3.0/lib/misc.h	2010-11-22 02:39:51.000000000 +0100
 @@ -28,14 +28,7 @@
  
  #include <gmodule.h>
@@ -128,8 +123,17 @@ Red Hat Bugzilla ID #439047: https://bugzilla.redhat.com/show_bug.cgi?id=439047
  
  G_MODULE_EXPORT void strip_linefeed( gchar *text );
  G_MODULE_EXPORT char *add_cr( char *text );
---- bitlbee-1.2.7/lib/srv.c			1970-01-01 01:00:00.000000000 +0100
-+++ bitlbee-1.2.7/lib/srv.c.libresolv		2010-04-25 14:58:24.000000000 +0200
+@@ -60,7 +53,6 @@ G_MODULE_EXPORT void random_bytes( unsig
+ G_MODULE_EXPORT int is_bool( char *value );
+ G_MODULE_EXPORT int bool2int( char *value );
+ 
+-G_MODULE_EXPORT struct ns_srv_reply **srv_lookup( char *service, char *protocol, char *domain );
+ G_MODULE_EXPORT void srv_free( struct ns_srv_reply **srv );
+ 
+ G_MODULE_EXPORT char *word_wrap( const char *msg, int line_len );
+diff -up /dev/null bitlbee-3.0/lib/srv.c
+--- /dev/null	2010-11-21 23:39:22.000456625 +0100
++++ bitlbee-3.0/lib/srv.c	2010-11-22 02:38:33.000000000 +0100
 @@ -0,0 +1,249 @@
 +/* srv.c - DNS SRV code
 + * Copyright (C) 2003 Free Software Foundation, Inc.
@@ -380,8 +384,9 @@ Red Hat Bugzilla ID #439047: https://bugzilla.redhat.com/show_bug.cgi?id=439047
 +	return 0;
 +}
 +#endif /* TEST */
---- bitlbee-1.2.7/lib/srv.h			1970-01-01 01:00:00.000000000 +0100
-+++ bitlbee-1.2.7/lib/srv.h.libresolv		2010-04-25 14:58:44.000000000 +0200
+diff -up /dev/null bitlbee-3.0/lib/srv.h
+--- /dev/null	2010-11-21 23:39:22.000456625 +0100
++++ bitlbee-3.0/lib/srv.h	2010-11-22 02:38:33.000000000 +0100
 @@ -0,0 +1,38 @@
 +/* srv.h
 + * Copyright (C) 2003, 2004 Free Software Foundation, Inc.
@@ -421,14 +426,15 @@ Red Hat Bugzilla ID #439047: https://bugzilla.redhat.com/show_bug.cgi?id=439047
 +struct ns_srv_reply *srv_lookup(char *service, char *protocol, char *domain);
 +
 +#endif /*GNUPG_COMMON_SRV_H*/
---- bitlbee-1.2.7/Makefile			2010-04-19 15:10:03.000000000 +0200
-+++ bitlbee-1.2.7/Makefile.libresolv		2010-04-25 14:52:00.000000000 +0200
+diff -up bitlbee-3.0/Makefile.libresolv bitlbee-3.0/Makefile
+--- bitlbee-3.0/Makefile.libresolv	2010-10-22 02:51:31.000000000 +0200
++++ bitlbee-3.0/Makefile	2010-11-22 02:38:33.000000000 +0100
 @@ -10,7 +10,7 @@
  
  # Program variables
- objects = account.o bitlbee.o chat.o crypting.o help.o ipc.o irc.o irc_commands.o nick.o query.o root_commands.o set.o storage.o $(STORAGE_OBJS) user.o
--headers = account.h bitlbee.h commands.h conf.h config.h crypting.h help.h ipc.h irc.h log.h nick.h query.h set.h sock.h storage.h user.h lib/events.h lib/http_client.h lib/ini.h lib/md5.h lib/misc.h lib/proxy.h lib/sha1.h lib/ssl_client.h lib/url.h protocols/nogaim.h
-+headers = account.h bitlbee.h commands.h conf.h config.h crypting.h help.h ipc.h irc.h log.h nick.h query.h set.h sock.h storage.h user.h lib/events.h lib/http_client.h lib/ini.h lib/md5.h lib/misc.h lib/proxy.h lib/sha1.h lib/srv.h lib/ssl_client.h lib/url.h protocols/nogaim.h
+ objects = bitlbee.o dcc.o help.o ipc.o irc.o irc_im.o irc_channel.o irc_commands.o irc_send.o irc_user.o irc_util.o nick.o $(OTR_BI) query.o root_commands.o set.o storage.o $(STORAGE_OBJS)
+-headers = bitlbee.h commands.h conf.h config.h help.h ipc.h irc.h log.h nick.h query.h set.h sock.h storage.h lib/events.h lib/ftutil.h lib/http_client.h lib/ini.h lib/md5.h lib/misc.h lib/proxy.h lib/sha1.h lib/ssl_client.h lib/url.h protocols/account.h protocols/bee.h protocols/ft.h protocols/nogaim.h
++headers = bitlbee.h commands.h conf.h config.h help.h ipc.h irc.h log.h nick.h query.h set.h sock.h storage.h lib/events.h lib/ftutil.h lib/http_client.h lib/ini.h lib/md5.h lib/misc.h lib/proxy.h lib/sha1.h lib/srv.h lib/ssl_client.h lib/url.h protocols/account.h protocols/bee.h protocols/ft.h protocols/nogaim.h
  subdirs = lib protocols
  
  ifeq ($(TARGET),i586-mingw32msvc)
diff --git a/bitlbee-3.0-nss.patch b/bitlbee-nss.patch
similarity index 85%
rename from bitlbee-3.0-nss.patch
rename to bitlbee-nss.patch
index 36abcef..344e139 100644
--- a/bitlbee-3.0-nss.patch
+++ b/bitlbee-nss.patch
@@ -1,22 +1,7 @@
-diff --git a/configure b/configure
-index ff68da8..be06d6a 100755
---- a/configure
-+++ b/configure
-@@ -288,10 +288,10 @@ EOF
- 
- detect_nss()
- {
--	if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG mozilla-nss; then
-+	if $PKG_CONFIG --version > /dev/null 2>/dev/null && $PKG_CONFIG nss; then
- 		cat<<EOF>>Makefile.settings
--EFLAGS+=`$PKG_CONFIG --libs mozilla-nss`
--CFLAGS+=`$PKG_CONFIG --cflags mozilla-nss`
-+EFLAGS+=`$PKG_CONFIG --libs nss`
-+CFLAGS+=`$PKG_CONFIG --cflags nss`
- EOF
- 		
- 		ssl=nss
-@@ -426,7 +426,7 @@ if [ "$ret" = "0" ]; then
+diff -up bitlbee-3.0/configure.nss bitlbee-3.0/configure
+--- bitlbee-3.0/configure.nss	2010-11-22 00:39:26.000000000 +0100
++++ bitlbee-3.0/configure	2010-11-22 00:39:46.000000000 +0100
+@@ -427,7 +427,7 @@ if [ "$ret" = "0" ]; then
  	exit 1
  fi;
  
@@ -25,10 +10,9 @@ index ff68da8..be06d6a 100755
  	# Needed for MSN only. OpenSSL exports nice cipher functions already,
  	# in case of GnuTLS we should be able to use gcrypt. Otherwise, use
  	# built-in stuff. (Since right now those are the only two supported
-diff --git a/lib/ssl_nss.c b/lib/ssl_nss.c
-index b0e2f9f..63a47f5 100644
---- a/lib/ssl_nss.c
-+++ b/lib/ssl_nss.c
+diff -up bitlbee-3.0/lib/ssl_nss.c.nss bitlbee-3.0/lib/ssl_nss.c
+--- bitlbee-3.0/lib/ssl_nss.c.nss	2010-10-22 02:51:31.000000000 +0200
++++ bitlbee-3.0/lib/ssl_nss.c	2010-11-22 00:39:46.000000000 +0100
 @@ -33,8 +33,10 @@
  #include <prio.h>
  #include <sslproto.h>
@@ -48,7 +32,7 @@ index b0e2f9f..63a47f5 100644
  
  
  static SECStatus nss_auth_cert (void *arg, PRFileDesc *socket, PRBool checksig, PRBool isserver)
-@@ -121,6 +124,35 @@ void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data
+@@ -121,6 +124,35 @@ void *ssl_connect( char *host, int port,
  	return( conn );
  }
  
@@ -84,7 +68,7 @@ index b0e2f9f..63a47f5 100644
  static gboolean ssl_connected( gpointer data, gint source, b_input_condition cond )
  {
  	struct scd *conn = data;
-@@ -200,3 +232,92 @@ b_input_condition ssl_getdirection( void *conn )
+@@ -200,3 +232,92 @@ b_input_condition ssl_getdirection( void
  	/* Just in case someone calls us, let's return the most likely case: */
  	return B_EV_IO_READ;
  }
diff --git a/bitlbee-syslibdirs.patch b/bitlbee-syslibdirs.patch
new file mode 100644
index 0000000..d48774f
--- /dev/null
+++ b/bitlbee-syslibdirs.patch
@@ -0,0 +1,12 @@
+diff -up bitlbee-3.0/configure.libresolv bitlbee-3.0/configure
+--- bitlbee-3.0/configure.libresolv	2010-10-22 02:51:31.000000000 +0200
++++ bitlbee-3.0/configure	2010-11-22 01:15:01.000000000 +0100
+@@ -19,7 +19,7 @@ libevent='/usr/'
+ pidfile='/var/run/bitlbee.pid'
+ ipcsocket='/var/run/bitlbee.sock'
+ pcdir='$prefix/lib/pkgconfig'
+-systemlibdirs="/lib /lib64 /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64"
++systemlibdirs="/lib64 /usr/lib64 /usr/local/lib64 /lib /usr/lib /usr/local/lib"
+ 
+ msn=1
+ jabber=1
diff --git a/bitlbee.spec b/bitlbee.spec
index cbfe03b..a428a3e 100644
--- a/bitlbee.spec
+++ b/bitlbee.spec
@@ -8,14 +8,15 @@ URL:               http://www.bitlbee.org/
 Source0:           http://get.bitlbee.org/src/%{name}-%{version}.tar.gz
 Source1:           bitlbee.xinetd
 Source2:           bitlbee-wrapper.h
-Patch0:            bitlbee-1.2.7-libresolv.patch
-Patch1:            bitlbee-3.0-nss.patch
-Patch2:            bitlbee-3.0-configure-eclipse.patch
+Patch0:            bitlbee-syslibdirs.patch
+Patch1:            bitlbee-libresolv.patch
+Patch2:            bitlbee-nss.patch
+Patch3:            bitlbee-configure-eclipse.patch
 Requires:          xinetd
 Requires(pre):     shadow-utils
 Requires(preun):   /sbin/service
 BuildRequires:     glib2-devel >= 2.4, libxslt
-%if 0%{?fedora}%{?rhel}
+%if 0%{?fedora}%{?rhel} < 6
 BuildRequires:     gnutls-devel
 %else
 BuildRequires:     openssl-devel
@@ -39,11 +40,12 @@ developing programs and plugins which use bitlbee.
 
 %prep
 %setup -q
+%patch0 -p1 -b .syslibdir
 %if 0%{?fedora}%{?rhel} < 6
-%patch0 -p1 -b .libresolv
+%patch1 -p1 -b .libresolv
 %endif
-%patch1 -p1 -b .nss
-%patch2 -p1 -b .configureEclipse
+%patch2 -p1 -b .nss
+%patch3 -p1 -b .configureEclipse
 
 %build
 CFLAGS="$RPM_OPT_FLAGS" ./configure \


More information about the scm-commits mailing list