diff -u bittorrent-3.4.2/debian/changelog bittorrent-3.4.2/debian/changelog --- bittorrent-3.4.2/debian/changelog +++ bittorrent-3.4.2/debian/changelog @@ -1,3 +1,10 @@ +bittorrent (3.4.2-11ubuntu2) gutsy; urgency=low + + * Added 01_btshow-meta-info patch, now bittorrent checks + file type before trying to extract any information. (LP: #108101) + + -- Andrea Veri Thu, 31 May 2007 11:32:51 +0200 + bittorrent (3.4.2-11ubuntu1) gutsy; urgency=low * Merge with Debian unstable; remaining changes: diff -u bittorrent-3.4.2/debian/control bittorrent-3.4.2/debian/control --- bittorrent-3.4.2/debian/control +++ bittorrent-3.4.2/debian/control @@ -3,7 +3,7 @@ Priority: optional Maintainer: Ubuntu Core developers XSBC-Original-Maintainer: Michael Janssen -Build-Depends: debhelper (>= 5.0.37.2) +Build-Depends: debhelper (>= 5.0.37.2), dpatch Build-Depends-Indep: python-all-dev (>= 2.4), sharutils, python-central (>= 0.5) Standards-Version: 3.7.2.0 XS-Python-Version: >= 2.3 diff -u bittorrent-3.4.2/debian/rules bittorrent-3.4.2/debian/rules --- bittorrent-3.4.2/debian/rules +++ bittorrent-3.4.2/debian/rules @@ -5,6 +5,8 @@ # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 +include /usr/share/dpatch/dpatch.make + PYDEF=$(shell pyversions -d) PYVERS=$(shell pyversions -r) @@ -18,7 +20,7 @@ build: build-stamp fix-doc -build-stamp: configure-stamp +build-stamp: patch-stamp configure-stamp dh_testdir set -e @@ -28,7 +30,7 @@ done touch build-stamp -clean: +clean: unpatch dh_testroot dh_testdir for python in $(PYVERS); do \ only in patch2: unchanged: --- bittorrent-3.4.2.orig/debian/patches/00list +++ bittorrent-3.4.2/debian/patches/00list @@ -0,0 +1 @@ +01_btshow-meta-info.dpatch only in patch2: unchanged: --- bittorrent-3.4.2.orig/debian/patches/01_btshow-meta-info.dpatch +++ bittorrent-3.4.2/debian/patches/01_btshow-meta-info.dpatch @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_btshow-meta-info.dpatch by Andrea Veri +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +--- bittorrent-3.4.2/btshowmetainfo.py 2007-02-19 19:33:28.000000000 +0000 ++++ bittorrent.3.4.2.new/btshowmetainfo.py 2007-04-20 14:57:24.000000000 +0100 +@@ -21,6 +21,10 @@ + + for metainfo_name in argv[1:]: + metainfo_file = open(metainfo_name, 'rb') ++ if metainfo_file.read(11) != 'd8:announce': ++ print '%s: Not a BitTorrent metainfo file' % metainfo_name ++ continue ++ metainfo_file.seek(0) + metainfo = bdecode(metainfo_file.read()) + metainfo_file.close() + announce = metainfo['announce']