mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
php 7.3 -> 7.4
This commit is contained in:
parent
0659667590
commit
1f284d74c4
9 changed files with 29 additions and 26 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
readonly YNH_DEFAULT_PHP_VERSION=7.3
|
||||
readonly YNH_DEFAULT_PHP_VERSION=7.4
|
||||
# Declare the actual PHP version to use.
|
||||
# A packager willing to use another version of PHP can override the variable into its _common.sh.
|
||||
YNH_PHP_VERSION=${YNH_PHP_VERSION:-$YNH_DEFAULT_PHP_VERSION}
|
||||
|
|
|
@ -53,8 +53,8 @@ Pin-Priority: -1
|
|||
do_post_regen() {
|
||||
regen_conf_files=$1
|
||||
|
||||
# Make sure php7.3 is the default version when using php in cli
|
||||
update-alternatives --set php /usr/bin/php7.3
|
||||
# Make sure php7.4 is the default version when using php in cli
|
||||
update-alternatives --set php /usr/bin/php7.4
|
||||
}
|
||||
|
||||
FORCE=${2:-0}
|
||||
|
|
|
@ -22,9 +22,9 @@ nginx:
|
|||
test_conf: nginx -t
|
||||
needs_exposed_ports: [80, 443]
|
||||
category: web
|
||||
php7.3-fpm:
|
||||
log: /var/log/php7.3-fpm.log
|
||||
test_conf: php-fpm7.3 --test
|
||||
php7.4-fpm:
|
||||
log: /var/log/php7.4-fpm.log
|
||||
test_conf: php-fpm7.4 --test
|
||||
category: web
|
||||
postfix:
|
||||
log: [/var/log/mail.log,/var/log/mail.err]
|
||||
|
|
|
@ -572,7 +572,7 @@
|
|||
"migration_description_0015_migrate_to_buster": "Actualitza els sistema a Debian Buster i YunoHost 4.x",
|
||||
"regenconf_need_to_explicitly_specify_ssh": "La configuració ssh ha estat modificada manualment, però heu d'especificar explícitament la categoria «ssh» amb --force per fer realment els canvis.",
|
||||
"migration_0015_weak_certs": "S'han trobat els següents certificats que encara utilitzen algoritmes de signatura febles i s'han d'actualitzar per a ser compatibles amb la propera versió de nginx: {certs}",
|
||||
"service_description_php7.3-fpm": "Executa aplicacions escrites en PHP amb NGINX",
|
||||
"service_description_php7.4-fpm": "Executa aplicacions escrites en PHP amb NGINX",
|
||||
"migration_0018_failed_to_reset_legacy_rules": "No s'ha pogut restaurar les regles legacy iptables: {error}",
|
||||
"migration_0018_failed_to_migrate_iptables_rules": "No s'ha pogut migrar les regles legacy iptables a nftables: {error}",
|
||||
"migration_0017_not_enough_space": "Feu suficient espai disponible en {path} per a realitzar la migració.",
|
||||
|
|
|
@ -562,7 +562,7 @@
|
|||
"service_description_metronome": "Manage XMPP instant messaging accounts",
|
||||
"service_description_mysql": "Stores app data (SQL database)",
|
||||
"service_description_nginx": "Serves or provides access to all the websites hosted on your server",
|
||||
"service_description_php7.3-fpm": "Runs apps written in PHP with NGINX",
|
||||
"service_description_php7.4-fpm": "Runs apps written in PHP with NGINX",
|
||||
"service_description_postfix": "Used to send and receive e-mails",
|
||||
"service_description_redis-server": "A specialized database used for rapid data access, task queue, and communication between programs",
|
||||
"service_description_rspamd": "Filters spam, and other e-mail related features",
|
||||
|
|
|
@ -574,7 +574,7 @@
|
|||
"migration_0015_weak_certs": "Il a été constaté que les certificats suivants utilisent encore des algorithmes de signature peu robustes et doivent être mis à jour pour être compatibles avec la prochaine version de NGINX : {certs}",
|
||||
"global_settings_setting_backup_compress_tar_archives": "Compresser les archives (.tar.gz) au lieu des archives non-compressées lors de la création des backups. N.B. : activer cette option permet d'obtenir des sauvegardes plus légères, mais leur création sera significativement plus longue et plus gourmande en CPU.",
|
||||
"migration_description_0018_xtable_to_nftable": "Migrer les anciennes règles de trafic réseau vers le nouveau système basé sur nftables",
|
||||
"service_description_php7.3-fpm": "Exécute les applications écrites en PHP avec NGINX",
|
||||
"service_description_php7.4-fpm": "Exécute les applications écrites en PHP avec NGINX",
|
||||
"migration_0018_failed_to_reset_legacy_rules": "La réinitialisation des règles iptable par défaut a échoué : {error}",
|
||||
"migration_0018_failed_to_migrate_iptables_rules": "Échec de la migration des anciennes règles iptables vers nftables : {error}",
|
||||
"migration_0017_not_enough_space": "Laissez suffisamment d'espace disponible dans {path} avant de lancer la migration.",
|
||||
|
|
|
@ -424,7 +424,7 @@
|
|||
"service_description_rspamd": "Filtra SPAM, e altre funzionalità legate alle mail",
|
||||
"service_description_redis-server": "Un database specializzato usato per un veloce accesso ai dati, task queue, e comunicazioni tra programmi",
|
||||
"service_description_postfix": "Usato per inviare e ricevere email",
|
||||
"service_description_php7.3-fpm": "Esegue app scritte in PHP con NGINX",
|
||||
"service_description_php7.4-fpm": "Esegue app scritte in PHP con NGINX",
|
||||
"service_description_nginx": "Serve o permette l'accesso a tutti i siti pubblicati sul tuo server",
|
||||
"service_description_mysql": "Memorizza i dati delle app (database SQL)",
|
||||
"service_description_metronome": "Gestisce gli account di messaggistica instantanea XMPP",
|
||||
|
|
|
@ -3410,10 +3410,10 @@ def _assert_system_is_sane_for_app(manifest, when):
|
|||
|
||||
services = manifest.get("services", [])
|
||||
|
||||
# Some apps use php-fpm or php5-fpm which is now php7.0-fpm
|
||||
# Some apps use php-fpm, php5-fpm or php7.x-fpm which is now php7.4-fpm
|
||||
def replace_alias(service):
|
||||
if service in ["php-fpm", "php5-fpm", "php7.0-fpm"]:
|
||||
return "php7.3-fpm"
|
||||
if service in ["php-fpm", "php5-fpm", "php7.0-fpm", "php7.3-fpm"]:
|
||||
return "php7.4-fpm"
|
||||
else:
|
||||
return service
|
||||
|
||||
|
@ -3422,7 +3422,7 @@ def _assert_system_is_sane_for_app(manifest, when):
|
|||
# We only check those, mostly to ignore "custom" services
|
||||
# (added by apps) and because those are the most popular
|
||||
# services
|
||||
service_filter = ["nginx", "php7.3-fpm", "mysql", "postfix"]
|
||||
service_filter = ["nginx", "php7.4-fpm", "mysql", "postfix"]
|
||||
services = [str(s) for s in services if s in service_filter]
|
||||
|
||||
if "nginx" not in services:
|
||||
|
@ -3465,19 +3465,22 @@ def _assert_system_is_sane_for_app(manifest, when):
|
|||
|
||||
|
||||
LEGACY_PHP_VERSION_REPLACEMENTS = [
|
||||
("/etc/php5", "/etc/php/7.3"),
|
||||
("/etc/php/7.0", "/etc/php/7.3"),
|
||||
("/var/run/php5-fpm", "/var/run/php/php7.3-fpm"),
|
||||
("/var/run/php/php7.0-fpm", "/var/run/php/php7.3-fpm"),
|
||||
("php5", "php7.3"),
|
||||
("php7.0", "php7.3"),
|
||||
("/etc/php5", "/etc/php/7.4"),
|
||||
("/etc/php/7.0", "/etc/php/7.4"),
|
||||
("/etc/php/7.3", "/etc/php/7.4"),
|
||||
("/var/run/php5-fpm", "/var/run/php/php7.4-fpm"),
|
||||
("/var/run/php/php7.0-fpm", "/var/run/php/php7.4-fpm"),
|
||||
("/var/run/php/php7.3-fpm", "/var/run/php/php7.4-fpm"),
|
||||
("php5", "php7.4"),
|
||||
("php7.0", "php7.4"),
|
||||
("php7.3", "php7.4"),
|
||||
(
|
||||
'phpversion="${phpversion:-7.0}"',
|
||||
'phpversion="${phpversion:-7.3}"',
|
||||
'phpversion="${phpversion:-7.4}"',
|
||||
), # Many helpers like the composer ones use 7.0 by default ...
|
||||
(
|
||||
'"$phpversion" == "7.0"',
|
||||
'$(bc <<< "$phpversion >= 7.3") -eq 1',
|
||||
'$(bc <<< "$phpversion >= 7.4") -eq 1',
|
||||
), # patch ynh_install_php to refuse installing/removing php <= 7.3
|
||||
]
|
||||
|
||||
|
@ -3514,11 +3517,11 @@ def _patch_legacy_php_versions_in_settings(app_folder):
|
|||
settings = read_yaml(os.path.join(app_folder, "settings.yml"))
|
||||
|
||||
if settings.get("fpm_config_dir") == "/etc/php/7.0/fpm":
|
||||
settings["fpm_config_dir"] = "/etc/php/7.3/fpm"
|
||||
settings["fpm_config_dir"] = "/etc/php/7.4/fpm"
|
||||
if settings.get("fpm_service") == "php7.0-fpm":
|
||||
settings["fpm_service"] = "php7.3-fpm"
|
||||
settings["fpm_service"] = "php7.4-fpm"
|
||||
if settings.get("phpversion") == "7.0":
|
||||
settings["phpversion"] = "7.3"
|
||||
settings["phpversion"] = "7.4"
|
||||
|
||||
# We delete these checksums otherwise the file will appear as manually modified
|
||||
list_to_remove = ["checksum__etc_php_7.0_fpm_pool", "checksum__etc_nginx_conf.d"]
|
||||
|
|
|
@ -1183,7 +1183,7 @@ class RestoreManager:
|
|||
|
||||
def _patch_legacy_php_versions_in_csv_file(self):
|
||||
"""
|
||||
Apply dirty patch to redirect php5 and php7.0 files to php7.3
|
||||
Apply dirty patch to redirect php5 and php7.0 files to php7.4
|
||||
"""
|
||||
|
||||
backup_csv = os.path.join(self.work_dir, "backup.csv")
|
||||
|
|
Loading…
Add table
Reference in a new issue