Bug 247376 - net-p2p/ctorrent: add couple of useful patches
Summary: net-p2p/ctorrent: add couple of useful patches
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dirk Meyer
Depends on:
Reported: 2020-06-18 10:55 UTC by Alexey Dokuchaev
Modified: 2020-06-25 11:34 UTC (History)
0 users

See Also:
dinoex: maintainer-feedback+
danfe: maintainer-feedback?

Allow for missing "announce" field (926 bytes, patch)
2020-06-18 10:55 UTC, Alexey Dokuchaev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Dokuchaev freebsd_committer 2020-06-18 10:55:28 UTC
Created attachment 215731 [details]
Allow for missing "announce" field

I propose to add two patches to net-p2p/ctorrent port in order to improve handling of some *.torrent files:

1) lots of new torrent files, created in the trackerless (DHT) era, do not have "announce" field populated, and ctorrent refuses to work with such files.  While ctorrent does not support DHT-only downloads, it's often used to display *.torrent file contents, e.g. Midnight Commander uses it by default.  I'm attaching the patch which would skip missing "announce" field, but still process "announce-list" if available.

2) you might also consider adding another patch[*] from Gentoo Linux: rTorrent sometimes creates invalid torrents which has empty path components.  The bitorrent spec allows for "" strings, but they make no sense in paths, so instead of always adding a / in between, skip them.

[*] https://gitweb.gentoo.org/repo/gentoo.git/tree/net-p2p/ctorrent/files/ctorrent-3.3.2-empty-path-components.patch
Comment 1 Dirk Meyer freebsd_committer 2020-06-25 07:01:39 UTC
in testing with other changes.
Comment 2 commit-hook freebsd_committer 2020-06-25 11:33:45 UTC
A commit references this bug:

Author: dinoex
Date: Thu Jun 25 11:33:35 UTC 2020
New revision: 540385
URL: https://svnweb.freebsd.org/changeset/ports/540385

  - fix empty announce list
  - fix empty path
  PR:		247376
  Submitted by:	Alexey Dokuchaev
  Obtained from:	Gentoo

  - fix mutiple peers behind same IP
  Obtained from:	Timothy Palpant

Comment 3 Dirk Meyer freebsd_committer 2020-06-25 11:34:27 UTC
Committed, Thanks.