deluge: update to 2.0.5.

This commit is contained in:
mobinmob 2022-01-23 17:57:27 +02:00 committed by Echo
parent 19b1db75c4
commit ebd4923f72
3 changed files with 13 additions and 75 deletions

View file

@ -1,25 +0,0 @@
From d6c96d629183e8bab2167ef56457f994017e7c85 Mon Sep 17 00:00:00 2001
From: neeshy <neeshy@tfwno.gf>
Date: Sat, 18 Apr 2020 23:23:51 -0400
Subject: Fix warning related to gettext
---
deluge/i18n/util.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/deluge/i18n/util.py b/deluge/i18n/util.py
index bd002f7a2..90568fc5b 100644
--- a/deluge/i18n/util.py
+++ b/deluge/i18n/util.py
@@ -114,7 +114,7 @@ def setup_translation():
# Workaround for Python 2 unicode gettext (keyword removed in Py3).
kwargs = {} if not deluge.common.PY2 else {'unicode': True}
- gettext.install(I18N_DOMAIN, translations_path, names='ngettext', **kwargs)
+ gettext.install(I18N_DOMAIN, translations_path, names=['ngettext'], **kwargs)
builtins.__dict__['_n'] = builtins.__dict__['ngettext']
libintl = None
--
2.27.0

View file

@ -1,40 +0,0 @@
From d08c3f72e94a3a2b440b5a1a36dd8f7f8641d4fa Mon Sep 17 00:00:00 2001
From: Jack O'Sullivan <jackos1998@gmail.com>
Date: Tue, 24 Sep 2019 11:32:18 +0100
Subject: [PATCH] Fix privilege dropping when setting process ownership
`os.setgid()` should be called to set the GID, and it should be called
before `os.setuid()` to prevent reinstatement of privileges.
---
deluge/argparserbase.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/deluge/argparserbase.py b/deluge/argparserbase.py
index af9d568fa4..77866a3ed6 100644
--- a/deluge/argparserbase.py
+++ b/deluge/argparserbase.py
@@ -329,18 +329,18 @@ def _handle_ui_options(self, options):
_file.write('%d\n' % os.getpid())
if not common.windows_check():
+ if options.group:
+ if not options.group.isdigit():
+ import grp
+
+ options.group = grp.getgrnam(options.group)[2]
+ os.setgid(options.group)
if options.user:
if not options.user.isdigit():
import pwd
options.user = pwd.getpwnam(options.user)[2]
os.setuid(options.user)
- if options.group:
- if not options.group.isdigit():
- import grp
-
- options.group = grp.getgrnam(options.group)[2]
- os.setuid(options.group)
return options

View file

@ -1,20 +1,22 @@
# Template file for 'deluge'
pkgname=deluge
version=2.0.3
revision=15
version=2.0.5
revision=1
build_style=python3-module
# TODO package python3-slimit to minify javascript
hostmakedepends="intltool python3-setuptools python3-wheel"
depends="python3-setuptools python3-chardet python3-Twisted python3-Mako
python3-xdg python3-rencode python3-setproctitle libtorrent-rasterbar-python3
python3-Pillow"
checkdepends="python3-pytest $depends"
python3-Pillow python3-pyasn1 python3-openssl python3-six python3-zope.interface"
checkdepends="python3-pytest $depends python3-pytest-mock python3-mock gtk+3
python3-gobject xvfb-run cantarell-fonts"
short_desc="Fully-featured cross-platform BitTorrent client"
maintainer="Alexey Rochev <equeim@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://deluge-torrent.org/"
changelog="https://raw.githubusercontent.com/deluge-torrent/deluge/develop/CHANGELOG.md"
distfiles="https://ftp.osuosl.org/pub/deluge/source/2.0/deluge-${version}.tar.xz"
checksum=7e7ae8e6ca2a2bf0d487227cecf81e27332f0b92b567cc2bda38e47d859da891
checksum=c4bd04abfd211b65218be03f3c46d26f44024884de10e01859fb856fdd6f25d8
system_accounts="deluge"
deluge_homedir="/var/lib/deluge"
@ -25,18 +27,19 @@ make_dirs="
/var/lib/deluge/.config/deluge 0755 deluge deluge
"
post_install() {
vsv deluged
do_check() {
rm deluge/tests/test_torrentview.py deluge/tests/test_files_tab.py
xvfb-run python3 -m pytest
}
do_check() {
python3 -m pytest || : # fails
post_install() {
vsv deluged
}
deluge-gtk_package() {
replaces="deluge<1.3.14_1"
short_desc+=" - GTK+ frontend"
depends="${sourcepkg}-${version}_${revision} python3-gobject"
depends="${sourcepkg}-${version}_${revision} python3-gobject gtk+3"
pkg_install() {
vmove usr/bin/deluge
vmove usr/bin/deluge-gtk