diff --git a/.gitignore b/.gitignore index f1b1dc8..558efeb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1 @@ -bitlbee-1.2.8.tar.gz -bitlbee-3.0.tar.gz -/bitlbee-3.0.1.tar.gz -/bitlbee-3.0.2.tar.gz -/bitlbee-3.0.3.tar.gz -/bitlbee-3.0.4.tar.gz +bitlbee-3.?.?.tar.gz diff --git a/bitlbee-3.0.5-des3-implement.patch b/bitlbee-3.0.5-des3-implement.patch new file mode 100644 index 0000000..527a89e --- /dev/null +++ b/bitlbee-3.0.5-des3-implement.patch @@ -0,0 +1,122 @@ +Index: bitlbee-3.0.3/configure +=================================================================== +--- bitlbee-3.0.3.orig/configure ++++ bitlbee-3.0.3/configure +@@ -433,10 +433,10 @@ if [ "$ret" = "0" ]; then + exit 1 + fi; + +-if [ "$msn" = "1" -a "$ssl" != "openssl" -a "$ssl" != "gnutls" ]; then +- # Needed for MSN only. OpenSSL exports nice cipher functions already, ++if [ "$msn" = "1" -a "$ssl" != "openssl" -a "$ssl" != "gnutls" -a "$ssl" != "nss" ]; then ++ # Needed for MSN only. OpenSSL and NSS export 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 ++ # built-in stuff. (Since right now those are the only three supported + # SSL modules anyway, this is mostly unnecessary.) + echo 'DES=des.o' >> Makefile.settings + fi +Index: bitlbee-3.0.3/lib/ssl_nss.c +=================================================================== +--- bitlbee-3.0.3.orig/lib/ssl_nss.c ++++ bitlbee-3.0.3/lib/ssl_nss.c +@@ -39,6 +39,7 @@ + #include + #include + #include ++#include + + int ssl_errno = 0; + +@@ -255,3 +255,91 @@ + { + return g_strdup( "SSL certificate verification not supported by BitlBee NSS code." ); + } ++ ++size_t ssl_des3_encrypt(const unsigned char *key, size_t key_len, ++ const unsigned char *input, size_t input_len, const unsigned char *iv, ++ unsigned char **res) ++{ ++#define CIPHER_MECH CKM_DES3_CBC ++#define MAX_OUTPUT_LEN 72 ++ ++ int len1; ++ unsigned int len2; ++ ++ PK11Context *ctx = NULL; ++ PK11SlotInfo *slot = NULL; ++ SECItem keyItem; ++ SECItem ivItem; ++ SECItem *secParam = NULL; ++ PK11SymKey *symKey = NULL; ++ ++ size_t rc; ++ SECStatus rv; ++ ++ if (!initialized) { ++ ssl_init(); ++ } ++ ++ keyItem.data = (unsigned char *) key; ++ keyItem.len = key_len; ++ ++ slot = PK11_GetBestSlot(CIPHER_MECH, NULL); ++ if (slot == NULL) { ++ fprintf(stderr, "PK11_GetBestSlot failed (err %d)\n", PR_GetError()); ++ rc = 0; ++ goto out; ++ } ++ ++ symKey = PK11_ImportSymKey(slot, CIPHER_MECH, PK11_OriginUnwrap, CKA_ENCRYPT, &keyItem, NULL); ++ if (symKey == NULL) { ++ fprintf(stderr, "PK11_ImportSymKey failed (err %d)\n", PR_GetError()); ++ rc = 0; ++ goto out; ++ } ++ ++ ivItem.data = (unsigned char *) iv; ++ /* See msn_soap_passport_sso_handle_response in protocols/msn/soap.c */ ++ ivItem.len = 8; ++ ++ secParam = PK11_ParamFromIV(CIPHER_MECH, &ivItem); ++ if (secParam == NULL) { ++ fprintf(stderr, "PK11_ParamFromIV failed (err %d)\n", PR_GetError()); ++ rc = 0; ++ goto out; ++ } ++ ++ ctx = PK11_CreateContextBySymKey(CIPHER_MECH, CKA_ENCRYPT, symKey, secParam); ++ if (ctx == NULL) { ++ fprintf(stderr, "PK11_CreateContextBySymKey failed (err %d)\n", PR_GetError()); ++ rc = 0; ++ goto out; ++ } ++ ++ *res = g_new0(unsigned char, MAX_OUTPUT_LEN); ++ ++ rv = PK11_CipherOp(ctx, *res, &len1, MAX_OUTPUT_LEN, (unsigned char *) input, input_len); ++ if (rv != SECSuccess) { ++ fprintf(stderr, "PK11_CipherOp failed (err %d)\n", PR_GetError()); ++ rc = 0; ++ goto out; ++ } ++ ++ assert(len1 <= MAX_OUTPUT_LEN); ++ ++ rv = PK11_DigestFinal(ctx, *res + len1, &len2, (unsigned int) MAX_OUTPUT_LEN - len1); ++ if (rv != SECSuccess) { ++ fprintf(stderr, "PK11_DigestFinal failed (err %d)\n", PR_GetError()); ++ rc = 0; ++ goto out; ++ } ++ ++ rc = len1 + len2; ++ ++out: ++ if (ctx) PK11_DestroyContext(ctx, PR_TRUE); ++ if (symKey) PK11_FreeSymKey(symKey); ++ if (secParam) SECITEM_FreeItem(secParam, PR_TRUE); ++ if (slot) PK11_FreeSlot(slot); ++ ++ return rc; ++} diff --git a/bitlbee-3.0.5-installP.patch b/bitlbee-3.0.5-installP.patch new file mode 100644 index 0000000..2b8dd82 --- /dev/null +++ b/bitlbee-3.0.5-installP.patch @@ -0,0 +1,35 @@ +--- bitlbee-3.0.5.orig/configure ++++ bitlbee-3.0.5/configure +@@ -125,6 +125,8 @@ TARGET=$target + ARCH=$arch + CPU=$cpu + ++INSTALL=install -p ++ + DESTDIR= + LFLAGS= + EFLAGS= +--- bitlbee-3.0.5/doc/Makefile 2012-02-18 02:55:09.000000000 -0800 ++++ bitlbee-3.0.5/doc/Makefile.new 2012-03-31 18:36:06.112532459 -0700 +@@ -9,8 +9,8 @@ + + install: + mkdir -p $(DESTDIR)$(MANDIR)/man8/ $(DESTDIR)$(MANDIR)/man5/ +- install -m 0644 $(_SRCDIR_)bitlbee.8 $(DESTDIR)$(MANDIR)/man8/ +- install -m 0644 $(_SRCDIR_)bitlbee.conf.5 $(DESTDIR)$(MANDIR)/man5/ ++ $(INSTALL) -m 0644 $(_SRCDIR_)bitlbee.8 $(DESTDIR)$(MANDIR)/man8/ ++ $(INSTALL) -m 0644 $(_SRCDIR_)bitlbee.conf.5 $(DESTDIR)$(MANDIR)/man5/ + $(MAKE) -C user-guide $@ + + uninstall: +--- bitlbee-3.0.5/doc/user-guide/Makefile 2012-02-18 02:55:09.000000000 -0800 ++++ bitlbee-3.0.5/doc/user-guide/Makefile.new 2012-03-31 18:36:01.243464879 -0700 +@@ -41,7 +41,7 @@ + mkdir -p $(DESTDIR)$(DATADIR) + chmod 0755 $(DESTDIR)$(DATADIR) + rm -f $(DESTDIR)$(DATADIR)/help.txt # Prevent help function from breaking in running sessions +- install -m 0644 $(_SRCDIR_)help.txt $(DESTDIR)$(DATADIR)/help.txt ++ $(INSTALL) -m 0644 $(_SRCDIR_)help.txt $(DESTDIR)$(DATADIR)/help.txt + + uninstall: + rm -f $(DESTDIR)$(DATADIR)/help.txt diff --git a/bitlbee-des3-implement.patch b/bitlbee-des3-implement.patch deleted file mode 100644 index 08ee7f1..0000000 --- a/bitlbee-des3-implement.patch +++ /dev/null @@ -1,122 +0,0 @@ -Index: bitlbee-3.0.3/configure -=================================================================== ---- bitlbee-3.0.3.orig/configure -+++ bitlbee-3.0.3/configure -@@ -433,10 +433,10 @@ if [ "$ret" = "0" ]; then - exit 1 - fi; - --if [ "$msn" = "1" -a "$ssl" != "openssl" -a "$ssl" != "gnutls" ]; then -- # Needed for MSN only. OpenSSL exports nice cipher functions already, -+if [ "$msn" = "1" -a "$ssl" != "openssl" -a "$ssl" != "gnutls" -a "$ssl" != "nss" ]; then -+ # Needed for MSN only. OpenSSL and NSS export 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 -+ # built-in stuff. (Since right now those are the only three supported - # SSL modules anyway, this is mostly unnecessary.) - echo 'DES=des.o' >> Makefile.settings - fi -Index: bitlbee-3.0.3/lib/ssl_nss.c -=================================================================== ---- bitlbee-3.0.3.orig/lib/ssl_nss.c -+++ bitlbee-3.0.3/lib/ssl_nss.c -@@ -39,6 +39,7 @@ - #include - #include - #include -+#include - - int ssl_errno = 0; - -@@ -238,3 +239,91 @@ b_input_condition ssl_getdirection( void - /* Just in case someone calls us, let's return the most likely case: */ - return B_EV_IO_READ; - } -+ -+size_t ssl_des3_encrypt(const unsigned char *key, size_t key_len, -+ const unsigned char *input, size_t input_len, const unsigned char *iv, -+ unsigned char **res) -+{ -+#define CIPHER_MECH CKM_DES3_CBC -+#define MAX_OUTPUT_LEN 72 -+ -+ int len1; -+ unsigned int len2; -+ -+ PK11Context *ctx = NULL; -+ PK11SlotInfo *slot = NULL; -+ SECItem keyItem; -+ SECItem ivItem; -+ SECItem *secParam = NULL; -+ PK11SymKey *symKey = NULL; -+ -+ size_t rc; -+ SECStatus rv; -+ -+ if (!initialized) { -+ ssl_init(); -+ } -+ -+ keyItem.data = (unsigned char *) key; -+ keyItem.len = key_len; -+ -+ slot = PK11_GetBestSlot(CIPHER_MECH, NULL); -+ if (slot == NULL) { -+ fprintf(stderr, "PK11_GetBestSlot failed (err %d)\n", PR_GetError()); -+ rc = 0; -+ goto out; -+ } -+ -+ symKey = PK11_ImportSymKey(slot, CIPHER_MECH, PK11_OriginUnwrap, CKA_ENCRYPT, &keyItem, NULL); -+ if (symKey == NULL) { -+ fprintf(stderr, "PK11_ImportSymKey failed (err %d)\n", PR_GetError()); -+ rc = 0; -+ goto out; -+ } -+ -+ ivItem.data = (unsigned char *) iv; -+ /* See msn_soap_passport_sso_handle_response in protocols/msn/soap.c */ -+ ivItem.len = 8; -+ -+ secParam = PK11_ParamFromIV(CIPHER_MECH, &ivItem); -+ if (secParam == NULL) { -+ fprintf(stderr, "PK11_ParamFromIV failed (err %d)\n", PR_GetError()); -+ rc = 0; -+ goto out; -+ } -+ -+ ctx = PK11_CreateContextBySymKey(CIPHER_MECH, CKA_ENCRYPT, symKey, secParam); -+ if (ctx == NULL) { -+ fprintf(stderr, "PK11_CreateContextBySymKey failed (err %d)\n", PR_GetError()); -+ rc = 0; -+ goto out; -+ } -+ -+ *res = g_new0(unsigned char, MAX_OUTPUT_LEN); -+ -+ rv = PK11_CipherOp(ctx, *res, &len1, MAX_OUTPUT_LEN, (unsigned char *) input, input_len); -+ if (rv != SECSuccess) { -+ fprintf(stderr, "PK11_CipherOp failed (err %d)\n", PR_GetError()); -+ rc = 0; -+ goto out; -+ } -+ -+ assert(len1 <= MAX_OUTPUT_LEN); -+ -+ rv = PK11_DigestFinal(ctx, *res + len1, &len2, (unsigned int) MAX_OUTPUT_LEN - len1); -+ if (rv != SECSuccess) { -+ fprintf(stderr, "PK11_DigestFinal failed (err %d)\n", PR_GetError()); -+ rc = 0; -+ goto out; -+ } -+ -+ rc = len1 + len2; -+ -+out: -+ if (ctx) PK11_DestroyContext(ctx, PR_TRUE); -+ if (symKey) PK11_FreeSymKey(symKey); -+ if (secParam) SECITEM_FreeItem(secParam, PR_TRUE); -+ if (slot) PK11_FreeSlot(slot); -+ -+ return rc; -+} diff --git a/bitlbee-installP.patch b/bitlbee-installP.patch deleted file mode 100644 index b1c0ed9..0000000 --- a/bitlbee-installP.patch +++ /dev/null @@ -1,41 +0,0 @@ -Index: bitlbee-3.0.3/configure -=================================================================== ---- bitlbee-3.0.3.orig/configure -+++ bitlbee-3.0.3/configure -@@ -125,6 +125,8 @@ TARGET=$target - ARCH=$arch - CPU=$cpu - -+INSTALL=install -p -+ - DESTDIR= - LFLAGS= - EFLAGS= -Index: bitlbee-3.0.3/doc/Makefile -=================================================================== ---- bitlbee-3.0.3.orig/doc/Makefile -+++ bitlbee-3.0.3/doc/Makefile -@@ -9,8 +9,8 @@ all: - - install: - mkdir -p $(DESTDIR)$(MANDIR)/man8/ $(DESTDIR)$(MANDIR)/man5/ -- install -m 0644 $(SRCDIR)bitlbee.8 $(DESTDIR)$(MANDIR)/man8/ -- install -m 0644 $(SRCDIR)bitlbee.conf.5 $(DESTDIR)$(MANDIR)/man5/ -+ $(INSTALL) -m 0644 $(SRCDIR)bitlbee.8 $(DESTDIR)$(MANDIR)/man8/ -+ $(INSTALL) -m 0644 $(SRCDIR)bitlbee.conf.5 $(DESTDIR)$(MANDIR)/man5/ - $(MAKE) -C user-guide $@ - - uninstall: -Index: bitlbee-3.0.3/doc/user-guide/Makefile -=================================================================== ---- bitlbee-3.0.3.orig/doc/user-guide/Makefile -+++ bitlbee-3.0.3/doc/user-guide/Makefile -@@ -41,7 +41,7 @@ install: - mkdir -p $(DESTDIR)$(DATADIR) - chmod 0755 $(DESTDIR)$(DATADIR) - rm -f $(DESTDIR)$(DATADIR)/help.txt # Prevent help function from breaking in running sessions -- install -m 0644 $(SRCDIR)help.txt $(DESTDIR)$(DATADIR)/help.txt -+ $(INSTALL) -m 0644 $(SRCDIR)help.txt $(DESTDIR)$(DATADIR)/help.txt - - uninstall: - rm -f $(DESTDIR)$(DATADIR)/help.txt diff --git a/bitlbee.spec b/bitlbee.spec index 5ec3cc1..408e7d5 100644 --- a/bitlbee.spec +++ b/bitlbee.spec @@ -1,6 +1,6 @@ Summary: IRC to other chat networks gateway Name: bitlbee -Version: 3.0.4 +Version: 3.0.5 Release: 1%{?dist} License: GPLv2+ and MIT Group: System Environment/Daemons @@ -11,12 +11,12 @@ Source2: bitlbee-wrapper.h # 64bit directories should go before 32bit ones. Patch0: bitlbee-syslibdirs.patch # use install -p instead of plain install ... we should protect time stamps -Patch1: bitlbee-installP.patch +Patch1: bitlbee-3.0.5-installP.patch # support for old glibc (EL-4, EL-5) which doesn't have ns_initparse and its friends Patch2: bitlbee-libresolv.patch # Completion of NSS-based SSL implementation. Sent upstream. #714 # (combined with two tiny fixes from RHBZ #666022) -Patch4: bitlbee-des3-implement.patch +Patch4: bitlbee-3.0.5-des3-implement.patch # When the above patches will be consolidated upstream, this should merge # with Patch1 or Patch2 or something like that Patch5: bitlbee-forkdaemon.patch @@ -68,7 +68,7 @@ completely stable and not 100% foolproof so use at your own risk. %if 0%{?fedora}%{?rhel} < 6 %patch2 -p1 %endif -%patch4 -p1 +#patch4 -p1 %if 0%{?fedora} >= 15 %patch5 -p1 %patch6 -p1 @@ -92,13 +92,11 @@ CFLAGS="$RPM_OPT_FLAGS" ./configure \ --otr=plugin %endif -#make DESTDIR=$RPM_BUILD_ROOT %{?_smp_mflags} make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT \ - install install-dev install-etc +make DESTDIR=$RPM_BUILD_ROOT install install-dev install-etc # Install some files manually to their correct destination mkdir -p $RPM_BUILD_ROOT{%{_localstatedir}/lib,%{_libdir}}/%{name} @@ -106,8 +104,7 @@ mkdir -p $RPM_BUILD_ROOT{%{_localstatedir}/lib,%{_libdir}}/%{name} install -D -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/%{name} %else install -p -d $RPM_BUILD_ROOT%{_unitdir} -install -p -m 644 init/%{name}{.service,@.service,.socket} \ - $RPM_BUILD_ROOT%{_unitdir} +install -p -m 644 init/%{name}{.service,@.service,.socket} $RPM_BUILD_ROOT%{_unitdir} %endif install -D -p -m 644 %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf @@ -193,6 +190,15 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Sat Mar 31 2012 Adam Williamson - 3.0.5-1 +- new upstream release 3.0.5 + +* Sat Jan 14 2012 Adam Williamson - 3.0.4-3 +- add upstream fix for a high-priority twitter disconnect/crasher + +* Thu Jan 12 2012 Fedora Release Engineering - 3.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Tue Dec 06 2011 Adam Williamson - 3.0.4-1 - new upstream release 3.0.4 - drop 823_822.diff (merged upstream obviously) diff --git a/sources b/sources index 5a61f7f..850bf33 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3eb1e3e30c015885c641503eec4b05cb bitlbee-3.0.4.tar.gz +9ff97260a2a7f3a7d102db158a8d9887 bitlbee-3.0.5.tar.gz