From e8448fe322ec27074b4bfc3bab15fc7900ca569e Mon Sep 17 00:00:00 2001 From: Peter Gordon Date: Feb 15 2008 07:00:08 +0000 Subject: Update to 0.12.1; build w/ GCC 4.3 --- diff --git a/.cvsignore b/.cvsignore index 7bda997..05d2b30 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -libtorrent-0.12.tar.gz +libtorrent-0.12.1.tar.gz diff --git a/rb_libtorrent-gcc43.patch b/rb_libtorrent-gcc43.patch new file mode 100644 index 0000000..8a50044 --- /dev/null +++ b/rb_libtorrent-gcc43.patch @@ -0,0 +1,46 @@ +diff -up ./src/file.cpp.old ./src/file.cpp +--- ./src/file.cpp.old 2008-02-14 20:53:03.000000000 -0800 ++++ ./src/file.cpp 2008-02-14 20:53:14.000000000 -0800 +@@ -66,6 +66,7 @@ BOOST_STATIC_ASSERT(sizeof(lseek(0, 0, 0 + #include + #include "libtorrent/file.hpp" + #include ++#include + + #ifndef O_BINARY + #define O_BINARY 0 +diff -up ./include/libtorrent/buffer.hpp.old ./include/libtorrent/buffer.hpp +--- ./include/libtorrent/buffer.hpp.old 2008-02-14 20:50:39.000000000 -0800 ++++ ./include/libtorrent/buffer.hpp 2008-02-14 20:50:59.000000000 -0800 +@@ -36,6 +36,7 @@ POSSIBILITY OF SUCH DAMAGE. + + #include "libtorrent/invariant_check.hpp" + #include ++#include + + namespace libtorrent { + +diff -up ./include/libtorrent/peer_id.hpp.old ./include/libtorrent/peer_id.hpp +--- ./include/libtorrent/peer_id.hpp.old 2008-02-14 20:53:41.000000000 -0800 ++++ ./include/libtorrent/peer_id.hpp 2008-02-14 20:54:02.000000000 -0800 +@@ -39,6 +39,7 @@ POSSIBILITY OF SUCH DAMAGE. + #include + #include + #include ++#include + + #include "libtorrent/config.hpp" + +diff -up ./include/libtorrent/file.hpp.old ./include/libtorrent/file.hpp +diff -up ./include/libtorrent/asio/detail/pipe_select_interrupter.hpp.old ./include/libtorrent/asio/detail/pipe_select_interrupter.hpp +--- ./include/libtorrent/asio/detail/pipe_select_interrupter.hpp.old 2008-02-14 20:49:42.000000000 -0800 ++++ ./include/libtorrent/asio/detail/pipe_select_interrupter.hpp 2008-02-14 20:50:09.000000000 -0800 +@@ -32,6 +32,8 @@ + #include "asio/system_error.hpp" + #include "asio/detail/socket_types.hpp" + ++#include ++ + namespace asio { + namespace detail { + diff --git a/rb_libtorrent.spec b/rb_libtorrent.spec index d413ca6..ee2b187 100644 --- a/rb_libtorrent.spec +++ b/rb_libtorrent.spec @@ -1,6 +1,6 @@ Name: rb_libtorrent -Version: 0.12 -Release: 3%{?dist} +Version: 0.12.1 +Release: 1%{?dist} Summary: A C++ BitTorrent library aiming to be the best alternative Group: System Environment/Libraries @@ -12,7 +12,7 @@ Source1: %{name}-README-renames.Fedora Source2: %{name}-COPYING.Boost Source3: %{name}-COPYING.zlib -Patch0: %{name}-svn1968-bdecode_recursive-security-fix.patch +Patch0: %{name}-gcc43.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -70,6 +70,7 @@ included documentation for more details.) %prep %setup -q -n "libtorrent-%{version}" +%patch0 -p0 -b .gcc43 ## Some of the sources and docs are executable, which makes rpmlint against ## the resulting -debuginfo and -devel packages, respectively, quite angry. :] find src/ docs/ -type f -exec chmod a-x '{}' \; @@ -84,9 +85,6 @@ install -p -m 0644 %{SOURCE3} COPYING.zlib ## Fix the installed pkgconfig file: we don't need linkage that the ## libtorrent DSO already ensures. sed -i -e 's/^Libs:.*$/Libs: -L${libdir} -ltorrent/' libtorrent.pc.in -## SECURITY: Fix potential stack overflow in bencode_recursive with -## malformed messages. -%patch0 -p3 -b .bdecode_recursive-security-fix %build @@ -128,14 +126,13 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING README -%{_libdir}/libtorrent.so.* %exclude %{_libdir}/*.la +%{_libdir}/libtorrent-%{version}.so ## Unfortunately (even with the "--disable-static" option to the %%configure ## invocation) our use of the system libtool creates static libraries at build ## time, so we must exclude them here. %exclude %{_libdir}/*.a - %files devel %defattr(-,root,root,-) %doc COPYING.Boost COPYING.BSD COPYING.zlib docs/ @@ -149,6 +146,14 @@ rm -rf %{buildroot} %changelog +* Sat Feb 09 2008 Peter Gordon - 0.12.1-1 +- Update to new upstream bug-fix release (0.12.1) +- Rebuild for GCC 4.3 +- Drop security fix patch (merged upstream): + - svn1968-bdecode_recursive-security-fix.patch +- Add GCC 4.3 build fixes (based on patch from Adel Gadllah, bug 432778): + + gcc43.patch + * Mon Jan 28 2008 Peter Gordon - 0.12-3 - Add upstream patch (changeset 1968) to fix potential security vulnerability: malformed messages passed through the bdecode_recursive routine could cause diff --git a/sources b/sources index 58af520..1163e8f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a09a37e6fc74d152821c00c3cb15d248 libtorrent-0.12.tar.gz +1be3c3751673f751015b260836437f2e libtorrent-0.12.1.tar.gz