[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#729222: debian-cd: please add HTTP/web seeds to the torrents

Package: debian-cd
Severity: wishlist

Inspired by [1] I went to check if Debian's torrent files have web seeds
in them but it doesn't look like they do. I'm guessing that debian-cd
uses the bittorrent package to create .torrent files, unfortunately this
does not seem to support web seeds. There is, however, a fork of
bittorrent called bittornado that supports web seeds. My naive untested
patch to add support for this to debian-cd is below. Thoughts?

     1. http://cynic.cc/blog//posts/2013-10-18-bittorrent_with_webseed/

--- contrib/mktorrent	(revision 2572)
+++ contrib/mktorrent	(working copy)
@@ -1,14 +1,16 @@
 for FILE in $@; do
-    MKTORRENT=/home/debian-cd/bt/btmakemetafile.py
+    MKTORRENT=btmakemetafile.bittornado
     ISODIR=`dirname $FILE`
     BTDIR=`echo $ISODIR | sed 's/iso-/bt-/;s/usb-/bt-/'`
     if [ ! -d $BTDIR ] ; then
         mkdir -p $BTDIR
+    HTTPSEEDS=$(echo $FILE | sed -n 's_[^/]\+/debian-\([^-]\+\)-\([^-]\+\)-_--httpseeds http://cdimage.debian.org/debian-cd/\1/\2/\0_p')
     $MKTORRENT http://bttracker.debian.org:6969/announce \
         --comment '"Debian CD from cdimage.debian.org"' \
+        $HTTPSEEDS \
         $FILE | grep -v complete
     mv $FILE.torrent $BTDIR



Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: