Bug 210374 - net-p2p/mktorrent: increase max piece size & make tracker optional
Summary: net-p2p/mktorrent: increase max piece size & make tracker optional
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: freebsd-ports-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-06-18 15:47 UTC by Anton Saietskii
Modified: 2017-05-08 16:09 UTC (History)
3 users (show)

See Also:
vsasjason: maintainer-feedback-
vsasjason: maintainer-feedback?


Attachments
as summary (4.90 KB, patch)
2016-06-18 15:47 UTC, Anton Saietskii
no flags Details | Diff
make output look better in verbose mode (6.34 KB, patch)
2016-06-18 16:26 UTC, Anton Saietskii
vsasjason: maintainer-approval? (dgerow)
Details | Diff
example torrent of 1GiB-sized pieces (905.30 KB, application/x-bittorrent)
2016-06-20 13:18 UTC, Anton Saietskii
no flags Details
example torrent of 512MiB-sized pieces (916.96 KB, application/x-bittorrent)
2016-06-20 13:18 UTC, Anton Saietskii
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Saietskii 2016-06-18 15:47:36 UTC
Created attachment 171550 [details]
as summary

=== Increase max piece size ===
Optimal piece count is ~1500. mktorrent allows up to 2^28 currently, thus providing ability to create torrents for 375 GiB of data with optimal piece count. Increased maximum piece size to 2^30 thus allowing torrents for 1.5 TiB of data (again, with optimal piece count).

=== Make tracker optional ===
mktorrent currently can't create torrents without announce URL. Since DHT works perfectly well nowadays, this limitation doesn't make any sense. Changed to require tracker only when creating private torrent (i.e. DHT, PEX, etc disabled).
Comment 1 Anton Saietskii 2016-06-18 16:26:52 UTC
Created attachment 171552 [details]
make output look better in verbose mode
Comment 2 Anton Saietskii 2016-06-20 13:18:24 UTC
Created attachment 171610 [details]
example torrent of 1GiB-sized pieces
Comment 3 Anton Saietskii 2016-06-20 13:18:57 UTC
Created attachment 171611 [details]
example torrent of 512MiB-sized pieces
Comment 4 Anton Saietskii 2016-09-29 12:28:37 UTC
Requesting forced commit & maintainer reset.
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-03-12 13:35:44 UTC
A commit references this bug:

Author: danfe
Date: Sun Mar 12 13:35:30 UTC 2017
New revision: 435987
URL: https://svnweb.freebsd.org/changeset/ports/435987

Log:
  net-p2p/mktorrent: increase max piece size and make tracker optional

  Optimal piece count is ~1500. mktorrent allows up to 2^28 currently, thus
  providing ability to create torrents for 375 GiB of data with optimal piece
  count. Increase maximum piece size to 2^30 thus allowing torrents for 1.5
  TiB of data (again, with optimal piece count).

  mktorrent currently can't create torrents without announce URL. Since DHT
  works perfectly well nowadays, this limitation doesn't make much sense.
  Change to require tracker only when creating private torrent (i.e. DHT,
  PEX, etc. disabled).

  While here: define LICENSE (GPLv2+), make options actually work, remove
  redundant THREADS_DESC, and clean up Makefile a bit.

  PR:		210374
  Submitted by:	Anton Sayetsky
  Approved by:	maintainer timeout

Changes:
  head/net-p2p/mktorrent/Makefile
  head/net-p2p/mktorrent/files/
  head/net-p2p/mktorrent/files/patch-init.c
  head/net-p2p/mktorrent/files/patch-output.c
Comment 6 Alexey Dokuchaev freebsd_committer freebsd_triage 2017-03-12 13:41:43 UTC
Patches added (along with other necessary port fixes) in ports r435987, thank you.  Have you considered submitting them upstream (https://github.com/Rudde/mktorrent)?

I can see that author had already made announce URL optional (https://github.com/Rudde/mktorrent/issues/12) but max piece size issue could still be relevant.
Comment 7 Anton Saietskii 2017-05-08 16:09:29 UTC
(In reply to Alexey Dokuchaev from comment #6)

Unfortunately, GitHub requires registration to open issues (correct me if I'm wrong), so answer is no because I don't want to register yet.