From 34b639894da92dd653190fc3555093d81a64104d Mon Sep 17 00:00:00 2001 From: Marc Maurer Date: Mar 29 2008 00:57:55 +0000 Subject: Fix 439395: Explosive growth in abiword package --- diff --git a/abiword-plugins-2.6.0-no-libboost-thread.patch b/abiword-plugins-2.6.0-no-libboost-thread.patch new file mode 100644 index 0000000..34d1aea --- /dev/null +++ b/abiword-plugins-2.6.0-no-libboost-thread.patch @@ -0,0 +1,214 @@ +diff -N -u -r abiword-plugins-2.6.0.orig/tools/abicollab/backends/tcp/xp/IOClientHandler.h abiword-plugins-2.6.0/tools/abicollab/backends/tcp/xp/IOClientHandler.h +--- abiword-plugins-2.6.0.orig/tools/abicollab/backends/tcp/xp/IOClientHandler.h 2008-03-18 23:18:08.000000000 +0100 ++++ abiword-plugins-2.6.0/tools/abicollab/backends/tcp/xp/IOClientHandler.h 2008-03-29 01:53:52.000000000 +0100 +@@ -20,7 +20,6 @@ + #define __IO_CLIENT_HANDLER__ + + #include +-#include + #include + #include + +@@ -69,7 +68,7 @@ + UT_return_if_fail(work == NULL); + + work = new asio::io_service::work(io_service); +- thread = new boost::thread(IOServiceThread(io_service)); ++ thread = new asio::thread(IOServiceThread(io_service)); + + // TODO: catch exceptions + asio::ip::tcp::resolver::iterator iterator(resolver.resolve(query)); +@@ -79,7 +78,7 @@ + + private: + asio::io_service io_service; +- boost::thread* thread; ++ asio::thread* thread; + asio::io_service::work* work; + asio::ip::tcp::resolver resolver; + asio::ip::tcp::resolver::query query; +diff -N -u -r abiword-plugins-2.6.0.orig/tools/abicollab/backends/tcp/xp/IOServerHandler.h abiword-plugins-2.6.0/tools/abicollab/backends/tcp/xp/IOServerHandler.h +--- abiword-plugins-2.6.0.orig/tools/abicollab/backends/tcp/xp/IOServerHandler.h 2008-03-18 23:18:08.000000000 +0100 ++++ abiword-plugins-2.6.0/tools/abicollab/backends/tcp/xp/IOServerHandler.h 2008-03-29 01:53:52.000000000 +0100 +@@ -22,7 +22,6 @@ + #include "ut_debugmsg.h" + + #include +-#include + #include + #include + +@@ -47,7 +46,7 @@ + { + work = new asio::io_service::work(io_service); + m_pAcceptor = new asio::ip::tcp::acceptor(io_service, endpoint); +- boost::thread thread(iot); ++ asio::thread thread(iot); + } + + virtual ~IOServerHandler() +diff -N -u -r abiword-plugins-2.6.0.orig/tools/abicollab/backends/tcp/xp/Session.h abiword-plugins-2.6.0/tools/abicollab/backends/tcp/xp/Session.h +--- abiword-plugins-2.6.0.orig/tools/abicollab/backends/tcp/xp/Session.h 2008-03-18 23:18:08.000000000 +0100 ++++ abiword-plugins-2.6.0/tools/abicollab/backends/tcp/xp/Session.h 2008-03-29 01:53:52.000000000 +0100 +@@ -20,6 +20,7 @@ + #define __SESSION__ + + #include ++#include + + class TCPAccountHandler; + +@@ -48,7 +49,7 @@ + void push(int size, char* data) + { + { +- boost::mutex::scoped_lock lock(queue_protector); ++ abicollab::scoped_lock lock(queue_protector); + incoming.push_back( std::pair(size, data) ); + } + signal(); +@@ -62,7 +63,7 @@ + if (incoming.size() == 0) + return false; + { +- boost::mutex::scoped_lock lock(queue_protector); ++ abicollab::scoped_lock lock(queue_protector); + std::pair p = incoming.front(); + size = p.first; + *data = p.second; +@@ -218,7 +219,7 @@ + } + + asio::ip::tcp::socket socket; +- boost::mutex queue_protector; ++ abicollab::mutex queue_protector; + std::deque< std::pair > incoming; + std::deque< std::pair > outgoing; + +diff -N -u -r abiword-plugins-2.6.0.orig/tools/abicollab/backends/xp/lock.h abiword-plugins-2.6.0/tools/abicollab/backends/xp/lock.h +--- abiword-plugins-2.6.0.orig/tools/abicollab/backends/xp/lock.h 1970-01-01 01:00:00.000000000 +0100 ++++ abiword-plugins-2.6.0/tools/abicollab/backends/xp/lock.h 2008-03-29 01:53:52.000000000 +0100 +@@ -0,0 +1,94 @@ ++/* Copyright (C) 2008 by Marc Maurer ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ++ * 02111-1307, USA. ++ */ ++ ++#ifndef WIN32 ++#include ++#endif ++ ++namespace abicollab ++{ ++ ++class scoped_lock; ++ ++class mutex ++{ ++friend class scoped_lock; ++ ++public: ++ mutex() ++ { ++#ifdef WIN32 ++ repr = CreateMutex(0, FALSE, 0); ++#else ++ pthread_mutex_init(&repr, NULL); ++#endif ++ } ++ ++ ~mutex() ++ { ++#ifdef WIN32 ++ CloseHandle(repr); ++#else ++ pthread_mutex_destroy(&repr); ++#endif ++ } ++ ++private: ++ // we are noncopyable ++ mutex( const mutex& ); ++ const mutex& operator=( const mutex& ); ++ ++#ifdef WIN32 ++ HANDLE repr; ++#else ++ pthread_mutex_t repr; ++#endif ++}; ++ ++class scoped_lock ++{ ++public: ++ scoped_lock(mutex& mutex) ++ : m_mutex(mutex) ++ { ++#ifdef WIN32 ++ WaitForSingleObject(m_mutex.repr, INFINITE); ++#else ++ pthread_mutex_lock(&m_mutex.repr); ++#endif ++ } ++ ++ ~scoped_lock() ++ { ++#ifdef WIN32 ++ ReleaseMutex(m_mutex.repr); ++#else ++ pthread_mutex_unlock(&m_mutex.repr); ++#endif ++ } ++ ++private: ++ // we are noncopyable ++ scoped_lock( const scoped_lock& ); ++ const scoped_lock& operator=( const scoped_lock& ); ++ ++ mutex& m_mutex; ++}; ++ ++} ++ +diff -N -u -r abiword-plugins-2.6.0.orig/tools/abicollab/plugin.m4 abiword-plugins-2.6.0/tools/abicollab/plugin.m4 +--- abiword-plugins-2.6.0.orig/tools/abicollab/plugin.m4 2008-03-18 23:18:08.000000000 +0100 ++++ abiword-plugins-2.6.0/tools/abicollab/plugin.m4 2008-03-29 01:53:52.000000000 +0100 +@@ -75,7 +75,6 @@ + + # check for various boost libs + AX_BOOST_BASE([1.33.1]) +-AX_BOOST_THREAD + + # check for asio + AC_LANG_PUSH(C++) +@@ -134,7 +133,7 @@ + ]) + if test "x$abicollab_handler_tcp" = "xyes" ; then + ABICOLLAB_TCP_CPPFLAGS="-DABICOLLAB_HANDLER_TCP $ABICOLLAB_ASIO_CPPFLAGS" +- ABICOLLAB_TCP_LIBS="$BOOST_THREAD_LIB" ++ ABICOLLAB_TCP_LIBS="-lpthread" + fi + CPPFLAGS="$_abi_cppflags_save" + LDFLAGS="$_abi_ldflags_save" +@@ -193,7 +192,7 @@ + ]) + if test "x$abicollab_handler_service" = "xyes" ; then + ABICOLLAB_SERVICE_CPPFLAGS="-DABICOLLAB_HANDLER_SERVICE $ABICOLLAB_ASIO_CPPFLAGS" +- ABICOLLAB_SERVICE_LIBS="$BOOST_THREAD_LIB" ++ ABICOLLAB_SERVICE_LIBS="-lpthread" + fi + AC_SUBST(ABICOLLAB_SERVICE_CPPFLAGS) + AC_SUBST(ABICOLLAB_SERVICE_LIBS) diff --git a/abiword.spec b/abiword.spec index 4d3a36a..288405d 100644 --- a/abiword.spec +++ b/abiword.spec @@ -5,7 +5,7 @@ Summary: The AbiWord word processor Name: abiword Version: 2.6.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 Group: Applications/Editors License: GPLv2+ @@ -56,6 +56,7 @@ Patch6: abiword-plugins-2.6.0-regression.patch Patch7: abiword-extras-2.6.0-destdir.patch Patch8: abiword-2.6.0-textbox.patch Patch9: abiword-extras-2.6.0-hash.patch +Patch10: abiword-plugins-2.6.0-no-libboost-thread.patch %description AbiWord is a cross-platform Open Source word processor. It is full-featured, @@ -85,6 +86,7 @@ using libabiword. %patch3 -p1 -b .boolean %patch5 -p1 -b .xmpp %patch6 -p1 -b .regression +%patch10 -p1 -b .no-libboost-thread # setup abiword extras %setup -q -T -b 2 -n abiword-extras-%{version} @@ -199,6 +201,9 @@ update-desktop-database %{_datadir}/applications %{_libdir}/pkgconfig/abiword-%{majorversion}.%{minorversion}.pc %changelog +* Mar 29 2008 Marc Maurer - 1:2.6.0-3 +- Fix 439395: apply patch to remove any runtime dependency on boost + * Fri Mar 28 2008 Marc Maurer - 1:2.6.0-2 - Add BigEndian32.american.hash that was missing from the disted abiword-extras tarball