From 3d6fbd8fac86bf903c86c56093c7c85129a3b725 Mon Sep 17 00:00:00 2001 From: Michał Kępień Date: Fri, 18 Nov 2016 14:32:31 +0100 Subject: Migrate to EAPI 6 --- .../0001-use-system-configobj-and-feedparser.patch | 52 ----------------- .../sabnzbd/files/1.1.x/0002-assume-gntp-1.0.patch | 25 -------- .../1.1.x/0003-cfg-disable-growl-by-default.patch | 34 ----------- .../files/1.1.x/0004-use-system-rarfile.patch | 68 ---------------------- .../0001-use-system-configobj-and-feedparser.patch | 52 +++++++++++++++++ .../files/patches/0002-assume-gntp-1.0.patch | 25 ++++++++ .../0003-cfg-disable-growl-by-default.patch | 34 +++++++++++ .../files/patches/0004-use-system-rarfile.patch | 68 ++++++++++++++++++++++ net-nntp/sabnzbd/sabnzbd-1.1.1.ebuild | 11 ++-- 9 files changed, 184 insertions(+), 185 deletions(-) delete mode 100644 net-nntp/sabnzbd/files/1.1.x/0001-use-system-configobj-and-feedparser.patch delete mode 100644 net-nntp/sabnzbd/files/1.1.x/0002-assume-gntp-1.0.patch delete mode 100644 net-nntp/sabnzbd/files/1.1.x/0003-cfg-disable-growl-by-default.patch delete mode 100644 net-nntp/sabnzbd/files/1.1.x/0004-use-system-rarfile.patch create mode 100644 net-nntp/sabnzbd/files/patches/0001-use-system-configobj-and-feedparser.patch create mode 100644 net-nntp/sabnzbd/files/patches/0002-assume-gntp-1.0.patch create mode 100644 net-nntp/sabnzbd/files/patches/0003-cfg-disable-growl-by-default.patch create mode 100644 net-nntp/sabnzbd/files/patches/0004-use-system-rarfile.patch (limited to 'net-nntp') 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 deleted file mode 100644 index ef1a6fc894e9..000000000000 --- a/net-nntp/sabnzbd/files/1.1.x/0001-use-system-configobj-and-feedparser.patch +++ /dev/null @@ -1,52 +0,0 @@ -From af041fe9945276db0716a5342609b48aa2ac4363 Mon Sep 17 00:00:00 2001 -From: Justin Bronder -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 deleted file mode 100644 index 4e0674aa1f63..000000000000 --- a/net-nntp/sabnzbd/files/1.1.x/0002-assume-gntp-1.0.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7ffaea52e44a3fbea1ac0aa186a48b2033b409a2 Mon Sep 17 00:00:00 2001 -From: Justin Bronder -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 deleted file mode 100644 index 384fb336f801..000000000000 --- a/net-nntp/sabnzbd/files/1.1.x/0003-cfg-disable-growl-by-default.patch +++ /dev/null @@ -1,34 +0,0 @@ -From d969db7d407d21ea73b9ca96ff81b1846cbaff8e Mon Sep 17 00:00:00 2001 -From: Justin Bronder -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 deleted file mode 100644 index 2fcbf2809911..000000000000 --- a/net-nntp/sabnzbd/files/1.1.x/0004-use-system-rarfile.patch +++ /dev/null @@ -1,68 +0,0 @@ -From a63aed271c34eb81f0bf6aa9c62b9825d1c4929c Mon Sep 17 00:00:00 2001 -From: Justin Bronder -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/files/patches/0001-use-system-configobj-and-feedparser.patch b/net-nntp/sabnzbd/files/patches/0001-use-system-configobj-and-feedparser.patch new file mode 100644 index 000000000000..ef1a6fc894e9 --- /dev/null +++ b/net-nntp/sabnzbd/files/patches/0001-use-system-configobj-and-feedparser.patch @@ -0,0 +1,52 @@ +From af041fe9945276db0716a5342609b48aa2ac4363 Mon Sep 17 00:00:00 2001 +From: Justin Bronder +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/patches/0002-assume-gntp-1.0.patch b/net-nntp/sabnzbd/files/patches/0002-assume-gntp-1.0.patch new file mode 100644 index 000000000000..4e0674aa1f63 --- /dev/null +++ b/net-nntp/sabnzbd/files/patches/0002-assume-gntp-1.0.patch @@ -0,0 +1,25 @@ +From 7ffaea52e44a3fbea1ac0aa186a48b2033b409a2 Mon Sep 17 00:00:00 2001 +From: Justin Bronder +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/patches/0003-cfg-disable-growl-by-default.patch b/net-nntp/sabnzbd/files/patches/0003-cfg-disable-growl-by-default.patch new file mode 100644 index 000000000000..384fb336f801 --- /dev/null +++ b/net-nntp/sabnzbd/files/patches/0003-cfg-disable-growl-by-default.patch @@ -0,0 +1,34 @@ +From d969db7d407d21ea73b9ca96ff81b1846cbaff8e Mon Sep 17 00:00:00 2001 +From: Justin Bronder +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/patches/0004-use-system-rarfile.patch b/net-nntp/sabnzbd/files/patches/0004-use-system-rarfile.patch new file mode 100644 index 000000000000..2fcbf2809911 --- /dev/null +++ b/net-nntp/sabnzbd/files/patches/0004-use-system-rarfile.patch @@ -0,0 +1,68 @@ +From a63aed271c34eb81f0bf6aa9c62b9825d1c4929c Mon Sep 17 00:00:00 2001 +From: Justin Bronder +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.1.ebuild b/net-nntp/sabnzbd/sabnzbd-1.1.1.ebuild index e5f0860d7e02..726733fe1f36 100644 --- a/net-nntp/sabnzbd/sabnzbd-1.1.1.ebuild +++ b/net-nntp/sabnzbd/sabnzbd-1.1.1.ebuild @@ -2,13 +2,13 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI="5" +EAPI="6" # Require python-2 with sqlite USE flag PYTHON_DEPEND="2:2.7" PYTHON_USE_WITH="sqlite" -inherit eutils python user systemd versionator +inherit python user systemd versionator MY_P="${P/sab/SAB}" @@ -64,15 +64,14 @@ pkg_setup() { } 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 + eapply "${FILESDIR}"/patches # 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 + + eapply_user } src_install() { -- cgit v1.2.3-65-gdbad