diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c3abcec --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +hellanzb-0.13.tar.gz +hellanzb-README.Fedora diff --git a/dead.package b/dead.package deleted file mode 100644 index 5784d07..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -2014-06-04 - This package was already retired in pkgdb/blocked in koji, but no dead.package file existed. The original retirement reason is unclear. diff --git a/hellanzb-0.13-dont-attempt-multiple-groups.diff b/hellanzb-0.13-dont-attempt-multiple-groups.diff new file mode 100644 index 0000000..093ce46 --- /dev/null +++ b/hellanzb-0.13-dont-attempt-multiple-groups.diff @@ -0,0 +1,16 @@ +--- Hellanzb/NZBLeecher/NZBParser.py.orig 2008-10-15 20:05:11.000000000 -0700 ++++ Hellanzb/NZBLeecher/NZBParser.py 2008-10-15 20:10:32.000000000 -0700 +@@ -148,11 +148,12 @@ + self.file = None + self.fileNeedsDownload = None + + elif name == 'group': + newsgroup = self.parseUnicode(''.join(self.chars)) +- self.file.groups.append(newsgroup) ++ #self.file.groups.append(newsgroup) ++ self.file.group = newsgroup + + self.chars = None + + elif name == 'segment': + if self.number in self.segmentNumbers: diff --git a/hellanzb-README.Fedora b/hellanzb-README.Fedora new file mode 100644 index 0000000..c38583c --- /dev/null +++ b/hellanzb-README.Fedora @@ -0,0 +1,8 @@ +Thanks for installing the Fedora package of hellanzb. To configure +the client for use, copy /usr/share/doc/hellanzb/hellanzb.conf.sample to +$HOME/.hellanzb.conf and edit it appropriately. To start hellanzb, just +run 'hellanzb -D'. To enqueue nzbs, drop them in the queue directory as +configured in your $HOME/.hellanzb.conf. + +If you want Hellanzb to automatically unrar downloaded files, install +the 'unrar' from a repository that provides packages Fedora can't. diff --git a/hellanzb-configuration-location3.patch b/hellanzb-configuration-location3.patch new file mode 100644 index 0000000..81d63eb --- /dev/null +++ b/hellanzb-configuration-location3.patch @@ -0,0 +1,42 @@ +--- Hellanzb/Core.py.orig 2008-08-05 23:50:37.000000000 -0700 ++++ Hellanzb/Core.py 2008-08-06 00:02:39.000000000 -0700 +@@ -32,14 +32,13 @@ + return + else: + error('Unable to load specified config file: ' + optionalConfigFile) + sys.exit(1) + +- # look for conf in this order: sys.prefix, ./, or ./etc/ +- confDirs = [os.path.join(sys.prefix, 'etc')] ++ # look for conf in this order: $HOME/, /etc, or ./ ++ confDirs = [os.environ['HOME'], '/etc'] + try: +- confDirs.append(os.path.join(os.getcwd(), 'etc')) + confDirs.append(os.getcwd()) + except OSError, ose: + if ose.errno != 2: + raise + # OSError: [Errno 2] No such file or directory. cwd doesn't exist +@@ -49,16 +48,22 @@ + if Hellanzb.SYSNAME == "Darwin": + confDirs[0] = '/opt/local/etc' + + for dir in confDirs: + file = os.path.join(dir, 'hellanzb.conf') ++ file2 = os.path.join(dir, '.hellanzb.conf') + + if loadConfig(file): + Hellanzb.CONFIG_FILENAME = file + return ++ elif loadConfig(file2): ++ Hellanzb.CONFIG_FILENAME = file2 ++ return + + error('Could not find configuration file in the following dirs: ' + str(confDirs)) ++ readmeFedora = "*DOCDIR*/*PKGNAME*/README.Fedora" ++ print open(readmeFedora).read().strip() + sys.exit(1) + + def loadConfig(fileName): + """ Attempt to load the specified config file. If successful, clean the variables/data the + config file has setup """ diff --git a/hellanzb-remove-bogus-shebang.patch b/hellanzb-remove-bogus-shebang.patch new file mode 100644 index 0000000..b90b2fb --- /dev/null +++ b/hellanzb-remove-bogus-shebang.patch @@ -0,0 +1,10 @@ +--- Hellanzb/Growl.py.orig 2008-07-19 18:08:13.000000000 -0700 ++++ Hellanzb/Growl.py 2008-07-19 18:08:45.000000000 -0700 +@@ -1,7 +1,5 @@ +-#!/usr/bin/env python +- + """Growl 0.6 Network Protocol Client for Python""" + __version__ = "0.6" # will always match Growl version + __author__ = "Rui Carmo (http://the.taoofmac.com)" + __copyright__ = "(C) 2004 Rui Carmo. Code under BSD License." + __contributors__ = "Ingmar J Stein (Growl Team)" diff --git a/hellanzb-unrar-is-optional.patch b/hellanzb-unrar-is-optional.patch new file mode 100644 index 0000000..7e9e803 --- /dev/null +++ b/hellanzb-unrar-is-optional.patch @@ -0,0 +1,22 @@ +--- Hellanzb/Core.py.orig 2008-07-21 06:05:16.000000000 -0700 ++++ Hellanzb/Core.py 2008-07-21 06:06:23.000000000 -0700 +@@ -94,11 +94,18 @@ + Hellanzb.MAX_RATE = 0 + else: + Hellanzb.MAX_RATE = int(Hellanzb.MAX_RATE) + + if not hasattr(Hellanzb, 'UNRAR_CMD') or Hellanzb.UNRAR_CMD is None: +- Hellanzb.UNRAR_CMD = assertIsExe(['rar', 'unrar']) ++ # unrar is optional when it is not installed or not specified in conf ++ Hellanzb.UNRAR_CMD = None ++ try: ++ Hellanzb.UNRAR_CMD = assertIsExe(['rar', 'unrar']) ++ except FatalError: ++ # if unrar isn't available, skip it and warn the user ++ print "Warning -- unrar was not found. Disabling unraring." ++ Hellanzb.SKIP_UNRAR = True + else: + Hellanzb.UNRAR_CMD = assertIsExe([Hellanzb.UNRAR_CMD]) + + if not hasattr(Hellanzb, 'PAR2_CMD') or Hellanzb.PAR2_CMD is None: + Hellanzb.PAR2_CMD = assertIsExe(['par2']) diff --git a/hellanzb.spec b/hellanzb.spec new file mode 100644 index 0000000..29cf8a5 --- /dev/null +++ b/hellanzb.spec @@ -0,0 +1,107 @@ +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +Name: hellanzb +Version: 0.13 +Release: 8%{?dist} +Summary: Hands-free nzb downloader and post processor + +Group: Applications/Internet +License: BSD +URL: http://www.hellanzb.com/trac/ +Source0: http://www.hellanzb.com/distfiles/hellanzb-%{version}.tar.gz +Source1: hellanzb-README.Fedora +# Make hellanzb check in $HOME, then /etc, then cwd. Print Fedora-specific +# README if no config is found. +Patch0: hellanzb-configuration-location3.patch +# Disable unrar functionality if the command is not found in PATH. +Patch1: hellanzb-unrar-is-optional.patch +# Remove a bogus shebang from a library that rpmlint doesn't like. +Patch2: hellanzb-remove-bogus-shebang.patch +# Multiple group support is broken, so only take the last one +# See: https://bugzilla.redhat.com/show_bug.cgi?id=467032 +Patch3: hellanzb-0.13-dont-attempt-multiple-groups.diff +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: python-devel +BuildRequires: python-setuptools +BuildArch: noarch + +Requires: par2cmdline +Requires: python-twisted +Requires: python-twisted-web +Requires: python-yenc + + +%description +hellanzb is an easy to use application designed to retrieve nzb files +and fully process them. The goal being to make getting files from Usenet +as hands-free as possible. Once fully installed, all that's required +is moving an nzb file to the queue directory. The rest: downloading, +par-checking, un-raring, etc. is done automatically by hellanzb. + + +%prep +%setup -q +%patch0 +sed --in-place 's|\*DOCDIR\*|%{_docdir}|' Hellanzb/Core.py +sed --in-place 's|\*PKGNAME\*|%{name}|' Hellanzb/Core.py +%patch1 +%patch2 +%patch3 + + +%build +%{__python} -c 'import setuptools; execfile("setup.py")' build + + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir} +%{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root $RPM_BUILD_ROOT + +mv $RPM_BUILD_ROOT/%{_bindir}/%{name}.py $RPM_BUILD_ROOT/%{_bindir}/%{name} +rm $RPM_BUILD_ROOT/usr/etc/%{name}.conf.sample + +mv etc/hellanzb.conf.sample $RPM_BUILD_ROOT/%{_docdir}/%{name}/ +cp %{SOURCE1} $RPM_BUILD_ROOT/%{_docdir}/%{name}/README.Fedora + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%{_docdir}/%{name}/ +%{python_sitelib}/* +%{_bindir}/%{name} + + +%changelog +* Tue Feb 24 2009 Fedora Release Engineering - 0.13-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.13-7 +- Rebuild for Python 2.6 + +* Wed Oct 15 2008 Conrad Meyer - 0.13-6 +- Don't allow multiple groups as support for that is broken. + +* Wed Aug 6 2008 Conrad Meyer - 0.13-5 +- Re-seperated unrar and configuration patches. + +* Tue Aug 5 2008 Conrad Meyer - 0.13-4 +- Add missing BR to build in mock/koji. +- Patched to look in /etc instead of /usr/etc for configuration. +- Patched to inform user that configuration is needed if no configuration + can be found. + +* Mon Jul 21 2008 Conrad Meyer - 0.13-3 +- Patch to make unrar optional. + +* Sat Jul 19 2008 Conrad Meyer - 0.13-2 +- Look for configuration on a per-user basis (~/.hellanzb.conf). +- Move sample config to %%doc. +- Add a README.RPMFusion. + +* Mon Jun 2 2008 Conrad Meyer - 0.13-1 +- Initial revision. diff --git a/sources b/sources new file mode 100644 index 0000000..9942b42 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +d3510c6b1b2c7b935332a469fdc8e7e2 hellanzb-0.13.tar.gz +c6cebd7a279ee4aabbf3773c6aab7b6b hellanzb-README.Fedora