Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 650340 - net-p2p/mktorrent-1.1 generates corrupted .torrent files when CFLAGS differ from default
Summary: net-p2p/mktorrent-1.1 generates corrupted .torrent files when CFLAGS differ f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Nils Freydank
URL: https://github.com/Rudde/mktorrent/is...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-13 00:32 UTC by Thomas Groman
Modified: 2018-05-11 06:50 UTC (History)
2 users (show)

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


Attachments
fixes from an upstream fork (mktorrent-1.1-fix-build-for-manual-CFLAGS.patch,7.30 KB, patch)
2018-04-29 16:02 UTC, Nils Freydank
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Groman 2018-03-13 00:32:43 UTC
=net-p2p/mktorrent-1.1 generates corrupted torrent files. When loading a .torrent file generated from mktorrent 1.1 clients will report 'Not a vlaid bencoded string' or 'Failed to load torrent: '.

To reproduce compile =net-p2p/mktorrent-1.1 on amd64 with USE flags +threads +ssl -debug with CFLAGS -O1 -pipe -march=native -ftree-vectorize
Comment 1 Nils Freydank 2018-03-24 14:14:22 UTC
Hi, please provide
- "emerge --info"
- the parameter of the mktorrent invocation.

Does this happen with 1.0, too, or is it a regression introduced with 1.1?
Comment 2 Thomas Groman 2018-03-29 01:40:46 UTC
(In reply to Nils Freydank from comment #1)
> Hi, please provide
> - "emerge --info"
> - the parameter of the mktorrent invocation.
> 
> Does this happen with 1.0, too, or is it a regression introduced with 1.1?

No, this does not happen in version 1.0 from the Gentoo repository. However because 1.0 does not have the ability to set source it makes it impractical for my use. Only torrents made with mktorrent 1.1 from Gentoo's repository are corrupt.
my $emerge --info results can be found at https://0x0.st/sBFN.txt

My exact invocation of mktorrent 1.1 is as follows:
$ /usr/bin/mktorrent -a 'udp://127.0.0.1' -p -s TEST -l15 -v '/home/username/Documents/archive/sids' -o /tmp/testexample.torrent

I am specifying the full path because i keep a binary of mktorrent 1.1 I've compiled without portage in /usr/local/bin/ which seems to work while the Gentoo repo version is fixed.

the output of that command is https://0x0.st/sBFq.txt
Comment 3 Nils Freydank 2018-04-29 16:02:18 UTC
Created attachment 528928 [details, diff]
fixes from an upstream fork

Hi,

sorry it took that long, but life was busy the last weeks. Can you please test this patch? It works on my machine so far.

(Patching can be done either by adding the file to /etc/portage/patches
or by adding a PATCHES= line to the ebuild.)

PS: Please attach your output files directly in this bugtracker for future bug reports (instead of pasting it to external sites Gentoo has no control over). Archiving bugs and related files is much easier that way :-)
Comment 4 Thomas Groman 2018-04-30 04:04:51 UTC
(In reply to Nils Freydank from comment #3)
> Created attachment 528928 [details, diff] [details, diff]
> fixes from an upstream fork
> 
> Hi,
> 
> sorry it took that long, but life was busy the last weeks. Can you please
> test this patch? It works on my machine so far.

You patch seems to correct the issue on my machine as well. Thank you
Comment 5 Larry the Git Cow gentoo-dev 2018-05-11 06:50:37 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98684e0684d522bba35fc0aa22bb7f9b9b5e5f65

commit 98684e0684d522bba35fc0aa22bb7f9b9b5e5f65
Author:     Nils Freydank <holgersson@posteo.de>
AuthorDate: 2018-05-09 12:43:58 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2018-05-11 06:48:01 +0000

    net-p2p/mktorrent: Bump to 1.1_p20180502.
    
    Closes: https://bugs.gentoo.org/650340
    Package-Manager: Portage-2.3.36, Repoman-2.3.9

 net-p2p/mktorrent/Manifest                       |  1 +
 net-p2p/mktorrent/mktorrent-1.1_p20180502.ebuild | 44 ++++++++++++++++++++++++
 2 files changed, 45 insertions(+)