Hello community, here is the log from the commit of package meanwhile for openSUSE:Factory checked in at 2018-07-27 10:51:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/meanwhile (Old) and /work/SRC/openSUSE:Factory/.meanwhile.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "meanwhile" Fri Jul 27 10:51:26 2018 rev:21 rq:623245 version:1.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/meanwhile/meanwhile.changes 2015-09-24 06:12:27.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.meanwhile.new/meanwhile.changes 2018-07-27 10:51:39.305119651 +0200 @@ -1,0 +2,20 @@ +Thu Jul 12 20:15:14 UTC 2018 - [email protected] + +- Add meanwhile-1.0.2-add-status-flags.patch: Add flag in status + enum for mobile users, by Christopher O'Brien. +- Add meanwhile-use-libtommath.patch: Use LibTomMath as an MPI + instead of the bundled code (boo#1086826, deb#764494). +- Add meanwhile-fix-warnings.patch: Fix various warnings, + including a find by Torrey McMahon (a function that is declared + void but yet returns a value). +- Add meanwhile-fix-groupchat.patch: Fix for group chat crashes + with IBM Notes version 8.5.1, by Jonathan Rice (pidgin#12637). +- Add meanwhile-fix-filetransfer.patch: Fix file transfers with + recent Sametime servers, by Mikael Berthe. +- Add meanwhile-workaround-status-timestamp.patch: Fix Awareness + status timestamps with recent Sametime clients, by Mikael Berthe. +- Disable mw_debug_mailme output. +- Move the Changelog file to the main package. +- Spec cleanup. + +------------------------------------------------------------------- @@ -80 +99,0 @@ - New: ---- meanwhile-1.0.2-add-status-flags.patch meanwhile-fix-filetransfer.patch meanwhile-fix-groupchat.patch meanwhile-fix-warnings.patch meanwhile-use-libtommath.patch meanwhile-workaround-status-timestamp.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ meanwhile.spec ++++++ --- /var/tmp/diff_new_pack.f8wK4F/_old 2018-07-27 10:51:39.749120502 +0200 +++ /var/tmp/diff_new_pack.f8wK4F/_new 2018-07-27 10:51:39.753120509 +0200 @@ -1,7 +1,7 @@ # # spec file for package meanwhile # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,98 +16,114 @@ # -%define lname libmeanwhile1 +%define soname libmeanwhile +%define sover 1 Name: meanwhile Version: 1.0.2 Release: 0 -Summary: Lotus Sametime Community Client Library -License: LGPL-2.1+ +Summary: IBM Sametime Community Client Library +License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ -Url: http://meanwhile.sf.net/ -Source: http://sourceforge.net/projects/meanwhile/files/meanwhile/%{version}/%{name}-%{version}.tar.gz -Patch0: meanwhile-status.diff -Patch1: meanwhile-glib-2.31.patch +URL: https://meanwhile.sourceforge.io/ +Source: https://sourceforge.net/projects/meanwhile/files/meanwhile/%{version}/%{name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM meanwhile-glib-2.31.patch -- Fix build with GLib 2.31+. +Patch0: meanwhile-glib-2.31.patch +# PATCH-FIX-UPSTREAM meanwhile-status.diff [email protected] -- Fix Awareness Snapshots with recent Sametime servers. +Patch1: meanwhile-status.diff +# PATCH-FIX-UPSTREAM meanwhile-1.0.2-add-status-flags.patch [email protected] -- Add flag in status enum for mobile users. +Patch2: meanwhile-1.0.2-add-status-flags.patch +# PATCH-FEATURE-OPENSUSE meanwhile-use-libtommath.patch boo#1086826 [email protected] -- Use LibTomMath as an MPI instead of the bundled code. +Patch3: meanwhile-use-libtommath.patch +# PATCH-FIX-OPENSUSE meanwhile-fix-warnings.patch -- Fix various warnings. +Patch4: meanwhile-fix-warnings.patch +# PATCH-FIX-OPENSUSE meanwhile-fix-groupchat.patch pidgin#12637 -- Fix for group chat crashes with IBM Notes version 8.5.1 by Jonathan Rice. +Patch5: meanwhile-fix-groupchat.patch +# PATCH-FIX-OPENSUSE meanwhile-fix-filetransfer.patch [email protected] -- Fix file transfers with recent Sametime servers. +Patch6: meanwhile-fix-filetransfer.patch +# PATCH-FIX-OPENSUSE meanwhile-workaround-status-timestamp.patch [email protected] -- Fix Awareness status timestamps with recent Sametime clients. +Patch7: meanwhile-workaround-status-timestamp.patch BuildRequires: autoconf BuildRequires: automake -BuildRequires: glib2-devel +BuildRequires: libtommath-devel BuildRequires: libtool -BuildRequires: pkg-config -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: pkgconfig +BuildRequires: pkgconfig(glib-2.0) %description -Library to establish instant messaging connections to the Lotus +A library to establish instant messaging connections to the IBM Sametime IM server. -%package -n %{lname} -Summary: Lotus Sametime Community Client Library +%package -n %{soname}%{sover} +Summary: IBM Sametime Community Client Library Group: System/Libraries -# O/P added 2011-11-26 -Obsoletes: libmeanwhile < %{version}-%{release} -Provides: libmeanwhile = %{version}-%{release} +# libmeanwhile was last used in openSUSE 12.2. +Obsoletes: %{soname} < %{version}-%{release} +Provides: %{soname} = %{version}-%{release} -%description -n %{lname} -Library to establish instant messaging connections to the Lotus +%description -n %{soname}%{sover} +A library to establish instant messaging connections to the IBM Sametime IM server. %package devel -Summary: Lotus Sametime Community Client library +Summary: IBM Sametime Community Client library Group: Development/Libraries/C and C++ -Requires: %{lname} = %{version}, glib2-devel +Requires: %{soname}%{sover} = %{version} +Requires: pkgconfig(glib-2.0) %description devel -Library to establish instant messaging connections to the Lotus +A library to establish instant messaging connections to the IBM Sametime IM server. %package doc -Summary: Lotus Sametime Community Client library +Summary: IBM Sametime Community Client library Group: Development/Libraries/C and C++ %description doc -Library to establish instant messaging connections to the Lotus +A library to establish instant messaging connections to the IBM Sametime IM server. %prep %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 %build -autoreconf -fiv +autoreconf -fi %configure \ --disable-doxygen \ + --disable-mailme \ --disable-static -make %{?_smp_mflags} \ - htmldocdir=%{_docdir}/%{name}/html\ - latexdocdir=%{_docdir}/%{name}/latex\ - sampledir=%{_docdir}/%{name}/samples +make %{?_smp_mflags} V=1 %install -make DESTDIR=%{buildroot} install %{?_smp_mflags}\ - htmldocdir=%{_docdir}/%{name}/html\ - latexdocdir=%{_docdir}/%{name}/latex\ +%make_install \ sampledir=%{_docdir}/%{name}/samples -# NEWS is empty + +chmod a-x %{buildroot}%{_docdir}/%{name}/samples/build find %{buildroot} -type f -name "*.la" -delete -print -%post -n %{lname} -p /sbin/ldconfig +%post -n %{soname}%{sover} -p /sbin/ldconfig -%postun -n %{lname} -p /sbin/ldconfig +%postun -n %{soname}%{sover} -p /sbin/ldconfig -%files -n %{lname} -%defattr(-,root,root) -%doc COPYING README -%{_libdir}/libmeanwhile.so.1* +%files -n %{soname}%{sover} +%license COPYING +%doc ChangeLog README +%{_libdir}/%{soname}.so.%{sover}* %files devel -%defattr(-,root,root) -%doc TODO ChangeLog README -%{_includedir}/meanwhile -%{_libdir}/*.so +%{_includedir}/meanwhile/ +%{_libdir}/%{soname}.so %{_libdir}/pkgconfig/meanwhile.pc %files doc -%defattr(-,root,root) -%dir %{_docdir}/%{name} -%{_docdir}/%{name}/samples +%dir %{_docdir}/%{name}/ +%{_docdir}/%{name}/samples/ %changelog ++++++ meanwhile-1.0.2-add-status-flags.patch ++++++ --- a/src/mw_common.h +++ b/src/mw_common.h @@ -153,10 +153,14 @@ struct mwPrivacyInfo { /* 8.3.5 User Status Types */ enum mwStatusType { + mwStatus_OFFLINE = 0x0000, + mwStatus_ACTIVE = 0x0020, mwStatus_IDLE = 0x0040, mwStatus_AWAY = 0x0060, mwStatus_BUSY = 0x0080, + + mwStatus_MASK_MOBILE = 0x0200, }; ++++++ meanwhile-fix-filetransfer.patch ++++++ # User Mikael Berthe <[email protected]> # Date 1194544713 -3600 Fix file transfers with recent Sametime servers It seems that the last guint32_get() fails when Meanwhile receives the FT offer. I think we can skip it -- works for me but I can't check it with an older server. diff -r 4aabc56c0e5f src/srvc_ft.c --- a/src/srvc_ft.c Tue Nov 06 11:46:26 2007 +0100 +++ b/src/srvc_ft.c Thu Nov 08 18:58:33 2007 +0100 @@ -142,7 +142,7 @@ static void recv_channelCreate(struct mw mwString_get(b, &fnm); /* offered filename */ mwString_get(b, &txt); /* offering message */ guint32_get(b, &size); /* size of offered file */ - guint32_get(b, &junk); /* unknown */ + /* guint32_get(b, &junk); */ /* unknown */ /* and we just skip an unknown guint16 at the end */ b_err = mwGetBuffer_error(b); ++++++ meanwhile-fix-groupchat.patch ++++++ --- a/src/srvc_place.c +++ b/src/srvc_place.c @@ -37,6 +37,16 @@ #define PROTOCOL_TYPE 0x00 #define PROTOCOL_VER 0x05 +/* + As of Sametime ~v8.5, there's a slightly different group chat invite message. + This identifies the earliest server version using the new format. Currently, + it's set for 8.5.1. If other people are having issues, we'll need to decrease + this to their version. +*/ +#define NEW_FORMAT_SERVER_VER_MAJOR 0x001e +#define NEW_FORMAT_SERVER_VER_MINOR 0x213f + +#define GUINT(val) (GPOINTER_TO_UINT((val))) enum incoming_msg { msg_in_JOIN_RESPONSE = 0x0000, /* ? */ @@ -163,6 +173,7 @@ struct place_member { guint16 login_type; guint32 unknown_a; guint32 unknown_b; + char *extraname; }; @@ -187,6 +198,7 @@ static void member_free(struct place_member *p) { mwIdBlock_clear(&p->idb); g_free(p->login_id); g_free(p->name); + g_free(p->extraname); g_free(p); } @@ -392,6 +404,9 @@ static int recv_SECTION_PEER_JOIN(struct mwPlace *place, guint16_get(b, &pm->login_type); guint32_get(b, &pm->unknown_a); guint32_get(b, &pm->unknown_b); + /* TODO: Since the Notes upgrade, an extra name string is sent to + recv_SECTION_LIST(). It might be sent here, but since we're only + parsing one user, it probably doesn't matter here. */ PUT_MEMBER(place, pm); if(srvc->handler && srvc->handler->peerJoined) @@ -517,8 +532,18 @@ static int recv_SECTION_PEER(struct mwPlace *place, static int recv_SECTION_LIST(struct mwPlace *place, struct mwGetBuffer *b) { - int ret = 0; + int ret = 0, major, minor; guint32 sec, count; + struct mwSession *session; + gboolean newMsgFormat; + + /* Check the server version to see if the message uses the new format */ + session = mwService_getSession(MW_SERVICE(place->service)); + major = GUINT(mwSession_getProperty(session, mwSession_SERVER_VER_MAJOR)); + minor = GUINT(mwSession_getProperty(session, mwSession_SERVER_VER_MINOR)); + newMsgFormat = (major == NEW_FORMAT_SERVER_VER_MAJOR + && minor >= NEW_FORMAT_SERVER_VER_MINOR) + || major > NEW_FORMAT_SERVER_VER_MAJOR; mwGetBuffer_advance(b, 4); guint32_get(b, &sec); @@ -543,6 +568,10 @@ static int recv_SECTION_LIST(struct mwPlace *place, guint32_get(b, &m->unknown_a); guint32_get(b, &m->unknown_b); + if(newMsgFormat) { + mwString_get(b, &m->extraname); + } + PUT_MEMBER(place, m); } ++++++ meanwhile-fix-warnings.patch ++++++ --- a/src/cipher.c +++ b/src/cipher.c @@ -331,7 +331,8 @@ void mwEncryptExpanded(const int *ekey, guchar *o; gsize o_len; - int x, y; + gsize x; + int y; /* pad upwards to a multiple of 8 */ /* o_len = (i_len & -8) + 8; */ @@ -727,8 +728,7 @@ offer_RC2_128(struct mwCipherInstance *c static void accepted_RC2_128(struct mwCipherInstance *ci, struct mwEncryptItem *item) { - - return offered_RC2_128(ci, item); + offered_RC2_128(ci, item); } --- a/src/common.c +++ b/src/common.c @@ -28,28 +28,33 @@ structures in the event of failure, to prevent memory leaks */ -#define MW16_PUT(b, val) \ +#define MW16_PUT(b, val) do { \ *(b)++ = ((val) >> 0x08) & 0xff; \ - *(b)++ = (val) & 0xff; + *(b)++ = (val) & 0xff; \ + } while(FALSE) -#define MW16_GET(b, val) \ +#define MW16_GET(b, val) do { \ val = (*(b)++ & 0xff) << 8; \ - val = val | (*(b)++ & 0xff); + val = val | (*(b)++ & 0xff); \ + } while(FALSE) -#define MW32_PUT(b, val) \ +#define MW32_PUT(b, val) do { \ *(b)++ = ((val) >> 0x18) & 0xff; \ *(b)++ = ((val) >> 0x10) & 0xff; \ *(b)++ = ((val) >> 0x08) & 0xff; \ - *(b)++ = (val) & 0xff; + *(b)++ = (val) & 0xff; \ + } while(FALSE) -#define MW32_GET(b, val) \ +#define MW32_GET(b, val) do { \ val = (*(b)++ & 0xff) << 0x18; \ val = val | (*(b)++ & 0xff) << 0x10; \ val = val | (*(b)++ & 0xff) << 0x08; \ - val = val | (*(b)++ & 0xff); + val = val | (*(b)++ & 0xff); \ + } while(FALSE) + struct mwPutBuffer { --- a/src/mw_debug.c +++ b/src/mw_debug.c @@ -92,7 +92,7 @@ void mw_debug_datav(const guchar *buf, g } pretty_print(str, buf, len); - g_debug(str->str); + g_debug("%s", str->str); g_string_free(str, TRUE); } @@ -149,7 +149,7 @@ void mw_mailme_datav(const guchar *buf, g_string_append(str, MW_MAILME_CUT_STOP); - g_debug(str->str); + g_debug("%s", str->str); g_string_free(str, TRUE); #else --- a/src/mw_srvc_dir.h +++ b/src/mw_srvc_dir.h @@ -18,7 +18,7 @@ */ #ifndef _MW_SRVC_DIR_H -#define _MW_SERV_DIR_H +#define _MW_SRVC_DIR_H #include <glib.h> --- a/src/session.c +++ b/src/session.c @@ -240,7 +240,7 @@ static void state(struct mwSession *s, e case mwSession_LOGIN_REDIR: g_message("session state: %s (%s)", state_str(state), - (char *)info); + NSTR((char *) info)); break; default: --- a/src/srvc_aware.c +++ b/src/srvc_aware.c @@ -849,9 +849,9 @@ guint32 mwAwareAttribute_getKey(const st gboolean mwAwareAttribute_asBoolean(const struct mwAwareAttribute *attrib) { struct mwGetBuffer *b; - gboolean ret; - - if(! attrib) return FALSE; + gboolean ret = FALSE; + + g_return_val_if_fail(attrib != NULL, FALSE); b = mwGetBuffer_wrap(&attrib->data); if(attrib->data.len >= 4) { --- a/src/srvc_conf.c +++ b/src/srvc_conf.c @@ -154,7 +154,7 @@ static void conf_free(struct mwConferenc if(conf->members) g_hash_table_destroy(conf->members); - g_list_remove_all(srvc->confs, conf); + srvc->confs = g_list_remove_all(srvc->confs, conf); mw_datum_clear(&conf->client_data); ++++++ meanwhile-use-libtommath.patch ++++++ --- a/configure.ac +++ b/configure.ac @@ -91,10 +91,10 @@ AC_SUBST(WITH_DOC_SUBPACKAGE) -# libm for use in mpi.c -AC_CHECK_LIB(m, main, LIBM="-lm") -AC_CHECK_HEADER(math.h) -AC_SUBST(LIBM) +# LibTomMath +AC_CHECK_LIB(tommath, mp_exptmod, LIBTOMMATH_LIBS="-ltommath") +AC_CHECK_HEADER(tommath.h) +AC_SUBST(LIBTOMMATH_LIBS) --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,4 @@ -SUBDIRS = mpi - lib_LTLIBRARIES = libmeanwhile.la mwinclude_HEADERS = \ @@ -54,7 +52,9 @@ libmeanwhile_la_SOURCES = \ mw_debug.c \ mw_util.c -libmeanwhile_la_LIBADD = $(GLIB_LIBS) mpi/libmpi.la +libmeanwhile_la_LIBADD = \ + $(GLIB_LIBS) \ + $(LIBTOMMATH_LIBS) AM_CPPFLAGS = \ -DG_LOG_DOMAIN=\"@PACKAGE@\" --- a/src/cipher.c +++ b/src/cipher.c @@ -21,7 +21,7 @@ #include <stdlib.h> #include <time.h> -#include "mpi/mpi.h" +#include <tommath.h> #include "mw_channel.h" #include "mw_cipher.h" @@ -29,6 +29,16 @@ #include "mw_session.h" +#define mw_mp_int mp_int +#define mw_mp_init(a) mp_init(a) +#define mw_mp_clear(a) mp_clear(a) +#define mw_mp_to_unsigned_bin(a, b) mp_to_unsigned_bin(a, b) +#define mw_mp_read_unsigned_bin(a, b, c) mp_read_unsigned_bin(a, b, c) +#define mw_mp_unsigned_bin_size(a) mp_unsigned_bin_size(a) +#define mw_mp_exptmod(a, b, c, d) mp_exptmod(a, b, c, d) +#define mw_mp_set_int(a, b) mp_set_int(a, b) + + struct mwMpi { mw_mp_int i; }; Only in a/src: mpi --- a/src/mw_cipher.h +++ b/src/mw_cipher.h @@ -239,10 +239,10 @@ void mwDecrypt(const guchar *key, gsize outside of a channel (eg. session authentication). These are wrapping a full multiple-precision integer math library, but most of the functionality there-of is not exposed. Currently, the math is - provided by a copy of the public domain libmpi. + provided by the public domain LibTomMath. - for more information on the used MPI Library, visit - http://www.cs.dartmouth.edu/~sting/mpi/ + for more information on the used LibTomMath Library, visit + https://www.libtom.net/LibTomMath/ */ /* @{ */ ++++++ meanwhile-workaround-status-timestamp.patch ++++++ # User Mikael Berthe <[email protected]> # Date 1195749751 -3600 Fix Awareness status timestamps with recent Sametime clients For some reason the status timestamps I receive from people with a recent Sametime client make no sense. This patch simply sets the timestamp to 0, as I have no idea how to interpret these time values. diff -r 17977a4e7da1 -r e7601af90b31 src/common.c --- a/src/common.c Thu Nov 08 18:58:33 2007 +0100 +++ b/src/common.c Thu Nov 22 17:42:31 2007 +0100 @@ -693,6 +693,9 @@ void mwUserStatus_get(struct mwGetBuffer guint16_get(b, &stat->status); guint32_get(b, &stat->time); mwString_get(b, &stat->desc); + + // Quick'n ugly hack for recent Sametime clients + stat->time = 0; }
