Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deluge 2 upgrade to python 3.10 fix for DSM 7 #4153

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cross/boost_1.70/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ ADDITIONAL_CXXFLAGS = -Wno-deprecated-declarations

ifneq ($(strip $(WITH_PYTHON_LIBRARY)),)
CONFIGURE_ARGS += --with-python=$(WORK_DIR)/../../../native/$(PYTHON_NAME)/work-native/install/usr/local/bin/$(PYTHON_NAME)
CONFIGURE_ARGS += LIBS="-L$(STAGING_INSTALL_PREFIX)/$(PYTHON_LIB_DIR)"
ADDITIONAL_CFLAGS += -I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) -fpermissive
ADDITIONAL_CXXFLAGS += -I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) -fpermissive
endif

include ../../mk/spksrc.common.mk
include ../../mk/spksrc.cross-cc.mk

ifeq ($(call version_ge, $(call version_gcc), 7.5),1)
# fix compilation with newer compilers
Expand All @@ -62,7 +64,6 @@ else
ADDRESS_MODEL = 32
endif

include ../../mk/spksrc.cross-cc.mk

.PHONY: boost_configure
boost_configure:
Expand Down
23 changes: 0 additions & 23 deletions cross/deluge/Makefile

This file was deleted.

1 change: 0 additions & 1 deletion cross/deluge/PLIST

This file was deleted.

3 changes: 0 additions & 3 deletions cross/deluge/digests

This file was deleted.

47 changes: 0 additions & 47 deletions cross/libtorrent/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions cross/libtorrent/PLIST

This file was deleted.

3 changes: 0 additions & 3 deletions cross/libtorrent/digests

This file was deleted.

14 changes: 0 additions & 14 deletions cross/rencode/Makefile

This file was deleted.

Empty file removed cross/rencode/PLIST
Empty file.
3 changes: 0 additions & 3 deletions cross/rencode/digests

This file was deleted.

2 changes: 0 additions & 2 deletions spk/deluge/BROKEN

This file was deleted.

66 changes: 53 additions & 13 deletions spk/deluge/Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
SPK_NAME = deluge
SPK_VERS = 2.0.3
SPK_REV = 14
SPK_VERS = 2.0.5
SPK_REV = 15
SPK_ICON = src/deluge.png

BUILD_DEPENDS = cross/python2 cross/setuptools_py2 cross/pip_py2 cross/wheel
DEPENDS = cross/$(SPK_NAME)
WHEELS = src/requirements.txt
SPK_DEPENDS = "python>=2.7.18"
BUILD_DEPENDS = cross/python310

REQUIRED_MIN_DSM = 5.0
# archs lacking C++11 compiler (88f6281, hi3535 and ppc archs except QorIQ) required by cross/libtorrent
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(OLD_PPC_ARCHS)
WHEELS = src/requirements-crossenv.txt src/requirements-pure.txt

MAINTAINER = SynoCommunity
DESCRIPTION = Deluge is a full-featured BitTorrent client for Linux, OS X, Unix and Windows. It uses libtorrent in its backend and features multiple user-interfaces including: GTK+, web and console. It has been designed using the client server model with a daemon process that handles all the bittorrent activity. The Deluge daemon is able to run on headless machines with the user-interfaces being able to connect remotely from any platform. This package is intended for advanced users.
STARTABLE = yes
CHANGELOG = "Update openssl to 1.1."
SPK_DEPENDS = "python310"

MAINTAINER = Strangelovian
DESCRIPTION = "Deluge is a cross platform BitTorrent client, based on libtorrent rasterbar. This syno community package runs the deluge deamon \(deluged\), as well as the deluge web daemon \(deluge-web\), which serves the deluge web UI."
STARTABLE = yes
CHANGELOG = "1. Update to v2.0.5<br/>2. Update to libtorrent 1.2.16<br/>3. Update to Python 3.10<br/>4. Update to OpenSSL 1.1.1o"
DISPLAY_NAME = Deluge

HOMEPAGE = https://deluge-torrent.org
Expand All @@ -39,6 +35,50 @@ ADMIN_PORT = $(SERVICE_PORT)

POST_STRIP_TARGET = deluge_extra_install

include ../../mk/spksrc.common.mk

# [libtorrent] 2.0.6
# # archs lacking C++14 (and c++1y) compiler (88f6281, hi3535 and ppc archs except QorIQ)
# UNSUPPORTED_ARCHS += $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(OLD_PPC_ARCHS)
# DEPENDS += cross/openssl cross/boost_1.78 cross/geoip
# BOOST_LIBRARIES += system python chrono random
# BOOST_BUILD_PATH=$(WORK_DIR)/boost_1_78_0
# ENV += BOOST_LIBRARIES="$(BOOST_LIBRARIES)"
# ENV += BOOST_BUILD_PATH="$(BOOST_BUILD_PATH)"
# ENV += PATH=$(BOOST_BUILD_PATH):$(PATH)
# WHEELS_BUILD_ARGS += [libtorrent]
# WHEELS_BUILD_ARGS += build_ext
# WHEELS_BUILD_ARGS += --b2-args=libtorrent-python-pic=on
# ifeq ($(findstring $(ARCH),$(32bit_ARCHS)),$(ARCH))
# WHEELS_BUILD_ARGS += --b2-args=address-model=32 --no-autoconf=address-model
# endif
# # libtorrent > 2.x are DSM 7 only due to c++14 minimal requirement
# # Unless c++1y is fixed: https://github.com/arvidn/libtorrent/issues/6868
# REQUIRED_MIN_DSM = 7.0
# UNSUPPORTED_ARCHS += comcerto2k
# # ifeq ($(call version_lt, $(call version_gcc), 5.0),1)
# # WHEELS_BUILD_ARGS += --b2-args=cxxstd=1y
# # endif

# [libtorrent] 1.2.16
# archs lacking C++11 compiler (88f6281, hi3535 and ppc archs except QorIQ)
UNSUPPORTED_ARCHS += $(ARMv5_ARCHS) $(ARMv7L_ARCHS) $(OLD_PPC_ARCHS)
DEPENDS += cross/openssl cross/boost_1.70 cross/geoip cross/libiconv
BOOST_LIBRARIES += system python chrono random
BOOST_BUILD_PATH=$(WORK_DIR)/boost_1_70_0
ENV += BOOST_LIBRARIES="$(BOOST_LIBRARIES)"
ENV += BOOST_BUILD_PATH="$(BOOST_BUILD_PATH)"
ENV += PATH=$(BOOST_BUILD_PATH):$(PATH)
WHEELS_BUILD_ARGS += [libtorrent]
WHEELS_BUILD_ARGS += build_ext
WHEELS_BUILD_ARGS += --b2-args=libtorrent-python-pic=on
ifeq ($(findstring $(ARCH),$(32bit_ARCHS)),$(ARCH))
WHEELS_BUILD_ARGS += --b2-args=address-model=32 --no-autoconf=address-model
endif
ifeq ($(call version_lt, $(call version_gcc), 5.0),1)
WHEELS_BUILD_ARGS += --b2-args=cxxstd=11
endif

include ../../mk/spksrc.spk.mk

.PHONY: deluge_extra_install
Expand Down
2 changes: 1 addition & 1 deletion spk/deluge/src/core.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"random_port": false,
"listen_ports": [
6881,
6891
6881
hgy59 marked this conversation as resolved.
Show resolved Hide resolved
],
"max_connections_per_torrent": -1,
"del_copy_torrent_file": false,
Expand Down
Binary file modified spk/deluge/src/deluge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions spk/deluge/src/requirements-crossenv.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## required wheels that need cross compilation
##

#deluge==2.0.5 ==> pure

# [libtorrent] 1.2.16
# Depends: openssl, boost 1.70, geoip, libiconv
# Require environment variables
# BOOST_LIBRARIES
# BOOST_BUILD_PATH
git+https://github.com/arvidn/[email protected]#egg=libtorrent==1.2.16

# [libtorrent] 2.0.6
# Depends: openssl, boost 1.78, geoip
# Require environment variables
# BOOST_LIBRARIES
# BOOST_BUILD_PATH
# Only supported on DSM7 armv7, aarch64, x64
# git+https://github.com/arvidn/[email protected]#egg=libtorrent==2.0.6
# Use RC_2_0 for latest development snapshots
# git+https://github.com/arvidn/libtorrent.git@RC_2_0#egg=libtorrent==2.0.6

# [rencode]
# Updated fork of the project
# rencode==1.0.6 <<-- unsupported
git+https://github.com/totaam/rencode.git@f6254ab26161f90b9c5e97915b9193fee805fc1f#egg=rencode==1.0.7

zope.interface==5.4.0
15 changes: 15 additions & 0 deletions spk/deluge/src/requirements-pure.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## pure python wheels
##

# [deluge]
deluge==2.0.5

incremental==21.3.0
Mako==1.2.0
MarkupSafe==2.1.1
pyasn1==0.4.8
pycparser==2.21
pyxdg==0.27
service-identity==21.1.0
six==1.16.0
Twisted==22.2.0
9 changes: 0 additions & 9 deletions spk/deluge/src/requirements.txt

This file was deleted.

21 changes: 7 additions & 14 deletions spk/deluge/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
PYTHON_DIR="/usr/local/python"
PATH="${SYNOPKG_PKGDEST}/bin:${SYNOPKG_PKGDEST}/env/bin:${PYTHON_DIR}/bin:${PATH}"
VIRTUALENV="${PYTHON_DIR}/bin/virtualenv"
PYTHON="${SYNOPKG_PKGDEST}/env/bin/python"
PYTHON_DIR="/var/packages/python310/target/bin"
PATH="${SYNOPKG_PKGDEST}/env/bin:${SYNOPKG_PKGDEST}/bin:${PYTHON_DIR}:${PATH}"
CORE_CFG_FILE="${SYNOPKG_PKGDEST}/var/core.conf"
WATCH_CFG_FILE="${SYNOPKG_PKGDEST}/var/autoadd.conf"

Expand All @@ -28,13 +26,10 @@ service_preinst ()
service_postinst ()
{
# Create a Python virtualenv
${VIRTUALENV} --system-site-packages ${SYNOPKG_PKGDEST}/env >> ${INST_LOG}
install_python_virtualenv

# Install the wheels/requirements
${SYNOPKG_PKGDEST}/env/bin/pip install --no-deps --no-index -U --force-reinstall -f ${SYNOPKG_PKGDEST}/share/wheelhouse ${SYNOPKG_PKGDEST}/share/wheelhouse/*.whl >> ${INST_LOG} 2>&1

# Install Deluge
export PYTHON_EGG_CACHE=${SYNOPKG_PKGDEST}/env/cache && cd ${SYNOPKG_PKGDEST}/share/deluge && ${PYTHON} setup.py build >> ${INST_LOG} 2>&1 && ${PYTHON} setup.py install >> ${INST_LOG} 2>&1
# Install the wheels
install_python_wheels

# Correct permissions, otherwise Deluge can't write to cache
set_unix_permissions "${SYNOPKG_PKGDEST}/env"
Expand All @@ -59,10 +54,8 @@ service_postinst ()
fi
fi

# Discard legacy obsolete busybox user account
# Commands of busybox from spk/python
delgroup "${USER}" "users" >> ${INST_LOG}
deluser "${USER}" >> ${INST_LOG}
# Create logs directory, otherwise it does not start due to permissions errors
mkdir "$(dirname ${LOG_FILE})" >> ${INST_LOG} 2>&1
}


Expand Down
2 changes: 1 addition & 1 deletion spk/deluge/src/wizard/install_uifile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}, {
"step_title": "First login",
"items": [{
"desc": "The default password for the web interface is 'deluge'.<br><br>."
"desc": "The default password for the web interface is 'deluge'.<br><br>The web UI is served on http//*:8112.<br><br>For https, create a new https source in Synology control panel / application portal / inverse proxy."
}]
}, {
"step_title": "Attention! DSM6 Permissions",
Expand Down
2 changes: 1 addition & 1 deletion spk/deluge/src/wizard/install_uifile_fre
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}, {
"step_title": "Premier login",
"items": [{
"desc": "Le mot de passe par défaut de l'interface web est 'deluge'.<br><br>L'accès distant est désactivé par défaut. Pour autoriser des clients à se connecter au service, consulter <a target=\"blank\" href=\"https://dev.deluge-torrent.org/wiki/UserGuide/ThinClient\">le guide ThinClient de Deluge</a>."
"desc": "Le mot de passe par défaut de l'interface web est 'deluge'.<br><br>L'interface web est disponible via http//*:8112.<br><br>Pour https, créer une source https dans le paneau de contrôle Synology / Portail des applications / proxy inversé."
}]
}, {
"step_title": "Attention! Permissions DSM",
Expand Down