rpms/bittorrent/F-7 bittorrent-4.4.0-fastresume.patch, NONE, 1.1 bittorrent-4.4.0-readme.fedora, NONE, 1.1 bittorrent-4.4.0-threads-warning.patch, NONE, 1.1 bittorrent.spec, 1.42, 1.43 btseed.init, 1.6, 1.7 bttrack.init, 1.5, 1.6 bittorrent-4.24.2-appdir.patch, 1.1, NONE bittorrent-4.24.2-no-version-check.patch, 1.1, NONE bittorrent-4.24.2-pkidir.patch, 1.1, NONE bittorrent-5.0.1-shellbang.patch, 1.1, NONE bittorrent-5.0.5-wxversion.patch, 1.1, NONE

Paul Howarth (pghmcfc) fedora-extras-commits at redhat.com
Wed Apr 9 15:41:45 UTC 2008


Author: pghmcfc

Update of /cvs/pkgs/rpms/bittorrent/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28410

Modified Files:
	bittorrent.spec btseed.init bttrack.init 
Added Files:
	bittorrent-4.4.0-fastresume.patch 
	bittorrent-4.4.0-readme.fedora 
	bittorrent-4.4.0-threads-warning.patch 
Removed Files:
	bittorrent-4.24.2-appdir.patch 
	bittorrent-4.24.2-no-version-check.patch 
	bittorrent-4.24.2-pkidir.patch 
	bittorrent-5.0.1-shellbang.patch 
	bittorrent-5.0.5-wxversion.patch 
Log Message:
Resync with devel:
- Default data directory moved back out of /srv
  (to %%{_localstatedir}/lib/bittorrent)
  (http://fedoraproject.org/wiki/PackagingDrafts/NoBitsInSrv)
- Change torrent user's home directory from %%{_localstatedir}/spool/bittorrent
  to %%{_localstatedir}/lib/bittorrent, fix the home directory of any existing
  torrent user, and don't include %%{_localstatedir}/spool/bittorrent in the
  package any more
- Include egg-info if present (#440906)
- Fix some deprecation warnings from pygtk2
- Include credits-l10n.txt document (#237256)
- Write fastresume data properly so that it's recognized next time (#245421)
- Add README.Fedora to explain how to use the track/seed services (#430849)
- Use short license name to pacify rpmlint


bittorrent-4.4.0-fastresume.patch:

--- NEW FILE bittorrent-4.4.0-fastresume.patch ---
--- BitTorrent-4.4.0/BitTorrent/Storage.py	2006-01-31 20:16:31.000000000 +0000
+++ BitTorrent-4.4.0/BitTorrent/Storage.py	2008-04-09 11:00:56.000000000 +0100
@@ -213,7 +213,7 @@
         resumefile.write(str(amount_done) + '\n')
         for x, x, filename in self.ranges:
             resumefile.write(str(os.path.getsize(filename)) + ' ' +
-                             str(os.path.getmtime(filename)) + '\n')
+                             str(int(os.path.getmtime(filename))) + '\n')
 
     def check_fastresume(self, resumefile, return_filelist=False,
                          piece_size=None, numpieces=None, allfiles=None):


--- NEW FILE bittorrent-4.4.0-readme.fedora ---
Fedora BitTorrent Notes
=======================

Known Bugs
==========

 1. Translations are broken (http://bugzilla.redhat.com/237254)
    This appears to be a python 2.5 compatibility issue

 2. BitTorrent doesn't die gracefully (http://bugzilla.redhat.com/189072)
    Fastresume data isn't saved if the client is killed (e.g. as a result
    of logging out without closing down the application cleanly).

 3. Newer versions are available

    The 6.x BitTorrent client is closed source and cannot be included in
    Fedora

    The 5.x BitTorrent client has a GUI that is incompatible with
    wxPython > 2.6 as used in Fedora 7 onwards
    (http://bugzilla.redhat.com/223623)

Seeding and Tracking
====================

BitTorrent seed and tracking functionality is essentially a service like a
web server, and so initscripts are provided to launch these services at
system startup. They run as the unprivileged user "torrent" though the
scripts are started as root.

Creating a Torrent and Tracker Setup
====================================

1. Copy the file or directory you want to create a torrent for into the
   /var/lib/bittorrent/data/ directory.

2. Make the torrent file; let's say you want to serve out the contents of
   the /var/lib/bittorrent/data/mydata directory, and you'll be using a
   tracker URL of http://myhostname.example.com:6969/announce :

   # cd /var/lib/bittorrent/data
   # maketorrent-console http://myhostname.example.com:6969/announce mydata

   That should create /var/lib/bittorrent/data/mydata.torrent

   It's not necessary for the ownership of the files in the
   /var/lib/bittorrent/data directory to be changed from root or whatever user
   created them, as the tracker and seeder only need to be able to read them,
   not write to them.

3. You can then start your tracker, which will track for all torrent files
   in the /var/lib/bittorrent/data directory.

   # /sbin/service bttrack start

   You can point a browser at http://myhostname.example.com:6969/ to verify
   that the tracker is working.

   If you want the tracker to start up when the system boots up, do:

   # /sbin/chkconfig bttrack on

Starting a Seed Client
======================

If you want to start a seeder for torrents you created yourself as described
above, all you need to do is to start the btseed service, which seeds for all
torrents in the /var/lib/bittorrent/data directory:

  # /sbin/service btseed start

If you want the seeder to start up when the system boots up, do:

  # /sbin/chkconfig btseed on

If you want to act as a seed for a torrent file you've downloaded from
somewhere else and you haven't downloaded the content yet, simply copy the
downloaded torrent file into the /var/lib/bittorrent/data directory and
start the btseed service (as above) if it is not already running. The
btseed service will download the content into the /var/lib/bittorrent/data
directory and then start seeding it.

If you have already downloaded the content for a torrent and now want to seed
it, copy the downloaded content into the /var/lib/bittorrent/data directory,
then copy the torrent file into the /var/lib/bittorrent/data directory and then
start the btseed service (as above) if it is not already running.

Stopping the Services
=====================

# /sbin/service btseed stop
# /sbin/service bttrack stop

If you no longer want the services to start up at system boot time:

# /sbin/chkconfig btseed off
# /sbin/chkconfig bttrack off

Log Files
=========

The seeder and tracker services create log files in the /var/log/bittorrent
directory. Note that the seed client buffers output and so the data written
to the log files may not actually be written to disk (and hence be read by
anyone) for some considerable time.



bittorrent-4.4.0-threads-warning.patch:

--- NEW FILE bittorrent-4.4.0-threads-warning.patch ---
--- BitTorrent-4.4.0/bittorrent	2008-04-08 16:01:30.000000000 +0100
+++ BitTorrent-4.4.0/bittorrent	2008-04-08 16:02:50.000000000 +0100
@@ -2742,7 +2742,7 @@
         if self.config['start_minimized']:
             self.mainwindow.iconify()
        
-        gtk.threads_enter()
+        gtk.gdk.threads_enter()
 
         self.mainwindow.set_border_width(0)
 
@@ -2942,7 +2942,7 @@
 
         self.nag()
         
-        gtk.threads_leave()
+        gtk.gdk.threads_leave()
 
     def window_event(self, widget, event, *args):
         if event.changed_mask == gtk.gdk.WINDOW_STATE_ICONIFIED:
@@ -3758,14 +3758,14 @@
         self.mainwindow = None
         self.started = 0
         
-        gtk.threads_init()
+        gtk.gdk.threads_init()
 
     def set_mainwindow(self, mainwindow):
         self.mainwindow = mainwindow
 
     def run(self):
         self.mainwindow.traythread.start()
-        gtk.threads_enter()        
+        gtk.gdk.threads_enter()        
 
         if self.mainwindow:
             self.mainwindow.ssbutton.set_paused(self.mainwindow.config['pause'])
@@ -3777,12 +3777,12 @@
             self.started = 1
             gtk.main() 
         except KeyboardInterrupt:
-            gtk.threads_leave()
+            gtk.gdk.threads_leave()
             if self.mainwindow:
                 self.mainwindow.torrentqueue.set_done()
             raise
         
-        gtk.threads_leave()
+        gtk.gdk.threads_leave()
 
     def quit(self):
         if self.mainwindow: 
--- BitTorrent-4.4.0/BitTorrent/GUI.py	2008-04-08 16:03:22.000000000 +0100
+++ BitTorrent-4.4.0/BitTorrent/GUI.py	2008-04-08 16:03:52.000000000 +0100
@@ -25,9 +25,9 @@
 from BitTorrent.platform import image_root, read_language_file, write_language_file
 
 def lock_wrap(function, *args):
-    gtk.threads_enter()
+    gtk.gdk.threads_enter()
     function(*args)
-    gtk.threads_leave()
+    gtk.gdk.threads_leave()
 
 def gtk_wrap(function, *args):
     gobject.idle_add(lock_wrap, function, *args)
@@ -377,10 +377,10 @@
 
     def scroll_and_wait(self, amount, lock_held):
         if not lock_held:
-            gtk.threads_enter()
+            gtk.gdk.threads_enter()
         self.scroll_by(0, amount)
         if not lock_held:
-            gtk.threads_leave()
+            gtk.gdk.threads_leave()
         if self.vscrolltimeout is not None:
             gobject.source_remove(self.vscrolltimeout)
         self.vscrolltimeout = gobject.timeout_add(100, self.scroll_and_wait, amount, False)


Index: bittorrent.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bittorrent/F-7/bittorrent.spec,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- bittorrent.spec	25 Mar 2007 13:44:05 -0000	1.42
+++ bittorrent.spec	9 Apr 2008 15:41:05 -0000	1.43
@@ -1,7 +1,7 @@
 # A few useful macros
 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 %define desktopvendor	fedora
-%define bt_dir		/srv/bittorrent
+%define bt_dir		%{_localstatedir}/lib/bittorrent
 %define bt_datadir	%{bt_dir}/data
 %define bt_statedir	%{bt_dir}/state
 %define pkidir		%{_sysconfdir}/pki
@@ -9,19 +9,22 @@
 Summary:	BitTorrent swarming network file transfer tool
 Name:		bittorrent
 Version:	4.4.0
-Release:	5%{?dist}
+Release:	6%{?dist}
 Group:		Applications/Internet
-License:	BitTorrent Open Source License
+License:	BitTorrent
 URL:		http://www.bittorrent.com/
 Source0:	http://download.bittorrent.com/dl/BitTorrent-%{version}.tar.gz
 Source1:	bittorrent.desktop
 Source3:	btseed.init
 Source4:	bttrack.init
 Source5:	bittorrent.png
+Source6:	bittorrent-4.4.0-readme.fedora
 Patch0:		bittorrent-4.2.2-no-version-check.patch
 Patch1:		bittorrent-4.4.0-appdir.patch
 Patch2:		bittorrent-4.4.0-pkidir.patch
 Patch3:		bittorrent-4.4.0-shellbang.patch
+Patch4:		bittorrent-4.4.0-threads-warning.patch
+Patch5:		bittorrent-4.4.0-fastresume.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:	noarch
 BuildRequires:	python-devel >= 2.4.0, desktop-file-utils, gettext
@@ -30,7 +33,7 @@
 Provides:	python-khashmir = %{version}-%{release}
 Obsoletes:	python-khashmir < %{version}-%{release}
 
-Requires(pre): /usr/sbin/useradd
+Requires(pre): /usr/sbin/useradd /usr/sbin/usermod
 Requires(post): /sbin/chkconfig
 Requires(post): /sbin/service
 Requires(preun): /sbin/chkconfig
@@ -69,6 +72,7 @@
 %prep
 %setup -q -n BitTorrent-%{version}
 %{__cp} -p %{SOURCE1} %{SOURCE3} %{SOURCE4} %{SOURCE5} .
+%{__cp} -p %{SOURCE6} README.Fedora
 
 # Prevent phone-home new version check
 %patch0 -p1 -b .versioncheck
@@ -83,6 +87,12 @@
 # Remove useless shellbangs
 %patch3 -p1 -b .shellbang
 
+# Fix some deprecation warnings from pygtk2
+%patch4 -p1 -b .thread-warnings
+
+# Write fastresume data properly so that it's recognized at next startup
+%patch5 -p1 -b .fastresume
+
 # Update icon
 %{__sed} -i -e 's,bittorrent\.png,%{_datadir}/pixmaps/bittorrent-%{version}/logo/bittorrent_48.png,' \
 	bittorrent.desktop
@@ -134,7 +144,7 @@
 %{__install} -d %{buildroot}%{bt_dir}
 %{__install} -d %{buildroot}%{bt_datadir}
 %{__install} -d %{buildroot}%{bt_statedir}
-%{__install} -d %{buildroot}%{_localstatedir}/{run,log/bittorrent,spool/bittorrent}
+%{__install} -d %{buildroot}%{_localstatedir}/{run,log/bittorrent}
 %{__install} -m 0755 -D btseed.init %{buildroot}%{_sysconfdir}/rc.d/init.d/btseed
 %{__install} -m 0755 -D bttrack.init %{buildroot}%{_sysconfdir}/rc.d/init.d/bttrack
 %{__install} -m 0644 -D bittorrent.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/bittorrent
@@ -147,13 +157,20 @@
 # ghost the tracker pidfile so it goes on package removal
 : > %{buildroot}%{_localstatedir}/run/bittorrent-tracker.pid
 %{find_lang} bittorrent
+# include egg-info if present
+if [ -f %{buildroot}%{python_sitelib}/BitTorrent-%{version}-*.egg-info ]; then
+	echo %{buildroot}%{python_sitelib}/BitTorrent-%{version}-*.egg-info |
+		%{__sed} -e 's|^%{buildroot}||'
+fi >> bittorrent.lang
 
 %clean
 %{__rm} -rf %{buildroot}
 
 %pre
-/usr/sbin/useradd -r -s /sbin/nologin -d %{_localstatedir}/spool/bittorrent \
+/usr/sbin/useradd -r -s /sbin/nologin -d %{bt_dir} \
 	-c "BitTorrent Seed/Tracker" torrent &>/dev/null || :
+# Fix homedir for upgrades
+/usr/sbin/usermod --home %{bt_dir} torrent
 
 %post
 /sbin/chkconfig --add btseed  || :
@@ -181,7 +198,8 @@
 
 %files -f bittorrent.lang
 %defattr(-,root,root,-)
-%doc README.txt credits.txt LICENSE.txt TRACKERLESS.txt
+%doc README.txt credits.txt credits-l10n.txt LICENSE.txt TRACKERLESS.txt
+%doc README.Fedora
 %{_bindir}/bittorrent-console
 %{_bindir}/bittorrent-curses
 %{_bindir}/bittorrent-tracker
@@ -200,7 +218,6 @@
 %attr(-,torrent,torrent) %dir %{bt_datadir}/
 %attr(-,torrent,torrent) %dir %{bt_statedir}/
 %attr(-,torrent,torrent) %dir %{_localstatedir}/log/bittorrent/
-%attr(-,torrent,torrent) %dir %{_localstatedir}/spool/bittorrent/
 %ghost %{_localstatedir}/run/bittorrent-tracker.pid
 %{_sysconfdir}/rc.d/init.d/btseed
 %{_sysconfdir}/rc.d/init.d/bttrack
@@ -215,6 +232,21 @@
 %{_datadir}/applications/%{desktopvendor}-bittorrent.desktop
 
 %changelog
+* Tue Apr  8 2008 Paul Howarth <paul at city-fan.org> 4.4.0-6
+- Default data directory moved back out of /srv
+  (to %%{_localstatedir}/lib/bittorrent)
+  (http://fedoraproject.org/wiki/PackagingDrafts/NoBitsInSrv)
+- Change torrent user's home directory from %%{_localstatedir}/spool/bittorrent
+  to %%{_localstatedir}/lib/bittorrent, fix the home directory of any existing
+  torrent user, and don't include %%{_localstatedir}/spool/bittorrent in the
+  package any more
+- Include egg-info if present (#440906)
+- Fix some deprecation warnings from pygtk2
+- Include credits-l10n.txt document (#237256)
+- Write fastresume data properly so that it's recognized next time (#245421)
+- Add README.Fedora to explain how to use the track/seed services (#430849)
+- Use short license name to pacify rpmlint
+
 * Sun Mar 25 2007 Paul Howarth <paul at city-fan.org> 4.4.0-5
 - Own directory /srv/bittorrent (#233824)
 
@@ -255,7 +287,7 @@
 - GUI subpackage provides BitTorrent-gui as well as obsoleting it
 - Don't use categories X-Fedora or Application in the desktop file
 - %%{_localstatedir}/spool/bittorrent must exist and be writable by user
-  torrent to store config settings
+  torrent to store config settings (#231697)
 - Separate credits file for translators no longer included
 
 * Sat Dec  9 2006 Paul Howarth <paul at city-fan.org> 4.4.0-3


Index: btseed.init
===================================================================
RCS file: /cvs/pkgs/rpms/bittorrent/F-7/btseed.init,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- btseed.init	2 Feb 2006 13:55:22 -0000	1.6
+++ btseed.init	9 Apr 2008 15:41:05 -0000	1.7
@@ -16,7 +16,7 @@
 [ "${NETWORKING}" = "no" ] && exit 0
 
 # default directory for torrents to seed
-SEEDDIR=/srv/bittorrent/data
+SEEDDIR=/var/lib/bittorrent/data
 
 # default log file
 SEEDLOG=/var/log/btseed.log


Index: bttrack.init
===================================================================
RCS file: /cvs/pkgs/rpms/bittorrent/F-7/bttrack.init,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- bttrack.init	2 Feb 2006 13:55:22 -0000	1.5
+++ bttrack.init	9 Apr 2008 15:41:05 -0000	1.6
@@ -14,11 +14,11 @@
 
 # defaults
 TRACKPORT=6969
-TRACKSTATEFILE=/srv/bittorrent/state/bttrack
+TRACKSTATEFILE=/var/lib/bittorrent/state/bttrack
 TRACKOPTS=
 TRACKLOG=/var/log/bittorrent/bttrack.log
 # directory of torrents that the tracker is allowed to serve
-TRACKDIR="/srv/bittorrent/data"
+TRACKDIR="/var/lib/bittorrent/data"
 
 # source the config
 . /etc/sysconfig/bittorrent


--- bittorrent-4.24.2-appdir.patch DELETED ---


--- bittorrent-4.24.2-no-version-check.patch DELETED ---


--- bittorrent-4.24.2-pkidir.patch DELETED ---


--- bittorrent-5.0.1-shellbang.patch DELETED ---


--- bittorrent-5.0.5-wxversion.patch DELETED ---




More information about the fedora-extras-commits mailing list