Giter Site home page Giter Site logo

mktorrent's Introduction

Type 'make' to build the program.
Do 'make install' to install the program to /usr/local/bin.
For more options look in the Makefile.

If you use an old version of BSD's make, you might need
make -f BSDmakefile

See https://github.com/pobrn/mktorrent/wiki for more info.

mktorrent's People

Contributors

codeclem avatar esmil avatar holgersson32644 avatar iamjwc avatar jrwren avatar mathieui avatar nikswap avatar p-roesink avatar pobrn avatar profpatsch avatar rmsacks avatar rudde avatar uno20001 avatar zordtk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mktorrent's Issues

Request: Automatic Piece Length

Could we have a -l auto option please, which calculates using the torrent size a piece length between 15 and 24, so that there are usually maybe between 1000 and 2000 pieces.

Perhaps with this formula:
max( 15, min( 24, floor( log( torrent_size / 1000 ) / log( 2 ))))

Can't make mktorrent

Trying to make mktorrent from source but getting the following errors when I attempt:

cc -O2 -Wall -Wextra -Wpedantic   prefix.c -o prefix`
cc -O2 -Wall -Wextra -Wpedantic  -DPRIoff="\"ld\"" -DVERSION="\"1.1\"" -c ftw.c
cc -O2 -Wall -Wextra -Wpedantic  -DPRIoff="\"ld\"" -DVERSION="\"1.1\"" -c init.c
In file included from init.c:39:0:
msg.h:9:32: warning: anonymous variadic macros were introduced in C99 [-Wvariadic-macros]
 #define FATAL_IF(cond, format, ...) do { if (cond) fatal(format, __VA_ARGS__); } while(0)
                                ^
init.c: In function ‘is_dir’:
init.c:181:3: warning: initializer element is not computable at load time
   strdup(target),
   ^
init.c:183:2: warning: initializer element is not computable at load time
  };
  ^
init.c:180:2: warning: ISO C90 forbids mixed declarations and code [-Wpedantic]
  struct file_data fd = {
  ^
init.c: In function ‘process_node’:
init.c:227:3: warning: initializer element is not computable at load time
   strdup(path),
   ^
init.c:229:2: warning: initializer element is not computable at load time
  };
  ^
init.c:226:2: warning: ISO C90 forbids mixed declarations and code [-Wpedantic]
  struct file_data fd = {
  ^
init.c: In function ‘print_help’:
init.c:291:4: warning: string length ‘985’ is greater than the length ‘509’ ISO C90 compilers are required to support [-Woverlength-strings]
    "general gossip about the program to: [email protected]\n");
    ^
In file included from mktorrent.h:12:0,
                 from init.c:37:
init.c: In function ‘print_announce_list’:
ll.h:32:51: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
 #define LL_FOR_FROM_TO_STEP(node, from, to, step) for (struct ll_node *(node) = from; node != to; step(node))
                                                   ^
ll.h:33:28: note: in expansion of macro ‘LL_FOR_FROM_TO_STEP’
 #define LL_FOR(node, list) LL_FOR_FROM_TO_STEP(node, LL_HEAD(list), NULL, LL_STEP)
                            ^
init.c:301:2: note: in expansion of macro ‘LL_FOR’
  LL_FOR(node, list) {
  ^
ll.h:32:51: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
 #define LL_FOR_FROM_TO_STEP(node, from, to, step) for (struct ll_node *(node) = from; node != to; step(node))
                                                   ^
ll.h:33:28: note: in expansion of macro ‘LL_FOR_FROM_TO_STEP’
 #define LL_FOR(node, list) LL_FOR_FROM_TO_STEP(node, LL_HEAD(list), NULL, LL_STEP)
                            ^
init.c:301:2: note: in expansion of macro ‘LL_FOR’
  LL_FOR(node, list) {
  ^
ll.h:32:51: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
 #define LL_FOR_FROM_TO_STEP(node, from, to, step) for (struct ll_node *(node) = from; node != to; step(node))
                                                   ^
ll.h:34:33: note: in expansion of macro ‘LL_FOR_FROM_TO_STEP’
 #define LL_FOR_FROM(node, from) LL_FOR_FROM_TO_STEP(node, from, NULL, LL_STEP)
                                 ^
init.c:308:3: note: in expansion of macro ‘LL_FOR_FROM’
   LL_FOR_FROM(inner_node, LL_NEXT(LL_HEAD(inner_list))) {
   ^
init.c: In function ‘print_web_seed_list’:
ll.h:32:51: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
 #define LL_FOR_FROM_TO_STEP(node, from, to, step) for (struct ll_node *(node) = from; node != to; step(node))
                                                   ^
ll.h:34:33: note: in expansion of macro ‘LL_FOR_FROM_TO_STEP’
 #define LL_FOR_FROM(node, from) LL_FOR_FROM_TO_STEP(node, from, NULL, LL_STEP)
                                 ^
init.c:329:2: note: in expansion of macro ‘LL_FOR_FROM’
  LL_FOR_FROM(node, LL_NEXT(LL_HEAD(list))) {
  ^
GNUmakefile:64: recipe for target 'init.o' failed
make: *** [init.o] Error 1

mktorrent(1) doesn't support output to stdout

Forwarded from: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=699487 (slightly reworded).

A common feature that mktorrent(1) is lacking is the support for writing the resulting Bencode'd data to stdout. The issue is three-fold:

  1. - has no special meaning for --output=, and thus using --output=- results in a file named - being created in the current working directory; (unless such file exists, that is);
  2. alternatively, --output=/dev/stdout (or similar) fails because of the unconditional use of O_CREAT | O_EXCL (as I've noted in another report);
  3. finally, most of the diagnostics (excluding mainly actual errors) is directed to stdout, although it (arguably) makes sense to send them to stderr instead.

The Debian bug report contains a patch implementing this.

PS. Also to note is that as long as the use of mktorrent(1) from Shell code is considered, writing copyright information upon every invocation doesn't seem like a particularly clever idea, either. Perhaps it should be dropped altogether. Or, there could be --version…

Make the -a optional

Since trackers are largely unnecessary nowadays, have you considered
letting mktorrent run with no -a option, unless -p is set?
I tend to set "-a null" just to shut it up :D

new release

Would it be possible to cut a new release soon? The last one was four years ago and it seems ownership of the project has changed hands once again.

Mktorrent v1.1 not showing progress status while creating torrent

Hello !
I was using mktorrent v1.0 that was showing the progress output like that : "1500 pieces of 2000 hashed".
Now i installed rutorrent 3.10, with mktorrent v1.1 and it seems that your tool is not anymore showing the progress of his job.

I think that it is really necessary to know the progress even more with large torrent.

You can see that the issue is really old and has been reported on rutorrent side, but the problem is on mktorrent side..

Novik/ruTorrent#1658

Thanks !

Unable to create torrent of files over 2GB on 32bit OS

Trying to create torrents containing files over 2GB, with mktorrent 1.1, on ubuntu 16.04 32bit:

mktorrent -a https://random-tracker.com some_file_larger_than_2gb.iso
mktorrent 1.1 (c) 2007, 2009 Emil Renner Berthing

Error stat'ing 'some_file_larger_than_2gb.iso: Value too large for defined data type

Trying with mktorrent 1.0 and it creates files without problem:

/usr/bin/mktorrent -a https://some-tracker.com some_file_larger_than_2gb.iso
mktorrent 1.0 (c) 2007, 2009 Emil Renner Berthing

Hashed 1114 of 1114 pieces.
Writing metainfo file... done.

Creating torrents with files under 2GB works without problem on both 1.0 and 1.1

uname -a:
Linux montera 4.15.0-36-generic #39~16.04.1-Ubuntu SMP Tue Sep 25 09:00:45 UTC 2018 i686 i686 i686 GNU/Linux

Half-Request: Better Compatibility with OS X

When OS X creates a torrent file, it uses a UTF-8 naming convention, however it's using the Normalization Form Canonical Decomposition (NFD) instead of Normalization Form Canonical Composition (NFC). Most clients on other operating systems, who would of course torrent using torrent files made on OS X, are going to expect NFC. Meanwhile, OS X torrent clients are, for the most part, able to handle NFC- or NFD-normalized filenames. They ensure the end filenames are NFD-normalized, which is what the HFS+ filesystem expects.

The ideal, therefore, is for all torrent files to be generated as UTF-8/NFC, which is the implicit standard for the Bittorrent protocol: "All strings in a .torrent file that contains text must be UTF-8 encoded."

At the moment, mktorrent (and all other torrent clients I've tested) do not distinguish between UTF-8/NFC and UTF-8/NFD, and therefore does not convert UTF-8/NFD text strings to UTF-8/NFC,

My question is, would there be a general interest in an option to format torrent files generated on OS X with the NFC unicode equivalent encoding for the torrent-creating computer's NFD-normalized filenames? If so, would forking the project be the best way to contribute? (New to GitHub, sorry!) Or is there already a super-secret option for something like that?

Make announce URL option optional

Many torrent clients can transfer files by setting peer IP and port and don’t need at announce URL.
Please, make this option optional.

mktorrent doesn't allow one to overwrite an existing file

Forwarded from: https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=mktorrent

Probably the best way to create a temporary file in Shell is to use mktemp(1). Alas, mktorrent(1) doesn't allow for the --output= file to be overwritten, thus making it “incompatible” with mktemp(1). Consider, e.g.:

$ mktorrent --announce=http://nowhere.invalid:8080/ \
      -o "$(mktemp -t -- torrent.XXXXXXXX)" -- example 
mktorrent 1.0 (c) 2007, 2009 Emil Renner Berthing

Error creating '/tmp/torrent.xejf3RRS': File exists

AIUI, the conventional wisdom is to support some kind of a --force option to disable the checks such as the one performed by mktorrent(1) in open_file().

Naming options alters basename of the target

Hello there

I have the problem that the -n option alters the basename of the target.

Situation:

  • I have a folder like "MyTorrent" and inside there are the actual files
  • I want to create the .torrent file using following options:
    mktorrent -n "MyTorrent unzipped" -a "http://tracker.domain.com" -o "/media/torrent_files/" "MyTorrent"

Because I add the "unzipped" to the naming, then the torrent folder contained in the .torrent file will be changed to "MyTorrent unzipped". That means after creating the .torrent file I would have to rename the "MyTorrent" folder, otherwise the data within can't be used.

The mktorrent help states this:

-n : set the name of the torrent,
default is the basename of the target

In my opinion, it should just alter the name displayed in the torrent client to "MyTorrent unzipped" but not the actual folder.

--> I'm currently using v1.0 from sourceforge.

Segmentation fault

Hashing xxx.file.r21.
Segmentation fault

with
mktorrent -l 22 -a announce.url -o taken.torrent /folder/destination/

Out of memory?

I keep getting this error. I tried it so:
mktorrent -a tracker -p folder-of-file
and I keep getting error out of memory. I did only make and then sudo make PREFIX=/usr install

Linux version 2.6.18-238.9.1.el5.028stab089.1 (root@rhel5-build-x64) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Apr 14 14:06:01 MSD 2011

mktorrent seems to be able to create torrent files with more bencoded items than clients can handle

I created using mktorrent a very large torrent file from approximately 5 TB of videos, some ~200 files ranging from a few GB each up to around 75 GB. The torrent file itself is nearly 100 MB. The folks to whom I've distributed the torrent file report that they've not been able to get their clients to read the torrent file.

biglybt:

biglybt error

qbittorrent:

qbittorrent error

I'm having trouble getting it to work in Transmission. My only Transmission instance is the web interface and uploading it just… crashes the web interface. Latest versions, all.

I see two resolutions for this on the mktorrent side:

  1. Emit a warning when some threshold of number of bencoded items or depth of dictionary is met
  2. Do nothing and let others find this bug report, and realize that they need to break the single large torrent file into a few smaller files!

ALLINONE and EXPORT macros

While browsing the code base I found two macros: ALLINONE and EXPORT. Is there any value this functionality brings to the software? Because I could not figure out why it is beneficial to have just a single translation unit. In a brief correspondence with the current owner of the project, @Rudde, s/he said s/he did not know the origins of these two macros. So this question is mainly directed towards the original author, @esmil (as far as I know).

publisher information

http://www.BitComet.com
bitcomet

Supported by Bitcomet and others is the Publisher Fields
I guess special comments , IE Publisher IE from
and Homepage url. or in the case of BitComet publisher name / publisher url.
-h "somehomepage.com" -p "somecool-linux distro name"

anyhow if you commonly download from a page ie ISO's etc giving a home page and Name of publisher seems nice and polished.
anyhow it's just an "Enhancement" Idea

Outdated copyright owners and years

The COPYING file reports a rather outdated copyright notice:

Copyright (C) 2007, 2009 Emil Renner Berthing

as it's 2018 and Emil Renner Berthing handed over the maintainership of this program in 2016, so perhaps the new maintainer should be listed there too. The same goes for mktorrent's output:

$ mktorrent 
mktorrent 1.1 (c) 2007, 2009 Emil Renner Berthing
[...]

-x : ensure info hash is unique for easier cross-seeding

If this parameter is enabled to seed, another hash will be displayed when the seed is opened on other clients. If this parameter is not used, the hash will always be unique.
Based on the above facts, I think it is necessary to explain the - x parameter in more detail. Avoid user ambiguity

eg:
mktorrent generation ..
magnet:?xt=urn:btih:efa8b1a37da52ae5fa7a711eb361bfab12ad72b4

qbittorrent is open torrent file show torrent hash:
magnet:?xt=urn:btih:1fa7f48c866cb6a9c90b314ad2d2148c3ac422f7

close -x
is hash same

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.