diff options
-rw-r--r-- | bitlbee.conf | 3 | ||||
-rw-r--r-- | debian/changelog | 30 | ||||
-rw-r--r-- | debian/control | 14 | ||||
-rwxr-xr-x | debian/rules | 16 | ||||
-rw-r--r-- | doc/user-guide/commands.xml | 2 | ||||
-rw-r--r-- | lib/events_glib.c | 3 | ||||
-rw-r--r-- | lib/http_client.c | 1 | ||||
-rw-r--r-- | protocols/jabber/io.c | 3 | ||||
-rw-r--r-- | protocols/jabber/jabber.c | 32 | ||||
-rw-r--r-- | protocols/jabber/jabber.h | 2 | ||||
-rw-r--r-- | unix.c | 6 |
11 files changed, 88 insertions, 24 deletions
diff --git a/bitlbee.conf b/bitlbee.conf index e0b74f41..50bb060f 100644 --- a/bitlbee.conf +++ b/bitlbee.conf @@ -138,6 +138,9 @@ ## installed). As long as the line is commented out, SSL certificate ## verification is completely disabled. ## +## The location of this file may be different on other distros/OSes. For +## example, try /etc/ssl/ca-bundle.pem on OpenSUSE. +## # CAfile = /etc/ssl/certs/ca-certificates.crt [defaults] diff --git a/debian/changelog b/debian/changelog index 5702b417..590d7b90 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,23 +1,41 @@ -bitlbee (3.0.4-1) unstable; urgency=low +bitlbee (3.0.4+z-2) UNRELEASED; urgency=low + + * Removed some version override stuff from Debian build scripts. Instead, + my buildbot now uses dch to generate a changelog entry with the right + version number. + + -- Wilmer van der Gaast <wilmer@gaast.net> Fri, 23 Dec 2011 09:45:55 +0100 + +bitlbee (3.0.4+bzr855-1) unstable; urgency=low * New upstream release. + * This is not a vanilla 3.0.4 tree but a Bazaar snapshot. The source + release was a few weeks ago by now. There should be no significant + differences. * Added bitlbee-plugin-skype and skyped packages, now part of BitlBee - instead of a separate package. - * Fixed dependencies of bitlbee-plugin-otr package to not break with - binary MTUs. (Closes: #651612) + instead of a separate package. Not building these for Debian for now + though since python-skype was removed. * ^B and some other things are stripped in outgoing XMPP stanzas. (Closes: #507856) * OTR module linking fix. Not with the fix from the Debian bug but with one from bugs.bitlbee.org. I hope that covers it. (Closes: #646369) * Closing a few old bugs that were filed against the Debian package - instead of upstream: + instead of/as well as upstream: - Joining password-protected MUCs is working for a while already, set the password using "chan set". (Closes: #615624) - "Headline:" msgs (Closes: #605459) - Yahoo! was fixed long ago and Etch is deprecated. (Closes: #476529) - identi.ca support is documented. (Closes: #613789) - -- Wilmer van der Gaast <wilmer@gaast.net> Sun, 11 Dec 2011 16:53:31 +0000 + -- Wilmer van der Gaast <wilmer@gaast.net> Tue, 20 Dec 2011 12:46:42 +0100 + +bitlbee (3.0.3-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Use the standard ${source:Version} and ${binary:Version} substvars instead + of the custom and broken ${bee:Version} (closes: #651612). + + -- Julien Cristau <jcristau@debian.org> Thu, 15 Dec 2011 20:34:32 +0100 bitlbee (3.0.3-1) unstable; urgency=low diff --git a/debian/control b/debian/control index 41fc0366..181feccb 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ DM-Upload-Allowed: yes Package: bitlbee Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, debianutils (>= 1.16), bitlbee-common (= ${bee:Version}) +Depends: ${misc:Depends}, ${shlibs:Depends}, debianutils (>= 1.16), bitlbee-common (= ${source:Version}) Conflicts: bitlbee-libpurple Replaces: bitlbee-libpurple Description: An IRC to other chat networks gateway (default version) @@ -21,7 +21,7 @@ Description: An IRC to other chat networks gateway (default version) Package: bitlbee-libpurple Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, debianutils (>= 1.16), bitlbee-common (= ${bee:Version}) +Depends: ${misc:Depends}, ${shlibs:Depends}, debianutils (>= 1.16), bitlbee-common (= ${source:Version}) Conflicts: bitlbee Replaces: bitlbee Description: An IRC to other chat networks gateway (using libpurple) @@ -50,7 +50,7 @@ Description: An IRC to other chat networks gateway (common files/docs) Package: bitlbee-dev Architecture: all -Depends: ${misc:Depends}, bitlbee (>= ${bee:Version}), bitlbee (<< ${bee:Version}.1~), bitlbee-common (= ${bee:Version}) +Depends: ${misc:Depends}, bitlbee (>= ${source:Version}), bitlbee (<< ${source:Version}.1~), bitlbee-common (= ${source:Version}) Description: An IRC to other chat networks gateway (dev files) This program can be used as an IRC server which forwards everything you say to people on other chat networks: Jabber (which includes Google Talk @@ -60,7 +60,7 @@ Description: An IRC to other chat networks gateway (dev files) Package: bitlbee-plugin-otr Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, bitlbee (>= ${bee:Version}) | bitlbee-libpurple (>= ${bee:Version}), bitlbee (<< ${bee:Version}.1~) | bitlbee-libpurple (<< ${bee:Version}.1~), bitlbee-common (= ${bee:Version}) +Depends: ${misc:Depends}, ${shlibs:Depends}, bitlbee (= ${binary:Version}) | bitlbee-libpurple (= ${binary:Version}), bitlbee-common (= ${source:Version}) Description: An IRC to other chat networks gateway (OTR plugin) This program can be used as an IRC server which forwards everything you say to people on other chat networks: Jabber (which includes Google Talk @@ -71,7 +71,7 @@ Description: An IRC to other chat networks gateway (OTR plugin) Package: bitlbee-plugin-skype Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, bitlbee (>= ${bee:Version}) | bitlbee-libpurple (>= ${bee:Version}), bitlbee (<< ${bee:Version}.1~) | bitlbee-libpurple (<< ${bee:Version}.1~) +Depends: ${misc:Depends}, ${shlibs:Depends}, bitlbee (= ${binary:Version}) | bitlbee-libpurple (= ${binary:Version}), bitlbee-common (= ${source:Version}) Recommends: skyped Description: An IRC to other chat networks gateway (Skype plugin) This program can be used as an IRC server which forwards everything you @@ -82,8 +82,8 @@ Description: An IRC to other chat networks gateway (Skype plugin) You need to download and install the Skype client for this to work. Package: skyped -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, python (>= 2.5), python-gnutls, python-skype (>=0.9.28.7) +Architecture: all +Depends: ${misc:Depends}, ${shlibs:Depends}, python (>= 2.5), python-gnutls, python-skype (>=0.9.28.7) Recommends: skype Description: Daemon to control Skype remotely Daemon to control the GUI Skype client. Currently required to control Skype diff --git a/debian/rules b/debian/rules index 57d60090..2c9e3a12 100755 --- a/debian/rules +++ b/debian/rules @@ -7,16 +7,18 @@ # exercise is over now. # -# Include the bitlbee-libpurple variant and OTR plugin by default +# Include the bitlbee-libpurple variant and OTR plugin by default. +# Don't build skype by default since it depends on deleted/non-free +# packages. Need to at least get python-skype back into Debian. BITLBEE_LIBPURPLE ?= 1 BITLBEE_OTR ?= plugin -BITLBEE_SKYPE ?= plugin +BITLBEE_SKYPE ?= 0 BITLBEE_CONFIGURE_FLAGS ?= DEBUG ?= 0 ifndef BITLBEE_VERSION # Want to use the full package version number instead of just the release. -BITLBEE_CONFIGURE_VERSION ?= BITLBEE_VERSION=\"$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}')\" +BITLBEE_CONFIGURE_VERSION ?= BITLBEE_VERSION=\"$(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')\" endif ifneq ($(BITLBEE_LIBPURPLE),1) @@ -71,11 +73,13 @@ install: build $(MAKE) -C debian/build-native install-plugin-otr DESTDIR=`pwd`/debian/bitlbee-plugin-otr $(MAKE) -C debian/build-native install-plugin-skype DESTDIR=`pwd`/debian/skyped +ifneq ($(BITLBEE_SKYPE),0) mkdir -p debian/bitlbee-plugin-skype/usr mv debian/skyped/usr/lib debian/bitlbee-plugin-skype/usr mkdir -p debian/skyped/usr/share/man/man1 mv debian/bitlbee-common/usr/share/man/man1/skyped* debian/skyped/usr/share/man/man1 +endif ifeq ($(BITLBEE_LIBPURPLE),1) $(MAKE) -C debian/build-libpurple install-bin DESTDIR=`pwd`/debian/bitlbee-libpurple @@ -105,11 +109,7 @@ binary-common: dh_fixperms dh_installdeb dh_shlibdeps -ifdef BITLBEE_VERSION - dh_gencontrol -- -v$(BITLBEE_VERSION) -Vbee:Version=$(BITLBEE_VERSION) -else - dh_gencontrol -- -Vbee:Version=$(shell dpkg-parsechangelog | grep ^Version: | awk '{print $$2}' | sed -e 's/+b[0-9]\+$$//') -endif + dh_gencontrol dh_md5sums dh_builddeb diff --git a/doc/user-guide/commands.xml b/doc/user-guide/commands.xml index eb050c31..8fc58c9e 100644 --- a/doc/user-guide/commands.xml +++ b/doc/user-guide/commands.xml @@ -1501,7 +1501,7 @@ </para> <para> - Please note that no certificate verification is performed when the <emphasis>ssl</emphasis> setting is used, or when the CAfile setting in bitlbee.conf is not set. + Please note that no certificate verification is performed when the <emphasis>ssl</emphasis> setting is used, or when the <emphasis>CAfile</emphasis> setting in <emphasis>bitlbee.conf</emphasis> is not set. </para> </description> </bitlbee-setting> diff --git a/lib/events_glib.c b/lib/events_glib.c index 3fafc872..8f53fbbf 100644 --- a/lib/events_glib.c +++ b/lib/events_glib.c @@ -74,6 +74,9 @@ static gboolean gaim_io_invoke(GIOChannel *source, GIOCondition condition, gpoin GaimIOClosure *closure = data; b_input_condition gaim_cond = 0; gboolean st; + + if (condition & G_IO_NVAL) + return FALSE; if (condition & GAIM_READ_COND) gaim_cond |= B_EV_IO_READ; diff --git a/lib/http_client.c b/lib/http_client.c index 514daf80..98a99f7c 100644 --- a/lib/http_client.c +++ b/lib/http_client.c @@ -172,7 +172,6 @@ error: static gboolean http_ssl_connected( gpointer data, int returncode, void *source, b_input_condition cond ) { - //The returncode is not used at the moment. struct http_request *req = data; if( source == NULL ) diff --git a/protocols/jabber/io.c b/protocols/jabber/io.c index 5b9149af..385c45c4 100644 --- a/protocols/jabber/io.c +++ b/protocols/jabber/io.c @@ -172,6 +172,9 @@ static gboolean jabber_read_callback( gpointer data, gint fd, b_input_condition if( st > 0 ) { + if( jd->flags & JFLAG_MOCK ) + return TRUE; + /* Parse. */ if( xt_feed( jd->xt, buf, st ) < 0 ) { diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index 372d73a9..2856f1b6 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -338,6 +338,25 @@ static int jabber_buddy_msg( struct im_connection *ic, char *who, char *message, if( g_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 ) return jabber_write( ic, message, strlen( message ) ); + + if( g_strcasecmp( who, JABBER_MOCK_HANDLE ) == 0 ) + { + /* Parse. */ + if( xt_feed( jd->xt, message, strlen( message ) ) < 0 ) + { + imcb_error( ic, "XML stream error" ); + imc_logout( ic, TRUE ); + return FALSE; + } + + /* Execute all handlers. */ + if( !xt_handle( jd->xt, NULL, 1 ) ) + { + /* Don't do anything, the handlers should have + aborted the connection already. */ + return FALSE; + } + } if( ( s = strchr( who, '=' ) ) && jabber_chat_by_jid( ic, s + 1 ) ) bud = jabber_buddy_by_ext_jid( ic, who, 0 ); @@ -428,7 +447,13 @@ static void jabber_add_buddy( struct im_connection *ic, char *who, char *group ) if( g_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 ) { jd->flags |= JFLAG_XMLCONSOLE; - imcb_add_buddy( ic, JABBER_XMLCONSOLE_HANDLE, NULL ); + imcb_add_buddy( ic, who, NULL ); + return; + } + else if( g_strcasecmp( who, JABBER_MOCK_HANDLE ) == 0 ) + { + jd->flags |= JFLAG_MOCK; + imcb_add_buddy( ic, who, NULL ); return; } @@ -450,6 +475,11 @@ static void jabber_remove_buddy( struct im_connection *ic, char *who, char *grou */ return; } + else if( g_strcasecmp( who, JABBER_MOCK_HANDLE ) == 0 ) + { + jd->flags &= ~JFLAG_MOCK; + return; + } /* We should always do this part. Clean up our administration a little bit. */ jabber_buddy_remove_bare( ic, who ); diff --git a/protocols/jabber/jabber.h b/protocols/jabber/jabber.h index 5996c301..aa552558 100644 --- a/protocols/jabber/jabber.h +++ b/protocols/jabber/jabber.h @@ -46,6 +46,7 @@ typedef enum activates all XEP-85 related code. */ JFLAG_XMLCONSOLE = 64, /* If the user added an xmlconsole buddy. */ JFLAG_STARTTLS_DONE = 128, /* If a plaintext session was converted to TLS. */ + JFLAG_MOCK = 256, /* If the user added a mock buddy. */ } jabber_flags_t; typedef enum @@ -187,6 +188,7 @@ struct jabber_transfer }; #define JABBER_XMLCONSOLE_HANDLE "xmlconsole" +#define JABBER_MOCK_HANDLE "mock" /* Prefixes to use for packet IDs (mainly for IQ packets ATM). Usually the first one should be used, but when storing a packet in the cache, a @@ -40,6 +40,7 @@ #include <sys/wait.h> #include <pwd.h> #include <locale.h> +#include <grp.h> #if defined(OTR_BI) || defined(OTR_PI) #include "otr.h" @@ -151,9 +152,14 @@ int main( int argc, char *argv[] ) pw = getpwnam( global.conf->user ); if( pw ) { + initgroups( global.conf->user, pw->pw_gid ); setgid( pw->pw_gid ); setuid( pw->pw_uid ); } + else + { + log_message( LOGLVL_WARNING, "Failed to look up user %s.", global.conf->user ); + } } /* Catch some signals to tell the user what's happening before quitting */ |