diff --git a/cross/tt-rss/Makefile b/cross/tt-rss/Makefile index 0a71dbe0102..d403124e2c6 100644 --- a/cross/tt-rss/Makefile +++ b/cross/tt-rss/Makefile @@ -1,8 +1,8 @@ PKG_NAME = tt-rss -PKG_VERS = c30b24d09f +PKG_VERS = afd04d141c PKG_EXT = tar.gz PKG_DOWNLOAD_METHOD = git -PKG_GIT_HASH = c30b24d09f4096e612965af658540595262f6848 +PKG_GIT_HASH = afd04d141c7bd8a1d6732a2a6a4c91c0a9b4cd6b PKG_DIST_SITE = https://git.tt-rss.org/fox/tt-rss.git PKG_DIST_FILE = $(PKG_NAME)-git$(PKG_GIT_HASH).$(PKG_EXT) PKG_DIR = $(PKG_NAME)-git$(PKG_GIT_HASH) diff --git a/cross/tt-rss/digests b/cross/tt-rss/digests index fafce9c4fb2..d8bbdbe423f 100644 --- a/cross/tt-rss/digests +++ b/cross/tt-rss/digests @@ -1,3 +1,3 @@ -tt-rss-gitc30b24d09f4096e612965af658540595262f6848.tar.gz SHA1 f86076fd142d872d41cdbce8427a89d03ecf158d -tt-rss-gitc30b24d09f4096e612965af658540595262f6848.tar.gz SHA256 3752aa5eaf540c5b8d12f6d538237df88388069079bce81bf54d604f024d7b5a -tt-rss-gitc30b24d09f4096e612965af658540595262f6848.tar.gz MD5 8f6ca72dd3d30d1b795a1a887b1f41d0 +tt-rss-gitafd04d141c7bd8a1d6732a2a6a4c91c0a9b4cd6b.tar.gz SHA1 24897a2bea4fa3f07a9cb426c9d316b624a3cbda +tt-rss-gitafd04d141c7bd8a1d6732a2a6a4c91c0a9b4cd6b.tar.gz SHA256 3ef5c221b1505b9d0e071ee531be7ca63e3a619408fa553f0e3fd93e433fb46e +tt-rss-gitafd04d141c7bd8a1d6732a2a6a4c91c0a9b4cd6b.tar.gz MD5 2567238d32d10abf0ac13c31f5016783 diff --git a/spk/tt-rss/Makefile b/spk/tt-rss/Makefile index 05f6d7a36d8..8995cca05e8 100644 --- a/spk/tt-rss/Makefile +++ b/spk/tt-rss/Makefile @@ -1,6 +1,6 @@ SPK_NAME = tt-rss -SPK_VERS = 20221230 -SPK_REV = 16 +SPK_VERS = 20230828 +SPK_REV = 17 SPK_ICON = src/tt-rss.png DSM_UI_DIR = app @@ -11,34 +11,32 @@ DESCRIPTION = Tiny Tiny RSS is an open source web-based news feed \(RSS/Atom\) r DESCRIPTION_FRE = Tiny Tiny RSS est un agrégateur et lecteur web de flux RSS et Atom open source conçu pour vous permettre de lire des nouvelles de n\'importe quel endroit, tout en se sentant aussi proche d\'une application de bureau que possible. ADMIN_URL = /tt-rss/ DISPLAY_NAME = Tiny Tiny RSS -CHANGELOG = "1. Update Tiny Tiny RSS to Git revision c30b24d09f (20221230)
2. Fixed broken DSM 7 initial installation procedure.
3. Upgrade PHP version to 7.4" +CHANGELOG = "Update Tiny Tiny RSS to Git revision afd04d141c (20230828)" HOMEPAGE = https://tt-rss.org/ LICENSE = GPL -WIZARDS_DIR = src/wizard/ +WIZARDS_TEMPLATES_DIR = src/wizard_templates CONF_DIR = src/conf/ SERVICE_SETUP = src/service-setup.sh SYSTEM_GROUP = http -INSTALL_DEP_SERVICES = apache-web mysql -START_DEP_SERVICES = apache-web mysql - SERVICE_COMMAND = $(INSTALL_PREFIX)/bin/tt-rss-daemon POST_STRIP_TARGET = tt-rss_extra_install -PHP_EXTENSIONS = curl gd intl mysqli pdo_mysql posix +PHP_EXTENSIONS := $(shell jq -r '.webservice.services[0].php.extensions[]' src/conf/resource) override ARCH= # Due to not obvious WebStation handling requirements REQUIRED_MIN_DSM = 6.0 -INSTUNINST_RESTART_SERVICES = apache-web SPK_DEPENDS = "WebStation:PHP7.4:MariaDB10:Apache2.4" +SERVICE_USER = auto + include ../../mk/spksrc.spk.mk $(STAGING_DIR)/etc/php/conf.d/com.synocommunity.tt-rss.ini: @@ -53,10 +51,9 @@ tt-rss_extra_install: $(STAGING_DIR)/etc/php/conf.d/com.synocommunity.tt-rss.ini install -m 644 src/app/config $(STAGING_DIR)/app/config install -m 755 src/bin/tt-rss-daemon $(STAGING_DIR)/bin/tt-rss-daemon install -m 755 src/bin/virtual-php $(STAGING_DIR)/bin/virtual-php + install -m 755 src/bin/update-schema $(STAGING_DIR)/bin/update-schema ifeq ($(call version_ge, ${TCVERSION}, 7.0),1) install -m 644 src/bin/7.0/settings.sh $(STAGING_DIR)/bin/settings.sh - install -m 755 src/bin/7.0/update-schema $(STAGING_DIR)/bin/update-schema else install -m 644 src/bin/settings.sh $(STAGING_DIR)/bin/settings.sh - install -m 755 src/bin/update-schema $(STAGING_DIR)/bin/update-schema endif diff --git a/spk/tt-rss/src/bin/7.0/settings.sh b/spk/tt-rss/src/bin/7.0/settings.sh index fb2fe1a177c..b41c7b817a4 100644 --- a/spk/tt-rss/src/bin/7.0/settings.sh +++ b/spk/tt-rss/src/bin/7.0/settings.sh @@ -33,6 +33,8 @@ then chmod 770 "${LOG_FILE}" fi +PHP=/usr/local/bin/php74 + php_options() { for line in $(cat ${INSTALL_DIR}/etc/php/conf.d/com.synocommunity.tt-rss.ini) @@ -41,21 +43,6 @@ php_options() done } -# Computes the name of the PHP profile currently being used by the WebStation -guess_php_profile_name() -{ - echo -n "tt-rss" -} - -# Computes the PHP fpm binary executable -# Examples: -# - guess_php_fpm_bin -# - guess_php_fpm_bin -guess_php_fpm_bin() -{ - echo -n "/usr/local/bin/php74-fpm" -} - # Computes the PHP cli configuration file which should be used when running php code guess_php_configuration_file() { @@ -68,5 +55,5 @@ guess_php_configuration_file() # - guess_php guess_php() { - echo -n "/usr/local/bin/php74 -c $(guess_php_configuration_file)" + echo -n "${PHP} -c $(guess_php_configuration_file)" } diff --git a/spk/tt-rss/src/bin/7.0/update-schema b/spk/tt-rss/src/bin/7.0/update-schema deleted file mode 100644 index f4925d52241..00000000000 --- a/spk/tt-rss/src/bin/7.0/update-schema +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd) -source ${SCRIPT_DIR}/settings.sh - -"${SCRIPT_DIR}/virtual-php" "${WEB_DIR}/${PACKAGE}/update.php" --update-schema=force-yes diff --git a/spk/tt-rss/src/bin/settings.sh b/spk/tt-rss/src/bin/settings.sh index 344b4862c15..885d6bb498e 100644 --- a/spk/tt-rss/src/bin/settings.sh +++ b/spk/tt-rss/src/bin/settings.sh @@ -33,6 +33,9 @@ then chmod 770 "${LOG_FILE}" fi +PHP_ID=php74 +PHP="/usr/local/bin/${PHP_ID}" + php_options() { for line in $(cat ${INSTALL_DIR}/etc/php/conf.d/com.synocommunity.tt-rss.ini) @@ -41,92 +44,19 @@ php_options() done } -# Computes the name of the PHP profile currently being used by the WebStation -guess_php_profile_name() -{ - local profile_name - profile_name=$(jq -r .default.php "${WEB_STATION_HOME_DIR}/etc/WebStation.json" 2>>"${LOG_FILE}") - if [ $? -ne 0 ] - then - echo "Failed identifying php profile name." >>"${LOG_FILE}" - return 1 - fi - - if [ -z "${profile_name}" ] - then - echo "Invalid empty profile name found" >>"${LOG_FILE}" - return 2 - fi - - echo -n "${profile_name}" -} - -# Computes the PHP fpm binary executable -# Examples: -# - guess_php_fpm_bin -# - guess_php_fpm_bin -guess_php_fpm_bin() -{ - local profile_name - local profile_path - local fpm_configuration_file - local php_fpm - if [ $# -eq 0 ] - then - profile_name=$(guess_php_profile_name) - else - profile_name=$1 - fi - profile_path="${WEB_STATION_HOME_DIR}/etc/php_profile/${profile_name}" - fpm_configuration_file="${profile_path}/fpm.conf" - - if [ -f "${fpm_configuration_file}" ] - then - php_fpm=$(php -r 'print(parse_ini_file($argv[1], true)["global"]["syslog.ident"]);' "${fpm_configuration_file}" 2>>"${LOG_FILE}") - if [ $? -ne 0 ] - then - echo "Failed computing php fpm path." >>"${LOG_FILE}" - return 1 - fi - else - echo "No fpm configuration file can be found under ${fpm_configuration_file}" >>"${LOG_FILE}" - return 1 - fi - - echo -n "${php_fpm}" -} - # Computes the PHP cli configuration file which should be used when running php code -# Examples: -# - guess_php_configuration_file -# - guess_php_configuration_file php56 -# - guess_php_configuration_file php74 guess_php_configuration_file() { - local php_bin local web_station_configuration_file - local php_fpm - if [ $# -eq 0 ] - then - php_fpm="$(guess_php_fpm_bin)" - if [ -z "${php_fpm}" ] - then - echo -n "/etc/php/php.ini" - return 0 - fi - php_bin="$(echo ${php_fpm} | sed 's/-fpm//g')" - else - php_bin=$1 - fi - web_station_configuration_file="${WEB_STATION_HOME_DIR}/etc/${php_bin}/php.ini" + web_station_configuration_file="${WEB_STATION_HOME_DIR}/etc/${PHP_ID}/php.ini" if [ -f "${web_station_configuration_file}" ] then echo -n "${web_station_configuration_file}" - elif [ -f "/usr/local/etc/${php_bin}/cli/php.ini" ] + elif [ -f "/usr/local/etc/${PHP_ID}/cli/php.ini" ] then - echo -n "/usr/local/etc/${php_bin}/cli/php.ini" + echo -n "/usr/local/etc/${PHP_ID}/cli/php.ini" else - echo -n "/usr/local/etc/${php_bin}/php.ini" + echo -n "/usr/local/etc/${PHP_ID}/php.ini" fi } @@ -136,28 +66,5 @@ guess_php_configuration_file() # - guess_php guess_php() { - local profile_name - local php_fpm - local php - if [ $# -eq 0 ] - then - profile_name=$(guess_php_profile_name) - if [ $? -ne 0 ] - then - echo "Failed computing PHP profile name" >>"${LOG_FILE}" - return 1 - fi - else - profile_name=$1 - fi - - - php_fpm="$(guess_php_fpm_bin ${profile_name})" - if [ -z "${php_fpm}" ] - then - echo -n "php -c /etc/php/php.ini" - else - php="$(echo ${php_fpm} | sed 's/-fpm//g')" - echo -n "${php} -c $(guess_php_configuration_file ${php})" - fi + echo -n "${PHP} -c $(guess_php_configuration_file)" } diff --git a/spk/tt-rss/src/bin/tt-rss-daemon b/spk/tt-rss/src/bin/tt-rss-daemon index f88e690051b..a9732415ee0 100644 --- a/spk/tt-rss/src/bin/tt-rss-daemon +++ b/spk/tt-rss/src/bin/tt-rss-daemon @@ -5,4 +5,10 @@ source "${SCRIPT_DIR}/settings.sh" TTRSS="${WEB_DIR}/${PACKAGE}/update.php" -exec $(guess_php) $(php_options) ${TTRSS} --daemon >>"${LOGS_DIR}/daemon.log" 2>&1 +if [ "$(whoami)" == "root" ] +then + # tt rss should always be running as http user in pre-DSM 7 context + exec sudo -u http exec $(guess_php) $(php_options) ${TTRSS} --daemon >>"${LOGS_DIR}/daemon.log" 2>&1 +else + exec $(guess_php) $(php_options) ${TTRSS} --daemon >>"${LOGS_DIR}/daemon.log" 2>&1 +fi diff --git a/spk/tt-rss/src/bin/update-schema b/spk/tt-rss/src/bin/update-schema index 65f484ffc99..6e0f4d59d1c 100644 --- a/spk/tt-rss/src/bin/update-schema +++ b/spk/tt-rss/src/bin/update-schema @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd) -source ${SCRIPT_DIR}/settings.sh +source "${SCRIPT_DIR}/settings.sh" if [ "$(whoami)" == "root" ] then diff --git a/spk/tt-rss/src/bin/virtual-php b/spk/tt-rss/src/bin/virtual-php index f750fb623a4..777405ab7c2 100644 --- a/spk/tt-rss/src/bin/virtual-php +++ b/spk/tt-rss/src/bin/virtual-php @@ -3,4 +3,4 @@ SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd) source "${SCRIPT_DIR}/settings.sh" -$(guess_php) $(php_options) $* +exec $(guess_php) $(php_options) $* diff --git a/spk/tt-rss/src/conf/resource b/spk/tt-rss/src/conf/resource index 5dbf3522458..78882f818b1 100644 --- a/spk/tt-rss/src/conf/resource +++ b/spk/tt-rss/src/conf/resource @@ -33,6 +33,7 @@ "webservice": { "services": [{ "service": "tt-rss", + "icon": "app/images/tt-rss-{0}.png", "display_name": "Tiny Tiny RSS", "type": "apache_php", "root": "tt-rss", diff --git a/spk/tt-rss/src/service-setup.sh b/spk/tt-rss/src/service-setup.sh index 732de532cf3..bf3406ef67f 100755 --- a/spk/tt-rss/src/service-setup.sh +++ b/spk/tt-rss/src/service-setup.sh @@ -15,6 +15,10 @@ VERSION_FILE_DIRECTORY="var" VERSION_FILE="${VERSION_FILE_DIRECTORY}/version.txt" USER=http +if [ "${SYNOPKG_DSM_VERSION_MAJOR}" -lt 7 ]; then + EFF_USER=http +fi + PHP="${SYNOPKG_PKGDEST}/bin/virtual-php" MARIADB_10_INSTALL_DIRECTORY="/var/packages/MariaDB10" MARIADB_10_BIN_DIRECTORY="${MARIADB_10_INSTALL_DIRECTORY}/target/usr/local/mariadb10/bin" @@ -35,9 +39,8 @@ service_postinst () mkdir "-p" "${LOGS_DIR}" - # Setup database and configuration file + # Setup database and configuration file if [ "${SYNOPKG_PKG_STATUS}" == "INSTALL" ]; then - "${MYSQL}" -u "${MYSQL_USER}" -p"${wizard_mysql_password_root}" "${MYSQL_DATABASE}" < "${WEB_DIR}/${PACKAGE}/schema/ttrss_schema_mysql.sql" single_user_mode=$([ "${wizard_single_user}" == "true" ] && echo "true" || echo "false") ${CP} "${WEB_DIR}/${PACKAGE}/config.php-dist" "${WEB_DIR}/${PACKAGE}/config.php" { @@ -88,16 +91,19 @@ validate_preuninst () fi } -service_postuninst () +service_preuninst () { - # Export and remove database + # Export database if [ "${SYNOPKG_PKG_STATUS}" == "UNINSTALL" ]; then if [ -n "${wizard_dbexport_path}" ]; then - ${MKDIR} ${wizard_dbexport_path} - ${MYSQLDUMP} -u root -p"${wizard_mysql_password_root}" ${MYSQL_DATABASE} > ${wizard_dbexport_path}/${MYSQL_DATABASE}.sql + ${MKDIR} -p "${wizard_dbexport_path}" + ${MYSQLDUMP} -u root -p"${wizard_mysql_password_root}" "${MYSQL_DATABASE}" > "${wizard_dbexport_path}/${MYSQL_DATABASE}.sql" fi - fi + fi +} +service_postuninst () +{ if [ "${SYNOPKG_DSM_VERSION_MAJOR}" -lt 7 ]; then # Remove the web interface ${RM} ${WEB_DIR}/${PACKAGE} diff --git a/spk/tt-rss/src/wizard/7.0/install_uifile b/spk/tt-rss/src/wizard/7.0/install_uifile deleted file mode 100644 index debb458f196..00000000000 --- a/spk/tt-rss/src/wizard/7.0/install_uifile +++ /dev/null @@ -1,53 +0,0 @@ -[{ - "step_title": "Tt-rss database configuration", - "items": [{ - "type": "multiselect", - "subitems": [{ - "key": "wizard_run_migration", - "desc": "Run migration", - "defaultValue": false, - "hidden": true - }, { - "key": "wizard_create_db", - "desc": "Creates initial DB", - "defaultValue": true, - "hidden": true - }, { - "key": "mysql_grant_user", - "desc": "Configures user rights", - "defaultValue": true, - "hidden": true - }] - }, { - "type": "password", - "desc": "Enter your MySQL password.", - "subitems": [{ - "key": "wizard_mysql_password_root", - "desc": "Root password" - }] - }, { - "type": "password", - "desc": "A 'ttrss' MySQL user and database will be created. Please enter a password for the 'ttrss' user.", - "subitems": [{ - "key": "wizard_mysql_password_ttrss", - "desc": "Ttrss password" - }] - }] -}, { - "step_title": "Tt-rss configuration", - "items": [{ - "type": "textfield", - "desc": "Domain name of your DiskStation. For example: you.synology.me.", - "subitems": [{ - "key": "wizard_domain_name", - "desc": "Domain name" - }] - }, { - "type": "multiselect", - "desc": "Enable single user mode. If you do not use this mode, default login is 'admin' with password 'password'.", - "subitems": [{ - "key": "wizard_single_user", - "desc": "Singler user" - }] - }] -}] diff --git a/spk/tt-rss/src/wizard/7.0/install_uifile_fre b/spk/tt-rss/src/wizard/7.0/install_uifile_fre deleted file mode 100644 index f9e8bb220d7..00000000000 --- a/spk/tt-rss/src/wizard/7.0/install_uifile_fre +++ /dev/null @@ -1,53 +0,0 @@ -[{ - "step_title": "Configuration de la base de donnée de tt-rss", - "items": [{ - "type": "multiselect", - "subitems": [{ - "key": "wizard_run_migration", - "desc": "Run migration", - "defaultValue": false, - "hidden": true - }, { - "key": "wizard_create_db", - "desc": "Creates initial DB", - "defaultValue": true, - "hidden": true - }, { - "key": "mysql_grant_user", - "desc": "Configures user rights", - "defaultValue": true, - "hidden": true - }] - }, { - "type": "password", - "desc": "Saisissez votre mot de passe MySQL.", - "subitems": [{ - "key": "wizard_mysql_password_root", - "desc": "Mot de passe Root" - }] - }, { - "type": "password", - "desc": "Un utilisateur et une base de donnée MySQL 'ttrss' vont être créés. Saisissez un mot de passe pour l'utilisateur 'ttrss'.", - "subitems": [{ - "key": "wizard_mysql_password_ttrss", - "desc": "Mot de passe Ttrss" - }] - }] -}, { - "step_title": "Configuration de tt-rss ", - "items": [{ - "type": "textfield", - "desc": "Nom de domaine de votre DiskStation. Par exemple : vous.synology.me.", - "subitems": [{ - "key": "wizard_domain_name", - "desc": "Nom de domaine" - }] - }, { - "type": "multiselect", - "desc": "Activer le mode utilisateur unique. Si vous n'activez pas ce mode, l'utilisateur par défaut est 'admin' avec le mot de passe 'password'.", - "subitems": [{ - "key": "wizard_single_user", - "desc": "Utilisateur unique" - }] - }] -}] diff --git a/spk/tt-rss/src/wizard/7.0/upgrade_uifile_fre.sh b/spk/tt-rss/src/wizard/7.0/upgrade_uifile_fre.sh deleted file mode 100644 index 0d6c84f1ba7..00000000000 --- a/spk/tt-rss/src/wizard/7.0/upgrade_uifile_fre.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -function with_migration -{ - cat <"${SYNOPKG_TEMP_LOGFILE}" -[ { - "step_title": "Migration de la base de donnée de tt-rss", - "items": [ { - "type": "multiselect", - "subitems": [ { - "key": "wizard_run_migration", - "desc": "Run migration", - "defaultValue": true, - "hidden": true - }, { - "key": "wizard_create_db", - "desc": "Creates initial DB", - "defaultValue": false, - "hidden": true - } ] - }, { - "type": "password", - "desc": "Saisissez les mot de passes root de vos installations Maria DB:", - "subitems": [ { - "key": "wizard_mariadb5_password_root", - "desc": "Maria DB 5" - }, { - "key": "wizard_mysql_password_root", - "desc": "Maria DB 10" - } ] - }, { - "type": "password", - "desc": "Un nouvel utilisateur 'ttrss' va être créé. Saisissez un mot de passe pour l'utilisateur 'ttrss'.", - "subitems": [ { - "key": "wizard_mysql_password_ttrss", - "desc": "Mot de passe Ttrss" - } ] - } ] - } -] -EOF -} - -if [[ "$SYNOPKG_OLD_PKGVER" =~ [[:digit:]]{8}-[[:digit:]]+ ]]; then - SPK_REV="${SYNOPKG_OLD_PKGVER//[0-9]*-}" - if [[ "${SPK_REV}" -lt 15 ]]; then - with_migration - fi -else - with_migration -fi - -exit 0 \ No newline at end of file diff --git a/spk/tt-rss/src/wizard/install_uifile_fre b/spk/tt-rss/src/wizard/install_uifile_fre deleted file mode 100644 index 568dae3cef6..00000000000 --- a/spk/tt-rss/src/wizard/install_uifile_fre +++ /dev/null @@ -1,60 +0,0 @@ -[{ - "step_title": "Configuration de la base de donnée de tt-rss", - "items": [{ - "type": "multiselect", - "subitems": [{ - "key": "wizard_run_migration", - "desc": "Run migration", - "defaultValue": false, - "hidden": true - }, { - "key": "wizard_create_db", - "desc": "Creates initial DB", - "defaultValue": true, - "hidden": true - }, { - "key": "mysql_grant_user", - "desc": "Configures user rights", - "defaultValue": true, - "hidden": true - }] - }, { - "type": "password", - "desc": "Saisissez votre mot de passe MySQL.", - "subitems": [{ - "key": "wizard_mysql_password_root", - "desc": "Mot de passe Root" - }] - }, { - "type": "password", - "desc": "Un utilisateur et une base de donnée MySQL 'ttrss' vont être créés. Saisissez un mot de passe pour l'utilisateur 'ttrss'.", - "subitems": [{ - "key": "wizard_mysql_password_ttrss", - "desc": "Mot de passe Ttrss" - }] - }] -}, { - "step_title": "Configuration de tt-rss ", - "items": [{ - "type": "textfield", - "desc": "Nom de domaine de votre DiskStation. Par exemple : vous.synology.me.", - "subitems": [{ - "key": "wizard_domain_name", - "desc": "Nom de domaine" - }] - }, { - "type": "multiselect", - "desc": "Activer le mode utilisateur unique. Si vous n'activez pas ce mode, l'utilisateur par défaut est 'admin' avec le mot de passe 'password'.", - "subitems": [{ - "key": "wizard_single_user", - "desc": "Utilisateur unique" - }] - }] -}, { - "step_title": "WebStation PHP Configuration", - "items": [{ - "desc": "Tiny Tiny RSS requiert que les extensions PHP suivantes soient activées pour le profil PHP courant (configurables dans Web Station > Paramètres PHP dans l'onglet Paramètres de serveur par défaut):" - }, { - "desc": "
  • curl
  • gd
  • intl
  • mysqli
  • pdo_mysql
" - }] -}] diff --git a/spk/tt-rss/src/wizard/uninstall_uifile b/spk/tt-rss/src/wizard/uninstall_uifile deleted file mode 100644 index 4a96b27b4eb..00000000000 --- a/spk/tt-rss/src/wizard/uninstall_uifile +++ /dev/null @@ -1,27 +0,0 @@ -[{ - "step_title": "Remove ttrss database", - "items": [{ - "desc": "Attention: The ttrss database will be removed during package uninstallation. All feeds will be deleted." - }, { - "type": "password", - "desc": "Enter your MySQL password", - "subitems": [{ - "key": "wizard_mysql_password_root", - "desc": "Root password" - }] - }, { - "type": "textfield", - "desc": "Optional: Provide directory for database export. Leave blank to skip export. The directory will be created if it does not exist", - "subitems": [{ - "key": "wizard_dbexport_path", - "desc": "Database export location", - "validator": { - "allowBlank": true, - "regex": { - "expr": "/^\\\/volume[0-9]+\\\//", - "errorText": "Path should begin with /volume?/ with ? the number of the volume" - } - } - }] - }] -}] diff --git a/spk/tt-rss/src/wizard/uninstall_uifile_fre b/spk/tt-rss/src/wizard/uninstall_uifile_fre deleted file mode 100644 index bd2fc19c073..00000000000 --- a/spk/tt-rss/src/wizard/uninstall_uifile_fre +++ /dev/null @@ -1,27 +0,0 @@ -[{ - "step_title": "Suppression de la base de donnée ttrss", - "items": [{ - "desc": "Si vous supprimez la base de donnée ttrss, tous les flux seront supprimées." - }, { - "type": "password", - "desc": "Saisissez votre mot de passe MySQL", - "subitems": [{ - "key": "wizard_mysql_password_root", - "desc": "Mot de passe Root" - }] - }, { - "type": "textfield", - "desc": "Facultatif: Fournir répertoire pour l'exportation de base de données. Laissez vide pour sauter à l'exportation. Le répertoire sera créé s'il n'existe pas", - "subitems": [{ - "key": "wizard_dbexport_path", - "desc": "L'emplacement de base de données à l'exportation", - "validator": { - "allowBlank": true, - "regex": { - "expr": "/^\\\/volume[0-9]+\\\//", - "errorText": "Chemin doit commencer avec /volume?/ avec ? le numéro du volume" - } - } - }] - }] -}] diff --git a/spk/tt-rss/src/wizard/upgrade_uifile.sh b/spk/tt-rss/src/wizard/upgrade_uifile.sh deleted file mode 100644 index 3f389ad96d5..00000000000 --- a/spk/tt-rss/src/wizard/upgrade_uifile.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/bash - -function with_migration -{ - cat <"${SYNOPKG_TEMP_LOGFILE}" -[ { - "step_title": "DB Migration for tt-rss", - "items": [ { - "type": "multiselect", - "subitems": [ { - "key": "wizard_run_migration", - "desc": "Run migration", - "defaultValue": true, - "hidden": true - }, { - "key": "wizard_create_db", - "desc": "Creates initial DB", - "defaultValue": false, - "hidden": true - }, { - "key": "mysql_grant_user", - "desc": "Initializes user rights", - "defaultValue": true, - "hidden": true - } ] - }, { - "type": "password", - "desc": "Enter your respective Maria DB installation root account passwords", - "subitems": [ { - "key": "wizard_mariadb5_password_root", - "desc": "Maria DB 5", - "validator": { - "allowBlank": false - } - }, { - "key": "wizard_mysql_password_root", - "desc": "Maria DB 10", - "validator": { - "allowBlank": false - } - } ] - }, { - "type": "password", - "desc": "A new 'ttrss' user will be created. Please enter a password for the 'ttrss' user.", - "subitems": [{ - "key": "wizard_mysql_password_ttrss", - "desc": "Ttrss password" - }] - } ] - }, { - "step_title": "WebStation PHP Profile", - "items": [ { - "desc": "Tiny Tiny RSS requires the following PHP extensions to be enabled for the current PHP profile (under Web Station > PHP Settings < Default Server Settings):
  • curl
  • gd
  • intl
  • mysqli
  • pdo_mysql
" - } ] - } ] -EOF -} - -function without_migration -{ - cat <"${SYNOPKG_TEMP_LOGFILE}" -[ { - "step_title": "WebStation PHP Profile", - "items": [ { - "type": "multiselect", - "subitems": [ { - "key": "wizard_run_migration", - "desc": "Run migration", - "defaultValue": false, - "hidden": true - }, { - "key": "wizard_create_db", - "desc": "Creates initial DB", - "defaultValue": false, - "hidden": true - }, { - "key": "mysql_grant_user", - "desc": "Initializes user rights", - "defaultValue": false, - "hidden": true - } ] - }, { - "desc": "Tiny Tiny RSS requires the following PHP extensions to be enabled for the current PHP profile (under Web Station > PHP Settings < Default Server Settings):
  • curl
  • gd
  • intl
  • mysqli
  • pdo_mysql
" - } ] -} ] -EOF -} - - -if [[ "${SYNOPKG_OLD_PKGVER}" =~ [[:digit:]]{8}-[[:digit:]]+ ]]; then - SPK_REV="${SYNOPKG_OLD_PKGVER//[0-9]*-}" - if [[ "${SPK_REV}" -lt 15 ]]; then - with_migration - else - without_migration - fi -else - with_migration -fi diff --git a/spk/tt-rss/src/wizard/upgrade_uifile_fre.sh b/spk/tt-rss/src/wizard/upgrade_uifile_fre.sh deleted file mode 100644 index 5b02286c6c2..00000000000 --- a/spk/tt-rss/src/wizard/upgrade_uifile_fre.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash - -function with_migration -{ - cat <"${SYNOPKG_TEMP_LOGFILE}" -[ { - "step_title": "Migration de la base de donnée de tt-rss", - "items": [ { - "type": "multiselect", - "subitems": [ { - "key": "wizard_run_migration", - "desc": "Run migration", - "defaultValue": true, - "hidden": true - }, { - "key": "wizard_create_db", - "desc": "Creates initial DB", - "defaultValue": false, - "hidden": true - } ] - }, { - "type": "password", - "desc": "Saisissez les mot de passes root de vos installations Maria DB:", - "subitems": [ { - "key": "wizard_mariadb5_password_root", - "desc": "Maria DB 5" - }, { - "key": "wizard_mysql_password_root", - "desc": "Maria DB 10" - } ] - }, { - "type": "password", - "desc": "Un nouvel utilisateur 'ttrss' va être créé. Saisissez un mot de passe pour l'utilisateur 'ttrss'.", - "subitems": [ { - "key": "wizard_mysql_password_ttrss", - "desc": "Mot de passe Ttrss" - } ] - } ] - }, { - "step_title": "WebStation PHP Configuration", - "items": [ { - "desc": "Tiny Tiny RSS requiert que les extensions PHP suivantes soient activées pour le profil PHP courant (configurables dans Web Station > Paramètres PHP dans l'onglet Paramètres de serveur par défaut):
  • curl
  • gd
  • intl
  • mysqli
  • pdo_mysql
" - } ] - } -] -EOF -} - -function without_migration -{ - cat <"${SYNOPKG_TEMP_LOGFILE}" -[ { - "step_title": "WebStation PHP Configuration", - "items": [ { - "type": "multiselect", - "subitems": [ { - "key": "wizard_run_migration", - "desc": "Run migration", - "defaultValue": false, - "hidden": true - }, { - "key": "wizard_create_db", - "desc": "Creates initial DB", - "defaultValue": false, - "hidden": true - }, { - "key": "mysql_grant_user", - "desc": "Initializes user rights", - "defaultValue": false, - "hidden": true - } ] - }, { - "desc": "Tiny Tiny RSS requiert que les extensions PHP suivantes soient activées pour le profil PHP courant (configurables dans Web Station > Paramètres PHP dans l'onglet Paramètres de serveur par défaut):" - }, { - "desc": "
  • curl
  • gd
  • intl
  • mysqli
  • pdo_mysql
" - } ] -} ] -EOF -} - -if [[ "$SYNOPKG_OLD_PKGVER" =~ [[:digit:]]{8}-[[:digit:]]+ ]]; then - SPK_REV="${SYNOPKG_OLD_PKGVER//[0-9]*-}" - if [[ "${SPK_REV}" -lt 15 ]]; then - with_migration - else - without_migration - fi -else - with_migration -fi - -exit 0 \ No newline at end of file diff --git a/spk/tt-rss/src/wizard/install_uifile b/spk/tt-rss/src/wizard_templates/install_uifile similarity index 58% rename from spk/tt-rss/src/wizard/install_uifile rename to spk/tt-rss/src/wizard_templates/install_uifile index 5be824363d1..d8fb4737e78 100644 --- a/spk/tt-rss/src/wizard/install_uifile +++ b/spk/tt-rss/src/wizard_templates/install_uifile @@ -1,5 +1,5 @@ [{ - "step_title": "Tt-rss database configuration", + "step_title": "{{DB_CONFIGURATION_TITLE}}", "items": [{ "type": "multiselect", "subitems": [{ @@ -20,41 +20,41 @@ }] }, { "type": "password", - "desc": "Enter your MySQL password.", + "desc": "{{ENTER_MYSQL_PASSWORD}}", "subitems": [{ "key": "wizard_mysql_password_root", - "desc": "Root password" + "desc": "{{ROOT_PASSWORD}}" }] }, { "type": "password", - "desc": "A 'ttrss' MySQL user and database will be created. Please enter a password for the 'ttrss' user.", + "desc": "{{ENTER_TTRSS_PASSWORD}}", "subitems": [{ "key": "wizard_mysql_password_ttrss", - "desc": "Ttrss password" + "desc": "{{TT-RSS_PASSWORD_DESCRIPTION}}" }] }] }, { - "step_title": "Tt-rss configuration", + "step_title": "{{TT-RSS_CONFIGURATION_TITLE}}", "items": [{ "type": "textfield", - "desc": "Domain name of your DiskStation. For example: you.synology.me.", + "desc": "{{DOMAIN_NAME_SECTION_LABEL}}", "subitems": [{ "key": "wizard_domain_name", - "desc": "Domain name" + "desc": "{{DOMAIN_NAME_INPUT_LABEL}}" }] }, { "type": "multiselect", - "desc": "Enable single user mode. If you do not use this mode, default login is 'admin' with password 'password'.", + "desc": "{{SINGLE_USER_SECTION_LABEL}}", "subitems": [{ "key": "wizard_single_user", - "desc": "Singler user" + "desc": "{{SINGLE_USER_CHECKBOX_LABEL}}" }] }] -}, { - "step_title": "WebStation PHP Profile", +}{{#IS_DSM_6}}, { + "step_title": "{{WEBSTATION_PHP_PROFILE_TITLE}}", "items": [{ - "desc": "Tiny Tiny RSS requires the following PHP extensions to be enabled for the current PHP profile (under Web Station > PHP Settings in tab Default Server Settings):" + "desc": "{{{WEBSTATION_PHP_PROFILE_DESC}}}" }, { "desc": "
  • curl
  • gd
  • intl
  • mysqli
  • pdo_mysql
" }] -}] +}{{/IS_DSM_6}}] diff --git a/spk/tt-rss/src/wizard_templates/install_uifile.yml b/spk/tt-rss/src/wizard_templates/install_uifile.yml new file mode 100644 index 00000000000..af421efe865 --- /dev/null +++ b/spk/tt-rss/src/wizard_templates/install_uifile.yml @@ -0,0 +1,12 @@ +DB_CONFIGURATION_TITLE: Tt-rss database configuration +ENTER_MYSQL_PASSWORD: Enter your MySQL password. +ROOT_PASSWORD: Root password +ENTER_TT-RSS_PASSWORD: A 'ttrss' MySQL user and database will be created. Please enter a password for the 'ttrss' user. +TT-RSS_PASSWORD_DESCRIPTION: Ttrss password +TT-RSS_CONFIGURATION_TITLE: Tt-rss configuration +DOMAIN_NAME_SECTION_LABEL: "Domain name of your DiskStation. For example: you.synology.me." +DOMAIN_NAME_INPUT_LABEL: Domain name +SINGLE_USER_SECTION_LABEL: Enable single user mode. If you do not use this mode, default login is 'admin' with password 'password'. +SINGLE_USER_CHECKBOX_LABEL: Single user +WEBSTATION_PHP_PROFILE_TITLE: WebStation PHP Profile +WEBSTATION_PHP_PROFILE_DESC: "Tiny Tiny RSS requires the following PHP extensions to be enabled for the current PHP profile (under Web Station > PHP Settings in tab Default Server Settings):" diff --git a/spk/tt-rss/src/wizard_templates/install_uifile_fre.yml b/spk/tt-rss/src/wizard_templates/install_uifile_fre.yml new file mode 100644 index 00000000000..ecae4de4ccb --- /dev/null +++ b/spk/tt-rss/src/wizard_templates/install_uifile_fre.yml @@ -0,0 +1,12 @@ +DB_CONFIGURATION_TITLE: Configuration de la base de donnée de tt-rss +ENTER_MYSQL_PASSWORD: Saisissez votre mot de passe MySQL. +ROOT_PASSWORD: Mot de passe Root +ENTER_TT-RSS_PASSWORD: Un utilisateur et une base de donnée MySQL 'ttrss' vont être créés. Saisissez un mot de passe pour l'utilisateur 'ttrss'. +TT-RSS_PASSWORD_DESCRIPTION: Mot de passe Ttrss +TT-RSS_CONFIGURATION_TITLE: Tt-rss configuration +DOMAIN_NAME_SECTION_LABEL: "Nom de domaine de votre DiskStation. Par exemple : vous.synology.me." +DOMAIN_NAME_INPUT_LABEL: Nom de domaine +SINGLE_USER_SECTION_LABEL: Activer le mode utilisateur unique. Si vous n'activez pas ce mode, l'utilisateur par défaut est 'admin' avec le mot de passe 'password'. +SINGLE_USER_CHECKBOX_LABEL: Utilisateur unique +WEBSTATION_PHP_PROFILE_TITLE: WebStation PHP Configuration +WEBSTATION_PHP_PROFILE_DESC: "Tiny Tiny RSS requiert que les extensions PHP suivantes soient activées pour le profil PHP courant (configurables dans Web Station > Paramètres PHP dans l'onglet Paramètres de serveur par défaut):" diff --git a/spk/tt-rss/src/wizard_templates/uninstall_uifile b/spk/tt-rss/src/wizard_templates/uninstall_uifile new file mode 100644 index 00000000000..8939f52a04b --- /dev/null +++ b/spk/tt-rss/src/wizard_templates/uninstall_uifile @@ -0,0 +1,27 @@ +[{ + "step_title": "{{REMOVE_TT_RSS_TITLE}}", + "items": [{ + "desc": "{{REMOVE_TT_RSS_DESC}}" + }, { + "type": "password", + "desc": "{{ENTER_MYSQL_PASSWORD_DESC}}", + "subitems": [{ + "key": "wizard_mysql_password_root", + "desc": "{{ROOT_PASSWORD}}" + }] + }, { + "type": "textfield", + "desc": "{{DB_EXPORT_DESCRIPTION}}", + "subitems": [{ + "key": "wizard_dbexport_path", + "desc": "{{{DB_EXPORT_LOCATION_LABEL}}}", + "validator": { + "allowBlank": true, + "regex": { + "expr": "/^\\\/volume[0-9]+\\\//", + "errorText": "{{{DB_EXPORT_LOCATION_FORMAT_ERROR}}}" + } + } + }] + }] +}] diff --git a/spk/tt-rss/src/wizard_templates/uninstall_uifile.yml b/spk/tt-rss/src/wizard_templates/uninstall_uifile.yml new file mode 100644 index 00000000000..82dba90a6a4 --- /dev/null +++ b/spk/tt-rss/src/wizard_templates/uninstall_uifile.yml @@ -0,0 +1,7 @@ +REMOVE_TT_RSS_TITLE: Remove ttrss database +REMOVE_TT_RSS_DESC: "Attention: The ttrss database will be removed during package uninstallation. All feeds will be deleted." +ENTER_MYSQL_PASSWORD_DESC: "Enter your MySQL password" +ROOT_PASSWORD: Root password +DB_EXPORT_DESCRIPTION: "Optional: Provide directory for database export. Leave blank to skip export. The directory will be created if it does not exist" +DB_EXPORT_LOCATION_LABEL: Database export location +DB_EXPORT_LOCATION_FORMAT_ERROR: Path should begin with /volume?/ with ? the number of the volume diff --git a/spk/tt-rss/src/wizard_templates/uninstall_uifile_fre.yml b/spk/tt-rss/src/wizard_templates/uninstall_uifile_fre.yml new file mode 100644 index 00000000000..25f9c78aef0 --- /dev/null +++ b/spk/tt-rss/src/wizard_templates/uninstall_uifile_fre.yml @@ -0,0 +1,7 @@ +REMOVE_TT_RSS_TITLE: Suppression de la base de donnée ttrss +REMOVE_TT_RSS_DESC: "Si vous supprimez la base de donnée ttrss, tous les flux seront supprimées." +ENTER_MYSQL_PASSWORD_DESC: "Saisissez votre mot de passe MySQL" +ROOT_PASSWORD: Mot de passe Root +DB_EXPORT_DESCRIPTION: "Facultatif: Fournir répertoire pour l'exportation de base de données. Laissez vide pour sauter à l'exportation. Le répertoire sera créé s'il n'existe pas" +DB_EXPORT_LOCATION_LABEL: L'emplacement de base de données à l'exportation +DB_EXPORT_LOCATION_FORMAT_ERROR: Chemin doit commencer avec /volume?/ avec ? le numéro du volume diff --git a/spk/tt-rss/src/wizard/7.0/upgrade_uifile.sh b/spk/tt-rss/src/wizard_templates/upgrade_uifile.sh similarity index 70% rename from spk/tt-rss/src/wizard/7.0/upgrade_uifile.sh rename to spk/tt-rss/src/wizard_templates/upgrade_uifile.sh index 9ac246faba9..131f7153493 100644 --- a/spk/tt-rss/src/wizard/7.0/upgrade_uifile.sh +++ b/spk/tt-rss/src/wizard_templates/upgrade_uifile.sh @@ -4,7 +4,7 @@ function with_migration { cat <"${SYNOPKG_TEMP_LOGFILE}" [ { - "step_title": "DB Migration for tt-rss", + "step_title": "{{DB_MIGRATION_TITLE}}", "items": [ { "type": "multiselect", "subitems": [ { @@ -25,7 +25,7 @@ function with_migration } ] }, { "type": "password", - "desc": "Enter your respective Maria DB installation root account passwords", + "desc": "{{ROOT_PASSWORD_INPUT_DESCRIPTIONS}}", "subitems": [ { "key": "wizard_mariadb5_password_root", "desc": "Maria DB 5", @@ -41,13 +41,20 @@ function with_migration } ] }, { "type": "password", - "desc": "A new 'ttrss' user will be created. Please enter a password for the 'ttrss' user.", + "desc": "{{ENTER_TT-RSS_PASSWORD}}", "subitems": [{ "key": "wizard_mysql_password_ttrss", - "desc": "Ttrss password" + "desc": "{{TT-RSS_PASSWORD_DESCRIPTION}}" }] } ] - }] + }, { + "step_title": "{{WEBSTATION_PHP_PROFILE_TITLE}}", + "items": [ { + "desc": "{{{WEBSTATION_PHP_PROFILE_DESC}}}" + }, { + "desc": "
  • curl
  • gd
  • intl
  • mysqli
  • pdo_mysql
" + } ] + } ] EOF } @@ -55,7 +62,7 @@ function without_migration { cat <"${SYNOPKG_TEMP_LOGFILE}" [ { - "step_title": "WebStation PHP Profile", + "step_title": "{{WEBSTATION_PHP_PROFILE_TITLE}}", "items": [ { "type": "multiselect", "subitems": [ { @@ -74,6 +81,8 @@ function without_migration "defaultValue": false, "hidden": true } ] + }, { + "desc": "{{{WEBSTATION_PHP_PROFILE_DESC}}}
  • curl
  • gd
  • intl
  • mysqli
  • pdo_mysql
" } ] } ] EOF diff --git a/spk/tt-rss/src/wizard_templates/upgrade_uifile.yml b/spk/tt-rss/src/wizard_templates/upgrade_uifile.yml new file mode 100644 index 00000000000..27368ef2743 --- /dev/null +++ b/spk/tt-rss/src/wizard_templates/upgrade_uifile.yml @@ -0,0 +1,6 @@ +DB_MIGRATION_TITLE: DB Migration for tt-rss +ROOT_PASSWORD_INPUT_DESCRIPTIONS: Enter your respective Maria DB installation root account passwords +ENTER_TT-RSS_PASSWORD: A 'ttrss' MySQL user and database will be created. Please enter a password for the 'ttrss' user. +TT-RSS_PASSWORD_DESCRIPTION: Ttrss password +WEBSTATION_PHP_PROFILE_TITLE: WebStation PHP Profile +WEBSTATION_PHP_PROFILE_DESC: "Tiny Tiny RSS requires the following PHP extensions to be enabled for the current PHP profile (under Web Station > PHP Settings in tab Default Server Settings):" diff --git a/spk/tt-rss/src/wizard_templates/upgrade_uifile_fre.yml b/spk/tt-rss/src/wizard_templates/upgrade_uifile_fre.yml new file mode 100644 index 00000000000..2a42f702b08 --- /dev/null +++ b/spk/tt-rss/src/wizard_templates/upgrade_uifile_fre.yml @@ -0,0 +1,6 @@ +DB_MIGRATION_TITLE: Migration de la base de donnée de tt-rss +ROOT_PASSWORD_INPUT_DESCRIPTIONS: "Saisissez les mot de passes root de vos installations Maria DB:" +ENTER_TT-RSS_PASSWORD: Un nouvel utilisateur 'ttrss' va être créé. Saisissez un mot de passe pour l'utilisateur 'ttrss'. +TT-RSS_PASSWORD_DESCRIPTION: Mot de passe Ttrss +WEBSTATION_PHP_PROFILE_TITLE: WebStation PHP Configuration +WEBSTATION_PHP_PROFILE_DESC: "Tiny Tiny RSS requiert que les extensions PHP suivantes soient activées pour le profil PHP courant (configurables dans Web Station > Paramètres PHP dans l'onglet Paramètres de serveur par défaut):"