mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge branch 'dev' into migrate-to-bookworm
This commit is contained in:
commit
b289de3eca
22 changed files with 74 additions and 47 deletions
8
debian/changelog
vendored
8
debian/changelog
vendored
|
@ -1,3 +1,11 @@
|
||||||
|
yunohost (11.2.20.2) stable; urgency=low
|
||||||
|
|
||||||
|
- Fix service enable/disable auto-ignoring diagnosis entries ([#1886](http://github.com/YunoHost/yunohost/pull/1886))
|
||||||
|
|
||||||
|
Thanks to all contributors <3 ! (OniriCorpe)
|
||||||
|
|
||||||
|
-- Alexandre Aubin <alex.aubin@mailoo.org> Wed, 03 Jul 2024 21:51:50 +0200
|
||||||
|
|
||||||
yunohost (11.2.20.1) stable; urgency=low
|
yunohost (11.2.20.1) stable; urgency=low
|
||||||
|
|
||||||
- helpers2.1: typo (1ed56952e)
|
- helpers2.1: typo (1ed56952e)
|
||||||
|
|
2
debian/control
vendored
2
debian/control
vendored
|
@ -28,7 +28,7 @@ Depends: ${python3:Depends}, ${misc:Depends}
|
||||||
, redis-server
|
, redis-server
|
||||||
, acl
|
, acl
|
||||||
, git, curl, wget, cron, unzip, jq, bc, at, procps, j2cli
|
, git, curl, wget, cron, unzip, jq, bc, at, procps, j2cli
|
||||||
, lsb-release, haveged, fake-hwclock, equivs, lsof, whois
|
, lsb-release, haveged, fake-hwclock, lsof, whois
|
||||||
Recommends: yunohost-admin
|
Recommends: yunohost-admin
|
||||||
, ntp, inetutils-ping | iputils-ping
|
, ntp, inetutils-ping | iputils-ping
|
||||||
, bash-completion, rsyslog
|
, bash-completion, rsyslog
|
||||||
|
|
|
@ -186,21 +186,19 @@ ynh_package_install_from_equivs() {
|
||||||
|
|
||||||
# Build and install the package
|
# Build and install the package
|
||||||
local TMPDIR=$(mktemp --directory)
|
local TMPDIR=$(mktemp --directory)
|
||||||
|
mkdir -p ${TMPDIR}/${pkgname}/DEBIAN/
|
||||||
# Make sure to delete the legacy compat file
|
|
||||||
# It's now handle somewhat magically through the control file
|
|
||||||
rm -f /usr/share/equivs/template/debian/compat
|
|
||||||
|
|
||||||
# Note that the cd executes into a sub shell
|
# Note that the cd executes into a sub shell
|
||||||
# Create a fake deb package with equivs-build and the given control file
|
# Create a fake deb package with equivs-build and the given control file
|
||||||
# Install the fake package without its dependencies with dpkg
|
# Install the fake package without its dependencies with dpkg
|
||||||
# Install missing dependencies with ynh_package_install
|
# Install missing dependencies with ynh_package_install
|
||||||
ynh_wait_dpkg_free
|
ynh_wait_dpkg_free
|
||||||
cp "$controlfile" "${TMPDIR}/control"
|
cp "$controlfile" "${TMPDIR}/${pkgname}/DEBIAN/control"
|
||||||
(
|
(
|
||||||
cd "$TMPDIR"
|
cd "$TMPDIR"
|
||||||
LC_ALL=C equivs-build ./control 2>&1
|
# Install the fake package without its dependencies with dpkg --force-depends
|
||||||
LC_ALL=C dpkg --force-depends --install "./${pkgname}_${pkgversion}_all.deb" 2>&1 | tee ./dpkg_log
|
LC_ALL=C dpkg-deb --build ${pkgname} ${pkgname}.deb > ./dpkg_log 2>&1 || { cat ./dpkg_log; false; }
|
||||||
|
LC_ALL=C dpkg --force-depends --install "./${pkgname}.deb" 2>&1 | tee ./dpkg_log
|
||||||
)
|
)
|
||||||
|
|
||||||
ynh_package_install --fix-broken \
|
ynh_package_install --fix-broken \
|
||||||
|
@ -323,6 +321,7 @@ Package: ${dep_app}-ynh-deps
|
||||||
Version: ${version}
|
Version: ${version}
|
||||||
Depends: ${dependencies}
|
Depends: ${dependencies}
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
Maintainer: root@localhost
|
||||||
Description: Fake package for ${app} (YunoHost app) dependencies
|
Description: Fake package for ${app} (YunoHost app) dependencies
|
||||||
This meta-package is only responsible of installing its dependencies.
|
This meta-package is only responsible of installing its dependencies.
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -90,27 +90,25 @@ ynh_apt_install_dependencies() {
|
||||||
dependencies="$current_dependencies, $dependencies"
|
dependencies="$current_dependencies, $dependencies"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# #############################
|
# ################
|
||||||
# Actual install using equivs #
|
# Actual install #
|
||||||
# #############################
|
# ################
|
||||||
|
|
||||||
# Prepare the virtual-dependency control file for equivs
|
# Prepare the virtual-dependency control file for dpkg-deb --build
|
||||||
local TMPDIR=$(mktemp --directory)
|
local TMPDIR=$(mktemp --directory)
|
||||||
cat >${TMPDIR}/control <<EOF # Make a control file for equivs-build
|
mkdir -p ${TMPDIR}/${app_ynh_deps}/DEBIAN
|
||||||
|
cat >${TMPDIR}/${app_ynh_deps}/DEBIAN/control <<EOF
|
||||||
Section: misc
|
Section: misc
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Package: ${app_ynh_deps}
|
Package: ${app_ynh_deps}
|
||||||
Version: ${version}
|
Version: ${version}
|
||||||
Depends: ${dependencies}
|
Depends: ${dependencies}
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
Maintainer: root@localhost
|
||||||
Description: Fake package for ${app} (YunoHost app) dependencies
|
Description: Fake package for ${app} (YunoHost app) dependencies
|
||||||
This meta-package is only responsible of installing its dependencies.
|
This meta-package is only responsible of installing its dependencies.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Make sure to delete equivs' legacy compat file
|
|
||||||
# It's now handle somewhat magically through the control file
|
|
||||||
rm -f /usr/share/equivs/template/debian/compat
|
|
||||||
|
|
||||||
_ynh_apt update
|
_ynh_apt update
|
||||||
|
|
||||||
_ynh_wait_dpkg_free
|
_ynh_wait_dpkg_free
|
||||||
|
@ -119,8 +117,8 @@ EOF
|
||||||
# NB: this is in a subshell (though not sure why exactly not just use pushd/popd...)
|
# NB: this is in a subshell (though not sure why exactly not just use pushd/popd...)
|
||||||
cd "$TMPDIR"
|
cd "$TMPDIR"
|
||||||
# Install the fake package without its dependencies with dpkg --force-depends
|
# Install the fake package without its dependencies with dpkg --force-depends
|
||||||
LC_ALL=C equivs-build ./control > ./equivs_log 2>&1 || { cat ./equivs_log; false; }
|
LC_ALL=C dpkg-deb --build ${app_ynh_deps} ${app_ynh_deps}.deb > ./dpkg_log 2>&1 || { cat ./dpkg_log; false; }
|
||||||
LC_ALL=C dpkg --force-depends --install "./${app_ynh_deps}_${version}_all.deb" > ./dpkg_log 2>&1
|
LC_ALL=C dpkg --force-depends --install "./${app_ynh_deps}.deb" > ./dpkg_log 2>&1
|
||||||
)
|
)
|
||||||
|
|
||||||
# Then install the missing dependencies with apt install
|
# Then install the missing dependencies with apt install
|
||||||
|
|
|
@ -248,6 +248,13 @@
|
||||||
"diagnosis_http_special_use_tld": "Domain {domain} is based on a special-use top-level domain (TLD) such as .local or .test and is therefore not expected to be exposed outside the local network.",
|
"diagnosis_http_special_use_tld": "Domain {domain} is based on a special-use top-level domain (TLD) such as .local or .test and is therefore not expected to be exposed outside the local network.",
|
||||||
"diagnosis_http_timeout": "Timed-out while trying to contact your server from the outside. It appears to be unreachable.<br>1. The most common cause for this issue is that port 80 (and 443) <a href='https://yunohost.org/isp_box_config'>are not correctly forwarded to your server</a>.<br>2. You should also make sure that the service nginx is running<br>3. On more complex setups: make sure that no firewall or reverse-proxy is interfering.",
|
"diagnosis_http_timeout": "Timed-out while trying to contact your server from the outside. It appears to be unreachable.<br>1. The most common cause for this issue is that port 80 (and 443) <a href='https://yunohost.org/isp_box_config'>are not correctly forwarded to your server</a>.<br>2. You should also make sure that the service nginx is running<br>3. On more complex setups: make sure that no firewall or reverse-proxy is interfering.",
|
||||||
"diagnosis_http_unreachable": "Domain {domain} appears unreachable through HTTP from outside the local network.",
|
"diagnosis_http_unreachable": "Domain {domain} appears unreachable through HTTP from outside the local network.",
|
||||||
|
"diagnosis_ignore_already_filtered": "(There is already a diagnosis {category} filter with these criterias)",
|
||||||
|
"diagnosis_ignore_criteria_error": "Criterias should be of the form key=value (e.g. domain=yolo.test)",
|
||||||
|
"diagnosis_ignore_filter_added": "Added a {category} diagnosis filter",
|
||||||
|
"diagnosis_ignore_filter_removed": "Removed a {category} diagnosis filter",
|
||||||
|
"diagnosis_ignore_missing_criteria": "You should provide at least one criteria being the diagnosis category to ignore",
|
||||||
|
"diagnosis_ignore_no_filter_found": "(There is no such diagnosis {category} filter with these criterias to remove)",
|
||||||
|
"diagnosis_ignore_no_issue_found": "No issues was found matching the given criteria.",
|
||||||
"diagnosis_ignored_issues": "(+ {nb_ignored} ignored issue(s))",
|
"diagnosis_ignored_issues": "(+ {nb_ignored} ignored issue(s))",
|
||||||
"diagnosis_ip_broken_dnsresolution": "Domain name resolution seems to be broken for some reason… Is a firewall blocking DNS requests?",
|
"diagnosis_ip_broken_dnsresolution": "Domain name resolution seems to be broken for some reason… Is a firewall blocking DNS requests?",
|
||||||
"diagnosis_ip_broken_resolvconf": "Domain name resolution seems to be broken on your server, which seems related to <code>/etc/resolv.conf</code> not pointing to <code>127.0.0.1</code>.",
|
"diagnosis_ip_broken_resolvconf": "Domain name resolution seems to be broken on your server, which seems related to <code>/etc/resolv.conf</code> not pointing to <code>127.0.0.1</code>.",
|
||||||
|
|
|
@ -781,5 +781,12 @@
|
||||||
"log_dyndns_unsubscribe": "Se désabonner d'un sous-domaine YunoHost '{}'",
|
"log_dyndns_unsubscribe": "Se désabonner d'un sous-domaine YunoHost '{}'",
|
||||||
"dyndns_too_many_requests": "Le service dyndns de YunoHost a reçu trop de requêtes/demandes de votre part, attendez environ 1 heure avant de réessayer.",
|
"dyndns_too_many_requests": "Le service dyndns de YunoHost a reçu trop de requêtes/demandes de votre part, attendez environ 1 heure avant de réessayer.",
|
||||||
"ask_dyndns_recovery_password_explain_unavailable": "Ce domaine DynDNS est déjà enregistré. Si vous êtes la personne qui a enregistré ce domaine lors de sa création, vous pouvez entrer le mot de passe de récupération pour récupérer ce domaine.",
|
"ask_dyndns_recovery_password_explain_unavailable": "Ce domaine DynDNS est déjà enregistré. Si vous êtes la personne qui a enregistré ce domaine lors de sa création, vous pouvez entrer le mot de passe de récupération pour récupérer ce domaine.",
|
||||||
"global_settings_setting_ssh_port_help": "Il est préférable d'utiliser un port inférieur à 1024 pour éviter les tentatives d'usurpation par des services non administrateurs sur la machine distante. Vous devez également éviter d'utiliser un port déjà utilisé tel que le 80 ou le 443."
|
"global_settings_setting_ssh_port_help": "Il est préférable d'utiliser un port inférieur à 1024 pour éviter les tentatives d'usurpation par des services non administrateurs sur la machine distante. Vous devez également éviter d'utiliser un port déjà utilisé tel que le 80 ou le 443.",
|
||||||
|
"diagnosis_ignore_already_filtered": "(Il y a déjà un filtre de diagnostic {category} qui correspond à ces critères)",
|
||||||
|
"diagnosis_ignore_no_filter_found": "(Il n'y pas de filtre de diagnostic pour la catégorie {category} qui correspond à ces critères)",
|
||||||
|
"diagnosis_ignore_filter_added": "Filtre de diagnostic pour {category} ajouté",
|
||||||
|
"diagnosis_ignore_filter_removed": "Filtre de diagnostic pour {category} supprimé",
|
||||||
|
"diagnosis_ignore_missing_criteria": "Vous devez fournir au moins un critère qui est une catégorie de diagnostic à ignorer",
|
||||||
|
"diagnosis_ignore_criteria_error": "Les critères doivent être sous la forme de clé=valeur (ex. domain=yolo.test)",
|
||||||
|
"diagnosis_ignore_no_issue_found": "Aucun problème correspondant au critère donné n'a été trouvé."
|
||||||
}
|
}
|
|
@ -328,5 +328,17 @@
|
||||||
"global_settings_setting_smtp_allow_ipv6_help": "Разрешить использование IPv6 для получения и отправки почты",
|
"global_settings_setting_smtp_allow_ipv6_help": "Разрешить использование IPv6 для получения и отправки почты",
|
||||||
"admins": "Администраторы",
|
"admins": "Администраторы",
|
||||||
"all_users": "Все пользователи YunoHost",
|
"all_users": "Все пользователи YunoHost",
|
||||||
"app_action_failed": "Не удалось выполнить действие {action} для приложения {app}"
|
"app_action_failed": "Не удалось выполнить действие {action} для приложения {app}",
|
||||||
|
"app_manifest_install_ask_init_main_permission": "Кто должен иметь доступ к этому приложению? (Это может быть изменено позже)",
|
||||||
|
"app_arch_not_supported": "Это приложение может быть установлено только на архитектуры {required}, но архитектура вашего сервер - {current}",
|
||||||
|
"app_manifest_install_ask_init_admin_permission": "Кто должен иметь доступ к функциям для администраторов этого приложения? (Это может быть изменено позже)",
|
||||||
|
"app_change_url_script_failed": "Произошла ошибка внутри скрипта смены URL",
|
||||||
|
"app_corrupt_source": "YunoHost смог скачать материал «{source_id}» ({url}) для {app}, но материал не соотвествует с ожидаемой контрольной суммой. Это может означать, что на ваше сервере произошла временная сетевая ошибка, ИЛИ материал был каким-либо образом изменён сопровождающим главной ветки (или злоумышленником?) и упаковщикам YunoHost нужно выяснить и, возможно, обновить манифест, чтобы применить изменения.\n Ожидаемая контрольная сумма sha256: {expected_sha256}\n Полученная контрольная сумма sha256: {computed_sha256}\n Размер скачанного файла: {size}",
|
||||||
|
"app_not_enough_ram": "Это приложение требует {required} ОЗУ для установки/обновления, но сейчас доступно только {current}.",
|
||||||
|
"app_change_url_failed": "Невозможно изменить URL для {app}: {error}",
|
||||||
|
"app_not_enough_disk": "Это приложение требует {required} свободного места.",
|
||||||
|
"app_change_url_require_full_domain": "{app} не может быть перемещено на данный URL, потому что оно требует весь домен (т.е., путь - /)",
|
||||||
|
"app_failed_to_download_asset": "Не удалось скачать материал «{source_id}» ({url}) для {app}: {out}",
|
||||||
|
"app_failed_to_upgrade_but_continue": "Не удалось обновить приложение {failed_app}, обновления продолжаются, как запрошено. Выполните «yunohost log show {operation_logger_name}», чтобы увидеть журнал ошибки",
|
||||||
|
"app_not_upgraded_broken_system": "Не удалось обновить приложение «{failed_app}», система находится в сломанном состоянии, обновления следующих приложений были отменены: {apps}"
|
||||||
}
|
}
|
|
@ -263,16 +263,12 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False):
|
||||||
|
|
||||||
# Sanity checks for the provided arguments
|
# Sanity checks for the provided arguments
|
||||||
if len(filter_) == 0:
|
if len(filter_) == 0:
|
||||||
raise YunohostValidationError(
|
raise YunohostValidationError(m18n.n("diagnosis_ignore_missing_criteria"))
|
||||||
"You should provide at least one criteria being the diagnosis category to ignore"
|
|
||||||
)
|
|
||||||
category = filter_[0]
|
category = filter_[0]
|
||||||
if category not in all_categories_names:
|
if category not in all_categories_names:
|
||||||
raise YunohostValidationError(f"{category} is not a diagnosis category")
|
raise YunohostValidationError(f"{category} is not a diagnosis category")
|
||||||
if any("=" not in criteria for criteria in filter_[1:]):
|
if any("=" not in criteria for criteria in filter_[1:]):
|
||||||
raise YunohostValidationError(
|
raise YunohostValidationError(m18n.n("diagnosis_ignore_criteria_error"))
|
||||||
"Criterias should be of the form key=value (e.g. domain=yolo.test)"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Convert the provided criteria into a nice dict
|
# Convert the provided criteria into a nice dict
|
||||||
criterias = {c.split("=")[0]: c.split("=")[1] for c in filter_[1:]}
|
criterias = {c.split("=")[0]: c.split("=")[1] for c in filter_[1:]}
|
||||||
|
@ -295,7 +291,7 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False):
|
||||||
issue_matches_criterias(i, criterias)
|
issue_matches_criterias(i, criterias)
|
||||||
for i in current_issues_for_this_category
|
for i in current_issues_for_this_category
|
||||||
):
|
):
|
||||||
raise YunohostError("No issues was found matching the given criteria.")
|
raise YunohostError(m18n.n("diagnosis_ignore_no_issue_found"))
|
||||||
|
|
||||||
# Make sure the subdicts/lists exists
|
# Make sure the subdicts/lists exists
|
||||||
if "ignore_filters" not in configuration:
|
if "ignore_filters" not in configuration:
|
||||||
|
@ -305,13 +301,13 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False):
|
||||||
|
|
||||||
if criterias in configuration["ignore_filters"][category]:
|
if criterias in configuration["ignore_filters"][category]:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
f"(There is already a diagnosis {category} filter with these criterias)"
|
m18n.n("diagnosis_ignore_already_filtered", category=category)
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
configuration["ignore_filters"][category].append(criterias)
|
configuration["ignore_filters"][category].append(criterias)
|
||||||
_diagnosis_write_configuration(configuration)
|
_diagnosis_write_configuration(configuration)
|
||||||
logger.success(f"Added a {category} diagnosis filter")
|
logger.success(m18n.n("diagnosis_ignore_filter_added", category=category))
|
||||||
return
|
return
|
||||||
|
|
||||||
if remove_filter:
|
if remove_filter:
|
||||||
|
@ -325,13 +321,13 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False):
|
||||||
|
|
||||||
if criterias not in configuration["ignore_filters"][category]:
|
if criterias not in configuration["ignore_filters"][category]:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
f"(There is no such diagnosis {category} filter with these criterias to remove)"
|
m18n.n("diagnosis_ignore_no_filter_found", category=category)
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
configuration["ignore_filters"][category].remove(criterias)
|
configuration["ignore_filters"][category].remove(criterias)
|
||||||
_diagnosis_write_configuration(configuration)
|
_diagnosis_write_configuration(configuration)
|
||||||
logger.success(f"Removed a {category} diagnosis filter")
|
logger.success(m18n.n("diagnosis_ignore_filter_removed", category=category))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -791,7 +791,7 @@ class OperationLogger:
|
||||||
|
|
||||||
# Get the 20 lines before the last 'ynh_exit_properly'
|
# Get the 20 lines before the last 'ynh_exit_properly'
|
||||||
rev_lines = list(reversed(lines))
|
rev_lines = list(reversed(lines))
|
||||||
for i, line in enumerate(rev_lines):
|
for i, line in enumerate(rev_lines[:50]):
|
||||||
if line.endswith("+ ynh_exit_properly"):
|
if line.endswith("+ ynh_exit_properly"):
|
||||||
lines_to_display = reversed(rev_lines[i : i + 20])
|
lines_to_display = reversed(rev_lines[i : i + 20])
|
||||||
break
|
break
|
||||||
|
|
Loading…
Add table
Reference in a new issue