Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98929 - ctorrent patch to compile under uclibc
Summary: ctorrent patch to compile under uclibc
Status: VERIFIED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2005-07-13 15:51 UTC by Enderson Tadeu S. Maia (RETIRED)
Modified: 2007-07-12 15:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ctorrent for uclic fix (uclib.patch,12.04 KB, patch)
2005-07-13 15:54 UTC, Enderson Tadeu S. Maia (RETIRED)
Details | Diff
getcwd fix (getcwd.patch,1.14 KB, patch)
2005-07-14 05:55 UTC, Enderson Tadeu S. Maia (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enderson Tadeu S. Maia (RETIRED) gentoo-dev 2005-07-13 15:51:52 UTC
I used the patches from openembedded project for ctorrent.

I used these two patches:

http://openembedded.bkbits.net:8080/openembedded/patch@1.2787.114.1
http://openembedded.bkbits.net:8080/openembedded/patch@1.2787.53.164


I attach a uclib.patch file.
Comment 1 Enderson Tadeu S. Maia (RETIRED) gentoo-dev 2005-07-13 15:54:21 UTC
Created attachment 63343 [details, diff]
ctorrent for uclic fix
Comment 2 Enderson Tadeu S. Maia (RETIRED) gentoo-dev 2005-07-14 05:55:19 UTC
Created attachment 63384 [details, diff]
getcwd fix

Only with this patch, the ctorrent compile with uclibc.

From http://openembedded.bkbits.net:8080/openembedded/patch@1.2787.114.1 :

"Apply a patch to ctorrent to make it use getcwd rather than getwd (getwd is
deprecated for portability and security reasons), which fixes its build for
uclibc."
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-07-12 15:23:52 UTC
If it still doesn't work, we need a patch for net-p2p/ctorrent-3.1; this one got totally obsolete. Sorry. :/
Comment 4 solar (RETIRED) gentoo-dev 2007-07-12 15:37:44 UTC
FYI.. this seems to compile fine under uClibc.


uClibc portage # ctorrent 
Enhanced CTorrent dnh3.1   Original code Copyright: YuHong(992126018601033)
WARNING: THERE IS NO WARRANTY FOR CTorrent. USE AT YOUR OWN RISK!!!

General Options:
-h/-H           Show this message
-x              Decode metainfo (torrent) file only, don't download
-c              Check pieces only, don't download
-v              Verbose output (for debugging)

Download Options:
-e int          Exit while seed <int> hours later (default 72 hours)
-E num          Exit after seeding to <num> ratio (UL:DL)
-i ip           Listen for connections on specific IP address (default all/any)
-p port         Listen port (default 2706 -> 2106)
-s filename     Download ("save as") to a different file or directory
-C cache_size   Cache size, unit MB (default 16MB)
-f              Force saved bitfield or seed mode (skip initial hash check)
-b filename     Specify bitfield save file (default is torrent+".bf")
-M max_peers    Max peers count (default 100)
-m min_peers    Min peers count (default 1)
-z slice_size   Download slice/block size, unit KB (default 16, max 128)
-n file_list    Specify file number(s) to download
-D rate         Max bandwidth down (unit KB/s)
-U rate         Max bandwidth up (unit KB/s)
-P peer_id      Set Peer ID prefix (default "-CD0301-")
-A user_agent   Set User-Agent header (default "Enhanced-CTorrent/dnh3.1")
-S host:port    Use CTCS server at host:port
-a              Preallocate files on disk
-T              Convert foreign filenames to printable text
-X command      Run command upon download completion ("user exit")
-d              Daemon mode (fork to background)

Make metainfo (torrent) file options:
-t              Create a new torrent file
-u url          Tracker's url
-l piece_len    Piece length (default 262144)
-s filename     Specify metainfo file name

Example:
ctorrent -s new_filename -e 12 -C 32 -p 6881 example.torrent

home page: http://ctorrent.sourceforge.net/
see also: http://www.rahul.net/dholmes/ctorrent/
bug report: dholmes@ct.boxmail.com
original author: bsdi@sina.com

uClibc portage # ldd `which ctorrent`
 libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0x4a7f2000)
 libstdc++.so.6 => /usr/lib/gcc/i386-gentoo-linux-uclibc/3.4.6/libstdc++.so.6 (0x4a749000)
 libm.so.0 => /lib/libm.so.0 (0x4a735000)
 libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4a72c000)
 libc.so.0 => /lib/libc.so.0 (0x4a6e0000)
 libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0x4a5c8000)
 libdl.so.0 => /lib/libdl.so.0 (0x4a5c4000)
 ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x4a833000)

uClibc portage # qlist -Uv ctorrent
net-p2p/ctorrent-3.1
Comment 5 solar (RETIRED) gentoo-dev 2007-07-12 15:42:26 UTC
Looks like upstream fixed it already.

uClibc portage # scanelf -Bs getwd `which ctorrent`
ET_DYN  -  /usr/bin/ctorrent 
uClibc portage # scanelf -Bs getcwd `which ctorrent`
ET_DYN getcwd /usr/bin/ctorrent