rpms/bittorrent/devel bittorrent.spec, 1.34, 1.35 btseed.init, 1.5, 1.6 bttrack.init, 1.4, 1.5 sources, 1.16, 1.17 .cvsignore, 1.16, 1.17

Paul Howarth (pghmcfc) fedora-extras-commits at redhat.com
Thu Feb 2 13:55:22 UTC 2006


Author: pghmcfc

Update of /cvs/extras/rpms/bittorrent/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23213

Modified Files:
	bittorrent.spec btseed.init bttrack.init sources .cvsignore 
Log Message:
* Thu Feb  2 2006 Paul Howarth <paul at city-fan.org> 4.4.0-1
- Update to 4.4.0
- Hardcode /usr/sbin in useradd dependency path
- Update %description
- GUI subpackage now requires pygtk2 >= 2.6.0 so no FC3 or RHEL4 build
- Specify explicit path for runuser in initscripts
- Merge /etc/sysconfig/{btseed,bttrack} into /etc/sysconfig/bittorrent
- Merge /etc/logrotate.d/{btseed,bttrack} into /etc/logrotate.d/bittorrent
- Fix initscript for bttrack to allow for pidfile creation
- Ghost /var/run/bittorrent-tracker.pid so it gets deleted on package removal
- Add comments in %prep
- Remove shellbangs from python files to reduce rpmlint output
- Replace $RPM_BUILD_ROOT with %{buildroot} (packager's personal preference)



Index: bittorrent.spec
===================================================================
RCS file: /cvs/extras/rpms/bittorrent/devel/bittorrent.spec,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- bittorrent.spec	20 Dec 2005 16:56:24 -0000	1.34
+++ bittorrent.spec	2 Feb 2006 13:55:22 -0000	1.35
@@ -3,8 +3,8 @@
 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
 Name:           bittorrent
-Version:        4.2.2
-Release:        2%{?dist}
+Version:        4.4.0
+Release:        1%{?dist}
 Summary:        BitTorrent swarming network file transfer tool
 
 Group:          Applications/Internet
@@ -29,7 +29,7 @@
 Provides:	python-khashmir = %{version}-%{release}
 Obsoletes:	python-khashmir < %{version}-%{release}
 
-Requires(pre):  %{_sbindir}/useradd
+Requires(pre):  /usr/sbin/useradd
 Requires(post): /sbin/chkconfig
 Requires(post): /sbin/service
 Requires(preun): /sbin/chkconfig
@@ -37,16 +37,17 @@
 Requires(postun): /sbin/service
 
 %description
-BitTorrent is a tool for copying files from one machine to another. FTP
-punishes sites for being popular: Since all uploading is done from one place,
-a popular site needs big iron and big bandwidth. With BitTorrent, clients
-automatically mirror files they download, making the publisher's burden almost
-nothing.
+BitTorrent is a tool for distributing files. It's extremely easy to use -
+downloads are started by clicking on hyperlinks. Whenever more than one person
+is downloading at once they send pieces of the file(s) to each other, thus
+relieving the central server's bandwidth burden. Even with many simultaneous
+downloads, the upload burden on the central server remains quite small, since
+each new downloader introduces new upload capacity.
 
 %package        gui
 Summary:        GUI versions of the BitTorrent file transfer tool
 Group:          Applications/Internet
-Requires:       pygtk2
+Requires:       pygtk2 >= 2.6.0
 Requires:       %{name} = %{version}-%{release}
 Requires(post): desktop-file-utils
 Requires(postun): desktop-file-utils
@@ -75,42 +76,48 @@
 
 %prep
 %setup -q -n BitTorrent-%{version}
+
+# Prevent phone-home new version check
 %patch0 -p1
+
+# Our package is "bittorrent", not "BitTorrent"
 %{__sed} -i "s#appdir = .*#appdir = '%{name}-%{version}'#" \
 	BitTorrent/platform.py
+
+# Put public key in standard place
 %{__sed} -i "s#public_key_file = .*#public_key_file = open('%{pkidir}/bittorrent/public.key', 'rb')#" \
 	BitTorrent/NewVersion.py
 
-%{__cat} <<EOF >btseed.sysconfig
-DIR=%{bt_dir}
-OPTIONS="--max_upload_rate 350 --display_interval 300"
-SEEDLOG=%{_localstatedir}/log/bittorrent/btseed.log
-EOF
+# Remove useless shellbangs
+%{__sed} -i -e '/^#! *\/usr\/bin\/env python/d' BitTorrent/launchmanycore.py BitTorrent/makemetafile.py
 
-%{__cat} <<EOF >bttrack.sysconfig
-PORT=6969
-DIR=%{bt_dir}
-STATEFILE=%{bt_statedir}/bttrack
-LOGFILE=%{_localstatedir}/log/bittorrent/bttrack.log
-OPTIONS="--min_time_between_log_flushes 4.0 --show_names 1 --hupmonitor 1"
+# Create options files for initscripts
+%{__cat} <<EOF >bittorrent.sysconfig
+SEEDDIR=%{bt_dir}
+SEEDOPTS="--max_upload_rate 350 --display_interval 300"
+SEEDLOG=%{_localstatedir}/log/bittorrent/btseed.log
+TRACKPORT=6969
+TRACKDIR=%{bt_dir}
+TRACKSTATEFILE=%{bt_statedir}/bttrack
+TRACKLOG=%{_localstatedir}/log/bittorrent/bttrack.log
+TRACKOPTS="--min_time_between_log_flushes 4.0 --show_names 1 --hupmonitor 1"
 EOF
 
-%{__cat} <<EOF >btseed.logrotate
+# Have the services' log files rotated
+%{__cat} <<EOF >bittorrent.logrotate
 %{_localstatedir}/log/bittorrent/btseed.log {
 	notifempty
 	missingok
 	postrotate
-		/sbin/service btseed condrestart 2>/dev/null >/dev/null || true
+		/sbin/service btseed condrestart 2>/dev/null >/dev/null || :
 	endscript
 }
-EOF
 
-%{__cat} <<EOF >bttrack.logrotate
 %{_localstatedir}/log/bittorrent/bttrack.log {
 	notifempty
 	missingok
 	postrotate
-		/sbin/service bttrack condrestart 2>/dev/null >/dev/null || true
+		/sbin/service bttrack condrestart 2>/dev/null >/dev/null || :
 	endscript
 }
 EOF
@@ -119,32 +126,32 @@
 %{__python} setup.py build
 
 %install
-%{__rm} -rf $RPM_BUILD_ROOT
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+%{__rm} -rf %{buildroot}
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
 
 /usr/bin/desktop-file-install --vendor %{desktopvendor} \
-	--dir $RPM_BUILD_ROOT%{_datadir}/applications \
+	--dir %{buildroot}%{_datadir}/applications \
 	--add-category X-Fedora \
 	%{SOURCE1}
-%{__install} -d $RPM_BUILD_ROOT%{bt_dir}
-%{__install} -d $RPM_BUILD_ROOT%{bt_statedir}
-%{__install} -d $RPM_BUILD_ROOT%{_localstatedir}/log/bittorrent
-%{__install} -d -m 755 $RPM_BUILD_ROOT%{pkidir}/bittorrent
-%{__install} -m 0644 public.key $RPM_BUILD_ROOT%{pkidir}/bittorrent
-%{__install} -m 0644 -D %{SOURCE2}        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/bittorrent.png
-%{__install} -m 0755 -D %{SOURCE3}        $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/btseed
-%{__install} -m 0755 -D %{SOURCE4}        $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/bttrack
-%{__install} -m 0644 -D btseed.sysconfig  $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/btseed
-%{__install} -m 0644 -D bttrack.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/bttrack
-%{__install} -m 0644 -D btseed.logrotate  $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/btseed
-%{__install} -m 0644 -D bttrack.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/bttrack
+%{__install} -d %{buildroot}%{bt_dir}
+%{__install} -d %{buildroot}%{bt_statedir}
+%{__install} -d %{buildroot}%{_localstatedir}/{run,log/bittorrent}
+%{__install} -d %{buildroot}%{pkidir}/bittorrent
+%{__install} -m 0644 public.key              %{buildroot}%{pkidir}/bittorrent
+%{__install} -m 0644 -D %{SOURCE2}           %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/bittorrent.png
+%{__install} -m 0755 -D %{SOURCE3}           %{buildroot}%{_sysconfdir}/rc.d/init.d/btseed
+%{__install} -m 0755 -D %{SOURCE4}           %{buildroot}%{_sysconfdir}/rc.d/init.d/bttrack
+%{__install} -m 0644 -D bittorrent.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/bittorrent
+%{__install} -m 0644 -D bittorrent.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/bittorrent
 # pidof doesn't find scripts with hyphenated names, so make some convenience links for initscripts
-%{__ln_s} bittorrent-tracker $RPM_BUILD_ROOT%{_bindir}/bttrack
-%{__ln_s} launchmany-console $RPM_BUILD_ROOT%{_bindir}/btseed
+%{__ln_s} bittorrent-tracker %{buildroot}%{_bindir}/bttrack
+%{__ln_s} launchmany-console %{buildroot}%{_bindir}/btseed
+# ghost the tracker pidfile so it goes on package removal
+: > %{buildroot}%{_localstatedir}/run/bittorrent-tracker.pid
 %{find_lang} bittorrent
 
 %clean
-%{__rm} -rf $RPM_BUILD_ROOT
+%{__rm} -rf %{buildroot}
 
 %pre
 /usr/sbin/useradd -r -s /sbin/nologin -d %{_localstatedir}/spool/bittorrent \
@@ -179,7 +186,7 @@
 [ -x /usr/bin/gtk-update-icon-cache ] && /usr/bin/gtk-update-icon-cache -q %{_datadir}/icons/hicolor || :
 
 %files -f bittorrent.lang
-%defattr(-,root,root,-)
+%defattr(-,root,root,0755)
 %doc README.txt credits.txt credits-l10n.txt LICENSE.txt TRACKERLESS.txt
 %{_bindir}/bittorrent-console
 %{_bindir}/bittorrent-curses
@@ -203,22 +210,35 @@
 %attr(-,torrent,torrent) %dir %{bt_dir}
 %attr(-,torrent,torrent) %dir %{bt_statedir}
 %attr(-,torrent,torrent) %dir %{_localstatedir}/log/bittorrent
+%ghost %{_localstatedir}/run/bittorrent-tracker.pid
 %{_sysconfdir}/rc.d/init.d/btseed
 %{_sysconfdir}/rc.d/init.d/bttrack
-%config(noreplace) %{_sysconfdir}/logrotate.d/btseed
-%config(noreplace) %{_sysconfdir}/logrotate.d/bttrack
-%config(noreplace) %{_sysconfdir}/sysconfig/btseed
-%config(noreplace) %{_sysconfdir}/sysconfig/bttrack
+%config(noreplace) %{_sysconfdir}/logrotate.d/bittorrent
+%config(noreplace) %{_sysconfdir}/sysconfig/bittorrent
 
 %files gui
-%defattr(-,root,root,-)
+%defattr(-,root,root,0755)
 %{_bindir}/bittorrent
 %{_bindir}/maketorrent
-%{_datadir}/applications/%{desktopvendor}-bittorrent.desktop
-%{_datadir}/pixmaps/%{name}-%{version}
+%{_datadir}/pixmaps/bittorrent-%{version}
 %{_datadir}/icons/hicolor/48x48/apps/bittorrent.png
+%{_datadir}/applications/%{desktopvendor}-bittorrent.desktop
 
 %changelog
+* Thu Feb  2 2006 Paul Howarth <paul at city-fan.org> 4.4.0-1
+- Update to 4.4.0
+- Hardcode /usr/sbin in useradd dependency path
+- Update %%description
+- GUI subpackage now requires pygtk2 >= 2.6.0 so no FC3 or RHEL4 build
+- Specify explicit path for runuser in initscripts
+- Merge /etc/sysconfig/{btseed,bttrack} into /etc/sysconfig/bittorrent
+- Merge /etc/logrotate.d/{btseed,bttrack} into /etc/logrotate.d/bittorrent
+- Fix initscript for bttrack to allow for pidfile creation
+- Ghost /var/run/bittorrent-tracker.pid so it gets deleted on package removal
+- Add comments in %%prep
+- Remove shellbangs from python files to reduce rpmlint output
+- Replace $RPM_BUILD_ROOT with %%{buildroot} (packager's personal preference)
+
 * Tue Dec 20 2005 Paul Howarth <paul at city-fan.org> 4.2.2-2
 - Add patch to prevent phoning home for new version checks
 


Index: btseed.init
===================================================================
RCS file: /cvs/extras/rpms/bittorrent/devel/btseed.init,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- btseed.init	13 Oct 2005 11:49:01 -0000	1.5
+++ btseed.init	2 Feb 2006 13:55:22 -0000	1.6
@@ -1,10 +1,10 @@
 #!/bin/bash
 #
 # chkconfig: - 16 84
-# description: Start up seed clients for BitTorrennt 
+# description: Start up seed clients for BitTorrent 
 #
 # processname: btseed
-# config: /etc/sysconfig/btseed
+# config: /etc/sysconfig/bittorrent
 
 # source function library
 . /etc/rc.d/init.d/functions
@@ -16,22 +16,23 @@
 [ "${NETWORKING}" = "no" ] && exit 0
 
 # default directory for torrents to seed
-DIR=/srv/bittorrent/data
+SEEDDIR=/srv/bittorrent/data
 
 # default log file
 SEEDLOG=/var/log/btseed.log
 
 # source the config
-. /etc/sysconfig/btseed
+. /etc/sysconfig/bittorrent
 
 RETVAL=0
 prog="/usr/bin/btseed"
 btuser="torrent"
+btgroup="torrent"
 
 case "$1" in
   start)
 	echo -n $"Starting BitTorrent seed client: "
-	runuser -s /bin/sh -c "$prog $OPTIONS $DIR" $btuser >> $SEEDLOG 2>&1 &
+	/sbin/runuser -s /bin/sh -c "$prog $SEEDOPTS $SEEDDIR" $btuser >> $SEEDLOG 2>&1 &
 	disown -ar
 	usleep 500000
 	status btseed &> /dev/null && echo_success || echo_failure


Index: bttrack.init
===================================================================
RCS file: /cvs/extras/rpms/bittorrent/devel/bttrack.init,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- bttrack.init	18 Aug 2005 11:39:13 -0000	1.4
+++ bttrack.init	2 Feb 2006 13:55:22 -0000	1.5
@@ -1,10 +1,10 @@
 #!/bin/bash
 #
 # chkconfig: - 16 84
-# description: Start up tracker for BitTorrennt 
+# description: Start up tracker for BitTorrent 
 #
 # processname: bttrack
-# config: /etc/sysconfig/bttrack
+# config: /etc/sysconfig/bittorrent
 
 # source function library
 . /etc/rc.d/init.d/functions
@@ -13,25 +13,29 @@
 [ "${NETWORKING}" = "no" ] && exit 0
 
 # defaults
-PORT=6969
-STATEFILE=/srv/bittorrent/state/bttrack
-OPTIONS=
-LOGFILE=/var/log/bittorrent/bttrack.log
+TRACKPORT=6969
+TRACKSTATEFILE=/srv/bittorrent/state/bttrack
+TRACKOPTS=
+TRACKLOG=/var/log/bittorrent/bttrack.log
 # directory of torrents that the tracker is allowed to serve
-DIR="/srv/bittorrent/data"
+TRACKDIR="/srv/bittorrent/data"
 
 # source the config
-. /etc/sysconfig/bttrack
+. /etc/sysconfig/bittorrent
 
 RETVAL=0
 prog="/usr/bin/bttrack"
 btuser="torrent"
+btgroup="torrent"
 
 case "$1" in
   start)
 	echo -n $"Starting BitTorrent tracker: "
-	runuser -s /bin/sh -c "$prog --port $PORT --dfile $STATEFILE --logfile $LOGFILE \
-		$OPTIONS --allowed_dir $DIR" $btuser &> /dev/null &
+	: > /var/run/bittorrent-tracker.pid
+	/bin/chown $btuser:$btgroup /var/run/bittorrent-tracker.pid
+	/sbin/runuser -s /bin/sh -c "$prog --port $TRACKPORT \
+		--dfile $TRACKSTATEFILE --logfile $TRACKLOG $TRACKOPTS \
+		--allowed_dir $TRACKDIR" $btuser &> /dev/null &
 	disown -ar
 	usleep 500000
 	status bttrack &> /dev/null && echo_success || echo_failure


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/bittorrent/devel/sources,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- sources	19 Dec 2005 10:06:12 -0000	1.16
+++ sources	2 Feb 2006 13:55:22 -0000	1.17
@@ -1 +1 @@
-2a85715b8ef0335ecc9e8ad91860231b  BitTorrent-4.2.2.tar.gz
+74d4b48202c28f0b27e989b6d5f5b214  BitTorrent-4.4.0.tar.gz


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/bittorrent/devel/.cvsignore,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- .cvsignore	19 Dec 2005 10:06:12 -0000	1.16
+++ .cvsignore	2 Feb 2006 13:55:22 -0000	1.17
@@ -1 +1 @@
-BitTorrent-4.2.2.tar.gz
+BitTorrent-4.4.0.tar.gz




More information about the scm-commits mailing list