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

ffsync: Migrate to Python 3.12 #6429

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
10 changes: 4 additions & 6 deletions spk/ffsync/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ SPK_ICON = src/ffsync.png

DEPENDS = cross/syncstorage-rs cross/diesel

PYTHON_PACKAGE = python311
PYTHON_PACKAGE = python312
WHEELS = src/requirements-crossenv.txt src/requirements-pure.txt

UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(PPC_ARCHS)
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(PPC_ARCHS) $(ARMv7L_ARCHS)

REQUIRED_MIN_DSM = 6.0
SPK_DEPENDS = MariaDB10:$(PYTHON_PACKAGE)

MAINTAINER = SynoCommunity
DESCRIPTION = An implementation of the Mozilla Sync-1.5 Server protocol used by the sync service in Firefox 29 and later. You can use Mozilla Sync Server to exchange browser data \(bookmarks, history, open tabs, passwords, add-ons, and the like\) between \'clients\' in a manner that respects a user\'s security and privacy. The service runs on port 8132.
DISPLAY_NAME = Mozilla Sync Server
CHANGELOG = "Update Mozilla Sync Server package to v0.18.2."
CHANGELOG = "1. Update Mozilla Sync Server package to v0.18.2.<br/>2. Migrate to Python 3.12."

HOMEPAGE = https://mozilla-services.readthedocs.io/en/latest/howtos/run-sync-1.5.html
LICENSE = MPL 2.0
Expand Down Expand Up @@ -46,11 +46,9 @@ include ../../mk/spksrc.python.mk
# [greenlet]
ifeq ($(call version_ge, $(TC_GCC), 5.0),1)
WHEELS += src/requirements-crossenv-greenlet-v3.txt
else ifeq ($(call version_ge, $(TC_GCC), 4.9)$(call version_lt, $(TC_GCC), 5.0),11)
else
WHEELS += src/requirements-crossenv-greenlet-v3-gcc4.txt
WHEELS_CPPFLAGS += [greenlet] -std=c++11 -fpermissive
else
WHEELS += src/requirements-crossenv-greenlet-v1.txt
endif


Expand Down
9 changes: 0 additions & 9 deletions spk/ffsync/src/requirements-crossenv-greenlet-v1.txt

This file was deleted.

8 changes: 4 additions & 4 deletions spk/ffsync/src/requirements-pure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

backoff==2.2.1
boto==2.49.0
#certifi ==> python311
#certifi ==> python312
datadog==0.51.0
hawkauthlib==2.0.0
hupper==1.12.1
idna==3.10
PasteDeploy==3.1.0
#pip ==> python311
#pip ==> python312
plaster==1.1.2
plaster_pastedeploy==1.0.1
PyBrowserID==0.14.0
Expand All @@ -17,8 +17,8 @@ PyFxA==0.7.7
PyJWT==2.10.1
pyramid==2.0.2
requests==2.32.3
#setuptools ==> python311
#six ==> python311
#setuptools ==> python312
#six ==> python312
testfixtures==8.3.0
tokenlib==2.0.0
translationstring==1.4
Expand Down
12 changes: 6 additions & 6 deletions spk/ffsync/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# ffsync service setup
PYTHON_DIR="/var/packages/python311/target/bin"
PYTHON_DIR="/var/packages/python312/target/bin"
PATH="${SYNOPKG_PKGDEST}/env/bin:${SYNOPKG_PKGDEST}/bin:${PYTHON_DIR}:${PATH}"

MARIADB_10_INSTALL_DIRECTORY="/var/packages/MariaDB10"
Expand Down Expand Up @@ -44,19 +44,19 @@ percent_encode ()

validate_preinst ()
{
# Check MySQL database
# Check database
if [ "${SYNOPKG_PKG_STATUS}" = "INSTALL" ]; then
if [ -n "${wizard_mysql_password_root}" ]; then
if ! ${MYSQL} -u root -p"${wizard_mysql_password_root}" -e quit > /dev/null 2>&1; then
echo "Incorrect MySQL root password"
echo "Incorrect MariaDB root password"
exit 1
fi
if ${MYSQL} -u root -p"${wizard_mysql_password_root}" mysql -e "SELECT User FROM user" | grep ^${DBUSER}$ > /dev/null 2>&1; then
echo "MySQL user ${DBUSER} already exists"
echo "MariaDB user ${DBUSER} already exists"
exit 1
fi
if ${MYSQL} -u root -p"${wizard_mysql_password_root}" -e "SHOW DATABASES" | grep -E '^(syncstorage_rs|tokenserver_rs)$' > /dev/null 2>&1; then
echo "MySQL database(s) for ${DBUSER} already exist(s)"
echo "MariaDB database(s) for ${DBUSER} already exist(s)"
exit 1
fi
fi
Expand Down Expand Up @@ -143,7 +143,7 @@ validate_preuninst ()
{
# Check database
if [ "${SYNOPKG_PKG_STATUS}" = "UNINSTALL" ] && ! ${MYSQL} -u root -p"${wizard_mysql_password_root}" -e quit > /dev/null 2>&1; then
echo "Incorrect MySQL root password"
echo "Incorrect MariaDB root password"
exit 1
fi
# Check if database export path is specified
Expand Down