head 1.12; access; symbols pkgsrc-2013Q2:1.12.0.10 pkgsrc-2013Q2-base:1.12 pkgsrc-2012Q4:1.12.0.8 pkgsrc-2012Q4-base:1.12 pkgsrc-2011Q4:1.12.0.6 pkgsrc-2011Q4-base:1.12 pkgsrc-2011Q2:1.12.0.4 pkgsrc-2011Q2-base:1.12 pkgsrc-2009Q4:1.12.0.2 pkgsrc-2009Q4-base:1.12 pkgsrc-2009Q3:1.11.0.2 pkgsrc-2009Q3-base:1.11 pkgsrc-2009Q2:1.10.0.2 pkgsrc-2009Q2-base:1.10 pkgsrc-2008Q4:1.8.0.16 pkgsrc-2008Q4-base:1.8 pkgsrc-2008Q3:1.8.0.14 pkgsrc-2008Q3-base:1.8 cube-native-xorg:1.8.0.12 cube-native-xorg-base:1.8 pkgsrc-2008Q2:1.8.0.10 pkgsrc-2008Q2-base:1.8 pkgsrc-2008Q1:1.8.0.8 pkgsrc-2008Q1-base:1.8 pkgsrc-2007Q4:1.8.0.6 pkgsrc-2007Q4-base:1.8 pkgsrc-2007Q3:1.8.0.4 pkgsrc-2007Q3-base:1.8 pkgsrc-2007Q2:1.8.0.2 pkgsrc-2007Q2-base:1.8 pkgsrc-2007Q1:1.7.0.2 pkgsrc-2007Q1-base:1.7 pkgsrc-2006Q4:1.5.0.4 pkgsrc-2006Q4-base:1.5 pkgsrc-2006Q3:1.5.0.2 pkgsrc-2006Q3-base:1.5 pkgsrc-2006Q2:1.4.0.4 pkgsrc-2006Q2-base:1.4 pkgsrc-2006Q1:1.4.0.2 pkgsrc-2006Q1-base:1.4 pkgsrc-2005Q4:1.2.0.2 pkgsrc-2005Q4-base:1.2; locks; strict; comment @# @; 1.12 date 2009.10.29.11.42.31; author tron; state dead; branches; next 1.11; 1.11 date 2009.07.09.10.42.29; author tron; state Exp; branches; next 1.10; 1.10 date 2009.06.04.19.23.51; author tron; state Exp; branches; next 1.9; 1.9 date 2009.06.04.19.15.47; author tron; state Exp; branches; next 1.8; 1.8 date 2007.04.20.13.37.57; author tron; state dead; branches; next 1.7; 1.7 date 2007.01.26.18.48.52; author tron; state Exp; branches; next 1.6; 1.6 date 2007.01.04.12.45.41; author tron; state Exp; branches; next 1.5; 1.5 date 2006.09.13.21.04.20; author tron; state dead; branches; next 1.4; 1.4 date 2006.03.03.15.30.53; author tron; state Exp; branches; next 1.3; 1.3 date 2006.01.30.00.52.28; author tron; state dead; branches; next 1.2; 1.2 date 2005.10.24.08.41.11; author adam; state Exp; branches; next 1.1; 1.1 date 2005.10.03.18.09.55; author joerg; state Exp; branches; next ; desc @@ 1.12 log @Update "libtorrent" and "rtorrent" package to version 0.12.5/0.8.5: - Add support for any number of custom download values identified by string keys. d.set_custom=key,value d.get_custom=key (returns "" if not set) d.get_custom_throw=key (returns error if not set) - With this patch, rtorrent will detect and complain about .torrent files with broken bencode representation (e.g. where the order of dictionary keys is not lexicographic). - Choose a different poll type using the RTORRENT_POLL env. variable (if it's implemented), probably only useful as RTORRENT_POLL=select. - Add the commands execute_capture and execute_capture_nothrow that work like their other counterparts but return the OUTPUT (stdout) of the given command. - Fixes the code that detects which peer was sending bad data. Peers are then automatically banned after sending three bad chunks. - Stops rtorrent from always creating and resizing ALL files, even those set to "off". Files will still be created, but with a size of zero, until a part of them is getting downloaded. This helps with filesystems that don't support sparse files (such as FAT, HFS+, and others). - Fix inefficient piece distribution due to linear chunk request strategy by randomizing position every few (on average 32) chunks, see ticket #190. - Enable custom throttles, both per-download or per-IP. See http://libtorrent.rakshasa.no/ticket/20 for info and instructions. - Fix crashes/errors due to rtorrent attempting to pass non-utf-8 strings to xmlrpc. - Added support for using posix_fallocate on newly resized files. - Include locally available chunks in the "chunks seen" statistics for completed/distributed copies. Patch by Josef Drexler. - Added 'd.get_bitfield' command for retrieving the bitfield in hex format. Patch by Thomas Rosner. - Fixed include headers for gcc-4.4.0. Patch by 'kloeri'. @ text @$NetBSD: patch-ab,v 1.11 2009/07/09 10:42:29 tron Exp $ --- src/torrent/poll_kqueue.cc.orig 2008-10-28 03:48:48.000000000 +0000 +++ src/torrent/poll_kqueue.cc 2009-07-09 11:27:45.000000000 +0100 @@@@ -54,6 +54,8 @@@@ #include #endif +#include + namespace torrent { #ifdef USE_KQUEUE @ 1.11 log @Update "libtorrent" package to version 0.12.4 and "rtorrent" package to version 0.8.4. Changes since 0.12.2 respectively 0.8.2: - Fixed EINTR handling in execute command. - Fixed a couple of memory leaks in xmlrpc.cc. - Initial seeding support added. - Added a work-around for the stdin kqueue bug in MacOSX. - Numerous bug-fixes and patches. - Work-around for OpenBSD's broken sys/event.h, which fails to compile if it's the first (or only) included header. (Ticket #1470) - Fixes compilation with old libcurl versions. (Ticket #1471) - Fix compile error on systems that lack mincore(2). - Fixes a crash in epoll due to libcurl/c-ares bug: PollEPoll::modify(...) epoll_ctl call failed. - Enforce an http transfer timeout when libcurl fails to honor it. Also set a 5-minute timeout for (previously unlimited) torrent transfers and fixes the argument type for curl_easy_setopt values. - Allows bandwidth throttles to work without floating point support. - Added the 'd.add_peer=host[:port]' command to manually add a peer (not for torrents marked "private"), port 6881 is the default. - Allows banning the selected peer with "B". No unbanning is possible yet. - Added system.method.{insert,erase} commands that allows user-specified commands. E.g "system.method.insert=foo,print=Bar". - Differentiate between commands that have no target, and those that take generic targets, when using XMLRPC. - Added 'event.download.inserted_{new,session}' that are triggered when a new or a session torrent is added. Ticket #1516. - Added 'system.method.get', 'ui.current_view.set' and 'group.insert' commands. - Enabled different ratio settings for different groups of downloads. - Added 'view.persistance' command that makes downloads inserted into that view persist across sessions. Only call on user-created views. - Added 'ratio.*' commands that call the 'group.seeding.ratio.*' equivalents. - Changed torrent::DownloadList::close_directly() so doesn't save the session if the underlying file/directory has been moved or removed. This change, in addition to calling 'd.set_directory=' before 'execute=mv,...', as previously shown in the examples, will make rtorrent behave correctly when 'check_hash=no' is set. @ text @d1 1 a1 1 $NetBSD$ @ 1.10 log @Add URL of upstream bug report. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.9 2009/06/04 19:15:47 tron Exp $ d3 5 a7 10 Deal with the kqueue(2) API differences between NetBSD and the other BSDs. The upstream bug report is here: http://libtorrent.rakshasa.no/ticket/1765 --- src/torrent/poll_kqueue.cc.orig 2008-05-07 13:19:13.000000000 +0100 +++ src/torrent/poll_kqueue.cc 2009-06-04 18:10:50.000000000 +0100 @@@@ -57,6 +57,12 @@@@ #ifdef USE_KQUEUE d9 1 a9 5 +#ifdef __NetBSD__ +typedef uintptr_t kevent_udata_t; +#else +typedef void *kevent_udata_t; +#endif d11 1 a11 4 inline uint32_t PollKQueue::event_mask(Event* e) { return m_table[e->file_descriptor()]; @@@@ -83,7 +89,7 @@@@ d13 1 a13 36 struct kevent* itr = m_changes + (m_changedEvents++); - EV_SET(itr, event->file_descriptor(), mask, op, 0, 0, event); + EV_SET(itr, event->file_descriptor(), mask, op, 0, 0, (kevent_udata_t)event); } PollKQueue* @@@@ -146,10 +152,10 @@@@ // Also check current mask. - if (itr->filter == EVFILT_READ && itr->udata != NULL && event_mask((Event*)itr->udata) & flag_read) + if (itr->filter == EVFILT_READ && itr->udata != (kevent_udata_t)NULL && event_mask((Event*)itr->udata) & flag_read) ((Event*)itr->udata)->event_read(); - if (itr->filter == EVFILT_WRITE && itr->udata != NULL && event_mask((Event*)itr->udata) & flag_write) + if (itr->filter == EVFILT_WRITE && itr->udata != (kevent_udata_t)NULL && event_mask((Event*)itr->udata) & flag_write) ((Event*)itr->udata)->event_write(); } @@@@ -173,10 +179,12 @@@@ throw internal_error("PollKQueue::close(...) called but the file descriptor is active"); for (struct kevent *itr = m_events, *last = m_events + m_waitingEvents; itr != last; ++itr) - if (itr->udata == event) - itr->udata = NULL; + if (itr->udata == (kevent_udata_t)event) + itr->udata = (kevent_udata_t)NULL; + + struct kevent *oitr = m_changes; - m_changedEvents = std::remove_if(m_changes, m_changes + m_changedEvents, rak::equal(event, rak::mem_ref(&kevent::udata))) - m_changes; + m_changedEvents = std::remove_if(m_changes, m_changes + m_changedEvents, rak::equal((kevent_udata_t)event, rak::mem_ref(&kevent::udata))) - m_changes; } // Use custom defines for EPOLL* to make the below code compile with @ 1.9 log @Add patch by Joerg Sonnenberger with small modification by myself that addresses the API difference in kqueue(2) between NetBSD and FreeBSD. Turn on kqueue(2) support now that it actually works under NetBSD. @ text @d1 1 a1 1 $NetBSD$ d4 3 @ 1.8 log @Update "libtorrent" package to version 0.11.4 and "rtorrent" package to version 0.7.4. Changes since versions 0.11.1 and 0.7.1 respectively: - Added "max_open_http" option that limits the max number of simultaneous http connections. By default set to 32. - Directory structured view of the file list. The '/' key collapses directories, while the right arrow or ^F enters the selected directory. Changing the priority for a directory changes all contained files. - Added "create_link" and "delete_link" options which apply to a download. These must be used with the new "on_*" options, so as to allow you to create symbolic links when starting, stopping, finishing, etc, a torrent. - The "tos" option was parsing the hex value with unit == 0, which caused it to always zero it. - Forgot to check if there were any torrents hashing before starting new non-fast-resume checks, which would cause multiple torrents to be hashed at once. - File progress is now updated when hash_check is called, and no longer cleared on close. This fixes a bug with >100% file progress being reported and optimizes file progress updating for completed torrents. - Disabled IPv6 http requests so the trackers won't think we support it, and enabled curl's support for gzip encodings. - Added 'seeding' view on key 8. - Added "max_{up,down}loads_{div,global}" options. See the man page for more information. - Added support for dvorak keyboard layout. Patch by matled at gmx.net. - The STOPPED request was being canceled when a download was closed with f.ex ^K, moved it so it only happens when the download is removed. - Allow properly quoted and escaped arguments to options. F.ex "schedule = wd,10,10,load_start=~/Foo\ Bar/*.torrent" and "schedule = wd,10,10,load_start="~/Foo Bar/*.torrent"" now works. - Added unlimited setting for max unchoked in ChokeManager and made it the default. Set with 0 as a temporary hack. - Don't resize empty files used for creating directories. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.7 2007/01/26 18:48:52 tron Exp $ d3 12 a14 8 --- configure.orig 2006-12-24 12:54:00.000000000 +0000 +++ configure 2007-01-26 15:15:13.000000000 +0000 @@@@ -15823,6 +15823,10 @@@@ cat >conftest.$ac_ext <<_ACEOF #include #include +#if defined(__sun) && defined(__SVR4) + #include d17 15 a31 1 void f() { mincore((char*)0, 0, (unsigned char*)0); } d33 19 a51 9 _ACEOF @@@@ -15953,6 +15957,9 @@@@ cat >conftest.$ac_ext <<_ACEOF #include #include +#if defined(__sun) && defined(__SVR4) + #include +#endif void f() { mincore((char*)0, 0, (unsigned char*)0); } d53 3 a55 12 _ACEOF @@@@ -16000,6 +16007,12 @@@@ cat >conftest.$ac_ext <<_ACEOF #include #include +#if defined(__sun) && defined(__SVR4) + #include +#endif +#if defined(__sun) && defined(__SVR4) + #include +#endif void f() { mincore((char*)0, 0, (char*)0); } d57 1 a57 12 _ACEOF @@@@ -16701,6 +16714,10 @@@@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + : Avoid regenerating within pkgsrc + exit 0 + : Avoid regenerating within pkgsrc + exit 0 ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; @ 1.7 log @Update "libtorrent" package to version 0.11.1 and "rtorrent" package to version 0.7.1. Major changes since 0.10.4/0.6.4: - support for the CANCEL piece request message - support for tunneling through HTTP 1.0 proxies - Azureus-style encryption @ text @d1 1 a1 1 $NetBSD$ @ 1.6 log @Fix build under Solaris. Patch provided by Peter Schuller in PR pkg/35356. @ text @d3 3 a5 3 --- configure.orig 2006-10-27 15:52:04.000000000 +0200 +++ configure @@@@ -22826,6 +22826,9 @@@@ echo $ECHO_N "checking signedness of min d12 1 d16 1 a16 11 @@@@ -22873,6 +22876,9 @@@@ sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #include #include +#if defined(__sun) && defined(__SVR4) + #include +#endif void f() { mincore((char*)0, 0, (char*)0); } _ACEOF @@@@ -22956,6 +22962,9 @@@@ echo $ECHO_N "checking signedness of min d26 1 a26 1 @@@@ -23003,6 +23012,9 @@@@ sed 's/^/| /' conftest.$ac_ext >&5 d33 3 d39 1 a39 1 @@@@ -23704,6 +23716,10 @@@@ do @ 1.5 log @Update "libtorrent" package to version 0.10.1 and "rtorrent" package to version 0.6.1. Changes since version 0.8.5 respectively 0.4.5 are: - improved user interface (apparently also fixing redraw problems under DragonFly BSD) - better diskspace handling - show client names and versions in the peer list - improved tracker communication - lots of bug fixes Based on patches provided by Jan 'Rumko' Kosir in private e-mail. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.4 2006/03/03 15:30:53 tron Exp $ d3 10 a12 4 --- src/protocol/peer_connection_seed.cc.orig 2006-02-09 16:05:05.000000000 +0000 +++ src/protocol/peer_connection_seed.cc 2006-03-03 15:11:38.000000000 +0000 @@@@ -168,7 +168,7 @@@@ } d14 9 a22 4 case ProtocolBase::REQUEST: - if (buf->remaining() < 13) + if (buf->remaining() < 12) break; d24 9 a32 3 if (!m_up->choked()) { @@@@ -185,7 +185,7 @@@@ throw network_error("Received a piece but the connection is strictly for seeding."); d34 9 a42 4 case ProtocolBase::CANCEL: - if (buf->remaining() < 13) + if (buf->remaining() < 12) break; d44 12 a55 1 read_cancel_piece(m_down->read_request()); @ 1.4 log @Add a fix from Jari Petter Sundell which prevents stalled connections when a "libtorrent" based BitTorrent client is uploading to another BitTorrent client which uses pipelined Request messages (e.g. BitComet). @ text @d1 1 a1 1 $NetBSD$ @ 1.3 log @Update "libtorrent" package to version 0.8.3 and "rtorrent" package to version 0.4.3. Changes since 0.7.6/0.3.6: - New throttle implementation - Improved config file parser - Settings for using a http proxy and changing the process's umask. - Many more bug fixes and improvements @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.2 2005/10/24 08:41:11 adam Exp $ d3 4 a6 7 --- src/data/file.cc.orig 2005-09-17 19:18:33.000000000 +0000 +++ src/data/file.cc @@@@ -44,6 +44,7 @@@@ #include #include #include +#include d8 15 a22 2 #ifdef USE_XFS #include @ 1.2 log @Changes 0.7.5: * Improvements @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @Include unistd.h to get close() and getpagesize() on DragonFly. @ text @d3 1 a3 1 --- src/data/file.cc.orig 2005-08-03 19:44:11.000000000 +0000 d5 2 a6 2 @@@@ -43,6 +43,7 @@@@ #include d11 1 a11 1 #if HAS_XFS == 1 @