summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bronder <jsbronder@gentoo.org>2016-09-21 19:57:09 -0400
committerJustin Bronder <jsbronder@gentoo.org>2016-09-21 19:57:09 -0400
commit348a867daf6cf5e57c0429fc30c62d6d4d9a2116 (patch)
treeb9d9bdedccaec9e29c4540754896c5958c389dba /net-nntp
parentapp-vim/csscomplete: add csscomplete to the tree. (diff)
downloadgentoo-348a867daf6cf5e57c0429fc30c62d6d4d9a2116.tar.gz
gentoo-348a867daf6cf5e57c0429fc30c62d6d4d9a2116.tar.bz2
gentoo-348a867daf6cf5e57c0429fc30c62d6d4d9a2116.zip
net-nntp/sabnzbd: bump 1.1.0
Thanks to S├ębastien P. for the report, #593494 Package-Manager: portage-2.2.28
Diffstat (limited to 'net-nntp')
-rw-r--r--net-nntp/sabnzbd/Manifest1
-rw-r--r--net-nntp/sabnzbd/files/1.1.x/0001-use-system-configobj-and-feedparser.patch52
-rw-r--r--net-nntp/sabnzbd/files/1.1.x/0002-assume-gntp-1.0.patch25
-rw-r--r--net-nntp/sabnzbd/files/1.1.x/0003-cfg-disable-growl-by-default.patch34
-rw-r--r--net-nntp/sabnzbd/files/1.1.x/0004-use-system-rarfile.patch68
-rw-r--r--net-nntp/sabnzbd/sabnzbd-1.1.0.ebuild134
6 files changed, 314 insertions, 0 deletions
diff --git a/net-nntp/sabnzbd/Manifest b/net-nntp/sabnzbd/Manifest
index 62744e62342..e3dca24cf7b 100644
--- a/net-nntp/sabnzbd/Manifest
+++ b/net-nntp/sabnzbd/Manifest
@@ -4,3 +4,4 @@ DIST SABnzbd-0.7.18-src.tar.gz 2317137 SHA256 aa05697d901b3e334e92f274b2e8788973
DIST SABnzbd-0.7.19-src.tar.gz 2386744 SHA256 31ad0ae24db3873011db816e1b100f4429734b2260f4c669b7261d2f85717487 SHA512 383788d87a3ee4e69ba818f6614f6929aa328d1153b746e04736868de598ee35e556a07cced7c74bc89c54fe77c1e52c4cdde8ed37d536a09bd1c605c551b9e7 WHIRLPOOL fbf1ab129a403011bd6957272d348fd745621e9c13f46f3988362bb8bb7a6ceb26b57253978ec5f5ae97c2ea942ba80ff1cab0ca1d1f99d33a1c55fc03b0dad9
DIST SABnzbd-0.7.20-src.tar.gz 2389762 SHA256 20b3a4613a0ecdede4fdfeb628ae806e458ac1a6fb684306328dd4ed1faf8742 SHA512 51ea888fcb7b49156cb719cb4fe75725d69acd726097d8b2526d6af87d0404bf08d0ab4b82f25dae7ac9a52d6c639e57a145bf5af6005fa435ad31f239a716d5 WHIRLPOOL 2686160be649c051ac1186481dae1e876650fbc91fe3ea1ab2d1569baea51f0ab7d0be6c7942b9facd6e5f856ab24ab36d1dc2f55dc645f06be275b2e43abb4b
DIST SABnzbd-1.0.3-src.tar.gz 2975111 SHA256 cf87d3f17fc03e8b3a4b3010261115c2ad7e2f773b5ede95a80025b340dbbd35 SHA512 6213cb73f6d2127133c5ab292e5ac2bcf6f4c780b5345b54b91459271c1acad6c6c95c4ba1ebc1e34341d5dc09d14e4806b84b977fc90f5ff0a49725b08a77e9 WHIRLPOOL 021a864f8d2b90481da5f4d1b3b1a5a5478230c3a61af2c30ba2be65594224863a48d58d475fc2e79986274e48e5ad83b5d13a6bc0a7829e99552062fdf185a7
+DIST SABnzbd-1.1.0-src.tar.gz 2736977 SHA256 3e86a897dea1c276c54ee38667a980f644f16d57df75612fe9eefa84b339ce9a SHA512 4fd4304253ec66c7bc6038fe8eb7bc08f0133cc4eda9efb28349242574744f262369fe43786da5a22eb90664cfa7fb91356941174787c4faef7d7624751a86d2 WHIRLPOOL f5ef42a01cd1c79f28bbd42c6970b9a1b66846af266c027354494cd103d03d14d2914a3d2b88b1aef740a6e849b9e3216c639323f41146553c5f2dcdeef182aa
diff --git a/net-nntp/sabnzbd/files/1.1.x/0001-use-system-configobj-and-feedparser.patch b/net-nntp/sabnzbd/files/1.1.x/0001-use-system-configobj-and-feedparser.patch
new file mode 100644
index 00000000000..ef1a6fc894e
--- /dev/null
+++ b/net-nntp/sabnzbd/files/1.1.x/0001-use-system-configobj-and-feedparser.patch
@@ -0,0 +1,52 @@
+From af041fe9945276db0716a5342609b48aa2ac4363 Mon Sep 17 00:00:00 2001
+From: Justin Bronder <jsbronder@gmail.com>
+Date: Wed, 21 Sep 2016 19:35:16 -0400
+Subject: [PATCH 1/4] use system configobj and feedparser
+
+---
+ sabnzbd/config.py | 4 +++-
+ sabnzbd/rss.py | 3 ++-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/sabnzbd/config.py b/sabnzbd/config.py
+index a59b265..36cc12c 100644
+--- a/sabnzbd/config.py
++++ b/sabnzbd/config.py
+@@ -24,10 +24,12 @@ import re
+ import logging
+ import threading
+ import shutil
++
++import configobj
++
+ import sabnzbd.misc
+ from sabnzbd.constants import CONFIG_VERSION, NORMAL_PRIORITY, DEFAULT_PRIORITY, MAX_WIN_DFOLDER
+ from sabnzbd.utils import listquote
+-from sabnzbd.utils import configobj
+ from sabnzbd.decorators import synchronized
+
+ CONFIG_LOCK = threading.Lock()
+diff --git a/sabnzbd/rss.py b/sabnzbd/rss.py
+index fc29e26..a7cdee1 100644
+--- a/sabnzbd/rss.py
++++ b/sabnzbd/rss.py
+@@ -24,6 +24,8 @@ import logging
+ import time
+ import threading
+
++import feedparser
++
+ import sabnzbd
+ from sabnzbd.constants import RSS_FILE_NAME, DEFAULT_PRIORITY, NORMAL_PRIORITY, DUP_PRIORITY
+ from sabnzbd.decorators import synchronized
+@@ -34,7 +36,6 @@ from sabnzbd.misc import cat_convert, wildcard_to_re, cat_to_opts, \
+ import sabnzbd.emailer as emailer
+ from sabnzbd.encoding import unicoder, xml_name
+
+-import sabnzbd.utils.feedparser as feedparser
+
+ __RSS = None # Global pointer to RSS-scanner instance
+
+--
+2.4.10
+
diff --git a/net-nntp/sabnzbd/files/1.1.x/0002-assume-gntp-1.0.patch b/net-nntp/sabnzbd/files/1.1.x/0002-assume-gntp-1.0.patch
new file mode 100644
index 00000000000..4e0674aa1f6
--- /dev/null
+++ b/net-nntp/sabnzbd/files/1.1.x/0002-assume-gntp-1.0.patch
@@ -0,0 +1,25 @@
+From 7ffaea52e44a3fbea1ac0aa186a48b2033b409a2 Mon Sep 17 00:00:00 2001
+From: Justin Bronder <jsbronder@gmail.com>
+Date: Wed, 21 Sep 2016 19:39:30 -0400
+Subject: [PATCH 2/4] assume >=gntp-1.0
+
+---
+ sabnzbd/notifier.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sabnzbd/notifier.py b/sabnzbd/notifier.py
+index 777f93a..514da75 100644
+--- a/sabnzbd/notifier.py
++++ b/sabnzbd/notifier.py
+@@ -39,7 +39,7 @@ from sabnzbd.constants import NOTIFY_KEYS
+ from sabnzbd.misc import split_host, make_script_path
+ from sabnzbd.newsunpack import external_script
+
+-from gntp import GNTPRegister
++from gntp.core import GNTPRegister
+ from gntp.notifier import GrowlNotifier
+ try:
+ import Growl
+--
+2.4.10
+
diff --git a/net-nntp/sabnzbd/files/1.1.x/0003-cfg-disable-growl-by-default.patch b/net-nntp/sabnzbd/files/1.1.x/0003-cfg-disable-growl-by-default.patch
new file mode 100644
index 00000000000..384fb336f80
--- /dev/null
+++ b/net-nntp/sabnzbd/files/1.1.x/0003-cfg-disable-growl-by-default.patch
@@ -0,0 +1,34 @@
+From d969db7d407d21ea73b9ca96ff81b1846cbaff8e Mon Sep 17 00:00:00 2001
+From: Justin Bronder <jsbronder@gmail.com>
+Date: Tue, 14 Jun 2016 08:38:54 -0400
+Subject: [PATCH 3/4] cfg: disable growl by default
+
+---
+ sabnzbd/cfg.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sabnzbd/cfg.py b/sabnzbd/cfg.py
+index 8172646..53b75f3 100644
+--- a/sabnzbd/cfg.py
++++ b/sabnzbd/cfg.py
+@@ -291,7 +291,7 @@ acenter_prio_queue_done = OptionBool('acenter', 'acenter_prio_queue_done', True)
+ acenter_prio_other = OptionBool('acenter', 'acenter_prio_other', False)
+
+ # [ntfosd]
+-ntfosd_enable = OptionBool('ntfosd', 'ntfosd_enable', not sabnzbd.WIN32 and not sabnzbd.DARWIN)
++ntfosd_enable = OptionBool('ntfosd', 'ntfosd_enable', False)
+ ntfosd_prio_startup = OptionBool('ntfosd', 'ntfosd_prio_startup', True)
+ ntfosd_prio_download = OptionBool('ntfosd', 'ntfosd_prio_download', False)
+ ntfosd_prio_pp = OptionBool('ntfosd', 'ntfosd_prio_pp', False)
+@@ -305,7 +305,7 @@ ntfosd_prio_queue_done = OptionBool('ntfosd', 'ntfosd_prio_queue_done', True)
+ ntfosd_prio_other = OptionBool('ntfosd', 'ntfosd_prio_other', False)
+
+ # [growl]
+-growl_enable = OptionBool('growl', 'growl_enable', sabnzbd.DARWIN and sabnzbd.DARWIN_VERSION < 8)
++growl_enable = OptionBool('growl', 'growl_enable', False)
+ growl_server = OptionStr('growl', 'growl_server')
+ growl_password = OptionPassword('growl', 'growl_password')
+ growl_prio_startup = OptionBool('growl', 'growl_prio_startup', True)
+--
+2.4.10
+
diff --git a/net-nntp/sabnzbd/files/1.1.x/0004-use-system-rarfile.patch b/net-nntp/sabnzbd/files/1.1.x/0004-use-system-rarfile.patch
new file mode 100644
index 00000000000..2fcbf280991
--- /dev/null
+++ b/net-nntp/sabnzbd/files/1.1.x/0004-use-system-rarfile.patch
@@ -0,0 +1,68 @@
+From a63aed271c34eb81f0bf6aa9c62b9825d1c4929c Mon Sep 17 00:00:00 2001
+From: Justin Bronder <jsbronder@gmail.com>
+Date: Tue, 14 Jun 2016 08:43:37 -0400
+Subject: [PATCH 4/4] use system rarfile
+
+---
+ sabnzbd/assembler.py | 3 ++-
+ sabnzbd/dirscanner.py | 3 ++-
+ sabnzbd/newsunpack.py | 3 ++-
+ 3 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/sabnzbd/assembler.py b/sabnzbd/assembler.py
+index 7c69c68..0789540 100644
+--- a/sabnzbd/assembler.py
++++ b/sabnzbd/assembler.py
+@@ -33,6 +33,8 @@ except:
+ import md5
+ new_md5 = md5.new
+
++from rarfile import RarFile, is_rarfile
++
+ import sabnzbd
+ from sabnzbd.misc import get_filepath, sanitize_filename, get_unique_filename, renamer, \
+ set_permissions, flag_file, long_path, clip_path
+@@ -41,7 +43,6 @@ import sabnzbd.cfg as cfg
+ from sabnzbd.articlecache import ArticleCache
+ from sabnzbd.postproc import PostProcessor
+ import sabnzbd.downloader
+-from sabnzbd.utils.rarfile import RarFile, is_rarfile
+ from sabnzbd.encoding import unicoder, is_utf8
+ from sabnzbd.rating import Rating
+
+diff --git a/sabnzbd/dirscanner.py b/sabnzbd/dirscanner.py
+index c573435..dcb2859 100644
+--- a/sabnzbd/dirscanner.py
++++ b/sabnzbd/dirscanner.py
+@@ -27,9 +27,10 @@ import gzip
+ import bz2
+ import threading
+
++from rarfile import is_rarfile, RarFile
++
+ import sabnzbd
+ from sabnzbd.constants import SCAN_FILE_NAME, VALID_ARCHIVES
+-from sabnzbd.utils.rarfile import is_rarfile, RarFile
+ from sabnzbd.encoding import platform_encode
+ from sabnzbd.newsunpack import is_sevenfile, SevenZip
+ import sabnzbd.nzbstuff as nzbstuff
+diff --git a/sabnzbd/newsunpack.py b/sabnzbd/newsunpack.py
+index 7f223d9..b7fbd4f 100644
+--- a/sabnzbd/newsunpack.py
++++ b/sabnzbd/newsunpack.py
+@@ -28,10 +28,11 @@ from time import time
+ import binascii
+ import shutil
+
++from rarfile import RarFile, is_rarfile
++
+ import sabnzbd
+ from sabnzbd.encoding import TRANS, UNTRANS, unicode2local, \
+ reliable_unpack_names, unicoder, platform_encode, deunicode
+-from sabnzbd.utils.rarfile import RarFile, is_rarfile
+ from sabnzbd.misc import format_time_string, find_on_path, make_script_path, int_conv, \
+ flag_file, real_path, globber, globber_full, short_path
+ from sabnzbd.tvsort import SeriesSorter
+--
+2.4.10
+
diff --git a/net-nntp/sabnzbd/sabnzbd-1.1.0.ebuild b/net-nntp/sabnzbd/sabnzbd-1.1.0.ebuild
new file mode 100644
index 00000000000..e5f0860d7e0
--- /dev/null
+++ b/net-nntp/sabnzbd/sabnzbd-1.1.0.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+# Require python-2 with sqlite USE flag
+PYTHON_DEPEND="2:2.7"
+PYTHON_USE_WITH="sqlite"
+
+inherit eutils python user systemd versionator
+
+MY_P="${P/sab/SAB}"
+
+DESCRIPTION="Binary newsgrabber with web-interface"
+HOMEPAGE="http://www.sabnzbd.org/"
+SRC_URI="mirror://sourceforge/sabnzbdplus/${MY_P}-src.tar.gz"
+
+# Sabnzbd is GPL-2 but bundles software with the following licenses.
+LICENSE="GPL-2 BSD LGPL-2 MIT BSD-1"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+rar +ssl unzip +yenc"
+
+# Sabnzbd is installed to /usr/share/ as upstream makes it clear they should not
+# be in python's sitedir. See: http://wiki.sabnzbd.org/unix-packaging
+
+# TODO: still bundled but not in protage:
+# kronos, rsslib, ssmtplib, listquote, json-py, msgfmt
+# pynewsleecher
+#
+# Also note that cherrypy is still bundled. It's near impossible to find
+# out where the bundled and heavily patched version came from (pulled from
+# cherrypy subversion, patched somewhere, then imported to sabnzbd and patched
+# further. Upstream is planning on making this easier with 0.8.0.
+# https://github.com/sabnzbd/sabnzbd/issues/47
+
+RDEPEND="
+ >=app-arch/par2cmdline-0.4
+ >=dev-python/cheetah-2.0.1
+ dev-python/configobj
+ dev-python/feedparser
+ dev-python/gntp
+ dev-python/pythonutils
+ dev-python/rarfile
+ net-misc/wget
+ rar? ( || ( app-arch/unrar app-arch/rar ) )
+ ssl? ( dev-python/pyopenssl )
+ unzip? ( >=app-arch/unzip-5.5.2 )
+ yenc? ( dev-python/yenc )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ HOMEDIR="/var/lib/${PN}"
+ python_set_active_version 2
+ python_pkg_setup
+
+ # Create sabnzbd group
+ enewgroup ${PN}
+ # Create sabnzbd user, put in sabnzbd group
+ enewuser "${PN}" -1 -1 "${HOMEDIR}" "${PN}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/1.1.x/0001-use-system-configobj-and-feedparser.patch
+ epatch "${FILESDIR}"/1.1.x/0002-assume-gntp-1.0.patch
+ epatch "${FILESDIR}"/1.1.x/0003-cfg-disable-growl-by-default.patch
+ epatch "${FILESDIR}"/1.1.x/0004-use-system-rarfile.patch
+
+ # remove bundled modules
+ rm -r sabnzbd/utils/{feedparser,configobj,rarfile}.py || die
+ rm -r gntp || die
+ rm licenses/License-{feedparser,configobj,gntp,rarfile}.txt || die
+}
+
+src_install() {
+ local d
+
+ dodir /usr/share/${PN}/sabnzbd
+ insinto /usr/share/${PN}/
+ doins SABnzbd.py
+ fperms +x /usr/share/${PN}/SABnzbd.py
+ dobin "${FILESDIR}"/sabnzbd
+
+ for d in cherrypy email icons interfaces locale po sabnzbd tools util; do
+ insinto /usr/share/${PN}/${d}
+ doins -r ${d}/*
+ done
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+
+ diropts -o ${PN} -g ${PN}
+ dodir /etc/${PN}
+ dodir /var/log/${PN}
+
+ insinto "/etc/${PN}"
+ insopts -m 0600 -o ${PN} -g ${PN}
+ doins "${FILESDIR}/${PN}.ini"
+
+ dodoc {ABOUT,ISSUES,README}.txt licenses/*
+
+ systemd_newunit "${FILESDIR}"/sabnzbd_at.service 'sabnzbd@.service'
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/share/${PN}
+
+ einfo "Default directory: ${HOMEDIR}"
+ einfo ""
+ einfo "Run: gpasswd -a <user> sabnzbd"
+ einfo "to add a user to the sabnzbd group so it can edit sabnzbd files"
+ einfo ""
+ einfo "By default sabnzbd will listen on 127.0.0.1:8080"
+ einfo "As growl isn't default notification system on gentoo we disable it."
+ einfo "By default notifications are forwarded to the 23053 port(gntp)."
+
+ local replacing
+ for replacing in ${REPLACING_VERSIONS}; do
+ if [ "$(get_major_version ${replacing})" == "0" ]; then
+ echo
+ ewarn "Upgrading from ${PN}-0.x.y to ${PN}-1.x.y introduces incompatible changes"
+ ewarn "See http://wiki.sabnzbd.org/introducing-1-0-0."
+ ewarn "In particular, you need to let your queue complete before restarting ${PN}"
+ break
+ fi
+ done
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/share/${PN}
+}