From bc30805c7d089b033c734a358241b43dc1b6e91e Mon Sep 17 00:00:00 2001 From: tituspijean Date: Mon, 17 Apr 2023 13:18:10 +0200 Subject: [PATCH 001/218] [enh] exclude .well-known subpaths from conflict checks --- src/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 91b55b39d..0f1e74f37 100644 --- a/src/app.py +++ b/src/app.py @@ -2869,7 +2869,7 @@ def _get_conflicting_apps(domain, path, ignore_app=None): for p, a in apps_map[domain].items(): if a["id"] == ignore_app: continue - if path == p or path == "/" or p == "/": + if path == p or ( not path.startswith("/.well-known/") and path == "/" ) or ( not path.startswith("/.well-known/") and p == "/" ): conflicts.append((p, a["id"], a["label"])) return conflicts From 383fd6f5d403206328db26d90dfb8de9c976e2f1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 2 Jan 2024 20:59:40 +0100 Subject: [PATCH 002/218] First draft for migrate_to_bookworm --- src/migrations/0027_migrate_to_bookworm.py | 427 +++++++++++++++++++++ src/tools.py | 27 +- src/utils/system.py | 110 ++++++ 3 files changed, 538 insertions(+), 26 deletions(-) create mode 100644 src/migrations/0027_migrate_to_bookworm.py diff --git a/src/migrations/0027_migrate_to_bookworm.py b/src/migrations/0027_migrate_to_bookworm.py new file mode 100644 index 000000000..86d2ce49e --- /dev/null +++ b/src/migrations/0027_migrate_to_bookworm.py @@ -0,0 +1,427 @@ +import glob +import os + +from moulinette import m18n +from yunohost.utils.error import YunohostError +from moulinette.utils.process import check_output +from moulinette.utils.filesystem import read_file, write_to_file + +from yunohost.tools import ( + Migration, + tools_update, +) +from yunohost.app import unstable_apps +from yunohost.regenconf import manually_modified_files +from yunohost.utils.system import ( + free_space_in_directory, + get_ynh_package_version, + _list_upgradable_apt_packages, + aptitude_with_progress_bar, +) + +# getActionLogger is not there in bookworm, +# we use this try/except to make it agnostic wether or not we're on 11.x or 12.x +# otherwise this may trigger stupid issues +try: + from moulinette.utils.log import getActionLogger + logger = getActionLogger("yunohost.migration") +except ImportError: + import logging + logger = logging.getLogger("yunohost.migration") + + +N_CURRENT_DEBIAN = 11 +N_CURRENT_YUNOHOST = 11 + +VENV_REQUIREMENTS_SUFFIX = ".requirements_backup_for_bookworm_upgrade.txt" + + +def _get_all_venvs(dir, level=0, maxlevel=3): + """ + Returns the list of all python virtual env directories recursively + + Arguments: + dir - the directory to scan in + maxlevel - the depth of the recursion + level - do not edit this, used as an iterator + """ + if not os.path.exists(dir): + return [] + + result = [] + # Using os functions instead of glob, because glob doesn't support hidden folders, and we need recursion with a fixed depth + for file in os.listdir(dir): + path = os.path.join(dir, file) + if os.path.isdir(path): + activatepath = os.path.join(path, "bin", "activate") + if os.path.isfile(activatepath): + content = read_file(activatepath) + if ("VIRTUAL_ENV" in content) and ("PYTHONHOME" in content): + result.append(path) + continue + if level < maxlevel: + result += _get_all_venvs(path, level=level + 1) + return result + + +def _backup_pip_freeze_for_python_app_venvs(): + """ + Generate a requirements file for all python virtual env located inside /opt/ and /var/www/ + """ + + venvs = _get_all_venvs("/opt/") + _get_all_venvs("/var/www/") + for venv in venvs: + # Generate a requirements file from venv + os.system( + f"{venv}/bin/pip freeze > {venv}{VENV_REQUIREMENTS_SUFFIX} 2>/dev/null" + ) + + +class MyMigration(Migration): + "Upgrade the system to Debian Bookworm and Yunohost 12.x" + + mode = "manual" + + def run(self): + self.check_assertions() + + logger.info(m18n.n("migration_0027_start")) + + # + # Add new apt .deb signing key + # + + new_apt_key = "https://forge.yunohost.org/yunohost_bookworm.asc" + os.system(f'wget --timeout 900 --quiet "{new_apt_key}" --output-document=- | gpg --dearmor >"/usr/share/keyrings/yunohost-bookworm.gpg"') + + # Add Sury key even if extra_php_version.list was already there, + # because some old system may be using an outdated key not valid for Bookworm + # and that'll block the migration + os.system( + 'wget --timeout 900 --quiet "https://packages.sury.org/php/apt.gpg" --output-document=- | gpg --dearmor >"/etc/apt/trusted.gpg.d/extra_php_version.gpg"' + ) + + # + # Patch sources.list + # + + logger.info(m18n.n("migration_0027_patching_sources_list")) + self.patch_apt_sources_list() + + # + # Get requirements of the different venvs from python apps + # + + _backup_pip_freeze_for_python_app_venvs() + + # + # Run apt update + # + + aptitude_with_progress_bar("update") + + # Tell libc6 it's okay to restart system stuff during the upgrade + os.system( + "echo 'libc6 libraries/restart-without-asking boolean true' | debconf-set-selections" + ) + + # Do not restart nginx during the upgrade of nginx-common and nginx-extras ... + # c.f. https://manpages.debian.org/bullseye/init-system-helpers/deb-systemd-invoke.1p.en.html + # and zcat /usr/share/doc/init-system-helpers/README.policy-rc.d.gz + # and the code inside /usr/bin/deb-systemd-invoke to see how it calls /usr/sbin/policy-rc.d ... + # and also invoke-rc.d ... + write_to_file( + "/usr/sbin/policy-rc.d", + '#!/bin/bash\n[[ "$1" =~ "nginx" ]] && exit 101 || exit 0', + ) + os.system("chmod +x /usr/sbin/policy-rc.d") + + # Don't send an email to root about the postgresql migration. It should be handled automatically after. + os.system( + "echo 'postgresql-common postgresql-common/obsolete-major seen true' | debconf-set-selections" + ) + + # + # Patch yunohost conflicts + # + logger.info(m18n.n("migration_0027_patch_yunohost_conflicts")) + + self.patch_yunohost_conflicts() + + # + # Critical fix for RPI otherwise network is down after rebooting + # https://forum.yunohost.org/t/20652 + # + # FIXME : this is from buster->bullseye, do we still needed it ? + # + #if os.system("systemctl | grep -q dhcpcd") == 0: + # logger.info("Applying fix for DHCPCD ...") + # os.system("mkdir -p /etc/systemd/system/dhcpcd.service.d") + # write_to_file( + # "/etc/systemd/system/dhcpcd.service.d/wait.conf", + # "[Service]\nExecStart=\nExecStart=/usr/sbin/dhcpcd -w", + # ) + + # + # Main upgrade + # + logger.info(m18n.n("migration_0027_main_upgrade")) + + # Mark php, mariadb, metronome and rspamd as "auto" so that they may be uninstalled if they ain't explicitly wanted by app or admins + php_packages = self.get_php_packages() + aptitude_with_progress_bar(f"markauto mariadb-server metronome rspamd {' '.join(php_packages)}") + + # Hold import yunohost packages + apps_packages = self.get_apps_equivs_packages() + aptitude_with_progress_bar(f"hold yunohost moulinette ssowat yunohost-admin {' '.join(apps_packages)}") + + aptitude_with_progress_bar("upgrade cron --show-why -y -o APT::Force-LoopBreak=1 -o Dpkg::Options::='--force-confold'") + + # FIXME : find a way to simulate and validate the upgrade first + aptitude_with_progress_bar("full-upgrade --show-why -y -o Dpkg::Options::='--force-confold'") + + if self.debian_major_version() == N_CURRENT_DEBIAN: + raise YunohostError("migration_0027_still_on_buster_after_main_upgrade") + + # Clean the mess + logger.info(m18n.n("migration_0027_cleaning_up")) + os.system( + "LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none apt autoremove --assume-yes" + ) + os.system("apt clean --assume-yes") + + # + # Stupid hack for stupid dnsmasq not picking up its new init.d script then breaking everything ... + # https://forum.yunohost.org/t/20676 + # + # FIXME : this is from buster->bullseye, do we still needed it ? + # + #if os.path.exists("/etc/init.d/dnsmasq.dpkg-dist"): + # logger.info("Copying new version for /etc/init.d/dnsmasq ...") + # os.system("cp /etc/init.d/dnsmasq.dpkg-dist /etc/init.d/dnsmasq") + + # + # Yunohost upgrade + # + logger.info(m18n.n("migration_0027_yunohost_upgrade")) + + aptitude_with_progress_bar(f"unhold yunohost moulinette ssowat yunohost-admin {' '.join(apps_packages)}") + + # FIXME : find a way to simulate and validate the upgrade first + # FIXME : why were libluajit needed in the first place ? + aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin moulinette ssowat libluajit-5.1-2- libluajit-5.1-common- -y -o Dpkg::Options::='--force-confold'") + + #cmd = "LC_ALL=C" + #cmd += " DEBIAN_FRONTEND=noninteractive" + #cmd += " APT_LISTCHANGES_FRONTEND=none" + #cmd += " apt dist-upgrade " + #cmd += " --quiet -o=Dpkg::Use-Pty=0 --fix-broken --dry-run" + #cmd += " | grep -q 'ynh-deps'" + + #logger.info("Simulating upgrade...") + #if os.system(cmd) == 0: + # raise YunohostError( + # "The upgrade cannot be completed, because some app dependencies would need to be removed?", + # raw_msg=True, + # ) + + # FIXME : + #postupgradecmds = "rm -f /usr/sbin/policy-rc.d\n" + #postupgradecmds += "echo 'Restarting nginx...' >&2\n" + #postupgradecmds += "systemctl restart nginx\n" + + def debian_major_version(self): + # The python module "platform" and lsb_release are not reliable because + # on some setup, they may still return Release=9 even after upgrading to + # buster ... (Apparently this is related to OVH overriding some stuff + # with /etc/lsb-release for instance -_-) + # Instead, we rely on /etc/os-release which should be the raw info from + # the distribution... + return int( + check_output( + "grep VERSION_ID /etc/os-release | head -n 1 | tr '\"' ' ' | cut -d ' ' -f2" + ) + ) + + def yunohost_major_version(self): + return int(get_ynh_package_version("yunohost")["version"].split(".")[0]) + + def check_assertions(self): + # Be on bullseye (11.x) and yunohost 11.x + # NB : we do both check to cover situations where the upgrade crashed + # in the middle and debian version could be > 12.x but yunohost package + # would still be in 11.x... + if ( + not self.debian_major_version() == N_CURRENT_DEBIAN + and not self.yunohost_major_version() == N_CURRENT_YUNOHOST + ): + try: + # Here we try to find the previous migration log, which should be somewhat recent and be at least 10k (we keep the biggest one) + maybe_previous_migration_log_id = check_output( + "cd /var/log/yunohost/categories/operation && find -name '*migrate*.log' -size +10k -mtime -100 -exec ls -s {} \\; | sort -n | tr './' ' ' | awk '{print $2}' | tail -n 1" + ) + if maybe_previous_migration_log_id: + logger.info( + f"NB: the previous migration log id seems to be {maybe_previous_migration_log_id}. You can share it with the support team with : sudo yunohost log share {maybe_previous_migration_log_id}" + ) + except Exception: + # Yeah it's not that important ... it's to simplify support ... + pass + + raise YunohostError("migration_0027_not_bullseye") + + # Have > 1 Go free space on /var/ ? + if free_space_in_directory("/var/") / (1024**3) < 1.0: + raise YunohostError("migration_0027_not_enough_free_space") + + # Have > 70 MB free space on /var/ ? + if free_space_in_directory("/boot/") / (1024**2) < 70.0: + raise YunohostError( + "/boot/ has less than 70MB available. This will probably trigger a crash during the upgrade because a new kernel needs to be installed. Please look for advice on the forum on how to remove old, unused kernels to free up some space in /boot/.", + raw_msg=True, + ) + + # Check system is up to date + # (but we don't if 'bullseye' is already in the sources.list ... + # which means maybe a previous upgrade crashed and we're re-running it) + if os.path.exists("/etc/apt/sources.list") and " bookworm " not in read_file( + "/etc/apt/sources.list" + ): + tools_update(target="system") + upgradable_system_packages = list(_list_upgradable_apt_packages()) + upgradable_system_packages = [ + package["name"] for package in upgradable_system_packages + ] + upgradable_system_packages = set(upgradable_system_packages) + # Lime2 have hold packages to avoid ethernet instability + # See https://github.com/YunoHost/arm-images/commit/b4ef8c99554fd1a122a306db7abacc4e2f2942df + lime2_hold_packages = set( + [ + "armbian-firmware", + "armbian-bsp-cli-lime2", + "linux-dtb-current-sunxi", + "linux-image-current-sunxi", + "linux-u-boot-lime2-current", + "linux-image-next-sunxi", + ] + ) + if upgradable_system_packages - lime2_hold_packages: + raise YunohostError("migration_0027_system_not_fully_up_to_date") + + @property + def disclaimer(self): + # Avoid having a super long disclaimer + uncessary check if we ain't + # on bullseye / yunohost 11.x + # NB : we do both check to cover situations where the upgrade crashed + # in the middle and debian version could be 12.x but yunohost package + # would still be in 11.x... + if ( + not self.debian_major_version() == N_CURRENT_DEBIAN + and not self.yunohost_major_version() == N_CURRENT_YUNOHOST + ): + return None + + # Get list of problematic apps ? I.e. not official or community+working + problematic_apps = unstable_apps() + problematic_apps = "".join(["\n - " + app for app in problematic_apps]) + + # Manually modified files ? (c.f. yunohost service regen-conf) + modified_files = manually_modified_files() + modified_files = "".join(["\n - " + f for f in modified_files]) + + message = m18n.n("migration_0027_general_warning") + + message = ( + "N.B.: This migration has been tested by the community over the last few months but has only been declared stable recently. If your server hosts critical services and if you are not too confident with debugging possible issues, we recommend you to wait a little bit more while we gather more feedback and polish things up. If on the other hand you are relatively confident with debugging small issues that may arise, you are encouraged to run this migration ;)! You can read about remaining known issues and feedback from the community here: https://forum.yunohost.org/t/?? FIXME ?? \n\n" + + message + + "\n\n" + + "Packages 'metronome' (xmpp server) and 'rspamd' (mail antispam) are now optional dependencies and may get uninstalled during the upgrade. Make sure to explicitly re-install those using 'apt install' after the upgrade if you care about those!" + ) + + if problematic_apps: + message += "\n\n" + m18n.n( + "migration_0027_problematic_apps_warning", + problematic_apps=problematic_apps, + ) + + if modified_files: + message += "\n\n" + m18n.n( + "migration_0027_modified_files", manually_modified_files=modified_files + ) + + return message + + def patch_apt_sources_list(self): + sources_list = glob.glob("/etc/apt/sources.list.d/*.list") + if os.path.exists("/etc/apt/sources.list"): + sources_list.append("/etc/apt/sources.list") + + # This : + # - replace single 'bullseye' occurence by 'bookworm' + # - comments lines containing "backports" + # - replace 'bullseye/updates' by 'bookworm/updates' (or same with -) + # - make sure the yunohost line has the "signed-by" thingy + # Special note about the security suite: + # https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.en.html#security-archive + for f in sources_list: + command = ( + f"sed -i {f} " + "-e 's@ bullseye @ bookworm @g' " + "-e '/backports/ s@^#*@#@' " + "-e 's@ bullseye/updates @ bookworm-security @g' " + "-e 's@ bullseye-@ bookworm-@g' " + "-e 's@deb.*http://forge.yunohost.org@deb [signed-by=/usr/share/keyrings/yunohost-bookworm.gpg] http://forge.yunohost.org@g' " + ) + os.system(command) + + # Stupid OVH has some repo configured which dont work with next debian and break apt ... + os.system("rm -f /etc/apt/sources.list.d/ovh-*.list") + + def get_apps_equivs_packages(self): + command = ( + "dpkg --get-selections" + " | grep -v deinstall" + " | awk '{print $1}'" + " | { grep 'ynh-deps$' || true; }" + ) + + output = check_output(command) + + return output.split("\n") if output else [] + + def get_php_packages(self): + command = ( + "dpkg --get-selections" + " | grep -v deinstall" + " | awk '{print $1}'" + " | { grep '^php' || true; }" + ) + + output = check_output(command) + + return output.split("\n") if output else [] + + def patch_yunohost_conflicts(self): + # + # This is a super dirty hack to remove the conflicts from yunohost's debian/control file + # Those conflicts are there to prevent mistakenly upgrading critical packages + # such as dovecot, postfix, nginx, openssl, etc... usually related to mistakenly + # using backports etc. + # + # The hack consists in savagely removing the conflicts directly in /var/lib/dpkg/status + # + + # We only patch the conflict if we're on yunohost 11.x + if self.yunohost_major_version() != N_CURRENT_YUNOHOST: + return + + conflicts = check_output("dpkg-query -s yunohost | grep '^Conflicts:'").strip() + if conflicts: + # We want to keep conflicting with apache/bind9 tho + new_conflicts = "Conflicts: apache2, bind9" + + command = ( + f"sed -i /var/lib/dpkg/status -e 's@{conflicts}@{new_conflicts}@g'" + ) + logger.debug(f"Running: {command}") + os.system(command) diff --git a/src/tools.py b/src/tools.py index 5b5fc3156..9075e0bfe 100644 --- a/src/tools.py +++ b/src/tools.py @@ -49,6 +49,7 @@ from yunohost.utils.system import ( ynh_packages_version, dpkg_is_broken, dpkg_lock_available, + _apt_log_line_is_relevant, ) from yunohost.utils.error import YunohostError, YunohostValidationError from yunohost.log import is_unit_operation, OperationLogger @@ -530,32 +531,6 @@ def tools_upgrade(operation_logger, target=None): operation_logger.success() -def _apt_log_line_is_relevant(line): - irrelevants = [ - "service sudo-ldap already provided", - "Reading database ...", - "Preparing to unpack", - "Selecting previously unselected package", - "Created symlink /etc/systemd", - "Replacing config file", - "Creating config file", - "Installing new version of config file", - "Installing new config file as you requested", - ", does not exist on system.", - "unable to delete old directory", - "update-alternatives:", - "Configuration file '/etc", - "==> Modified (by you or by a script) since installation.", - "==> Package distributor has shipped an updated version.", - "==> Keeping old config file as default.", - "is a disabled or a static unit", - " update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults", - "insserv: warning: current stop runlevel", - "insserv: warning: current start runlevel", - ] - return line.rstrip() and all(i not in line.rstrip() for i in irrelevants) - - @is_unit_operation() def tools_shutdown(operation_logger, force=False): shutdown = force diff --git a/src/utils/system.py b/src/utils/system.py index 6a77e293b..f5d9e646c 100644 --- a/src/utils/system.py +++ b/src/utils/system.py @@ -191,3 +191,113 @@ def _dump_sources_list(): if line.startswith("#") or not line.strip(): continue yield filename.replace("/etc/apt/", "") + ":" + line.strip() + + +def aptitude_with_progress_bar(cmd): + + from moulinette.utils.process import call_async_output + + msg_to_verb = { + "Preparing for removal": "Removing", + "Preparing to configure": "Installing", + "Removing": "Removing", + "Unpacking": "Installing", + "Configuring": "Installing", + "Installing": "Installing", + "Installed": "Installing", + "Preparing": "Installing", + "Done": "Done", + "Failed?": "Failed?", + } + + disable_progress_bar = False + if cmd.startswith("update"): + # the status-fd does stupid stuff for 'aptitude update', percentage is always zero except last iteration + disable_progress_bar = True + + def log_apt_status_to_progress_bar(data): + + if disable_progress_bar: + return + + t, package, percent, msg = data.split(":", 3) + + # We only display the stuff related to download once + if t == "dlstatus": + if log_apt_status_to_progress_bar.download_message_displayed is False: + logger.info("Downloading...") + log_apt_status_to_progress_bar.download_message_displayed = True + return + + if package == "dpkg-exec": + return + if package and log_apt_status_to_progress_bar.previous_package and package == log_apt_status_to_progress_bar.previous_package: + return + + try: + percent = round(float(percent), 1) + except Exception: + return + + verb = "Processing" + for m, v in msg_to_verb.items(): + if msg.startswith(m): + verb = v + + log_apt_status_to_progress_bar.previous_package = package + + width = 20 + done = "#" * int(width * percent / 100) + remain = "." * (width - len(done)) + logger.info(f"[{done}{remain}] > {percent}% {verb} {package}\r") + + log_apt_status_to_progress_bar.previous_package = None + log_apt_status_to_progress_bar.download_message_displayed = False + + def strip_boring_dpkg_reading_database(s): + return re.sub(r'(\(Reading database ... \d*%?|files and directories currently installed.\))', '', s) + + callbacks = ( + lambda l: logger.debug(strip_boring_dpkg_reading_database(l).rstrip() + "\r"), + lambda l: logger.warning(l.rstrip() + "\r"), # ... aptitude has no stderr ? :| if _apt_log_line_is_relevant(l.rstrip()) else logger.debug(l.rstrip() + "\r"), + lambda l: log_apt_status_to_progress_bar(l.rstrip()), + ) + + cmd = ( + f'LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none aptitude {cmd} --quiet=2 -o=Dpkg::Use-Pty=0 -o "APT::Status-Fd=$YNH_STDINFO"' + ) + + logger.debug(f"Running: {cmd}") + + ret = call_async_output(cmd, callbacks, shell=True) + + if log_apt_status_to_progress_bar.previous_package is not None and ret == 0: + log_apt_status_to_progress_bar("done::100:Done") + elif ret != 0: + raise YunohostError(f"Failed to run command 'aptitude {cmd}'", raw_msg=True) + + +def _apt_log_line_is_relevant(line): + irrelevants = [ + "service sudo-ldap already provided", + "Reading database ...", + "Preparing to unpack", + "Selecting previously unselected package", + "Created symlink /etc/systemd", + "Replacing config file", + "Creating config file", + "Installing new version of config file", + "Installing new config file as you requested", + ", does not exist on system.", + "unable to delete old directory", + "update-alternatives:", + "Configuration file '/etc", + "==> Modified (by you or by a script) since installation.", + "==> Package distributor has shipped an updated version.", + "==> Keeping old config file as default.", + "is a disabled or a static unit", + " update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults", + "insserv: warning: current stop runlevel", + "insserv: warning: current start runlevel", + ] + return line.rstrip() and all(i not in line.rstrip() for i in irrelevants) From 650481a58ae1663aa44ecb805f70cafde469859a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 28 Sep 2023 11:23:59 +0200 Subject: [PATCH 003/218] ynh_safe_rm: Check if target is a symlink When calling ynh_safe_rm to a broken symlink, the function was erroring out. (test -e was following the symlink and returning false) We need to also check if it is a symlink before exiting. --- helpers/helpers.v2.1.d/utils | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/helpers.v2.1.d/utils b/helpers/helpers.v2.1.d/utils index be57a6d73..0cbd7c004 100644 --- a/helpers/helpers.v2.1.d/utils +++ b/helpers/helpers.v2.1.d/utils @@ -168,7 +168,7 @@ ynh_safe_rm() { if [[ -z "$target" ]]; then ynh_print_warn "ynh_safe_rm called with empty argument, ignoring." - elif [[ ! -e $target ]]; then + elif [[ ! -e "$target" ]] && [[ ! -L "$target" ]]; then ynh_print_info "'$target' wasn't deleted because it doesn't exist." elif ! _acceptable_path_to_delete "$target"; then ynh_print_warn "Not deleting '$target' because it is not an acceptable path to delete." From 8846381d4758dd891ba7cc218778851669069109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 28 Jun 2024 14:43:46 +0200 Subject: [PATCH 004/218] Rework _ynh_apply_default_permissions, only check if target is a child of install_dir. --- helpers/helpers.v2.1.d/utils | 47 ++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/helpers/helpers.v2.1.d/utils b/helpers/helpers.v2.1.d/utils index be57a6d73..ff378a951 100644 --- a/helpers/helpers.v2.1.d/utils +++ b/helpers/helpers.v2.1.d/utils @@ -226,41 +226,36 @@ ynh_app_upgrading_from_version_before_or_equal_to() { dpkg --compare-versions $YNH_APP_CURRENT_VERSION le $version } -# Check if we should enforce sane default permissions (= disable rwx for 'others') -# on file/folders handled with ynh_setup_source and ynh_config_add +# Apply sane permissions for files installed by ynh_setup_source and ynh_config_add. # # [internal] # -# Having a file others-readable or a folder others-executable(=enterable) -# is a security risk comparable to "chmod 777" -# -# Configuration files may contain secrets. Or even just being able to enter a -# folder may allow an attacker to do nasty stuff (maybe a file or subfolder has -# some write permission enabled for 'other' and the attacker may edit the -# content or create files as leverage for priviledge escalation ...) -# -# The sane default should be to set ownership to $app:$app. -# In specific case, you may want to set the ownership to $app:www-data -# for example if nginx needs access to static files. +# * Anything below $install_dir is chown $app:$app and chmod o-rwx,g-w +# * The rest is considered as system configuration and chown root, chmod 400 # _ynh_apply_default_permissions() { local target=$1 - chmod o-rwx $target - chmod g-w $target - chown -R root:root $target - if ynh_system_user_exists --username=$app; then - chown $app:$app $target + is_subdir() { + # Returns false if child or parent is empty + child=$(realpath "$1" 2>/dev/null) + parent=$(realpath "$2" 2>/dev/null) + [[ "${child/$parent/}" != "$child" ]] + } + + # App files can have files of their own + if ynh_system_user_exists --username="$app"; then + if is_subdir "$target" "$install_dir" || is_subdir "$target" "$data_dir"; then + chmod -R u=rwX,g=rX,o=X "$target" + chown -R "$app:$app" "$target" + chown "$app:www-data" "$target" + return + fi fi - # Crons should be owned by root - # Also we don't want systemd conf, nginx conf or others stuff to be owned by the app, - # otherwise they could self-edit their own systemd conf and escalate privilege - if echo "$target" | grep -q '^/etc/cron\|/etc/php\|/etc/nginx/conf.d\|/etc/fail2ban\|/etc/systemd/system' - then - chmod 400 $target - chown root:root $target - fi + # Other files are considered system + chmod -R 400 "$target" + chown -R root:root "$target" } int_to_bool() { From d9d404a5b24f1745f414a1bce47fda3c44007d1e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 28 Jun 2024 16:06:40 +0200 Subject: [PATCH 005/218] ynh_setup_source: apply default perms *after* extracting files to hopefully remove the need to manually chown/chmod --- helpers/helpers.v2.1.d/sources | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helpers/helpers.v2.1.d/sources b/helpers/helpers.v2.1.d/sources index ced0e05c7..c0c2fb863 100644 --- a/helpers/helpers.v2.1.d/sources +++ b/helpers/helpers.v2.1.d/sources @@ -182,10 +182,6 @@ ynh_setup_source() { # Extract source into the app dir mkdir --parents "$dest_dir" - if [ -n "${install_dir:-}" ] && [ "$dest_dir" == "$install_dir" ]; then - _ynh_apply_default_permissions $dest_dir - fi - if [[ "$src_extract" == "false" ]]; then if [[ -z "$src_rename" ]] then @@ -258,4 +254,8 @@ ynh_setup_source() { done fi rm -rf /var/cache/yunohost/files_to_keep_during_setup_source/ + + if [ -n "${install_dir:-}" ] && [ "$dest_dir" == "$install_dir" ]; then + _ynh_apply_default_permissions $dest_dir + fi } From 3608c5678c145ce4b02caca350c913ef67a1a41f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 28 Jun 2024 16:45:43 +0200 Subject: [PATCH 006/218] Proper 'if' cases to distinguish between $install_dir vs regular files in $install_dir and $data_dir --- helpers/helpers.v2.1.d/utils | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/helpers/helpers.v2.1.d/utils b/helpers/helpers.v2.1.d/utils index ff378a951..6c63fe82d 100644 --- a/helpers/helpers.v2.1.d/utils +++ b/helpers/helpers.v2.1.d/utils @@ -236,7 +236,7 @@ ynh_app_upgrading_from_version_before_or_equal_to() { _ynh_apply_default_permissions() { local target=$1 - is_subdir() { + is_in_dir() { # Returns false if child or parent is empty child=$(realpath "$1" 2>/dev/null) parent=$(realpath "$2" 2>/dev/null) @@ -245,17 +245,27 @@ _ynh_apply_default_permissions() { # App files can have files of their own if ynh_system_user_exists --username="$app"; then - if is_subdir "$target" "$install_dir" || is_subdir "$target" "$data_dir"; then - chmod -R u=rwX,g=rX,o=X "$target" - chown -R "$app:$app" "$target" - chown "$app:www-data" "$target" + # If this is a file in $install_dir or $data_dir : it should be owned and read+writable by $app only + if [ -f "$target" ] && (([[ -z "${install_dir:-}" ]] is_in_dir "$target" "$install_dir") || ([[ -z "${install_dir:-}" ]] is_in_dir "$target" "$data_dir")) + then + chmod 600 "$target" + chown "$app:$app" "$target" + return + fi + # If this is the install dir (so far this is the only way this helper is called with a directory) + if [ "$target" == "$install_dir" ] + then + # Files inside should be owned by $app/www-data with rw-r----- (+x for folders or files that already have +x) + chmod -R u=rwX,g=r-X,o=--- "$target" + # We set the group to www-data because most apps do serve static assets that need to be readable by nginx ... + chown -R "$app:www-data" "$target" return fi fi # Other files are considered system - chmod -R 400 "$target" - chown -R root:root "$target" + chmod 400 "$target" + chown root:root "$target" } int_to_bool() { From 3b26ccc2a542c67769af5b7150137500dd1eb26f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 28 Jun 2024 16:55:39 +0200 Subject: [PATCH 007/218] Properly handle case where $parent is empty to simplify condition --- helpers/helpers.v2.1.d/utils | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/helpers/helpers.v2.1.d/utils b/helpers/helpers.v2.1.d/utils index 6c63fe82d..af2859d78 100644 --- a/helpers/helpers.v2.1.d/utils +++ b/helpers/helpers.v2.1.d/utils @@ -237,23 +237,24 @@ _ynh_apply_default_permissions() { local target=$1 is_in_dir() { - # Returns false if child or parent is empty - child=$(realpath "$1" 2>/dev/null) - parent=$(realpath "$2" 2>/dev/null) + # Returns false if parent is empty + [ -n "$2" ] || return 1 + local child=$(realpath "$1" 2>/dev/null) + local parent=$(realpath "$2" 2>/dev/null) [[ "${child/$parent/}" != "$child" ]] } # App files can have files of their own if ynh_system_user_exists --username="$app"; then # If this is a file in $install_dir or $data_dir : it should be owned and read+writable by $app only - if [ -f "$target" ] && (([[ -z "${install_dir:-}" ]] is_in_dir "$target" "$install_dir") || ([[ -z "${install_dir:-}" ]] is_in_dir "$target" "$data_dir")) + if [ -f "$target" ] && (is_in_dir "$target" "${install_dir:-}" || is_in_dir "$target" "${data_dir:-}") then chmod 600 "$target" chown "$app:$app" "$target" return fi # If this is the install dir (so far this is the only way this helper is called with a directory) - if [ "$target" == "$install_dir" ] + if [ "$target" == "${install_dir:-}" ] then # Files inside should be owned by $app/www-data with rw-r----- (+x for folders or files that already have +x) chmod -R u=rwX,g=r-X,o=--- "$target" From 75d704297470d358af7d6864df76f050f5fda7b8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Fri, 28 Jun 2024 16:56:28 +0200 Subject: [PATCH 008/218] Update helpers/helpers.v2.1.d/utils: use regex matching to check if path is child from a parent path --- helpers/helpers.v2.1.d/utils | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/helpers.v2.1.d/utils b/helpers/helpers.v2.1.d/utils index af2859d78..2ee0b5d38 100644 --- a/helpers/helpers.v2.1.d/utils +++ b/helpers/helpers.v2.1.d/utils @@ -241,7 +241,7 @@ _ynh_apply_default_permissions() { [ -n "$2" ] || return 1 local child=$(realpath "$1" 2>/dev/null) local parent=$(realpath "$2" 2>/dev/null) - [[ "${child/$parent/}" != "$child" ]] + [[ "${child}" =~ ^$parent ]] } # App files can have files of their own From 8b8768fd776f9d15efd5aeb9d65cd943c0bfc920 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 28 Jun 2024 18:09:35 +0200 Subject: [PATCH 009/218] Only set www-data as group for webapps --- helpers/helpers.v2.1.d/utils | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/helpers/helpers.v2.1.d/utils b/helpers/helpers.v2.1.d/utils index 2ee0b5d38..f03e67804 100644 --- a/helpers/helpers.v2.1.d/utils +++ b/helpers/helpers.v2.1.d/utils @@ -258,8 +258,13 @@ _ynh_apply_default_permissions() { then # Files inside should be owned by $app/www-data with rw-r----- (+x for folders or files that already have +x) chmod -R u=rwX,g=r-X,o=--- "$target" + local group="$app" # We set the group to www-data because most apps do serve static assets that need to be readable by nginx ... - chown -R "$app:www-data" "$target" + # The fact that the app is a webapp is infered by the fact that $domain and $path are defined + if [[ -n "${domain:-}" ]] && [[ -n "${path:-}" ]] then + group="www-data" + fi + chown -R "$app:$group" "$target" return fi fi From ae3018cdd0d97f4f56117fdc80bacb9637e5426e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 28 Jun 2024 18:39:12 +0200 Subject: [PATCH 010/218] Infer the necessity to use www-data as group from the presence of alias or root in nginx.conf --- helpers/helpers.v2.1.d/utils | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/helpers/helpers.v2.1.d/utils b/helpers/helpers.v2.1.d/utils index f03e67804..05a859498 100644 --- a/helpers/helpers.v2.1.d/utils +++ b/helpers/helpers.v2.1.d/utils @@ -256,14 +256,15 @@ _ynh_apply_default_permissions() { # If this is the install dir (so far this is the only way this helper is called with a directory) if [ "$target" == "${install_dir:-}" ] then - # Files inside should be owned by $app/www-data with rw-r----- (+x for folders or files that already have +x) - chmod -R u=rwX,g=r-X,o=--- "$target" local group="$app" - # We set the group to www-data because most apps do serve static assets that need to be readable by nginx ... - # The fact that the app is a webapp is infered by the fact that $domain and $path are defined - if [[ -n "${domain:-}" ]] && [[ -n "${path:-}" ]] then + # We set the group to www-data for webapps that do serve static assets, which therefore need to be readable by nginx ... + # The fact that the app needs this is infered by the existence of an nginx.conf and the presence of "alias" or "root" directive + if grep -q '^\s*alias\s\|^\s*root\s' "$YNH_APP_BASEDIR/conf/nginx.conf" 2>/dev/null then group="www-data" fi + # Files inside should be owned by $app with rw-r----- (+x for folders or files that already have +x) + # The group needs read/dirtraversal (in particular if it's www-data) + chmod -R u=rwX,g=r-X,o=--- "$target" chown -R "$app:$group" "$target" return fi From 656ff823a914a15741be2e756d3f5dbcdb893184 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 28 Jun 2024 18:56:18 +0200 Subject: [PATCH 011/218] Also handle files in /etc/$app --- helpers/helpers.v2.1.d/utils | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/helpers.v2.1.d/utils b/helpers/helpers.v2.1.d/utils index 05a859498..73b32a3f3 100644 --- a/helpers/helpers.v2.1.d/utils +++ b/helpers/helpers.v2.1.d/utils @@ -247,7 +247,7 @@ _ynh_apply_default_permissions() { # App files can have files of their own if ynh_system_user_exists --username="$app"; then # If this is a file in $install_dir or $data_dir : it should be owned and read+writable by $app only - if [ -f "$target" ] && (is_in_dir "$target" "${install_dir:-}" || is_in_dir "$target" "${data_dir:-}") + if [ -f "$target" ] && (is_in_dir "$target" "${install_dir:-}" || is_in_dir "$target" "${data_dir:-}" || is_in_dir "$target" "/etc/$app") then chmod 600 "$target" chown "$app:$app" "$target" From ef68485c5fc4fea221e13e05b6ed638ab519dc2f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 28 Jun 2024 19:24:07 +0200 Subject: [PATCH 012/218] Use the group defined in the manifest by default --- helpers/helpers.v2.1.d/utils | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/helpers/helpers.v2.1.d/utils b/helpers/helpers.v2.1.d/utils index 73b32a3f3..ad7a7620d 100644 --- a/helpers/helpers.v2.1.d/utils +++ b/helpers/helpers.v2.1.d/utils @@ -256,11 +256,19 @@ _ynh_apply_default_permissions() { # If this is the install dir (so far this is the only way this helper is called with a directory) if [ "$target" == "${install_dir:-}" ] then - local group="$app" - # We set the group to www-data for webapps that do serve static assets, which therefore need to be readable by nginx ... - # The fact that the app needs this is infered by the existence of an nginx.conf and the presence of "alias" or "root" directive - if grep -q '^\s*alias\s\|^\s*root\s' "$YNH_APP_BASEDIR/conf/nginx.conf" 2>/dev/null then - group="www-data" + # Read the group from the install_dir manifest resource + local group="$(ynh_read_manifest '.resources.install_dir.group' | sed 's/null//g' | sed "s/__APP__/$app/g" | cut -f1 -d:)" + if [[ -z "$group" ]] + then + # We set the group to www-data for webapps that do serve static assets, which therefore need to be readable by nginx ... + # The fact that the app needs this is infered by the existence of an nginx.conf and the presence of "alias" or "root" directive + if grep -q '^\s*alias\s\|^\s*root\s' "$YNH_APP_BASEDIR/conf/nginx.conf" 2>/dev/null; + then + group="www-data" + # Or default to "$app" + else + group="$app" + fi fi # Files inside should be owned by $app with rw-r----- (+x for folders or files that already have +x) # The group needs read/dirtraversal (in particular if it's www-data) From 1dfc47d1d7784a355b8ba8e7213313efaacb813a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 28 Jun 2024 20:21:56 +0200 Subject: [PATCH 013/218] helpers2.1: in logrotate, make sure to also chown $app the log dir --- helpers/helpers.v2.1.d/logrotate | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/helpers/helpers.v2.1.d/logrotate b/helpers/helpers.v2.1.d/logrotate index 07e62261f..4f2d063b1 100644 --- a/helpers/helpers.v2.1.d/logrotate +++ b/helpers/helpers.v2.1.d/logrotate @@ -24,9 +24,11 @@ ynh_config_add_logrotate() { for stuff in $logfile do - mkdir --parents $(dirname "$stuff") # Make sure the permissions of the parent dir are correct (otherwise the config file could be ignored and the corresponding logs never rotated) - chmod 750 $(dirname "$stuff") + local dir=$(dirname "$stuff") + mkdir --parents $dir + chmod 750 $dir + chown $app:$app $dir done local tempconf="$(mktemp)" From 7b2959a3ebd76c50cd87287c0d3f36cd3c7345a0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 29 Jun 2024 17:18:20 +0200 Subject: [PATCH 014/218] helpers2.1: forgot to rename the apt call in mongodb helpers --- helpers/helpers.v2.1.d/mongodb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/helpers/helpers.v2.1.d/mongodb b/helpers/helpers.v2.1.d/mongodb index b0d1fe981..3fb851277 100644 --- a/helpers/helpers.v2.1.d/mongodb +++ b/helpers/helpers.v2.1.d/mongodb @@ -235,7 +235,10 @@ ynh_install_mongo() { mongo_debian_release=buster fi - ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian $mongo_debian_release/mongodb-org/$mongo_version main" --package="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh" --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" + ynh_apt_install_dependencies_from_extra_repository \ + --repo="deb http://repo.mongodb.org/apt/debian $mongo_debian_release/mongodb-org/$mongo_version main" \ + --package="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh" \ + --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" mongodb_servicename=mongod # Make sure MongoDB is started and enabled From 1ab3a79d3951ce9f062110361b9643495a90ac86 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 29 Jun 2024 18:06:40 +0200 Subject: [PATCH 015/218] Update changelog for 11.2.18 --- debian/changelog | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/debian/changelog b/debian/changelog index 2ea7acce1..f3d38c9c7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +yunohost (11.2.18) stable; urgency=low + + - helpers2.1: Rework _ynh_apply_default_permissions to hopefully remove the necessity to chown/chmod in the app scripts ([#1883](http://github.com/YunoHost/yunohost/pull/1883)) + - helpers2.1: in logrotate, make sure to also chown $app the log dir (1dfc47d1d) + - helpers2.1: forgot to rename the apt call in mongodb helpers (7b2959a3e) + - helpers2.1: in ynh_safe_rm, check if target is not a broken symlink before erorring out ([#1716](http://github.com/YunoHost/yunohost/pull/1716)) + + Thanks to all contributors <3 ! (Félix Piédallu) + + -- Alexandre Aubin Sat, 29 Jun 2024 18:05:04 +0200 + yunohost (11.2.17.1) stable; urgency=low - helpers2.1: fix __PATH__/ handling (997388dc) From 3e1c9ebaf7eca7f8ba59da0eb02cd71782b4e45d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 29 Jun 2024 19:21:08 +0200 Subject: [PATCH 016/218] Fix getopts error handling ... --- helpers/helpers.v2.1.d/getopts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/helpers.v2.1.d/getopts b/helpers/helpers.v2.1.d/getopts index 4df68e7ae..ca517eebd 100644 --- a/helpers/helpers.v2.1.d/getopts +++ b/helpers/helpers.v2.1.d/getopts @@ -102,9 +102,9 @@ ynh_handle_getopts_args() { getopts ":$getopts_parameters" parameter || true if [ "$parameter" = "?" ]; then - ynh_die "Invalid argument: -${OPTARG:-}" + ynh_die "Invalid argument: ${1:-}" elif [ "$parameter" = ":" ]; then - ynh_die "-$OPTARG parameter requires an argument." + ynh_die "${1:-} parameter requires an argument." else local shift_value=1 # Use the long option, corresponding to the short option read by getopts, as a variable From a349fc0334d7c40a35dfc9dc7ecc8723e5fc8edd Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 29 Jun 2024 20:04:19 +0200 Subject: [PATCH 017/218] apps: tweaks to be more robust and prevent the stupid flood of 'sh: 0: getcwd() failed: No such file or directory' when running an app upgrade/remove from /var/www/$app, sometimes making it look like the upgrade failed when it didnt --- src/service.py | 6 ++++-- src/utils/system.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/service.py b/src/service.py index 5e49dfc8a..977b9a902 100644 --- a/src/service.py +++ b/src/service.py @@ -688,13 +688,15 @@ def _get_services(): ] for name in services_with_package_condition: package = services[name]["ignore_if_package_is_not_installed"] - if os.system(f"dpkg --list | grep -q 'ii *{package}'") != 0: + if check_output(f"dpkg-query --show --showformat='${{db:Status-Status}}' '{package}' 2>/dev/null || true") != "installed": del services[name] php_fpm_versions = check_output( - r"dpkg --list | grep -P 'ii php\d.\d-fpm' | awk '{print $2}' | grep -o -P '\d.\d' || true" + r"dpkg --list | grep -P 'ii php\d.\d-fpm' | awk '{print $2}' | grep -o -P '\d.\d' || true", + cwd="/tmp" ) php_fpm_versions = [v for v in php_fpm_versions.split("\n") if v.strip()] + for version in php_fpm_versions: # Skip php 7.3 which is most likely dead after buster->bullseye migration # because users get spooked diff --git a/src/utils/system.py b/src/utils/system.py index 27ef98dd1..5bea7f971 100644 --- a/src/utils/system.py +++ b/src/utils/system.py @@ -159,7 +159,7 @@ def ynh_packages_version(*args, **kwargs): def dpkg_is_broken(): - if check_output("dpkg --audit") != "": + if check_output("dpkg --audit", cwd="/tmp/") != "": return True # If dpkg is broken, /var/lib/dpkg/updates # will contains files like 0001, 0002, ... From c2d69f7f84c0a164b9c03df1852ba854c8aa6181 Mon Sep 17 00:00:00 2001 From: alexAubin <4533074+alexAubin@users.noreply.github.com> Date: Sat, 29 Jun 2024 18:05:02 +0000 Subject: [PATCH 018/218] :art: Format Python code with Black --- src/service.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/service.py b/src/service.py index 977b9a902..b0dc82827 100644 --- a/src/service.py +++ b/src/service.py @@ -688,12 +688,17 @@ def _get_services(): ] for name in services_with_package_condition: package = services[name]["ignore_if_package_is_not_installed"] - if check_output(f"dpkg-query --show --showformat='${{db:Status-Status}}' '{package}' 2>/dev/null || true") != "installed": + if ( + check_output( + f"dpkg-query --show --showformat='${{db:Status-Status}}' '{package}' 2>/dev/null || true" + ) + != "installed" + ): del services[name] php_fpm_versions = check_output( r"dpkg --list | grep -P 'ii php\d.\d-fpm' | awk '{print $2}' | grep -o -P '\d.\d' || true", - cwd="/tmp" + cwd="/tmp", ) php_fpm_versions = [v for v in php_fpm_versions.split("\n") if v.strip()] From d47c87e57d0bf7714416ac2ce07b400cb527a179 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 29 Jun 2024 20:08:14 +0200 Subject: [PATCH 019/218] helpers2.1: wrmbgl --- helpers/helpers.v2.1.d/utils | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/helpers.v2.1.d/utils b/helpers/helpers.v2.1.d/utils index 00c67c792..859cd29d9 100644 --- a/helpers/helpers.v2.1.d/utils +++ b/helpers/helpers.v2.1.d/utils @@ -257,7 +257,7 @@ _ynh_apply_default_permissions() { if [ "$target" == "${install_dir:-}" ] then # Read the group from the install_dir manifest resource - local group="$(ynh_read_manifest '.resources.install_dir.group' | sed 's/null//g' | sed "s/__APP__/$app/g" | cut -f1 -d:)" + local group="$(ynh_read_manifest 'resources.install_dir.group' | sed 's/null//g' | sed "s/__APP__/$app/g" | cut -f1 -d:)" if [[ -z "$group" ]] then # We set the group to www-data for webapps that do serve static assets, which therefore need to be readable by nginx ... From e5b575901a77b2fea13d3f81aed64366566efc8c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 29 Jun 2024 20:31:28 +0200 Subject: [PATCH 020/218] apps: be more robust when an app upgrade succeeds but for some reason is marked with 'broke the system' ... ending up in inconsistent state between the app settings vs the app scritpts (for example in v1->v2 transitions but not only) --- src/app.py | 63 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/src/app.py b/src/app.py index 597743cc8..f01630d71 100644 --- a/src/app.py +++ b/src/app.py @@ -849,6 +849,39 @@ def app_upgrade( + "\n -".join(manually_modified_files_by_app) ) + # If the upgrade didnt fail, update the revision and app files (even if it broke the system, otherwise we end up in a funky intermediate state where the app files don't match the installed version or settings, for example for v1->v2 upgrade marked as "broke the system" for some reason) + if not upgrade_failed: + now = int(time.time()) + app_setting(app_instance_name, "update_time", now) + app_setting( + app_instance_name, + "current_revision", + manifest.get("remote", {}).get("revision", "?"), + ) + + # Clean hooks and add new ones + hook_remove(app_instance_name) + if "hooks" in os.listdir(extracted_app_folder): + for hook in os.listdir(extracted_app_folder + "/hooks"): + hook_add(app_instance_name, extracted_app_folder + "/hooks/" + hook) + + # Replace scripts and manifest and conf (if exists) + # Move scripts and manifest to the right place + for file_to_copy in APP_FILES_TO_COPY: + rm(f"{app_setting_path}/{file_to_copy}", recursive=True, force=True) + if os.path.exists(os.path.join(extracted_app_folder, file_to_copy)): + cp( + f"{extracted_app_folder}/{file_to_copy}", + f"{app_setting_path}/{file_to_copy}", + recursive=True, + ) + + # Clean and set permissions + shutil.rmtree(extracted_app_folder) + chmod(app_setting_path, 0o600) + chmod(f"{app_setting_path}/settings.yml", 0o400) + chown(app_setting_path, "root", recursive=True) + # If upgrade failed or broke the system, # raise an error and interrupt all other pending upgrades if upgrade_failed or broke_the_system: @@ -899,36 +932,6 @@ def app_upgrade( ) # Otherwise we're good and keep going ! - now = int(time.time()) - app_setting(app_instance_name, "update_time", now) - app_setting( - app_instance_name, - "current_revision", - manifest.get("remote", {}).get("revision", "?"), - ) - - # Clean hooks and add new ones - hook_remove(app_instance_name) - if "hooks" in os.listdir(extracted_app_folder): - for hook in os.listdir(extracted_app_folder + "/hooks"): - hook_add(app_instance_name, extracted_app_folder + "/hooks/" + hook) - - # Replace scripts and manifest and conf (if exists) - # Move scripts and manifest to the right place - for file_to_copy in APP_FILES_TO_COPY: - rm(f"{app_setting_path}/{file_to_copy}", recursive=True, force=True) - if os.path.exists(os.path.join(extracted_app_folder, file_to_copy)): - cp( - f"{extracted_app_folder}/{file_to_copy}", - f"{app_setting_path}/{file_to_copy}", - recursive=True, - ) - - # Clean and set permissions - shutil.rmtree(extracted_app_folder) - chmod(app_setting_path, 0o600) - chmod(f"{app_setting_path}/settings.yml", 0o400) - chown(app_setting_path, "root", recursive=True) # So much win logger.success(m18n.n("app_upgraded", app=app_instance_name)) From dbf579b7b4803e3f5478bd0dd3870dd92f10f8a6 Mon Sep 17 00:00:00 2001 From: alexAubin <4533074+alexAubin@users.noreply.github.com> Date: Sat, 29 Jun 2024 18:31:51 +0000 Subject: [PATCH 021/218] :art: Format Python code with Black --- src/app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index f01630d71..f7e17a269 100644 --- a/src/app.py +++ b/src/app.py @@ -863,7 +863,9 @@ def app_upgrade( hook_remove(app_instance_name) if "hooks" in os.listdir(extracted_app_folder): for hook in os.listdir(extracted_app_folder + "/hooks"): - hook_add(app_instance_name, extracted_app_folder + "/hooks/" + hook) + hook_add( + app_instance_name, extracted_app_folder + "/hooks/" + hook + ) # Replace scripts and manifest and conf (if exists) # Move scripts and manifest to the right place From ff78f3ada7c118869a7b1d8dfc07e1b6894dcc83 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 29 Jun 2024 20:57:21 +0200 Subject: [PATCH 022/218] automatically ignore the service in diagnosis if it has been deactivated with the ynh cli --- src/service.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/service.py b/src/service.py index b0dc82827..0a0c37378 100644 --- a/src/service.py +++ b/src/service.py @@ -26,6 +26,7 @@ from glob import glob from datetime import datetime from moulinette import m18n +from yunohost.utils.diagnosis import diagnosis_ignore, diagnosis_unignore from yunohost.utils.error import YunohostError, YunohostValidationError from moulinette.utils.process import check_output from moulinette.utils.log import getActionLogger @@ -296,6 +297,9 @@ def service_enable(names): names = [names] for name in names: if _run_service_command("enable", name): + services = _get_services() + if name in services: + diagnosis_unignore({"services": [{"service": name}]}) logger.success(m18n.n("service_enabled", service=name)) else: raise YunohostError( @@ -315,6 +319,9 @@ def service_disable(names): names = [names] for name in names: if _run_service_command("disable", name): + services = _get_services() + if name in services: + diagnosis_ignore({"services": [{"service": name}]}) logger.success(m18n.n("service_disabled", service=name)) else: raise YunohostError( From eaf00103dd72c01564f245f85f8e0ee68662c3ac Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 29 Jun 2024 20:57:59 +0200 Subject: [PATCH 023/218] Revert "automatically ignore the service in diagnosis if it has been deactivated with the ynh cli" This reverts commit ff78f3ada7c118869a7b1d8dfc07e1b6894dcc83. --- src/service.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/service.py b/src/service.py index 0a0c37378..b0dc82827 100644 --- a/src/service.py +++ b/src/service.py @@ -26,7 +26,6 @@ from glob import glob from datetime import datetime from moulinette import m18n -from yunohost.utils.diagnosis import diagnosis_ignore, diagnosis_unignore from yunohost.utils.error import YunohostError, YunohostValidationError from moulinette.utils.process import check_output from moulinette.utils.log import getActionLogger @@ -297,9 +296,6 @@ def service_enable(names): names = [names] for name in names: if _run_service_command("enable", name): - services = _get_services() - if name in services: - diagnosis_unignore({"services": [{"service": name}]}) logger.success(m18n.n("service_enabled", service=name)) else: raise YunohostError( @@ -319,9 +315,6 @@ def service_disable(names): names = [names] for name in names: if _run_service_command("disable", name): - services = _get_services() - if name in services: - diagnosis_ignore({"services": [{"service": name}]}) logger.success(m18n.n("service_disabled", service=name)) else: raise YunohostError( From 6ed167bfafc4c4f27fa463790fcfd76960b96564 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 29 Jun 2024 20:57:21 +0200 Subject: [PATCH 024/218] automatically ignore the service in diagnosis if it has been deactivated with the ynh cli --- src/service.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/service.py b/src/service.py index b0dc82827..0a0c37378 100644 --- a/src/service.py +++ b/src/service.py @@ -26,6 +26,7 @@ from glob import glob from datetime import datetime from moulinette import m18n +from yunohost.utils.diagnosis import diagnosis_ignore, diagnosis_unignore from yunohost.utils.error import YunohostError, YunohostValidationError from moulinette.utils.process import check_output from moulinette.utils.log import getActionLogger @@ -296,6 +297,9 @@ def service_enable(names): names = [names] for name in names: if _run_service_command("enable", name): + services = _get_services() + if name in services: + diagnosis_unignore({"services": [{"service": name}]}) logger.success(m18n.n("service_enabled", service=name)) else: raise YunohostError( @@ -315,6 +319,9 @@ def service_disable(names): names = [names] for name in names: if _run_service_command("disable", name): + services = _get_services() + if name in services: + diagnosis_ignore({"services": [{"service": name}]}) logger.success(m18n.n("service_disabled", service=name)) else: raise YunohostError( From eee84c5f6670d4e9be1c59516696e3d76347246a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 29 Jun 2024 21:32:53 +0200 Subject: [PATCH 025/218] helpers2.1: also run _ynh_apply_default_permissions in ynh_restore to be consistent (also because the user uid on the new system may be different than in the archive etc) --- helpers/helpers.v2.1.d/backup | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helpers/helpers.v2.1.d/backup b/helpers/helpers.v2.1.d/backup index 0668d3e17..a40c4f1f2 100644 --- a/helpers/helpers.v2.1.d/backup +++ b/helpers/helpers.v2.1.d/backup @@ -179,6 +179,8 @@ ynh_restore() { else mv "$archive_path" "${target}" fi + + _ynh_apply_default_permissions "$target" } # Restore all files that were previously backuped in an app backup script From c2271ab7310025affcbd73ba33c340ad92ec7712 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 29 Jun 2024 23:57:21 +0200 Subject: [PATCH 026/218] Update changelog for 11.2.19 --- debian/changelog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index f3d38c9c7..7a8dfacc9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +yunohost (11.2.19) stable; urgency=low + + - apps: tweaks to be more robust and prevent the stupid flood of 'sh: 0: getcwd() failed: No such file or directory' when running an app upgrade/remove from /var/www/$app, sometimes making it look like the upgrade failed when it didnt (a349fc03) + - apps: be more robust when an app upgrade succeeds but for some reason is marked with 'broke the system' ... ending up in inconsistent state between the app settings vs the app scritpts (for example in v1->v2 transitions but not only) (e5b57590) + - helpers2.1: Fix getopts error handling ... (3e1c9eba) + - helpers2.1: also run _ynh_apply_default_permissions in ynh_restore to be consistent (also because the user uid on the new system may be different than in the archive etc) (eee84c5f) + + -- Alexandre Aubin Sat, 29 Jun 2024 23:55:52 +0200 + yunohost (11.2.18) stable; urgency=low - helpers2.1: Rework _ynh_apply_default_permissions to hopefully remove the necessity to chown/chmod in the app scripts ([#1883](http://github.com/YunoHost/yunohost/pull/1883)) From a18d5f26f2b42191261d6ab3755ff838d69f8aa0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 30 Jun 2024 00:21:40 +0200 Subject: [PATCH 027/218] helpers2.1: zgrblg --- helpers/helpers.v2.1.d/go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/helpers.v2.1.d/go b/helpers/helpers.v2.1.d/go index c0b8e9022..bb272d50c 100644 --- a/helpers/helpers.v2.1.d/go +++ b/helpers/helpers.v2.1.d/go @@ -97,7 +97,7 @@ ynh_go_install () { test -x /usr/bin/go_goenv && mv /usr/bin/go_goenv /usr/bin/go # Install the requested version of Go - local final_go_version=$("$goenv_latest_dir/bin/goenv-latest" --print "$go_version") + local final_go_version=$("$GOENV_INSTALL_DIR/plugins/xxenv-latest/bin/goenv-latest" --print "$go_version") ynh_print_info "Installation of Go-$final_go_version" goenv install --quiet --skip-existing "$final_go_version" 2>&1 From 3f973669fc14de9fd45cbe1b376004b6d422d9fe Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 30 Jun 2024 01:37:56 +0200 Subject: [PATCH 028/218] helpers2.1: fix automigration of phpversion to php_version --- helpers/helpers.v2.1.d/php | 12 ------------ helpers/helpers.v2.1.d/setting | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/helpers/helpers.v2.1.d/php b/helpers/helpers.v2.1.d/php index 3cca2c8fb..b7165e010 100644 --- a/helpers/helpers.v2.1.d/php +++ b/helpers/helpers.v2.1.d/php @@ -3,18 +3,6 @@ # (this is used in the apt helpers, big meh ...) readonly YNH_DEFAULT_PHP_VERSION=7.4 -# Legacy: auto-convert phpversion to php_version (for consistency with nodejs_version, ruby_version, ...) -if [[ -n "${app:-}" ]] && [[ -n "${phpversion:-}" ]] -then - if [[ -z "${php_version:-}" ]] - then - php_version=$phpversion - ynh_app_setting_set --key=php_version --value=$php_version - fi - ynh_app_setting_delete --key=phpversion - unset phpversion -fi - # Create a dedicated PHP-FPM config # # usage: ynh_config_add_phpfpm diff --git a/helpers/helpers.v2.1.d/setting b/helpers/helpers.v2.1.d/setting index 82528efa5..01480331c 100644 --- a/helpers/helpers.v2.1.d/setting +++ b/helpers/helpers.v2.1.d/setting @@ -122,3 +122,18 @@ else: EOF eval "$xtrace_enable" } + +# Legacy: auto-convert phpversion to php_version (for consistency with nodejs_version, ruby_version, ...) +# This has to be here and not in the "php" code file because ynh_app_setting_set/delete need to be defined @_@ +if [[ -n "${app:-}" ]] && [[ -n "${phpversion:-}" ]] +then + if [[ -z "${php_version:-}" ]] + then + php_version=$phpversion + ynh_app_setting_set --key=php_version --value=$php_version + fi + ynh_app_setting_delete --key=phpversion + unset phpversion +fi + + From a48bfa67de552abcf9f9a14cc94c3fe072ffe5d3 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 30 Jun 2024 17:46:52 +0200 Subject: [PATCH 029/218] helpers2.1: change source patches location + raise an error instead of a warning when a patch fails to apply on CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Félix Piédallu --- helpers/helpers.v2.1.d/sources | 38 ++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/helpers/helpers.v2.1.d/sources b/helpers/helpers.v2.1.d/sources index c0c2fb863..59dd4f12d 100644 --- a/helpers/helpers.v2.1.d/sources +++ b/helpers/helpers.v2.1.d/sources @@ -8,11 +8,7 @@ # | arg: --keep= - Space-separated list of files/folders that will be backup/restored in $dest_dir, such as a config file you don't want to overwrite. For example 'conf.json secrets.json logs' (no trailing `/` for folders) # | arg: --full_replace= - Remove previous sources before installing new sources (can be 1 or 0, default to 0) # -# ##### New 'sources' resources -# -# (See also the resources documentation which may be more complete?) -# -# This helper will read infos from the 'sources' resources in the manifest.toml of the app +# This helper will read infos from the 'sources' resources in the `manifest.toml` of the app # and expect a structure like: # # ```toml @@ -22,7 +18,9 @@ # sha256 = "0123456789abcdef" # The sha256 sum of the asset obtained from the URL # ``` # -# ##### Optional flags +# (See also the resources documentation which may be more complete?) +# +# ##### Optional flags in the 'sources' resource # # ```text # format = "tar.gz"/xz/bz2 # automatically guessed from the extension of the URL, but can be set explicitly. Will use `tar` to extract @@ -60,7 +58,8 @@ # - Uncompress the archive to `$dest_dir`. # - If `in_subdir` is true, the first level directory of the archive will be removed. # - If `in_subdir` is a numeric value, the N first level directories will be removed. -# - Patches named `patches/${src_id}-*.patch` will be applied to `$dest_dir` +# - Patches named `patches/${src_id}/*.patch` will be applied to `$dest_dir` +# - Apply sane default permissions (see _ynh_apply_default_permissions) ynh_setup_source() { # ============ Argument parsing ============= local -A args_array=([d]=dest_dir= [s]=source_id= [k]=keep= [r]=full_replace) @@ -222,17 +221,20 @@ ynh_setup_source() { fi # Apply patches - if [ -d "$YNH_APP_BASEDIR/patches/" ]; then - local patches_folder=$(realpath $YNH_APP_BASEDIR/patches/) - # Check if any file matching the pattern exists, cf https://stackoverflow.com/a/34195247 - if compgen -G "$patches_folder/${source_id}-*.patch" >/dev/null; then - pushd "$dest_dir" - for p in $patches_folder/${source_id}-*.patch; do - echo $p - patch --strip=1 <$p || ynh_print_warn "Packagers /!\\ patch $p failed to apply" - done - popd - fi + local patches_folder=$(realpath "$YNH_APP_BASEDIR/patches/$source_id") + if [ -d "$patches_folder" ]; then + pushd "$dest_dir" + for patchfile in "$patches_folder/"*.patch; do + echo "Applying $patchfile" + if ! patch --strip=1 < "$patchfile"; then + if ynh_in_ci_tests; then + ynh_die "Patch $patchfile failed to apply!" + else + ynh_print_warn "Warn your packagers /!\\ Patch $patchfile failed to apply" + fi + fi + done + popd fi # Keep files to be backup/restored at the end of the helper From 20741c63aafe11f4443319a35dbfb4b00732c6ca Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sun, 30 Jun 2024 18:28:18 +0200 Subject: [PATCH 030/218] change an irrelevant error to a warning --- src/diagnosis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diagnosis.py b/src/diagnosis.py index 9e5d4235d..3f20f9093 100644 --- a/src/diagnosis.py +++ b/src/diagnosis.py @@ -322,7 +322,7 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False): configuration["ignore_filters"][category] = [] if criterias not in configuration["ignore_filters"][category]: - raise YunohostValidationError("This filter does not exists.") + logger.warning("This filter does not exists.") configuration["ignore_filters"][category].remove(criterias) _diagnosis_write_configuration(configuration) From 5ef0c84c0f438ebfe5d73b560a95034a4f48c665 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Sun, 30 Jun 2024 18:34:38 +0200 Subject: [PATCH 031/218] Update tools.py: use _run_service_command to enable+start yunohost-firewall during postinstall and prevent a warning about lack of diagnosis ignore rule --- src/tools.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools.py b/src/tools.py index 7c6b39d5c..726841e48 100644 --- a/src/tools.py +++ b/src/tools.py @@ -41,7 +41,6 @@ from yunohost.app_catalog import ( ) from yunohost.domain import domain_add from yunohost.firewall import firewall_upnp -from yunohost.service import service_start, service_enable from yunohost.regenconf import regen_conf from yunohost.utils.system import ( _dump_sources_list, @@ -156,6 +155,7 @@ def tools_postinstall( force_diskspace=False, overwrite_root_password=True, ): + from yunohost.service import _run_service_command from yunohost.dyndns import _dyndns_available, dyndns_unsubscribe from yunohost.utils.dns import is_yunohost_dyndns_domain from yunohost.utils.password import ( @@ -270,8 +270,8 @@ def tools_postinstall( os.system("touch /etc/yunohost/installed") # Enable and start YunoHost firewall at boot time - service_enable("yunohost-firewall") - service_start("yunohost-firewall") + _run_service_command("enable", "yunohost-firewall") + _run_service_command("start", "yunohost-firewall") regen_conf(names=["ssh"], force=True) From 9727765ecff6d4a035224db0d1071ab01f8e9675 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Sun, 30 Jun 2024 18:39:11 +0200 Subject: [PATCH 032/218] Update diagnosis.py: improve warning to make it more explicit when called from another context --- src/diagnosis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/diagnosis.py b/src/diagnosis.py index 3f20f9093..2244b6795 100644 --- a/src/diagnosis.py +++ b/src/diagnosis.py @@ -304,7 +304,7 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False): configuration["ignore_filters"][category] = [] if criterias in configuration["ignore_filters"][category]: - logger.warning("This filter already exists.") + logger.warning(f"(There is already a diagnosis {category} filter with these criterias)") return configuration["ignore_filters"][category].append(criterias) @@ -322,7 +322,7 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False): configuration["ignore_filters"][category] = [] if criterias not in configuration["ignore_filters"][category]: - logger.warning("This filter does not exists.") + logger.warning(f"(There is no such diagnosis {category} filter with these criterias to remove)") configuration["ignore_filters"][category].remove(criterias) _diagnosis_write_configuration(configuration) From c0bccc3ac9bfe289108d7b4aad922c89317f3e55 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Sun, 30 Jun 2024 18:40:23 +0200 Subject: [PATCH 033/218] Update diagnosis.py: gotta "return" now if the key doesn't exist, otherwise the next code fails --- src/diagnosis.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/diagnosis.py b/src/diagnosis.py index 2244b6795..8fd3ffd45 100644 --- a/src/diagnosis.py +++ b/src/diagnosis.py @@ -323,6 +323,7 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False): if criterias not in configuration["ignore_filters"][category]: logger.warning(f"(There is no such diagnosis {category} filter with these criterias to remove)") + return configuration["ignore_filters"][category].remove(criterias) _diagnosis_write_configuration(configuration) From 636c9e563ec3a697facaf77de9d7b3ddb8d1755b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Sun, 30 Jun 2024 18:41:50 +0200 Subject: [PATCH 034/218] Update diagnosis.py: more messages improvement --- src/diagnosis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/diagnosis.py b/src/diagnosis.py index 8fd3ffd45..7b9975db2 100644 --- a/src/diagnosis.py +++ b/src/diagnosis.py @@ -309,7 +309,7 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False): configuration["ignore_filters"][category].append(criterias) _diagnosis_write_configuration(configuration) - logger.success("Filter added") + logger.success(f"Added a {category} diagnosis filter") return if remove_filter: @@ -327,7 +327,7 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False): configuration["ignore_filters"][category].remove(criterias) _diagnosis_write_configuration(configuration) - logger.success("Filter removed") + logger.success(f"Removed a {category} diagnosis filter") return From 4b43d8d99d621f339eb967e4694a1708afbd2a57 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Sun, 30 Jun 2024 18:52:19 +0200 Subject: [PATCH 035/218] Update service.py: typo --- src/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service.py b/src/service.py index 0a0c37378..db96a099a 100644 --- a/src/service.py +++ b/src/service.py @@ -26,7 +26,7 @@ from glob import glob from datetime import datetime from moulinette import m18n -from yunohost.utils.diagnosis import diagnosis_ignore, diagnosis_unignore +from yunohost.diagnosis import diagnosis_ignore, diagnosis_unignore from yunohost.utils.error import YunohostError, YunohostValidationError from moulinette.utils.process import check_output from moulinette.utils.log import getActionLogger From f2b5f0f22cd3b88e17579b842b607be6d2ab49a4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 30 Jun 2024 18:53:41 +0200 Subject: [PATCH 036/218] helpers2.1: when using ynh_die, also return the error via YNH_STDRETURN such that it can be obtained from the python and displayed in the main error message, to increase the chance that people may read it and have something more useful than "An error happened in the script" --- helpers/helpers.v2.1.d/apt | 4 ++-- helpers/helpers.v2.1.d/logging | 6 +++++- src/hook.py | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/helpers/helpers.v2.1.d/apt b/helpers/helpers.v2.1.d/apt index d8425ee58..4c78a2147 100644 --- a/helpers/helpers.v2.1.d/apt +++ b/helpers/helpers.v2.1.d/apt @@ -134,12 +134,12 @@ EOF # Fake an install of those dependencies to see the errors # The sed command here is, Print only from 'Reading state info' to the end. [[ -n "$problematic_dependencies" ]] && _ynh_apt_install $problematic_dependencies --dry-run 2>&1 | sed --quiet '/Reading state info/,$p' | grep -v "fix-broken\|Reading state info" >&2 - ynh_die "Unable to install dependencies" + ynh_die "Unable to install apt dependencies" } rm --recursive --force "$TMPDIR" # Remove the temp dir. # check if the package is actually installed - _ynh_apt_package_is_installed "${app_ynh_deps}" || ynh_die "Unable to install dependencies" + _ynh_apt_package_is_installed "${app_ynh_deps}" || ynh_die "Unable to install apt dependencies" # Specific tweak related to Postgresql # -> trigger postgresql regenconf if we may have just installed postgresql diff --git a/helpers/helpers.v2.1.d/logging b/helpers/helpers.v2.1.d/logging index 4649cf670..eb4ddbb59 100644 --- a/helpers/helpers.v2.1.d/logging +++ b/helpers/helpers.v2.1.d/logging @@ -4,7 +4,11 @@ # # usage: ynh_die "Some message" ynh_die() { - echo "$1" 1>&2 + if [[ -n "${1:-}" ]] + then + python3 -c 'import yaml, sys; print(yaml.dump({"error": sys.stdin.read()}))' <<< "${1:-}" >>"$YNH_STDRETURN" + echo "${1:-}" 1>&2 + fi exit 1 } diff --git a/src/hook.py b/src/hook.py index ee9f08e48..49c2f4cc3 100644 --- a/src/hook.py +++ b/src/hook.py @@ -538,6 +538,9 @@ def hook_exec_with_script_debug_if_failure(*args, **kwargs): failed = True if retcode != 0 else False if failed: error = error_message_if_script_failed + # check more specific error message added by ynh_die in $YNH_STDRETURN + if isinstance(retpayload, dict) and "error" in retpayload: + error += " : " + retpayload["error"].strip() logger.error(error_message_if_failed(error)) failure_message_with_debug_instructions = operation_logger.error(error) if Moulinette.interface.type != "api": From fcaa366e9154740ed72cc22c55848604b63cb007 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 30 Jun 2024 19:28:18 +0200 Subject: [PATCH 037/218] helpers2.1: zzzz --- helpers/helpers.v2.1.d/utils | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/helpers.v2.1.d/utils b/helpers/helpers.v2.1.d/utils index 859cd29d9..5d2c72e16 100644 --- a/helpers/helpers.v2.1.d/utils +++ b/helpers/helpers.v2.1.d/utils @@ -272,7 +272,7 @@ _ynh_apply_default_permissions() { fi # Files inside should be owned by $app with rw-r----- (+x for folders or files that already have +x) # The group needs read/dirtraversal (in particular if it's www-data) - chmod -R u=rwX,g=r-X,o=--- "$target" + chmod -R u=rwX,g=rX,o=--- "$target" chown -R "$app:$group" "$target" return fi From 1e1409c7d7fb708f8832570e81a7e1f52be8086d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 30 Jun 2024 19:43:18 +0200 Subject: [PATCH 038/218] helpers2.1: logging tweak in ynh_die --- helpers/helpers.v2.1.d/logging | 1 + 1 file changed, 1 insertion(+) diff --git a/helpers/helpers.v2.1.d/logging b/helpers/helpers.v2.1.d/logging index eb4ddbb59..1d729178a 100644 --- a/helpers/helpers.v2.1.d/logging +++ b/helpers/helpers.v2.1.d/logging @@ -4,6 +4,7 @@ # # usage: ynh_die "Some message" ynh_die() { + set +o xtrace # set +x if [[ -n "${1:-}" ]] then python3 -c 'import yaml, sys; print(yaml.dump({"error": sys.stdin.read()}))' <<< "${1:-}" >>"$YNH_STDRETURN" From 1c62960e25c9004162a0cdc272dd2898b85952f6 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 30 Jun 2024 20:10:21 +0200 Subject: [PATCH 039/218] helpers2.1: remove the ynh_clean_setup mechanism underused/useless.. --- helpers/helpers.v2.1.d/utils | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/helpers/helpers.v2.1.d/utils b/helpers/helpers.v2.1.d/utils index 5d2c72e16..4c611395d 100644 --- a/helpers/helpers.v2.1.d/utils +++ b/helpers/helpers.v2.1.d/utils @@ -6,17 +6,6 @@ YNH_APP_BASEDIR=${YNH_APP_BASEDIR:-$(realpath ..)} # # [internal] # -# usage: -# ynh_exit_properly is used only by the helper ynh_abort_if_errors. -# You should not use it directly. -# Instead, add to your script: -# ynh_clean_setup () { -# instructions... -# } -# -# This function provide a way to clean some residual of installation that not managed by remove script. -# -# It prints a warning to inform that the script was failed, and execute the ynh_clean_setup function if used in the app script ynh_exit_properly() { local exit_code=$? @@ -37,10 +26,6 @@ ynh_exit_properly() { # Small tempo to avoid the next message being mixed up with other DEBUG messages sleep 0.5 - if type -t ynh_clean_setup >/dev/null; then # Check if the function exist in the app script. - ynh_clean_setup # Call the function to do specific cleaning for the app. - fi - # Exit with error status # We don't call ynh_die basically to avoid unecessary 10-ish # debug lines about parsing args and stuff just to exit 1.. @@ -55,7 +40,6 @@ ynh_exit_properly() { # # This configure the rest of the script execution such that, if an error occurs # or if an empty variable is used, the execution of the script stops immediately -# and a call to `ynh_clean_setup` is triggered if it has been defined by your script. ynh_abort_if_errors() { set -o errexit # set -e; Exit if a command fail set -o nounset # set -u; And if a variable is used unset From e75b4b3b3b59eac81e7873e48a001b6c2965f7a6 Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Sun, 30 Jun 2024 20:16:51 +0200 Subject: [PATCH 040/218] add support for downloading tar-files this is needed for invoiceninja, see https://github.com/YunoHost-Apps/invoiceninja5_ynh/pull/280 --- helpers/helpers.v2.1.d/sources | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/helpers/helpers.v2.1.d/sources b/helpers/helpers.v2.1.d/sources index 59dd4f12d..656819ec7 100644 --- a/helpers/helpers.v2.1.d/sources +++ b/helpers/helpers.v2.1.d/sources @@ -23,10 +23,10 @@ # ##### Optional flags in the 'sources' resource # # ```text -# format = "tar.gz"/xz/bz2 # automatically guessed from the extension of the URL, but can be set explicitly. Will use `tar` to extract -# "zip" # automatically guessed from the extension of the URL, but can be set explicitly. Will use `unzip` to extract -# "docker" # useful to extract files from an already-built docker image (instead of rebuilding them locally). Will use `docker-image-extract` to extract -# "whatever" # an arbitrary value, not really meaningful except to imply that the file won't be extracted +# format = "tar.gz"/xz/bz2/tar # automatically guessed from the extension of the URL, but can be set explicitly. Will use `tar` to extract +# "zip" # automatically guessed from the extension of the URL, but can be set explicitly. Will use `unzip` to extract +# "docker" # useful to extract files from an already-built docker image (instead of rebuilding them locally). Will use `docker-image-extract` to extract +# "whatever" # an arbitrary value, not really meaningful except to imply that the file won't be extracted # # in_subdir = true # default, there's an intermediate subdir in the archive before accessing the actual files # false # sources are directly in the archive root @@ -107,6 +107,8 @@ ynh_setup_source() { elif [[ "$src_url" =~ ^.*\.tar\.bz2$ ]] then src_format="tar.bz2" + elif [[ "$src_url" =~ ^.*\.tar$ ]] + src_format="tar" elif [[ -z "$src_extract" ]] then src_extract="false" @@ -212,7 +214,7 @@ ynh_setup_source() { fi strip="--strip-components $sub_dirs" fi - if [[ "$src_format" =~ ^tar.gz|tar.bz2|tar.xz$ ]]; then + if [[ "$src_format" =~ ^tar.gz|tar.bz2|tar.xz|tar$ ]]; then tar --extract --file=$src_filename --directory="$dest_dir" $strip else ynh_die "Archive format unrecognized." From 7b0383f865e1375c0827b03dcac3ab0e2c1798f3 Mon Sep 17 00:00:00 2001 From: alexAubin <4533074+alexAubin@users.noreply.github.com> Date: Sun, 30 Jun 2024 19:38:06 +0000 Subject: [PATCH 041/218] :art: Format Python code with Black --- src/diagnosis.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/diagnosis.py b/src/diagnosis.py index 7b9975db2..c56c2f22c 100644 --- a/src/diagnosis.py +++ b/src/diagnosis.py @@ -304,7 +304,9 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False): configuration["ignore_filters"][category] = [] if criterias in configuration["ignore_filters"][category]: - logger.warning(f"(There is already a diagnosis {category} filter with these criterias)") + logger.warning( + f"(There is already a diagnosis {category} filter with these criterias)" + ) return configuration["ignore_filters"][category].append(criterias) @@ -322,7 +324,9 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False): configuration["ignore_filters"][category] = [] if criterias not in configuration["ignore_filters"][category]: - logger.warning(f"(There is no such diagnosis {category} filter with these criterias to remove)") + logger.warning( + f"(There is no such diagnosis {category} filter with these criterias to remove)" + ) return configuration["ignore_filters"][category].remove(criterias) From ef622ffe4d52415887edef9a926abd81ad57bf9e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Jul 2024 18:24:58 +0200 Subject: [PATCH 042/218] helpers2.1: switch to posisional args for ynh_multimedia_addaccess because that's what 99% of apps already do --- helpers/helpers.v2.1.d/multimedia | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/helpers/helpers.v2.1.d/multimedia b/helpers/helpers.v2.1.d/multimedia index d71346969..270ae1950 100644 --- a/helpers/helpers.v2.1.d/multimedia +++ b/helpers/helpers.v2.1.d/multimedia @@ -78,19 +78,12 @@ ynh_multimedia_addfolder() { setfacl -RL -m m::rwx "$source_dir" } -# Allow an user to have an write authorisation in multimedia directories +# Add an user to the multimedia group, in turn having write permission in multimedia directories # # usage: ynh_multimedia_addaccess user_name # -# | arg: --user_name= - The name of the user which gain this access. +# | arg: user_name - The name of the user which gain this access. ynh_multimedia_addaccess() { - - # ============ Argument parsing ============= - local -A args_array=([u]=user_name=) - local user_name - ynh_handle_getopts_args "$@" - # =========================================== - groupadd -f multimedia - usermod -a -G multimedia $user_name + usermod -a -G multimedia $1 } From 50034aabddc6222f3cce3be9b8d1f787a34bd209 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Jul 2024 18:49:36 +0200 Subject: [PATCH 043/218] helpers2.1: use the MEDIA_GROUP global var for consistency --- helpers/helpers.v2.1.d/multimedia | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/helpers.v2.1.d/multimedia b/helpers/helpers.v2.1.d/multimedia index 270ae1950..630e92ecc 100644 --- a/helpers/helpers.v2.1.d/multimedia +++ b/helpers/helpers.v2.1.d/multimedia @@ -84,6 +84,6 @@ ynh_multimedia_addfolder() { # # | arg: user_name - The name of the user which gain this access. ynh_multimedia_addaccess() { - groupadd -f multimedia - usermod -a -G multimedia $1 + groupadd -f $MEDIA_GROUP + usermod -a -G $MEDIA_GROUP $1 } From 6b77e19bbdef6be7a4d19716999b590b6c365dc7 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Jul 2024 18:49:47 +0200 Subject: [PATCH 044/218] Update changelog for 11.2.20 --- debian/changelog | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7a8dfacc9..21ddd5311 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +yunohost (11.2.20) stable; urgency=low + + - helpers2.1: fix automigration of phpversion to php_version (3f973669) + - helpers2.1: change source patches location + raise an error instead of a warning when a patch fails to apply on CI (a48bfa67) + - helpers2.1: when using ynh_die, also return the error via YNH_STDRETURN such that it can be obtained from the python and displayed in the main error message, to increase the chance that people may read it and have something more useful than "An error happened in the script" (f2b5f0f2) + - helpers2.1: remove the ynh_clean_setup mechanism underused/useless.. (1c62960e) + - helpers2.1: switch to posisional args for ynh_multimedia_addaccess because that's what 99% of apps already do (ef622ffe) + - helpers2.1: add support for downloading .tar files ([#1889](http://github.com/YunoHost/yunohost/pull/1889)) + - services/diagnosis: automatically ignore the service in diagnosis if it has been deactivated with the ynh cli ([#1886](http://github.com/YunoHost/yunohost/pull/1886)) + + Thanks to all contributors <3 ! (alexAubin, OniriCorpe, Sebastian Gumprich) + + -- Alexandre Aubin Mon, 01 Jul 2024 18:46:52 +0200 + yunohost (11.2.19) stable; urgency=low - apps: tweaks to be more robust and prevent the stupid flood of 'sh: 0: getcwd() failed: No such file or directory' when running an app upgrade/remove from /var/www/$app, sometimes making it look like the upgrade failed when it didnt (a349fc03) From 1ed56952e62db6273d0e0fd546095adea3419033 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Jul 2024 20:25:10 +0200 Subject: [PATCH 045/218] What do we say about testing before releasing? Not today! --- helpers/helpers.v2.1.d/sources | 1 + 1 file changed, 1 insertion(+) diff --git a/helpers/helpers.v2.1.d/sources b/helpers/helpers.v2.1.d/sources index 656819ec7..312014b67 100644 --- a/helpers/helpers.v2.1.d/sources +++ b/helpers/helpers.v2.1.d/sources @@ -108,6 +108,7 @@ ynh_setup_source() { then src_format="tar.bz2" elif [[ "$src_url" =~ ^.*\.tar$ ]] + then src_format="tar" elif [[ -z "$src_extract" ]] then From 92807afb160432cde550ad782d562dc3f3ea2191 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Jul 2024 20:55:45 +0200 Subject: [PATCH 046/218] helpers: yolo add tests for helpersv2.1 --- .gitlab/ci/test.gitlab-ci.yml | 11 +- tests/test_helpers.sh | 5 +- tests/test_helpers.v2.1.d/ynhtest_apt.sh | 22 + .../ynhtest_config.sh | 0 tests/test_helpers.v2.1.d/ynhtest_logging.sh | 92 +++ tests/test_helpers.v2.1.d/ynhtest_safe_rm.sh | 71 ++ tests/test_helpers.v2.1.d/ynhtest_settings.sh | 63 ++ .../ynhtest_setup_source.sh | 111 +++ .../test_helpers.v2.1.d/ynhtest_templating.sh | 62 ++ .../ynhtest_user.sh | 0 .../ynhtest_apt.sh | 0 tests/test_helpers.v2.d/ynhtest_config.sh | 662 ++++++++++++++++++ .../ynhtest_logging.sh | 0 .../ynhtest_network.sh | 0 .../ynhtest_secure_remove.sh | 0 .../ynhtest_settings.sh | 0 .../ynhtest_setup_source.sh | 0 .../ynhtest_templating.sh | 0 tests/test_helpers.v2.d/ynhtest_user.sh | 25 + 19 files changed, 1119 insertions(+), 5 deletions(-) create mode 100644 tests/test_helpers.v2.1.d/ynhtest_apt.sh rename tests/{test_helpers.d => test_helpers.v2.1.d}/ynhtest_config.sh (100%) create mode 100644 tests/test_helpers.v2.1.d/ynhtest_logging.sh create mode 100644 tests/test_helpers.v2.1.d/ynhtest_safe_rm.sh create mode 100644 tests/test_helpers.v2.1.d/ynhtest_settings.sh create mode 100644 tests/test_helpers.v2.1.d/ynhtest_setup_source.sh create mode 100644 tests/test_helpers.v2.1.d/ynhtest_templating.sh rename tests/{test_helpers.d => test_helpers.v2.1.d}/ynhtest_user.sh (100%) rename tests/{test_helpers.d => test_helpers.v2.d}/ynhtest_apt.sh (100%) create mode 100644 tests/test_helpers.v2.d/ynhtest_config.sh rename tests/{test_helpers.d => test_helpers.v2.d}/ynhtest_logging.sh (100%) rename tests/{test_helpers.d => test_helpers.v2.d}/ynhtest_network.sh (100%) rename tests/{test_helpers.d => test_helpers.v2.d}/ynhtest_secure_remove.sh (100%) rename tests/{test_helpers.d => test_helpers.v2.d}/ynhtest_settings.sh (100%) rename tests/{test_helpers.d => test_helpers.v2.d}/ynhtest_setup_source.sh (100%) rename tests/{test_helpers.d => test_helpers.v2.d}/ynhtest_templating.sh (100%) create mode 100644 tests/test_helpers.v2.d/ynhtest_user.sh diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index cded5bf7d..349665b68 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -57,14 +57,17 @@ test-actionmap: changes: - share/actionsmap.yml -test-helpers: +test-helpers2: extends: .test-stage script: - cd tests - bash test_helpers.sh -# only: -# changes: -# - helpers/* + +test-helpers2.1: + extends: .test-stage + script: + - cd tests + - bash test_helpers.sh 2.1 test-domains: extends: .test-stage diff --git a/tests/test_helpers.sh b/tests/test_helpers.sh index a2ccb75c4..78299f59c 100644 --- a/tests/test_helpers.sh +++ b/tests/test_helpers.sh @@ -1,5 +1,7 @@ #!/bin/bash +VERSION=${1:-2} + readonly NORMAL=$(printf '\033[0m') readonly BOLD=$(printf '\033[1m') readonly RED=$(printf '\033[31m') @@ -47,7 +49,7 @@ getent passwd ynhtest &>/dev/null || useradd --system ynhtest # ========================================================= -for TEST_SUITE in $(ls test_helpers.d/*) +for TEST_SUITE in $(ls test_helpers.v$VERSION.d/*) do source $TEST_SUITE done @@ -64,6 +66,7 @@ do (mkdir conf mkdir scripts cd scripts + export YNH_HELPERS_VERSION=$VERSION source /usr/share/yunohost/helpers app=ynhtest YNH_APP_ID=$app diff --git a/tests/test_helpers.v2.1.d/ynhtest_apt.sh b/tests/test_helpers.v2.1.d/ynhtest_apt.sh new file mode 100644 index 000000000..e415c8135 --- /dev/null +++ b/tests/test_helpers.v2.1.d/ynhtest_apt.sh @@ -0,0 +1,22 @@ +ynhtest_apt_install_apt_deps_regular() { + + dpkg --list | grep -q "ii *$app-ynh-deps" && apt remove $app-ynh-deps --assume-yes || true + dpkg --list | grep -q 'ii *nyancat' && apt remove nyancat --assume-yes || true + dpkg --list | grep -q 'ii *sl' && apt remove sl --assume-yes || true + + ! _ynh_apt_package_is_installed "$app-ynh-deps" + ! _ynh_apt_package_is_installed "nyancat" + ! _ynh_apt_package_is_installed "sl" + + ynh_apt_install_dependencies "nyancat sl" + + _ynh_apt_package_is_installed "$app-ynh-deps" + _ynh_apt_package_is_installed "nyancat" + _ynh_apt_package_is_installed "sl" + + ynh_apt_remove_dependencies + + ! _ynh_apt_package_is_installed "$app-ynh-deps" + ! _ynh_apt_package_is_installed "nyancat" + ! _ynh_apt_package_is_installed "sl" +} diff --git a/tests/test_helpers.d/ynhtest_config.sh b/tests/test_helpers.v2.1.d/ynhtest_config.sh similarity index 100% rename from tests/test_helpers.d/ynhtest_config.sh rename to tests/test_helpers.v2.1.d/ynhtest_config.sh diff --git a/tests/test_helpers.v2.1.d/ynhtest_logging.sh b/tests/test_helpers.v2.1.d/ynhtest_logging.sh new file mode 100644 index 000000000..1b2452bc4 --- /dev/null +++ b/tests/test_helpers.v2.1.d/ynhtest_logging.sh @@ -0,0 +1,92 @@ +ynhtest_exec_warn_less() { + + FOO='foo' + bar="" + BAR='$bar' + FOOBAR="foo bar" + + # These looks like stupid edge case + # but in fact happens when dealing with passwords + # (which could also contain bash chars like [], {}, ...) + # or urls containing &, ... + FOOANDBAR="foo&bar" + FOO1QUOTEBAR="foo'bar" + FOO2QUOTEBAR="foo\"bar" + + ynh_hide_warnings uptime + + test ! -e $FOO + ynh_hide_warnings touch $FOO + test -e $FOO + rm $FOO + + test ! -e $FOO1QUOTEBAR + ynh_hide_warnings touch $FOO1QUOTEBAR + test -e $FOO1QUOTEBAR + rm $FOO1QUOTEBAR + + test ! -e $FOO2QUOTEBAR + ynh_hide_warnings touch $FOO2QUOTEBAR + test -e $FOO2QUOTEBAR + rm $FOO2QUOTEBAR + + test ! -e $BAR + ynh_hide_warnings touch $BAR + test -e $BAR + rm $BAR + + test ! -e "$FOOBAR" + ynh_hide_warnings touch "$FOOBAR" + test -e "$FOOBAR" + rm "$FOOBAR" + + test ! -e "$FOOANDBAR" + ynh_hide_warnings touch $FOOANDBAR + test -e "$FOOANDBAR" + rm "$FOOANDBAR" + + ########################### + # Legacy stuff using eval # + ########################### + + test ! -e $FOO + ynh_hide_warnings "touch $FOO" + test -e $FOO + rm $FOO + + test ! -e $FOO1QUOTEBAR + ynh_hide_warnings "touch \"$FOO1QUOTEBAR\"" + # (this works but expliciy *double* quotes have to be provided) + test -e $FOO1QUOTEBAR + rm $FOO1QUOTEBAR + + #test ! -e $FOO2QUOTEBAR + #ynh_hide_warnings "touch \'$FOO2QUOTEBAR\'" + ## (this doesn't work with simple or double quotes) + #test -e $FOO2QUOTEBAR + #rm $FOO2QUOTEBAR + + test ! -e $BAR + ynh_hide_warnings 'touch $BAR' + # That one works because $BAR is only interpreted during eval + test -e $BAR + rm $BAR + + #test ! -e $BAR + #ynh_hide_warnings "touch $BAR" + # That one doesn't work because $bar gets interpreted as empty var by eval... + #test -e $BAR + #rm $BAR + + test ! -e "$FOOBAR" + ynh_hide_warnings "touch \"$FOOBAR\"" + # (works but requires explicit double quotes otherwise eval would interpret 'foo bar' as two separate args..) + test -e "$FOOBAR" + rm "$FOOBAR" + + test ! -e "$FOOANDBAR" + ynh_hide_warnings "touch \"$FOOANDBAR\"" + # (works but requires explicit double quotes otherwise eval would interpret '&' as a "run command in background" and also bar is not a valid command) + test -e "$FOOANDBAR" + rm "$FOOANDBAR" +} diff --git a/tests/test_helpers.v2.1.d/ynhtest_safe_rm.sh b/tests/test_helpers.v2.1.d/ynhtest_safe_rm.sh new file mode 100644 index 000000000..a967d6f8a --- /dev/null +++ b/tests/test_helpers.v2.1.d/ynhtest_safe_rm.sh @@ -0,0 +1,71 @@ +ynhtest_acceptable_path_to_delete() { + + mkdir -p /home/someuser + mkdir -p /home/$app + mkdir -p /home/yunohost.app/$app + mkdir -p /var/www/$app + touch /var/www/$app/bar + touch /etc/cron.d/$app + + ! _acceptable_path_to_delete / + ! _acceptable_path_to_delete //// + ! _acceptable_path_to_delete " //// " + ! _acceptable_path_to_delete /var + ! _acceptable_path_to_delete /var/www + ! _acceptable_path_to_delete /var/cache + ! _acceptable_path_to_delete /usr + ! _acceptable_path_to_delete /usr/bin + ! _acceptable_path_to_delete /home + ! _acceptable_path_to_delete /home/yunohost.backup + ! _acceptable_path_to_delete /home/yunohost.app + ! _acceptable_path_to_delete /home/yunohost.app/ + ! _acceptable_path_to_delete ///home///yunohost.app/// + ! _acceptable_path_to_delete /home/yunohost.app/$app/.. + ! _acceptable_path_to_delete ///home///yunohost.app///$app///..// + ! _acceptable_path_to_delete /home/yunohost.app/../$app/.. + ! _acceptable_path_to_delete /home/someuser + ! _acceptable_path_to_delete /home/yunohost.app//../../$app + ! _acceptable_path_to_delete " /home/yunohost.app/// " + ! _acceptable_path_to_delete /etc/cron.d/ + ! _acceptable_path_to_delete /etc/yunohost/ + + _acceptable_path_to_delete /home/yunohost.app/$app + _acceptable_path_to_delete /home/yunohost.app/$app/bar + _acceptable_path_to_delete /etc/cron.d/$app + _acceptable_path_to_delete /var/www/$app/bar + _acceptable_path_to_delete /var/www/$app + + rm /var/www/$app/bar + rm /etc/cron.d/$app + rmdir /home/yunohost.app/$app + rmdir /home/$app + rmdir /home/someuser + rmdir /var/www/$app +} + +ynhtest_safe_rm() { + + mkdir -p /home/someuser + mkdir -p /home/yunohost.app/$app + mkdir -p /var/www/$app + mkdir -p /var/whatever + touch /var/www/$app/bar + touch /etc/cron.d/$app + + ! ynh_safe_rm "/home/someuser" + ! ynh_safe_rm "/home/yunohost.app/" + ! ynh_safe_rm "/var/whatever" + ynh_safe_rm "/home/yunohost.app/$app" + ynh_safe_rm "/var/www/$app" + ynh_safe_rm "/etc/cron.d/$app" + + test -e /home/someuser + test -e /home/yunohost.app + test -e /var/whatever + ! test -e /home/yunohost.app/$app + ! test -e /var/www/$app + ! test -e /etc/cron.d/$app + + rmdir /home/someuser + rmdir /var/whatever +} diff --git a/tests/test_helpers.v2.1.d/ynhtest_settings.sh b/tests/test_helpers.v2.1.d/ynhtest_settings.sh new file mode 100644 index 000000000..be765be82 --- /dev/null +++ b/tests/test_helpers.v2.1.d/ynhtest_settings.sh @@ -0,0 +1,63 @@ +ynhtest_settings() { + + test -n "$app" + + mkdir -p "/etc/yunohost/apps/$app" + echo "label: $app" > "/etc/yunohost/apps/$app/settings.yml" + + test -z "$(ynh_app_setting_get --key="foo")" + test -z "$(ynh_app_setting_get --key="bar")" + test -z "$(ynh_app_setting_get --app="$app" --key="baz")" + + ynh_app_setting_set --key="foo" --value="foovalue" + ynh_app_setting_set --app="$app" --key="bar" --value="barvalue" + ynh_app_setting_set "$app" baz bazvalue + + test "$(ynh_app_setting_get --key="foo")" == "foovalue" + test "$(ynh_app_setting_get --key="bar")" == "barvalue" + test "$(ynh_app_setting_get --app="$app" --key="baz")" == "bazvalue" + + ynh_app_setting_delete --key="foo" + ynh_app_setting_delete --app="$app" --key="bar" + ynh_app_setting_delete "$app" baz + + test -z "$(ynh_app_setting_get --key="foo")" + test -z "$(ynh_app_setting_get --key="bar")" + test -z "$(ynh_app_setting_get --app="$app" --key="baz")" + + rm -rf "/etc/yunohost/apps/$app" +} + +ynhtest_setting_set_default() { + + test -n "$app" + + mkdir -p "/etc/yunohost/apps/$app" + echo "label: $app" > "/etc/yunohost/apps/$app/settings.yml" + + test -z "$(ynh_app_setting_get --key="foo")" + test -z "${foo:-}" + + ynh_app_setting_set_default --key="foo" --value="foovalue" + + test "${foo:-}" == "foovalue" + test "$(ynh_app_setting_get --key="foo")" == "foovalue" + + ynh_app_setting_set_default --key="foo" --value="bar" + + test "${foo:-}" == "foovalue" + test "$(ynh_app_setting_get --key="foo")" == "foovalue" + + ynh_app_setting_delete --key="foo" + + test "${foo:-}" == "foovalue" + test -z "$(ynh_app_setting_get --key="foo")" + + ynh_app_setting_set_default --key="foo" --value="bar" + + # Hmmm debatable ? But that's how it works right now because the var still exists + test "${foo:-}" == "foovalue" + test -z "$(ynh_app_setting_get --key="foo")" + + rm -rf "/etc/yunohost/apps/$app" +} diff --git a/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh b/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh new file mode 100644 index 000000000..323b74796 --- /dev/null +++ b/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh @@ -0,0 +1,111 @@ +_make_dummy_manifest() { + if [ ! -e $HTTPSERVER_DIR/dummy.tar.gz ] + then + pushd "$HTTPSERVER_DIR" + mkdir dummy + pushd dummy + echo "Lorem Ipsum" > index.html + echo '{"foo": "bar"}' > conf.json + mkdir assets + echo '.some.css { }' > assets/main.css + echo 'var some="js";' > assets/main.js + popd + tar -czf dummy.tar.gz dummy + popd + fi + + cat << EOF +packaging_format = 2 +id = "helloworld" +version = "0.1~ynh2" + +[resources] + [resources.sources.dummy] + url = "http://127.0.0.1:$HTTPSERVER_PORT/dummy.tar.gz" + sha256 = "$(sha256sum $HTTPSERVER_DIR/dummy.tar.gz | awk '{print $1}')" + + [resources.install_dir] + group = "www-data:r-x" +EOF + +} + +ynhtest_setup_source_nominal() { + install_dir="$(mktemp -d -p $VAR_WWW)" + _make_dummy_manifest > ../manifest.toml + + ynh_setup_source --dest_dir="$install_dir" --source_id="dummy" + + test -e "$install_dir" + test -e "$install_dir/index.html" + + ls -ld "$install_dir" | grep -q "drwxr-x--- . $app www-data" + ls -l "$install_dir/index.html" | grep -q "\-rw-r----- . $app www-data" +} + +ynhtest_setup_source_no_group_in_manifest() { + install_dir="$(mktemp -d -p $VAR_WWW)" + _make_dummy_manifest > ../manifest.toml + sed '/www-data/d' -i ../manifest.toml + + ynh_setup_source --dest_dir="$install_dir" --source_id="dummy" + + test -e "$install_dir" + test -e "$install_dir/index.html" + + ls -ld "$install_dir" | grep -q "drwxr-x--- . $app $app" + ls -l "$install_dir/index.html" | grep -q "\-rw-r----- . $app $app" +} + + +ynhtest_setup_source_nominal_upgrade() { + install_dir="$(mktemp -d -p $VAR_WWW)" + _make_dummy_manifest > ../manifest.toml + + ynh_setup_source --dest_dir="$install_dir" --source_id="dummy" + + test "$(cat $install_dir/index.html)" == "Lorem Ipsum" + + # Except index.html to get overwritten during next ynh_setup_source + echo "IEditedYou!" > $install_dir/index.html + test "$(cat $install_dir/index.html)" == "IEditedYou!" + + ynh_setup_source --dest_dir="$install_dir" --source_id="dummy" + + test "$(cat $install_dir/index.html)" == "Lorem Ipsum" +} + + +ynhtest_setup_source_with_keep() { + install_dir="$(mktemp -d -p $VAR_WWW)" + _make_dummy_manifest > ../manifest.toml + + echo "IEditedYou!" > $install_dir/index.html + echo "IEditedYou!" > $install_dir/test.txt + + ynh_setup_source --dest_dir="$install_dir" --source_id="dummy" --keep="index.html test.txt" + + test -e "$install_dir" + test -e "$install_dir/index.html" + test -e "$install_dir/test.txt" + test "$(cat $install_dir/index.html)" == "IEditedYou!" + test "$(cat $install_dir/test.txt)" == "IEditedYou!" +} + +ynhtest_setup_source_with_patch() { + install_dir="$(mktemp -d -p $VAR_WWW)" + _make_dummy_manifest > ../manifest.toml + + mkdir -p ../patches/dummy/ + cat > ../patches/dummy/index.html.patch << EOF +--- a/index.html ++++ b/index.html +@@ -1 +1,1 @@ +-Lorem Ipsum ++Lorem Ipsum dolor sit amet +EOF + + ynh_setup_source --dest_dir="$install_dir" --source_id="dummy" + + test "$(cat $install_dir/index.html)" == "Lorem Ipsum dolor sit amet" +} diff --git a/tests/test_helpers.v2.1.d/ynhtest_templating.sh b/tests/test_helpers.v2.1.d/ynhtest_templating.sh new file mode 100644 index 000000000..c8015093a --- /dev/null +++ b/tests/test_helpers.v2.1.d/ynhtest_templating.sh @@ -0,0 +1,62 @@ +ynhtest_simple_template_app_config() { + + mkdir -p /etc/yunohost/apps/$app/ + echo "id: $app" > /etc/yunohost/apps/$app/settings.yml + + template="$(mktemp -d -p $VAR_WWW)/template.txt" + cat << EOF > $template +app=__APP__ +foo=__FOO__ +EOF + + foo="bar" + + ynh_config_add --template="$template" --destination="$VAR_WWW/config.txt" + + test "$(cat $VAR_WWW/config.txt)" == "$(echo -ne 'app=ynhtest\nfoo=bar')" + test "$(ls -l $VAR_WWW/config.txt | cut -d' ' -f1-4)" == "-rw-r----- 1 ynhtest ynhtest" +} + +ynhtest_simple_template_system_config() { + + mkdir -p /etc/yunohost/apps/$app/ + echo "id: $app" > /etc/yunohost/apps/$app/settings.yml + + rm -f /etc/cron.d/ynhtest_config + + template="$(mktemp -d -p $VAR_WWW)/template.txt" + cat << EOF > $template +app=__APP__ +foo=__FOO__ +EOF + + foo="bar" + + ynh_config_add --template="$template" --destination="/etc/cron.d/ynhtest_config" + + test "$(cat $VAR_WWW/config.txt)" == "$(echo -ne 'app=ynhtest\nfoo=bar')" + test "$(ls -l /etc/cron.d/ynhtest_config | cut -d' ' -f1-4)" == "-r-------- 1 root root" + + rm -f /etc/cron.d/ynhtest_config +} + +ynhtest_jinja_template_app_config() { + + mkdir -p /etc/yunohost/apps/$app/ + echo "id: $app" > /etc/yunohost/apps/$app/settings.yml + + template="$(mktemp -d -p $VAR_WWW)/template.txt" + cat << EOF > $template +app={{ app }} +{% if foo == "bar" %}foo=true{% endif %} +EOF + + foo="bar" + + ynh_config_add --template="$template" --destination="$VAR_WWW/config.txt" --jinja + + test "$(cat $VAR_WWW/config.txt)" == "$(echo -ne 'app=ynhtest\nfoo=true')" + test "$(ls -l $VAR_WWW/config.txt | cut -d' ' -f1-4)" == "-rw-r----- 1 ynhtest ynhtest" +} + + diff --git a/tests/test_helpers.d/ynhtest_user.sh b/tests/test_helpers.v2.1.d/ynhtest_user.sh similarity index 100% rename from tests/test_helpers.d/ynhtest_user.sh rename to tests/test_helpers.v2.1.d/ynhtest_user.sh diff --git a/tests/test_helpers.d/ynhtest_apt.sh b/tests/test_helpers.v2.d/ynhtest_apt.sh similarity index 100% rename from tests/test_helpers.d/ynhtest_apt.sh rename to tests/test_helpers.v2.d/ynhtest_apt.sh diff --git a/tests/test_helpers.v2.d/ynhtest_config.sh b/tests/test_helpers.v2.d/ynhtest_config.sh new file mode 100644 index 000000000..b64943a48 --- /dev/null +++ b/tests/test_helpers.v2.d/ynhtest_config.sh @@ -0,0 +1,662 @@ + +################# +# _ __ _ _ # +# | '_ \| | | | # +# | |_) | |_| | # +# | .__/ \__, | # +# | | __/ | # +# |_| |___/ # +# # +################# + +_read_py() { + local file="$1" + local key="$2" + python3 -c "exec(open('$file').read()); print($key)" +} + +ynhtest_config_read_py() { + + local dummy_dir="$(mktemp -d -p $VAR_WWW)" + file="$dummy_dir/dummy.py" + + cat << EOF > $dummy_dir/dummy.py +# Some comment +FOO = None +ENABLED = False +# TITLE = "Old title" +TITLE = "Lorem Ipsum" +THEME = "colib'ris" +EMAIL = "root@example.com" # This is a comment without quotes +PORT = 1234 # This is a comment without quotes +URL = 'https://yunohost.org' +DICT = {} +DICT['ldap_base'] = "ou=users,dc=yunohost,dc=org" +DICT['ldap_conf'] = {} +DICT['ldap_conf']['user'] = "camille" +# YNH_ICI +DICT['TITLE'] = "Hello world" +EOF + + test "$(_read_py "$file" "FOO")" == "None" + test "$(ynh_read_var_in_file "$file" "FOO")" == "None" + + test "$(_read_py "$file" "ENABLED")" == "False" + test "$(ynh_read_var_in_file "$file" "ENABLED")" == "False" + + test "$(_read_py "$file" "TITLE")" == "Lorem Ipsum" + test "$(ynh_read_var_in_file "$file" "TITLE")" == "Lorem Ipsum" + + test "$(_read_py "$file" "THEME")" == "colib'ris" + test "$(ynh_read_var_in_file "$file" "THEME")" == "colib'ris" + + test "$(_read_py "$file" "EMAIL")" == "root@example.com" + test "$(ynh_read_var_in_file "$file" "EMAIL")" == "root@example.com" + + test "$(_read_py "$file" "PORT")" == "1234" + test "$(ynh_read_var_in_file "$file" "PORT")" == "1234" + + test "$(_read_py "$file" "URL")" == "https://yunohost.org" + test "$(ynh_read_var_in_file "$file" "URL")" == "https://yunohost.org" + + test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=users,dc=yunohost,dc=org" + + test "$(ynh_read_var_in_file "$file" "user")" == "camille" + + test "$(ynh_read_var_in_file "$file" "TITLE" "YNH_ICI")" == "Hello world" + + ! _read_py "$file" "NONEXISTENT" + test "$(ynh_read_var_in_file "$file" "NONEXISTENT")" == "YNH_NULL" + + ! _read_py "$file" "ENABLE" + test "$(ynh_read_var_in_file "$file" "ENABLE")" == "YNH_NULL" +} + +ynhtest_config_write_py() { + local dummy_dir="$(mktemp -d -p $VAR_WWW)" + file="$dummy_dir/dummy.py" + + cat << EOF > $dummy_dir/dummy.py +# Some comment +FOO = None +ENABLED = False +# TITLE = "Old title" +TITLE = "Lorem Ipsum" +THEME = "colib'ris" +EMAIL = "root@example.com" # This is a comment without quotes +PORT = 1234 # This is a comment without quotes +URL = 'https://yunohost.org' +DICT = {} +DICT['ldap_base'] = "ou=users,dc=yunohost,dc=org" +# YNH_ICI +DICT['TITLE'] = "Hello world" +EOF + + ynh_write_var_in_file "$file" "FOO" "bar" + test "$(_read_py "$file" "FOO")" == "bar" + test "$(ynh_read_var_in_file "$file" "FOO")" == "bar" + + ynh_write_var_in_file "$file" "ENABLED" "True" + test "$(_read_py "$file" "ENABLED")" == "True" + test "$(ynh_read_var_in_file "$file" "ENABLED")" == "True" + + ynh_write_var_in_file "$file" "TITLE" "Foo Bar" + test "$(_read_py "$file" "TITLE")" == "Foo Bar" + test "$(ynh_read_var_in_file "$file" "TITLE")" == "Foo Bar" + + ynh_write_var_in_file "$file" "THEME" "super-awesome-theme" + test "$(_read_py "$file" "THEME")" == "super-awesome-theme" + test "$(ynh_read_var_in_file "$file" "THEME")" == "super-awesome-theme" + + ynh_write_var_in_file "$file" "EMAIL" "sam@domain.tld" + test "$(_read_py "$file" "EMAIL")" == "sam@domain.tld" + test "$(ynh_read_var_in_file "$file" "EMAIL")" == "sam@domain.tld" + + ynh_write_var_in_file "$file" "PORT" "5678" + test "$(_read_py "$file" "PORT")" == "5678" + test "$(ynh_read_var_in_file "$file" "PORT")" == "5678" + + ynh_write_var_in_file "$file" "URL" "https://domain.tld/foobar" + test "$(_read_py "$file" "URL")" == "https://domain.tld/foobar" + test "$(ynh_read_var_in_file "$file" "URL")" == "https://domain.tld/foobar" + + ynh_write_var_in_file "$file" "ldap_base" "ou=users,dc=yunohost,dc=org" + test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=users,dc=yunohost,dc=org" + + ynh_write_var_in_file "$file" "TITLE" "YOLO" "YNH_ICI" + test "$(ynh_read_var_in_file "$file" "TITLE" "YNH_ICI")" == "YOLO" + + ! ynh_write_var_in_file "$file" "NONEXISTENT" "foobar" + ! _read_py "$file" "NONEXISTENT" + test "$(ynh_read_var_in_file "$file" "NONEXISTENT")" == "YNH_NULL" + + ! ynh_write_var_in_file "$file" "ENABLE" "foobar" + ! _read_py "$file" "ENABLE" + test "$(ynh_read_var_in_file "$file" "ENABLE")" == "YNH_NULL" + +} + +############### +# _ _ # +# (_) (_) # +# _ _ __ _ # +# | | '_ \| | # +# | | | | | | # +# |_|_| |_|_| # +# # +############### + +_read_ini() { + local file="$1" + local key="$2" + python3 -c "import configparser; c = configparser.ConfigParser(); c.read('$file'); print(c['main']['$key'])" +} + +ynhtest_config_read_ini() { + local dummy_dir="$(mktemp -d -p $VAR_WWW)" + file="$dummy_dir/dummy.ini" + + cat << EOF > $file +# Some comment +; Another comment +[main] +foo = null +enabled = False +# title = Old title +title = Lorem Ipsum +theme = colib'ris +email = root@example.com ; This is a comment without quotes +port = 1234 ; This is a comment without quotes +url = https://yunohost.org +[dict] + ldap_base = ou=users,dc=yunohost,dc=org +EOF + + test "$(_read_ini "$file" "foo")" == "null" + test "$(ynh_read_var_in_file "$file" "foo")" == "null" + + test "$(_read_ini "$file" "enabled")" == "False" + test "$(ynh_read_var_in_file "$file" "enabled")" == "False" + + test "$(_read_ini "$file" "title")" == "Lorem Ipsum" + test "$(ynh_read_var_in_file "$file" "title")" == "Lorem Ipsum" + + test "$(_read_ini "$file" "theme")" == "colib'ris" + test "$(ynh_read_var_in_file "$file" "theme")" == "colib'ris" + + #test "$(_read_ini "$file" "email")" == "root@example.com" + test "$(ynh_read_var_in_file "$file" "email")" == "root@example.com" + + #test "$(_read_ini "$file" "port")" == "1234" + test "$(ynh_read_var_in_file "$file" "port")" == "1234" + + test "$(_read_ini "$file" "url")" == "https://yunohost.org" + test "$(ynh_read_var_in_file "$file" "url")" == "https://yunohost.org" + + test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=users,dc=yunohost,dc=org" + + ! _read_ini "$file" "nonexistent" + test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + + ! _read_ini "$file" "enable" + test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" + +} + +ynhtest_config_write_ini() { + local dummy_dir="$(mktemp -d -p $VAR_WWW)" + file="$dummy_dir/dummy.ini" + + cat << EOF > $file +# Some comment +; Another comment +[main] +foo = null +enabled = False +# title = Old title +title = Lorem Ipsum +theme = colib'ris +email = root@example.com # This is a comment without quotes +port = 1234 # This is a comment without quotes +url = https://yunohost.org +[dict] + ldap_base = ou=users,dc=yunohost,dc=org +EOF + + ynh_write_var_in_file "$file" "foo" "bar" + test "$(_read_ini "$file" "foo")" == "bar" + test "$(ynh_read_var_in_file "$file" "foo")" == "bar" + + ynh_write_var_in_file "$file" "enabled" "True" + test "$(_read_ini "$file" "enabled")" == "True" + test "$(ynh_read_var_in_file "$file" "enabled")" == "True" + + ynh_write_var_in_file "$file" "title" "Foo Bar" + test "$(_read_ini "$file" "title")" == "Foo Bar" + test "$(ynh_read_var_in_file "$file" "title")" == "Foo Bar" + + ynh_write_var_in_file "$file" "theme" "super-awesome-theme" + test "$(_read_ini "$file" "theme")" == "super-awesome-theme" + test "$(ynh_read_var_in_file "$file" "theme")" == "super-awesome-theme" + + ynh_write_var_in_file "$file" "email" "sam@domain.tld" + test "$(_read_ini "$file" "email")" == "sam@domain.tld # This is a comment without quotes" + test "$(ynh_read_var_in_file "$file" "email")" == "sam@domain.tld" + + ynh_write_var_in_file "$file" "port" "5678" + test "$(_read_ini "$file" "port")" == "5678 # This is a comment without quotes" + test "$(ynh_read_var_in_file "$file" "port")" == "5678" + + ynh_write_var_in_file "$file" "url" "https://domain.tld/foobar" + test "$(_read_ini "$file" "url")" == "https://domain.tld/foobar" + test "$(ynh_read_var_in_file "$file" "url")" == "https://domain.tld/foobar" + + ynh_write_var_in_file "$file" "ldap_base" "ou=users,dc=yunohost,dc=org" + test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=users,dc=yunohost,dc=org" + + ! ynh_write_var_in_file "$file" "nonexistent" "foobar" + ! _read_ini "$file" "nonexistent" + test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + + ! ynh_write_var_in_file "$file" "enable" "foobar" + ! _read_ini "$file" "enable" + test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" + +} + +############################# +# _ # +# | | # +# _ _ __ _ _ __ ___ | | # +# | | | |/ _` | '_ ` _ \| | # +# | |_| | (_| | | | | | | | # +# \__, |\__,_|_| |_| |_|_| # +# __/ | # +# |___/ # +# # +############################# + +_read_yaml() { + local file="$1" + local key="$2" + python3 -c "import yaml; print(yaml.safe_load(open('$file'))['$key'])" +} + +ynhtest_config_read_yaml() { + local dummy_dir="$(mktemp -d -p $VAR_WWW)" + file="$dummy_dir/dummy.yml" + + cat << EOF > $file +# Some comment +foo: +enabled: false +# title: old title +title: Lorem Ipsum +theme: colib'ris +email: root@example.com # This is a comment without quotes +port: 1234 # This is a comment without quotes +url: https://yunohost.org +dict: + ldap_base: ou=users,dc=yunohost,dc=org +EOF + + test "$(_read_yaml "$file" "foo")" == "None" + test "$(ynh_read_var_in_file "$file" "foo")" == "" + + test "$(_read_yaml "$file" "enabled")" == "False" + test "$(ynh_read_var_in_file "$file" "enabled")" == "false" + + test "$(_read_yaml "$file" "title")" == "Lorem Ipsum" + test "$(ynh_read_var_in_file "$file" "title")" == "Lorem Ipsum" + + test "$(_read_yaml "$file" "theme")" == "colib'ris" + test "$(ynh_read_var_in_file "$file" "theme")" == "colib'ris" + + test "$(_read_yaml "$file" "email")" == "root@example.com" + test "$(ynh_read_var_in_file "$file" "email")" == "root@example.com" + + test "$(_read_yaml "$file" "port")" == "1234" + test "$(ynh_read_var_in_file "$file" "port")" == "1234" + + test "$(_read_yaml "$file" "url")" == "https://yunohost.org" + test "$(ynh_read_var_in_file "$file" "url")" == "https://yunohost.org" + + test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=users,dc=yunohost,dc=org" + + ! _read_yaml "$file" "nonexistent" + test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + + ! _read_yaml "$file" "enable" + test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" +} + + +ynhtest_config_write_yaml() { + local dummy_dir="$(mktemp -d -p $VAR_WWW)" + file="$dummy_dir/dummy.yml" + + cat << EOF > $file +# Some comment +foo: +enabled: false +# title: old title +title: Lorem Ipsum +theme: colib'ris +email: root@example.com # This is a comment without quotes +port: 1234 # This is a comment without quotes +url: https://yunohost.org +dict: + ldap_base: ou=users,dc=yunohost,dc=org +EOF + + ynh_write_var_in_file "$file" "foo" "bar" + # cat $dummy_dir/dummy.yml # to debug + ! test "$(_read_yaml "$file" "foo")" == "bar" # writing broke the yaml syntax... "foo:bar" (no space aftr :) + test "$(ynh_read_var_in_file "$file" "foo")" == "bar" + + ynh_write_var_in_file "$file" "enabled" "true" + test "$(_read_yaml "$file" "enabled")" == "True" + test "$(ynh_read_var_in_file "$file" "enabled")" == "true" + + ynh_write_var_in_file "$file" "title" "Foo Bar" + test "$(_read_yaml "$file" "title")" == "Foo Bar" + test "$(ynh_read_var_in_file "$file" "title")" == "Foo Bar" + + ynh_write_var_in_file "$file" "theme" "super-awesome-theme" + test "$(_read_yaml "$file" "theme")" == "super-awesome-theme" + test "$(ynh_read_var_in_file "$file" "theme")" == "super-awesome-theme" + + ynh_write_var_in_file "$file" "email" "sam@domain.tld" + test "$(_read_yaml "$file" "email")" == "sam@domain.tld" + test "$(ynh_read_var_in_file "$file" "email")" == "sam@domain.tld" + + ynh_write_var_in_file "$file" "port" "5678" + test "$(_read_yaml "$file" "port")" == "5678" + test "$(ynh_read_var_in_file "$file" "port")" == "5678" + + ynh_write_var_in_file "$file" "url" "https://domain.tld/foobar" + test "$(_read_yaml "$file" "url")" == "https://domain.tld/foobar" + test "$(ynh_read_var_in_file "$file" "url")" == "https://domain.tld/foobar" + + ynh_write_var_in_file "$file" "ldap_base" "ou=foobar,dc=domain,dc=tld" + test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=foobar,dc=domain,dc=tld" + + ! ynh_write_var_in_file "$file" "nonexistent" "foobar" + test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + + ! ynh_write_var_in_file "$file" "enable" "foobar" + test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" + test "$(ynh_read_var_in_file "$file" "enabled")" == "true" +} + +######################### +# _ # +# (_) # +# _ ___ ___ _ __ # +# | / __|/ _ \| '_ \ # +# | \__ \ (_) | | | | # +# | |___/\___/|_| |_| # +# _/ | # +# |__/ # +# # +######################### + +_read_json() { + local file="$1" + local key="$2" + python3 -c "import json; print(json.load(open('$file'))['$key'])" +} + +ynhtest_config_read_json() { + local dummy_dir="$(mktemp -d -p $VAR_WWW)" + file="$dummy_dir/dummy.json" + + cat << EOF > $file +{ + "foo": null, + "enabled": false, + "title": "Lorem Ipsum", + "theme": "colib'ris", + "email": "root@example.com", + "port": 1234, + "url": "https://yunohost.org", + "dict": { + "ldap_base": "ou=users,dc=yunohost,dc=org" + } +} +EOF + + + test "$(_read_json "$file" "foo")" == "None" + test "$(ynh_read_var_in_file "$file" "foo")" == "null" + + test "$(_read_json "$file" "enabled")" == "False" + test "$(ynh_read_var_in_file "$file" "enabled")" == "false" + + test "$(_read_json "$file" "title")" == "Lorem Ipsum" + test "$(ynh_read_var_in_file "$file" "title")" == "Lorem Ipsum" + + test "$(_read_json "$file" "theme")" == "colib'ris" + test "$(ynh_read_var_in_file "$file" "theme")" == "colib'ris" + + test "$(_read_json "$file" "email")" == "root@example.com" + test "$(ynh_read_var_in_file "$file" "email")" == "root@example.com" + + test "$(_read_json "$file" "port")" == "1234" + test "$(ynh_read_var_in_file "$file" "port")" == "1234" + + test "$(_read_json "$file" "url")" == "https://yunohost.org" + test "$(ynh_read_var_in_file "$file" "url")" == "https://yunohost.org" + + test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=users,dc=yunohost,dc=org" + + ! _read_json "$file" "nonexistent" + test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + + ! _read_json "$file" "enable" + test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" +} + + +ynhtest_config_write_json() { + local dummy_dir="$(mktemp -d -p $VAR_WWW)" + file="$dummy_dir/dummy.json" + + cat << EOF > $file +{ + "foo": null, + "enabled": false, + "title": "Lorem Ipsum", + "theme": "colib'ris", + "email": "root@example.com", + "port": 1234, + "url": "https://yunohost.org", + "dict": { + "ldap_base": "ou=users,dc=yunohost,dc=org" + } +} +EOF + + ynh_write_var_in_file "$file" "foo" "bar" + cat $file + test "$(_read_json "$file" "foo")" == "bar" + test "$(ynh_read_var_in_file "$file" "foo")" == "bar" + + ynh_write_var_in_file "$file" "enabled" "true" + cat $file + test "$(_read_json "$file" "enabled")" == "true" + test "$(ynh_read_var_in_file "$file" "enabled")" == "true" + + ynh_write_var_in_file "$file" "title" "Foo Bar" + cat $file + test "$(_read_json "$file" "title")" == "Foo Bar" + test "$(ynh_read_var_in_file "$file" "title")" == "Foo Bar" + + ynh_write_var_in_file "$file" "theme" "super-awesome-theme" + cat $file + test "$(_read_json "$file" "theme")" == "super-awesome-theme" + test "$(ynh_read_var_in_file "$file" "theme")" == "super-awesome-theme" + + ynh_write_var_in_file "$file" "email" "sam@domain.tld" + cat $file + test "$(_read_json "$file" "email")" == "sam@domain.tld" + test "$(ynh_read_var_in_file "$file" "email")" == "sam@domain.tld" + + ynh_write_var_in_file "$file" "port" "5678" + test "$(_read_json "$file" "port")" == "5678" + test "$(ynh_read_var_in_file "$file" "port")" == "5678" + + ynh_write_var_in_file "$file" "url" "https://domain.tld/foobar" + test "$(_read_json "$file" "url")" == "https://domain.tld/foobar" + test "$(ynh_read_var_in_file "$file" "url")" == "https://domain.tld/foobar" + + ynh_write_var_in_file "$file" "ldap_base" "ou=foobar,dc=domain,dc=tld" + test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=foobar,dc=domain,dc=tld" + + ! ynh_write_var_in_file "$file" "nonexistent" "foobar" + test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + + ! ynh_write_var_in_file "$file" "enable" "foobar" + test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" + test "$(ynh_read_var_in_file "$file" "enabled")" == "true" +} + +####################### +# _ # +# | | # +# _ __ | |__ _ __ # +# | '_ \| '_ \| '_ \ # +# | |_) | | | | |_) | # +# | .__/|_| |_| .__/ # +# | | | | # +# |_| |_| # +# # +####################### + +_read_php() { + local file="$1" + local key="$2" + php -r "include '$file'; echo var_export(\$$key);" | sed "s/^'//g" | sed "s/'$//g" +} + +ynhtest_config_read_php() { + local dummy_dir="$(mktemp -d -p $VAR_WWW)" + file="$dummy_dir/dummy.php" + + cat << EOF > $file + "ou=users,dc=yunohost,dc=org", + 'ldap_conf' => [] + ]; + \$dict['ldap_conf']['user'] = 'camille'; + const DB_HOST = 'localhost'; +?> +EOF + + test "$(_read_php "$file" "foo")" == "NULL" + test "$(ynh_read_var_in_file "$file" "foo")" == "NULL" + + test "$(_read_php "$file" "enabled")" == "false" + test "$(ynh_read_var_in_file "$file" "enabled")" == "false" + + test "$(_read_php "$file" "title")" == "Lorem Ipsum" + test "$(ynh_read_var_in_file "$file" "title")" == "Lorem Ipsum" + + test "$(_read_php "$file" "theme")" == "colib\\'ris" + test "$(ynh_read_var_in_file "$file" "theme")" == "colib'ris" + + test "$(_read_php "$file" "email")" == "root@example.com" + test "$(ynh_read_var_in_file "$file" "email")" == "root@example.com" + + test "$(_read_php "$file" "port")" == "1234" + test "$(ynh_read_var_in_file "$file" "port")" == "1234" + + test "$(_read_php "$file" "url")" == "https://yunohost.org" + test "$(ynh_read_var_in_file "$file" "url")" == "https://yunohost.org" + + test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=users,dc=yunohost,dc=org" + + test "$(ynh_read_var_in_file "$file" "user")" == "camille" + + test "$(ynh_read_var_in_file "$file" "DB_HOST")" == "localhost" + + ! _read_php "$file" "nonexistent" + test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + + ! _read_php "$file" "enable" + test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" +} + + +ynhtest_config_write_php() { + local dummy_dir="$(mktemp -d -p $VAR_WWW)" + file="$dummy_dir/dummy.php" + + cat << EOF > $file + "ou=users,dc=yunohost,dc=org", + ]; +?> +EOF + + ynh_write_var_in_file "$file" "foo" "bar" + test "$(_read_php "$file" "foo")" == "bar" + test "$(ynh_read_var_in_file "$file" "foo")" == "bar" + + ynh_write_var_in_file "$file" "enabled" "true" + test "$(_read_php "$file" "enabled")" == "true" + test "$(ynh_read_var_in_file "$file" "enabled")" == "true" + + ynh_write_var_in_file "$file" "title" "Foo Bar" + cat $file + test "$(_read_php "$file" "title")" == "Foo Bar" + test "$(ynh_read_var_in_file "$file" "title")" == "Foo Bar" + + ynh_write_var_in_file "$file" "theme" "super-awesome-theme" + cat $file + test "$(_read_php "$file" "theme")" == "super-awesome-theme" + test "$(ynh_read_var_in_file "$file" "theme")" == "super-awesome-theme" + + ynh_write_var_in_file "$file" "email" "sam@domain.tld" + cat $file + test "$(_read_php "$file" "email")" == "sam@domain.tld" + test "$(ynh_read_var_in_file "$file" "email")" == "sam@domain.tld" + + ynh_write_var_in_file "$file" "port" "5678" + test "$(_read_php "$file" "port")" == "5678" + test "$(ynh_read_var_in_file "$file" "port")" == "5678" + + ynh_write_var_in_file "$file" "url" "https://domain.tld/foobar" + test "$(_read_php "$file" "url")" == "https://domain.tld/foobar" + test "$(ynh_read_var_in_file "$file" "url")" == "https://domain.tld/foobar" + + ynh_write_var_in_file "$file" "ldap_base" "ou=foobar,dc=domain,dc=tld" + test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=foobar,dc=domain,dc=tld" + + ! ynh_write_var_in_file "$file" "nonexistent" "foobar" + test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + + ! ynh_write_var_in_file "$file" "enable" "foobar" + test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" + test "$(ynh_read_var_in_file "$file" "enabled")" == "true" +} diff --git a/tests/test_helpers.d/ynhtest_logging.sh b/tests/test_helpers.v2.d/ynhtest_logging.sh similarity index 100% rename from tests/test_helpers.d/ynhtest_logging.sh rename to tests/test_helpers.v2.d/ynhtest_logging.sh diff --git a/tests/test_helpers.d/ynhtest_network.sh b/tests/test_helpers.v2.d/ynhtest_network.sh similarity index 100% rename from tests/test_helpers.d/ynhtest_network.sh rename to tests/test_helpers.v2.d/ynhtest_network.sh diff --git a/tests/test_helpers.d/ynhtest_secure_remove.sh b/tests/test_helpers.v2.d/ynhtest_secure_remove.sh similarity index 100% rename from tests/test_helpers.d/ynhtest_secure_remove.sh rename to tests/test_helpers.v2.d/ynhtest_secure_remove.sh diff --git a/tests/test_helpers.d/ynhtest_settings.sh b/tests/test_helpers.v2.d/ynhtest_settings.sh similarity index 100% rename from tests/test_helpers.d/ynhtest_settings.sh rename to tests/test_helpers.v2.d/ynhtest_settings.sh diff --git a/tests/test_helpers.d/ynhtest_setup_source.sh b/tests/test_helpers.v2.d/ynhtest_setup_source.sh similarity index 100% rename from tests/test_helpers.d/ynhtest_setup_source.sh rename to tests/test_helpers.v2.d/ynhtest_setup_source.sh diff --git a/tests/test_helpers.d/ynhtest_templating.sh b/tests/test_helpers.v2.d/ynhtest_templating.sh similarity index 100% rename from tests/test_helpers.d/ynhtest_templating.sh rename to tests/test_helpers.v2.d/ynhtest_templating.sh diff --git a/tests/test_helpers.v2.d/ynhtest_user.sh b/tests/test_helpers.v2.d/ynhtest_user.sh new file mode 100644 index 000000000..46f2a0cd6 --- /dev/null +++ b/tests/test_helpers.v2.d/ynhtest_user.sh @@ -0,0 +1,25 @@ + +ynhtest_system_user_create() { + username=$(head -c 12 /dev/urandom | md5sum | head -c 12) + + ! ynh_system_user_exists --username="$username" + + ynh_system_user_create --username="$username" + + ynh_system_user_exists --username="$username" + + ynh_system_user_delete --username="$username" + + ! ynh_system_user_exists --username="$username" +} + +ynhtest_system_user_with_group() { + username=$(head -c 12 /dev/urandom | md5sum | head -c 12) + + ynh_system_user_create --username="$username" --groups="ssl-cert,ssh.app" + + grep -q "^ssl-cert:.*$username" /etc/group + grep -q "^ssh.app:.*$username" /etc/group + + ynh_system_user_delete --username="$username" +} From bc3e36abb3394cead6ff868a48a8c6f4018aec2c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Jul 2024 21:39:59 +0200 Subject: [PATCH 047/218] friskies --- helpers/helpers.v2.1.d/logging | 5 +- tests/test_helpers.v2.1.d/ynhtest_apt.sh | 6 + tests/test_helpers.v2.1.d/ynhtest_config.sh | 486 +++++++++--------- tests/test_helpers.v2.1.d/ynhtest_logging.sh | 45 +- tests/test_helpers.v2.1.d/ynhtest_settings.sh | 5 - .../ynhtest_setup_source.sh | 3 +- .../test_helpers.v2.1.d/ynhtest_templating.sh | 1 + 7 files changed, 258 insertions(+), 293 deletions(-) diff --git a/helpers/helpers.v2.1.d/logging b/helpers/helpers.v2.1.d/logging index 1d729178a..a2471cd2d 100644 --- a/helpers/helpers.v2.1.d/logging +++ b/helpers/helpers.v2.1.d/logging @@ -7,7 +7,10 @@ ynh_die() { set +o xtrace # set +x if [[ -n "${1:-}" ]] then - python3 -c 'import yaml, sys; print(yaml.dump({"error": sys.stdin.read()}))' <<< "${1:-}" >>"$YNH_STDRETURN" + if [[ -n "${YNH_STDRETURN:-}" ]] + then + python3 -c 'import yaml, sys; print(yaml.dump({"error": sys.stdin.read()}))' <<< "${1:-}" >>"$YNH_STDRETURN" + fi echo "${1:-}" 1>&2 fi exit 1 diff --git a/tests/test_helpers.v2.1.d/ynhtest_apt.sh b/tests/test_helpers.v2.1.d/ynhtest_apt.sh index e415c8135..1fcf3b185 100644 --- a/tests/test_helpers.v2.1.d/ynhtest_apt.sh +++ b/tests/test_helpers.v2.1.d/ynhtest_apt.sh @@ -1,5 +1,11 @@ ynhtest_apt_install_apt_deps_regular() { + cat << EOF > ../manifest.toml +packaging_format = 2 +id = "$app" +version = "0.1~ynh2" +EOF + dpkg --list | grep -q "ii *$app-ynh-deps" && apt remove $app-ynh-deps --assume-yes || true dpkg --list | grep -q 'ii *nyancat' && apt remove nyancat --assume-yes || true dpkg --list | grep -q 'ii *sl' && apt remove sl --assume-yes || true diff --git a/tests/test_helpers.v2.1.d/ynhtest_config.sh b/tests/test_helpers.v2.1.d/ynhtest_config.sh index b64943a48..51fd44cfe 100644 --- a/tests/test_helpers.v2.1.d/ynhtest_config.sh +++ b/tests/test_helpers.v2.1.d/ynhtest_config.sh @@ -38,38 +38,38 @@ DICT['ldap_conf']['user'] = "camille" DICT['TITLE'] = "Hello world" EOF - test "$(_read_py "$file" "FOO")" == "None" - test "$(ynh_read_var_in_file "$file" "FOO")" == "None" + test "$(_read_py "$file" "FOO")" == "None" + test "$(ynh_read_var_in_file --file="$file" --key="FOO")" == "None" - test "$(_read_py "$file" "ENABLED")" == "False" - test "$(ynh_read_var_in_file "$file" "ENABLED")" == "False" + test "$(_read_py "$file" "ENABLED")" == "False" + test "$(ynh_read_var_in_file --file="$file" --key="ENABLED")" == "False" - test "$(_read_py "$file" "TITLE")" == "Lorem Ipsum" - test "$(ynh_read_var_in_file "$file" "TITLE")" == "Lorem Ipsum" + test "$(_read_py "$file" "TITLE")" == "Lorem Ipsum" + test "$(ynh_read_var_in_file --file="$file" --key="TITLE")" == "Lorem Ipsum" - test "$(_read_py "$file" "THEME")" == "colib'ris" - test "$(ynh_read_var_in_file "$file" "THEME")" == "colib'ris" + test "$(_read_py "$file" "THEME")" == "colib'ris" + test "$(ynh_read_var_in_file --file="$file" --key="THEME")" == "colib'ris" - test "$(_read_py "$file" "EMAIL")" == "root@example.com" - test "$(ynh_read_var_in_file "$file" "EMAIL")" == "root@example.com" + test "$(_read_py "$file" "EMAIL")" == "root@example.com" + test "$(ynh_read_var_in_file --file="$file" --key="EMAIL")" == "root@example.com" - test "$(_read_py "$file" "PORT")" == "1234" - test "$(ynh_read_var_in_file "$file" "PORT")" == "1234" + test "$(_read_py "$file" "PORT")" == "1234" + test "$(ynh_read_var_in_file --file="$file" --key="PORT")" == "1234" - test "$(_read_py "$file" "URL")" == "https://yunohost.org" - test "$(ynh_read_var_in_file "$file" "URL")" == "https://yunohost.org" + test "$(_read_py "$file" "URL")" == "https://yunohost.org" + test "$(ynh_read_var_in_file --file="$file" --key="URL")" == "https://yunohost.org" - test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=users,dc=yunohost,dc=org" + test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=users,dc=yunohost,dc=org" - test "$(ynh_read_var_in_file "$file" "user")" == "camille" + test "$(ynh_read_var_in_file --file="$file" --key="user")" == "camille" - test "$(ynh_read_var_in_file "$file" "TITLE" "YNH_ICI")" == "Hello world" + test "$(ynh_read_var_in_file --file="$file" --key="TITLE" --after"YNH_ICI")" == "Hello world" - ! _read_py "$file" "NONEXISTENT" - test "$(ynh_read_var_in_file "$file" "NONEXISTENT")" == "YNH_NULL" + ! _read_py "$file" "NONEXISTENT" + test "$(ynh_read_var_in_file --file="$file" --key="NONEXISTENT")" == "YNH_NULL" - ! _read_py "$file" "ENABLE" - test "$(ynh_read_var_in_file "$file" "ENABLE")" == "YNH_NULL" + ! _read_py "$file" "ENABLE" + test "$(ynh_read_var_in_file --file="$file" --key="ENABLE")" == "YNH_NULL" } ynhtest_config_write_py() { @@ -92,47 +92,47 @@ DICT['ldap_base'] = "ou=users,dc=yunohost,dc=org" DICT['TITLE'] = "Hello world" EOF - ynh_write_var_in_file "$file" "FOO" "bar" - test "$(_read_py "$file" "FOO")" == "bar" - test "$(ynh_read_var_in_file "$file" "FOO")" == "bar" + ynh_write_var_in_file --file="$file" --key="FOO" --value="bar" + test "$(_read_py "$file" "FOO")" == "bar" + test "$(ynh_read_var_in_file --file="$file" --key="FOO")" == "bar" - ynh_write_var_in_file "$file" "ENABLED" "True" - test "$(_read_py "$file" "ENABLED")" == "True" - test "$(ynh_read_var_in_file "$file" "ENABLED")" == "True" + ynh_write_var_in_file --file="$file" --key="ENABLED" --value="True" + test "$(_read_py "$file" "ENABLED")" == "True" + test "$(ynh_read_var_in_file --file="$file" --key="ENABLED")" == "True" - ynh_write_var_in_file "$file" "TITLE" "Foo Bar" - test "$(_read_py "$file" "TITLE")" == "Foo Bar" - test "$(ynh_read_var_in_file "$file" "TITLE")" == "Foo Bar" + ynh_write_var_in_file --file="$file" --key="TITLE" --value="Foo Bar" + test "$(_read_py "$file" "TITLE")" == "Foo Bar" + test "$(ynh_read_var_in_file --file="$file" --key="TITLE")" == "Foo Bar" - ynh_write_var_in_file "$file" "THEME" "super-awesome-theme" - test "$(_read_py "$file" "THEME")" == "super-awesome-theme" - test "$(ynh_read_var_in_file "$file" "THEME")" == "super-awesome-theme" + ynh_write_var_in_file --file="$file" --key="THEME" --value="super-awesome-theme" + test "$(_read_py "$file" "THEME")" == "super-awesome-theme" + test "$(ynh_read_var_in_file --file="$file" --key="THEME")" == "super-awesome-theme" - ynh_write_var_in_file "$file" "EMAIL" "sam@domain.tld" - test "$(_read_py "$file" "EMAIL")" == "sam@domain.tld" - test "$(ynh_read_var_in_file "$file" "EMAIL")" == "sam@domain.tld" + ynh_write_var_in_file --file="$file" --key="EMAIL" --value="sam@domain.tld" + test "$(_read_py "$file" "EMAIL")" == "sam@domain.tld" + test "$(ynh_read_var_in_file --file="$file" --key="EMAIL")" == "sam@domain.tld" - ynh_write_var_in_file "$file" "PORT" "5678" - test "$(_read_py "$file" "PORT")" == "5678" - test "$(ynh_read_var_in_file "$file" "PORT")" == "5678" + ynh_write_var_in_file --file="$file" --key="PORT" --value="5678" + test "$(_read_py "$file" "PORT")" == "5678" + test "$(ynh_read_var_in_file --file="$file" --key="PORT")" == "5678" - ynh_write_var_in_file "$file" "URL" "https://domain.tld/foobar" - test "$(_read_py "$file" "URL")" == "https://domain.tld/foobar" - test "$(ynh_read_var_in_file "$file" "URL")" == "https://domain.tld/foobar" + ynh_write_var_in_file --file="$file" --key="URL" --value="https://domain.tld/foobar" + test "$(_read_py "$file" "URL")" == "https://domain.tld/foobar" + test "$(ynh_read_var_in_file --file="$file" --key="URL")" == "https://domain.tld/foobar" - ynh_write_var_in_file "$file" "ldap_base" "ou=users,dc=yunohost,dc=org" - test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=users,dc=yunohost,dc=org" + ynh_write_var_in_file --file="$file" --key="ldap_base" --value="ou=users,dc=yunohost,dc=org" + test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=users,dc=yunohost,dc=org" - ynh_write_var_in_file "$file" "TITLE" "YOLO" "YNH_ICI" - test "$(ynh_read_var_in_file "$file" "TITLE" "YNH_ICI")" == "YOLO" + ynh_write_var_in_file --file="$file" --key="TITLE" --value="YOLO" --after"YNH_ICI" + test "$(ynh_read_var_in_file --file="$file" --key="TITLE" --after"YNH_ICI")" == "YOLO" - ! ynh_write_var_in_file "$file" "NONEXISTENT" "foobar" - ! _read_py "$file" "NONEXISTENT" - test "$(ynh_read_var_in_file "$file" "NONEXISTENT")" == "YNH_NULL" + ! ynh_write_var_in_file --file="$file" --key="NONEXISTENT" --value="foobar" + ! _read_py "$file" "NONEXISTENT" + test "$(ynh_read_var_in_file --file="$file" --key="NONEXISTENT")" == "YNH_NULL" - ! ynh_write_var_in_file "$file" "ENABLE" "foobar" - ! _read_py "$file" "ENABLE" - test "$(ynh_read_var_in_file "$file" "ENABLE")" == "YNH_NULL" + ! ynh_write_var_in_file --file="$file" --key="ENABLE" -value="foobar" + ! _read_py "$file" "ENABLE" + test "$(ynh_read_var_in_file --file="$file" --key="ENABLE")" == "YNH_NULL" } @@ -172,34 +172,34 @@ url = https://yunohost.org ldap_base = ou=users,dc=yunohost,dc=org EOF - test "$(_read_ini "$file" "foo")" == "null" - test "$(ynh_read_var_in_file "$file" "foo")" == "null" + test "$(_read_ini "$file" "foo")" == "null" + test "$(ynh_read_var_in_file --file="$file" --key="foo")" == "null" - test "$(_read_ini "$file" "enabled")" == "False" - test "$(ynh_read_var_in_file "$file" "enabled")" == "False" + test "$(_read_ini "$file" "enabled")" == "False" + test "$(ynh_read_var_in_file --file="$file" --key="enabled")" == "False" - test "$(_read_ini "$file" "title")" == "Lorem Ipsum" - test "$(ynh_read_var_in_file "$file" "title")" == "Lorem Ipsum" + test "$(_read_ini "$file" "title")" == "Lorem Ipsum" + test "$(ynh_read_var_in_file --file="$file" --key="title")" == "Lorem Ipsum" - test "$(_read_ini "$file" "theme")" == "colib'ris" - test "$(ynh_read_var_in_file "$file" "theme")" == "colib'ris" + test "$(_read_ini "$file" "theme")" == "colib'ris" + test "$(ynh_read_var_in_file --file="$file" --key="theme")" == "colib'ris" - #test "$(_read_ini "$file" "email")" == "root@example.com" - test "$(ynh_read_var_in_file "$file" "email")" == "root@example.com" + #test "$(_read_ini "$file" "email")" == "root@example.com" + test "$(ynh_read_var_in_file --file="$file" --key="email")" == "root@example.com" - #test "$(_read_ini "$file" "port")" == "1234" - test "$(ynh_read_var_in_file "$file" "port")" == "1234" + #test "$(_read_ini "$file" "port")" == "1234" + test "$(ynh_read_var_in_file --file="$file" --key="port")" == "1234" - test "$(_read_ini "$file" "url")" == "https://yunohost.org" - test "$(ynh_read_var_in_file "$file" "url")" == "https://yunohost.org" + test "$(_read_ini "$file" "url")" == "https://yunohost.org" + test "$(ynh_read_var_in_file --file="$file" --key="url")" == "https://yunohost.org" - test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=users,dc=yunohost,dc=org" + test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=users,dc=yunohost,dc=org" - ! _read_ini "$file" "nonexistent" - test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + ! _read_ini "$file" "nonexistent" + test "$(ynh_read_var_in_file --file="$file" --key="nonexistent")" == "YNH_NULL" - ! _read_ini "$file" "enable" - test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" + ! _read_ini "$file" "enable" + test "$(ynh_read_var_in_file --file="$file" --key="enable")" == "YNH_NULL" } @@ -223,44 +223,44 @@ url = https://yunohost.org ldap_base = ou=users,dc=yunohost,dc=org EOF - ynh_write_var_in_file "$file" "foo" "bar" - test "$(_read_ini "$file" "foo")" == "bar" - test "$(ynh_read_var_in_file "$file" "foo")" == "bar" + ynh_write_var_in_file --file="$file" --key="foo" --value="bar" + test "$(_read_ini "$file" "foo")" == "bar" + test "$(ynh_read_var_in_file --file="$file" --key="foo")" == "bar" - ynh_write_var_in_file "$file" "enabled" "True" - test "$(_read_ini "$file" "enabled")" == "True" - test "$(ynh_read_var_in_file "$file" "enabled")" == "True" + ynh_write_var_in_file --file="$file" --key="enabled" --value="True" + test "$(_read_ini "$file" "enabled")" == "True" + test "$(ynh_read_var_in_file --file="$file" --key="enabled")" == "True" - ynh_write_var_in_file "$file" "title" "Foo Bar" - test "$(_read_ini "$file" "title")" == "Foo Bar" - test "$(ynh_read_var_in_file "$file" "title")" == "Foo Bar" + ynh_write_var_in_file --file="$file" --key="title" --value="Foo Bar" + test "$(_read_ini "$file" "title")" == "Foo Bar" + test "$(ynh_read_var_in_file --file="$file" --key="title")" == "Foo Bar" - ynh_write_var_in_file "$file" "theme" "super-awesome-theme" - test "$(_read_ini "$file" "theme")" == "super-awesome-theme" - test "$(ynh_read_var_in_file "$file" "theme")" == "super-awesome-theme" + ynh_write_var_in_file --file="$file" --key="theme" --value="super-awesome-theme" + test "$(_read_ini "$file" "theme")" == "super-awesome-theme" + test "$(ynh_read_var_in_file --file="$file" --key="theme")" == "super-awesome-theme" - ynh_write_var_in_file "$file" "email" "sam@domain.tld" - test "$(_read_ini "$file" "email")" == "sam@domain.tld # This is a comment without quotes" - test "$(ynh_read_var_in_file "$file" "email")" == "sam@domain.tld" + ynh_write_var_in_file --file="$file" --key="email" --value="sam@domain.tld" + test "$(_read_ini "$file" "email")" == "sam@domain.tld # This is a comment without quotes" + test "$(ynh_read_var_in_file --file="$file" --key="email")" == "sam@domain.tld" - ynh_write_var_in_file "$file" "port" "5678" - test "$(_read_ini "$file" "port")" == "5678 # This is a comment without quotes" - test "$(ynh_read_var_in_file "$file" "port")" == "5678" + ynh_write_var_in_file --file="$file" --key="port" --value="5678" + test "$(_read_ini "$file" "port")" == "5678 # This is a comment without quotes" + test "$(ynh_read_var_in_file --file="$file" --key="port")" == "5678" - ynh_write_var_in_file "$file" "url" "https://domain.tld/foobar" - test "$(_read_ini "$file" "url")" == "https://domain.tld/foobar" - test "$(ynh_read_var_in_file "$file" "url")" == "https://domain.tld/foobar" + ynh_write_var_in_file --file="$file" --key="url" --value="https://domain.tld/foobar" + test "$(_read_ini "$file" "url")" == "https://domain.tld/foobar" + test "$(ynh_read_var_in_file --file="$file" --key="url")" == "https://domain.tld/foobar" - ynh_write_var_in_file "$file" "ldap_base" "ou=users,dc=yunohost,dc=org" - test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=users,dc=yunohost,dc=org" + ynh_write_var_in_file "$file" "ldap_base" "ou=users,dc=yunohost,dc=org" + test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=users,dc=yunohost,dc=org" - ! ynh_write_var_in_file "$file" "nonexistent" "foobar" - ! _read_ini "$file" "nonexistent" - test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + ! ynh_write_var_in_file --file="$file" --key="nonexistent" "foobar" + ! _read_ini "$file" "nonexistent" + test "$(ynh_read_var_in_file --file="$file" --key="nonexistent")" == "YNH_NULL" - ! ynh_write_var_in_file "$file" "enable" "foobar" - ! _read_ini "$file" "enable" - test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" + ! ynh_write_var_in_file --file="$file" --key="enable" "foobar" + ! _read_ini "$file" "enable" + test "$(ynh_read_var_in_file --file="$file" --key="enable")" == "YNH_NULL" } @@ -300,34 +300,34 @@ dict: ldap_base: ou=users,dc=yunohost,dc=org EOF - test "$(_read_yaml "$file" "foo")" == "None" - test "$(ynh_read_var_in_file "$file" "foo")" == "" + test "$(_read_yaml "$file" "foo")" == "None" + test "$(ynh_read_var_in_file --file="$file" --key="foo")" == "" - test "$(_read_yaml "$file" "enabled")" == "False" - test "$(ynh_read_var_in_file "$file" "enabled")" == "false" + test "$(_read_yaml "$file" "enabled")" == "False" + test "$(ynh_read_var_in_file --file="$file" --key="enabled")" == "false" - test "$(_read_yaml "$file" "title")" == "Lorem Ipsum" - test "$(ynh_read_var_in_file "$file" "title")" == "Lorem Ipsum" + test "$(_read_yaml "$file" "title")" == "Lorem Ipsum" + test "$(ynh_read_var_in_file --file="$file" --key="title")" == "Lorem Ipsum" - test "$(_read_yaml "$file" "theme")" == "colib'ris" - test "$(ynh_read_var_in_file "$file" "theme")" == "colib'ris" + test "$(_read_yaml "$file" "theme")" == "colib'ris" + test "$(ynh_read_var_in_file --file="$file" --key="theme")" == "colib'ris" - test "$(_read_yaml "$file" "email")" == "root@example.com" - test "$(ynh_read_var_in_file "$file" "email")" == "root@example.com" + test "$(_read_yaml "$file" "email")" == "root@example.com" + test "$(ynh_read_var_in_file --file="$file" --key="email")" == "root@example.com" - test "$(_read_yaml "$file" "port")" == "1234" - test "$(ynh_read_var_in_file "$file" "port")" == "1234" + test "$(_read_yaml "$file" "port")" == "1234" + test "$(ynh_read_var_in_file --file="$file" --key="port")" == "1234" - test "$(_read_yaml "$file" "url")" == "https://yunohost.org" - test "$(ynh_read_var_in_file "$file" "url")" == "https://yunohost.org" + test "$(_read_yaml "$file" "url")" == "https://yunohost.org" + test "$(ynh_read_var_in_file --file="$file" --key="url")" == "https://yunohost.org" - test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=users,dc=yunohost,dc=org" + test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=users,dc=yunohost,dc=org" - ! _read_yaml "$file" "nonexistent" - test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + ! _read_yaml "$file" "nonexistent" + test "$(ynh_read_var_in_file --file="$file" --key="nonexistent")" == "YNH_NULL" - ! _read_yaml "$file" "enable" - test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" + ! _read_yaml "$file" "enable" + test "$(ynh_read_var_in_file --file="$file" --key="enable")" == "YNH_NULL" } @@ -349,44 +349,44 @@ dict: ldap_base: ou=users,dc=yunohost,dc=org EOF - ynh_write_var_in_file "$file" "foo" "bar" + ynh_write_var_in_file --file="$file" --key="foo" --value="bar" # cat $dummy_dir/dummy.yml # to debug - ! test "$(_read_yaml "$file" "foo")" == "bar" # writing broke the yaml syntax... "foo:bar" (no space aftr :) - test "$(ynh_read_var_in_file "$file" "foo")" == "bar" + ! test "$(_read_yaml "$file" "foo")" == "bar" # writing broke the yaml syntax... "foo:bar" (no space aftr :) + test "$(ynh_read_var_in_file --file="$file" --key="foo")" == "bar" - ynh_write_var_in_file "$file" "enabled" "true" - test "$(_read_yaml "$file" "enabled")" == "True" - test "$(ynh_read_var_in_file "$file" "enabled")" == "true" + ynh_write_var_in_file --file="$file" --key="enabled" --value="true" + test "$(_read_yaml "$file" "enabled")" == "True" + test "$(ynh_read_var_in_file --file="$file" --key="enabled")" == "true" - ynh_write_var_in_file "$file" "title" "Foo Bar" - test "$(_read_yaml "$file" "title")" == "Foo Bar" - test "$(ynh_read_var_in_file "$file" "title")" == "Foo Bar" + ynh_write_var_in_file --file="$file" --key="title" --value="Foo Bar" + test "$(_read_yaml "$file" "title")" == "Foo Bar" + test "$(ynh_read_var_in_file --file="$file" --key="title")" == "Foo Bar" - ynh_write_var_in_file "$file" "theme" "super-awesome-theme" - test "$(_read_yaml "$file" "theme")" == "super-awesome-theme" - test "$(ynh_read_var_in_file "$file" "theme")" == "super-awesome-theme" + ynh_write_var_in_file --file="$file" --key="theme" --value="super-awesome-theme" + test "$(_read_yaml "$file" "theme")" == "super-awesome-theme" + test "$(ynh_read_var_in_file --file="$file" --key="theme")" == "super-awesome-theme" - ynh_write_var_in_file "$file" "email" "sam@domain.tld" - test "$(_read_yaml "$file" "email")" == "sam@domain.tld" - test "$(ynh_read_var_in_file "$file" "email")" == "sam@domain.tld" + ynh_write_var_in_file --file="$file" --key="email" --value="sam@domain.tld" + test "$(_read_yaml "$file" "email")" == "sam@domain.tld" + test "$(ynh_read_var_in_file --file="$file" --key="email")" == "sam@domain.tld" - ynh_write_var_in_file "$file" "port" "5678" - test "$(_read_yaml "$file" "port")" == "5678" - test "$(ynh_read_var_in_file "$file" "port")" == "5678" + ynh_write_var_in_file --file="$file" --key="port" --value="5678" + test "$(_read_yaml "$file" "port")" == "5678" + test "$(ynh_read_var_in_file --file="$file" --key="port")" == "5678" - ynh_write_var_in_file "$file" "url" "https://domain.tld/foobar" - test "$(_read_yaml "$file" "url")" == "https://domain.tld/foobar" - test "$(ynh_read_var_in_file "$file" "url")" == "https://domain.tld/foobar" + ynh_write_var_in_file --file="$file" --key="url" --value="https://domain.tld/foobar" + test "$(_read_yaml "$file" "url")" == "https://domain.tld/foobar" + test "$(ynh_read_var_in_file --file="$file" --key="url")" == "https://domain.tld/foobar" - ynh_write_var_in_file "$file" "ldap_base" "ou=foobar,dc=domain,dc=tld" - test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=foobar,dc=domain,dc=tld" + ynh_write_var_in_file --file="$file" --key="ldap_base" --value="ou=foobar,dc=domain,dc=tld" + test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=foobar,dc=domain,dc=tld" - ! ynh_write_var_in_file "$file" "nonexistent" "foobar" - test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + ! ynh_write_var_in_file --file="$file" --key="nonexistent" --value="foobar" + test "$(ynh_read_var_in_file --file="$file" --key="nonexistent")" == "YNH_NULL" - ! ynh_write_var_in_file "$file" "enable" "foobar" - test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" - test "$(ynh_read_var_in_file "$file" "enabled")" == "true" + ! ynh_write_var_in_file --file="$file" --key="enable" --value="foobar" + test "$(ynh_read_var_in_file --file="$file" --key="enable")" == "YNH_NULL" + test "$(ynh_read_var_in_file --file="$file" --key="enabled")" == "true" } ######################### @@ -427,34 +427,34 @@ ynhtest_config_read_json() { EOF - test "$(_read_json "$file" "foo")" == "None" - test "$(ynh_read_var_in_file "$file" "foo")" == "null" + test "$(_read_json "$file" "foo")" == "None" + test "$(ynh_read_var_in_file --file="$file" --key="foo")" == "null" - test "$(_read_json "$file" "enabled")" == "False" - test "$(ynh_read_var_in_file "$file" "enabled")" == "false" + test "$(_read_json "$file" "enabled")" == "False" + test "$(ynh_read_var_in_file --file="$file" --key="enabled")" == "false" - test "$(_read_json "$file" "title")" == "Lorem Ipsum" - test "$(ynh_read_var_in_file "$file" "title")" == "Lorem Ipsum" + test "$(_read_json "$file" "title")" == "Lorem Ipsum" + test "$(ynh_read_var_in_file --file="$file" --key="title")" == "Lorem Ipsum" - test "$(_read_json "$file" "theme")" == "colib'ris" - test "$(ynh_read_var_in_file "$file" "theme")" == "colib'ris" + test "$(_read_json "$file" "theme")" == "colib'ris" + test "$(ynh_read_var_in_file --file="$file" --key="theme")" == "colib'ris" - test "$(_read_json "$file" "email")" == "root@example.com" - test "$(ynh_read_var_in_file "$file" "email")" == "root@example.com" + test "$(_read_json "$file" "email")" == "root@example.com" + test "$(ynh_read_var_in_file --file="$file" --key="email")" == "root@example.com" - test "$(_read_json "$file" "port")" == "1234" - test "$(ynh_read_var_in_file "$file" "port")" == "1234" + test "$(_read_json "$file" "port")" == "1234" + test "$(ynh_read_var_in_file --file="$file" --key="port")" == "1234" - test "$(_read_json "$file" "url")" == "https://yunohost.org" - test "$(ynh_read_var_in_file "$file" "url")" == "https://yunohost.org" + test "$(_read_json "$file" "url")" == "https://yunohost.org" + test "$(ynh_read_var_in_file --file="$file" --key="url")" == "https://yunohost.org" - test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=users,dc=yunohost,dc=org" + test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=users,dc=yunohost,dc=org" - ! _read_json "$file" "nonexistent" - test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + ! _read_json "$file" "nonexistent" + test "$(ynh_read_var_in_file --file="$file" --key="nonexistent")" == "YNH_NULL" - ! _read_json "$file" "enable" - test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" + ! _read_json "$file" "enable" + test "$(ynh_read_var_in_file --file="$file" --key="enable")" == "YNH_NULL" } @@ -477,48 +477,48 @@ ynhtest_config_write_json() { } EOF - ynh_write_var_in_file "$file" "foo" "bar" + ynh_write_var_in_file --file="$file" --key="foo" --value="bar" cat $file - test "$(_read_json "$file" "foo")" == "bar" - test "$(ynh_read_var_in_file "$file" "foo")" == "bar" + test "$(_read_json "$file" "foo")" == "bar" + test "$(ynh_read_var_in_file --file="$file" --key="foo")" == "bar" - ynh_write_var_in_file "$file" "enabled" "true" + ynh_write_var_in_file --file="$file" --key="enabled" --value="true" cat $file - test "$(_read_json "$file" "enabled")" == "true" - test "$(ynh_read_var_in_file "$file" "enabled")" == "true" + test "$(_read_json "$file" "enabled")" == "true" + test "$(ynh_read_var_in_file --file="$file" --key="enabled")" == "true" - ynh_write_var_in_file "$file" "title" "Foo Bar" + ynh_write_var_in_file --file="$file" --key="title" --value="Foo Bar" cat $file - test "$(_read_json "$file" "title")" == "Foo Bar" - test "$(ynh_read_var_in_file "$file" "title")" == "Foo Bar" + test "$(_read_json "$file" "title")" == "Foo Bar" + test "$(ynh_read_var_in_file --file="$file" --key="title")" == "Foo Bar" - ynh_write_var_in_file "$file" "theme" "super-awesome-theme" + ynh_write_var_in_file --file="$file" --key="theme" --value="super-awesome-theme" cat $file - test "$(_read_json "$file" "theme")" == "super-awesome-theme" - test "$(ynh_read_var_in_file "$file" "theme")" == "super-awesome-theme" + test "$(_read_json "$file" "theme")" == "super-awesome-theme" + test "$(ynh_read_var_in_file --file="$file" --key="theme")" == "super-awesome-theme" - ynh_write_var_in_file "$file" "email" "sam@domain.tld" + ynh_write_var_in_file --file="$file" --key="email" --value="sam@domain.tld" cat $file - test "$(_read_json "$file" "email")" == "sam@domain.tld" - test "$(ynh_read_var_in_file "$file" "email")" == "sam@domain.tld" + test "$(_read_json "$file" "email")" == "sam@domain.tld" + test "$(ynh_read_var_in_file --file="$file" --key="email")" == "sam@domain.tld" - ynh_write_var_in_file "$file" "port" "5678" - test "$(_read_json "$file" "port")" == "5678" - test "$(ynh_read_var_in_file "$file" "port")" == "5678" + ynh_write_var_in_file --file="$file" --key="port" --value="5678" + test "$(_read_json "$file" "port")" == "5678" + test "$(ynh_read_var_in_file --file="$file" --key="port")" == "5678" - ynh_write_var_in_file "$file" "url" "https://domain.tld/foobar" - test "$(_read_json "$file" "url")" == "https://domain.tld/foobar" - test "$(ynh_read_var_in_file "$file" "url")" == "https://domain.tld/foobar" + ynh_write_var_in_file --file="$file" --key="url" --value="https://domain.tld/foobar" + test "$(_read_json "$file" "url")" == "https://domain.tld/foobar" + test "$(ynh_read_var_in_file --file="$file" --key="url")" == "https://domain.tld/foobar" - ynh_write_var_in_file "$file" "ldap_base" "ou=foobar,dc=domain,dc=tld" - test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=foobar,dc=domain,dc=tld" + ynh_write_var_in_file --file="$file" --key="ldap_base" --value="ou=foobar,dc=domain,dc=tld" + test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=foobar,dc=domain,dc=tld" - ! ynh_write_var_in_file "$file" "nonexistent" "foobar" - test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + ! ynh_write_var_in_file --file="$file" --key="nonexistent" --value="foobar" + test "$(ynh_read_var_in_file --file="$file" --key="nonexistent")" == "YNH_NULL" - ! ynh_write_var_in_file "$file" "enable" "foobar" - test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" - test "$(ynh_read_var_in_file "$file" "enabled")" == "true" + ! ynh_write_var_in_file --file="$file" --key="enable" --value="foobar" + test "$(ynh_read_var_in_file --file="$file" --key="enable")" == "YNH_NULL" + test "$(ynh_read_var_in_file --file="$file" --key="enabled")" == "true" } ####################### @@ -563,38 +563,38 @@ ynhtest_config_read_php() { ?> EOF - test "$(_read_php "$file" "foo")" == "NULL" - test "$(ynh_read_var_in_file "$file" "foo")" == "NULL" + test "$(_read_php "$file" "foo")" == "NULL" + test "$(ynh_read_var_in_file --file="$file" --key="foo")" == "NULL" - test "$(_read_php "$file" "enabled")" == "false" - test "$(ynh_read_var_in_file "$file" "enabled")" == "false" + test "$(_read_php "$file" "enabled")" == "false" + test "$(ynh_read_var_in_file --file="$file" --key="enabled")" == "false" - test "$(_read_php "$file" "title")" == "Lorem Ipsum" - test "$(ynh_read_var_in_file "$file" "title")" == "Lorem Ipsum" + test "$(_read_php "$file" "title")" == "Lorem Ipsum" + test "$(ynh_read_var_in_file --file="$file" --key="title")" == "Lorem Ipsum" - test "$(_read_php "$file" "theme")" == "colib\\'ris" - test "$(ynh_read_var_in_file "$file" "theme")" == "colib'ris" + test "$(_read_php "$file" "theme")" == "colib\\'ris" + test "$(ynh_read_var_in_file --file="$file" --key="theme")" == "colib'ris" - test "$(_read_php "$file" "email")" == "root@example.com" - test "$(ynh_read_var_in_file "$file" "email")" == "root@example.com" + test "$(_read_php "$file" "email")" == "root@example.com" + test "$(ynh_read_var_in_file --file="$file" --key="email")" == "root@example.com" - test "$(_read_php "$file" "port")" == "1234" - test "$(ynh_read_var_in_file "$file" "port")" == "1234" + test "$(_read_php "$file" "port")" == "1234" + test "$(ynh_read_var_in_file --file="$file" --key="port")" == "1234" - test "$(_read_php "$file" "url")" == "https://yunohost.org" - test "$(ynh_read_var_in_file "$file" "url")" == "https://yunohost.org" + test "$(_read_php "$file" "url")" == "https://yunohost.org" + test "$(ynh_read_var_in_file --file="$file" --key="url")" == "https://yunohost.org" - test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=users,dc=yunohost,dc=org" + test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=users,dc=yunohost,dc=org" - test "$(ynh_read_var_in_file "$file" "user")" == "camille" + test "$(ynh_read_var_in_file --file="$file" --key="user")" == "camille" - test "$(ynh_read_var_in_file "$file" "DB_HOST")" == "localhost" + test "$(ynh_read_var_in_file --file="$file" --key="DB_HOST")" == "localhost" - ! _read_php "$file" "nonexistent" - test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + ! _read_php "$file" "nonexistent" + test "$(ynh_read_var_in_file --file="$file" --key="nonexistent")" == "YNH_NULL" - ! _read_php "$file" "enable" - test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" + ! _read_php "$file" "enable" + test "$(ynh_read_var_in_file --file="$file" --key="enable")" == "YNH_NULL" } @@ -619,44 +619,44 @@ ynhtest_config_write_php() { ?> EOF - ynh_write_var_in_file "$file" "foo" "bar" - test "$(_read_php "$file" "foo")" == "bar" - test "$(ynh_read_var_in_file "$file" "foo")" == "bar" + ynh_write_var_in_file --file="$file" --key="foo" --value="bar" + test "$(_read_php "$file" "foo")" == "bar" + test "$(ynh_read_var_in_file --file="$file" --key="foo")" == "bar" - ynh_write_var_in_file "$file" "enabled" "true" - test "$(_read_php "$file" "enabled")" == "true" - test "$(ynh_read_var_in_file "$file" "enabled")" == "true" + ynh_write_var_in_file --file="$file" --key="enabled" --value="true" + test "$(_read_php "$file" "enabled")" == "true" + test "$(ynh_read_var_in_file --file="$file" --key="enabled")" == "true" - ynh_write_var_in_file "$file" "title" "Foo Bar" + ynh_write_var_in_file --file="$file" --key="title" --value="Foo Bar" cat $file - test "$(_read_php "$file" "title")" == "Foo Bar" - test "$(ynh_read_var_in_file "$file" "title")" == "Foo Bar" + test "$(_read_php "$file" "title")" == "Foo Bar" + test "$(ynh_read_var_in_file --file="$file" --key="title")" == "Foo Bar" - ynh_write_var_in_file "$file" "theme" "super-awesome-theme" + ynh_write_var_in_file --file="$file" --key="theme" --value="super-awesome-theme" cat $file - test "$(_read_php "$file" "theme")" == "super-awesome-theme" - test "$(ynh_read_var_in_file "$file" "theme")" == "super-awesome-theme" + test "$(_read_php "$file" "theme")" == "super-awesome-theme" + test "$(ynh_read_var_in_file --file="$file" --key="theme")" == "super-awesome-theme" - ynh_write_var_in_file "$file" "email" "sam@domain.tld" + ynh_write_var_in_file --file="$file" --key="email" --value="sam@domain.tld" cat $file - test "$(_read_php "$file" "email")" == "sam@domain.tld" - test "$(ynh_read_var_in_file "$file" "email")" == "sam@domain.tld" + test "$(_read_php "$file" "email")" == "sam@domain.tld" + test "$(ynh_read_var_in_file --file="$file" --key="email")" == "sam@domain.tld" - ynh_write_var_in_file "$file" "port" "5678" - test "$(_read_php "$file" "port")" == "5678" - test "$(ynh_read_var_in_file "$file" "port")" == "5678" + ynh_write_var_in_file --file="$file" --key="port" --value="5678" + test "$(_read_php "$file" "port")" == "5678" + test "$(ynh_read_var_in_file --file="$file" --key="port")" == "5678" - ynh_write_var_in_file "$file" "url" "https://domain.tld/foobar" - test "$(_read_php "$file" "url")" == "https://domain.tld/foobar" - test "$(ynh_read_var_in_file "$file" "url")" == "https://domain.tld/foobar" + ynh_write_var_in_file --file="$file" --key="url" --value="https://domain.tld/foobar" + test "$(_read_php "$file" "url")" == "https://domain.tld/foobar" + test "$(ynh_read_var_in_file --file="$file" --key="url")" == "https://domain.tld/foobar" - ynh_write_var_in_file "$file" "ldap_base" "ou=foobar,dc=domain,dc=tld" - test "$(ynh_read_var_in_file "$file" "ldap_base")" == "ou=foobar,dc=domain,dc=tld" + ynh_write_var_in_file --file="$file" --key="ldap_base" --value="ou=foobar,dc=domain,dc=tld" + test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=foobar,dc=domain,dc=tld" - ! ynh_write_var_in_file "$file" "nonexistent" "foobar" - test "$(ynh_read_var_in_file "$file" "nonexistent")" == "YNH_NULL" + ! ynh_write_var_in_file --file="$file" --key="nonexistent" --value="foobar" + test "$(ynh_read_var_in_file --file="$file" --key="nonexistent")" == "YNH_NULL" - ! ynh_write_var_in_file "$file" "enable" "foobar" - test "$(ynh_read_var_in_file "$file" "enable")" == "YNH_NULL" - test "$(ynh_read_var_in_file "$file" "enabled")" == "true" + ! ynh_write_var_in_file --file="$file" --key="enable" --value="foobar" + test "$(ynh_read_var_in_file --file="$file" --key="enable")" == "YNH_NULL" + test "$(ynh_read_var_in_file --file="$file" --key="enabled")" == "true" } diff --git a/tests/test_helpers.v2.1.d/ynhtest_logging.sh b/tests/test_helpers.v2.1.d/ynhtest_logging.sh index 1b2452bc4..2ad9607ae 100644 --- a/tests/test_helpers.v2.1.d/ynhtest_logging.sh +++ b/tests/test_helpers.v2.1.d/ynhtest_logging.sh @@ -45,48 +45,7 @@ ynhtest_exec_warn_less() { test -e "$FOOANDBAR" rm "$FOOANDBAR" - ########################### - # Legacy stuff using eval # - ########################### - test ! -e $FOO - ynh_hide_warnings "touch $FOO" - test -e $FOO - rm $FOO - - test ! -e $FOO1QUOTEBAR - ynh_hide_warnings "touch \"$FOO1QUOTEBAR\"" - # (this works but expliciy *double* quotes have to be provided) - test -e $FOO1QUOTEBAR - rm $FOO1QUOTEBAR - - #test ! -e $FOO2QUOTEBAR - #ynh_hide_warnings "touch \'$FOO2QUOTEBAR\'" - ## (this doesn't work with simple or double quotes) - #test -e $FOO2QUOTEBAR - #rm $FOO2QUOTEBAR - - test ! -e $BAR - ynh_hide_warnings 'touch $BAR' - # That one works because $BAR is only interpreted during eval - test -e $BAR - rm $BAR - - #test ! -e $BAR - #ynh_hide_warnings "touch $BAR" - # That one doesn't work because $bar gets interpreted as empty var by eval... - #test -e $BAR - #rm $BAR - - test ! -e "$FOOBAR" - ynh_hide_warnings "touch \"$FOOBAR\"" - # (works but requires explicit double quotes otherwise eval would interpret 'foo bar' as two separate args..) - test -e "$FOOBAR" - rm "$FOOBAR" - - test ! -e "$FOOANDBAR" - ynh_hide_warnings "touch \"$FOOANDBAR\"" - # (works but requires explicit double quotes otherwise eval would interpret '&' as a "run command in background" and also bar is not a valid command) - test -e "$FOOANDBAR" - rm "$FOOANDBAR" + ! ynh_hide_warnings "touch $FOO" + ! test -e $FOO } diff --git a/tests/test_helpers.v2.1.d/ynhtest_settings.sh b/tests/test_helpers.v2.1.d/ynhtest_settings.sh index be765be82..308b45f6b 100644 --- a/tests/test_helpers.v2.1.d/ynhtest_settings.sh +++ b/tests/test_helpers.v2.1.d/ynhtest_settings.sh @@ -7,23 +7,18 @@ ynhtest_settings() { test -z "$(ynh_app_setting_get --key="foo")" test -z "$(ynh_app_setting_get --key="bar")" - test -z "$(ynh_app_setting_get --app="$app" --key="baz")" ynh_app_setting_set --key="foo" --value="foovalue" ynh_app_setting_set --app="$app" --key="bar" --value="barvalue" - ynh_app_setting_set "$app" baz bazvalue test "$(ynh_app_setting_get --key="foo")" == "foovalue" test "$(ynh_app_setting_get --key="bar")" == "barvalue" - test "$(ynh_app_setting_get --app="$app" --key="baz")" == "bazvalue" ynh_app_setting_delete --key="foo" ynh_app_setting_delete --app="$app" --key="bar" - ynh_app_setting_delete "$app" baz test -z "$(ynh_app_setting_get --key="foo")" test -z "$(ynh_app_setting_get --key="bar")" - test -z "$(ynh_app_setting_get --app="$app" --key="baz")" rm -rf "/etc/yunohost/apps/$app" } diff --git a/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh b/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh index 323b74796..9953df406 100644 --- a/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh +++ b/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh @@ -16,7 +16,7 @@ _make_dummy_manifest() { cat << EOF packaging_format = 2 -id = "helloworld" +id = "$app" version = "0.1~ynh2" [resources] @@ -33,6 +33,7 @@ EOF ynhtest_setup_source_nominal() { install_dir="$(mktemp -d -p $VAR_WWW)" _make_dummy_manifest > ../manifest.toml + cat ../manifest.toml # debug ynh_setup_source --dest_dir="$install_dir" --source_id="dummy" diff --git a/tests/test_helpers.v2.1.d/ynhtest_templating.sh b/tests/test_helpers.v2.1.d/ynhtest_templating.sh index c8015093a..703c915d2 100644 --- a/tests/test_helpers.v2.1.d/ynhtest_templating.sh +++ b/tests/test_helpers.v2.1.d/ynhtest_templating.sh @@ -10,6 +10,7 @@ foo=__FOO__ EOF foo="bar" + install_dir="$VAR_WWW" ynh_config_add --template="$template" --destination="$VAR_WWW/config.txt" From 4e3f30ef8243243105721c57ed1514fb9f0d3c1d Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Mon, 1 Jul 2024 21:51:43 +0200 Subject: [PATCH 048/218] better help message for 'diagnosis unignore' --- share/actionsmap.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/actionsmap.yml b/share/actionsmap.yml index eb328dbc6..9d5c76b01 100755 --- a/share/actionsmap.yml +++ b/share/actionsmap.yml @@ -2079,6 +2079,6 @@ diagnosis: api: PUT /diagnosis/unignore arguments: --filter: - help: Remove a filter (it should be an existing filter as listed with --list) + help: Remove a filter (it should be an existing filter as listed with "ignore --list") nargs: "*" metavar: CRITERIA From 2640dd31718a6af802d4e26351d5cce20cc16026 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Jul 2024 21:59:45 +0200 Subject: [PATCH 049/218] =?UTF-8?q?friskies=C2=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_helpers.v2.1.d/ynhtest_config.sh | 10 +++++----- tests/test_helpers.v2.1.d/ynhtest_setup_source.sh | 2 +- tests/test_helpers.v2.1.d/ynhtest_templating.sh | 7 ++++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/test_helpers.v2.1.d/ynhtest_config.sh b/tests/test_helpers.v2.1.d/ynhtest_config.sh index 51fd44cfe..ac7c2f853 100644 --- a/tests/test_helpers.v2.1.d/ynhtest_config.sh +++ b/tests/test_helpers.v2.1.d/ynhtest_config.sh @@ -63,7 +63,7 @@ EOF test "$(ynh_read_var_in_file --file="$file" --key="user")" == "camille" - test "$(ynh_read_var_in_file --file="$file" --key="TITLE" --after"YNH_ICI")" == "Hello world" + test "$(ynh_read_var_in_file --file="$file" --key="TITLE" --after="YNH_ICI")" == "Hello world" ! _read_py "$file" "NONEXISTENT" test "$(ynh_read_var_in_file --file="$file" --key="NONEXISTENT")" == "YNH_NULL" @@ -123,8 +123,8 @@ EOF ynh_write_var_in_file --file="$file" --key="ldap_base" --value="ou=users,dc=yunohost,dc=org" test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=users,dc=yunohost,dc=org" - ynh_write_var_in_file --file="$file" --key="TITLE" --value="YOLO" --after"YNH_ICI" - test "$(ynh_read_var_in_file --file="$file" --key="TITLE" --after"YNH_ICI")" == "YOLO" + ynh_write_var_in_file --file="$file" --key="TITLE" --value="YOLO" --after="YNH_ICI" + test "$(ynh_read_var_in_file --file="$file" --key="TITLE" --after="YNH_ICI")" == "YOLO" ! ynh_write_var_in_file --file="$file" --key="NONEXISTENT" --value="foobar" ! _read_py "$file" "NONEXISTENT" @@ -251,8 +251,8 @@ EOF test "$(_read_ini "$file" "url")" == "https://domain.tld/foobar" test "$(ynh_read_var_in_file --file="$file" --key="url")" == "https://domain.tld/foobar" - ynh_write_var_in_file "$file" "ldap_base" "ou=users,dc=yunohost,dc=org" - test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=users,dc=yunohost,dc=org" + ynh_write_var_in_file --file="$file" --key="ldap_base" --value="ou=users,dc=yunohost,dc=org" + test "$(ynh_read_var_in_file --file="$file" --key="ldap_base")" == "ou=users,dc=yunohost,dc=org" ! ynh_write_var_in_file --file="$file" --key="nonexistent" "foobar" ! _read_ini "$file" "nonexistent" diff --git a/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh b/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh index 9953df406..0b9d2e665 100644 --- a/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh +++ b/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh @@ -33,7 +33,6 @@ EOF ynhtest_setup_source_nominal() { install_dir="$(mktemp -d -p $VAR_WWW)" _make_dummy_manifest > ../manifest.toml - cat ../manifest.toml # debug ynh_setup_source --dest_dir="$install_dir" --source_id="dummy" @@ -48,6 +47,7 @@ ynhtest_setup_source_no_group_in_manifest() { install_dir="$(mktemp -d -p $VAR_WWW)" _make_dummy_manifest > ../manifest.toml sed '/www-data/d' -i ../manifest.toml + cat ../manifest.toml # debug ynh_setup_source --dest_dir="$install_dir" --source_id="dummy" diff --git a/tests/test_helpers.v2.1.d/ynhtest_templating.sh b/tests/test_helpers.v2.1.d/ynhtest_templating.sh index 703c915d2..b8cea0770 100644 --- a/tests/test_helpers.v2.1.d/ynhtest_templating.sh +++ b/tests/test_helpers.v2.1.d/ynhtest_templating.sh @@ -15,7 +15,7 @@ EOF ynh_config_add --template="$template" --destination="$VAR_WWW/config.txt" test "$(cat $VAR_WWW/config.txt)" == "$(echo -ne 'app=ynhtest\nfoo=bar')" - test "$(ls -l $VAR_WWW/config.txt | cut -d' ' -f1-4)" == "-rw-r----- 1 ynhtest ynhtest" + test "$(ls -l $VAR_WWW/config.txt | cut -d' ' -f1-4)" == "-rw------- 1 ynhtest ynhtest" } ynhtest_simple_template_system_config() { @@ -35,7 +35,7 @@ EOF ynh_config_add --template="$template" --destination="/etc/cron.d/ynhtest_config" - test "$(cat $VAR_WWW/config.txt)" == "$(echo -ne 'app=ynhtest\nfoo=bar')" + test "$(cat /etc/cron.d/ynhtest_config)" == "$(echo -ne 'app=ynhtest\nfoo=bar')" test "$(ls -l /etc/cron.d/ynhtest_config | cut -d' ' -f1-4)" == "-r-------- 1 root root" rm -f /etc/cron.d/ynhtest_config @@ -53,11 +53,12 @@ app={{ app }} EOF foo="bar" + install_dir="$VAR_WWW" ynh_config_add --template="$template" --destination="$VAR_WWW/config.txt" --jinja test "$(cat $VAR_WWW/config.txt)" == "$(echo -ne 'app=ynhtest\nfoo=true')" - test "$(ls -l $VAR_WWW/config.txt | cut -d' ' -f1-4)" == "-rw-r----- 1 ynhtest ynhtest" + test "$(ls -l $VAR_WWW/config.txt | cut -d' ' -f1-4)" == "-rw------- 1 ynhtest ynhtest" } From 131760e30c8221ded5187af8ec440eeaaa503791 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Mon, 1 Jul 2024 22:04:28 +0200 Subject: [PATCH 050/218] trying to fix #1886 --- src/service.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/service.py b/src/service.py index db96a099a..6bc325f49 100644 --- a/src/service.py +++ b/src/service.py @@ -26,7 +26,7 @@ from glob import glob from datetime import datetime from moulinette import m18n -from yunohost.diagnosis import diagnosis_ignore, diagnosis_unignore +from yunohost.diagnosis import _diagnosis_ignore from yunohost.utils.error import YunohostError, YunohostValidationError from moulinette.utils.process import check_output from moulinette.utils.log import getActionLogger @@ -297,9 +297,7 @@ def service_enable(names): names = [names] for name in names: if _run_service_command("enable", name): - services = _get_services() - if name in services: - diagnosis_unignore({"services": [{"service": name}]}) + _diagnosis_ignore(remove_filter="services", list=f"service={name}") logger.success(m18n.n("service_enabled", service=name)) else: raise YunohostError( @@ -319,9 +317,7 @@ def service_disable(names): names = [names] for name in names: if _run_service_command("disable", name): - services = _get_services() - if name in services: - diagnosis_ignore({"services": [{"service": name}]}) + _diagnosis_ignore(add_filter="services", list=f"service={name}") logger.success(m18n.n("service_disabled", service=name)) else: raise YunohostError( From 0f85ddbcffff2b2bccc081d26d061b4601859720 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Jul 2024 22:22:46 +0200 Subject: [PATCH 051/218] =?UTF-8?q?friskies=C2=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_helpers.v2.1.d/ynhtest_config.sh | 2 +- tests/test_helpers.v2.1.d/ynhtest_setup_source.sh | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/test_helpers.v2.1.d/ynhtest_config.sh b/tests/test_helpers.v2.1.d/ynhtest_config.sh index ac7c2f853..5448d41c3 100644 --- a/tests/test_helpers.v2.1.d/ynhtest_config.sh +++ b/tests/test_helpers.v2.1.d/ynhtest_config.sh @@ -130,7 +130,7 @@ EOF ! _read_py "$file" "NONEXISTENT" test "$(ynh_read_var_in_file --file="$file" --key="NONEXISTENT")" == "YNH_NULL" - ! ynh_write_var_in_file --file="$file" --key="ENABLE" -value="foobar" + ! ynh_write_var_in_file --file="$file" --key="ENABLE" --value="foobar" ! _read_py "$file" "ENABLE" test "$(ynh_read_var_in_file --file="$file" --key="ENABLE")" == "YNH_NULL" diff --git a/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh b/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh index 0b9d2e665..a8e0a5947 100644 --- a/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh +++ b/tests/test_helpers.v2.1.d/ynhtest_setup_source.sh @@ -1,17 +1,17 @@ _make_dummy_manifest() { if [ ! -e $HTTPSERVER_DIR/dummy.tar.gz ] then - pushd "$HTTPSERVER_DIR" + pushd "$HTTPSERVER_DIR" >/dev/null mkdir dummy - pushd dummy + pushd dummy >/dev/null echo "Lorem Ipsum" > index.html echo '{"foo": "bar"}' > conf.json mkdir assets echo '.some.css { }' > assets/main.css echo 'var some="js";' > assets/main.js - popd - tar -czf dummy.tar.gz dummy - popd + popd >/dev/null + tar -czf dummy.tar.gz dummy >/dev/null + popd >/dev/null fi cat << EOF @@ -38,16 +38,17 @@ ynhtest_setup_source_nominal() { test -e "$install_dir" test -e "$install_dir/index.html" + test -e "$install_dir/assets" ls -ld "$install_dir" | grep -q "drwxr-x--- . $app www-data" ls -l "$install_dir/index.html" | grep -q "\-rw-r----- . $app www-data" + ls -ld "$install_dir/assets" | grep -q "drwxr-x--- . $app www-data" } ynhtest_setup_source_no_group_in_manifest() { install_dir="$(mktemp -d -p $VAR_WWW)" _make_dummy_manifest > ../manifest.toml sed '/www-data/d' -i ../manifest.toml - cat ../manifest.toml # debug ynh_setup_source --dest_dir="$install_dir" --source_id="dummy" @@ -56,6 +57,7 @@ ynhtest_setup_source_no_group_in_manifest() { ls -ld "$install_dir" | grep -q "drwxr-x--- . $app $app" ls -l "$install_dir/index.html" | grep -q "\-rw-r----- . $app $app" + ls -ld "$install_dir/assets" | grep -q "drwxr-x--- . $app $app" } From 7c7e763a74b470f48c2c257a5bd8367a1175302b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Jul 2024 23:39:34 +0200 Subject: [PATCH 052/218] Update changelog for 11.2.20.1 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 21ddd5311..02d2cbab7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +yunohost (11.2.20.1) stable; urgency=low + + - helpers2.1: typo (1ed56952e) + - helpers2.1: add unit tests (92807afb1) + + -- Alexandre Aubin Mon, 01 Jul 2024 23:38:29 +0200 + yunohost (11.2.20) stable; urgency=low - helpers2.1: fix automigration of phpversion to php_version (3f973669) From e55c91497414a4d453ad14432b0ec0f8ad69bb78 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Tue, 2 Jul 2024 21:44:24 +0200 Subject: [PATCH 053/218] real working fix --- src/service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service.py b/src/service.py index 6bc325f49..6e17cfbee 100644 --- a/src/service.py +++ b/src/service.py @@ -297,7 +297,7 @@ def service_enable(names): names = [names] for name in names: if _run_service_command("enable", name): - _diagnosis_ignore(remove_filter="services", list=f"service={name}") + _diagnosis_ignore(remove_filter=["services", f"service={name}"]) logger.success(m18n.n("service_enabled", service=name)) else: raise YunohostError( @@ -317,7 +317,7 @@ def service_disable(names): names = [names] for name in names: if _run_service_command("disable", name): - _diagnosis_ignore(add_filter="services", list=f"service={name}") + _diagnosis_ignore(add_filter=["services", f"service={name}"]) logger.success(m18n.n("service_disabled", service=name)) else: raise YunohostError( From 41ca4222109f07796bc25b29ab3c1a093df5954d Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Tue, 2 Jul 2024 21:47:54 +0200 Subject: [PATCH 054/218] use of the intermediate functions with a more eloquent name for clarity --- src/service.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/service.py b/src/service.py index 6e17cfbee..97a5f4d65 100644 --- a/src/service.py +++ b/src/service.py @@ -26,7 +26,7 @@ from glob import glob from datetime import datetime from moulinette import m18n -from yunohost.diagnosis import _diagnosis_ignore +from yunohost.diagnosis import diagnosis_ignore, diagnosis_unignore from yunohost.utils.error import YunohostError, YunohostValidationError from moulinette.utils.process import check_output from moulinette.utils.log import getActionLogger @@ -297,7 +297,7 @@ def service_enable(names): names = [names] for name in names: if _run_service_command("enable", name): - _diagnosis_ignore(remove_filter=["services", f"service={name}"]) + diagnosis_unignore(["services", f"service={name}"]) logger.success(m18n.n("service_enabled", service=name)) else: raise YunohostError( @@ -317,7 +317,7 @@ def service_disable(names): names = [names] for name in names: if _run_service_command("disable", name): - _diagnosis_ignore(add_filter=["services", f"service={name}"]) + diagnosis_ignore(["services", f"service={name}"]) logger.success(m18n.n("service_disabled", service=name)) else: raise YunohostError( From 5d15c00d921927825a0bf98b0c5d872dac57d1b7 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 3 Jul 2024 21:52:39 +0200 Subject: [PATCH 055/218] Update changelog for 11.2.20.2 --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index 02d2cbab7..0d2b68cd5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Wed, 03 Jul 2024 21:51:50 +0200 + yunohost (11.2.20.1) stable; urgency=low - helpers2.1: typo (1ed56952e) From ab742e55bb0c8f1cd412162c9f240fce43217288 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Thu, 4 Jul 2024 00:04:17 +0200 Subject: [PATCH 056/218] translate _diagnosis_ignore function --- locales/en.json | 7 +++++++ src/diagnosis.py | 20 +++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/locales/en.json b/locales/en.json index 760ab3a49..8ea8f1bac 100644 --- a/locales/en.json +++ b/locales/en.json @@ -249,6 +249,13 @@ "diagnosis_http_timeout": "Timed-out while trying to contact your server from the outside. It appears to be unreachable.
1. The most common cause for this issue is that port 80 (and 443) are not correctly forwarded to your server.
2. You should also make sure that the service nginx is running
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_ignored_issues": "(+ {nb_ignored} ignored issue(s))", + "diagnosis_ignore_already_filtered": "There is already a diagnosis {category} filter with these criterias)", + "diagnosis_ignore_no_filter_found": "(There is no such diagnosis {category} filter with these criterias to remove)", + "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_criteria_error": "Criterias should be of the form key=value (e.g. domain=yolo.test)", + "diagnosis_ignore_no_issue_found": "No issues was found matching the given criteria.", "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 /etc/resolv.conf not pointing to 127.0.0.1.", "diagnosis_ip_connected_ipv4": "The server is connected to the Internet through IPv4!", diff --git a/src/diagnosis.py b/src/diagnosis.py index c56c2f22c..c47e894fe 100644 --- a/src/diagnosis.py +++ b/src/diagnosis.py @@ -263,16 +263,12 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False): # Sanity checks for the provided arguments if len(filter_) == 0: - raise YunohostValidationError( - "You should provide at least one criteria being the diagnosis category to ignore" - ) + raise YunohostValidationError(m18n.n("diagnosis_ignore_missing_criteria")) category = filter_[0] if category not in all_categories_names: raise YunohostValidationError(f"{category} is not a diagnosis category") if any("=" not in criteria for criteria in filter_[1:]): - raise YunohostValidationError( - "Criterias should be of the form key=value (e.g. domain=yolo.test)" - ) + raise YunohostValidationError(m18n.n("diagnosis_ignore_criteria_error")) # Convert the provided criteria into a nice dict 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) 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 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]: logger.warning( - f"(There is already a diagnosis {category} filter with these criterias)" + m18n.n("diagnosis_ignore_already_filtered", service=category) ) return configuration["ignore_filters"][category].append(criterias) _diagnosis_write_configuration(configuration) - logger.success(f"Added a {category} diagnosis filter") + logger.success(m18n.n("diagnosis_ignore_filter_added", service=category)) return if remove_filter: @@ -324,14 +320,12 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False): configuration["ignore_filters"][category] = [] if criterias not in configuration["ignore_filters"][category]: - logger.warning( - f"(There is no such diagnosis {category} filter with these criterias to remove)" - ) + logger.warning(m18n.n("diagnosis_ignore_no_filter_found", service=category)) return configuration["ignore_filters"][category].remove(criterias) _diagnosis_write_configuration(configuration) - logger.success(f"Removed a {category} diagnosis filter") + logger.success(m18n.n("diagnosis_ignore_filter_removed", service=category)) return From 8de0a4cdcb2ed5cd2d1c095da805ad47aa101933 Mon Sep 17 00:00:00 2001 From: Ivan Davydov Date: Wed, 3 Jul 2024 18:50:02 +0000 Subject: [PATCH 057/218] Translated using Weblate (Russian) Currently translated at 37.1% (291 of 783 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/ru/ --- locales/ru.json | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/locales/ru.json b/locales/ru.json index e566fad0e..a1d001631 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -328,5 +328,17 @@ "global_settings_setting_smtp_allow_ipv6_help": "Разрешить использование IPv6 для получения и отправки почты", "admins": "Администраторы", "all_users": "Все пользователи YunoHost", - "app_action_failed": "Не удалось выполнить действие {action} для приложения {app}" -} \ No newline at end of file + "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}" +} From 5fcb1c61889a1667a4db3b455ab90157a9047d57 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Thu, 4 Jul 2024 00:11:55 +0200 Subject: [PATCH 058/218] fix a dumb typo; i'd like commit amend but it was already merged thanks to our serial merger --- src/diagnosis.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/diagnosis.py b/src/diagnosis.py index c47e894fe..37d5c8d47 100644 --- a/src/diagnosis.py +++ b/src/diagnosis.py @@ -301,13 +301,13 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False): if criterias in configuration["ignore_filters"][category]: logger.warning( - m18n.n("diagnosis_ignore_already_filtered", service=category) + m18n.n("diagnosis_ignore_already_filtered", category=category) ) return configuration["ignore_filters"][category].append(criterias) _diagnosis_write_configuration(configuration) - logger.success(m18n.n("diagnosis_ignore_filter_added", service=category)) + logger.success(m18n.n("diagnosis_ignore_filter_added", category=category)) return if remove_filter: @@ -320,12 +320,14 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False): configuration["ignore_filters"][category] = [] if criterias not in configuration["ignore_filters"][category]: - logger.warning(m18n.n("diagnosis_ignore_no_filter_found", service=category)) + logger.warning( + m18n.n("diagnosis_ignore_no_filter_found", category=category) + ) return configuration["ignore_filters"][category].remove(criterias) _diagnosis_write_configuration(configuration) - logger.success(m18n.n("diagnosis_ignore_filter_removed", service=category)) + logger.success(m18n.n("diagnosis_ignore_filter_removed", category=category)) return From fe8fcaefef0c9f9f7823f44b1f59959f673ba0d2 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Thu, 4 Jul 2024 00:16:42 +0200 Subject: [PATCH 059/218] typo (menacing parenthesis) --- locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/en.json b/locales/en.json index 8ea8f1bac..08a810829 100644 --- a/locales/en.json +++ b/locales/en.json @@ -249,7 +249,7 @@ "diagnosis_http_timeout": "Timed-out while trying to contact your server from the outside. It appears to be unreachable.
1. The most common cause for this issue is that port 80 (and 443) are not correctly forwarded to your server.
2. You should also make sure that the service nginx is running
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_ignored_issues": "(+ {nb_ignored} ignored issue(s))", - "diagnosis_ignore_already_filtered": "There is already a diagnosis {category} filter with these criterias)", + "diagnosis_ignore_already_filtered": "(There is already a diagnosis {category} filter with these criterias)", "diagnosis_ignore_no_filter_found": "(There is no such diagnosis {category} filter with these criterias to remove)", "diagnosis_ignore_filter_added": "Added a {category} diagnosis filter", "diagnosis_ignore_filter_removed": "Removed a {category} diagnosis filter", From c6aec680b9555d6d4ef00934afd1ac515294e6e0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 4 Jul 2024 00:16:27 +0200 Subject: [PATCH 060/218] Backport i18n string + code for bookworm migration --- locales/en.json | 14 ++++++++++++++ src/migrations/0027_migrate_to_bookworm.py | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/locales/en.json b/locales/en.json index 760ab3a49..8aeafb936 100644 --- a/locales/en.json +++ b/locales/en.json @@ -591,6 +591,20 @@ "migration_0024_rebuild_python_venv_disclaimer_rebuild": "Rebuilding the virtualenv will be attempted for the following apps (NB: the operation may take some time!): {rebuild_apps}", "migration_0024_rebuild_python_venv_failed": "Failed to rebuild the Python virtualenv for {app}. The app may not work as long as this is not resolved. You should fix the situation by forcing the upgrade of this app using `yunohost app upgrade --force {app}`.", "migration_0024_rebuild_python_venv_in_progress": "Now attempting to rebuild the Python virtualenv for `{app}`", + "migration_description_0027_migrate_to_bookworm": "Upgrade the system to Debian Bookworm and YunoHost 12", + "migration_0027_cleaning_up": "Cleaning up cache and packages not useful anymore…", + "migration_0027_general_warning": "Please note that this migration is a delicate operation. The YunoHost team did its best to review and test it, but the migration might still break parts of the system or its apps.\n\nTherefore, it is recommended to:\n - Perform a backup of any critical data or app. More info on https://yunohost.org/backup;\n - Be patient after launching the migration: Depending on your Internet connection and hardware, it might take up to a few hours for everything to upgrade.", + "migration_0027_main_upgrade": "Starting main upgrade…", + "migration_0027_modified_files": "Please note that the following files were found to be manually modified and might be overwritten following the upgrade: {manually_modified_files}", + "migration_0027_not_bullseye": "The current Debian distribution is not Bullseye! If you already ran the Bullseye->Bookworm migration, then this error is symptomatic of the fact that the migration procedure was not 100% succesful (otherwise YunoHost would have flagged it as completed). It is recommended to investigate what happened with the support team, who will need the **full** log of the `migration, which can be found in Tools > Logs in the webadmin.", + "migration_0027_not_enough_free_space": "Free space is pretty low in /var/! You should have at least 1GB free to run this migration.", + "migration_0027_patch_yunohost_conflicts": "Applying patch to workaround conflict issue…", + "migration_0027_patching_sources_list": "Patching the sources.lists…", + "migration_0027_problematic_apps_warning": "Please note that the following possibly problematic installed apps were detected. It looks like those were not installed from the YunoHost app catalog, or are not flagged as 'working'. Consequently, it cannot be guaranteed that they will still work after the upgrade: {problematic_apps}", + "migration_0027_start": "Starting migration to Bullseye", + "migration_0027_still_on_bullseye_after_main_upgrade": "Something went wrong during the main upgrade, the system appears to still be on Debian Bullseye", + "migration_0027_system_not_fully_up_to_date": "Your system is not fully up-to-date. Please perform a regular upgrade before running the migration to Bullseye.", + "migration_0027_yunohost_upgrade": "Starting YunoHost core upgrade…", "migration_description_0021_migrate_to_bullseye": "Upgrade the system to Debian Bullseye and YunoHost 11.x", "migration_description_0022_php73_to_php74_pools": "Migrate php7.3-fpm 'pool' conf files to php7.4", "migration_description_0023_postgresql_11_to_13": "Migrate databases from PostgreSQL 11 to 13", diff --git a/src/migrations/0027_migrate_to_bookworm.py b/src/migrations/0027_migrate_to_bookworm.py index 86d2ce49e..9ff497398 100644 --- a/src/migrations/0027_migrate_to_bookworm.py +++ b/src/migrations/0027_migrate_to_bookworm.py @@ -181,7 +181,7 @@ class MyMigration(Migration): aptitude_with_progress_bar("full-upgrade --show-why -y -o Dpkg::Options::='--force-confold'") if self.debian_major_version() == N_CURRENT_DEBIAN: - raise YunohostError("migration_0027_still_on_buster_after_main_upgrade") + raise YunohostError("migration_0027_still_on_bullseye_after_main_upgrade") # Clean the mess logger.info(m18n.n("migration_0027_cleaning_up")) From ffde5cbf87d061ef8442929d23bc8e000b3e2e5f Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 3 Jul 2024 22:17:21 +0000 Subject: [PATCH 061/218] Translated using Weblate (French) Currently translated at 100.0% (790 of 790 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/fr/ --- locales/fr.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/locales/fr.json b/locales/fr.json index ab4308da0..57091f35e 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -781,5 +781,12 @@ "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.", "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é." } From 30286bc811ff43bb3c639c198b60e36ddf03aa09 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 3 Jul 2024 22:31:10 +0000 Subject: [PATCH 062/218] [CI] Reformat / remove stale translated strings --- locales/ca.json | 2 +- locales/de.json | 2 +- locales/en.json | 6 +++--- locales/eo.json | 2 +- locales/es.json | 2 +- locales/eu.json | 2 +- locales/fa.json | 2 +- locales/fr.json | 2 +- locales/gl.json | 2 +- locales/id.json | 2 +- locales/it.json | 2 +- locales/ja.json | 2 +- locales/ru.json | 2 +- locales/sk.json | 2 +- locales/uk.json | 2 +- locales/zh_Hans.json | 2 +- 16 files changed, 18 insertions(+), 18 deletions(-) diff --git a/locales/ca.json b/locales/ca.json index 0de9a3449..697b4555d 100644 --- a/locales/ca.json +++ b/locales/ca.json @@ -782,4 +782,4 @@ "user_import_partial_failed": "L'operació d'importació dels usuaris ha fallat parcialment", "domain_dns_push_record_failed": "No s'ha pogut {action} el registre {type}/{name}: {error}", "registrar_infos": "Informació del registrador" -} +} \ No newline at end of file diff --git a/locales/de.json b/locales/de.json index 215559c89..0c1bdf32e 100644 --- a/locales/de.json +++ b/locales/de.json @@ -782,4 +782,4 @@ "dyndns_set_recovery_password_failed": "Konnte Wiederherstellungspasswort nicht einstellen: {error}", "dyndns_set_recovery_password_success": "Wiederherstellungspasswort eingestellt!", "global_settings_setting_ssh_port_help": "Ein Port unter 1024 wird bevorzugt, um Kaperversuche durch Nicht-Administratordienste auf dem Remote-Computer zu verhindern. Sie sollten auch vermeiden, einen bereits verwendeten Port zu verwenden, z. B. 80 oder 443." -} +} \ No newline at end of file diff --git a/locales/en.json b/locales/en.json index 08a810829..14d551613 100644 --- a/locales/en.json +++ b/locales/en.json @@ -248,14 +248,14 @@ "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.
1. The most common cause for this issue is that port 80 (and 443) are not correctly forwarded to your server.
2. You should also make sure that the service nginx is running
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_ignored_issues": "(+ {nb_ignored} ignored issue(s))", "diagnosis_ignore_already_filtered": "(There is already a diagnosis {category} filter with these criterias)", - "diagnosis_ignore_no_filter_found": "(There is no such diagnosis {category} filter with these criterias to remove)", + "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_criteria_error": "Criterias should be of the form key=value (e.g. domain=yolo.test)", + "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_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 /etc/resolv.conf not pointing to 127.0.0.1.", "diagnosis_ip_connected_ipv4": "The server is connected to the Internet through IPv4!", diff --git a/locales/eo.json b/locales/eo.json index 1ddd1e003..257dfb541 100644 --- a/locales/eo.json +++ b/locales/eo.json @@ -507,4 +507,4 @@ "global_settings_setting_postfix_compatibility_help": "Kongruo vs sekureca kompromiso por la Postfix-servilo. Afektas la ĉifradojn (kaj aliajn aspektojn pri sekureco)", "global_settings_setting_ssh_compatibility_help": "Kongruo vs sekureca kompromiso por la SSH-servilo. Afektas la ĉifradojn (kaj aliajn aspektojn pri sekureco)", "global_settings_setting_smtp_allow_ipv6_help": "Permesu la uzon de IPv6 por ricevi kaj sendi poŝton" -} +} \ No newline at end of file diff --git a/locales/es.json b/locales/es.json index eb1f3bbe1..bd9a644c2 100644 --- a/locales/es.json +++ b/locales/es.json @@ -782,4 +782,4 @@ "dyndns_set_recovery_password_success": "¡Password de recuperación establecida!", "global_settings_setting_dns_exposure_help": "NB: Esto afecta únicamente a la configuración recomentada de DNS y en las pruebas de diagnóstico. No afecta a la configuración del sistema.", "global_settings_setting_ssh_port_help": "Un puerto menor a 1024 es preferible para evitar intentos de usurpación por servicios no administrativos en la máquina remota. También debe de evitar usar un puerto ya en uso, como el 80 o 443." -} +} \ No newline at end of file diff --git a/locales/eu.json b/locales/eu.json index 2b84b0763..b95fcd1a9 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -782,4 +782,4 @@ "dyndns_set_recovery_password_failed": "Berreskuratze-pasahitza ezartzeak huts egin du: {error}", "dyndns_set_recovery_password_success": "Berreskuratze-pasahitza ezarri da!", "global_settings_setting_ssh_port_help": "1024 baino ataka txikiago bat izan beharko litzateke, zerbitzu ez-administratzaileek urruneko makinan usurpazio-saiorik egin ez dezaten. Lehendik ere erabiltzen ari diren atakak ere ekidin beharko zenituzke, 80 edo 443 kasu." -} +} \ No newline at end of file diff --git a/locales/fa.json b/locales/fa.json index 09ab9229e..8616aee2b 100644 --- a/locales/fa.json +++ b/locales/fa.json @@ -565,4 +565,4 @@ "global_settings_setting_webadmin_allowlist_enabled_help": "فقط به برخی از IP ها اجازه دسترسی به مدیریت وب را بدهید.", "global_settings_setting_smtp_allow_ipv6_help": "اجازه دهید از IPv6 برای دریافت و ارسال نامه استفاده شود", "global_settings_setting_smtp_relay_enabled_help": "میزبان رله SMTP برای ارسال نامه به جای این نمونه yunohost استفاده می شود. اگر در یکی از این شرایط قرار دارید مفید است: پورت 25 شما توسط ارائه دهنده ISP یا VPS شما مسدود شده است، شما یک IP مسکونی دارید که در DUHL ذکر شده است، نمی توانید DNS معکوس را پیکربندی کنید یا این سرور مستقیماً در اینترنت نمایش داده نمی شود و می خواهید از یکی دیگر برای ارسال ایمیل استفاده کنید." -} +} \ No newline at end of file diff --git a/locales/fr.json b/locales/fr.json index 57091f35e..18fbcd4da 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -789,4 +789,4 @@ "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é." -} +} \ No newline at end of file diff --git a/locales/gl.json b/locales/gl.json index df50d5e12..5080505c1 100644 --- a/locales/gl.json +++ b/locales/gl.json @@ -782,4 +782,4 @@ "ask_dyndns_recovery_password_explain_unavailable": "Este dominio DynDNS xa está rexistrado. Se es a persoa que o rexistrou orixinalmente, podes escribir o código de recuperación para reclamar o dominio.", "dyndns_too_many_requests": "O servicio dyndns de YunoHost recibeu demasiadas peticións do teu sistema, agarda 1 hora e volve intentalo.", "global_settings_setting_ssh_port_help": "É recomendable un porto inferior a 1024 para evitar os intentos de apropiación por parte de servizos de non-administración na máquina remota. Tamén deberías evitar elexir un porto que xa está sendo utilizado, como 80 ou 443." -} +} \ No newline at end of file diff --git a/locales/id.json b/locales/id.json index 41ec7018b..d1f8d3325 100644 --- a/locales/id.json +++ b/locales/id.json @@ -441,4 +441,4 @@ "service_enable_failed": "Tidak dapat membuat layanan '{service}' dimulai mandiri saat pemulaian.\n\nLog layanan baru-baru ini:{logs}", "service_not_reloading_because_conf_broken": "Tidak memuat atau memulai ulang layanan '{name}' karena konfigurasinya rusak: {errors}", "service_reloaded": "Layanan {service} dimuat ulang" -} +} \ No newline at end of file diff --git a/locales/it.json b/locales/it.json index 8080f05e7..24714500a 100644 --- a/locales/it.json +++ b/locales/it.json @@ -668,4 +668,4 @@ "certmanager_cert_renew_failed": "Il rinnovo del certificato Let’s Encrypt è fallito per {domains}", "ask_dyndns_recovery_password_explain": "Scegli una password di recupero per il tuo dominio DynDNS, in caso dovessi ripristinarlo successivamente.", "confirm_app_insufficient_ram": "PERICOLO! Quest’app richiede {required} di RAM per essere installata/aggiornata, ma solo {current} sono disponibili ora. Nonostante l’app possa funzionare, la sua installazione o aggiornamento richiedono una grande quantità di RAM, perciò il tuo server potrebbe bloccarsi o fallire miseramente. Se sei dispostə a prenderti questo rischio comunque, digita ‘{answers}’" -} +} \ No newline at end of file diff --git a/locales/ja.json b/locales/ja.json index 1c2a77c6a..b8a781f04 100644 --- a/locales/ja.json +++ b/locales/ja.json @@ -760,4 +760,4 @@ "yunohost_not_installed": "YunoHostが正しくインストールされていません。’yunohost tools postinstall’ を実行してください", "yunohost_postinstall_end_tip": "インストール後処理が完了しました!セットアップを完了するには、次の点を考慮してください。\n - ウェブ管理画面の'診断'セクション(またはコマンドラインで’yunohost diagnosis run’)を通じて潜在的な問題を診断します。\n - 管理ドキュメントの'セットアップの最終処理'と'YunoHostを知る'の部分を読む: https://yunohost.org/admindoc。", "additional_urls_already_removed": "アクセス許可 ‘{permission}’ に対する追加URLで ‘{url}’ は既に削除されています" -} +} \ No newline at end of file diff --git a/locales/ru.json b/locales/ru.json index a1d001631..09cedd59c 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -341,4 +341,4 @@ "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}" -} +} \ No newline at end of file diff --git a/locales/sk.json b/locales/sk.json index 961555f8a..a58b1f960 100644 --- a/locales/sk.json +++ b/locales/sk.json @@ -279,4 +279,4 @@ "domain_config_cert_summary": "Stav certifikátu", "domain_config_xmpp": "Krátke správy (XMPP)", "log_app_makedefault": "Nastaviť '{}' ako predvolenú aplikáciu" -} +} \ No newline at end of file diff --git a/locales/uk.json b/locales/uk.json index b93b15d5c..04640d1b4 100644 --- a/locales/uk.json +++ b/locales/uk.json @@ -781,4 +781,4 @@ "dyndns_set_recovery_password_failed": "Не вдалося встановити пароль для відновлення: {error}", "dyndns_set_recovery_password_success": "Пароль для відновлення встановлено!", "log_dyndns_unsubscribe": "Скасувати підписку на субдомен YunoHost '{}'" -} +} \ No newline at end of file diff --git a/locales/zh_Hans.json b/locales/zh_Hans.json index 709276c47..a80a9cc0c 100644 --- a/locales/zh_Hans.json +++ b/locales/zh_Hans.json @@ -587,4 +587,4 @@ "ask_admin_fullname": "管理员全名", "ask_admin_username": "管理员用户名", "ask_fullname": "全名" -} +} \ No newline at end of file From 772e772b244377f219b32a4c1825f1e7780fb5b4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 4 Jul 2024 19:13:43 +0200 Subject: [PATCH 063/218] bullseye->bookorm: delay the yunohost-api restart such that the migration doesnt appear as failed from the webamin --- locales/en.json | 3 ++- src/migrations/0027_migrate_to_bookworm.py | 11 +++++++++++ src/utils/system.py | 5 +++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/locales/en.json b/locales/en.json index 8aeafb936..46d2f03b8 100644 --- a/locales/en.json +++ b/locales/en.json @@ -593,6 +593,7 @@ "migration_0024_rebuild_python_venv_in_progress": "Now attempting to rebuild the Python virtualenv for `{app}`", "migration_description_0027_migrate_to_bookworm": "Upgrade the system to Debian Bookworm and YunoHost 12", "migration_0027_cleaning_up": "Cleaning up cache and packages not useful anymore…", + "migration_0027_delayed_api_restart": "The YunoHost API will automatically be restarted in 15 seconds. It may be unavailable for a few seconds, and then you will have to login again.", "migration_0027_general_warning": "Please note that this migration is a delicate operation. The YunoHost team did its best to review and test it, but the migration might still break parts of the system or its apps.\n\nTherefore, it is recommended to:\n - Perform a backup of any critical data or app. More info on https://yunohost.org/backup;\n - Be patient after launching the migration: Depending on your Internet connection and hardware, it might take up to a few hours for everything to upgrade.", "migration_0027_main_upgrade": "Starting main upgrade…", "migration_0027_modified_files": "Please note that the following files were found to be manually modified and might be overwritten following the upgrade: {manually_modified_files}", @@ -796,4 +797,4 @@ "yunohost_installing": "Installing YunoHost…", "yunohost_not_installed": "YunoHost is not correctly installed. Please run 'yunohost tools postinstall'", "yunohost_postinstall_end_tip": "The post-install completed! To finalize your setup, please consider:\n - diagnose potential issues through the 'Diagnosis' section of the webadmin (or 'yunohost diagnosis run' in command-line);\n - reading the 'Finalizing your setup' and 'Getting to know YunoHost' parts in the admin documentation: https://yunohost.org/admindoc." -} \ No newline at end of file +} diff --git a/src/migrations/0027_migrate_to_bookworm.py b/src/migrations/0027_migrate_to_bookworm.py index 9ff497398..e3d6007c6 100644 --- a/src/migrations/0027_migrate_to_bookworm.py +++ b/src/migrations/0027_migrate_to_bookworm.py @@ -1,5 +1,6 @@ import glob import os +import subprocess from moulinette import m18n from yunohost.utils.error import YunohostError @@ -230,6 +231,16 @@ class MyMigration(Migration): #postupgradecmds += "echo 'Restarting nginx...' >&2\n" #postupgradecmds += "systemctl restart nginx\n" + # If running from the webadmin, restart the API after a delay + if Moulinette.interface.type == "api": + logger.warning(m18n.n("migration_0027_delayed_api_restart")) + sleep(5) + # Restart the API after 10 sec (at now doesn't support sub-minute times...) + # We do this so that the API / webadmin still gets the proper HTTP response + cmd = 'at -M now >/dev/null 2>&1 <<< "sleep 10; systemctl restart yunohost-api"' + # For some reason subprocess doesn't like the redirections so we have to use bash -c explicity... + subprocess.check_call(["bash", "-c", cmd]) + def debian_major_version(self): # The python module "platform" and lsb_release are not reliable because # on some setup, they may still return Release=9 even after upgrading to diff --git a/src/utils/system.py b/src/utils/system.py index 105aea704..690c8f3c8 100644 --- a/src/utils/system.py +++ b/src/utils/system.py @@ -287,6 +287,11 @@ def aptitude_with_progress_bar(cmd): f'LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none aptitude {cmd} --quiet=2 -o=Dpkg::Use-Pty=0 -o "APT::Status-Fd=$YNH_STDINFO"' ) + # If upgrading yunohost from the API, delay the Yunohost-api restart + # (this should be the last time we need it before bookworm, because on bookworm, yunohost-admin cookies will be persistent upon api restart) + if " yunohost " in cmd and Moulinette.interface.type == "api": + cmd = "YUNOHOST_API_RESTART_WILL_BE_HANDLED_BY_YUNOHOST=yes " + cmd + logger.debug(f"Running: {cmd}") ret = call_async_output(cmd, callbacks, shell=True) From c694ea2cbca91ac4fe126b99e7c9474bc1c03ba2 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 4 Jul 2024 19:27:51 +0200 Subject: [PATCH 064/218] bullseye->bookworm: force-regen the nsswitch configuration because for some reason it gets reset? --- src/migrations/0027_migrate_to_bookworm.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py b/src/migrations/0027_migrate_to_bookworm.py index e3d6007c6..898c4e347 100644 --- a/src/migrations/0027_migrate_to_bookworm.py +++ b/src/migrations/0027_migrate_to_bookworm.py @@ -12,7 +12,7 @@ from yunohost.tools import ( tools_update, ) from yunohost.app import unstable_apps -from yunohost.regenconf import manually_modified_files +from yunohost.regenconf import manually_modified_files, regen_conf from yunohost.utils.system import ( free_space_in_directory, get_ynh_package_version, @@ -181,6 +181,11 @@ class MyMigration(Migration): # FIXME : find a way to simulate and validate the upgrade first aptitude_with_progress_bar("full-upgrade --show-why -y -o Dpkg::Options::='--force-confold'") + # Force regenconf of nsswitch because for some reason + # /etc/nsswitch.conf is reset despite the --force-confold? It's a + # disaster because then admins cannot "sudo" >_> ... + regen_conf(names=["nsswitch"], force=True) + if self.debian_major_version() == N_CURRENT_DEBIAN: raise YunohostError("migration_0027_still_on_bullseye_after_main_upgrade") From f344cb037bb5a569a7791ce10f1e2cc5066b3c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 4 Jul 2024 21:00:38 +0200 Subject: [PATCH 065/218] Fix missing import of moulinette.Moulinette --- src/migrations/0027_migrate_to_bookworm.py | 2 +- src/utils/system.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py b/src/migrations/0027_migrate_to_bookworm.py index 898c4e347..0e0388d8b 100644 --- a/src/migrations/0027_migrate_to_bookworm.py +++ b/src/migrations/0027_migrate_to_bookworm.py @@ -2,7 +2,7 @@ import glob import os import subprocess -from moulinette import m18n +from moulinette import Moulinette, m18n from yunohost.utils.error import YunohostError from moulinette.utils.process import check_output from moulinette.utils.filesystem import read_file, write_to_file diff --git a/src/utils/system.py b/src/utils/system.py index 690c8f3c8..497f6d8df 100644 --- a/src/utils/system.py +++ b/src/utils/system.py @@ -20,6 +20,7 @@ import re import os import logging +from moulinette import Moulinette from moulinette.utils.process import check_output from yunohost.utils.error import YunohostError From 90d4cd99b9af877e305040399ec420bd0529d87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 4 Jul 2024 21:26:38 +0200 Subject: [PATCH 066/218] Add missing from time import sleep ; also restart nginx at the end of the migration --- src/migrations/0027_migrate_to_bookworm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py b/src/migrations/0027_migrate_to_bookworm.py index 0e0388d8b..57bbecafc 100644 --- a/src/migrations/0027_migrate_to_bookworm.py +++ b/src/migrations/0027_migrate_to_bookworm.py @@ -1,6 +1,7 @@ import glob import os import subprocess +from time import sleep from moulinette import Moulinette, m18n from yunohost.utils.error import YunohostError @@ -242,7 +243,7 @@ class MyMigration(Migration): sleep(5) # Restart the API after 10 sec (at now doesn't support sub-minute times...) # We do this so that the API / webadmin still gets the proper HTTP response - cmd = 'at -M now >/dev/null 2>&1 <<< "sleep 10; systemctl restart yunohost-api"' + cmd = 'at -M now >/dev/null 2>&1 <<< "sleep 10; systemctl restart nginx yunohost-api"' # For some reason subprocess doesn't like the redirections so we have to use bash -c explicity... subprocess.check_call(["bash", "-c", cmd]) From 2763e04012df8cab95df8794a665ee516508b6f4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 6 Jul 2024 00:32:06 +0200 Subject: [PATCH 067/218] bullseye->bookworm: dirty hack to explicitly remove rspamd because it's causing too many issues in dependency resolution idk --- src/migrations/0027_migrate_to_bookworm.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py b/src/migrations/0027_migrate_to_bookworm.py index 57bbecafc..835b45ca5 100644 --- a/src/migrations/0027_migrate_to_bookworm.py +++ b/src/migrations/0027_migrate_to_bookworm.py @@ -177,10 +177,17 @@ class MyMigration(Migration): apps_packages = self.get_apps_equivs_packages() aptitude_with_progress_bar(f"hold yunohost moulinette ssowat yunohost-admin {' '.join(apps_packages)}") - aptitude_with_progress_bar("upgrade cron --show-why -y -o APT::Force-LoopBreak=1 -o Dpkg::Options::='--force-confold'") + # Dirty hack to be able to remove rspamd because it's causing too many issues due to libluajit ... + command = ( + f"sed -i /var/lib/dpkg/status -e 's@rspamd, @@g'" + ) + logger.debug(f"Running: {command}") + os.system(command) + + aptitude_with_progress_bar("upgrade cron rspamd- libluajit-5.1-2- --show-why -y -o APT::Force-LoopBreak=1 -o Dpkg::Options::='--force-confold'") # FIXME : find a way to simulate and validate the upgrade first - aptitude_with_progress_bar("full-upgrade --show-why -y -o Dpkg::Options::='--force-confold'") + aptitude_with_progress_bar("full-upgrade --show-why -y -o Dpkg::Options::='--force-confold' <<< 'y\ny\ny'") # Force regenconf of nsswitch because for some reason # /etc/nsswitch.conf is reset despite the --force-confold? It's a @@ -215,8 +222,7 @@ class MyMigration(Migration): aptitude_with_progress_bar(f"unhold yunohost moulinette ssowat yunohost-admin {' '.join(apps_packages)}") # FIXME : find a way to simulate and validate the upgrade first - # FIXME : why were libluajit needed in the first place ? - aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin moulinette ssowat libluajit-5.1-2- libluajit-5.1-common- -y -o Dpkg::Options::='--force-confold'") + aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin moulinette ssowat -y -o Dpkg::Options::='--force-confold'") #cmd = "LC_ALL=C" #cmd += " DEBIAN_FRONTEND=noninteractive" From 0f34d7e10f2472a65fca7e8dd377a35973580f23 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 6 Jul 2024 16:55:47 +0200 Subject: [PATCH 068/218] bullseye->bookworm: more tweaks for the 'assume yes' in aptitude call, can't use raw bash redirects, gotta use stdin= from subprocess ... and we want only a limited number of 'yes' and not an infinite yes like the -y option does resuling in conflict resolution loops --- src/migrations/0027_migrate_to_bookworm.py | 10 ++++------ src/utils/system.py | 6 +++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py b/src/migrations/0027_migrate_to_bookworm.py index 835b45ca5..17b252871 100644 --- a/src/migrations/0027_migrate_to_bookworm.py +++ b/src/migrations/0027_migrate_to_bookworm.py @@ -178,16 +178,14 @@ class MyMigration(Migration): aptitude_with_progress_bar(f"hold yunohost moulinette ssowat yunohost-admin {' '.join(apps_packages)}") # Dirty hack to be able to remove rspamd because it's causing too many issues due to libluajit ... - command = ( - f"sed -i /var/lib/dpkg/status -e 's@rspamd, @@g'" - ) + command = "sed -i /var/lib/dpkg/status -e 's@rspamd, @@g'" logger.debug(f"Running: {command}") os.system(command) - aptitude_with_progress_bar("upgrade cron rspamd- libluajit-5.1-2- --show-why -y -o APT::Force-LoopBreak=1 -o Dpkg::Options::='--force-confold'") + aptitude_with_progress_bar("upgrade cron rspamd- libluajit-5.1-2- --show-why -o APT::Force-LoopBreak=1 -o Dpkg::Options::='--force-confold'") # FIXME : find a way to simulate and validate the upgrade first - aptitude_with_progress_bar("full-upgrade --show-why -y -o Dpkg::Options::='--force-confold' <<< 'y\ny\ny'") + aptitude_with_progress_bar("full-upgrade --show-why -o Dpkg::Options::='--force-confold'") # Force regenconf of nsswitch because for some reason # /etc/nsswitch.conf is reset despite the --force-confold? It's a @@ -222,7 +220,7 @@ class MyMigration(Migration): aptitude_with_progress_bar(f"unhold yunohost moulinette ssowat yunohost-admin {' '.join(apps_packages)}") # FIXME : find a way to simulate and validate the upgrade first - aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin moulinette ssowat -y -o Dpkg::Options::='--force-confold'") + aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin moulinette ssowat -o Dpkg::Options::='--force-confold'") #cmd = "LC_ALL=C" #cmd += " DEBIAN_FRONTEND=noninteractive" diff --git a/src/utils/system.py b/src/utils/system.py index 497f6d8df..9b6de576c 100644 --- a/src/utils/system.py +++ b/src/utils/system.py @@ -284,6 +284,7 @@ def aptitude_with_progress_bar(cmd): lambda l: log_apt_status_to_progress_bar(l.rstrip()), ) + original_cmd = cmd cmd = ( f'LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none aptitude {cmd} --quiet=2 -o=Dpkg::Use-Pty=0 -o "APT::Status-Fd=$YNH_STDINFO"' ) @@ -295,12 +296,15 @@ def aptitude_with_progress_bar(cmd): logger.debug(f"Running: {cmd}") + read, write = os.pipe() + os.write(write, b"y\ny\ny") + os.close(write) ret = call_async_output(cmd, callbacks, shell=True) if log_apt_status_to_progress_bar.previous_package is not None and ret == 0: log_apt_status_to_progress_bar("done::100:Done") elif ret != 0: - raise YunohostError(f"Failed to run command 'aptitude {cmd}'", raw_msg=True) + raise YunohostError(f"Failed to run command 'aptitude {original_cmd}'", raw_msg=True) def _apt_log_line_is_relevant(line): From 1bb81e8f690c47af73e8743d2cfe543f169bdfab Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 7 Jul 2024 16:38:46 +0200 Subject: [PATCH 069/218] log: small hack when dumping log right after script failure, prevent a weird edge case where it'll dump the log of the resource provisioning instead of the script, guessing it's because it doesn't find 'ynh_exit_properly' near the end of the log ? --- src/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/log.py b/src/log.py index 7950fca78..341770a56 100755 --- a/src/log.py +++ b/src/log.py @@ -791,7 +791,7 @@ class OperationLogger: # Get the 20 lines before the last 'ynh_exit_properly' 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"): lines_to_display = reversed(rev_lines[i : i + 20]) break From f6fbd69c393aa6f6fcbc0a26a1a63fcb2af98a15 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 7 Jul 2024 17:18:58 +0200 Subject: [PATCH 070/218] helpers/apt: rely on simpler dpkg-deb --build rather than equivs to create .deb for app virtual dependencies --- debian/control | 2 +- helpers/helpers.v1.d/apt | 13 ++++++------- helpers/helpers.v2.1.d/apt | 20 +++++++++----------- 3 files changed, 16 insertions(+), 19 deletions(-) diff --git a/debian/control b/debian/control index 8139375e7..daf346dc4 100644 --- a/debian/control +++ b/debian/control @@ -28,7 +28,7 @@ Depends: ${python3:Depends}, ${misc:Depends} , redis-server , acl , 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 , ntp, inetutils-ping | iputils-ping , bash-completion, rsyslog diff --git a/helpers/helpers.v1.d/apt b/helpers/helpers.v1.d/apt index 8231515fc..c3fd9aa07 100644 --- a/helpers/helpers.v1.d/apt +++ b/helpers/helpers.v1.d/apt @@ -186,21 +186,19 @@ ynh_package_install_from_equivs() { # Build and install the package local TMPDIR=$(mktemp --directory) - - # 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 + mkdir -p ${TMPDIR}/${pkgname}/DEBIAN/ # Note that the cd executes into a sub shell # Create a fake deb package with equivs-build and the given control file # Install the fake package without its dependencies with dpkg # Install missing dependencies with ynh_package_install ynh_wait_dpkg_free - cp "$controlfile" "${TMPDIR}/control" + cp "$controlfile" "${TMPDIR}/${pkgname}/DEBIAN/control" ( cd "$TMPDIR" - LC_ALL=C equivs-build ./control 2>&1 - LC_ALL=C dpkg --force-depends --install "./${pkgname}_${pkgversion}_all.deb" 2>&1 | tee ./dpkg_log + # Install the fake package without its dependencies with dpkg --force-depends + 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 \ @@ -323,6 +321,7 @@ Package: ${dep_app}-ynh-deps Version: ${version} Depends: ${dependencies} Architecture: all +Maintainer: root@localhost Description: Fake package for ${app} (YunoHost app) dependencies This meta-package is only responsible of installing its dependencies. EOF diff --git a/helpers/helpers.v2.1.d/apt b/helpers/helpers.v2.1.d/apt index 4c78a2147..3930f5e9c 100644 --- a/helpers/helpers.v2.1.d/apt +++ b/helpers/helpers.v2.1.d/apt @@ -90,27 +90,25 @@ ynh_apt_install_dependencies() { dependencies="$current_dependencies, $dependencies" 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) - cat >${TMPDIR}/control <${TMPDIR}/${app_ynh_deps}/DEBIAN/control < ./equivs_log 2>&1 || { cat ./equivs_log; false; } - LC_ALL=C dpkg --force-depends --install "./${app_ynh_deps}_${version}_all.deb" > ./dpkg_log 2>&1 + 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}.deb" > ./dpkg_log 2>&1 ) # Then install the missing dependencies with apt install From 26fba087d6614f15147f17855e1f8eef7bda8b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 8 Jul 2024 22:37:40 +0200 Subject: [PATCH 071/218] Add aptitude to deps for the migration to bookworm --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 8139375e7..31190903e 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,7 @@ Depends: ${python3:Depends}, ${misc:Depends} , python3-ldap, python3-zeroconf (>= 0.36), python3-lexicon, , python-is-python3 , nginx, nginx-extras (>=1.18) - , apt, apt-transport-https, apt-utils, dirmngr + , apt, apt-transport-https, apt-utils, aptitude, dirmngr , openssh-server, iptables, fail2ban, bind9-dnsutils , openssl, ca-certificates, netcat-openbsd, iproute2 , slapd, ldap-utils, sudo-ldap, libnss-ldapd, unscd, libpam-ldapd From 49961145caf4a24cd6d9af8100b0c9325184cc21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 8 Jul 2024 23:18:36 +0200 Subject: [PATCH 072/218] Disable migration to bookworm until it is ready --- ...igrate_to_bookworm.py => 0027_migrate_to_bookworm.py.disabled} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/migrations/{0027_migrate_to_bookworm.py => 0027_migrate_to_bookworm.py.disabled} (100%) diff --git a/src/migrations/0027_migrate_to_bookworm.py b/src/migrations/0027_migrate_to_bookworm.py.disabled similarity index 100% rename from src/migrations/0027_migrate_to_bookworm.py rename to src/migrations/0027_migrate_to_bookworm.py.disabled From bb25c6b15db5802a2f592a3b07955a4e6166e845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Tue, 9 Jul 2024 23:46:07 +0200 Subject: [PATCH 073/218] Fix: support repositories without component --- helpers/helpers.v1.d/apt | 20 +++++++++++--------- helpers/helpers.v2.1.d/apt | 18 ++++++++++++++---- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/helpers/helpers.v1.d/apt b/helpers/helpers.v1.d/apt index c3fd9aa07..34d933018 100644 --- a/helpers/helpers.v1.d/apt +++ b/helpers/helpers.v1.d/apt @@ -469,18 +469,20 @@ ynh_install_extra_repo() { wget_append="tee" fi - # Split the repository into uri, suite and components. + IFS=', ' read -r -a repo_parts <<< "$repo" + index=0 + # Remove "deb " at the beginning of the repo. - repo="${repo#deb }" - - # Get the uri - local uri="$(echo "$repo" | awk '{ print $1 }')" - - # Get the suite - local suite="$(echo "$repo" | awk '{ print $2 }')" + if [[ "${repo_parts[0]}" == "deb" ]]; then + index=1 + fi + uri="${repo_parts[$index]}" ; index=$((index+1)) + suite="${repo_parts[$index]}" ; index=$((index+1)) # Get the components - local component="${repo##$uri $suite }" + if (( "${#repo_parts[@]}" > 0 )); then + component="${repo_parts[*]:$index}" + fi # Add the repository into sources.list.d ynh_add_repo --uri="$uri" --suite="$suite" --component="$component" --name="$name" $append diff --git a/helpers/helpers.v2.1.d/apt b/helpers/helpers.v2.1.d/apt index 3930f5e9c..3b875f0fe 100644 --- a/helpers/helpers.v2.1.d/apt +++ b/helpers/helpers.v2.1.d/apt @@ -196,10 +196,20 @@ ynh_apt_install_dependencies_from_extra_repository() { # =========================================== # Split the repository into uri, suite and components. - repo="${repo#deb }" - local uri="$(echo "$repo" | awk '{ print $1 }')" - local suite="$(echo "$repo" | awk '{ print $2 }')" - local component="${repo##$uri $suite }" + IFS=', ' read -r -a repo_parts <<< "$repo" + index=0 + + # Remove "deb " at the beginning of the repo. + if [[ "${repo_parts[0]}" == "deb" ]]; then + index=1 + fi + uri="${repo_parts[$index]}" ; index=$((index+1)) + suite="${repo_parts[$index]}" ; index=$((index+1)) + + # Get the components + if (( "${#repo_parts[@]}" > 0 )); then + component="${repo_parts[*]:$index}" + fi # Add the new repo in sources.list.d mkdir --parents "/etc/apt/sources.list.d" From b96c530d2b36447907eefb75c536e9182e1ca4b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Tue, 9 Jul 2024 23:57:19 +0200 Subject: [PATCH 074/218] Support trusted=yes repositories... --- helpers/helpers.v1.d/apt | 23 ++++++++++++++++++----- helpers/helpers.v2.1.d/apt | 16 ++++++++++++---- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/helpers/helpers.v1.d/apt b/helpers/helpers.v1.d/apt index 34d933018..1a34763cb 100644 --- a/helpers/helpers.v1.d/apt +++ b/helpers/helpers.v1.d/apt @@ -469,6 +469,12 @@ ynh_install_extra_repo() { wget_append="tee" fi + if [[ "$key" == "trusted=yes" ]]; then + trusted="--trusted" + else + trusted="" + fi + IFS=', ' read -r -a repo_parts <<< "$repo" index=0 @@ -485,7 +491,7 @@ ynh_install_extra_repo() { fi # Add the repository into sources.list.d - ynh_add_repo --uri="$uri" --suite="$suite" --component="$component" --name="$name" $append + ynh_add_repo --uri="$uri" --suite="$suite" --component="$component" --name="$name" $append $trusted # Pin the new repo with the default priority, so it won't be used for upgrades. # Build $pin from the uri without http and any sub path @@ -498,7 +504,7 @@ ynh_install_extra_repo() { ynh_pin_repo --package="*" --pin="origin \"$pin\"" $priority --name="$name" $append # Get the public key for the repo - if [ -n "$key" ]; then + if [ -n "$key" ] && [[ "$key" != "trusted=yes" ]]; then mkdir --parents "/etc/apt/trusted.gpg.d" # Timeout option is here to enforce the timeout on dns query and tcp connect (c.f. man wget) wget --timeout 900 --quiet "$key" --output-document=- | gpg --dearmor | $wget_append /etc/apt/trusted.gpg.d/$name.gpg >/dev/null @@ -551,6 +557,7 @@ ynh_remove_extra_repo() { # | arg: -c, --component= - Component of the repository. # | arg: -n, --name= - Name for the files for this repo, $app as default value. # | arg: -a, --append - Do not overwrite existing files. +# | arg: -t, --trusted - Add trusted=yes to the repository (not recommended) # # Example for a repo like deb http://forge.yunohost.org/debian/ stretch stable # uri suite component @@ -559,13 +566,14 @@ ynh_remove_extra_repo() { # Requires YunoHost version 3.8.1 or higher. ynh_add_repo() { # Declare an array to define the options of this helper. - local legacy_args=uscna - local -A args_array=([u]=uri= [s]=suite= [c]=component= [n]=name= [a]=append) + local legacy_args=uscnat + local -A args_array=([u]=uri= [s]=suite= [c]=component= [n]=name= [a]=append [t]=trusted) local uri local suite local component local name local append + local trusted # Manage arguments with getopts ynh_handle_getopts_args "$@" name="${name:-$app}" @@ -576,10 +584,15 @@ ynh_add_repo() { else append="tee" fi + if [[ "$trusted" -eq 1 ]]; then + trust="[trusted=yes]" + else + trust="" + fi mkdir --parents "/etc/apt/sources.list.d" # Add the new repo in sources.list.d - echo "deb $uri $suite $component" \ + echo "deb $trust $uri $suite $component" \ | $append "/etc/apt/sources.list.d/$name.list" } diff --git a/helpers/helpers.v2.1.d/apt b/helpers/helpers.v2.1.d/apt index 3b875f0fe..2e007f15b 100644 --- a/helpers/helpers.v2.1.d/apt +++ b/helpers/helpers.v2.1.d/apt @@ -211,9 +211,15 @@ ynh_apt_install_dependencies_from_extra_repository() { component="${repo_parts[*]:$index}" fi + if [[ "$key" == "trusted=yes" ]]; then + trust="[trusted=yes]" + else + trust="" + fi + # Add the new repo in sources.list.d mkdir --parents "/etc/apt/sources.list.d" - echo "deb $uri $suite $component" > "/etc/apt/sources.list.d/$app.list" + echo "deb $trust $uri $suite $component" > "/etc/apt/sources.list.d/$app.list" # Pin the new repo with the default priority, so it won't be used for upgrades. # Build $pin from the uri without http and any sub path @@ -228,9 +234,11 @@ Pin: origin $pin Pin-Priority: 995 EOF - mkdir --parents "/etc/apt/trusted.gpg.d" - # Timeout option is here to enforce the timeout on dns query and tcp connect (c.f. man wget) - wget --timeout 900 --quiet "$key" --output-document=- | gpg --dearmor > /etc/apt/trusted.gpg.d/$app.gpg + if [ -n "$key" ] && [[ "$key" != "trusted=yes" ]]; then + mkdir --parents "/etc/apt/trusted.gpg.d" + # Timeout option is here to enforce the timeout on dns query and tcp connect (c.f. man wget) + wget --timeout 900 --quiet "$key" --output-document=- | gpg --dearmor > /etc/apt/trusted.gpg.d/$app.gpg + fi # Update the list of package with the new repo NB: we use -o # Dir::Etc::sourcelist to only refresh this repo, because From 8be726b993082940897d30b7512ee6fb5738ed61 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 10 Jul 2024 18:15:36 +0200 Subject: [PATCH 075/218] helpers: fix dpkg-deb --build complaining that the perm is sometimes 777 instead of 755 (not sure why in the first place x_x) --- helpers/helpers.v1.d/apt | 2 ++ helpers/helpers.v2.1.d/apt | 3 +++ 2 files changed, 5 insertions(+) diff --git a/helpers/helpers.v1.d/apt b/helpers/helpers.v1.d/apt index c3fd9aa07..26d37b2b5 100644 --- a/helpers/helpers.v1.d/apt +++ b/helpers/helpers.v1.d/apt @@ -187,6 +187,8 @@ ynh_package_install_from_equivs() { # Build and install the package local TMPDIR=$(mktemp --directory) mkdir -p ${TMPDIR}/${pkgname}/DEBIAN/ + # For some reason, dpkg-deb insists for folder perm to be 755 and sometimes it's 777 o_O? + chmod -R 755 ${TMPDIR}/${pkgname} # Note that the cd executes into a sub shell # Create a fake deb package with equivs-build and the given control file diff --git a/helpers/helpers.v2.1.d/apt b/helpers/helpers.v2.1.d/apt index 3930f5e9c..3d58f2305 100644 --- a/helpers/helpers.v2.1.d/apt +++ b/helpers/helpers.v2.1.d/apt @@ -97,6 +97,9 @@ ynh_apt_install_dependencies() { # Prepare the virtual-dependency control file for dpkg-deb --build local TMPDIR=$(mktemp --directory) mkdir -p ${TMPDIR}/${app_ynh_deps}/DEBIAN + # For some reason, dpkg-deb insists for folder perm to be 755 and sometimes it's 777 o_O? + chmod -R 755 ${TMPDIR}/${pkgname} + cat >${TMPDIR}/${app_ynh_deps}/DEBIAN/control < Date: Wed, 10 Jul 2024 18:30:12 +0200 Subject: [PATCH 076/218] backups: one should be able to restore a backup archive by providing a path to the archive without moving it to /home/yunohost.backup/archives/ --- share/actionsmap.yml | 4 ++-- src/backup.py | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/share/actionsmap.yml b/share/actionsmap.yml index 9d5c76b01..70f80e463 100755 --- a/share/actionsmap.yml +++ b/share/actionsmap.yml @@ -1201,7 +1201,7 @@ backup: api: PUT /backups//restore arguments: name: - help: Name of the local backup archive + help: Name or path of the backup archive --system: help: List of system parts to restore (or all if none is given) nargs: "*" @@ -1232,7 +1232,7 @@ backup: api: GET /backups/ arguments: name: - help: Name of the local backup archive + help: Name or path of the backup archive -d: full: --with-details help: Show additional backup information diff --git a/src/backup.py b/src/backup.py index 58439189d..0f0f9a7e0 100644 --- a/src/backup.py +++ b/src/backup.py @@ -2314,11 +2314,6 @@ def backup_restore(name, system=[], apps=[], force=False): # Initialize # # - if name.endswith(".tar.gz"): - name = name[: -len(".tar.gz")] - elif name.endswith(".tar"): - name = name[: -len(".tar")] - restore_manager = RestoreManager(name) restore_manager.set_system_targets(system) @@ -2451,6 +2446,7 @@ def backup_info(name, with_details=False, human_readable=False): human_readable -- Print sizes in human readable format """ + original_name = name if name.endswith(".tar.gz"): name = name[: -len(".tar.gz")] @@ -2463,7 +2459,10 @@ def backup_info(name, with_details=False, human_readable=False): if not os.path.lexists(archive_file): archive_file += ".gz" if not os.path.lexists(archive_file): - raise YunohostValidationError("backup_archive_name_unknown", name=name) + # Maybe the user provided a path to the backup? + archive_file = original_name + if not os.path.lexists(archive_file): + raise YunohostValidationError("backup_archive_name_unknown", name=name) # If symlink, retrieve the real path if os.path.islink(archive_file): From b266e398ffaef91d2252a39dc5c7b9d94584396c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 10 Jul 2024 18:45:56 +0200 Subject: [PATCH 077/218] Fix previous commit @_@ --- src/backup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backup.py b/src/backup.py index 0f0f9a7e0..a016fccae 100644 --- a/src/backup.py +++ b/src/backup.py @@ -1923,6 +1923,9 @@ class TarBackupMethod(BackupMethod): @property def _archive_file(self): + if isinstance(self.manager, RestoreManager): + return self.manager.archive_path + if isinstance(self.manager, BackupManager) and settings_get( "misc.backup.backup_compress_tar_archives" ): From 9c22d36c6f435eb19a0f3afb77834826c65ee85f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 10 Jul 2024 18:46:18 +0200 Subject: [PATCH 078/218] backups: yunohost should not ask confirmation that 'YunoHost is already installed' when restoring only apps --- src/backup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backup.py b/src/backup.py index a016fccae..c034ae10d 100644 --- a/src/backup.py +++ b/src/backup.py @@ -2328,7 +2328,7 @@ def backup_restore(name, system=[], apps=[], force=False): # Add validation if restoring system parts on an already-installed system # - if restore_manager.targets.targets["system"] != [] and os.path.isfile( + if restore_manager.info["system"] != {} and restore_manager.targets.targets["system"] != [] and os.path.isfile( "/etc/yunohost/installed" ): logger.warning(m18n.n("yunohost_already_installed")) From e5bc94b9cfc36f01e940af22e5158beaff8a5512 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 10 Jul 2024 20:17:42 +0200 Subject: [PATCH 079/218] Copypasta is the worst kind of pasta --- helpers/helpers.v2.1.d/apt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/helpers.v2.1.d/apt b/helpers/helpers.v2.1.d/apt index 3d58f2305..6a26d9c3f 100644 --- a/helpers/helpers.v2.1.d/apt +++ b/helpers/helpers.v2.1.d/apt @@ -98,7 +98,7 @@ ynh_apt_install_dependencies() { local TMPDIR=$(mktemp --directory) mkdir -p ${TMPDIR}/${app_ynh_deps}/DEBIAN # For some reason, dpkg-deb insists for folder perm to be 755 and sometimes it's 777 o_O? - chmod -R 755 ${TMPDIR}/${pkgname} + chmod -R 755 ${TMPDIR}/${app_ynh_deps} cat >${TMPDIR}/${app_ynh_deps}/DEBIAN/control < Date: Wed, 10 Jul 2024 21:09:31 +0200 Subject: [PATCH 080/218] helpers2.1: forgot to keep ynh_spawn_app_shell /o\ --- helpers/helpers.v2.1.d/utils | 79 ++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/helpers/helpers.v2.1.d/utils b/helpers/helpers.v2.1.d/utils index 4c611395d..aca976c54 100644 --- a/helpers/helpers.v2.1.d/utils +++ b/helpers/helpers.v2.1.d/utils @@ -377,3 +377,82 @@ ynh_user_get_info() { ynh_user_list() { yunohost user list --output-as json --quiet | jq -r ".users | keys[]" } + +# Spawn a Bash shell with the app environment loaded +# +# usage: ynh_spawn_app_shell "appname" +# +# examples: +# ynh_spawn_app_shell "foobar" <<< 'echo "$USER"' +# ynh_spawn_app_shell "foobar" < /tmp/some_script.bash +# +# The spawned shell will have environment variables loaded and environment files sourced +# from the app's service configuration file (defaults to $app.service, overridable by the packager with `service` setting). +# If the app relies on a specific PHP version, then `php` will be aliased that version. The PHP command will also be appended with the `phpflags` settings. +ynh_spawn_app_shell() { + local app=$1 + + # Force Bash to be used to run this helper + [[ $0 =~ \/?bash$ ]] || ynh_die "Please use Bash as shell" + + # Make sure the app is installed + test -d /etc/yunohost/apps/$app || ynh_die "$app is not an installed app ?!" + + # Make sure the app has its own user + id -u "$app" &>/dev/null || ynh_die "There is no \"$app\" system user" + + # Make sure the app has an install_dir setting + local install_dir=$(ynh_app_setting_get --app=$app --key=install_dir) + [ -n "$install_dir" ] || ynh_die "$app has no install_dir setting (does it use packaging format >=2?)" + + # Load the app's service name, or default to $app + local service=$(ynh_app_setting_get --app=$app --key=service) + [ -z "$service" ] && service=$app; + + # Export HOME variable + export HOME=$install_dir; + + # Load the Environment variables from the app's service + local env_var=$(systemctl show $service.service -p "Environment" --value) + [ -n "$env_var" ] && export $env_var; + + # Force `php` to its intended version + # We use `eval`+`export` since `alias` is not propagated to subshells, even with `export` + local phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) + local phpflags=$(ynh_app_setting_get --app=$app --key=phpflags) + if [ -n "$phpversion" ] + then + eval "php() { php${phpversion} ${phpflags} \"\$@\"; }" + export -f php + fi + + # Source the EnvironmentFiles from the app's service + local env_files=($(systemctl show $service.service -p "EnvironmentFiles" --value)) + if [ ${#env_files[*]} -gt 0 ] + then + # set -/+a enables and disables new variables being automatically exported. Needed when using `source`. + set -a + for file in ${env_files[*]} + do + [[ $file = /* ]] && source $file + done + set +a + fi + + # Activate the Python environment, if it exists + if [ -f $install_dir/venv/bin/activate ] + then + # set -/+a enables and disables new variables being automatically exported. Needed when using `source`. + set -a + source $install_dir/venv/bin/activate + set +a + fi + + # cd into the WorkingDirectory set in the service, or default to the install_dir + local env_dir=$(systemctl show $service.service -p "WorkingDirectory" --value) + [ -z $env_dir ] && env_dir=$install_dir; + cd $env_dir + + # Spawn the app shell + su -s /bin/bash $app +} From ab8e0e6619ff8eceb2209f47762134f91eee81e4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Wed, 10 Jul 2024 23:37:41 +0200 Subject: [PATCH 081/218] Update system.py: forgot to add the corresponding stdin arg in some previous commit x_x --- src/utils/system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/system.py b/src/utils/system.py index 9b6de576c..12961112f 100644 --- a/src/utils/system.py +++ b/src/utils/system.py @@ -299,7 +299,7 @@ def aptitude_with_progress_bar(cmd): read, write = os.pipe() os.write(write, b"y\ny\ny") os.close(write) - ret = call_async_output(cmd, callbacks, shell=True) + ret = call_async_output(cmd, callbacks, shell=True, stdin=read) if log_apt_status_to_progress_bar.previous_package is not None and ret == 0: log_apt_status_to_progress_bar("done::100:Done") From e54e99bfb79a967055e8932fb2b05e1f888e60cc Mon Sep 17 00:00:00 2001 From: Kayou Date: Thu, 11 Jul 2024 00:18:06 +0200 Subject: [PATCH 082/218] fix migration message --- locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/en.json b/locales/en.json index bc37b6b54..3e795ec81 100644 --- a/locales/en.json +++ b/locales/en.json @@ -609,7 +609,7 @@ "migration_0027_patch_yunohost_conflicts": "Applying patch to workaround conflict issue…", "migration_0027_patching_sources_list": "Patching the sources.lists…", "migration_0027_problematic_apps_warning": "Please note that the following possibly problematic installed apps were detected. It looks like those were not installed from the YunoHost app catalog, or are not flagged as 'working'. Consequently, it cannot be guaranteed that they will still work after the upgrade: {problematic_apps}", - "migration_0027_start": "Starting migration to Bullseye", + "migration_0027_start": "Starting migration to Bookworm", "migration_0027_still_on_bullseye_after_main_upgrade": "Something went wrong during the main upgrade, the system appears to still be on Debian Bullseye", "migration_0027_system_not_fully_up_to_date": "Your system is not fully up-to-date. Please perform a regular upgrade before running the migration to Bullseye.", "migration_0027_yunohost_upgrade": "Starting YunoHost core upgrade…", From a66890ddd85d5ebeb677881be02bea04f8ad6081 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Thu, 11 Jul 2024 01:21:28 +0200 Subject: [PATCH 083/218] Bookworn migration text: fix some typos --- locales/en.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/locales/en.json b/locales/en.json index 3e795ec81..db9df2d5a 100644 --- a/locales/en.json +++ b/locales/en.json @@ -580,7 +580,7 @@ "migration_0021_general_warning": "Please note that this migration is a delicate operation. The YunoHost team did its best to review and test it, but the migration might still break parts of the system or its apps.\n\nTherefore, it is recommended to:\n - Perform a backup of any critical data or app. More info on https://yunohost.org/backup;\n - Be patient after launching the migration: Depending on your Internet connection and hardware, it might take up to a few hours for everything to upgrade.", "migration_0021_main_upgrade": "Starting main upgrade…", "migration_0021_modified_files": "Please note that the following files were found to be manually modified and might be overwritten following the upgrade: {manually_modified_files}", - "migration_0021_not_buster2": "The current Debian distribution is not Buster! If you already ran the Buster->Bullseye migration, then this error is symptomatic of the fact that the migration procedure was not 100% succesful (otherwise YunoHost would have flagged it as completed). It is recommended to investigate what happened with the support team, who will need the **full** log of the `migration, which can be found in Tools > Logs in the webadmin.", + "migration_0021_not_buster2": "The current Debian distribution is not Buster! If you already ran the Buster -> Bullseye migration, then this error is symptomatic of the fact that the migration procedure was not 100% succesful (otherwise YunoHost would have flagged it as completed). It is recommended to investigate what happened with the support team, who will need the **full** log of the migration, which can be found in Tools > Logs in the webadmin.", "migration_0021_not_enough_free_space": "Free space is pretty low in /var/! You should have at least 1GB free to run this migration.", "migration_0021_patch_yunohost_conflicts": "Applying patch to workaround conflict issue…", "migration_0021_patching_sources_list": "Patching the sources.lists…", @@ -598,19 +598,19 @@ "migration_0024_rebuild_python_venv_disclaimer_rebuild": "Rebuilding the virtualenv will be attempted for the following apps (NB: the operation may take some time!): {rebuild_apps}", "migration_0024_rebuild_python_venv_failed": "Failed to rebuild the Python virtualenv for {app}. The app may not work as long as this is not resolved. You should fix the situation by forcing the upgrade of this app using `yunohost app upgrade --force {app}`.", "migration_0024_rebuild_python_venv_in_progress": "Now attempting to rebuild the Python virtualenv for `{app}`", - "migration_description_0027_migrate_to_bookworm": "Upgrade the system to Debian Bookworm and YunoHost 12", + "migration_description_0027_migrate_to_bookworm": "Upgrade the system to Debian Bookworm and YunoHost 12…", "migration_0027_cleaning_up": "Cleaning up cache and packages not useful anymore…", "migration_0027_delayed_api_restart": "The YunoHost API will automatically be restarted in 15 seconds. It may be unavailable for a few seconds, and then you will have to login again.", - "migration_0027_general_warning": "Please note that this migration is a delicate operation. The YunoHost team did its best to review and test it, but the migration might still break parts of the system or its apps.\n\nTherefore, it is recommended to:\n - Perform a backup of any critical data or app. More info on https://yunohost.org/backup;\n - Be patient after launching the migration: Depending on your Internet connection and hardware, it might take up to a few hours for everything to upgrade.", + "migration_0027_general_warning": "Please note that this migration is a delicate operation. The YunoHost team did its best to review and test it, but the migration might still break parts of the system or its apps.\n\nTherefore, it is recommended to:\n - Perform a backup of any critical data or app. More info on https://yunohost.org/backup;\n - Be patient after launching the migration: Depending on your Internet connection and hardware, it might take up to a few hours for everything to upgrade properly.", "migration_0027_main_upgrade": "Starting main upgrade…", "migration_0027_modified_files": "Please note that the following files were found to be manually modified and might be overwritten following the upgrade: {manually_modified_files}", - "migration_0027_not_bullseye": "The current Debian distribution is not Bullseye! If you already ran the Bullseye->Bookworm migration, then this error is symptomatic of the fact that the migration procedure was not 100% succesful (otherwise YunoHost would have flagged it as completed). It is recommended to investigate what happened with the support team, who will need the **full** log of the `migration, which can be found in Tools > Logs in the webadmin.", + "migration_0027_not_bullseye": "The current Debian distribution is not Bullseye! If you already ran the Bullseye -> Bookworm migration, then this error is symptomatic of the fact that the migration procedure was not 100% succesful (otherwise YunoHost would have flagged it as completed). It is recommended to investigate what happened with the support team, who will need the **full** log of the migration, which can be found in Tools > Logs in the webadmin.", "migration_0027_not_enough_free_space": "Free space is pretty low in /var/! You should have at least 1GB free to run this migration.", "migration_0027_patch_yunohost_conflicts": "Applying patch to workaround conflict issue…", - "migration_0027_patching_sources_list": "Patching the sources.lists…", + "migration_0027_patching_sources_list": "Patching the sources.lists file…", "migration_0027_problematic_apps_warning": "Please note that the following possibly problematic installed apps were detected. It looks like those were not installed from the YunoHost app catalog, or are not flagged as 'working'. Consequently, it cannot be guaranteed that they will still work after the upgrade: {problematic_apps}", - "migration_0027_start": "Starting migration to Bookworm", - "migration_0027_still_on_bullseye_after_main_upgrade": "Something went wrong during the main upgrade, the system appears to still be on Debian Bullseye", + "migration_0027_start": "Starting migration to Bookworm…", + "migration_0027_still_on_bullseye_after_main_upgrade": "Something went wrong during the main upgrade, the system appears to still be on Debian Bullseye.", "migration_0027_system_not_fully_up_to_date": "Your system is not fully up-to-date. Please perform a regular upgrade before running the migration to Bullseye.", "migration_0027_yunohost_upgrade": "Starting YunoHost core upgrade…", "migration_description_0021_migrate_to_bullseye": "Upgrade the system to Debian Bullseye and YunoHost 11.x", @@ -804,4 +804,4 @@ "yunohost_installing": "Installing YunoHost…", "yunohost_not_installed": "YunoHost is not correctly installed. Please run 'yunohost tools postinstall'", "yunohost_postinstall_end_tip": "The post-install completed! To finalize your setup, please consider:\n - diagnose potential issues through the 'Diagnosis' section of the webadmin (or 'yunohost diagnosis run' in command-line);\n - reading the 'Finalizing your setup' and 'Getting to know YunoHost' parts in the admin documentation: https://yunohost.org/admindoc." -} +} \ No newline at end of file From e339006c69bbda7d48617e9cb62e7f724eb73317 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Thu, 11 Jul 2024 03:45:58 +0200 Subject: [PATCH 084/218] revert migration description --- locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/en.json b/locales/en.json index db9df2d5a..e69a1661e 100644 --- a/locales/en.json +++ b/locales/en.json @@ -598,7 +598,7 @@ "migration_0024_rebuild_python_venv_disclaimer_rebuild": "Rebuilding the virtualenv will be attempted for the following apps (NB: the operation may take some time!): {rebuild_apps}", "migration_0024_rebuild_python_venv_failed": "Failed to rebuild the Python virtualenv for {app}. The app may not work as long as this is not resolved. You should fix the situation by forcing the upgrade of this app using `yunohost app upgrade --force {app}`.", "migration_0024_rebuild_python_venv_in_progress": "Now attempting to rebuild the Python virtualenv for `{app}`", - "migration_description_0027_migrate_to_bookworm": "Upgrade the system to Debian Bookworm and YunoHost 12…", + "migration_description_0027_migrate_to_bookworm": "Upgrade the system to Debian Bookworm and YunoHost 12", "migration_0027_cleaning_up": "Cleaning up cache and packages not useful anymore…", "migration_0027_delayed_api_restart": "The YunoHost API will automatically be restarted in 15 seconds. It may be unavailable for a few seconds, and then you will have to login again.", "migration_0027_general_warning": "Please note that this migration is a delicate operation. The YunoHost team did its best to review and test it, but the migration might still break parts of the system or its apps.\n\nTherefore, it is recommended to:\n - Perform a backup of any critical data or app. More info on https://yunohost.org/backup;\n - Be patient after launching the migration: Depending on your Internet connection and hardware, it might take up to a few hours for everything to upgrade properly.", From fbe42f18672835b7f99cbd9ebeb260c3b6455c2e Mon Sep 17 00:00:00 2001 From: alexAubin <4533074+alexAubin@users.noreply.github.com> Date: Thu, 11 Jul 2024 08:55:48 +0000 Subject: [PATCH 085/218] :art: Format Python code with Black --- src/backup.py | 6 ++++-- src/utils/system.py | 24 +++++++++++++++++------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/backup.py b/src/backup.py index c034ae10d..c7393d935 100644 --- a/src/backup.py +++ b/src/backup.py @@ -2328,8 +2328,10 @@ def backup_restore(name, system=[], apps=[], force=False): # Add validation if restoring system parts on an already-installed system # - if restore_manager.info["system"] != {} and restore_manager.targets.targets["system"] != [] and os.path.isfile( - "/etc/yunohost/installed" + if ( + restore_manager.info["system"] != {} + and restore_manager.targets.targets["system"] != [] + and os.path.isfile("/etc/yunohost/installed") ): logger.warning(m18n.n("yunohost_already_installed")) if not force: diff --git a/src/utils/system.py b/src/utils/system.py index 12961112f..e0efbcfee 100644 --- a/src/utils/system.py +++ b/src/utils/system.py @@ -252,7 +252,11 @@ def aptitude_with_progress_bar(cmd): if package == "dpkg-exec": return - if package and log_apt_status_to_progress_bar.previous_package and package == log_apt_status_to_progress_bar.previous_package: + if ( + package + and log_apt_status_to_progress_bar.previous_package + and package == log_apt_status_to_progress_bar.previous_package + ): return try: @@ -276,18 +280,22 @@ def aptitude_with_progress_bar(cmd): log_apt_status_to_progress_bar.download_message_displayed = False def strip_boring_dpkg_reading_database(s): - return re.sub(r'(\(Reading database ... \d*%?|files and directories currently installed.\))', '', s) + return re.sub( + r"(\(Reading database ... \d*%?|files and directories currently installed.\))", + "", + s, + ) callbacks = ( lambda l: logger.debug(strip_boring_dpkg_reading_database(l).rstrip() + "\r"), - lambda l: logger.warning(l.rstrip() + "\r"), # ... aptitude has no stderr ? :| if _apt_log_line_is_relevant(l.rstrip()) else logger.debug(l.rstrip() + "\r"), + lambda l: logger.warning( + l.rstrip() + "\r" + ), # ... aptitude has no stderr ? :| if _apt_log_line_is_relevant(l.rstrip()) else logger.debug(l.rstrip() + "\r"), lambda l: log_apt_status_to_progress_bar(l.rstrip()), ) original_cmd = cmd - cmd = ( - f'LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none aptitude {cmd} --quiet=2 -o=Dpkg::Use-Pty=0 -o "APT::Status-Fd=$YNH_STDINFO"' - ) + cmd = f'LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none aptitude {cmd} --quiet=2 -o=Dpkg::Use-Pty=0 -o "APT::Status-Fd=$YNH_STDINFO"' # If upgrading yunohost from the API, delay the Yunohost-api restart # (this should be the last time we need it before bookworm, because on bookworm, yunohost-admin cookies will be persistent upon api restart) @@ -304,7 +312,9 @@ def aptitude_with_progress_bar(cmd): if log_apt_status_to_progress_bar.previous_package is not None and ret == 0: log_apt_status_to_progress_bar("done::100:Done") elif ret != 0: - raise YunohostError(f"Failed to run command 'aptitude {original_cmd}'", raw_msg=True) + raise YunohostError( + f"Failed to run command 'aptitude {original_cmd}'", raw_msg=True + ) def _apt_log_line_is_relevant(line): From e8c171fd836e4711dc0309464b100355286815e4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 11 Jul 2024 15:53:34 +0200 Subject: [PATCH 086/218] ci: add migration 0027 to expected strings --- maintenance/missing_i18n_keys.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/maintenance/missing_i18n_keys.py b/maintenance/missing_i18n_keys.py index 0c5b5fd71..caaf862eb 100644 --- a/maintenance/missing_i18n_keys.py +++ b/maintenance/missing_i18n_keys.py @@ -32,6 +32,7 @@ def find_expected_string_keys(): python_files = glob.glob(ROOT + "src/*.py") python_files.extend(glob.glob(ROOT + "src/utils/*.py")) python_files.extend(glob.glob(ROOT + "src/migrations/*.py")) + python_files.extend(glob.glob(ROOT + "src/migrations/*.py.disabled")) python_files.extend(glob.glob(ROOT + "src/authenticators/*.py")) python_files.extend(glob.glob(ROOT + "src/diagnosers/*.py")) python_files.append(ROOT + "bin/yunohost") @@ -75,6 +76,9 @@ def find_expected_string_keys(): continue yield "migration_description_" + os.path.basename(path)[:-3] + # FIXME: to be removed in bookworm branch + yield "migration_description_0027_migrate_to_bookworm" + # For each default service, expect to find "service_description_" for service, info in yaml.safe_load( open(ROOT + "conf/yunohost/services.yml") From 0b5c5a5f4d660732a840cdfd6635aaa34e1c99a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20M?= Date: Thu, 4 Jul 2024 07:43:41 +0000 Subject: [PATCH 087/218] Translated using Weblate (Galician) Currently translated at 100.0% (790 of 790 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/gl/ --- locales/gl.json | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/locales/gl.json b/locales/gl.json index 5080505c1..45912c30d 100644 --- a/locales/gl.json +++ b/locales/gl.json @@ -41,7 +41,7 @@ "apps_catalog_failed_to_download": "Non se puido descargar o catálogo de apps {apps_catalog}: {error}", "apps_catalog_updating": "Actualizando o catálogo de aplicacións…", "apps_catalog_init_success": "Sistema do catálogo de apps iniciado!", - "apps_already_up_to_date": "Xa tes tódalas apps ao día", + "apps_already_up_to_date": "Xa tes todas as apps ao día", "app_packaging_format_not_supported": "Esta app non se pode instalar porque o formato de empaquetado non está soportado pola túa versión de YunoHost. Deberías considerar actualizar o teu sistema.", "app_upgraded": "{app} actualizadas", "app_upgrade_some_app_failed": "Algunhas apps non se puideron actualizar", @@ -317,7 +317,7 @@ "group_cannot_be_deleted": "O grupo {group} non se pode eliminar manualmente.", "group_cannot_edit_primary_group": "O grupo '{group}' non se pode editar manualmente. É o grupo primario que contén só a unha usuaria concreta.", "group_cannot_edit_visitors": "O grupo 'visitors' non se pode editar manualmente. É un grupo especial que representa a tódas visitantes anónimas", - "group_cannot_edit_all_users": "O grupo 'all_users' non se pode editar manualmente. É un grupo especial que contén tódalas usuarias rexistradas en YunoHost", + "group_cannot_edit_all_users": "O grupo 'all_users' non se pode editar manualmente. É un grupo especial que contén todas as usuarias rexistradas en YunoHost", "disk_space_not_sufficient_update": "Non hai espazo suficiente no disco para actualizar esta aplicación", "disk_space_not_sufficient_install": "Non queda espazo suficiente no disco para instalar esta aplicación", "log_help_to_get_log": "Para ver o rexistro completo da operación '{desc}', usa o comando 'yunohost log show {name}'", @@ -447,8 +447,8 @@ "permission_not_found": "Non se atopa o permiso '{permission}'", "permission_deletion_failed": "Non se puido eliminar o permiso '{permission}': {error}", "permission_deleted": "O permiso '{permission}' foi eliminado", - "permission_cant_add_to_all_users": "O permiso {permission} non pode ser concecido a tódalas usuarias.", - "permission_currently_allowed_for_all_users": "Este permiso está concedido actualmente a tódalas usuarias ademáis de a outros grupos. Probablemente queiras ben eliminar o permiso 'all_users' ou ben eliminar os outros grupos que teñen permiso.", + "permission_cant_add_to_all_users": "O permiso {permission} non se pode conceder a todas as usuarias.", + "permission_currently_allowed_for_all_users": "Este permiso está concedido actualmente para todas as usuarias ademáis de a outros grupos. Probablemente queiras ben eliminar o permiso 'all_users' ou ben eliminar os outros grupos que teñen permiso.", "restore_failed": "Non se puido restablecer o sistema", "restore_extracting": "A extraer os ficheiros necesarios desde o arquivo…", "restore_confirm_yunohost_installed": "Tes a certeza de querer restablecer un sistema xa instalado? [{answers}]", @@ -553,7 +553,7 @@ "service_removed": "Eliminado o servizo '{service}'", "service_remove_failed": "Non se eliminou o servizo '{service}'", "service_enabled": "O servizo '{service}' vai ser iniciado automáticamente no inicio do sistema.", - "diagnosis_apps_allgood": "Tódalas apps instaladas respectan as prácticas básicas de empaquetado", + "diagnosis_apps_allgood": "Todas as apps instaladas respectan as prácticas básicas de empaquetado", "diagnosis_apps_bad_quality": "Esta aplicación está actualmente marcada como estragada no catálogo de aplicacións de YunoHost. Podería ser un problema temporal mentras as mantedoras intentan arranxar o problema. Ata ese momento a actualización desta app está desactivada.", "log_user_import": "Importar usuarias", "user_import_failed": "A operación de importación de usuarias fracasou", @@ -692,7 +692,7 @@ "log_settings_reset_all": "Restablecer todos os axustes", "log_settings_set": "Aplicar axustes", "admins": "Admins", - "all_users": "Tódalas usuarias de YunoHost", + "all_users": "Usuarias de YunoHost", "app_action_failed": "Fallou a execución da acción {action} da app {app}", "app_manifest_install_ask_init_admin_permission": "Quen debería ter acceso de administración a esta app? (Pode cambiarse despois)", "app_manifest_install_ask_init_main_permission": "Quen debería ter acceso a esta app? (Pode cambiarse despois)", @@ -781,5 +781,12 @@ "log_dyndns_unsubscribe": "Retirar subscrición para o subdominio YunoHost '{}'", "ask_dyndns_recovery_password_explain_unavailable": "Este dominio DynDNS xa está rexistrado. Se es a persoa que o rexistrou orixinalmente, podes escribir o código de recuperación para reclamar o dominio.", "dyndns_too_many_requests": "O servicio dyndns de YunoHost recibeu demasiadas peticións do teu sistema, agarda 1 hora e volve intentalo.", - "global_settings_setting_ssh_port_help": "É recomendable un porto inferior a 1024 para evitar os intentos de apropiación por parte de servizos de non-administración na máquina remota. Tamén deberías evitar elexir un porto que xa está sendo utilizado, como 80 ou 443." -} \ No newline at end of file + "global_settings_setting_ssh_port_help": "É recomendable un porto inferior a 1024 para evitar os intentos de apropiación por parte de servizos de non-administración na máquina remota. Tamén deberías evitar elexir un porto que xa está sendo utilizado, como 80 ou 443.", + "diagnosis_ignore_criteria_error": "Os criterios deben ter o formato key=value (ex. domain=yolo.test)", + "diagnosis_ignore_already_filtered": "(Xa existe un filtro de diagnóstico de {category} con estes criterios)", + "diagnosis_ignore_filter_removed": "Eliminouse o filtro do diagnóstico para {category}", + "diagnosis_ignore_no_filter_found": "(Non hai tal filtro do diagnóstico de {category} con este criterio a eliminar)", + "diagnosis_ignore_no_issue_found": "Non se atoparon incidencias para o criterio establecido.", + "diagnosis_ignore_filter_added": "Engadiuse o filtro do diagnóstico para {category}", + "diagnosis_ignore_missing_criteria": "Deberías proporcionar cando menos un criterio que a categoría de diagnóstico omitirá" +} From 5fb54936ba92aa3b700a8da13124c4eafda64628 Mon Sep 17 00:00:00 2001 From: Zwiebel Date: Mon, 8 Jul 2024 18:12:09 +0000 Subject: [PATCH 088/218] Translated using Weblate (German) Currently translated at 97.0% (767 of 790 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/de/ --- locales/de.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/de.json b/locales/de.json index 0c1bdf32e..808a949c7 100644 --- a/locales/de.json +++ b/locales/de.json @@ -63,7 +63,7 @@ "mail_forward_remove_failed": "Die Weiterleitungs-E-Mail '{mail}' konnte nicht gelöscht werden", "main_domain_change_failed": "Die Hauptdomain konnte nicht geändert werden", "main_domain_changed": "Die Hauptdomain wurde geändert", - "pattern_backup_archive_name": "Muss ein gültiger Dateiname mit maximal 30 Zeichen sein, ausschliesslich alphanumerische Zeichen und -_.", + "pattern_backup_archive_name": "Muss ein gültiger Dateiname mit maximal 30 Zeichen sein, ausschließlich alphanumerische Zeichen und -_.", "pattern_domain": "Muss ein gültiger Domainname sein (z.B. meine-domain.org)", "pattern_email": "Es muss sich um eine gültige E-Mail-Adresse handeln, ohne '+'-Symbol (z. B. name@domäne.de)", "pattern_firstname": "Muss ein gültiger Vorname sein (mindestens 3 Zeichen)", @@ -782,4 +782,4 @@ "dyndns_set_recovery_password_failed": "Konnte Wiederherstellungspasswort nicht einstellen: {error}", "dyndns_set_recovery_password_success": "Wiederherstellungspasswort eingestellt!", "global_settings_setting_ssh_port_help": "Ein Port unter 1024 wird bevorzugt, um Kaperversuche durch Nicht-Administratordienste auf dem Remote-Computer zu verhindern. Sie sollten auch vermeiden, einen bereits verwendeten Port zu verwenden, z. B. 80 oder 443." -} \ No newline at end of file +} From 566213ecd5f05481ca9cfa9fef66fa4c0d197292 Mon Sep 17 00:00:00 2001 From: ppr Date: Tue, 9 Jul 2024 16:54:42 +0000 Subject: [PATCH 089/218] Translated using Weblate (French) Currently translated at 98.2% (791 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/fr/ --- locales/fr.json | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/locales/fr.json b/locales/fr.json index 18fbcd4da..e5a8a4aa7 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -788,5 +788,20 @@ "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é." -} \ No newline at end of file + "diagnosis_ignore_no_issue_found": "Aucun problème correspondant au critère donné n'a été trouvé.", + "migration_description_0027_migrate_to_bookworm": "Mettre à jour le système vers Debian Bookworm et YunoHost 12", + "migration_0027_delayed_api_restart": "L'API de YunoHost sera automatiquement redémarrée dans 15 secondes. Il se peut qu'elle soit indisponible pendant quelques secondes, après quoi vous devrez vous connecter à nouveau.", + "migration_0027_general_warning": "Veuillez noter que cette migration est une opération délicate. L'équipe de YunoHost a fait de son mieux pour l'examiner et la tester, mais la migration peut encore casser des parties du système ou de ses applications.\n\nPar conséquent, il est recommandé :\n - d'effectuer une sauvegarde de toutes les données ou applications critiques. Plus d'informations sur https://yunohost.org/backup ;\n - d'être patient après avoir lancé la migration : en fonction de votre connexion Internet et de votre matériel, la mise à niveau peut prendre plusieurs quelques heures.", + "migration_0027_not_bullseye": "La distribution Debian actuelle n'est pas Bullseye ! Si vous avez déjà effectué la migration Bullseye->Bookworm, cette erreur est symptomatique du fait que la procédure de migration n'a pas réussi à 100 % (sinon YunoHost l'aurait signalée comme terminée). Il est recommandé de chercher ce qui s'est passé avec l'équipe de support, qui aura besoin du journal **complet** de la `migration, qui peut être trouvé dans Outils > Journaux dans la webadmin.", + "migration_0027_cleaning_up": "Nettoyage du cache et des paquets qui ne sont plus utiles …", + "migration_0027_main_upgrade": "Démarrage de la mise à niveau du système …", + "migration_0027_modified_files": "Veuillez noter que les fichiers suivants ont été modifiés manuellement et pourraient être écrasés après la mise à niveau : {manually_modified_files}", + "migration_0027_not_enough_free_space": "L'espace libre est plutôt faible dans /var/ ! Vous devez disposer d'au moins 1 Go d'espace libre pour effectuer cette migration.", + "migration_0027_patch_yunohost_conflicts": "Application d'un correctif pour résoudre le problème de conflit …", + "migration_0027_patching_sources_list": "Correction du sources.lists …", + "migration_0027_problematic_apps_warning": "Veuillez noter que des applications installées susceptibles de poser problème ont été détectées. Il semble qu'elles n'aient pas été installées à partir du catalogue d'applications de YunoHost, ou bien qu'elles ne soient pas marquées comme 'fonctionnelles'. Par conséquent, il ne peut pas être garanti qu'elles continueront à fonctionner après la mise à jour : {problematic_apps}", + "migration_0027_start": "Commencement de la migration vers le Bullseye", + "migration_0027_still_on_bullseye_after_main_upgrade": "Quelque chose s'est mal passé lors de la mise à jour du système, il semble que celui-ci soit toujours sous Debian Bullseye.", + "migration_0027_system_not_fully_up_to_date": "Votre système n'est pas complètement à jour. Veuillez effectuer une mise à jour classique avant de procéder à la migration vers Bullseye.", + "migration_0027_yunohost_upgrade": "Démarrage de la mise à jour du cœur de YunoHost …" +} From a97c82d1c29087c105a238a2adfb8ad4666d033b Mon Sep 17 00:00:00 2001 From: cjdw Date: Wed, 10 Jul 2024 18:53:09 +0000 Subject: [PATCH 090/218] Translated using Weblate (Indonesian) Currently translated at 48.5% (391 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/locales/id.json b/locales/id.json index d1f8d3325..a6a2cb532 100644 --- a/locales/id.json +++ b/locales/id.json @@ -440,5 +440,8 @@ "restore_system_part_failed": "Tidak dapat memulihkan segmen '{part}'", "service_enable_failed": "Tidak dapat membuat layanan '{service}' dimulai mandiri saat pemulaian.\n\nLog layanan baru-baru ini:{logs}", "service_not_reloading_because_conf_broken": "Tidak memuat atau memulai ulang layanan '{name}' karena konfigurasinya rusak: {errors}", - "service_reloaded": "Layanan {service} dimuat ulang" -} \ No newline at end of file + "service_reloaded": "Layanan {service} dimuat ulang", + "additional_urls_already_removed": "URL tambahan '{url}' sudah disingkirkan pada URL tambahan untuk perizinan '{permission}'", + "additional_urls_already_added": "URL tambahan '{url}' sudah ditambahkan pada URL tambahan untuk perizinan '{permission}'", + "app_argument_password_no_default": "Galat ketika mengurai argumen sandi '{name}': argumen sandi tidak diperbolehkan mempunyai suatu nilai baku demi alasan keamanan" +} From 3c992c894ad196af65cfa300a9bc752ba6431c2d Mon Sep 17 00:00:00 2001 From: cjdw Date: Wed, 10 Jul 2024 19:20:32 +0000 Subject: [PATCH 091/218] Translated using Weblate (Indonesian) Currently translated at 50.8% (409 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/locales/id.json b/locales/id.json index a6a2cb532..ec4be7621 100644 --- a/locales/id.json +++ b/locales/id.json @@ -16,7 +16,7 @@ "app_manifest_install_ask_domain": "Pilih di domain mana aplikasi ini harus dipasang", "app_not_installed": "Tidak dapat menemukan {app} di daftar aplikasi yang terpasang: {all_apps}", "app_not_properly_removed": "{app} belum dilepas dengan benar", - "app_remove_after_failed_install": "Melepas aplikasi setelah kegagalan pemasangan…", + "app_remove_after_failed_install": "Menyingkirkan aplikasi setelah kegagalan pemasangan…", "app_removed": "{app} dilepas", "app_restore_failed": "Tidak dapat memulihkan {app}: {error}", "app_upgrade_some_app_failed": "Beberapa aplikasi tidak dapat diperbarui", @@ -32,10 +32,10 @@ "app_unknown": "Aplikasi tak dikenal", "ask_new_admin_password": "Kata sandi administrasi baru", "ask_password": "Kata sandi", - "app_upgrade_app_name": "Memperbarui {app}…", + "app_upgrade_app_name": "Sedang meningkatkan {app}…", "app_upgrade_failed": "Tidak dapat memperbarui {app}: {error}", "app_start_install": "Memasang {app}…", - "app_start_remove": "Melepas {app}…", + "app_start_remove": "Menyingkirkan {app}…", "app_manifest_install_ask_password": "Pilih kata sandi administrasi untuk aplikasi ini", "app_upgrade_several_apps": "Aplikasi berikut akan diperbarui: {apps}", "backup_app_failed": "Tidak dapat mencadangkan {app}", @@ -145,7 +145,7 @@ "user_import_bad_file": "Berkas CSV Anda tidak secara benar diformat, akan diabaikan untuk menghindari potensi data hilang", "yunohost_postinstall_end_tip": "Proses pasca-pemasangan sudah selesai! Untuk menyelesaikan pengaturan Anda, pertimbangkan:\n - diagnosis masalah yang mungkin lewat bagian 'Diagnosis' di webadmin (atau 'yunohost diagnosis run' di cmd);\n - baca bagian 'Finalizing your setup' dan 'Getting to know YunoHost' di dokumentasi admin: https://yunohost.org/admindoc.", "app_already_installed_cant_change_url": "Aplikasi ini sudah terpasang. URL tidak dapat diubah hanya dengan ini. Periksa `app changeurl` jika tersedia.", - "app_requirements_checking": "Memeriksa persyaratan untuk {app}…", + "app_requirements_checking": "Memeriksa persyaratan pada {app}…", "backup_create_size_estimation": "Arsip ini akan mengandung data dengan ukuran {size}.", "certmanager_certificate_fetching_or_enabling_failed": "Mencoba untuk menggunakan sertifikat baru untuk {domain} tidak bisa…", "certmanager_no_cert_file": "Tidak dapat membuka berkas sertifikat untuk domain {domain} (berkas: {file})", @@ -186,7 +186,7 @@ "diagnosis_basesystem_host": "Peladen memakai Debian {debian_version}", "diagnosis_domain_expiration_not_found": "Tidak dapat memeriksa tanggal kedaluwarsa untuk beberapa domain", "diagnosis_http_could_not_diagnose_details": "Galat: {error}", - "app_manifest_install_ask_path": "Pilih jalur URL (setelah domain) dimana aplikasi ini akan dipasang", + "app_manifest_install_ask_path": "Pilih jalur URL (setelah domain) dimana aplikasi ini harus dipasang", "certmanager_cert_signing_failed": "Tidak dapat memverifikasi sertifikat baru", "config_validate_url": "Harus URL web yang valid", "diagnosis_description_ports": "Penyingkapan porta", @@ -211,7 +211,7 @@ "yunohost_configured": "YunoHost sudah terkonfigurasi", "global_settings_setting_pop3_enabled": "Aktifkan POP3", "log_user_import": "Mengimpor pengguna", - "app_start_backup": "Mengumpulkan berkas untuk dicadangkan untuk {app}…", + "app_start_backup": "Mengumpulkan berkas untuk dicadangkan pada {app}…", "app_upgrade_script_failed": "Galat terjadi di skrip pembaruan aplikasi", "backup_csv_creation_failed": "Tidak dapat membuat berkas CSV yang dibutuhkan untuk pemulihan", "certmanager_attempt_to_renew_valid_cert": "Sertifikat untuk domain '{domain}' belum akan kedaluwarsa! (Anda bisa menggunakan --force jika Anda tahu apa yang Anda lakukan)", @@ -443,5 +443,13 @@ "service_reloaded": "Layanan {service} dimuat ulang", "additional_urls_already_removed": "URL tambahan '{url}' sudah disingkirkan pada URL tambahan untuk perizinan '{permission}'", "additional_urls_already_added": "URL tambahan '{url}' sudah ditambahkan pada URL tambahan untuk perizinan '{permission}'", - "app_argument_password_no_default": "Galat ketika mengurai argumen sandi '{name}': argumen sandi tidak diperbolehkan mempunyai suatu nilai baku demi alasan keamanan" + "app_argument_password_no_default": "Galat ketika mengurai argumen sandi '{name}': argumen sandi tidak diperbolehkan mempunyai suatu nilai baku demi alasan keamanan", + "app_corrupt_source": "YunoHost telah berhasil mengunduh aset tersebut '{source_id}' ({url}) untuk {app}, tetapi aset tidak sesuai dengan checksum. Hal ini bisa jadi karena beberapa jaringan temporer mengalami kegagalan pada peladen Anda, ATAU entah bagaimana aset mengalami perubahan oleh penyelenggara hulu (atau pelakon jahat?) dan pemaket YunoHost perlu untuk menyelidiki dan mungkin pembaruan manifes applikasi tersebut untuk mempertimbangkan perubahan ini.\n\tEkspektasi checksum sha256: {expected_sha256}\n\tUnduhan checksum sha256: {computed_sha256}\n\tUnduhan ukuran berkas: {size}", + "app_not_upgraded_broken_system": "Aplikasi '{failed_app}' telah gagal meningkatkan dan menyebabkan sistem dalam status rusak, dan sebagai konsekuensi terhadap peningkatan aplikasi tersebut telah dibatalkan: {apps}", + "app_resource_failed": "Menyediakan, membatalkan penyediaan, atau memperbarui sumber daya pada {app} telah gagal: {error}", + "app_failed_to_download_asset": "Gagal mengunduh aset '{source_id}' ({url}) untuk {app}: {out}", + "apps_catalog_init_success": "Inisialisasi sistem katalog aplikasi!", + "app_unsupported_remote_type": "Tidak mendukung type remot yang digunakan pada aplikasi", + "app_not_upgraded_broken_system_continue": "Aplikasi '{failed_app}' telah gagal meningkatkan dan menyebabkan sistem dalam status rusak (jadi --continue-on-failure diabaikan), dan sebagai konsekuensi terhadap peningkatan aplikasi tersebut telah dibatalkan: {apps}", + "apps_failed_to_upgrade_line": "\n * {app_id}(untuk melihat log yang berkaitan lakukan 'yunohost log show {operation_logger_name}')" } From 0b438eab024939d045906e035966cefd198ea78d Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 10 Jul 2024 23:14:03 +0000 Subject: [PATCH 092/218] Translated using Weblate (French) Currently translated at 99.5% (801 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/fr/ --- locales/fr.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/locales/fr.json b/locales/fr.json index e5a8a4aa7..026d5d1c0 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -791,14 +791,14 @@ "diagnosis_ignore_no_issue_found": "Aucun problème correspondant au critère donné n'a été trouvé.", "migration_description_0027_migrate_to_bookworm": "Mettre à jour le système vers Debian Bookworm et YunoHost 12", "migration_0027_delayed_api_restart": "L'API de YunoHost sera automatiquement redémarrée dans 15 secondes. Il se peut qu'elle soit indisponible pendant quelques secondes, après quoi vous devrez vous connecter à nouveau.", - "migration_0027_general_warning": "Veuillez noter que cette migration est une opération délicate. L'équipe de YunoHost a fait de son mieux pour l'examiner et la tester, mais la migration peut encore casser des parties du système ou de ses applications.\n\nPar conséquent, il est recommandé :\n - d'effectuer une sauvegarde de toutes les données ou applications critiques. Plus d'informations sur https://yunohost.org/backup ;\n - d'être patient après avoir lancé la migration : en fonction de votre connexion Internet et de votre matériel, la mise à niveau peut prendre plusieurs quelques heures.", - "migration_0027_not_bullseye": "La distribution Debian actuelle n'est pas Bullseye ! Si vous avez déjà effectué la migration Bullseye->Bookworm, cette erreur est symptomatique du fait que la procédure de migration n'a pas réussi à 100 % (sinon YunoHost l'aurait signalée comme terminée). Il est recommandé de chercher ce qui s'est passé avec l'équipe de support, qui aura besoin du journal **complet** de la `migration, qui peut être trouvé dans Outils > Journaux dans la webadmin.", - "migration_0027_cleaning_up": "Nettoyage du cache et des paquets qui ne sont plus utiles …", - "migration_0027_main_upgrade": "Démarrage de la mise à niveau du système …", + "migration_0027_general_warning": "Veuillez noter que cette migration est une opération délicate. L'équipe de YunoHost a fait de son mieux pour l'examiner et la tester, mais la migration peut encore casser des parties du système ou de ses applications.\n\nPar conséquent, il est recommandé :\n - d'effectuer une sauvegarde de toutes les données ou applications critiques. Plus d'informations sur https://yunohost.org/backup ;\n - de faire preuve de patience après avoir lancé la migration : en fonction de votre connexion Internet et de votre matériel, la mise à niveau peut prendre plusieurs heures.", + "migration_0027_not_bullseye": "La distribution Debian actuelle n'est pas Bullseye ! Si vous avez déjà effectué la migration Bullseye -> Bookworm, cette erreur est symptomatique du fait que la procédure de migration n'a pas réussi à 100 % (sinon YunoHost l'aurait marquée comme terminée). Il est recommandé de chercher ce qui s'est passé avec l'équipe de support, qui aura besoin du journal **complet** de la migration, qui peut être trouvé dans Outils > Journaux dans la webadmin.", + "migration_0027_cleaning_up": "Nettoyage du cache et des paquets qui ne sont plus utiles…", + "migration_0027_main_upgrade": "Démarrage de la mise à niveau du système…", "migration_0027_modified_files": "Veuillez noter que les fichiers suivants ont été modifiés manuellement et pourraient être écrasés après la mise à niveau : {manually_modified_files}", - "migration_0027_not_enough_free_space": "L'espace libre est plutôt faible dans /var/ ! Vous devez disposer d'au moins 1 Go d'espace libre pour effectuer cette migration.", - "migration_0027_patch_yunohost_conflicts": "Application d'un correctif pour résoudre le problème de conflit …", - "migration_0027_patching_sources_list": "Correction du sources.lists …", + "migration_0027_not_enough_free_space": "L'espace libre est plutôt faible dans /var/ ! Vous devez disposer d'au moins 1 Go d'espace libre pour effectuer cette migration.", + "migration_0027_patch_yunohost_conflicts": "Application d'un correctif pour résoudre le problème de conflit…", + "migration_0027_patching_sources_list": "Correction du sources.lists…", "migration_0027_problematic_apps_warning": "Veuillez noter que des applications installées susceptibles de poser problème ont été détectées. Il semble qu'elles n'aient pas été installées à partir du catalogue d'applications de YunoHost, ou bien qu'elles ne soient pas marquées comme 'fonctionnelles'. Par conséquent, il ne peut pas être garanti qu'elles continueront à fonctionner après la mise à jour : {problematic_apps}", "migration_0027_start": "Commencement de la migration vers le Bullseye", "migration_0027_still_on_bullseye_after_main_upgrade": "Quelque chose s'est mal passé lors de la mise à jour du système, il semble que celui-ci soit toujours sous Debian Bullseye.", From 85239f74f68073957b521931e044e60866c59736 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 10 Jul 2024 23:17:39 +0000 Subject: [PATCH 093/218] Translated using Weblate (French) Currently translated at 100.0% (805 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/fr/ --- locales/fr.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/fr.json b/locales/fr.json index 026d5d1c0..92057c05a 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -800,8 +800,8 @@ "migration_0027_patch_yunohost_conflicts": "Application d'un correctif pour résoudre le problème de conflit…", "migration_0027_patching_sources_list": "Correction du sources.lists…", "migration_0027_problematic_apps_warning": "Veuillez noter que des applications installées susceptibles de poser problème ont été détectées. Il semble qu'elles n'aient pas été installées à partir du catalogue d'applications de YunoHost, ou bien qu'elles ne soient pas marquées comme 'fonctionnelles'. Par conséquent, il ne peut pas être garanti qu'elles continueront à fonctionner après la mise à jour : {problematic_apps}", - "migration_0027_start": "Commencement de la migration vers le Bullseye", + "migration_0027_start": "Démarrage de la migration vers Bookworm", "migration_0027_still_on_bullseye_after_main_upgrade": "Quelque chose s'est mal passé lors de la mise à jour du système, il semble que celui-ci soit toujours sous Debian Bullseye.", "migration_0027_system_not_fully_up_to_date": "Votre système n'est pas complètement à jour. Veuillez effectuer une mise à jour classique avant de procéder à la migration vers Bullseye.", - "migration_0027_yunohost_upgrade": "Démarrage de la mise à jour du cœur de YunoHost …" + "migration_0027_yunohost_upgrade": "Démarrage de la mise à jour du cœur de YunoHost…" } From 725b41d2a3884446d290f308feab022f9fb0232b Mon Sep 17 00:00:00 2001 From: Anonymous Date: Thu, 11 Jul 2024 08:55:34 +0000 Subject: [PATCH 094/218] Translated using Weblate (Catalan) Currently translated at 95.9% (772 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/ca/ --- locales/ca.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/ca.json b/locales/ca.json index 697b4555d..0de9a3449 100644 --- a/locales/ca.json +++ b/locales/ca.json @@ -782,4 +782,4 @@ "user_import_partial_failed": "L'operació d'importació dels usuaris ha fallat parcialment", "domain_dns_push_record_failed": "No s'ha pogut {action} el registre {type}/{name}: {error}", "registrar_infos": "Informació del registrador" -} \ No newline at end of file +} From eb012de1880cbb40fb1ec8488bea694e3710c507 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Thu, 11 Jul 2024 08:55:37 +0000 Subject: [PATCH 095/218] Translated using Weblate (Spanish) Currently translated at 97.1% (782 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/es/ --- locales/es.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/es.json b/locales/es.json index bd9a644c2..eb1f3bbe1 100644 --- a/locales/es.json +++ b/locales/es.json @@ -782,4 +782,4 @@ "dyndns_set_recovery_password_success": "¡Password de recuperación establecida!", "global_settings_setting_dns_exposure_help": "NB: Esto afecta únicamente a la configuración recomentada de DNS y en las pruebas de diagnóstico. No afecta a la configuración del sistema.", "global_settings_setting_ssh_port_help": "Un puerto menor a 1024 es preferible para evitar intentos de usurpación por servicios no administrativos en la máquina remota. También debe de evitar usar un puerto ya en uso, como el 80 o 443." -} \ No newline at end of file +} From 818fd78a3d30c10f86abfd695e35c6185b553a35 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Thu, 11 Jul 2024 08:55:38 +0000 Subject: [PATCH 096/218] Translated using Weblate (Basque) Currently translated at 97.1% (782 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/eu/ --- locales/eu.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/eu.json b/locales/eu.json index b95fcd1a9..2b84b0763 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -782,4 +782,4 @@ "dyndns_set_recovery_password_failed": "Berreskuratze-pasahitza ezartzeak huts egin du: {error}", "dyndns_set_recovery_password_success": "Berreskuratze-pasahitza ezarri da!", "global_settings_setting_ssh_port_help": "1024 baino ataka txikiago bat izan beharko litzateke, zerbitzu ez-administratzaileek urruneko makinan usurpazio-saiorik egin ez dezaten. Lehendik ere erabiltzen ari diren atakak ere ekidin beharko zenituzke, 80 edo 443 kasu." -} \ No newline at end of file +} From bf8271e383bc461165cb8ed989dfc190f8c830c0 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Thu, 11 Jul 2024 08:55:51 +0000 Subject: [PATCH 097/218] Translated using Weblate (Ukrainian) Currently translated at 90.1% (726 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/uk/ --- locales/uk.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/uk.json b/locales/uk.json index 04640d1b4..b93b15d5c 100644 --- a/locales/uk.json +++ b/locales/uk.json @@ -781,4 +781,4 @@ "dyndns_set_recovery_password_failed": "Не вдалося встановити пароль для відновлення: {error}", "dyndns_set_recovery_password_success": "Пароль для відновлення встановлено!", "log_dyndns_unsubscribe": "Скасувати підписку на субдомен YunoHost '{}'" -} \ No newline at end of file +} From d87fe9fb4c1a39bd7438606b78c9b6425c7cc588 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Thu, 11 Jul 2024 08:55:43 +0000 Subject: [PATCH 098/218] Translated using Weblate (Japanese) Currently translated at 65.3% (526 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/ja/ --- locales/ja.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/ja.json b/locales/ja.json index b8a781f04..1c2a77c6a 100644 --- a/locales/ja.json +++ b/locales/ja.json @@ -760,4 +760,4 @@ "yunohost_not_installed": "YunoHostが正しくインストールされていません。’yunohost tools postinstall’ を実行してください", "yunohost_postinstall_end_tip": "インストール後処理が完了しました!セットアップを完了するには、次の点を考慮してください。\n - ウェブ管理画面の'診断'セクション(またはコマンドラインで’yunohost diagnosis run’)を通じて潜在的な問題を診断します。\n - 管理ドキュメントの'セットアップの最終処理'と'YunoHostを知る'の部分を読む: https://yunohost.org/admindoc。", "additional_urls_already_removed": "アクセス許可 ‘{permission}’ に対する追加URLで ‘{url}’ は既に削除されています" -} \ No newline at end of file +} From 623bd151d6e9972d6c97362ce8c8b29f261c19d7 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Thu, 11 Jul 2024 14:56:16 +0000 Subject: [PATCH 099/218] Translated using Weblate (French) Currently translated at 100.0% (805 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/fr/ --- locales/fr.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locales/fr.json b/locales/fr.json index 92057c05a..8014d13f1 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -636,7 +636,7 @@ "migration_0021_modified_files": "Veuillez noter que les fichiers suivants ont été modifiés manuellement et pourraient être écrasés à la suite de la mise à niveau : {manually_modified_files}", "migration_0021_cleaning_up": "Nettoyage du cache et des paquets qui ne sont plus nécessaires…", "migration_0021_patch_yunohost_conflicts": "Application du correctif pour contourner le problème de conflit…", - "migration_0021_not_buster2": "La distribution Debian actuelle n'est pas Buster ! Si vous avez déjà effectué la migration Buster->Bullseye, alors cette erreur est symptomatique du fait que la migration n'a pas été terminée correctement à 100% (sinon YunoHost aurait marqué la migration comme terminée). Il est recommandé d'étudier ce qu'il s'est passé avec l'équipe de support, qui aura besoin du log **complet** de la migration, qui peut être retrouvé dans Outils > Journaux dans la webadmin.", + "migration_0021_not_buster2": "La distribution Debian actuelle n'est pas Buster ! Si vous avez déjà effectué la migration Buster -> Bullseye, alors cette erreur est symptomatique du fait que la migration n'a pas été terminée correctement à 100% (sinon YunoHost aurait marqué la migration comme terminée). Il est recommandé d'étudier ce qu'il s'est passé avec l'équipe de support, qui aura besoin du log **complet** de la migration, qui peut être retrouvé dans Outils > Journaux dans la webadmin.", "migration_description_0021_migrate_to_bullseye": "Mise à niveau du système vers Debian Bullseye et YunoHost 11.x", "domain_config_default_app": "Application par défaut", "migration_description_0022_php73_to_php74_pools": "Migration des fichiers de configuration php7.3-fpm 'pool' vers php7.4", @@ -791,16 +791,16 @@ "diagnosis_ignore_no_issue_found": "Aucun problème correspondant au critère donné n'a été trouvé.", "migration_description_0027_migrate_to_bookworm": "Mettre à jour le système vers Debian Bookworm et YunoHost 12", "migration_0027_delayed_api_restart": "L'API de YunoHost sera automatiquement redémarrée dans 15 secondes. Il se peut qu'elle soit indisponible pendant quelques secondes, après quoi vous devrez vous connecter à nouveau.", - "migration_0027_general_warning": "Veuillez noter que cette migration est une opération délicate. L'équipe de YunoHost a fait de son mieux pour l'examiner et la tester, mais la migration peut encore casser des parties du système ou de ses applications.\n\nPar conséquent, il est recommandé :\n - d'effectuer une sauvegarde de toutes les données ou applications critiques. Plus d'informations sur https://yunohost.org/backup ;\n - de faire preuve de patience après avoir lancé la migration : en fonction de votre connexion Internet et de votre matériel, la mise à niveau peut prendre plusieurs heures.", + "migration_0027_general_warning": "Veuillez noter que cette migration est une opération délicate. L'équipe de YunoHost a fait de son mieux pour l'examiner et la tester, mais la migration peut encore casser des parties du système ou de ses applications.\n\nPar conséquent, il est recommandé :\n - d'effectuer une sauvegarde de toutes les données ou applications critiques. Plus d'informations sur https://yunohost.org/backup ;\n - de faire preuve de patience après avoir lancé la migration : en fonction de votre connexion Internet et de votre matériel, la mise à niveau peut prendre quelques heures pour s'effectuer correctement.", "migration_0027_not_bullseye": "La distribution Debian actuelle n'est pas Bullseye ! Si vous avez déjà effectué la migration Bullseye -> Bookworm, cette erreur est symptomatique du fait que la procédure de migration n'a pas réussi à 100 % (sinon YunoHost l'aurait marquée comme terminée). Il est recommandé de chercher ce qui s'est passé avec l'équipe de support, qui aura besoin du journal **complet** de la migration, qui peut être trouvé dans Outils > Journaux dans la webadmin.", "migration_0027_cleaning_up": "Nettoyage du cache et des paquets qui ne sont plus utiles…", "migration_0027_main_upgrade": "Démarrage de la mise à niveau du système…", "migration_0027_modified_files": "Veuillez noter que les fichiers suivants ont été modifiés manuellement et pourraient être écrasés après la mise à niveau : {manually_modified_files}", "migration_0027_not_enough_free_space": "L'espace libre est plutôt faible dans /var/ ! Vous devez disposer d'au moins 1 Go d'espace libre pour effectuer cette migration.", "migration_0027_patch_yunohost_conflicts": "Application d'un correctif pour résoudre le problème de conflit…", - "migration_0027_patching_sources_list": "Correction du sources.lists…", + "migration_0027_patching_sources_list": "Correction du fichier sources.lists…", "migration_0027_problematic_apps_warning": "Veuillez noter que des applications installées susceptibles de poser problème ont été détectées. Il semble qu'elles n'aient pas été installées à partir du catalogue d'applications de YunoHost, ou bien qu'elles ne soient pas marquées comme 'fonctionnelles'. Par conséquent, il ne peut pas être garanti qu'elles continueront à fonctionner après la mise à jour : {problematic_apps}", - "migration_0027_start": "Démarrage de la migration vers Bookworm", + "migration_0027_start": "Démarrage de la migration vers Bookworm…", "migration_0027_still_on_bullseye_after_main_upgrade": "Quelque chose s'est mal passé lors de la mise à jour du système, il semble que celui-ci soit toujours sous Debian Bullseye.", "migration_0027_system_not_fully_up_to_date": "Votre système n'est pas complètement à jour. Veuillez effectuer une mise à jour classique avant de procéder à la migration vers Bullseye.", "migration_0027_yunohost_upgrade": "Démarrage de la mise à jour du cœur de YunoHost…" From 1e70577d23cdcaf3c029c923f08c36710faf1e67 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 11 Jul 2024 15:13:17 +0000 Subject: [PATCH 100/218] [CI] Reformat / remove stale translated strings --- locales/ca.json | 2 +- locales/de.json | 2 +- locales/en.json | 2 +- locales/es.json | 2 +- locales/eu.json | 2 +- locales/fr.json | 6 +++--- locales/gl.json | 2 +- locales/id.json | 2 +- locales/ja.json | 2 +- locales/uk.json | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/locales/ca.json b/locales/ca.json index 0de9a3449..697b4555d 100644 --- a/locales/ca.json +++ b/locales/ca.json @@ -782,4 +782,4 @@ "user_import_partial_failed": "L'operació d'importació dels usuaris ha fallat parcialment", "domain_dns_push_record_failed": "No s'ha pogut {action} el registre {type}/{name}: {error}", "registrar_infos": "Informació del registrador" -} +} \ No newline at end of file diff --git a/locales/de.json b/locales/de.json index 808a949c7..957bd7dc2 100644 --- a/locales/de.json +++ b/locales/de.json @@ -782,4 +782,4 @@ "dyndns_set_recovery_password_failed": "Konnte Wiederherstellungspasswort nicht einstellen: {error}", "dyndns_set_recovery_password_success": "Wiederherstellungspasswort eingestellt!", "global_settings_setting_ssh_port_help": "Ein Port unter 1024 wird bevorzugt, um Kaperversuche durch Nicht-Administratordienste auf dem Remote-Computer zu verhindern. Sie sollten auch vermeiden, einen bereits verwendeten Port zu verwenden, z. B. 80 oder 443." -} +} \ No newline at end of file diff --git a/locales/en.json b/locales/en.json index e69a1661e..ec871a649 100644 --- a/locales/en.json +++ b/locales/en.json @@ -598,7 +598,6 @@ "migration_0024_rebuild_python_venv_disclaimer_rebuild": "Rebuilding the virtualenv will be attempted for the following apps (NB: the operation may take some time!): {rebuild_apps}", "migration_0024_rebuild_python_venv_failed": "Failed to rebuild the Python virtualenv for {app}. The app may not work as long as this is not resolved. You should fix the situation by forcing the upgrade of this app using `yunohost app upgrade --force {app}`.", "migration_0024_rebuild_python_venv_in_progress": "Now attempting to rebuild the Python virtualenv for `{app}`", - "migration_description_0027_migrate_to_bookworm": "Upgrade the system to Debian Bookworm and YunoHost 12", "migration_0027_cleaning_up": "Cleaning up cache and packages not useful anymore…", "migration_0027_delayed_api_restart": "The YunoHost API will automatically be restarted in 15 seconds. It may be unavailable for a few seconds, and then you will have to login again.", "migration_0027_general_warning": "Please note that this migration is a delicate operation. The YunoHost team did its best to review and test it, but the migration might still break parts of the system or its apps.\n\nTherefore, it is recommended to:\n - Perform a backup of any critical data or app. More info on https://yunohost.org/backup;\n - Be patient after launching the migration: Depending on your Internet connection and hardware, it might take up to a few hours for everything to upgrade properly.", @@ -619,6 +618,7 @@ "migration_description_0024_rebuild_python_venv": "Repair Python app after bullseye migration", "migration_description_0025_global_settings_to_configpanel": "Migrate legacy global settings nomenclature to the new, modern nomenclature", "migration_description_0026_new_admins_group": "Migrate to the new 'multiple admins' system", + "migration_description_0027_migrate_to_bookworm": "Upgrade the system to Debian Bookworm and YunoHost 12", "migration_ldap_backup_before_migration": "Creating a backup of LDAP database and apps settings prior to the actual migration.", "migration_ldap_can_not_backup_before_migration": "The backup of the system could not be completed before the migration failed. Error: {error}", "migration_ldap_migration_failed_trying_to_rollback": "Could not migrate… trying to roll back the system.", diff --git a/locales/es.json b/locales/es.json index eb1f3bbe1..bd9a644c2 100644 --- a/locales/es.json +++ b/locales/es.json @@ -782,4 +782,4 @@ "dyndns_set_recovery_password_success": "¡Password de recuperación establecida!", "global_settings_setting_dns_exposure_help": "NB: Esto afecta únicamente a la configuración recomentada de DNS y en las pruebas de diagnóstico. No afecta a la configuración del sistema.", "global_settings_setting_ssh_port_help": "Un puerto menor a 1024 es preferible para evitar intentos de usurpación por servicios no administrativos en la máquina remota. También debe de evitar usar un puerto ya en uso, como el 80 o 443." -} +} \ No newline at end of file diff --git a/locales/eu.json b/locales/eu.json index 2b84b0763..b95fcd1a9 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -782,4 +782,4 @@ "dyndns_set_recovery_password_failed": "Berreskuratze-pasahitza ezartzeak huts egin du: {error}", "dyndns_set_recovery_password_success": "Berreskuratze-pasahitza ezarri da!", "global_settings_setting_ssh_port_help": "1024 baino ataka txikiago bat izan beharko litzateke, zerbitzu ez-administratzaileek urruneko makinan usurpazio-saiorik egin ez dezaten. Lehendik ere erabiltzen ari diren atakak ere ekidin beharko zenituzke, 80 edo 443 kasu." -} +} \ No newline at end of file diff --git a/locales/fr.json b/locales/fr.json index 8014d13f1..64b682998 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -792,11 +792,11 @@ "migration_description_0027_migrate_to_bookworm": "Mettre à jour le système vers Debian Bookworm et YunoHost 12", "migration_0027_delayed_api_restart": "L'API de YunoHost sera automatiquement redémarrée dans 15 secondes. Il se peut qu'elle soit indisponible pendant quelques secondes, après quoi vous devrez vous connecter à nouveau.", "migration_0027_general_warning": "Veuillez noter que cette migration est une opération délicate. L'équipe de YunoHost a fait de son mieux pour l'examiner et la tester, mais la migration peut encore casser des parties du système ou de ses applications.\n\nPar conséquent, il est recommandé :\n - d'effectuer une sauvegarde de toutes les données ou applications critiques. Plus d'informations sur https://yunohost.org/backup ;\n - de faire preuve de patience après avoir lancé la migration : en fonction de votre connexion Internet et de votre matériel, la mise à niveau peut prendre quelques heures pour s'effectuer correctement.", - "migration_0027_not_bullseye": "La distribution Debian actuelle n'est pas Bullseye ! Si vous avez déjà effectué la migration Bullseye -> Bookworm, cette erreur est symptomatique du fait que la procédure de migration n'a pas réussi à 100 % (sinon YunoHost l'aurait marquée comme terminée). Il est recommandé de chercher ce qui s'est passé avec l'équipe de support, qui aura besoin du journal **complet** de la migration, qui peut être trouvé dans Outils > Journaux dans la webadmin.", + "migration_0027_not_bullseye": "La distribution Debian actuelle n'est pas Bullseye ! Si vous avez déjà effectué la migration Bullseye -> Bookworm, cette erreur est symptomatique du fait que la procédure de migration n'a pas réussi à 100 % (sinon YunoHost l'aurait marquée comme terminée). Il est recommandé de chercher ce qui s'est passé avec l'équipe de support, qui aura besoin du journal **complet** de la migration, qui peut être trouvé dans Outils > Journaux dans la webadmin.", "migration_0027_cleaning_up": "Nettoyage du cache et des paquets qui ne sont plus utiles…", "migration_0027_main_upgrade": "Démarrage de la mise à niveau du système…", "migration_0027_modified_files": "Veuillez noter que les fichiers suivants ont été modifiés manuellement et pourraient être écrasés après la mise à niveau : {manually_modified_files}", - "migration_0027_not_enough_free_space": "L'espace libre est plutôt faible dans /var/ ! Vous devez disposer d'au moins 1 Go d'espace libre pour effectuer cette migration.", + "migration_0027_not_enough_free_space": "L'espace libre est plutôt faible dans /var/ ! Vous devez disposer d'au moins 1 Go d'espace libre pour effectuer cette migration.", "migration_0027_patch_yunohost_conflicts": "Application d'un correctif pour résoudre le problème de conflit…", "migration_0027_patching_sources_list": "Correction du fichier sources.lists…", "migration_0027_problematic_apps_warning": "Veuillez noter que des applications installées susceptibles de poser problème ont été détectées. Il semble qu'elles n'aient pas été installées à partir du catalogue d'applications de YunoHost, ou bien qu'elles ne soient pas marquées comme 'fonctionnelles'. Par conséquent, il ne peut pas être garanti qu'elles continueront à fonctionner après la mise à jour : {problematic_apps}", @@ -804,4 +804,4 @@ "migration_0027_still_on_bullseye_after_main_upgrade": "Quelque chose s'est mal passé lors de la mise à jour du système, il semble que celui-ci soit toujours sous Debian Bullseye.", "migration_0027_system_not_fully_up_to_date": "Votre système n'est pas complètement à jour. Veuillez effectuer une mise à jour classique avant de procéder à la migration vers Bullseye.", "migration_0027_yunohost_upgrade": "Démarrage de la mise à jour du cœur de YunoHost…" -} +} \ No newline at end of file diff --git a/locales/gl.json b/locales/gl.json index 45912c30d..3f18e652a 100644 --- a/locales/gl.json +++ b/locales/gl.json @@ -789,4 +789,4 @@ "diagnosis_ignore_no_issue_found": "Non se atoparon incidencias para o criterio establecido.", "diagnosis_ignore_filter_added": "Engadiuse o filtro do diagnóstico para {category}", "diagnosis_ignore_missing_criteria": "Deberías proporcionar cando menos un criterio que a categoría de diagnóstico omitirá" -} +} \ No newline at end of file diff --git a/locales/id.json b/locales/id.json index ec4be7621..6067545a0 100644 --- a/locales/id.json +++ b/locales/id.json @@ -452,4 +452,4 @@ "app_unsupported_remote_type": "Tidak mendukung type remot yang digunakan pada aplikasi", "app_not_upgraded_broken_system_continue": "Aplikasi '{failed_app}' telah gagal meningkatkan dan menyebabkan sistem dalam status rusak (jadi --continue-on-failure diabaikan), dan sebagai konsekuensi terhadap peningkatan aplikasi tersebut telah dibatalkan: {apps}", "apps_failed_to_upgrade_line": "\n * {app_id}(untuk melihat log yang berkaitan lakukan 'yunohost log show {operation_logger_name}')" -} +} \ No newline at end of file diff --git a/locales/ja.json b/locales/ja.json index 1c2a77c6a..b8a781f04 100644 --- a/locales/ja.json +++ b/locales/ja.json @@ -760,4 +760,4 @@ "yunohost_not_installed": "YunoHostが正しくインストールされていません。’yunohost tools postinstall’ を実行してください", "yunohost_postinstall_end_tip": "インストール後処理が完了しました!セットアップを完了するには、次の点を考慮してください。\n - ウェブ管理画面の'診断'セクション(またはコマンドラインで’yunohost diagnosis run’)を通じて潜在的な問題を診断します。\n - 管理ドキュメントの'セットアップの最終処理'と'YunoHostを知る'の部分を読む: https://yunohost.org/admindoc。", "additional_urls_already_removed": "アクセス許可 ‘{permission}’ に対する追加URLで ‘{url}’ は既に削除されています" -} +} \ No newline at end of file diff --git a/locales/uk.json b/locales/uk.json index b93b15d5c..04640d1b4 100644 --- a/locales/uk.json +++ b/locales/uk.json @@ -781,4 +781,4 @@ "dyndns_set_recovery_password_failed": "Не вдалося встановити пароль для відновлення: {error}", "dyndns_set_recovery_password_success": "Пароль для відновлення встановлено!", "log_dyndns_unsubscribe": "Скасувати підписку на субдомен YunoHost '{}'" -} +} \ No newline at end of file From 588742f31b78a0985e2c30dccff515b8249646d3 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 11 Jul 2024 17:35:37 +0200 Subject: [PATCH 101/218] log: optimize log list perf by creating a 'cache' symlink pointing to the log's parent --- src/log.py | 67 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 52 insertions(+), 15 deletions(-) diff --git a/src/log.py b/src/log.py index 341770a56..6abb8afa2 100755 --- a/src/log.py +++ b/src/log.py @@ -22,6 +22,7 @@ import re import yaml import glob import psutil +import time from typing import List from datetime import datetime, timedelta @@ -82,6 +83,39 @@ BORING_LOG_LINES = [ ] +def _update_log_parent_symlinks(): + + one_year_ago = (time.time() - 365 * 24 * 3600) + + logs = glob.iglob(OPERATIONS_PATH + "*" + METADATA_FILE_EXT) + for log_md in logs: + if os.path.getctime(log_md) < one_year_ago: + # Let's ignore files older than one year because hmpf reading a shitload of yml is not free + continue + + name = log_md[: -len(METADATA_FILE_EXT)] + parent_symlink = os.path.join(OPERATIONS_PATH, f".{name}.parent.yml") + if os.path.islink(parent_symlink): + continue + + try: + metadata = ( + read_yaml(log_md) or {} + ) # Making sure this is a dict and not None..? + except Exception as e: + # If we can't read the yaml for some reason, report an error and ignore this entry... + logger.error(m18n.n("log_corrupted_md_file", md_file=log_md, error=e)) + continue + + parent = metadata.get("parent") + parent = parent + METADATA_FILE_EXT if parent else "/dev/null" + try: + print(parent, parent_symlink) + os.symlink(parent, parent_symlink) + except Exception as e: + logger.warning(f"Failed to create symlink {parent_symlink} ? {e}") + + def log_list(limit=None, with_details=False, with_suboperations=False): """ List available logs @@ -98,30 +132,35 @@ def log_list(limit=None, with_details=False, with_suboperations=False): operations = {} - logs = [x for x in os.listdir(OPERATIONS_PATH) if x.endswith(METADATA_FILE_EXT)] + _update_log_parent_symlinks() + + one_year_ago = (time.time() - 365 * 24 * 3600) + logs = [x for x in os.listdir(OPERATIONS_PATH) if x.endswith(METADATA_FILE_EXT) and os.path.getctime(x) > one_year_ago] logs = list(reversed(sorted(logs))) + if not with_suboperations: + def parent_symlink_points_to_dev_null(log): + name = log[: -len(METADATA_FILE_EXT)] + parent_symlink = os.path.join(OPERATIONS_PATH, f".{name}.parent.yml") + return os.path.islink(parent_symlink) and os.path.realpath(parent_symlink) == "/dev/null" + + logs = [log for log in logs if parent_symlink_points_to_dev_null(log)] + if limit is not None: - if with_suboperations: - logs = logs[:limit] - else: - # If we displaying only parent, we are still gonna load up to limit * 5 logs - # because many of them are suboperations which are not gonna be kept - # Yet we still want to obtain ~limit number of logs - logs = logs[: limit * 5] + logs = logs[:limit] for log in logs: - base_filename = log[: -len(METADATA_FILE_EXT)] + name = log[: -len(METADATA_FILE_EXT)] md_path = os.path.join(OPERATIONS_PATH, log) entry = { - "name": base_filename, + "name": name, "path": md_path, - "description": _get_description_from_name(base_filename), + "description": _get_description_from_name(name), } try: - entry["started_at"] = _get_datetime_from_name(base_filename) + entry["started_at"] = _get_datetime_from_name(name) except ValueError: pass @@ -141,10 +180,8 @@ def log_list(limit=None, with_details=False, with_suboperations=False): if with_suboperations: entry["parent"] = metadata.get("parent") entry["suboperations"] = [] - elif metadata.get("parent") is not None: - continue - operations[base_filename] = entry + operations[name] = entry # When displaying suboperations, we build a tree-like structure where # "suboperations" is a list of suboperations (each of them may also have a list of From a0bc7926c4234698ea7056a06c895da2a30961dc Mon Sep 17 00:00:00 2001 From: alexAubin <4533074+alexAubin@users.noreply.github.com> Date: Fri, 12 Jul 2024 13:24:32 +0000 Subject: [PATCH 102/218] :art: Format Python code with Black --- src/log.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/log.py b/src/log.py index 6abb8afa2..1e116baf1 100755 --- a/src/log.py +++ b/src/log.py @@ -85,7 +85,7 @@ BORING_LOG_LINES = [ def _update_log_parent_symlinks(): - one_year_ago = (time.time() - 365 * 24 * 3600) + one_year_ago = time.time() - 365 * 24 * 3600 logs = glob.iglob(OPERATIONS_PATH + "*" + METADATA_FILE_EXT) for log_md in logs: @@ -134,15 +134,23 @@ def log_list(limit=None, with_details=False, with_suboperations=False): _update_log_parent_symlinks() - one_year_ago = (time.time() - 365 * 24 * 3600) - logs = [x for x in os.listdir(OPERATIONS_PATH) if x.endswith(METADATA_FILE_EXT) and os.path.getctime(x) > one_year_ago] + one_year_ago = time.time() - 365 * 24 * 3600 + logs = [ + x + for x in os.listdir(OPERATIONS_PATH) + if x.endswith(METADATA_FILE_EXT) and os.path.getctime(x) > one_year_ago + ] logs = list(reversed(sorted(logs))) if not with_suboperations: + def parent_symlink_points_to_dev_null(log): name = log[: -len(METADATA_FILE_EXT)] parent_symlink = os.path.join(OPERATIONS_PATH, f".{name}.parent.yml") - return os.path.islink(parent_symlink) and os.path.realpath(parent_symlink) == "/dev/null" + return ( + os.path.islink(parent_symlink) + and os.path.realpath(parent_symlink) == "/dev/null" + ) logs = [log for log in logs if parent_symlink_points_to_dev_null(log)] From d71d8fe7b3c5104873b8cf9b071beb351da4c2e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20M?= Date: Thu, 11 Jul 2024 16:19:14 +0000 Subject: [PATCH 103/218] Translated using Weblate (Galician) Currently translated at 100.0% (805 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/gl/ --- locales/gl.json | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/locales/gl.json b/locales/gl.json index 3f18e652a..7140a8620 100644 --- a/locales/gl.json +++ b/locales/gl.json @@ -664,7 +664,7 @@ "migration_0024_rebuild_python_venv_in_progress": "Intentando reconstruir o Python virtualenv para `{app}`", "migration_description_0024_rebuild_python_venv": "Reparar app Python após a migración a bullseye", "migration_0024_rebuild_python_venv_failed": "Fallou a reconstrución de Python virtualenv para {app}. A app podería non funcionar mentras non se resolve. Deberías intentar arranxar a situación forzando a actualización desta app usando `yunohost app upgrade --force {app}`.", - "migration_0021_not_buster2": "A distribución actual Debian non é Buster! Se xa realizaches a migración Buster->Bullseye entón este erro indica que o proceso de migración non se realizou de xeito correcto ao 100% (se non YunoHost debería telo marcado como completado). É recomendable comprobar xunto co equipo de axuda o que aconteceu, necesitarán o rexistro **completo** da `migración`, que podes atopar na webadmin en Ferramentas > Rexistros.", + "migration_0021_not_buster2": "A distribución actual Debian non é Buster! Se xa realizaches a migración Buster -> Bullseye entón este erro indica que o proceso de migración non se realizou de xeito correcto ao 100% (se non YunoHost debería telo marcado como completado). É recomendable comprobar xunto co equipo de axuda o que aconteceu, necesitarán o rexistro **completo** da migración, que podes atopar na webadmin en Ferramentas > Rexistros.", "global_settings_setting_admin_strength_help": "Estos requerimentos só se esixen ao inicializar ou cambiar o contrasinal", "global_settings_setting_root_access_explain": "En sistemas Linux, 'root' é a administradora absoluta. No contexto YunoHost, o acceso SSH de 'root' está desactivado por defecto - excepto na rede local do servidor. Os compoñentes do grupo 'admins' poden utilizar o comando sudo para actuar como root desde a liña de comandos. É conveniente ter un contrasinal (forte) para root para xestionar o sistema por se as persoas administradoras perden o acceso por algún motivo.", "migration_description_0025_global_settings_to_configpanel": "Migrar o nome antigo dos axustes globais aos novos nomes modernos", @@ -788,5 +788,20 @@ "diagnosis_ignore_no_filter_found": "(Non hai tal filtro do diagnóstico de {category} con este criterio a eliminar)", "diagnosis_ignore_no_issue_found": "Non se atoparon incidencias para o criterio establecido.", "diagnosis_ignore_filter_added": "Engadiuse o filtro do diagnóstico para {category}", - "diagnosis_ignore_missing_criteria": "Deberías proporcionar cando menos un criterio que a categoría de diagnóstico omitirá" -} \ No newline at end of file + "diagnosis_ignore_missing_criteria": "Deberías proporcionar cando menos un criterio que a categoría de diagnóstico omitirá", + "migration_0027_start": "A iniciar a migración a Bookworm…", + "migration_0027_still_on_bullseye_after_main_upgrade": "Algo fallou durante a actualización principal, o sistema parece que aínda está en Debian Bullseye.", + "migration_0027_patching_sources_list": "A configurar o ficheiro sources.list…", + "migration_0027_general_warning": "Ten en conta que a migración é unha operación comprometida. O equipo de YunoHost intentou deseñala o mellor posible e probala, aínda así a migración podería estragar partes do sistema ou as aplicacións.\n\nAsí, é recomendable:\n - Facer unha copia de apoio dos datos críticos ou aplicacións. Máis info en https://yunohost.org/backup;\n - Ter pacencia unha vez iniciada a migración: en función da túa conexión a Internet e hardware podería levarlle varias horas completar todo o procedemento.", + "migration_0027_yunohost_upgrade": "A iniciar a actualización do núcleo de YunoHost…", + "migration_0027_not_bullseye": "A distribución Debian actual non é Bullseye! Se xa realizaches a migración Bullseye -> Bookworm este erro é síntoma de que o procedemento de migración non foi exitoso ao 100% (doutro xeito YunoHost teríao marcado como completado). É recomendable que investigues o que aconteceu, informando ao equipo de axuda que precisará o rexistro **completo** da migración, pódelo atopar na web de administración en Ferramentas -> Rexistros.", + "migration_0027_problematic_apps_warning": "Ten en conta que se atoparon as seguintes apps que poderían ser problemáticas. Semella que non foron instaladas desde o catálogo de aplicacións de YunoHost, ou non están marcadas como que 'funcionan'. Como consecuencia non podemos garantir que seguirán funcionando ben unha vez conclúa a migración: {problematic_apps}", + "migration_description_0027_migrate_to_bookworm": "Actualiza o sistema a Debian Bookworm e YunoHost 12", + "migration_0027_cleaning_up": "Limpando a caché e os paquetes que xa non son necesarios…", + "migration_0027_delayed_api_restart": "A API de YunoHost vaise reiniciar automaticamente en 15 segundos. Durante uns segundos non poderás usala, e despois terás que iniciar sesión outra vez.", + "migration_0027_main_upgrade": "A iniciar a actualización principal…", + "migration_0027_modified_files": "Detectamos que os seguintes ficheiros semella foron modificados manualmente e poderían ser sobreescritos durante a actualización: {manually_modified_files}", + "migration_0027_not_enough_free_space": "Hai moi pouco espazo en /var/! Deberías ter polo menos 1GB libre para realizar a migración.", + "migration_0027_patch_yunohost_conflicts": "Aplicando a solución para resolver o problema conflictivo…", + "migration_0027_system_not_fully_up_to_date": "O teu sistema non está totalmente actualizado. Fai unha actualización corrente antes de iniciar a migración a Bullseye." +} From 0907411efc078370cf2b29c330b01684ca28d8df Mon Sep 17 00:00:00 2001 From: cjdw Date: Mon, 15 Jul 2024 13:31:39 +0000 Subject: [PATCH 104/218] Translated using Weblate (Indonesian) Currently translated at 53.0% (427 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/locales/id.json b/locales/id.json index 6067545a0..9036b12f7 100644 --- a/locales/id.json +++ b/locales/id.json @@ -39,7 +39,7 @@ "app_manifest_install_ask_password": "Pilih kata sandi administrasi untuk aplikasi ini", "app_upgrade_several_apps": "Aplikasi berikut akan diperbarui: {apps}", "backup_app_failed": "Tidak dapat mencadangkan {app}", - "backup_archive_name_exists": "Arsip cadangan dengan nama ini sudah ada.", + "backup_archive_name_exists": "Arsip cadangan dengan nama '{name}' ini sudah ada.", "backup_created": "Cadangan dibuat: {name}", "backup_creation_failed": "Tidak dapat membuat arsip cadangan", "backup_delete_error": "Tidak dapat menghapus '{path}'", @@ -70,18 +70,18 @@ "app_not_enough_ram": "Aplikasi ini memerlukan {required} RAM untuk pemasangan/pembaruan, tapi sekarang hanya tersedia {current} saja.", "app_packaging_format_not_supported": "Aplikasi ini tidak dapat dipasang karena format pengemasan tidak didukung oleh YunoHost versi Anda. Anda sebaiknya memperbarui sistem Anda.", "ask_admin_username": "Nama pengguna admin", - "backup_archive_broken_link": "Tidak dapat mengakses arsip cadangan (tautan rusak untuk {path})", + "backup_archive_broken_link": "Tidak dapat mengakses arsip cadangan (tautan rusak pada {path})", "backup_archive_open_failed": "Tidak dapat membuka arsip cadangan", "certmanager_cert_install_success_selfsigned": "Sertifikat ditandai sendiri sekarang terpasang untuk '{domain}'", "certmanager_cert_renew_failed": "Pembaruan ulang sertifikat Let's Encrypt gagal untuk {domains}", "certmanager_cert_renew_success": "Sertifikat Let's Encrypt diperbarui untuk domain '{domain}'", - "diagnosis_apps_allgood": "Semua aplikasi yang dipasang mengikuti panduan penyusunan yang baik", + "diagnosis_apps_allgood": "Semua aplikasi yang dipasang mengikuti panduan pemaketan yang baik", "diagnosis_basesystem_kernel": "Peladen memakai kernel Linux {kernel_version}", "diagnosis_cache_still_valid": "(Tembolok masih valid untuk diagnosis {category}. Belum akan didiagnosis ulang!)", "diagnosis_description_dnsrecords": "Rekaman DNS", "diagnosis_description_ip": "Konektivitas internet", "diagnosis_description_web": "Web", - "diagnosis_domain_expiration_error": "Beberapa domain akan kedaluwarsa SEGERA!", + "diagnosis_domain_expiration_error": "Beberapa domain akan SEGERA kedaluwarsa!", "diagnosis_domain_expiration_not_found_details": "Informasi WHOIS untuk domain {domain} sepertinya tidak mengandung informasi tentang tanggal kedaluwarsa?", "diagnosis_domain_expiration_warning": "Beberapa domain akan kedaluwarsa!", "diagnosis_domain_expires_in": "{domain} kedaluwarsa dalam {days} hari.", @@ -147,10 +147,10 @@ "app_already_installed_cant_change_url": "Aplikasi ini sudah terpasang. URL tidak dapat diubah hanya dengan ini. Periksa `app changeurl` jika tersedia.", "app_requirements_checking": "Memeriksa persyaratan pada {app}…", "backup_create_size_estimation": "Arsip ini akan mengandung data dengan ukuran {size}.", - "certmanager_certificate_fetching_or_enabling_failed": "Mencoba untuk menggunakan sertifikat baru untuk {domain} tidak bisa…", + "certmanager_certificate_fetching_or_enabling_failed": "Mencoba sertifikat baru pada {domain} tidak dapat digunakan…", "certmanager_no_cert_file": "Tidak dapat membuka berkas sertifikat untuk domain {domain} (berkas: {file})", "diagnosis_basesystem_hardware": "Arsitektur perangkat keras peladen adalah {virt} {arch}", - "diagnosis_basesystem_ynh_inconsistent_versions": "Anda menjalankan versi paket YunoHost yang tidak konsisten… sepertinya karena pembaruan yang gagal.", + "diagnosis_basesystem_ynh_inconsistent_versions": "Anda menjalankan versi paket YunoHost yang tidak konsisten… sepertinya karena kegagalan atau sebagian pembaruan.", "diagnosis_basesystem_ynh_single_version": "versi {package}: {version} ({repo})", "diagnosis_description_services": "Status layanan", "diagnosis_description_systemresources": "Sumber daya sistem", @@ -220,7 +220,7 @@ "upgrade_complete": "Pembaruan selesai", "upgrading_packages": "Memperbarui paket…", "diagnosis_description_apps": "Aplikasi", - "diagnosis_description_basesystem": "Basis sistem", + "diagnosis_description_basesystem": "Sistem basis", "global_settings_setting_pop3_enabled_help": "Aktifkan protokol POP3 untuk peladen surel", "password_confirmation_not_the_same": "Kata sandi dan untuk konfirmasinya tidak sama", "restore_complete": "Pemulihan selesai", @@ -234,7 +234,7 @@ "app_sources_fetch_failed": "Tidak dapat mengambil berkas sumber, apakah URL-nya benar?", "installation_complete": "Pemasangan selesai", "app_arch_not_supported": "Aplikasi ini hanya bisa dipasang pada arsitektur {required}, tapi arsitektur peladen Anda adalah {current}", - "diagnosis_basesystem_hardware_model": "Model peladen adalah {model}", + "diagnosis_basesystem_hardware_model": "Model server adalah {model}", "app_yunohost_version_not_supported": "Aplikasi ini memerlukan YunoHost >= {required}, tapi versi yang terpasang adalah {current}", "ask_new_path": "Jalur baru", "backup_cleaning_failed": "Tidak dapat menghapus folder cadangan sementara", @@ -252,7 +252,7 @@ "config_validate_email": "Harus surel yang valid", "config_apply_failed": "Gagal menerapkan konfigurasi baru: {error}", "diagnosis_basesystem_ynh_main_version": "Peladen memakai YunoHost {main_version} ({repo})", - "diagnosis_cant_run_because_of_dep": "Tidak dapat menjalankan diagnosis untuk {category} ketika ada masalah utama yang terkait dengan {dep}.", + "diagnosis_cant_run_because_of_dep": "Tidak dapat menjalankan diagnosis pada {category} ketika ada masalah utama yang terkait dengan {dep}.", "diagnosis_services_conf_broken": "Konfigurasi rusak untuk layanan {service}!", "diagnosis_services_running": "Layanan {service} berjalan!", "diagnosis_swap_ok": "Sistem ini memiliki {total} swap!", @@ -296,7 +296,7 @@ "upnp_disabled": "UPnP dimatikan", "global_settings_setting_smtp_allow_ipv6_help": "Perbolehkan penggunaan IPv6 untuk menerima dan mengirim surel", "domain_config_default_app": "Aplikasi baku", - "diagnosis_diskusage_verylow": "Penyimpanan {mountpoint} (di perangkat {device}) hanya tinggal memiliki {free} ({free_percent}%) ruang kosong yang tersedia (dari {total}). Direkomendasikan untuk membersihkan ruang penyimpanan!", + "diagnosis_diskusage_verylow": "Penyimpanan {mountpoint} (di perangkat {device}) hanya memiliki {free} ({free_percent}%) ruang kosong yang tersedia (dari {total}). Sebaiknya Anda mempertimbangkan untuk membersihkan ruang penyimpanan!", "domain_config_api_protocol": "Protokol API", "domain_config_cert_summary_letsencrypt": "Bagus! Anda menggunakan sertifikat Let's Encrypt yang valid!", "domain_config_mail_out": "Surel keluar", @@ -329,7 +329,7 @@ "permission_require_account": "Izin {permission} hanya masuk akal untuk pengguna yang memiliki akun, maka ini tidak dapat diaktifkan untuk pengunjung.", "permission_update_failed": "Tidak dapat memperbarui izin '{permission}': {error}", "apps_failed_to_upgrade": "Aplikasi berikut gagal untuk diperbarui:{apps}", - "backup_archive_name_unknown": "Arsip cadangan lokal tidak diketahui yang bernama '{name}'", + "backup_archive_name_unknown": "Arsip cadangan lokal dengan nama '{name}' tidak diketahui", "diagnosis_http_nginx_conf_not_up_to_date_details": "Untuk memperbaiki ini, periksa perbedaannya dari CLI menggunakan yunohost tools regen-conf nginx --dry-run --with-diff dan jika Anda sudah, terapkan perubahannya menggunakan yunohost tools regen-conf nginx --force.", "domain_config_auth_token": "Token autentikasi", "domain_config_cert_install": "Pasang sertifikat Let's Encrypt", @@ -351,7 +351,7 @@ "regenconf_now_managed_by_yunohost": "Berkas konfigurasi '{conf}' sekarang dikelola oleh YunoHost (kategori {category}).", "regenconf_updated": "Konfigurasi diperbarui untuk '{category}'", "log_user_group_delete": "Menghapus kelompok '{}'", - "backup_archive_cant_retrieve_info_json": "Tidak dapat memuat info untuk arsip '{archive}'… Berkas info.json tidak dapat didapakan (atau bukan json yang valid).", + "backup_archive_cant_retrieve_info_json": "Tidak dapat memuat info pada arsip '{archive}'… Berkas info.json tidak dapat dipulihkan (atau bukan json yang valid).", "diagnosis_mail_blacklist_reason": "Alasan pendaftarhitaman adalah: {reason}", "diagnosis_ports_unreachable": "Porta {port} tidak tercapai dari luar.", "diagnosis_ram_verylow": "Sistem hanya memiliki {available} ({available_percent}%) RAM yang tersedia! (dari {total})", @@ -366,7 +366,7 @@ "log_permission_create": "Membuat izin '{}'", "log_permission_delete": "Menghapus izin '{}'", "backup_with_no_backup_script_for_app": "Aplikasi '{app}' tidak memiliki skrip pencadangan. Mengabaikan.", - "backup_system_part_failed": "Tidak dapat mencadangkan bagian '{part}' sistem", + "backup_system_part_failed": "Tidak dapat mencadangkan bagian sistem '{part}'", "log_user_create": "Menambahkan pengguna '{}'", "log_user_delete": "Menghapus pengguna '{}'", "log_user_group_create": "Membuat kelompok '{}'", @@ -377,7 +377,7 @@ "diagnosis_dns_point_to_doc": "Silakan periksa dokumentasi di https://yunohost.org/dns_config jika Anda masih membutuhkan bantuan untuk mengatur rekaman DNS.", "diagnosis_regenconf_manually_modified": "Berkas konfigurasi {file} sepertinya telah diubah manual.", "backup_with_no_restore_script_for_app": "{app} tidak memiliki skrip pemulihan, Anda tidak akan bisa secara otomatis memulihkan cadangan aplikasi ini.", - "config_no_panel": "Tidak dapat menemukan panel konfigurasi.", + "config_no_panel": "Panel konfigurasi tidak ditemukan.", "confirm_app_install_warning": "Peringatan: Aplikasi ini mungkin masih bisa bekerja, tapi tidak terintegrasi dengan baik dengan YunoHost. Beberapa fitur seperti SSO dan pencadangan mungkin tidak tersedia. Tetap pasang? [{answers}] ", "diagnosis_ports_ok": "Porta {port} tercapai dari luar.", "diagnosis_ports_partially_unreachable": "Porta {port} tidak tercapai dari luar lewat IPv{failed}.", @@ -452,4 +452,4 @@ "app_unsupported_remote_type": "Tidak mendukung type remot yang digunakan pada aplikasi", "app_not_upgraded_broken_system_continue": "Aplikasi '{failed_app}' telah gagal meningkatkan dan menyebabkan sistem dalam status rusak (jadi --continue-on-failure diabaikan), dan sebagai konsekuensi terhadap peningkatan aplikasi tersebut telah dibatalkan: {apps}", "apps_failed_to_upgrade_line": "\n * {app_id}(untuk melihat log yang berkaitan lakukan 'yunohost log show {operation_logger_name}')" -} \ No newline at end of file +} From 771a4b34469c39a6516afea37e807b799f5c90b8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Jul 2024 16:31:44 +0200 Subject: [PATCH 105/218] Update changelog for 11.2.21 --- debian/changelog | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/debian/changelog b/debian/changelog index 0d2b68cd5..368befdff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +yunohost (11.2.21) stable; urgency=low + + - log: optimize log list perf by creating a 'cache' symlink pointing to the log's parent ([#1907](http://github.com/YunoHost/yunohost/pull/1907)) + - log: small hack when dumping log right after script failure, prevent a weird edge case where it'll dump the log of the resource provisioning instead of the script (1bb81e8f) + - debian: Bullseye->Bookworm migration ('hidden' but easier to test) ([#1759](http://github.com/YunoHost/yunohost/pull/1759), ab8e0e66, e54e99bf) + - helpers/apt: rely on simpler dpkg-deb --build rather than equivs to create .deb for app virtual dependencies (f6fbd69c, 8be726b9) + - helpers/apt: Support apt repositories with [trusted=yes] ([#1903](http://github.com/YunoHost/yunohost/pull/1903)) + - backups: one should be able to restore a backup archive by providing a path to the archive without moving it to /home/yunohost.backup/archives/ (c8a18129, b266e398) + - backups: yunohost should not ask confirmation that 'YunoHost is already installed' when restoring only apps (9c22d36c) + - i18n: translate _diagnosis_ignore function ([#1894](http://github.com/YunoHost/yunohost/pull/1894)) + - i18n: Translations updated for Basque, Catalan, French, Galician, German, Indonesian, Japanese, Russian, Spanish, Ukrainian + + Thanks to all contributors <3 ! (alexAubin, Anonymous, cjdw, Félix Piédallu, Ivan Davydov, José M, Kayou, OniriCorpe, ppr, Zwiebel) + + -- Alexandre Aubin Mon, 15 Jul 2024 16:22:26 +0200 + yunohost (11.2.20.2) stable; urgency=low - Fix service enable/disable auto-ignoring diagnosis entries ([#1886](http://github.com/YunoHost/yunohost/pull/1886)) From bb20020c5a58f79258777b5be0def44b20eb5bfd Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Jul 2024 22:13:20 +0200 Subject: [PATCH 106/218] helpers2.1: forgot to patch ynh_remove_fpm_config -> ynh_config_remove_phpfpm --- helpers/helpers.v2.1.d/apt | 2 +- helpers/helpers.v2.1.d/logrotate | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/helpers.v2.1.d/apt b/helpers/helpers.v2.1.d/apt index b03daac88..4999f179c 100644 --- a/helpers/helpers.v2.1.d/apt +++ b/helpers/helpers.v2.1.d/apt @@ -54,7 +54,7 @@ ynh_apt_install_dependencies() { if [[ -f "/etc/php/$php_version/fpm/pool.d/$app.conf" ]] then ynh_backup_if_checksum_is_different "/etc/php/$php_version/fpm/pool.d/$app.conf" - ynh_remove_fpm_config + ynh_config_remove_phpfpm fi fi # Store php_version into the config of this app diff --git a/helpers/helpers.v2.1.d/logrotate b/helpers/helpers.v2.1.d/logrotate index 4f2d063b1..e431841c5 100644 --- a/helpers/helpers.v2.1.d/logrotate +++ b/helpers/helpers.v2.1.d/logrotate @@ -67,7 +67,7 @@ EOF # Remove the app's logrotate config. # -# usage: ynh_remove_logrotate +# usage:ynh_config_remove_logrotate ynh_config_remove_logrotate() { if [ -e "/etc/logrotate.d/$app" ]; then rm "/etc/logrotate.d/$app" From 22201863a18e6c79c0401454fdb3805ee7435403 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Jul 2024 22:14:32 +0200 Subject: [PATCH 107/218] Update changelog for 11.2.21.1 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 368befdff..adbd070af 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +yunohost (11.2.21.1) stable; urgency=low + + - helpers2.1: forgot to patch ynh_remove_fpm_config -> ynh_config_remove_phpfpm (bb20020c) + + -- Alexandre Aubin Mon, 15 Jul 2024 22:13:39 +0200 + yunohost (11.2.21) stable; urgency=low - log: optimize log list perf by creating a 'cache' symlink pointing to the log's parent ([#1907](http://github.com/YunoHost/yunohost/pull/1907)) From 64c8d9e853e89a7469faa78b73021a6af0c41bb6 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Jul 2024 22:29:30 +0200 Subject: [PATCH 108/218] bullseye->bookworm migration: tweak message to reflect the fact that metronome and rspamd will be applications starting with bookworm --- src/migrations/0027_migrate_to_bookworm.py.disabled | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index 17b252871..d61ca2d3e 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -356,7 +356,7 @@ class MyMigration(Migration): "N.B.: This migration has been tested by the community over the last few months but has only been declared stable recently. If your server hosts critical services and if you are not too confident with debugging possible issues, we recommend you to wait a little bit more while we gather more feedback and polish things up. If on the other hand you are relatively confident with debugging small issues that may arise, you are encouraged to run this migration ;)! You can read about remaining known issues and feedback from the community here: https://forum.yunohost.org/t/?? FIXME ?? \n\n" + message + "\n\n" - + "Packages 'metronome' (xmpp server) and 'rspamd' (mail antispam) are now optional dependencies and may get uninstalled during the upgrade. Make sure to explicitly re-install those using 'apt install' after the upgrade if you care about those!" + + "Packages 'metronome' (xmpp server) and 'rspamd' (mail antispam) are now separate applications available in the catalog, and will be uninstalled during the upgrade. Make sure to explicitly install the corresponding new apps after the upgrade if you care about those!" ) if problematic_apps: From 8a65053a59bc452206343e9578a554e8b8042055 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Jul 2024 23:06:05 +0200 Subject: [PATCH 109/218] helpers/apt: zzzz did this break everything? --- helpers/helpers.v1.d/apt | 1 + 1 file changed, 1 insertion(+) diff --git a/helpers/helpers.v1.d/apt b/helpers/helpers.v1.d/apt index 522c0381d..a9aca8d93 100644 --- a/helpers/helpers.v1.d/apt +++ b/helpers/helpers.v1.d/apt @@ -580,6 +580,7 @@ ynh_add_repo() { ynh_handle_getopts_args "$@" name="${name:-$app}" append=${append:-0} + trusted=${trusted:-0} if [ $append -eq 1 ]; then append="tee --append" From 14312a9ec4a584352a7ab0f5e2ab658ade6f890c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Jul 2024 23:07:42 +0200 Subject: [PATCH 110/218] Update changelog for 11.2.21.2 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index adbd070af..f7840751c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +yunohost (11.2.21.2) stable; urgency=low + + - bullseye->bookworm migration: tweak message to reflect the fact that metronome and rspamd will be applications starting with bookworm (64c8d9e8) + - helpers/apt: unbound variable (8a65053a) + + -- Alexandre Aubin Mon, 15 Jul 2024 23:07:08 +0200 + yunohost (11.2.21.1) stable; urgency=low - helpers2.1: forgot to patch ynh_remove_fpm_config -> ynh_config_remove_phpfpm (bb20020c) From 73e0d6c271e60fc609126f3c1e672bf4ad421a70 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 16 Jul 2024 23:26:35 +0200 Subject: [PATCH 111/218] remove pkg_resources from pip freeze --- src/migrations/0027_migrate_to_bookworm.py.disabled | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index d61ca2d3e..637b237f8 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -74,8 +74,9 @@ def _backup_pip_freeze_for_python_app_venvs(): venvs = _get_all_venvs("/opt/") + _get_all_venvs("/var/www/") for venv in venvs: # Generate a requirements file from venv + # Remove pkg resources from the freeze to avoid an error during the python venv https://stackoverflow.com/a/40167445 os.system( - f"{venv}/bin/pip freeze > {venv}{VENV_REQUIREMENTS_SUFFIX} 2>/dev/null" + f"{venv}/bin/pip freeze | grep -E -v 'pkg(-|_)resources==' > {venv}{VENV_REQUIREMENTS_SUFFIX} 2>/dev/null" ) From 4232fc7c4b44f600b0f0d148cb5ac6e231f55d5b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 17 Jul 2024 15:04:52 +0200 Subject: [PATCH 112/218] bullseye->bookworm: explicitly install yunohost-portal --- src/migrations/0027_migrate_to_bookworm.py.disabled | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index 637b237f8..0f56b6f46 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -221,7 +221,7 @@ class MyMigration(Migration): aptitude_with_progress_bar(f"unhold yunohost moulinette ssowat yunohost-admin {' '.join(apps_packages)}") # FIXME : find a way to simulate and validate the upgrade first - aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin moulinette ssowat -o Dpkg::Options::='--force-confold'") + aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin yunohost-portal moulinette ssowat -o Dpkg::Options::='--force-confold'") #cmd = "LC_ALL=C" #cmd += " DEBIAN_FRONTEND=noninteractive" From 079cdc2624683051a05203f21be9b9069cbbfd79 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 17 Jul 2024 15:06:05 +0200 Subject: [PATCH 113/218] bullseye->bookworm: explicitly remove python3.9 and python3.9-venv which seems to confuse aptitude... --- src/migrations/0027_migrate_to_bookworm.py.disabled | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index 0f56b6f46..3ecc97b3b 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -221,7 +221,7 @@ class MyMigration(Migration): aptitude_with_progress_bar(f"unhold yunohost moulinette ssowat yunohost-admin {' '.join(apps_packages)}") # FIXME : find a way to simulate and validate the upgrade first - aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin yunohost-portal moulinette ssowat -o Dpkg::Options::='--force-confold'") + aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin yunohost-portal moulinette ssowat python3.9- python3.9-venv- -o Dpkg::Options::='--force-confold'") #cmd = "LC_ALL=C" #cmd += " DEBIAN_FRONTEND=noninteractive" From a5868733d7e0b4c278bc957623932fd77d50c472 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 17 Jul 2024 15:18:46 +0200 Subject: [PATCH 114/218] bullseye->bookworm: uncessary comments / FIXME --- .../0027_migrate_to_bookworm.py.disabled | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index 3ecc97b3b..b2289ed6c 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -185,7 +185,6 @@ class MyMigration(Migration): aptitude_with_progress_bar("upgrade cron rspamd- libluajit-5.1-2- --show-why -o APT::Force-LoopBreak=1 -o Dpkg::Options::='--force-confold'") - # FIXME : find a way to simulate and validate the upgrade first aptitude_with_progress_bar("full-upgrade --show-why -o Dpkg::Options::='--force-confold'") # Force regenconf of nsswitch because for some reason @@ -220,28 +219,8 @@ class MyMigration(Migration): aptitude_with_progress_bar(f"unhold yunohost moulinette ssowat yunohost-admin {' '.join(apps_packages)}") - # FIXME : find a way to simulate and validate the upgrade first aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin yunohost-portal moulinette ssowat python3.9- python3.9-venv- -o Dpkg::Options::='--force-confold'") - #cmd = "LC_ALL=C" - #cmd += " DEBIAN_FRONTEND=noninteractive" - #cmd += " APT_LISTCHANGES_FRONTEND=none" - #cmd += " apt dist-upgrade " - #cmd += " --quiet -o=Dpkg::Use-Pty=0 --fix-broken --dry-run" - #cmd += " | grep -q 'ynh-deps'" - - #logger.info("Simulating upgrade...") - #if os.system(cmd) == 0: - # raise YunohostError( - # "The upgrade cannot be completed, because some app dependencies would need to be removed?", - # raw_msg=True, - # ) - - # FIXME : - #postupgradecmds = "rm -f /usr/sbin/policy-rc.d\n" - #postupgradecmds += "echo 'Restarting nginx...' >&2\n" - #postupgradecmds += "systemctl restart nginx\n" - # If running from the webadmin, restart the API after a delay if Moulinette.interface.type == "api": logger.warning(m18n.n("migration_0027_delayed_api_restart")) From a8fd6afeee7efc89af286921a0bebc7f76cc8110 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 17 Jul 2024 15:24:04 +0200 Subject: [PATCH 115/218] bullseye->bookworm: try the yunohost upgrade without unholding the app-ynh-deps virtual packages, then after unholding if it didnt work for some reason --- src/migrations/0027_migrate_to_bookworm.py.disabled | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index b2289ed6c..0416e8f05 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -216,10 +216,19 @@ class MyMigration(Migration): # Yunohost upgrade # logger.info(m18n.n("migration_0027_yunohost_upgrade")) - aptitude_with_progress_bar(f"unhold yunohost moulinette ssowat yunohost-admin {' '.join(apps_packages)}") - aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin yunohost-portal moulinette ssowat python3.9- python3.9-venv- -o Dpkg::Options::='--force-confold'") + try: + aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin yunohost-portal moulinette ssowat python3.9- python3.9-venv- -o Dpkg::Options::='--force-confold'") + except Exception as e: + # Retry after unholding the app packages, maybe it can unlock the situation idk + if apps_packages: + aptitude_with_progress_bar(f"unhold {' '.join(apps_packages)}") + aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin yunohost-portal moulinette ssowat python3.9- python3.9-venv- -o Dpkg::Options::='--force-confold'") + else: + # If the upgrade was sucessful, we want to unhold the apps packages + if apps_packages: + aptitude_with_progress_bar(f"unhold {' '.join(apps_packages)}") # If running from the webadmin, restart the API after a delay if Moulinette.interface.type == "api": From ca59886303275e155b427fc3de9ba4d69f8dbdb3 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 17 Jul 2024 15:28:01 +0200 Subject: [PATCH 116/218] bullseye->bookworm: fix typo in message --- locales/en.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/en.json b/locales/en.json index ec871a649..b10293434 100644 --- a/locales/en.json +++ b/locales/en.json @@ -610,7 +610,7 @@ "migration_0027_problematic_apps_warning": "Please note that the following possibly problematic installed apps were detected. It looks like those were not installed from the YunoHost app catalog, or are not flagged as 'working'. Consequently, it cannot be guaranteed that they will still work after the upgrade: {problematic_apps}", "migration_0027_start": "Starting migration to Bookworm…", "migration_0027_still_on_bullseye_after_main_upgrade": "Something went wrong during the main upgrade, the system appears to still be on Debian Bullseye.", - "migration_0027_system_not_fully_up_to_date": "Your system is not fully up-to-date. Please perform a regular upgrade before running the migration to Bullseye.", + "migration_0027_system_not_fully_up_to_date": "Your system is not fully up-to-date. Please perform a regular upgrade before running the migration to Bookworm.", "migration_0027_yunohost_upgrade": "Starting YunoHost core upgrade…", "migration_description_0021_migrate_to_bullseye": "Upgrade the system to Debian Bullseye and YunoHost 11.x", "migration_description_0022_php73_to_php74_pools": "Migrate php7.3-fpm 'pool' conf files to php7.4", @@ -804,4 +804,4 @@ "yunohost_installing": "Installing YunoHost…", "yunohost_not_installed": "YunoHost is not correctly installed. Please run 'yunohost tools postinstall'", "yunohost_postinstall_end_tip": "The post-install completed! To finalize your setup, please consider:\n - diagnose potential issues through the 'Diagnosis' section of the webadmin (or 'yunohost diagnosis run' in command-line);\n - reading the 'Finalizing your setup' and 'Getting to know YunoHost' parts in the admin documentation: https://yunohost.org/admindoc." -} \ No newline at end of file +} From 97bb6bde095909102c70666dc5f9b7290b998298 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 17 Jul 2024 15:31:25 +0200 Subject: [PATCH 117/218] bullseye->bookworm: automatically add non-free-firmware if non-free is enabled --- src/migrations/0027_migrate_to_bookworm.py.disabled | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index 0416e8f05..4e22cbd75 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -371,6 +371,7 @@ class MyMigration(Migration): # - comments lines containing "backports" # - replace 'bullseye/updates' by 'bookworm/updates' (or same with -) # - make sure the yunohost line has the "signed-by" thingy + # - replace "non-free" with "non-free non-free-firmware" # Special note about the security suite: # https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.en.html#security-archive for f in sources_list: @@ -380,6 +381,7 @@ class MyMigration(Migration): "-e '/backports/ s@^#*@#@' " "-e 's@ bullseye/updates @ bookworm-security @g' " "-e 's@ bullseye-@ bookworm-@g' " + "-e 's@ non-free@ non-free non-free-firmware@g' " "-e 's@deb.*http://forge.yunohost.org@deb [signed-by=/usr/share/keyrings/yunohost-bookworm.gpg] http://forge.yunohost.org@g' " ) os.system(command) From 67d6baa15182fb29a27c61c874a1c843e55d5c36 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 17 Jul 2024 16:17:46 +0200 Subject: [PATCH 118/218] bullseye->bookworm: forgot to remove the unhold for apps packages >_> --- src/migrations/0027_migrate_to_bookworm.py.disabled | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index 4e22cbd75..4d46459e9 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -216,7 +216,7 @@ class MyMigration(Migration): # Yunohost upgrade # logger.info(m18n.n("migration_0027_yunohost_upgrade")) - aptitude_with_progress_bar(f"unhold yunohost moulinette ssowat yunohost-admin {' '.join(apps_packages)}") + aptitude_with_progress_bar(f"unhold yunohost moulinette ssowat yunohost-admin") try: aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin yunohost-portal moulinette ssowat python3.9- python3.9-venv- -o Dpkg::Options::='--force-confold'") From f11f11973b0c53f36c3f5f7d23027f0fd99740af Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 17 Jul 2024 16:36:46 +0200 Subject: [PATCH 119/218] bullseye->bookworm: trigger the 'new' migration from inside the bullseye->bookworm migration --- .../0027_migrate_to_bookworm.py.disabled | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index 4d46459e9..30d36544a 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -4,7 +4,9 @@ import subprocess from time import sleep from moulinette import Moulinette, m18n +from moulinette.utils.process import call_async_output from yunohost.utils.error import YunohostError +from yunohost.tools import _write_migration_state from moulinette.utils.process import check_output from moulinette.utils.filesystem import read_file, write_to_file @@ -230,6 +232,18 @@ class MyMigration(Migration): if apps_packages: aptitude_with_progress_bar(f"unhold {' '.join(apps_packages)}") + # Mark this migration as completed before triggering the "new" migrations + _write_migration_state(self.id, "done") + + callbacks = ( + lambda l: logger.debug("+ " + l.rstrip() + "\r"), + lambda l: logger.warning(l.rstrip()), + ) + try: + call_async_output(["yunohost", "tools", "migrations", "run"], callbacks) + except Exception as e: + logger.error(e) + # If running from the webadmin, restart the API after a delay if Moulinette.interface.type == "api": logger.warning(m18n.n("migration_0027_delayed_api_restart")) From ebcf3c79ff4ca1f88a961252231ce6712664458f Mon Sep 17 00:00:00 2001 From: Kayou Date: Wed, 17 Jul 2024 16:45:43 +0200 Subject: [PATCH 120/218] Fix "log list" : use root_dir for iglob / make sure we use absolute paths (#1913) * use root_dir for iglob, fix parent_symlink path and check if it exists * fix log path * do not try to read a yaml of a symlink to /dev/null * use hidden files, needs python 3.11 (bookworm) * don't worry, I'm an expert! * Update log.py: log_file -> log_md_fullpath (otherwise it feel like log_file refers to the .log) * Update log.py: remove debug statement * Update log.py: revert unecessary if change --------- Co-authored-by: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> --- src/log.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/log.py b/src/log.py index 1e116baf1..7e17d527e 100755 --- a/src/log.py +++ b/src/log.py @@ -87,9 +87,10 @@ def _update_log_parent_symlinks(): one_year_ago = time.time() - 365 * 24 * 3600 - logs = glob.iglob(OPERATIONS_PATH + "*" + METADATA_FILE_EXT) + logs = glob.iglob("*" + METADATA_FILE_EXT, root_dir=OPERATIONS_PATH) for log_md in logs: - if os.path.getctime(log_md) < one_year_ago: + log_md_fullpath = os.path.join(OPERATIONS_PATH, log_md) + if os.path.getctime(log_md_fullpath) < one_year_ago: # Let's ignore files older than one year because hmpf reading a shitload of yml is not free continue @@ -100,7 +101,7 @@ def _update_log_parent_symlinks(): try: metadata = ( - read_yaml(log_md) or {} + read_yaml(log_md_fullpath) or {} ) # Making sure this is a dict and not None..? except Exception as e: # If we can't read the yaml for some reason, report an error and ignore this entry... @@ -110,7 +111,6 @@ def _update_log_parent_symlinks(): parent = metadata.get("parent") parent = parent + METADATA_FILE_EXT if parent else "/dev/null" try: - print(parent, parent_symlink) os.symlink(parent, parent_symlink) except Exception as e: logger.warning(f"Failed to create symlink {parent_symlink} ? {e}") From 6e5c555e374c83b8a2702ce17eae223702cd0af4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 17 Jul 2024 17:56:32 +0200 Subject: [PATCH 121/218] flake8 etc --- src/migrations/0027_migrate_to_bookworm.py.disabled | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index 30d36544a..a33e1e7ba 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -218,11 +218,11 @@ class MyMigration(Migration): # Yunohost upgrade # logger.info(m18n.n("migration_0027_yunohost_upgrade")) - aptitude_with_progress_bar(f"unhold yunohost moulinette ssowat yunohost-admin") + aptitude_with_progress_bar("unhold yunohost moulinette ssowat yunohost-admin") try: aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin yunohost-portal moulinette ssowat python3.9- python3.9-venv- -o Dpkg::Options::='--force-confold'") - except Exception as e: + except Exception: # Retry after unholding the app packages, maybe it can unlock the situation idk if apps_packages: aptitude_with_progress_bar(f"unhold {' '.join(apps_packages)}") From 0242ecd0e739d02ddb2683f4c189cdf4df04fac5 Mon Sep 17 00:00:00 2001 From: cjdw Date: Tue, 16 Jul 2024 10:21:17 +0000 Subject: [PATCH 122/218] Translated using Weblate (Indonesian) Currently translated at 60.3% (486 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 51 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/locales/id.json b/locales/id.json index 9036b12f7..10774b8f7 100644 --- a/locales/id.json +++ b/locales/id.json @@ -124,7 +124,7 @@ "restore_nothings_done": "Tidak ada yang dipulihkan", "restore_running_app_script": "Memulihkan aplikasi {app}…", "root_password_changed": "kata sandi root telah diubah", - "root_password_desynchronized": "Kata sandi administrasi telah diubah tapi YunoHost tidak dapat mengubahnya menjadi kata sandi root!", + "root_password_desynchronized": "Kata sandi administrasi telah diubah, tapi YunoHost tidak dapat mengubahnya menjadi kata sandi root!", "server_reboot_confirm": "Peladen akan dimulai ulang segera, apakan Anda yakin [{answers}]", "server_shutdown": "Peladen akan dimatikan", "server_shutdown_confirm": "Peladen akan dimatikan segera, apakah Anda yakin? [{answers}]", @@ -163,7 +163,7 @@ "log_domain_add": "Menambahkan domain '{}' ke konfigurasi sistem", "main_domain_changed": "Domain utama telah diubah", "service_already_started": "Layanan '{service}' telah berjalan", - "service_description_fail2ban": "Melindungi dari berbagai macam serangan dari Internet", + "service_description_fail2ban": "Melindungi dari serangan kotor dan berbagai macam serangan dari Internet", "service_description_yunohost-api": "Mengelola interaksi antara antarmuka web YunoHost dengan sistem", "this_action_broke_dpkg": "Tindakan ini merusak dpkg/APT (pengelola paket sistem)… Anda bisa mencoba menyelesaikan masalah ini dengan masuk lewat SSH dan menjalankan `sudo apt install --fix-broken` dan/atau `sudo dpkg --configure -a`.", "app_manifest_install_ask_init_admin_permission": "Siapa yang boleh mengakses fitur admin untuk aplikasi ini? (Ini bisa diubah nanti)", @@ -194,12 +194,12 @@ "mail_unavailable": "Alamat surel ini hanya untuk kelompok admin", "main_domain_change_failed": "Tidak dapat mengubah domain utama", "diagnosis_ip_global": "IP Global: {global}", - "diagnosis_ip_dnsresolution_working": "Resolusi nama domain bekerja!", + "diagnosis_ip_dnsresolution_working": "Resolusi nama domain bisa digunakan!", "diagnosis_ip_local": "IP Lokal: {local}", "diagnosis_ip_no_ipv4": "Peladen ini sepertinya tidak memiliki IPv4.", "diagnosis_mail_ehlo_could_not_diagnose_details": "Galat: {error}", "global_settings_setting_ssh_password_authentication_help": "Izinkan autentikasi kata sandi untuk SSH", - "password_listed": "Kata sandi ini termasuk dalam daftar kata sandi yang sering digunakan di dunia. Mohon untuk memilih yang lebih unik.", + "password_listed": "Kata sandi ini termasuk dalam daftar kata sandi yang sering digunakan di dunia. Silakan untuk memilih yang lebih unik.", "permission_not_found": "Izin '{permission}' tidak ditemukan", "restore_not_enough_disk_space": "Ruang tidak cukup (ruang: {free_space} B, ruang yang dibutuhkan: {needed_space} B, margin aman: {margin} B)", "server_reboot": "Peladen akan dimulai ulang", @@ -277,7 +277,7 @@ "diagnosis_ip_connected_ipv6": "Peladen ini terhubung ke internet lewat IPv6!", "diagnosis_services_bad_status": "Layanan {service} {status} :(", "global_settings_setting_root_password": "Kata sandi root baru", - "log_app_action_run": "Menjalankan tindakan dari aplikasi '{}'", + "log_app_action_run": "Menjalankan tindakan pada aplikasi '{}'", "log_settings_reset_all": "Atur ulang semua pengaturan", "log_settings_set": "Terapkan pengaturan", "service_removed": "Layanan '{service}' dihapus", @@ -330,14 +330,14 @@ "permission_update_failed": "Tidak dapat memperbarui izin '{permission}': {error}", "apps_failed_to_upgrade": "Aplikasi berikut gagal untuk diperbarui:{apps}", "backup_archive_name_unknown": "Arsip cadangan lokal dengan nama '{name}' tidak diketahui", - "diagnosis_http_nginx_conf_not_up_to_date_details": "Untuk memperbaiki ini, periksa perbedaannya dari CLI menggunakan yunohost tools regen-conf nginx --dry-run --with-diff dan jika Anda sudah, terapkan perubahannya menggunakan yunohost tools regen-conf nginx --force.", + "diagnosis_http_nginx_conf_not_up_to_date_details": "Untuk memperbaiki ini, periksa perbedaannya dari CLI menggunakan yunohost tools regen-conf nginx --dry-run --with-diff dan jika menurut Anda sudah sesuai, terapkan perubahannya menggunakan yunohost tools regen-conf nginx --force.", "domain_config_auth_token": "Token autentikasi", "domain_config_cert_install": "Pasang sertifikat Let's Encrypt", "domain_config_cert_summary_abouttoexpire": "Sertifikat saat ini akan kedaluwarsa. Akan secara otomatis diperbarui secepatnya.", "domain_config_mail_in": "Surel datang", "password_too_simple_1": "Panjang kata sandi harus paling tidak 8 karakter", "password_too_simple_2": "Panjang kata sandi harus paling tidak 8 karakter dan mengandung digit, huruf kapital, dan huruf kecil", - "password_too_simple_3": "Panjang kata sandi harus paling tidak 8 karakter dan mengandung digit, huruf kapital, huruf kecil, dan karakter khusus", + "password_too_simple_3": "Kata sandi harus terdiri dari minimal 8 karakter dan berisi angka, huruf besar, huruf kecil, dan karakter khusus", "password_too_simple_4": "Panjang kata sandi harus paling tidak 12 karakter dan mengandung digit, huruf kapital, huruf kecil, dan karakter khusus", "port_already_closed": "Porta {port} telah ditutup untuk koneksi {ip_version}", "service_description_yunomdns": "Membuat Anda bisa menemukan peladen Anda menggunakan 'yunohost.local' di jaringan lokal Anda", @@ -393,7 +393,7 @@ "log_user_permission_reset": "Mengatur ulang izin '{}'", "domain_config_xmpp": "Pesan Langsung (XMPP)", "diagnosis_http_connection_error": "Masalah jaringan: tidak dapat terhubung dengan domain yang diminta, sangat mungkin terputus.", - "dyndns_ip_updated": "IP Anda diperbarui di DynDNS", + "dyndns_ip_updated": "IP Anda diperbarui pada DynDNS", "ask_dyndns_recovery_password_explain": "Pilih kata sandi pemulihan untuk domain DynDNS Anda.", "ask_dyndns_recovery_password": "Kata sandi pemulihan DynDNS", "backup_output_directory_not_empty": "Anda harus memilih direktori yang kosong", @@ -451,5 +451,38 @@ "apps_catalog_init_success": "Inisialisasi sistem katalog aplikasi!", "app_unsupported_remote_type": "Tidak mendukung type remot yang digunakan pada aplikasi", "app_not_upgraded_broken_system_continue": "Aplikasi '{failed_app}' telah gagal meningkatkan dan menyebabkan sistem dalam status rusak (jadi --continue-on-failure diabaikan), dan sebagai konsekuensi terhadap peningkatan aplikasi tersebut telah dibatalkan: {apps}", - "apps_failed_to_upgrade_line": "\n * {app_id}(untuk melihat log yang berkaitan lakukan 'yunohost log show {operation_logger_name}')" + "apps_failed_to_upgrade_line": "\n * {app_id}(untuk melihat log yang berkaitan lakukan 'yunohost log show {operation_logger_name}')", + "backup_couldnt_bind": "Tidak dapat memaut {src} ke {dest}.", + "backup_custom_mount_error": "Metode pencadangan khusus tidak dapat melewati langkah 'mount'", + "backup_hook_unknown": "Kait cadangan '{hook}' tidak diketahui", + "backup_method_custom_finished": "Metode pencadangan khusus '{method}' selesai", + "backup_cant_mount_uncompress_archive": "Tidak dapat memasang arsip yang tidak terkompres sebagai proteksi penulisan", + "backup_custom_backup_error": "Metode pencadangan khusus tidak dapat melewati langkah 'backup'", + "backup_no_uncompress_archive_dir": "Tidak ada direktori arsip yang tidak terkompres", + "backup_unable_to_organize_files": "Tidak dapat menggunakan metode cepat untuk mengatur berkas dalam arsip", + "certmanager_cannot_read_cert": "Terjadi kesalahan saat mencoba membuka sertifikat saat ini untuk domain {domain} (berkas: {file}), alasan: {reason}", + "certmanager_domain_not_diagnosed_yet": "Belum ada hasil diagnosis untuk domain {domain}. Silakan jalankan kembali diagnosis untuk kategori 'DNS records' dan 'Web' di bagian diagnosis untuk memeriksa apakah domain siap untuk Let's Encrypt. (Atau jika Anda tahu apa yang Anda lakukan, gunakan '--no-checks' untuk mematikan pemeriksaan ini.)", + "certmanager_warning_subdomain_dns_record": "Subdomain '{subdomain}' tidak memiliki alamat IP yang sama dengan '{domain}'. Beberapa fitur tidak akan tersedia sampai Anda memperbaikinya dan membuat ulang sertifikat.", + "confirm_notifications_read": "PERINGATAN: Anda harus memeriksa notifikasi pada aplikasi di atas sebelum melanjutkan, mungkin terdapat hal yang penting untuk diketahui. [{answers}]", + "diagnosis_apps_broken": "Aplikasi tersebut saat ini ditandai sebagai rusak pada katalog aplikasi YunoHost. Ini mungkin hanya isu sementara ketika pengelola berupaya memperbaiki masalah tersebut. Untuk sementara, peningkatan versi aplikasi ini dinonaktifkan.", + "backup_running_hooks": "Menjalankan kait cadangan…", + "config_unknown_filter_key": "Kunci filter '{filter_key}' tidak sesuai.", + "backup_permission": "Izin pencadangan untuk {app}", + "config_forbidden_keyword": "Kata kunci '{keyword}' sudah ada, Anda tidak dapat membuat atau menggunakan panel konfigurasi disertai pertanyaan dengan id ini.", + "good_practices_about_user_password": "Anda sekarang akan menentukan kata sandi pengguna baru. Kata sandi harus terdiri dari minimal 8 karakter—walaupun sebaiknya menggunakan kata sandi yang lebih panjang (cth. parafrasa) dan/atau variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", + "domain_dns_push_failed_to_authenticate": "Gagal autentikasi pada API registrar untuk domain '{domain}'. Besar kemungkinan karena kredensial tidak sesuai? (Galat: {error})", + "certmanager_domain_dns_ip_differs_from_public_ip": "Rekaman DNS untuk domain '{domain}' berbeda dengan IP server ini. Silakan periksa kategori 'Catatan DNS' (dasar) dalam diagnosis untuk info lebih lanjut. Jika Anda baru saja memodifikasi rekaman A, silakan menunggu hingga rekaman tersebut disebarkan (beberapa pemeriksa sebaran DNS tersedia online). (Jika Anda tahu apa yang Anda lakukan, gunakan '--no-checks' untuk mematikan pemeriksaan ini.)", + "certmanager_hit_rate_limit": "Terlalu banyak sertifikat yang telah diterbitkan untuk kumpulan domain {domain} ini baru-baru ini. Silakan coba lagi nanti. Lihat https://letsencrypt.org/docs/rate-limits/ untuk detail lebih lanjut", + "custom_app_url_required": "Anda harus memberikan URL untuk meningkatkan versi aplikasi khusus Anda {app}", + "ask_dyndns_recovery_password_explain_unavailable": "Domain DynDNS ini sudah terdaftar. Jika Anda adalah orang yang pertama kali mendaftarkan domain ini, Anda dapat memasukkan kata sandi pemulihan untuk mengeklaim kembali domain ini.", + "backup_archive_writing_error": "Tidak bisa menambahkan berkas '{source}' (disebutkan dalam arsip '{dest}') untuk dicadangkan ke dalam arsip yang terkompres '{archive}'", + "certmanager_domain_http_not_working": "Domain {domain} sepertinya tidak dapat diakses melalui HTTP. Silakan periksa kategori 'Web' dalam diagnosis untuk info lebih lanjut. (Jika Anda tahu apa yang Anda lakukan, gunakan '--no-checks' untuk mematikan pemeriksaan ini.)", + "diagnosis_apps_bad_quality": "Aplikasi tersebut saat ini ditandai sebagai rusak pada katalog aplikasi YunoHost. Ini mungkin hanya isu sementara ketika pengelola berupaya memperbaiki masalah tersebut. Untuk sementara, peningkatan versi aplikasi ini dinonaktifkan.", + "backup_output_directory_required": "Anda harus menyediakan direktori keluaran untuk cadangan tersebut", + "config_action_disabled": "Tidak dapat menjalankan aksi '{action}' karena dinonaktifkan, pastikan untuk memenuhi batasannya. bantuan: {help}", + "config_cant_set_value_on_section": "Anda tidak dapat menetapkan satu nilai pun di seluruh bagian konfigurasi.", + "backup_applying_method_custom": "Memanggil metode pencadangan khusus '{method}'…", + "backup_ask_for_copying_if_needed": "Apakah Anda ingin melakukan pencadangan menggunakan {size}MB untuk sementara? (Cara ini digunakan karena beberapa berkas tidak dapat disiapkan menggunakan metode yang lebih efisien.)", + "good_practices_about_admin_password": "Anda sekarang akan menentukan kata sandi administrasi baru. Kata sandi harus terdiri dari minimal 8 karakter—walaupun sebaiknya menggunakan kata sandi yang lebih panjang (cth. parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", + "certmanager_acme_not_configured_for_domain": "Tantangan ACME tidak dapat dijalankan untuk {domain} saat ini karena konfigurasi pada nginx tidak memiliki potongan kode yang sesuai… Pastikan konfigurasi nginx Anda mutakhir menggunakan `yunohost tools regen-conf nginx --dry-run --with-diff`." } From 04101862ac7bc302cc6ea0bbffc7fef9168d8f39 Mon Sep 17 00:00:00 2001 From: xabirequejo Date: Wed, 17 Jul 2024 10:49:13 +0000 Subject: [PATCH 123/218] Translated using Weblate (Basque) Currently translated at 99.8% (804 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/eu/ --- locales/eu.json | 44 +++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/locales/eu.json b/locales/eu.json index b95fcd1a9..82ea49378 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -159,7 +159,7 @@ "app_manifest_install_ask_password": "Aukeratu administrazio-pasahitz bat aplikazio honetarako", "ask_user_domain": "Erabiltzailearen posta elektroniko eta XMPP konturako erabiliko den domeinua", "app_action_cannot_be_ran_because_required_services_down": "{services} zerbitzuak martxan egon beharko lirateke eragiketa hau exekutatu ahal izateko. Saia zaitez zerbitzuok berrabiarazten (eta ikertu zergatik ez diren abiarazi).", - "apps_already_up_to_date": "Egunean daude dagoeneko aplikazio guztiak", + "apps_already_up_to_date": "Aplikazio guztiak egunean daude dagoeneko", "app_full_domain_unavailable": "Aplikazio honek bere domeinu propioa behar du, baina beste aplikazio batzuk daude dagoeneko instalatuta '{domain}' domeinuan. Azpidomeinu bat erabil zenezake instalatu nahi duzun aplikaziorako.", "app_install_script_failed": "Errore bat gertatu da aplikazioaren instalatzailearen aginduetan", "diagnosis_basesystem_host": "Zerbitzariak Debian {debian_version} darabil", @@ -351,7 +351,7 @@ "diagnosis_mail_queue_unavailable": "Ezinezkoa da ilaran zenbat posta elektroniko dauden kontsultatzea", "log_user_create": "Gehitu '{}' erabiltzailea", "group_cannot_edit_visitors": "'bisitariak' taldea ezin da eskuz moldatu. Saiorik hasi gabeko bisitariak barne hartzen dituen talde berezia da", - "diagnosis_ram_verylow": "Sistemak RAM memoriaren {available} baino ez ditu erabilgarri; memoria guztiaren ({total}) %{available_percent}a bakarrik!", + "diagnosis_ram_verylow": "Sistemak RAM memoriaren {available} baino ez ditu erabilgarri; memoria guztiaren ({total}) %{available_percent}a.", "diagnosis_ram_low": "Sistemak RAM memoriaren {available} ditu erabilgarri; memoria guztiaren ({total}) %{available_percent}a. Adi ibili.", "diagnosis_ram_ok": "Sistemak RAM memoriaren {available} ditu oraindik erabilgarri; memoria guztiaren ({total}) %{available_percent}a.", "diagnosis_swap_none": "Sistemak ez du swap-ik. Gutxienez {recommended} izaten saiatu beharko zinateke, sistema memoriarik gabe gera ez dadin.", @@ -625,19 +625,19 @@ "tools_upgrade": "Sistemaren paketeak eguneratzen", "tools_upgrade_failed": "Ezin izan dira paketeak eguneratu: {packages_list}", "service_description_postgresql": "Aplikazioen datuak gordetzen ditu (SQL datubasea)", - "migration_0021_start": "Bullseye (e)rako migrazioa abiarazten", + "migration_0021_start": "Bullseye-rako migrazioa abiarazten", "migration_0021_patching_sources_list": "sources.lists petatxatzen…", "migration_0021_main_upgrade": "Eguneraketa nagusia abiarazten…", "migration_0021_still_on_buster_after_main_upgrade": "Zerbaitek huts egin du eguneraketa nagusian, badirudi sistemak oraindik darabilela Debian Buster", - "migration_0021_yunohost_upgrade": "YunoHosten muineko eguneraketa abiarazten…", - "migration_0021_not_enough_free_space": "/var/-enerabilgarri dagoen espazioa oso txikia da! Guxtienez GB 1 izan beharko zenuke erabilgarri migrazioari ekiteko.", - "migration_0021_system_not_fully_up_to_date": "Sistema ez dago erabat egunean. Egizu eguneraketa arrunt bat Bullseye-(e)rako migrazioa abiarazi baino lehen.", + "migration_0021_yunohost_upgrade": "YunoHosten muineko bertsio-berriztea abiarazten…", + "migration_0021_not_enough_free_space": "/var/-en erabilgarri dagoen espazioa oso txikia da! Gutxienez GB 1 izan beharko zenuke erabilgarri migrazioari ekiteko.", + "migration_0021_system_not_fully_up_to_date": "Sistema ez dago erabat egunean. Egizu eguneraketa arrunt bat Bullseye-rako migrazioa abiarazi baino lehen.", "migration_0021_general_warning": "Kontuan hartu migrazio hau konplexua dela. YunoHost taldeak ahalegin handia egin du probatzeko, baina hala ere migrazioak sistemaren zatiren bat edo aplikazioak apurt litzake.\n\nHorregatik, gomendagarria da:\n\t- Datu edo aplikazio garrantzitsuen babeskopia egitea. Informazio gehiago: https://yunohost.org/backup;\n\t- Ez izan presarik migrazioa abiaraztean: zure internet eta hardwarearen arabera ordu batzuk ere iraun lezake eguneraketa prozesuak.", "migration_0021_modified_files": "Kontuan hartu ondorengo fitxategiak eskuz moldatu omen direla eta eguneraketak berridatziko dituela: {manually_modified_files}", "migration_0021_cleaning_up": "Katxea eta erabilgarriak ez diren paketeak garbitzen…", "migration_0021_patch_yunohost_conflicts": "Arazo gatazkatsu bati adabakia jartzen…", - "migration_description_0021_migrate_to_bullseye": "Eguneratu sistema Debian Bullseye eta Yunohost 11.x-ra", - "migration_0021_problematic_apps_warning": "Kontuan izan ziur asko gatazkatsuak izango diren odorengo aplikazioak aurkitu direla. Badirudi ez zirela YunoHost aplikazioen katalogotik instalatu, edo ez daude 'badabiltza' bezala etiketatuak. Ondorioz, ezin da bermatu eguneratu ondoren funtzionatzen jarraituko dutenik: {problematic_apps}", + "migration_description_0021_migrate_to_bullseye": "Bertsio-berritu sistema Debian Bullseye eta YunoHost 11.x-ra", + "migration_0021_problematic_apps_warning": "Kontuan izan ziur asko gatazkatsuak izango diren ondorengo aplikazioak aurkitu direla. Badirudi ez zirela YunoHost aplikazioen katalogotik instalatu, edo ez daude 'badabiltza' bezala etiketatuak. Ondorioz, ezin da bermatu eguneratu ondoren funtzionatzen jarraituko dutenik: {problematic_apps}", "migration_0023_not_enough_space": "{path}-en ez dago toki nahikorik migrazioa abiarazteko.", "migration_0023_postgresql_11_not_installed": "PostgreSQL ez zegoen zure isteman instalatuta. Ez dago egitekorik.", "migration_0023_postgresql_13_not_installed": "PostgreSQL 11 dago instalatuta baina PostgreSQL 13 ez!? Zerbait arraroa gertatu omen zaio zure sistemari :(…", @@ -664,7 +664,7 @@ "migration_0024_rebuild_python_venv_failed": "{app} aplikazioaren Python virtualenv-aren birsorkuntza saiakerak huts egin du. Litekeena da aplikazioak ez funtzionatzea arazoa konpondu arte. Aplikazioaren eguneraketa behartu beharko zenuke ondorengo komandoarekin: `yunohost app upgrade --force {app}`.", "migration_description_0024_rebuild_python_venv": "Konpondu Python aplikazioa Bullseye eguneraketa eta gero", "migration_0024_rebuild_python_venv_disclaimer_base": "Debian Bullseye eguneraketa dela-eta, Python aplikazio batzuk birsortu behar dira Debianekin datorren Pythonen bertsiora egokitzeko (teknikoki 'virtualenv' deritzaiona birsortu behar da). Egin artean, litekeena da Python aplikazio horiek ez funtzionatzea. YunoHost saia daiteke beherago ageri diren aplikazioen virtualenv edo ingurune birtualak birsortzen. Beste aplikazio batzuen kasuan, edo birsortze saiakerak kale egingo balu, aplikazio horien eguneraketa behartu beharko duzu.", - "migration_0021_not_buster2": "Zerbitzariak darabilen Debian bertsioa ez da Buster! Dagoeneko Buster -> Bullseye migrazioa exekutatu baduzu, errore honek migrazioa erabat arrakastatsua izan ez zela esan nahi du (bestela YunoHostek amaitutzat markatuko luke). Komenigarria izango litzateke, laguntza taldearekin batera, zer gertatu zen aztertzea. Horretarako `migrazioaren erregistro **osoa** beharko duzue, Tresnak > Erregistroak atalean eskuragarri dagoena.", + "migration_0021_not_buster2": "Zerbitzariak darabilen Debian bertsioa ez da Buster! Dagoeneko Buster -> Bullseye migrazioa exekutatu baduzu, errore honek migrazioa erabat arrakastatsua izan ez zela esan nahi du (bestela YunoHostek amaitutzat markatuko luke). Komenigarria izango litzateke, laguntza taldearekin batera, zer gertatu zen aztertzea. Horretarako migrazioaren erregistro **osoa** beharko duzue, Tresnak > Erregistroak atalean eskuragarri dagoena.", "admins": "Administratzaileek", "app_action_failed": "{app} aplikaziorako {action} eragiketak huts egin du", "config_action_disabled": "Ezin izan da '{action}' eragiketa exekutatu ezgaituta dagoelako, egiaztatu bere mugak betetzen dituzula. Laguntza: {help}", @@ -781,5 +781,27 @@ "dyndns_set_recovery_password_invalid_password": "Berreskuratze-pasahitza ezartzeak huts egin du: pasahitza ez da nahikoa sendoa", "dyndns_set_recovery_password_failed": "Berreskuratze-pasahitza ezartzeak huts egin du: {error}", "dyndns_set_recovery_password_success": "Berreskuratze-pasahitza ezarri da!", - "global_settings_setting_ssh_port_help": "1024 baino ataka txikiago bat izan beharko litzateke, zerbitzu ez-administratzaileek urruneko makinan usurpazio-saiorik egin ez dezaten. Lehendik ere erabiltzen ari diren atakak ere ekidin beharko zenituzke, 80 edo 443 kasu." -} \ No newline at end of file + "global_settings_setting_ssh_port_help": "1024 baino ataka txikiago bat izan beharko litzateke, zerbitzu ez-administratzaileek urruneko makinan usurpazio-saiorik egin ez dezaten. Lehendik ere erabiltzen ari diren atakak ere ekidin beharko zenituzke, 80 edo 443 kasu.", + "migration_0027_start": "Bookworm-erako migrazioa abiarazten…", + "migration_0027_still_on_bullseye_after_main_upgrade": "Zerbaitek kale egin du bertsio-berritze nagusian; sistemak oraindik Debian Bullseye darabilela dirudi.", + "migration_0027_general_warning": "Migrazioa tentuz ibiltzeko prozedura da. YunoHosten taldeak ahal izan duen guztia egin du berrikusi eta probatzeko, baina hala ere sistemaren atalak edo aplikazioak honda litzake.\n\nBeraz, gomendagarria da:\n - Datu edo aplikazio garrantzitsuen babeskopia egitea. Informazio gehiagorako: https://yunohost.org/backup;\n - Ez izan presarik migrazioa abiaraztean: internet konexioaren eta hardwarearen arabera, litekeena da ordu apur batzuk ere behar izatea guztia dagokion bezala bertsio-berritzeko.", + "migration_description_0027_migrate_to_bookworm": "Bertsio-berritu sistema Debian Bookworm eta YunoHost 12-ra", + "migration_0027_system_not_fully_up_to_date": "Sistema ez dago erabat egunean. Egizu eguneraketa arrunt bat Bullseye-rako migrazioa abiarazi baino lehen.", + "diagnosis_ignore_filter_added": "{category} atalaren diagnostikorako iragazkia gehitu da", + "migration_0027_problematic_apps_warning": "Kontuan izan ziur asko gatazkatsuak izango diren ondorengo aplikazioak aurkitu direla. Badirudi ez zirela YunoHost aplikazioen katalogotik instalatu, edo ez daude 'badabiltza' bezala etiketatuak. Ondorioz, ezin da bermatu eguneratu ondoren funtzionatzen jarraituko dutenik: {problematic_apps}", + "diagnosis_ignore_missing_criteria": "Gutxienez irizpide bat gehitu behar duzu atalaren diagnostikoak kontuan har ez dezan", + "migration_0027_not_bullseye": "Zerbitzariak darabilen Debian bertsioa ez da Bullseye! Dagoeneko Bullseye -> Bookworm migrazioa exekutatu baduzu, errore honek migrazioa erabat arrakastatsua izan ez zela esan nahi du (bestela YunoHostek amaitutzat markatuko luke). Komenigarria izango litzateke, laguntza taldearekin batera, zer gertatu zen aztertzea. Horretarako migrazioaren erregistro **osoa** beharko duzue, Tresnak > Erregistroak atalean eskuragarri dagoena.", + "diagnosis_ignore_criteria_error": "Irizpideek forma hau izan behar dute: gakoa=balorea (adib. domain=yolo.test)", + "diagnosis_ignore_already_filtered": "(Badago lehendik ere irizpide horiek dituen {category} atalaren diagnostikorako iragazkia)", + "diagnosis_ignore_filter_removed": "{category} atalaren diagnostikorako iragazkia kendu da", + "diagnosis_ignore_no_filter_found": "(Ez dago irizpide horiek dituen {category} atalaren diagnostikorako iragazkirik)", + "diagnosis_ignore_no_issue_found": "Ez da arazorik aurkitu emandako irizpideekin.", + "migration_0027_delayed_api_restart": "YunoHosten APIa 15 segundu barru berrabiaraziko da automatikoki. Litekeena da tarte batez erabilgarri egoteari uztea eta ondoren berriro hasi beharko duzu saioa.", + "migration_0027_main_upgrade": "Bertsio-berritze nagusia abiarazten…", + "migration_0027_cleaning_up": "Erabilgarri izateari utzi dioten katxe eta paketeak garbitzen…", + "migration_0027_yunohost_upgrade": "YunoHosten muineko bertsio-berriztea abiarazten…", + "migration_0027_patch_yunohost_conflicts": "Arazo gatazkatsu bati adabakia jartzen…", + "migration_0027_modified_files": "Ondorengo fitxategiak eskuz moldatu direla antzeman da eta litekeena da bertsio-berritzeak gainean idaztea: {manually_modified_files}", + "migration_0027_not_enough_free_space": "/var/-en erabilgarri dagoen espazioa oso txikia da! Gutxienez GB 1 izan beharko zenuke erabilgarri migrazioari ekiteko.", + "migration_0027_patching_sources_list": "sources.lists fitxategia petatxatzen…" +} From ac4ff0fc2d5b80c2c80d5da02e2f8f551ddd69aa Mon Sep 17 00:00:00 2001 From: cjdw Date: Wed, 17 Jul 2024 10:18:51 +0000 Subject: [PATCH 124/218] Translated using Weblate (Indonesian) Currently translated at 62.7% (505 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/locales/id.json b/locales/id.json index 10774b8f7..9b2af8c61 100644 --- a/locales/id.json +++ b/locales/id.json @@ -484,5 +484,24 @@ "backup_applying_method_custom": "Memanggil metode pencadangan khusus '{method}'…", "backup_ask_for_copying_if_needed": "Apakah Anda ingin melakukan pencadangan menggunakan {size}MB untuk sementara? (Cara ini digunakan karena beberapa berkas tidak dapat disiapkan menggunakan metode yang lebih efisien.)", "good_practices_about_admin_password": "Anda sekarang akan menentukan kata sandi administrasi baru. Kata sandi harus terdiri dari minimal 8 karakter—walaupun sebaiknya menggunakan kata sandi yang lebih panjang (cth. parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", - "certmanager_acme_not_configured_for_domain": "Tantangan ACME tidak dapat dijalankan untuk {domain} saat ini karena konfigurasi pada nginx tidak memiliki potongan kode yang sesuai… Pastikan konfigurasi nginx Anda mutakhir menggunakan `yunohost tools regen-conf nginx --dry-run --with-diff`." + "certmanager_acme_not_configured_for_domain": "Tantangan ACME tidak dapat dijalankan untuk {domain} saat ini karena konfigurasi pada nginx tidak memiliki potongan kode yang sesuai… Pastikan konfigurasi nginx Anda mutakhir menggunakan `yunohost tools regen-conf nginx --dry-run --with-diff`.", + "diagnosis_http_special_use_tld": "Domain {domain} berdasarkan pada domain tingkat atas (TLD) penggunaan khusus seperti .local atau .test dan oleh karena itu tidak diharapkan untuk diekspos di luar jaringan lokal.", + "certmanager_self_ca_conf_file_not_found": "Tidak dapat menemukan berkas konfigurasi untuk otoritas teken mandiri (berkas: {file})", + "diagnosis_dns_specialusedomain": "Domain {domain} didasarkan pada domain tingkat atas (TLD) penggunaan khusus seperti .local atau .test dan oleh karena itu tidak diharapkan memiliki data DNS yang sebenarnya.", + "certmanager_unable_to_parse_self_CA_name": "Tidak dapat menguraikan nama otoritas teken mandiri (berkas: {file})", + "confirm_app_install_danger": "BAHAYA! Aplikasi ini diketahui masih eksperimental (jika tidak secara eksplisit tidak berfungsi)! Anda mungkin TIDAK boleh menginstalnya kecuali Anda tahu apa yang Anda lakukan. TIDAK ADA DUKUNGAN yang akan diberikan jika aplikasi ini tidak berfungsi atau merusak sistem Anda… Jika Anda tetap bersedia mengambil risiko tersebut, ketik '{answers}'", + "diagnosis_dns_missing_record": "Sesuai dengan konfigurasi DNS yang direkomendasikan, Anda harus menambahkan data DNS dengan info berikut.
Jenis: {type}
Nama: {name}
Nilai: {value}", + "diagnosis_http_could_not_diagnose": "Tidak dapat mendiagnosis apakah domain dapat dijangkau dari luar pada IPv{ipversion}.", + "diagnosis_found_errors_and_warnings": "Ditemukan {errors} isu penting (dan {warnings} peringatan) terkait dengan {category}!", + "diagnosis_http_hairpinning_issue": "Jaringan lokal Anda sepertinya tidak mengaktifkan hairpinning.", + "diagnosis_http_partially_unreachable": "Domain {domain} tampaknya tidak dapat dijangkau melalui HTTP dari luar jaringan lokal di IPv{failed}, meskipun berfungsi di IPv{passed}.", + "confirm_app_insufficient_ram": "BAHAYA! Aplikasi ini memerlukan {required} RAM untuk menginstal/meningkatkan tetapi hanya {current} yang tersedia saat ini. Meskipun aplikasi ini dapat berjalan, proses instalasi/peningkatannya memerlukan RAM dalam jumlah besar sehingga server Anda mungkin macet dan gagal total. Jika Anda tetap bersedia mengambil risiko tersebut, ketik '{answers}'", + "confirm_app_install_thirdparty": "BAHAYA! Aplikasi ini bukan bagian dari katalog aplikasi YunoHost. Memasang aplikasi pihak ketiga dapat membahayakan integritas dan keamanan sistem Anda. Mungkin Anda TIDAK boleh menginstalnya kecuali Anda tahu apa yang Anda lakukan. TIDAK ADA DUKUNGAN yang akan diberikan jika aplikasi ini tidak berfungsi atau merusak sistem Anda… Jika Anda tetap bersedia mengambil risiko tersebut, ketik '{answers}'", + "diagnosis_dns_discrepancy": "Data DNS berikut tampaknya tidak mengikuti konfigurasi yang disarankan:
Tipe: {type}
Nama: {name}
Nilai saat ini: < code>{current}
Nilai yang diharapkan: {value}", + "diagnosis_high_number_auth_failures": "Ada sejumlah besar kegagalan autentikasi yang mencurigakan baru-baru ini. Anda mungkin ingin memastikan bahwa fail2ban berjalan dan dikonfigurasi dengan benar, atau menggunakan port khusus untuk SSH seperti yang dijelaskan di https://yunohost.org/security.", + "diagnosis_dns_try_dyndns_update_force": "Konfigurasi DNS domain ini secara otomatis dikelola oleh YunoHost. Jika tidak, Anda dapat mencoba memaksa pembaruan menggunakan yunohost dyndns update --force.", + "diagnosis_http_hairpinning_issue_details": "Ini mungkin karena kotak / router ISP Anda. Akibatnya, orang dari luar jaringan lokal Anda akan dapat mengakses server Anda seperti yang diharapkan, tetapi bukan orang dari dalam jaringan lokal (seperti Anda, mungkin?) saat menggunakan nama domain atau IP global. Anda mungkin dapat memperbaiki situasi ini dengan melihat https://yunohost.org/dns_local_network", + "diagnosis_found_warnings": "Ditemukan {warnings} bagian yang dapat ditingkatkan pada {category}.", + "diagnosis_apps_outdated_ynh_requirement": "Versi terinstal aplikasi ini hanya memerlukan yunohost >= 2.x atau 3.x, yang cenderung menunjukkan bahwa versi tersebut tidak mutakhir dengan praktik pengemasan dan bantuan yang direkomendasikan. Anda harus benar-benar mempertimbangkan untuk memutakhirkannya.", + "config_forbidden_readonly_type": "Tipe '{type}' tidak dapat disetel sebagai hanya baca, gunakan tipe lain untuk mengubah nilai ini (id argumen yang relevan: '{id}')." } From 8395b066bcf04d4374f00f96d9484cbae6b6e414 Mon Sep 17 00:00:00 2001 From: Anonymous Date: Wed, 17 Jul 2024 13:32:33 +0000 Subject: [PATCH 125/218] Translated using Weblate (French) Currently translated at 99.8% (804 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/fr/ --- locales/fr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/fr.json b/locales/fr.json index 64b682998..1ad5f7fb8 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -804,4 +804,4 @@ "migration_0027_still_on_bullseye_after_main_upgrade": "Quelque chose s'est mal passé lors de la mise à jour du système, il semble que celui-ci soit toujours sous Debian Bullseye.", "migration_0027_system_not_fully_up_to_date": "Votre système n'est pas complètement à jour. Veuillez effectuer une mise à jour classique avant de procéder à la migration vers Bullseye.", "migration_0027_yunohost_upgrade": "Démarrage de la mise à jour du cœur de YunoHost…" -} \ No newline at end of file +} From 9721685001cb6abf257815d1c2b255197680e86c Mon Sep 17 00:00:00 2001 From: xabirequejo Date: Wed, 17 Jul 2024 15:24:07 +0000 Subject: [PATCH 126/218] Translated using Weblate (Basque) Currently translated at 99.8% (804 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/eu/ --- locales/eu.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/eu.json b/locales/eu.json index 82ea49378..9280198b8 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -786,7 +786,7 @@ "migration_0027_still_on_bullseye_after_main_upgrade": "Zerbaitek kale egin du bertsio-berritze nagusian; sistemak oraindik Debian Bullseye darabilela dirudi.", "migration_0027_general_warning": "Migrazioa tentuz ibiltzeko prozedura da. YunoHosten taldeak ahal izan duen guztia egin du berrikusi eta probatzeko, baina hala ere sistemaren atalak edo aplikazioak honda litzake.\n\nBeraz, gomendagarria da:\n - Datu edo aplikazio garrantzitsuen babeskopia egitea. Informazio gehiagorako: https://yunohost.org/backup;\n - Ez izan presarik migrazioa abiaraztean: internet konexioaren eta hardwarearen arabera, litekeena da ordu apur batzuk ere behar izatea guztia dagokion bezala bertsio-berritzeko.", "migration_description_0027_migrate_to_bookworm": "Bertsio-berritu sistema Debian Bookworm eta YunoHost 12-ra", - "migration_0027_system_not_fully_up_to_date": "Sistema ez dago erabat egunean. Egizu eguneraketa arrunt bat Bullseye-rako migrazioa abiarazi baino lehen.", + "migration_0027_system_not_fully_up_to_date": "Sistema ez dago erabat egunean. Egizu eguneraketa arrunt bat Bookworm-erako migrazioa abiarazi baino lehen.", "diagnosis_ignore_filter_added": "{category} atalaren diagnostikorako iragazkia gehitu da", "migration_0027_problematic_apps_warning": "Kontuan izan ziur asko gatazkatsuak izango diren ondorengo aplikazioak aurkitu direla. Badirudi ez zirela YunoHost aplikazioen katalogotik instalatu, edo ez daude 'badabiltza' bezala etiketatuak. Ondorioz, ezin da bermatu eguneratu ondoren funtzionatzen jarraituko dutenik: {problematic_apps}", "diagnosis_ignore_missing_criteria": "Gutxienez irizpide bat gehitu behar duzu atalaren diagnostikoak kontuan har ez dezan", From ded4892b9e16b393bb9934fc26a2b236496dd355 Mon Sep 17 00:00:00 2001 From: ppr Date: Wed, 17 Jul 2024 18:51:20 +0000 Subject: [PATCH 127/218] Translated using Weblate (French) Currently translated at 100.0% (805 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/fr/ --- locales/fr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/fr.json b/locales/fr.json index 1ad5f7fb8..2dbf01313 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -802,6 +802,6 @@ "migration_0027_problematic_apps_warning": "Veuillez noter que des applications installées susceptibles de poser problème ont été détectées. Il semble qu'elles n'aient pas été installées à partir du catalogue d'applications de YunoHost, ou bien qu'elles ne soient pas marquées comme 'fonctionnelles'. Par conséquent, il ne peut pas être garanti qu'elles continueront à fonctionner après la mise à jour : {problematic_apps}", "migration_0027_start": "Démarrage de la migration vers Bookworm…", "migration_0027_still_on_bullseye_after_main_upgrade": "Quelque chose s'est mal passé lors de la mise à jour du système, il semble que celui-ci soit toujours sous Debian Bullseye.", - "migration_0027_system_not_fully_up_to_date": "Votre système n'est pas complètement à jour. Veuillez effectuer une mise à jour classique avant de procéder à la migration vers Bullseye.", + "migration_0027_system_not_fully_up_to_date": "Votre système n'est pas complètement à jour. Veuillez effectuer une mise à jour classique avant de procéder à la migration vers Bookworm.", "migration_0027_yunohost_upgrade": "Démarrage de la mise à jour du cœur de YunoHost…" } From 357896cd55cee4d0307c18c9280129ba7e8b0dba Mon Sep 17 00:00:00 2001 From: cjdw Date: Thu, 18 Jul 2024 09:24:00 +0000 Subject: [PATCH 128/218] Translated using Weblate (Indonesian) Currently translated at 69.0% (556 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 65 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 58 insertions(+), 7 deletions(-) diff --git a/locales/id.json b/locales/id.json index 9b2af8c61..1a065f47a 100644 --- a/locales/id.json +++ b/locales/id.json @@ -61,7 +61,7 @@ "app_not_upgraded": "Aplikasi '{failed_app}' gagal diperbarui, oleh karena itu pembaruan aplikasi berikut juga dibatalkan: {apps}", "app_config_unable_to_apply": "Gagal menerapkan nilai-nilai panel konfigurasi.", "app_config_unable_to_read": "Gagal membaca nilai-nilai panel konfigurasi.", - "permission_cannot_remove_main": "Menghapus izin utama tidak diperbolehkan", + "permission_cannot_remove_main": "Menyingkirkan izin utama tidak diperbolehkan", "service_description_postgresql": "Menyimpan data aplikasi (basis data SQL)", "restore_already_installed_app": "Aplikasi dengan ID '{app}' telah terpasang", "app_change_url_require_full_domain": "{app} tidak dapat dipindah ke URL baru ini karena ini memerlukan domain penuh (tanpa jalur = /)", @@ -325,7 +325,7 @@ "domain_config_cert_summary_ok": "Oke, sertifikat saat ini terlihat bagus!", "app_failed_to_upgrade_but_continue": "Gagal memperbarui aplikasi {failed_app}, melanjutkan pembaruan berikutnya seperti yang diminta. Jalankan 'yunohost log show {operation_logger_name}' untuk melihat log kegagalan", "certmanager_attempt_to_replace_valid_cert": "Anda sedang mencoba untuk menimpa sertifikat yang valid untuk domain {domain}! (Gunakan --force untuk melewati ini)", - "permission_protected": "Izin {permission} dilindungi. Anda tidak dapat menambahkan atau menghapus kelompok pengunjung ke/dari izin ini.", + "permission_protected": "Izin {permission} dilindungi. Anda tidak dapat menambahkan atau menyingkirkan grup pengunjung ke/dari izin ini.", "permission_require_account": "Izin {permission} hanya masuk akal untuk pengguna yang memiliki akun, maka ini tidak dapat diaktifkan untuk pengunjung.", "permission_update_failed": "Tidak dapat memperbarui izin '{permission}': {error}", "apps_failed_to_upgrade": "Aplikasi berikut gagal untuk diperbarui:{apps}", @@ -337,7 +337,7 @@ "domain_config_mail_in": "Surel datang", "password_too_simple_1": "Panjang kata sandi harus paling tidak 8 karakter", "password_too_simple_2": "Panjang kata sandi harus paling tidak 8 karakter dan mengandung digit, huruf kapital, dan huruf kecil", - "password_too_simple_3": "Kata sandi harus terdiri dari minimal 8 karakter dan berisi angka, huruf besar, huruf kecil, dan karakter khusus", + "password_too_simple_3": "Kata sandi harus terdiri dari minimal 8 karakter dan berisi karakter angka, besar, kecil, dan khusus", "password_too_simple_4": "Panjang kata sandi harus paling tidak 12 karakter dan mengandung digit, huruf kapital, huruf kecil, dan karakter khusus", "port_already_closed": "Porta {port} telah ditutup untuk koneksi {ip_version}", "service_description_yunomdns": "Membuat Anda bisa menemukan peladen Anda menggunakan 'yunohost.local' di jaringan lokal Anda", @@ -469,8 +469,8 @@ "config_unknown_filter_key": "Kunci filter '{filter_key}' tidak sesuai.", "backup_permission": "Izin pencadangan untuk {app}", "config_forbidden_keyword": "Kata kunci '{keyword}' sudah ada, Anda tidak dapat membuat atau menggunakan panel konfigurasi disertai pertanyaan dengan id ini.", - "good_practices_about_user_password": "Anda sekarang akan menentukan kata sandi pengguna baru. Kata sandi harus terdiri dari minimal 8 karakter—walaupun sebaiknya menggunakan kata sandi yang lebih panjang (cth. parafrasa) dan/atau variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", - "domain_dns_push_failed_to_authenticate": "Gagal autentikasi pada API registrar untuk domain '{domain}'. Besar kemungkinan karena kredensial tidak sesuai? (Galat: {error})", + "good_practices_about_user_password": "Anda sekarang akan menentukan kata sandi pengguna baru. Kata sandi harus terdiri dari minimal 8 karakter—walaupun sebaiknya menggunakan kata sandi yang lebih panjang (cth. parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", + "domain_dns_push_failed_to_authenticate": "Autentikasi gagal pada API registrar untuk domain '{domain}'. Besar kemungkinan karena kredensial tidak sesuai? (Galat: {error})", "certmanager_domain_dns_ip_differs_from_public_ip": "Rekaman DNS untuk domain '{domain}' berbeda dengan IP server ini. Silakan periksa kategori 'Catatan DNS' (dasar) dalam diagnosis untuk info lebih lanjut. Jika Anda baru saja memodifikasi rekaman A, silakan menunggu hingga rekaman tersebut disebarkan (beberapa pemeriksa sebaran DNS tersedia online). (Jika Anda tahu apa yang Anda lakukan, gunakan '--no-checks' untuk mematikan pemeriksaan ini.)", "certmanager_hit_rate_limit": "Terlalu banyak sertifikat yang telah diterbitkan untuk kumpulan domain {domain} ini baru-baru ini. Silakan coba lagi nanti. Lihat https://letsencrypt.org/docs/rate-limits/ untuk detail lebih lanjut", "custom_app_url_required": "Anda harus memberikan URL untuk meningkatkan versi aplikasi khusus Anda {app}", @@ -483,7 +483,7 @@ "config_cant_set_value_on_section": "Anda tidak dapat menetapkan satu nilai pun di seluruh bagian konfigurasi.", "backup_applying_method_custom": "Memanggil metode pencadangan khusus '{method}'…", "backup_ask_for_copying_if_needed": "Apakah Anda ingin melakukan pencadangan menggunakan {size}MB untuk sementara? (Cara ini digunakan karena beberapa berkas tidak dapat disiapkan menggunakan metode yang lebih efisien.)", - "good_practices_about_admin_password": "Anda sekarang akan menentukan kata sandi administrasi baru. Kata sandi harus terdiri dari minimal 8 karakter—walaupun sebaiknya menggunakan kata sandi yang lebih panjang (cth. parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", + "good_practices_about_admin_password": "Sekarang Anda akan menentukan kata sandi administrasi baru. Kata sandi harus terdiri dari minimal 8 karakter—walaupun sebaiknya menggunakan kata sandi yang lebih panjang (cth. parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", "certmanager_acme_not_configured_for_domain": "Tantangan ACME tidak dapat dijalankan untuk {domain} saat ini karena konfigurasi pada nginx tidak memiliki potongan kode yang sesuai… Pastikan konfigurasi nginx Anda mutakhir menggunakan `yunohost tools regen-conf nginx --dry-run --with-diff`.", "diagnosis_http_special_use_tld": "Domain {domain} berdasarkan pada domain tingkat atas (TLD) penggunaan khusus seperti .local atau .test dan oleh karena itu tidak diharapkan untuk diekspos di luar jaringan lokal.", "certmanager_self_ca_conf_file_not_found": "Tidak dapat menemukan berkas konfigurasi untuk otoritas teken mandiri (berkas: {file})", @@ -503,5 +503,56 @@ "diagnosis_http_hairpinning_issue_details": "Ini mungkin karena kotak / router ISP Anda. Akibatnya, orang dari luar jaringan lokal Anda akan dapat mengakses server Anda seperti yang diharapkan, tetapi bukan orang dari dalam jaringan lokal (seperti Anda, mungkin?) saat menggunakan nama domain atau IP global. Anda mungkin dapat memperbaiki situasi ini dengan melihat https://yunohost.org/dns_local_network", "diagnosis_found_warnings": "Ditemukan {warnings} bagian yang dapat ditingkatkan pada {category}.", "diagnosis_apps_outdated_ynh_requirement": "Versi terinstal aplikasi ini hanya memerlukan yunohost >= 2.x atau 3.x, yang cenderung menunjukkan bahwa versi tersebut tidak mutakhir dengan praktik pengemasan dan bantuan yang direkomendasikan. Anda harus benar-benar mempertimbangkan untuk memutakhirkannya.", - "config_forbidden_readonly_type": "Tipe '{type}' tidak dapat disetel sebagai hanya baca, gunakan tipe lain untuk mengubah nilai ini (id argumen yang relevan: '{id}')." + "config_forbidden_readonly_type": "Tipe '{type}' tidak dapat disetel sebagai hanya baca, gunakan tipe lain untuk mengubah nilai ini (id argumen yang relevan: '{id}').", + "diagnosis_mail_blacklist_listed_by": "IP atau domain Anda {item} masuk daftar hitam pada {blacklist_name}", + "diagnosis_mail_ehlo_bad_answer": "Layanan non-SMTP dijawab pada port 25 di IPv{ipversion}", + "diagnosis_mail_outgoing_port_25_blocked": "Server pos SMTP tidak dapat mengirim email ke server lain karena port keluar 25 diblokir pada IPv{ipversion}.", + "diagnosis_mail_queue_ok": "{nb_pending} surel tertunda di antrean pos", + "diagnosis_mail_outgoing_port_25_ok": "Server pos SMTP dapat mengirim surel (port keluar 25 tidak diblokir).", + "diagnosis_ram_low": "Sistem memiliki {available} ({available_percent}%) RAM yang tersedia (dari {total}). Hati-hati.", + "diagnosis_ram_ok": "Sistem masih memiliki {available} ({available_percent}%) RAM yang tersedia dari {total}.", + "diagnosis_mail_fcrdns_dns_missing": "Tidak ada reverse-DNS yang ditentukan dalam IPv{ipversion}. Beberapa surel mungkin gagal terkirim atau ditandai sebagai spam.", + "diagnosis_mail_outgoing_port_25_blocked_details": "Anda harus terlebih dahulu mencoba membuka blokir port keluar 25 di antarmuka router internet atau antarmuka penyedia hosting Anda. (Beberapa penyedia hosting mungkin meminta Anda mengirimi mereka tiket dukungan untuk ini).", + "diagnosis_ignored_issues": "(+ {nb_ignored} isu yang diabaikan)", + "diagnosis_no_cache": "Belum ada cache diagnosis untuk kategori '{category}'", + "diagnosis_mail_queue_unavailable": "Tidak dapat melihat jumlah surel yang tertunda dalam antrean", + "diagnosis_http_unreachable": "Domain {domain} tampaknya tidak dapat dijangkau melalui HTTP dari luar jaringan lokal.", + "diagnosis_ip_weird_resolvconf": "Resolusi DNS tampaknya berfungsi, namun sepertinya Anda menggunakan /etc/resolv.conf khusus.", + "diagnosis_mail_ehlo_could_not_diagnose": "Tidak dapat mendiagnosis apakah server pos postfix dapat dijangkau dari luar pada IPv{ipversion}.", + "diagnosis_mail_ehlo_ok": "Server pos SMTP dapat dijangkau dari luar sehingga dapat menerima email!", + "diagnosis_mail_blacklist_website": "Setelah mengidentifikasi alasan Anda terdaftar dan memperbaikinya, silakan meminta IP atau domain Anda agar disingkirkan di {blacklist_website}", + "diagnosis_processes_killed_by_oom_reaper": "Beberapa proses baru-baru ini dihentikan oleh sistem karena kehabisan memori. Hal ini biasanya merupakan gejala dari kurangnya memori pada sistem atau proses yang memakan terlalu banyak memori. Ringkasan proses yang dihentikan:\n{kills_summary}", + "diagnosis_mail_ehlo_wrong": "Server pos SMTP yang berbeda menjawab pada IPv{ipversion}. Server Anda mungkin tidak dapat menerima email.", + "diagnosis_ip_broken_resolvconf": "Resolusi nama domain tampaknya rusak pada server Anda, yang tampaknya terkait dengan /etc/resolv.conf tidak mengarah ke 127.0.0.1.", + "diagnosis_mail_fcrdns_nok_details": "Anda harus terlebih dahulu mencoba mengonfigurasi reverse-DNS dengan {ehlo_domain} di antarmuka router internet atau antarmuka penyedia hosting Anda. (Beberapa penyedia hosting mungkin meminta Anda mengirimi mereka tiket dukungan untuk ini).", + "diagnosis_mail_fcrdns_ok": "Reverse-DNS Anda telah dikonfigurasi dengan benar!", + "diagnosis_http_bad_status_code": "Sepertinya komputer lain (mungkin router internet Anda) yang menjawab bukannya server Anda.
1. Penyebab paling umum dari isu ini adalah port 80 (dan 443) tidak diteruskan dengan benar ke server Anda.
2. Pada pengaturan yang lebih rumit: pastikan tidak ada firewall atau reverse-proxy yang mengganggu.", + "diagnosis_mail_ehlo_unreachable_details": "Tidak dapat membuka koneksi pada port 25 ke server Anda di IPv{ipversion}. Tampaknya tidak dapat dijangkau.
1. Penyebab paling umum dari masalah ini adalah port 25 tidak diteruskan dengan benar ke server Anda.
2. Anda juga harus memastikan bahwa layanan postfix berjalan.
3. Pada pengaturan yang lebih rumit: pastikan tidak ada firewall atau proxy terbalik yang mengganggu.", + "diagnosis_ip_weird_resolvconf_details": "Berkas /etc/resolv.conf harus berupa symlink ke /etc/resolvconf/run/resolv.conf itu sendiri yang menunjuk ke 127.0.0.1 (dnsmasq). Jika Anda ingin mengatur DNS resolver secara manual, silakan edit /etc/resolv.dnsmasq.conf.", + "diagnosis_mail_ehlo_wrong_details": "EHLO yang diterima oleh pemeriksa jarak jauh di IPv{ipversion} berbeda dengan domain server Anda.
EHLO yang diterima: {wrong_ehlo}
Diharapkan: {right_ehlo}
Penyebab paling umum dari masalah ini adalah port 25 tidak diteruskan dengan benar ke server Anda. Alternatifnya, pastikan tidak ada firewall atau reverse-proxy yang mengganggu.", + "diagnosis_mail_outgoing_port_25_blocked_relay_vpn": "Beberapa penyedia tidak mengizinkan Anda membuka blokir port keluar 25 karena mereka tidak peduli dengan Netralitas Net.
- Beberapa dari mereka memberikan alternatif menggunakan server pos relai meskipun hal ini menyiratkan bahwa relai akan dapat memata-matai lalu lintas surel Anda.
- Alternatif yang lebih ramah privasi adalah menggunakan VPN *dengan IP publik khusus* untuk melewati batasan semacam ini . Lihat https://yunohost.org/vpn_advantage
- Anda juga dapat mempertimbangkan untuk beralih ke penyedia yang lebih ramah terhadap netralitas", + "diagnosis_ignore_already_filtered": "(Sudah ada filter diagnosis {category} dengan kriteria ini)", + "diagnosis_ignore_no_filter_found": "(Tidak ada filter {category} diagnosis dengan kriteria ini yang harus disingkirkan)", + "diagnosis_ignore_criteria_error": "Kriteria harus dalam bentuk key=value (cth. domain=yolo.test)", + "diagnosis_ignore_filter_added": "Menambahkan filter diagnosis {category}", + "diagnosis_ignore_filter_removed": "Menyingkirkan filter diagnosis {category}", + "diagnosis_never_ran_yet": "Sepertinya server ini baru saja tertata dan belum ada laporan diagnosis yang ditampilkan. Anda harus memulai dengan menjalankan diagnosis lengkap, baik dari webadmin atau menggunakan 'yunohost diagnosis run' dari baris perintah.", + "diagnosis_backports_in_sources_list": "Sepertinya apt (manajer paket) dikonfigurasi untuk menggunakan repositori backports. Kecuali Anda benar-benar tahu apa yang Anda lakukan, kami sangat tidak menyarankan menginstal paket dari backport, karena kemungkinan besar akan menimbulkan ketidakstabilan atau konflik pada sistem Anda.", + "diagnosis_mail_fcrdns_nok_alternatives_6": "Beberapa penyedia tidak mengizinkan Anda mengonfigurasi reverse-DNS (atau fitur mereka mungkin rusak…). Jika reverse-DNS Anda dikonfigurasi dengan benar untuk IPv4, Anda dapat mencoba menonaktifkan penggunaan IPv6 saat mengirim surel dengan menjalankan yunohost settings set email.smtp.smtp_allow_ipv6 -v off. Catatan: dengan solusi tersebut berarti Anda tidak akan bisa mengirim atau menerima surel dari beberapa server khusus IPv6 di luar sana.", + "diagnosis_http_timeout": "Waktu habis saat mencoba menghubungi server Anda dari luar. Tampaknya tidak dapat dijangkau.
1. Penyebab paling umum dari masalah ini adalah port 80 (dan 443) tidak diteruskan dengan benar ke server Anda.
2. Anda juga harus memastikan bahwa layanan nginx berjalan
3. Pada pengaturan yang lebih rumit: pastikan tidak ada firewall atau reverse-proxy yang mengganggu.", + "diagnosis_mail_ehlo_bad_answer_details": "Ini mungkin disebabkan oleh mesin lain yang menjawab bukannya server Anda.", + "diagnosis_package_installed_from_sury": "Beberapa paket sistem harus diturunkan versinya", + "diagnosis_ports_could_not_diagnose_details": "Galat: {error}", + "diagnosis_mail_fcrdns_different_from_ehlo_domain": "Reverse-DNS tidak dikonfigurasi dengan benar pada IPv{ipversion}. Beberapa surel mungkin gagal terkirim atau ditandai sebagai spam.", + "diagnosis_mail_fcrdns_different_from_ehlo_domain_details": "Reverse-DNS saat ini: {rdns_domain}
Nilai yang diharapkan: {ehlo_domain}", + "diagnosis_package_installed_from_sury_details": "Beberapa paket secara tidak sengaja dipasang dari repositori pihak ketiga bernama Sury. Tim YunoHost meningkatkan strategi dalam menangani paket-paket ini, namun diperkirakan bahwa beberapa pengaturan aplikasi yang terpasang PHP7.3 saat masih dalam Stretch masih memiliki beberapa inkonsistensi. Untuk memperbaiki situasi ini, Anda harus mencoba menjalankan perintah berikut: {cmd_to_fix}", + "diagnosis_ports_needed_by": "Mengekspos port ini diperlukan untuk fitur {category} (layanan {service})", + "diagnosis_mail_fcrdns_nok_alternatives_4": "Beberapa penyedia tidak mengizinkan Anda mengonfigurasi reverse-DNS (atau fitur mereka mungkin rusak…). Jika Anda mengalami isu karena hal ini, pertimbangkan solusi berikut:
- Beberapa ISP menyediakan alternatif menggunakan server pos relai ini menyiratkan bahwa relai akan dapat memata-matai lalu lintas surel Anda.
- Alternatif ramah privasi adalah menggunakan VPN *dengan IP publik khusus* untuk melewati batasan semacam ini. Lihat https://yunohost.org/vpn_advantage
- Atau bisa juga ke beralih ke penyedia lain", + "diagnosis_ip_broken_dnsresolution": "Resolusi nama domain tampaknya rusak karena beberapa alasan… Apakah firewall memblokir permintaan DNS?", + "diagnosis_mail_queue_too_big": "Terlalu banyak surel yang tertunda dalam antrean pos ({nb_pending} surel)", + "diagnosis_ports_could_not_diagnose": "Tidak dapat mendiagnosis apakah port dapat dijangkau dari luar pada IPv{ipversion}.", + "diagnosis_ports_forwarding_tip": "Untuk memperbaiki masalah ini, kemungkinan besar Anda perlu mengonfigurasi penerusan port pada router internet Anda seperti yang dijelaskan di https://yunohost.org/isp_box_config", + "diagnosis_mail_ehlo_unreachable": "Server pos SMTP tidak dapat dijangkau dari luar pada IPv{ipversion}. Itu tidak akan dapat menerima email.", + "diagnosis_ignore_missing_criteria": "Anda harus memberikan setidaknya satu kriteria sebagai kategori diagnosis untuk diabaikan", + "diagnosis_ignore_no_issue_found": "Tidak menemukan isu yang sesuai dengan kriteria tersebut." } From bfbc7035ddbde26ee094d008c07d3acd60eb9a56 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 19 Jul 2024 16:55:46 +0200 Subject: [PATCH 129/218] Update changelog for 11.2.22 --- debian/changelog | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/debian/changelog b/debian/changelog index f7840751c..121d4cb68 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +yunohost (11.2.22) stable; urgency=low + + - logs: fix "log list" : use root_dir for iglob / make sure we use absolute paths ([#1913](http://github.com/YunoHost/yunohost/pull/1913)) + - bullseye->bookworm: remove pkg_resources from pip freeze ([#1912](http://github.com/YunoHost/yunohost/pull/1912)) + - bullseye->bookworm: explicitly install yunohost-portal (4232fc7c) + - bullseye->bookworm: explicitly remove python3.9 and python3.9-venv which seems to confuse aptitude... (079cdc26) + - bullseye->bookworm: try the yunohost upgrade without unholding the app-ynh-deps virtual packages, then after unholding if it didnt work for some reason (a8fd6afe) + - bullseye->bookworm: automatically add non-free-firmware if non-free is enabled (97bb6bde) + - bullseye->bookworm: trigger the 'new' migrations from inside the bullseye->bookworm migration (f11f1197) + - i18n: Translations updated for Basque, French, Indonesian + + Thanks to all contributors <3 ! (Anonymous, cjdw, Kayou, ppr, xabirequejo) + + -- Alexandre Aubin Fri, 19 Jul 2024 16:51:55 +0200 + yunohost (11.2.21.2) stable; urgency=low - bullseye->bookworm migration: tweak message to reflect the fact that metronome and rspamd will be applications starting with bookworm (64c8d9e8) From 57b4e240e18aef219705a71491e885196b88433a Mon Sep 17 00:00:00 2001 From: cjdw Date: Sat, 20 Jul 2024 03:10:18 +0000 Subject: [PATCH 130/218] Translated using Weblate (Indonesian) Currently translated at 69.6% (561 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/locales/id.json b/locales/id.json index 1a065f47a..635bd6c89 100644 --- a/locales/id.json +++ b/locales/id.json @@ -554,5 +554,44 @@ "diagnosis_ports_forwarding_tip": "Untuk memperbaiki masalah ini, kemungkinan besar Anda perlu mengonfigurasi penerusan port pada router internet Anda seperti yang dijelaskan di https://yunohost.org/isp_box_config", "diagnosis_mail_ehlo_unreachable": "Server pos SMTP tidak dapat dijangkau dari luar pada IPv{ipversion}. Itu tidak akan dapat menerima email.", "diagnosis_ignore_missing_criteria": "Anda harus memberikan setidaknya satu kriteria sebagai kategori diagnosis untuk diabaikan", - "diagnosis_ignore_no_issue_found": "Tidak menemukan isu yang sesuai dengan kriteria tersebut." + "diagnosis_ignore_no_issue_found": "Tidak menemukan isu yang sesuai dengan kriteria tersebut.", + "domain_dns_push_already_up_to_date": "Rekaman sudah diperbarui, tidak ada yang harus dilakukan.", + "domain_cannot_remove_main_add_new_one": "Anda tidak dapat menyingkirkan '{domain}' karena ini adalah domain utama dan satu-satunya domain Anda, Anda harus menambahkan domain lain terlebih dahulu menggunakan 'yunohost domain add ', kemudian ditetapkan sebagai domain utama menggunakan 'yunohost domain main-domain -n ' lalu Anda dapat menyingkirkan domain '{domain}' menggunakan 'yunohost domain remove {domain}'.", + "diagnosis_sshd_config_insecure": "Konfigurasi SSH tampaknya telah dimodifikasi secara manual, dan tidak aman karena tidak berisi pedoman 'AllowGroups' atau 'AllowUsers' untuk membatasi akses ke pengguna yang berwenang.", + "diagnosis_unknown_categories": "Kategori berikut tidak diketahui: {categories}", + "domain_dns_conf_is_just_a_recommendation": "Perintah ini menunjukkan kepada Anda konfigurasi yang *direkomendasikan*. Ini sebenarnya tidak mengatur konfigurasi DNS untuk Anda. Anda bertanggung jawab untuk mengonfigurasi zona DNS di registrar Anda sesuai dengan rekomendasi ini.", + "diagnosis_sshd_config_inconsistent": "Sepertinya port SSH telah dimodifikasi secara manual di /etc/ssh/sshd_config. Sejak YunoHost 4.2, pengaturan global baru 'security.ssh.ssh_port' tersedia untuk menghindari pengeditan konfigurasi secara manual.", + "disk_space_not_sufficient_install": "Ruang disket yang tersisa tidak cukup untuk menginstal aplikasi ini", + "domain_cannot_add_muc_upload": "Anda tidak dapat menambahkan domain yang dimulai dengan 'muc.'. Nama seperti ini dicadangkan untuk fitur obrolan multi-pengguna XMPP yang terintegrasi ke dalam YunoHost.", + "domain_config_auth_application_key": "Kunci aplikasi", + "domain_config_auth_application_secret": "Kunci rahasia aplikasi", + "domain_config_auth_consumer_key": "Kunci konsumen", + "diagnosis_rootfstotalspace_warning": "Sistem file root hanya memiliki total {space}. Ini mungkin oke, tapi hati-hati karena pada akhirnya Anda mungkin akan kehabisan ruang disket dengan cepat… Disarankan untuk memiliki setidaknya 16 GB untuk sistem file root.", + "diagnosis_swap_tip": "Harap berhati-hati dan sadari bahwa jika server adalah hosting swap pada kartu SD atau penyimpanan SSD, hal ini dapat mengurangi masa pakai perangkat secara drastis.", + "diagnosis_regenconf_manually_modified_details": "Ini mungkin OK jika Anda tahu apa yang Anda lakukan! YunoHost akan berhenti memperbarui file ini secara otomatis… Namun berhati-hatilah karena pemutakhiran YunoHost mungkin berisi perubahan penting yang disarankan. Jika mau, Anda dapat memeriksa perbedaannya dengan yunohost tools regen-conf {category} --dry-run --with-diff dan memaksa reset ke konfigurasi yang disarankan dengan yunohost tools regen-conf {category} --force", + "diagnosis_rootfstotalspace_critical": "Sistem file root hanya memiliki total {space} yang cukup mengkhawatirkan! Kemungkinan besar Anda akan kehabisan ruang disket dengan sangat cepat! Disarankan untuk memiliki setidaknya 16 GB untuk sistem file root.", + "domain_config_acme_eligible_explain": "Sepertinya domain ini belum siap untuk sertifikat Let's Encrypt. Silakan periksa konfigurasi DNS dan jangkauan server HTTP Anda. Bagian 'Rekaman DNS' dan 'Web' di laman diagnosis dapat membantu Anda memahami apa yang salah dalam konfigurasi.", + "domain_config_cert_issuer": "Otoritas sertifikasi", + "domain_config_cert_renew_help": "Sertifikat akan diperpanjang secara otomatis selama 15 hari terakhir masa berlaku. Anda dapat memperbaruinya secara manual jika Anda mau. (Tidak direkomendasikan).", + "domain_config_cert_summary_selfsigned": "PERINGATAN: Sertifikat saat ini tandatangan-otomatis. Browser akan menampilkan peringatan seram kepada pengunjung baru!", + "domain_config_xmpp_help": "Catatan: beberapa fitur XMPP mengharuskan Anda memperbarui rekaman DNS dan membuat ulang sertifikat Lets Encrypt agar dapat diaktifkan", + "domain_dns_conf_special_use_tld": "Domain ini berdasarkan pada domain tingkat atas (TLD) penggunaan khusus seperti .local atau .test dan oleh karena itu tidak diharapkan memiliki rekaman DNS yang sebenarnya.", + "domain_dns_push_failed": "Gagal total dalam memperbarui rekaman DNS.", + "diagnosis_using_stable_codename_details": "Biasanya hal ini disebabkan oleh kesalahan konfigurasi dari penyedia hosting Anda. Ini berbahaya, karena segera setelah versi Debian berikutnya menjadi 'stable' yang baru, apt akan melakukan upgrade pada semua paket sistem tanpa melalui prosedur migrasi yang benar. Disarankan untuk memperbaikinya dengan mengedit sumber apt pada repositori dasar Debian, dan mengganti kata kunci stable dengan bullseye. File konfigurasi yang sesuai harus /etc/apt/sources.list, atau file dalam /etc/apt/sources.list.d/.", + "domain_cannot_add_xmpp_upload": "Anda tidak dapat menambahkan domain yang dimulai dengan 'xmpp-upload.'. Nama seperti ini dicadangkan untuk fitur unggah XMPP yang terintegrasi ke dalam YunoHost.", + "diagnosis_using_yunohost_testing": "apt (manajer paket sistem) saat ini dikonfigurasi agar memasang pemutakhiran 'testing' apa pun untuk inti YunoHost.", + "diagnosis_using_yunohost_testing_details": "Ini mungkin OK jika Anda tahu apa yang Anda lakukan, tapi perhatikan catatan rilis sebelum memasang pemutakhiran YunoHost! Jika Anda ingin menonaktifkan peningkatan 'testing', Anda harus menghapus kata kunci testing dari /etc/apt/sources.list.d/yunohost.list.", + "domain_cannot_remove_main": "Anda tidak dapat menyingkirkan '{domain}' karena ini adalah domain utama, Anda harus terlebih dahulu menetapkan domain lain sebagai domain utama menggunakan 'yunohost domain main-domain -n '; berikut daftar kandidat domain: {other_domains}", + "domain_config_acme_eligible": "kelayakan ACME", + "domain_config_auth_entrypoint": "Titik entri API", + "diagnosis_swap_notsomuch": "Sistem hanya memiliki {total} swap. Anda harus mempertimbangkan untuk memiliki setidaknya {recommended} untuk menghindari situasi di mana sistem kehabisan memori.", + "domain_config_cert_validity": "Validitas", + "domain_config_default_app_help": "Orang-orang akan secara otomatis diarahkan ke aplikasi ini ketika membuka domain ini. Jika tidak ada aplikasi yang ditentukan, orang akan diarahkan ke formulir login portal pengguna.", + "diagnosis_services_bad_status_tip": "Anda dapat mencoba mengulang layanan, dan jika tidak berhasil, lihat log layanan pada webadmin (dari baris perintah, Anda dapat melakukannya dengan yunohost service restart {service} dan yunohost service log {service} ).", + "diagnosis_sshd_config_inconsistent_details": "Silakan jalankan yunohost settings set security.ssh.ssh_port -v PORT_SSH_ANDA untuk menentukan port SSH, dan periksa yunohost tools regen-conf ssh --dry-run --with-diff dan yunohost tools regen-conf ssh --force untuk mengatur ulang konfigurasi Anda sesuai rekomendasi YunoHost.", + "diagnosis_swap_none": "Sistem tidak memiliki swap sama sekali. Anda harus mempertimbangkan untuk menambahkan setidaknya {recommended} swap untuk menghindari situasi di mana sistem kehabisan memori.", + "diagnosis_using_stable_codename": "apt (pengelola paket sistem) saat ini dikonfigurasi untuk menginstal paket dari nama kode 'stable', bukan nama kode versi Debian saat ini (bullseye).", + "disk_space_not_sufficient_update": "Ruang disket yang tersisa tidak cukup untuk memperbarui aplikasi ini", + "domain_config_auth_key": "Kunci otentikasi", + "domain_config_auth_secret": "Rahasia otentikasi" } From 179daf68dfe0cabbd0a1a9b635fc5961ab09a64d Mon Sep 17 00:00:00 2001 From: Jose Riha Date: Fri, 19 Jul 2024 09:23:20 +0000 Subject: [PATCH 131/218] Translated using Weblate (Slovak) Currently translated at 30.5% (246 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/sk/ --- locales/sk.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/locales/sk.json b/locales/sk.json index a58b1f960..2586b5930 100644 --- a/locales/sk.json +++ b/locales/sk.json @@ -278,5 +278,6 @@ "domain_config_mail_in": "Prichádzajúce e-maily", "domain_config_cert_summary": "Stav certifikátu", "domain_config_xmpp": "Krátke správy (XMPP)", - "log_app_makedefault": "Nastaviť '{}' ako predvolenú aplikáciu" -} \ No newline at end of file + "log_app_makedefault": "Nastaviť '{}' ako predvolenú aplikáciu", + "domain_config_cert_renew_help": "Certifikát bude automaticky obnovený po 15 dňoch platnosti. Ak chcete, môžete ho obnoviť aj ručne. (Neodporúča sa)." +} From 3d53cf046741ef7c8202b056fa77bab92077d799 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 20 Jul 2024 22:47:44 +0200 Subject: [PATCH 132/218] helpers: force sourcing getopts before the other helpers to prevent stupid issues (in particular when renaming phpversion to php_version in helpers2.1) --- helpers/helpers | 1 + 1 file changed, 1 insertion(+) diff --git a/helpers/helpers b/helpers/helpers index 64f9322ae..393628052 100644 --- a/helpers/helpers +++ b/helpers/helpers @@ -13,6 +13,7 @@ YNH_HELPERS_DIR="$SCRIPT_DIR/helpers.v${YNH_HELPERS_VERSION}.d" case "$YNH_HELPERS_VERSION" in "1" | "2" | "2.1") readarray -t HELPERS < <(find -L "$YNH_HELPERS_DIR" -mindepth 1 -maxdepth 1 -type f) + source $YNH_HELPERS_VERSION/getopts for helper in "${HELPERS[@]}"; do [ -r "$helper" ] && source "$helper" done From f6c270e1d2df244a805a8d8caee9aad6cda2ac03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sun, 21 Jul 2024 10:29:45 +0200 Subject: [PATCH 133/218] [Fix] Make slapd listen also on ipv6 --- conf/slapd/slapd.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/slapd/slapd.default b/conf/slapd/slapd.default index cb6f1b6d0..6baca1ed5 100644 --- a/conf/slapd/slapd.default +++ b/conf/slapd/slapd.default @@ -21,7 +21,7 @@ SLAPD_PIDFILE= # sockets. # Example usage: # SLAPD_SERVICES="ldap://127.0.0.1:389/ ldaps:/// ldapi:///" -SLAPD_SERVICES="ldap://127.0.0.1:389/ ldaps:/// ldapi:///" +SLAPD_SERVICES="ldap://localhost:389/ ldaps:/// ldapi:///" # If SLAPD_NO_START is set, the init script will not start or restart # slapd (but stop will still work). Uncomment this if you are From c90a691448ff89980534de8521c23efd511ed697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Deparis?= Date: Mon, 22 Jul 2024 12:54:45 +0200 Subject: [PATCH 134/218] fix: Remove SenderScore from the dnsbl_list.yml file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since march 1st this service is behind a fair-use paywall, which generates lot of alert email confusing people whether their IP/domain is actually blocked, when actually it’s just the service failing. See: https://knowledge.validity.com/s/articles/Accessing-Validity-reputation-data-through-DNS?language=en_US https://forum.yunohost.org/t/senderscore-blacklist-blocklist-because-of-excessive-number-of-queries/30395 --- share/dnsbl_list.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/share/dnsbl_list.yml b/share/dnsbl_list.yml index ad86fd2a6..f7a0acaa5 100644 --- a/share/dnsbl_list.yml +++ b/share/dnsbl_list.yml @@ -168,15 +168,6 @@ ipv6: false domain: false non_blacklisted_return_code: [] -# Used by GAFAM -- name: SenderScore Blacklist - dns_server: bl.score.senderscore.com - website: https://senderscore.com - ipv4: true - ipv6: false - domain: false -# Added cause it supports IPv6 - non_blacklisted_return_code: [] - name: AntiCaptcha.NET IPv6 dns_server: dnsbl6.anticaptcha.net website: http://anticaptcha.net/ From a7edbc0cc7690c00a5f067445d790bda82974413 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:08:40 +0200 Subject: [PATCH 135/218] Update helpers: go home aleks u drunk --- helpers/helpers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/helpers b/helpers/helpers index 393628052..10cefdcad 100644 --- a/helpers/helpers +++ b/helpers/helpers @@ -13,7 +13,7 @@ YNH_HELPERS_DIR="$SCRIPT_DIR/helpers.v${YNH_HELPERS_VERSION}.d" case "$YNH_HELPERS_VERSION" in "1" | "2" | "2.1") readarray -t HELPERS < <(find -L "$YNH_HELPERS_DIR" -mindepth 1 -maxdepth 1 -type f) - source $YNH_HELPERS_VERSION/getopts + source $YNH_HELPERS_DIR/getopts for helper in "${HELPERS[@]}"; do [ -r "$helper" ] && source "$helper" done From b2492ffc3dd85cae77c272720d8e59c4d6310af1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 23 Jul 2024 19:05:34 +0200 Subject: [PATCH 136/218] hmpf fix log list again --- src/log.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/log.py b/src/log.py index 7e17d527e..d676e13ed 100755 --- a/src/log.py +++ b/src/log.py @@ -87,21 +87,20 @@ def _update_log_parent_symlinks(): one_year_ago = time.time() - 365 * 24 * 3600 - logs = glob.iglob("*" + METADATA_FILE_EXT, root_dir=OPERATIONS_PATH) + logs = glob.iglob(OPERATIONS_PATH + "*" + METADATA_FILE_EXT) for log_md in logs: - log_md_fullpath = os.path.join(OPERATIONS_PATH, log_md) - if os.path.getctime(log_md_fullpath) < one_year_ago: + if os.path.getctime(log_md) < one_year_ago: # Let's ignore files older than one year because hmpf reading a shitload of yml is not free continue - name = log_md[: -len(METADATA_FILE_EXT)] + name = log_md.split("/")[-1][: -len(METADATA_FILE_EXT)] parent_symlink = os.path.join(OPERATIONS_PATH, f".{name}.parent.yml") if os.path.islink(parent_symlink): continue try: metadata = ( - read_yaml(log_md_fullpath) or {} + read_yaml(log_md) or {} ) # Making sure this is a dict and not None..? except Exception as e: # If we can't read the yaml for some reason, report an error and ignore this entry... @@ -136,9 +135,9 @@ def log_list(limit=None, with_details=False, with_suboperations=False): one_year_ago = time.time() - 365 * 24 * 3600 logs = [ - x - for x in os.listdir(OPERATIONS_PATH) - if x.endswith(METADATA_FILE_EXT) and os.path.getctime(x) > one_year_ago + x.split("/")[-1] + for x in glob.iglob(OPERATIONS_PATH + "*" + METADATA_FILE_EXT) + if os.path.getctime(x) > one_year_ago ] logs = list(reversed(sorted(logs))) From 437189d8c1d2bad76fc7369eef0275d3868a64c7 Mon Sep 17 00:00:00 2001 From: cjdw Date: Sat, 20 Jul 2024 12:06:02 +0000 Subject: [PATCH 137/218] Translated using Weblate (Indonesian) Currently translated at 75.1% (605 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/locales/id.json b/locales/id.json index 635bd6c89..80533870e 100644 --- a/locales/id.json +++ b/locales/id.json @@ -555,13 +555,13 @@ "diagnosis_mail_ehlo_unreachable": "Server pos SMTP tidak dapat dijangkau dari luar pada IPv{ipversion}. Itu tidak akan dapat menerima email.", "diagnosis_ignore_missing_criteria": "Anda harus memberikan setidaknya satu kriteria sebagai kategori diagnosis untuk diabaikan", "diagnosis_ignore_no_issue_found": "Tidak menemukan isu yang sesuai dengan kriteria tersebut.", - "domain_dns_push_already_up_to_date": "Rekaman sudah diperbarui, tidak ada yang harus dilakukan.", - "domain_cannot_remove_main_add_new_one": "Anda tidak dapat menyingkirkan '{domain}' karena ini adalah domain utama dan satu-satunya domain Anda, Anda harus menambahkan domain lain terlebih dahulu menggunakan 'yunohost domain add ', kemudian ditetapkan sebagai domain utama menggunakan 'yunohost domain main-domain -n ' lalu Anda dapat menyingkirkan domain '{domain}' menggunakan 'yunohost domain remove {domain}'.", - "diagnosis_sshd_config_insecure": "Konfigurasi SSH tampaknya telah dimodifikasi secara manual, dan tidak aman karena tidak berisi pedoman 'AllowGroups' atau 'AllowUsers' untuk membatasi akses ke pengguna yang berwenang.", + "domain_dns_push_already_up_to_date": "Rekaman sudah diperbarui, biarkan saja.", + "domain_cannot_remove_main_add_new_one": "Anda tidak dapat menyingkirkan '{domain}' karena ini adalah domain utama dan satu-satunya domain Anda, Anda harus menambahkan domain lain terlebih dahulu menggunakan 'yunohost domain add ', kemudian menetapkannya sebagai domain utama menggunakan 'yunohost domain main-domain -n ' kemudian Anda dapat menyingkirkan domain '{domain}' menggunakan 'yunohost domain remove {domain}'.", + "diagnosis_sshd_config_insecure": "Konfigurasi SSH tampaknya telah dimodifikasi secara manual, dan tidak aman karena tidak berisi pedoman 'AllowGroups' atau 'AllowUsers' untuk membatasi akses kepada pengguna yang berwenang.", "diagnosis_unknown_categories": "Kategori berikut tidak diketahui: {categories}", "domain_dns_conf_is_just_a_recommendation": "Perintah ini menunjukkan kepada Anda konfigurasi yang *direkomendasikan*. Ini sebenarnya tidak mengatur konfigurasi DNS untuk Anda. Anda bertanggung jawab untuk mengonfigurasi zona DNS di registrar Anda sesuai dengan rekomendasi ini.", "diagnosis_sshd_config_inconsistent": "Sepertinya port SSH telah dimodifikasi secara manual di /etc/ssh/sshd_config. Sejak YunoHost 4.2, pengaturan global baru 'security.ssh.ssh_port' tersedia untuk menghindari pengeditan konfigurasi secara manual.", - "disk_space_not_sufficient_install": "Ruang disket yang tersisa tidak cukup untuk menginstal aplikasi ini", + "disk_space_not_sufficient_install": "Ruang disket yang tersisa tidak cukup untuk memasang aplikasi ini", "domain_cannot_add_muc_upload": "Anda tidak dapat menambahkan domain yang dimulai dengan 'muc.'. Nama seperti ini dicadangkan untuk fitur obrolan multi-pengguna XMPP yang terintegrasi ke dalam YunoHost.", "domain_config_auth_application_key": "Kunci aplikasi", "domain_config_auth_application_secret": "Kunci rahasia aplikasi", @@ -569,29 +569,39 @@ "diagnosis_rootfstotalspace_warning": "Sistem file root hanya memiliki total {space}. Ini mungkin oke, tapi hati-hati karena pada akhirnya Anda mungkin akan kehabisan ruang disket dengan cepat… Disarankan untuk memiliki setidaknya 16 GB untuk sistem file root.", "diagnosis_swap_tip": "Harap berhati-hati dan sadari bahwa jika server adalah hosting swap pada kartu SD atau penyimpanan SSD, hal ini dapat mengurangi masa pakai perangkat secara drastis.", "diagnosis_regenconf_manually_modified_details": "Ini mungkin OK jika Anda tahu apa yang Anda lakukan! YunoHost akan berhenti memperbarui file ini secara otomatis… Namun berhati-hatilah karena pemutakhiran YunoHost mungkin berisi perubahan penting yang disarankan. Jika mau, Anda dapat memeriksa perbedaannya dengan yunohost tools regen-conf {category} --dry-run --with-diff dan memaksa reset ke konfigurasi yang disarankan dengan yunohost tools regen-conf {category} --force", - "diagnosis_rootfstotalspace_critical": "Sistem file root hanya memiliki total {space} yang cukup mengkhawatirkan! Kemungkinan besar Anda akan kehabisan ruang disket dengan sangat cepat! Disarankan untuk memiliki setidaknya 16 GB untuk sistem file root.", + "diagnosis_rootfstotalspace_critical": "Sistem berkas root hanya memiliki total {space} yang cukup mengkhawatirkan! Kemungkinan besar Anda akan kehabisan ruang disket dengan sangat cepat! Disarankan untuk memiliki setidaknya 16 GB untuk sistem berkas root.", "domain_config_acme_eligible_explain": "Sepertinya domain ini belum siap untuk sertifikat Let's Encrypt. Silakan periksa konfigurasi DNS dan jangkauan server HTTP Anda. Bagian 'Rekaman DNS' dan 'Web' di laman diagnosis dapat membantu Anda memahami apa yang salah dalam konfigurasi.", "domain_config_cert_issuer": "Otoritas sertifikasi", - "domain_config_cert_renew_help": "Sertifikat akan diperpanjang secara otomatis selama 15 hari terakhir masa berlaku. Anda dapat memperbaruinya secara manual jika Anda mau. (Tidak direkomendasikan).", - "domain_config_cert_summary_selfsigned": "PERINGATAN: Sertifikat saat ini tandatangan-otomatis. Browser akan menampilkan peringatan seram kepada pengunjung baru!", + "domain_config_cert_renew_help": "Sertifikat akan diperpanjang secara otomatis selama 15 hari validitas terakhir. Anda dapat memperbaruinya secara manual jika Anda mau. (Tidak direkomendasikan).", + "domain_config_cert_summary_selfsigned": "PERINGATAN: Sertifikat saat ini ditandatangani sendiri. Browser akan menampilkan peringatan seram kepada pengunjung baru!", "domain_config_xmpp_help": "Catatan: beberapa fitur XMPP mengharuskan Anda memperbarui rekaman DNS dan membuat ulang sertifikat Lets Encrypt agar dapat diaktifkan", - "domain_dns_conf_special_use_tld": "Domain ini berdasarkan pada domain tingkat atas (TLD) penggunaan khusus seperti .local atau .test dan oleh karena itu tidak diharapkan memiliki rekaman DNS yang sebenarnya.", + "domain_dns_conf_special_use_tld": "Domain ini berdasarkan pada domain tingkat atas (TLD) penggunaan khusus seperti .local atau .test dan oleh karena itu tidak diharapkan memiliki rekaman DNS yang sesungguhnya.", "domain_dns_push_failed": "Gagal total dalam memperbarui rekaman DNS.", "diagnosis_using_stable_codename_details": "Biasanya hal ini disebabkan oleh kesalahan konfigurasi dari penyedia hosting Anda. Ini berbahaya, karena segera setelah versi Debian berikutnya menjadi 'stable' yang baru, apt akan melakukan upgrade pada semua paket sistem tanpa melalui prosedur migrasi yang benar. Disarankan untuk memperbaikinya dengan mengedit sumber apt pada repositori dasar Debian, dan mengganti kata kunci stable dengan bullseye. File konfigurasi yang sesuai harus /etc/apt/sources.list, atau file dalam /etc/apt/sources.list.d/.", "domain_cannot_add_xmpp_upload": "Anda tidak dapat menambahkan domain yang dimulai dengan 'xmpp-upload.'. Nama seperti ini dicadangkan untuk fitur unggah XMPP yang terintegrasi ke dalam YunoHost.", "diagnosis_using_yunohost_testing": "apt (manajer paket sistem) saat ini dikonfigurasi agar memasang pemutakhiran 'testing' apa pun untuk inti YunoHost.", "diagnosis_using_yunohost_testing_details": "Ini mungkin OK jika Anda tahu apa yang Anda lakukan, tapi perhatikan catatan rilis sebelum memasang pemutakhiran YunoHost! Jika Anda ingin menonaktifkan peningkatan 'testing', Anda harus menghapus kata kunci testing dari /etc/apt/sources.list.d/yunohost.list.", "domain_cannot_remove_main": "Anda tidak dapat menyingkirkan '{domain}' karena ini adalah domain utama, Anda harus terlebih dahulu menetapkan domain lain sebagai domain utama menggunakan 'yunohost domain main-domain -n '; berikut daftar kandidat domain: {other_domains}", - "domain_config_acme_eligible": "kelayakan ACME", + "domain_config_acme_eligible": "Kelayakan ACME", "domain_config_auth_entrypoint": "Titik entri API", "diagnosis_swap_notsomuch": "Sistem hanya memiliki {total} swap. Anda harus mempertimbangkan untuk memiliki setidaknya {recommended} untuk menghindari situasi di mana sistem kehabisan memori.", "domain_config_cert_validity": "Validitas", - "domain_config_default_app_help": "Orang-orang akan secara otomatis diarahkan ke aplikasi ini ketika membuka domain ini. Jika tidak ada aplikasi yang ditentukan, orang akan diarahkan ke formulir login portal pengguna.", + "domain_config_default_app_help": "Orang-orang akan secara otomatis diarahkan ke aplikasi ini ketika membuka domain ini. Jika tidak ada aplikasi yang ditentukan, orang-orang akan diarahkan ke formulir login portal pengguna.", "diagnosis_services_bad_status_tip": "Anda dapat mencoba mengulang layanan, dan jika tidak berhasil, lihat log layanan pada webadmin (dari baris perintah, Anda dapat melakukannya dengan yunohost service restart {service} dan yunohost service log {service} ).", "diagnosis_sshd_config_inconsistent_details": "Silakan jalankan yunohost settings set security.ssh.ssh_port -v PORT_SSH_ANDA untuk menentukan port SSH, dan periksa yunohost tools regen-conf ssh --dry-run --with-diff dan yunohost tools regen-conf ssh --force untuk mengatur ulang konfigurasi Anda sesuai rekomendasi YunoHost.", "diagnosis_swap_none": "Sistem tidak memiliki swap sama sekali. Anda harus mempertimbangkan untuk menambahkan setidaknya {recommended} swap untuk menghindari situasi di mana sistem kehabisan memori.", - "diagnosis_using_stable_codename": "apt (pengelola paket sistem) saat ini dikonfigurasi untuk menginstal paket dari nama kode 'stable', bukan nama kode versi Debian saat ini (bullseye).", + "diagnosis_using_stable_codename": "apt (pengelola paket sistem) saat ini dikonfigurasi untuk memasang paket dari nama kode 'stable', bukan nama kode versi Debian saat ini (bullseye).", "disk_space_not_sufficient_update": "Ruang disket yang tersisa tidak cukup untuk memperbarui aplikasi ini", "domain_config_auth_key": "Kunci otentikasi", - "domain_config_auth_secret": "Rahasia otentikasi" + "domain_config_auth_secret": "Rahasia otentikasi", + "domain_dns_push_record_failed": "Gagal mencatat {action} {type}/{name} : {error}", + "domain_dns_push_managed_in_parent_domain": "Fitur konfigurasi DNS otomatis dikelola di domain induk {parent_domain}.", + "domain_dns_pushing": "Mendorong rekaman DNS…", + "domain_dns_push_not_applicable": "Fitur konfigurasi DNS otomatis tidak berlaku untuk domain {domain}. Anda harus mengonfigurasi rekaman DNS Anda secara manual dengan mengikuti dokumentasi di https://yunohost.org/dns_config.", + "domain_dns_registrar_experimental": "Sejauh ini, antarmuka dengan API **{registrar}** belum diuji dan ditinjau dengan benar oleh komunitas YunoHost. Dukungan masih **sangat eksperimental** - waspadalah!", + "domain_dns_push_partial_failure": "Rekaman DNS diperbarui sebagian: beberapa peringatan/galat dilaporkan.", + "domain_dns_registrar_not_supported": "YunoHost tidak dapat secara otomatis mendeteksi registrar yang menangani domain ini. Anda harus mengonfigurasi rekaman DNS Anda secara manual dengan mengikuti dokumentasi di https://yunohost.org/dns.", + "domain_dns_push_failed_to_list": "Gagal mencantumkan rekaman saat ini menggunakan API registrar: {error}", + "domain_dns_push_success": "Rekaman DNS diperbarui!", + "domain_dns_registrar_managed_in_parent_domain": "Domain ini adalah subdomain dari {parent_domain_link}. Konfigurasi registrar DNS harus dikelola di panel konfigurasi {parent_domain}." } From 67c5edc40e83d117b2dad9739fbc56604e45eff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20M?= Date: Sun, 21 Jul 2024 06:35:54 +0000 Subject: [PATCH 138/218] Translated using Weblate (Galician) Currently translated at 100.0% (805 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/gl/ --- locales/gl.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/gl.json b/locales/gl.json index 7140a8620..dc7e0bfdf 100644 --- a/locales/gl.json +++ b/locales/gl.json @@ -803,5 +803,5 @@ "migration_0027_modified_files": "Detectamos que os seguintes ficheiros semella foron modificados manualmente e poderían ser sobreescritos durante a actualización: {manually_modified_files}", "migration_0027_not_enough_free_space": "Hai moi pouco espazo en /var/! Deberías ter polo menos 1GB libre para realizar a migración.", "migration_0027_patch_yunohost_conflicts": "Aplicando a solución para resolver o problema conflictivo…", - "migration_0027_system_not_fully_up_to_date": "O teu sistema non está totalmente actualizado. Fai unha actualización corrente antes de iniciar a migración a Bullseye." + "migration_0027_system_not_fully_up_to_date": "O teu sistema non está totalmente actualizado. Fai unha actualización corrente antes de iniciar a migración a Bookworm." } From b010219814af30d2ff83ff84961441245b4ac5b1 Mon Sep 17 00:00:00 2001 From: cjdw Date: Sun, 21 Jul 2024 13:33:47 +0000 Subject: [PATCH 139/218] Translated using Weblate (Indonesian) Currently translated at 77.6% (625 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/locales/id.json b/locales/id.json index 80533870e..dc136a258 100644 --- a/locales/id.json +++ b/locales/id.json @@ -603,5 +603,25 @@ "domain_dns_registrar_not_supported": "YunoHost tidak dapat secara otomatis mendeteksi registrar yang menangani domain ini. Anda harus mengonfigurasi rekaman DNS Anda secara manual dengan mengikuti dokumentasi di https://yunohost.org/dns.", "domain_dns_push_failed_to_list": "Gagal mencantumkan rekaman saat ini menggunakan API registrar: {error}", "domain_dns_push_success": "Rekaman DNS diperbarui!", - "domain_dns_registrar_managed_in_parent_domain": "Domain ini adalah subdomain dari {parent_domain_link}. Konfigurasi registrar DNS harus dikelola di panel konfigurasi {parent_domain}." + "domain_dns_registrar_managed_in_parent_domain": "Domain ini adalah subdomain dari {parent_domain_link}. Konfigurasi registrar DNS harus dikelola di panel konfigurasi {parent_domain}.", + "dyndns_domain_not_provided": "Penyedia DynDNS {provider} tidak dapat menyediakan domain {domain}.", + "dyndns_key_not_found": "Kunci DNS tidak ditemukan di domain tersebut", + "dyndns_no_domain_registered": "Tidak ada domain yang terdaftar pada DynDNS", + "domain_registrar_is_not_configured": "Registrar belum dikonfigurasi untuk domain {domain}.", + "domain_unknown": "Domain '{domain}' tidak diketahui", + "dyndns_provider_unreachable": "Tidak dapat menghubungi penyedia DynDNS {provider}: YunoHost Anda tidak terhubung dengan benar ke internet atau server dynette sedang kolaps.", + "dyndns_subscribe_failed": "Tidak dapat berlangganan domain DynDNS: {error}", + "dyndns_subscribed": "Berlangganan domain di DynDNS", + "domain_hostname_failed": "Tidak dapat menetapkan nama host baru. Ini mungkin menimbulkan masalah di kemudian hari (mungkin baik-baik saja).", + "dyndns_could_not_check_available": "Tidak dapat memeriksa apakah {domain} tersedia di {provider}.", + "dyndns_too_many_requests": "Layanan dyndns YunoHost menerima terlalu banyak permintaan dari Anda, tunggu sekitar 1 jam sebelum mencoba lagi.", + "domain_dns_registrar_yunohost": "Domain ini adalah nohost.me / nohost.st / ynh.fr dan oleh karena itu konfigurasi DNS tersebut secara otomatis akan ditangani oleh YunoHost tanpa konfigurasi lebih lanjut. (lihat perintah 'yunohost dyndns update')", + "dpkg_lock_not_available": "Perintah ini tidak dapat dijalankan sekarang karena program lain sepertinya menggunakan kunci pada dpkg (manajer paket sistem)", + "domain_dns_registrar_supported": "YunoHost secara otomatis mendeteksi bahwa domain ini ditangani oleh registrar **{registrar}**. Jika Anda mau, YunoHost akan secara otomatis mengonfigurasi zona DNS ini, jika Anda memberikan kredensial API yang sesuai. Anda dapat menemukan dokumentasi mengenai cara mendapatkan kredensial API Anda di halaman ini: https://yunohost.org/registar_api_{registrar}. (Anda juga dapat mengonfigurasi rekaman DNS Anda secara manual dengan mengikuti dokumentasi di https://yunohost.org/dns )", + "dyndns_no_recovery_password": "Tidak ada kata sandi pemulihan yang ditentukan! Jika Anda kehilangan kendali atas domain ini, Anda perlu menghubungi administrator di tim YunoHost!", + "domain_dyndns_already_subscribed": "Anda sudah berlangganan domain pada DynDNS", + "dyndns_unsubscribe_already_unsubscribed": "Domain sudah berhenti berlangganan", + "dyndns_unsubscribe_denied": "Gagal berhenti berlangganan domain: kredensial tidak valid", + "dyndns_unsubscribe_failed": "Tidak dapat berhenti berlangganan domain DynDNS: {error}", + "dpkg_is_broken": "Anda tidak dapat melakukan ini sekarang karena dpkg/APT (manajer paket sistem) sepertinya dalam keadaan rusak… Anda dapat mencoba menyelesaikan masalah ini melalui koneksi SSH dan menjalankan `sudo apt install --fix-broken` dan/atau `sudo dpkg --configure -a` dan/atau `sudo dpkg --audit`." } From eeee096f3a1568d48c9c073d94f0a53cf3325af5 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 23 Jul 2024 19:08:45 +0200 Subject: [PATCH 140/218] Update changelog for 11.2.23 --- debian/changelog | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/debian/changelog b/debian/changelog index 121d4cb68..4090d0966 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +yunohost (11.2.23) stable; urgency=low + + - helpers2.1: force sourcing getopts before the other helpers to prevent stupid issues (in particular when renaming phpversion to php_version) (3d53cf04) + - diagnosis: Remove SenderScore from the dnsbl_list.yml file ([#1918](http://github.com/YunoHost/yunohost/pull/1918)) + - ldap: make slapd listen also on ipv6 ([#1916](http://github.com/YunoHost/yunohost/pull/1916)) + - log: zzz fix log list again (b2492ffc) + - i18n: Translations updated for Galician, Indonesian, Slovak + + Thanks to all contributors <3 ! (cjdw, Étienne Deparis, José M, Jose Riha, Josué Tille) + + -- Alexandre Aubin Tue, 23 Jul 2024 19:07:20 +0200 + yunohost (11.2.22) stable; urgency=low - logs: fix "log list" : use root_dir for iglob / make sure we use absolute paths ([#1913](http://github.com/YunoHost/yunohost/pull/1913)) From ebaecfcbd662f971460f2ca292d586654d2f1b3d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 23 Jul 2024 19:26:28 +0200 Subject: [PATCH 141/218] ci: we don't care about mypy in tests/ folder --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index c38df434b..f403c434c 100644 --- a/tox.ini +++ b/tox.ini @@ -12,4 +12,4 @@ commands = py39-invalidcode: flake8 src bin maintenance --exclude src/tests,src/vendor --select F,E722,W605 py39-black-check: black --check --diff bin src doc maintenance tests py39-black-run: black bin src doc maintenance tests - py39-mypy: mypy --ignore-missing-import --install-types --non-interactive --follow-imports silent src/ --exclude (acme_tiny|migrations) + py39-mypy: mypy --ignore-missing-import --install-types --non-interactive --follow-imports silent src/ --exclude (acme_tiny|migrations|tests) From d881d1a505fa375a5928b27456e1eaba6c55b5ee Mon Sep 17 00:00:00 2001 From: Kayou Date: Thu, 25 Jul 2024 15:42:39 +0200 Subject: [PATCH 142/218] avoid double commas in control file, crash if there is an issue in the control file --- helpers/helpers.v1.d/apt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/helpers/helpers.v1.d/apt b/helpers/helpers.v1.d/apt index a9aca8d93..08ecf596c 100644 --- a/helpers/helpers.v1.d/apt +++ b/helpers/helpers.v1.d/apt @@ -195,13 +195,19 @@ ynh_package_install_from_equivs() { # Install the fake package without its dependencies with dpkg # Install missing dependencies with ynh_package_install ynh_wait_dpkg_free + + # Remove the double commas because dpkg-deb doesn't like them + sed --in-place 's@,,@,@g' "$controlfile" + cp "$controlfile" "${TMPDIR}/${pkgname}/DEBIAN/control" - ( - cd "$TMPDIR" - # Install the fake package without its dependencies with dpkg --force-depends - 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 - ) + + # Install the fake package without its dependencies with dpkg --force-depends + if ! LC_ALL=C dpkg-deb --build "${TMPDIR}/${pkgname}" "${TMPDIR}/${pkgname}.deb" > "${TMPDIR}/dpkg_log" 2>&1; then + cat ${TMPDIR}/dpkg_log >&2 + ynh_die --message="Unable to install dependencies" + fi + # Don't crash in case of error, because is nicely covered by the following line + LC_ALL=C dpkg --force-depends --install "${TMPDIR}/${pkgname}.deb" 2>&1 | tee "${TMPDIR}/dpkg_log" || true ynh_package_install --fix-broken \ || { # If the installation failed From 6d21e9fcedf3d45199fd883cc2ecc5504ccbed71 Mon Sep 17 00:00:00 2001 From: Kayou Date: Thu, 25 Jul 2024 15:56:56 +0200 Subject: [PATCH 143/218] a better way to avoid the double commas --- helpers/helpers.v1.d/apt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/helpers/helpers.v1.d/apt b/helpers/helpers.v1.d/apt index 08ecf596c..3ac5905ef 100644 --- a/helpers/helpers.v1.d/apt +++ b/helpers/helpers.v1.d/apt @@ -196,9 +196,6 @@ ynh_package_install_from_equivs() { # Install missing dependencies with ynh_package_install ynh_wait_dpkg_free - # Remove the double commas because dpkg-deb doesn't like them - sed --in-place 's@,,@,@g' "$controlfile" - cp "$controlfile" "${TMPDIR}/${pkgname}/DEBIAN/control" # Install the fake package without its dependencies with dpkg --force-depends @@ -327,7 +324,7 @@ Section: misc Priority: optional Package: ${dep_app}-ynh-deps Version: ${version} -Depends: ${dependencies} +Depends: ${dependencies//,,/,} Architecture: all Maintainer: root@localhost Description: Fake package for ${app} (YunoHost app) dependencies From ddf3e32c1c2f2c2dfa8165b84aef44c4fbc7a1cd Mon Sep 17 00:00:00 2001 From: Kayou Date: Thu, 25 Jul 2024 15:57:58 +0200 Subject: [PATCH 144/218] fix the v2 too --- helpers/helpers.v1.d/apt | 2 +- helpers/helpers.v2.1.d/apt | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/helpers/helpers.v1.d/apt b/helpers/helpers.v1.d/apt index 3ac5905ef..cd648438a 100644 --- a/helpers/helpers.v1.d/apt +++ b/helpers/helpers.v1.d/apt @@ -200,7 +200,7 @@ ynh_package_install_from_equivs() { # Install the fake package without its dependencies with dpkg --force-depends if ! LC_ALL=C dpkg-deb --build "${TMPDIR}/${pkgname}" "${TMPDIR}/${pkgname}.deb" > "${TMPDIR}/dpkg_log" 2>&1; then - cat ${TMPDIR}/dpkg_log >&2 + cat "${TMPDIR}/dpkg_log" >&2 ynh_die --message="Unable to install dependencies" fi # Don't crash in case of error, because is nicely covered by the following line diff --git a/helpers/helpers.v2.1.d/apt b/helpers/helpers.v2.1.d/apt index 4999f179c..6b2ecad1c 100644 --- a/helpers/helpers.v2.1.d/apt +++ b/helpers/helpers.v2.1.d/apt @@ -105,7 +105,7 @@ Section: misc Priority: optional Package: ${app_ynh_deps} Version: ${version} -Depends: ${dependencies} +Depends: ${dependencies//,,/,} Architecture: all Maintainer: root@localhost Description: Fake package for ${app} (YunoHost app) dependencies @@ -116,13 +116,13 @@ EOF _ynh_wait_dpkg_free - ( - # NB: this is in a subshell (though not sure why exactly not just use pushd/popd...) - cd "$TMPDIR" - # Install the fake package without its dependencies with dpkg --force-depends - 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}.deb" > ./dpkg_log 2>&1 - ) + # Install the fake package without its dependencies with dpkg --force-depends + if ! LC_ALL=C dpkg-deb --build "${TMPDIR}/${app_ynh_deps}" "${TMPDIR}/${app_ynh_deps}.deb" > "${TMPDIR}/dpkg_log" 2>&1; then + cat "${TMPDIR}/dpkg_log" >&2 + ynh_die --message="Unable to install dependencies" + fi + # Don't crash in case of error, because is nicely covered by the following line + LC_ALL=C dpkg --force-depends --install "${TMPDIR}/${app_ynh_deps}.deb" 2>&1 | tee "${TMPDIR}/dpkg_log" || true # Then install the missing dependencies with apt install _ynh_apt_install --fix-broken || { From 9e1b0561e3f6a88bd822382d33887878d56d609b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 26 Jul 2024 20:10:28 +0200 Subject: [PATCH 145/218] bullseye->bookworm: readd tweak about libluajit2 + be more robust about full-upgrade that may fail if python3.9-venv aint installed --- .../0027_migrate_to_bookworm.py.disabled | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index a33e1e7ba..5395153cc 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -220,13 +220,23 @@ class MyMigration(Migration): logger.info(m18n.n("migration_0027_yunohost_upgrade")) aptitude_with_progress_bar("unhold yunohost moulinette ssowat yunohost-admin") + + full_upgrade_cmd = "full-upgrade --show-why -o Dpkg::Options::='--force-confold' " + full_upgrade_cmd += "yunohost yunohost-admin yunohost-portal moulinette ssowat " + # This one is needed to solve aptitude derping with nginx dependencies + full_upgrade_cmd += "libluajit2-5.1-2 " + if os.system('dpkg --list | grep -q "^ii python3.9-venv "') == 0: + full_upgrade_cmd += "python3.9- " + if os.system('dpkg --list | grep -q "^ii python3.9 "') == 0: + full_upgrade_cmd += "python3.9-venv- " + try: - aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin yunohost-portal moulinette ssowat python3.9- python3.9-venv- -o Dpkg::Options::='--force-confold'") + aptitude_with_progress_bar(full_upgrade_cmd) except Exception: # Retry after unholding the app packages, maybe it can unlock the situation idk if apps_packages: aptitude_with_progress_bar(f"unhold {' '.join(apps_packages)}") - aptitude_with_progress_bar("full-upgrade --show-why yunohost yunohost-admin yunohost-portal moulinette ssowat python3.9- python3.9-venv- -o Dpkg::Options::='--force-confold'") + aptitude_with_progress_bar(full_upgrade_cmd) else: # If the upgrade was sucessful, we want to unhold the apps packages if apps_packages: From cd30a2acc0fe91a8562f10247d33ae4a76f5da7f Mon Sep 17 00:00:00 2001 From: cjdw Date: Wed, 24 Jul 2024 16:10:44 +0000 Subject: [PATCH 146/218] Translated using Weblate (Indonesian) Currently translated at 100.0% (805 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 182 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 181 insertions(+), 1 deletion(-) diff --git a/locales/id.json b/locales/id.json index dc136a258..ed37272d1 100644 --- a/locales/id.json +++ b/locales/id.json @@ -623,5 +623,185 @@ "dyndns_unsubscribe_already_unsubscribed": "Domain sudah berhenti berlangganan", "dyndns_unsubscribe_denied": "Gagal berhenti berlangganan domain: kredensial tidak valid", "dyndns_unsubscribe_failed": "Tidak dapat berhenti berlangganan domain DynDNS: {error}", - "dpkg_is_broken": "Anda tidak dapat melakukan ini sekarang karena dpkg/APT (manajer paket sistem) sepertinya dalam keadaan rusak… Anda dapat mencoba menyelesaikan masalah ini melalui koneksi SSH dan menjalankan `sudo apt install --fix-broken` dan/atau `sudo dpkg --configure -a` dan/atau `sudo dpkg --audit`." + "dpkg_is_broken": "Anda tidak dapat melakukan ini sekarang karena dpkg/APT (manajer paket sistem) sepertinya dalam keadaan rusak… Anda dapat mencoba menyelesaikan masalah ini melalui koneksi SSH dan menjalankan `sudo apt install --fix-broken` dan/atau `sudo dpkg --configure -a` dan/atau `sudo dpkg --audit`.", + "user_import_bad_line": "Baris yang salah {line}: {details}", + "permission_already_disallowed": "Grup '{group}' sudah menonaktifkan izin '{permission}'", + "migration_0027_start": "Memulai migrasi ke Bookworm…", + "global_settings_setting_smtp_relay_host": "Host relai SMTP", + "group_cannot_edit_all_users": "Grup 'all_users' tidak dapat diedit secara manual. Ini adalah grup khusus yang dimaksudkan untuk menampung semua pengguna yang terdaftar di YunoHost", + "group_cannot_be_deleted": "Grup {group} tidak dapat dihapus secara manual.", + "unlimit": "Tidak ada kuota", + "migration_0027_still_on_bullseye_after_main_upgrade": "Ada yang tidak sesuai ketika menjalankan pemutakhiran utama, sistem tampaknya masih menggunakan Debian Bullseye.", + "pattern_lastname": "Harus berupa nama belakang yang valid (minimal 3 karakter)", + "global_settings_setting_backup_compress_tar_archives": "Memadatkan cadangan", + "firewall_rules_cmd_failed": "Beberapa perintah aturan firewall gagal. Info lebih lanjut di dalam log.", + "global_settings_setting_admin_strength": "Persyaratan kualitas kata sandi admin", + "global_settings_setting_dns_exposure_help": "NB: Ini hanya mempengaruhi konfigurasi DNS yang disarankan dan pemeriksaan diagnosis. Ini tidak mempengaruhi konfigurasi sistem.", + "global_settings_setting_nginx_compatibility": "Kompatibilitas NGINX", + "global_settings_setting_security_experimental_enabled": "Fitur keamanan eksperimental", + "iptables_unavailable": "Anda tidak dapat menggunakan iptables di sini. Anda berada dalam sebuah penampungan atau kernel Anda yang tidak mendukungnya", + "ldap_attribute_already_exists": "Atribut LDAP '{attribute}' sudah ada dengan nilai '{value}'", + "log_does_exists": "Tidak ada log operasi dengan nama '{log}', gunakan 'yunohost log list' untuk melihat semua log operasi yang tersedia", + "log_dyndns_unsubscribe": "Berhenti berlangganan subdomain YunoHost '{}'", + "migrations_dependencies_not_satisfied": "Jalankan migrasi berikut: '{dependencies_id}', sebelum migrasi {id}.", + "permission_already_allowed": "Grup '{group}' sudah mengaktifkan izin '{permission}'", + "group_unknown": "Grup '{group}' tidak diketahui", + "global_settings_setting_smtp_relay_port": "Porta relai SMTP", + "global_settings_setting_smtp_relay_user": "Pengguna relai SMTP", + "group_update_failed": "Tidak dapat memperbarui grup '{group}': {error}", + "pattern_domain": "Harus berupa nama domain yang valid (misalnya domain-saya.org)", + "show_tile_cant_be_enabled_for_regex": "Anda tidak dapat mengaktifkan 'show_tile' saat ini, karena URL untuk perizinan '{permission}' adalah regex", + "show_tile_cant_be_enabled_for_url_not_defined": "Anda tidak dapat mengaktifkan 'show_tile' saat ini, karena Anda harus terlebih dahulu menentukan URL pada perizinan '{permission}'", + "ldap_server_down": "Tidak dapat menjangkau server LDAP", + "update_apt_cache_failed": "Tidak dapat memperbarui cache APT (manajer paket Debian). Berikut ini adalah kumpulan baris source.list, yang mungkin dapat membantu mengidentifikasi baris yang bermasalah:\n{sourceslist}", + "user_import_failed": "Operasi impor pengguna gagal total", + "invalid_number_min": "Harus lebih besar dari {min}", + "log_help_to_get_failed_log": "Operasi '{desc}' tidak dapat diselesaikan. Silakan memberi log lengkap operasi ini menggunakan perintah 'yunohost log share {name}' untuk mendapatkan bantuan", + "mail_domain_unknown": "Alamat surel tidak valid untuk domain '{domain}'. Silakan, menggunakan domain yang dikelola oleh server ini.", + "mailbox_used_space_dovecot_down": "Layanan kotak pos Dovecot harus aktif jika Anda ingin mengambil ruang kotak pos yang telah digunakan", + "migration_0023_postgresql_11_not_installed": "PostgreSQL belum terpasang pada sistem Anda. Biarkan saja.", + "migration_ldap_backup_before_migration": "Membuat cadangan basis data LDAP dan pengaturan aplikasi sebelum migrasi yang sebenarnya.", + "migrations_not_pending_cant_skip": "Migrasi ini tidak tertunda, sehingga tidak dapat dilewati: {ids}", + "operation_interrupted": "Operasinya dihentikan secara manual?", + "unexpected_error": "Terjadi kesalahan yang tidak terduga: {error}", + "log_help_to_get_log": "Untuk melihat log operasi '{desc}', gunakan perintah 'yunohost log show {name}'", + "migration_0021_cleaning_up": "Membersihkan tembolok dan paket yang sudah tidak berguna…", + "invalid_number_max": "Harus kurang dari {max}", + "migration_0027_yunohost_upgrade": "Memulai pemutakhiran inti YunoHost…", + "migration_description_0022_php73_to_php74_pools": "Migrasi berkas konfigurasi 'pool' php7.3-fpm ke php7.4", + "migration_description_0027_migrate_to_bookworm": "pemutakhiran sistem ke Debian Bookworm dan YunoHost 12", + "migrations_exclusive_options": "'--auto', '--skip', dan '--force-rerun' adalah opsi khusus yang saling berkaitan.", + "migrations_failed_to_load_migration": "Tidak dapat memuat migrasi {id}: {error}", + "field_invalid": "Bidang '{}' tidak valid", + "migrations_migration_has_failed": "Migrasi {id} tidak lengkap, dibatalkan. Galat: {exception}", + "migrations_must_provide_explicit_targets": "Anda harus memberikan target yang jelas saat menggunakan '--skip' atau '--force-rerun'", + "group_already_exist_on_system": "Grup {group} sudah ada di dalam grup sistem", + "migrations_pending_cant_rerun": "Migrasi ini masih tertunda, sehingga belum bisa dijalankan lagi: {ids}", + "regenconf_failed": "Tidak dapat membuat ulang konfigurasi pada kategori: {categories}", + "global_settings_setting_postfix_compatibility": "Kompatibilitas Postfix", + "restore_cleaning_failed": "Tidak dapat membersihkan direktori restorasi sementara", + "other_available_options": "… dan {n} opsi lain yang tersedia tidak ditampilkan", + "restore_confirm_yunohost_installed": "Apakah Anda benar-benar ingin memulihkan sistem yang sudah terpasang? [{answers}]", + "global_settings_setting_postfix_compatibility_help": "Kompatibilas versus kompromi keamanan untuk server Postfix. Mempengaruhi kerahasian (dan aspek terkait keamanan lainnya)", + "user_import_partial_failed": "Operasi impor pengguna gagal sebagian", + "log_regen_conf": "Membuat ulang konfigurasi sistem '{}'", + "permission_currently_allowed_for_all_users": "Izin ini sekarang diberikan kepada semua pengguna selain grup yang lain. Anda mungkin ingin menyingkirkan izin 'all_users' atau menyingkirkan grup lain yang saat ini diberikan izin tersebut.", + "restore_running_hooks": "Menjalankan kait restorasi…", + "dyndns_unsubscribed": "Berhenti berlangganan domain DynDNS", + "global_settings_setting_backup_compress_tar_archives_help": "Ketika membuat cadangan baru, padatkan arsip (.tar.gz) dan bukannya arsip yang tidak dipadatkan (.tar). Catatan : mengizinkan opsi ini berarti membuat cadangan yang telah dipadatkan lebih ringan, namun prosedur pencadangan awal akan jauh lebih lama dan membebani CPU.", + "global_settings_setting_nginx_redirect_to_https_help": "Alihkan permintaan HTTP ke HTTPs bawaan (JANGAN MATIKAN kecuali Anda benar-benar tahu apa yang Anda lakukan!)", + "group_user_not_in_group": "Pengguna {user} tidak ada dalam grup {group}", + "global_settings_setting_root_access_explain": "Pada sistem Linux, 'root' adalah admin mutlak. Dalam konteks YunoHost, masuk SSH sebagai 'root' secara langsung dinonaktifkan sesuai bawaan - kecuali dari jaringan lokal pada server. Anggota grup 'admin' dapat menggunakan perintah sudo untuk bertindak sebagai root dari baris perintah. Namun, akan sangat membantu jika memiliki kata sandi root (yang kuat) untuk melakukan debug pada sistem apabila dengan alasan tertentu admin biasa tidak dapat masuk lagi.", + "group_update_aliases": "Memperbarui alias untuk grup '{group}'", + "group_user_already_in_group": "Pengguna {user} sudah ada di grup {group}", + "hook_exec_failed": "Tidak dapat menjalankan skrip: {path}", + "group_no_change": "Tidak ada yang perlu dirubah pada grup '{group}'", + "invalid_number": "Harus berupa angka", + "log_domain_dns_push": "Mendorong rekaman DNS untuk domain '{}'", + "log_dyndns_subscribe": "Berlangganan ke subdomain YunoHost '{}'", + "log_link_to_failed_log": "Tidak dapat menyelesaikan operasi '{desc}'. Silakan memberi log lengkap operasi ini dengan cara gklik di sini agar mendapatkan bantuan", + "log_operation_unit_unclosed_properly": "Unit operasi belum ditutup dengan tepat", + "mail_forward_remove_failed": "tidak dapat menyingkirkan penerus surel '{mail}'", + "migration_0024_rebuild_python_venv_broken_app": "Melewatkan {app} karena virtualenv tidak dapat dibangun ulang dengan mudah pada aplikasi ini. Sebaliknya, Anda harus memperbaiki situasi ini dengan memaksa pemutakhiran aplikasi ini menggunakan `yunohost app upgrade --force {app}`.", + "migration_0021_general_warning": "Harap dicatat bahwa migrasi ini adalah operasi yang rumit. Tim YunoHost melakukan yang terbaik untuk meninjau dan mengujinya, namun migrasi tersebut mungkin dapat merusak bagian pada sistem atau aplikasinya.\n\nOleh karena itu, disarankan untuk:\n - Lakukan pencadangan data atau aplikasi penting apa pun. Informasi lebih lanjut di https://yunohost.org/backup;\n - Bersabarlah setelah menjalankan migrasi: Tergantung pada koneksi Internet dan perangkat keras Anda, mungkin diperlukan waktu hingga beberapa jam untuk memperbarui semuanya.", + "migration_0021_system_not_fully_up_to_date": "Sistem Anda belum sepenuhnya mutakhir. Harap lakukan pemutakhiran rutin sebelum menjalankan migrasi ke Bullseye.", + "migration_0024_rebuild_python_venv_disclaimer_base": "Setelah pemutakhiran ke Debian Bullseye, beberapa aplikasi Python perlu dibangun kembali sebagian agar dapat dikonversi ke versi Python baru yang dikirimkan bersama Debian (dalam istilah teknis: apa yang disebut 'virtualenv' perlu dibuat ulang). Sementara itu, aplikasi Python tersebut mungkin tidak berfungsi. YunoHost dapat mencoba membangun kembali virtualenv untuk beberapa di antaranya, seperti yang dijelaskan di bawah ini. Untuk aplikasi lain, atau jika upaya pembangunan kembali gagal, Anda perlu memaksakan pemutakhiran secara manual pada aplikasi tersebut.", + "migration_0027_not_bullseye": "Distribusi Debian saat ini bukanlah Bullseye! Jika Anda sudah menjalankan migrasi Bullseye -> Bookworm, maka galat ini merupakan gejala dari fakta bahwa prosedur migrasi tidak 100% berhasil (selain itu YunoHost akan menandainya sebagai komplet). Disarankan agar menyelidiki apa yang terjadi bersama dengan tim bantuan, yang memerlukan log migrasi **lengkap**, yang dapat ditemukan di Alat > Log pada webadmin.", + "migration_0027_general_warning": "Harap diingat bahwa migrasi ini adalah operasi yang rumit. Tim YunoHost melakukan yang terbaik untuk meninjau dan mengujinya, namun migrasi tersebut mungkin bisa merusak suatu bagian dari sistem atau aplikasinya.\n\nOleh karena itu, disarankan untuk:\n - Lakukan pencadangan data atau aplikasi penting apa pun. Informasi lebih lanjut di https://yunohost.org/backup;\n - Bersabarlah setelah meluncurkan migrasi: Tergantung pada koneksi Internet dan perangkat keras Anda, mungkin diperlukan waktu hingga beberapa jam agar semuanya dapat dimutakhirkan dengan tepat.", + "migration_0027_system_not_fully_up_to_date": "Sistem Anda belum sepenuhnya mutakhir. Harap melakukan pemutakhiran rutin sebelum menjalankan migrasi ke Bookworm.", + "migration_ldap_migration_failed_trying_to_rollback": "Tidak dapat bermigrasi… mencoba mengembalikan sistem seperti semula.", + "migrations_list_conflict_pending_done": "Anda tidak dapat menggunakan '--previous' dan '--done' secara bersamaan.", + "migrations_no_migrations_to_run": "Tidak ada migrasi yang harus dijalankan", + "global_settings_setting_passwordless_sudo": "Izinkan pengelola menggunakan 'sudo' tanpa mengetik ulang kata sandinya", + "group_cannot_edit_visitors": "Grup 'pengunjung' tidak dapat diedit secara manual. Ini adalah grup khusus yang mewakili pengunjung anonim", + "migration_0027_problematic_apps_warning": "Harap diperhatikan bahwa aplikasi terpasang yang mungkin bermasalah telah terdeteksi. Sepertinya aplikasi tersebut tidak dipasang dari katalog aplikasi YunoHost, atau tidak ditandai sebagai 'berfungsi'. Oleh karena itu, tidak ada jaminan bahwa aplikasi tersebut akan tetap berfungsi setelah pemutakhiran: {problematic_apps}", + "migrations_need_to_accept_disclaimer": "Untuk menjalankan migrasi {id}, Anda harus menerima pernyataan berikut:\n---\n{disclaimer}\n---\nJika Anda setuju untuk menjalankan migrasi, silakan jalankan kembali perintah dengan opsi '--accept-disclaimer'.", + "postinstall_low_rootfsspace": "Sistem pemberkasan root memiliki total ruang kurang dari 10 GB, yang cukup mengkhawatirkan! Kemungkinan besar Anda akan kehabisan ruang disket dengan sangat cepat! Disarankan agar memiliki setidaknya 16GB untuk sistem pemberkasan root. Jika Anda ingin memasang YunoHost meskipun ada peringatan ini, jalankan kembali pasca pemasangan dengan --force-diskspace", + "global_settings_setting_admin_strength_help": "Persyaratan ini hanya diterapkan saat mengawali atau mengubah kata sandi", + "global_settings_setting_nginx_compatibility_help": "Kompatibilas versus kompromi keamanan untuk server web NGINX. Mempengaruhi kerahasian (dan aspek terkait keamanan lainnya)", + "global_settings_setting_security_experimental_enabled_help": "Aktifkan fitur keamanan eksperimental (jangan mengaktifkan ini jika Anda tidak tahu apa yang Anda lakukan!)", + "global_settings_setting_ssowat_panel_overlay_enabled": "Aktifkan kotak pintasan portal kecil 'YunoHost' di aplikasi", + "global_settings_setting_user_strength": "Persyaratan kualitas kata sandi pengguna", + "global_settings_setting_user_strength_help": "Persyaratan ini hanya diterapkan saat mengawali atau mengubah kata sandi", + "global_settings_setting_webadmin_allowlist_enabled": "Aktifkan daftar IP Pengelelola web yang diizinkan", + "regenconf_up_to_date": "Konfigurasi sudah yang terbaru pada kategori '{category}'", + "global_settings_setting_smtp_relay_enabled_help": "Aktifkan relai SMTP yang akan digunakan untuk mengirim surel selain instansi yunohost ini. Berguna jika Anda berada dalam salah satu situasi ini: port 25 Anda diblokir oleh ISP atau penyedia VPS Anda, Anda memiliki IP residental yang terdaftar di DUHL, Anda tidak dapat mengkonfigurasi reverse DNS atau server ini tidak terekspos secara langsung di internet dan Anda ingin menggunakan yang lain untuk mengirim surel.", + "global_settings_setting_ssh_compatibility": "Kompatibilitas SSH", + "global_settings_setting_webadmin_allowlist_help": "Alamat IP diizinkan untuk mengakses webadmin. Notasi CIDR diperbolehkan.", + "global_settings_setting_ssh_port_help": "Port kurang dari 1024 lebih dianjurkan untuk mencegah upaya kudeta oleh layanan non-administrator pada mesin jarak jauh. Anda juga sebaiknya menghindari penggunaan port yang sudah digunakan, seperti 80 atau 443.", + "invalid_regex": "Regex tidak valid:'{regex}'", + "ip6tables_unavailable": "Anda tidak dapat menggunakan ip6tables di sini. Anda berada dalam sebuah penampungan atau kernel Anda yang tidak mendukungnya", + "global_settings_setting_ssh_compatibility_help": "Kompatibilitas versus kompromi keamanan untuk server SSH. Mempengaruhi kerahasiaan (dan aspek terkait keamanan lainnya). Lihat https://infosec.mozilla.org/guidelines/openssh untuk informasi lebih lanjut.", + "global_settings_setting_webadmin_allowlist": "Daftar IP pengelola web yang diizinkan", + "global_settings_setting_webadmin_allowlist_enabled_help": "Izinkan hanya beberapa IP untuk mengakses webadmin.", + "pattern_email": "Harus berupa alamat surel yang valid, tanpa simbol '+' (misalnya seseorang@example.com)", + "pattern_email_forward": "Harus berupa alamatsurel yang valid, simbol '+' masih diperbolehkan (misalnya seseorang+tag@example.com)", + "pattern_firstname": "Harus nama depan yang valid (minimal 3 karakter)", + "global_settings_setting_smtp_relay_enabled": "Aktifkan relai SMTP", + "migration_0024_rebuild_python_venv_disclaimer_ignored": "Virtualenvs tidak dapat dibangun kembali secara otomatis pada aplikasi tersebut. Anda perlu memaksakan pemutakhiran tersebut, yang dapat dilakukan dari baris perintah dengan: `yunohost app upgrade --force APP`: {ignored_apps}", + "pattern_mailbox_quota": "Harus seukuran dengan akhiran b/k/M/G/T atau 0 agar tidak memiliki kuota", + "pattern_username": "Harus berupa karakter huruf alfanumerik kecil dan garis bawah saja", + "invalid_shell": "Shell tidak valid: {shell}", + "global_settings_setting_smtp_relay_password": "Kata sandi relai SMTP", + "group_already_exist": "Grup {group} sudah ada", + "migration_ldap_can_not_backup_before_migration": "Pencadangan sistem tidak dapat diselesaikan sebelum migrasi gagal. Galat: {error}", + "migration_description_0026_new_admins_group": "Migrasi ke sistem 'multi admin' yang baru", + "migration_description_0025_global_settings_to_configpanel": "Migrasi nomenklatur pengaturan global lama ke nomenklatur baru dan modern", + "global_settings_setting_dns_exposure": "Versi IP yang perlu dipertimbangkan pada konfigurasi dan diagnosis DNS", + "unknown_main_domain_path": "Domain atau jalur pada '{app}' tidak diketahui. Anda perlu menentukan domain dan jalur agar dapat menentukan URL untuk perizinan.", + "migration_0023_postgresql_13_not_installed": "PostgreSQL 11 telah terpasang, tetapi PostgreSQL 13 tidak!? Sesuatu yang aneh mungkin terjadi pada sistem Anda :(…", + "migrations_skip_migration": "Melewatkan migrasi {id}…", + "regenconf_dry_pending_applying": "Memeriksa konfigurasi yang tertunda yang akan diterapkan pada kategori '{category}'…", + "group_already_exist_on_system_but_removing_it": "Grup {group} sudah ada di dalam grup sistem, tetapi YunoHost akan menyingkirkannya…", + "group_cannot_edit_primary_group": "Grup '{group}' tidak dapat diedit secara manual. Ini adalah grup utama yang dimaksudkan untuk menampung hanya satu pengguna tertentu.", + "group_mailalias_add": "Alias email '{mail}' akan ditambahkan ke grup '{group}'", + "group_user_add": "Pengguna '{user}' akan ditambahkan ke grup '{group}'", + "group_user_remove": "Pengguna '{user}' akan disingkirkan dari grup '{group}'", + "hook_exec_not_terminated": "Skrip tidak selesai dengan tepat: {path}", + "hook_json_return_error": "Tidak dapat membaca jawaban dari pengait {path}. Galat: {msg}. Konten mentah: {raw_content}", + "hook_list_by_invalid": "Properti ini tidak dapat digunakan untuk mencantumkan pengait", + "hook_name_unknown": "Nama pengait '{name}' tidak diketahui", + "ldap_server_is_down_restart_it": "Layanan LDAP tidak aktif, mencoba memulai ulang…", + "log_dyndns_update": "Perbarui IP yang terkait dengan subdomain YunoHost Anda '{}'", + "log_permission_url": "Perbarui URL terkait izin '{}'", + "log_remove_on_failed_install": "Menyingkirkan '{}' setelah instalasi gagal", + "log_resource_snippet": "Menyediakan/Meniadakan/memperbarui sumber daya", + "log_tools_postinstall": "Pasca pemasangan server YunoHost Anda", + "migration_0021_modified_files": "Harap diperhatikan bahwa berkas berikut ternyata telah dimodifikasi secara manual dan mungkin ditimpa setelah peningkatan: {manually_modified_files}", + "migration_0021_not_buster2": "Distribusi Debian saat ini bukanlah Buster! Jika Anda sudah menjalankan migrasi Buster -> Bullseye, maka galat ini merupakan gejala dari fakta bahwa prosedur migrasi tidak berhasil 100% (sebaliknya YunoHost akan menandainya sebagai komplet). Disarankan agar menyelidiki apa yang terjadi bersama dengan tim bantuan, yang memerlukan log migrasi **lengkap**, yang dapat ditemukan pada Alat > Log dalam webadmin.", + "migration_0021_not_enough_free_space": "Ruang kosong cukup sedikit di /var/! Anda harus memiliki setidaknya 1 GB ruang kosong untuk menjalankan migrasi ini.", + "migration_0021_patch_yunohost_conflicts": "Menerapkan tambalan untuk menanggulangi isu konflik…", + "migration_0021_patching_sources_list": "Menambal sources.lists tersebut…", + "migration_0021_still_on_buster_after_main_upgrade": "Ada yang tidak sesuai saat pemutakhiran utama, sistem tampaknya masih menggunakan Debian Buster", + "migration_0021_problematic_apps_warning": "Harap diperhatikan bahwa aplikasi terpasang yang mungkin bermasalah telah terdeteksi. Sepertinya aplikasi tersebut tidak dipasang dari katalog aplikasi YunoHost, atau tidak ditandai sebagai 'berfungsi'. Oleh karena itu, tidak ada jaminan bahwa aplikasi tersebut akan tetap berfungsi setelah pemutakhiran: {problematic_apps}", + "migration_0023_not_enough_space": "Sediakan ruang yang cukup di {path} untuk menjalankan migrasi.", + "migration_0024_rebuild_python_venv_disclaimer_rebuild": "Membangun kembali virtualenv akan dicoba pada aplikasi berikut (NB: pengoperasiannya mungkin memerlukan beberapa waktu!): {rebuild_apps}", + "migration_0024_rebuild_python_venv_failed": "Gagal membangun kembali virtualenv Python pada {app}. Aplikasi mungkin tidak berfungsi selama masalah tersebut belum diselesaikan. Anda harus memperbaiki situasi ini dengan memaksa pemutakhiran aplikasi ini menggunakan `yunohost app upgrade --force {app}`.", + "migration_0024_rebuild_python_venv_in_progress": "Sekarang mencoba membangun kembali virtualenv Python pada `{app}`", + "migration_0027_not_enough_free_space": "Ruang kosong cukup sedikit di /var/! Anda harus memiliki setidaknya 1 GB ruang kosong untuk menjalankan migrasi ini.", + "migration_0027_patch_yunohost_conflicts": "Menerapkan tambalan untuk menanggulangi isu konflik…", + "migrations_no_such_migration": "Tidak ada migrasi yang disebut '{id}'", + "migration_0027_cleaning_up": "Membersihkan cache dan paket yang sudah tidak berguna…", + "migration_0027_delayed_api_restart": "API YunoHost akan otomatis diulangi dalam 15 detik. Ini mungkin tidak tersedia selama beberapa detik, dan kemudian Anda harus masuk lagi.", + "migration_0027_main_upgrade": "Memulai pemutakhiran utama…", + "migration_0027_modified_files": "Harap diperhatikan bahwa berkas berikut ternyata dimodifikasi secara manual dan mungkin ditimpa setelah pemutakhiran: {manually_modified_files}", + "migration_0027_patching_sources_list": "Menambal berkas source.lists…", + "migration_ldap_rollback_success": "Mengembalikan sistem seperti semula.", + "migrations_already_ran": "Migrasi tersebut sudah selesai: {ids}", + "migrations_loading_migration": "Memuat migrasi {id}…", + "migrations_to_be_ran_manually": "Migrasi {id} harus dijalankan secara manual. Silakan buka Alat → Migrasi di halaman webadmin, atau jalankan `yunohost tools migrans run`.", + "pattern_backup_archive_name": "Harus berupa nama berkas yang valid dengan maksimal 30 karakter, alfanumerik dan karakter -_. saja", + "pattern_fullname": "Harus berupa nama lengkap yang valid (minimal 3 karakter)", + "permission_already_up_to_date": "Izin tidak akan diperbarui karena permintaan menambahkan/menyingkirkan sudah sesuai dengan kondisi saat ini.", + "regenconf_need_to_explicitly_specify_ssh": "Konfigurasi ssh telah dimodifikasi secara manual, namun Anda perlu secara eksplisit menentukan kategori 'ssh' dengan --force agar menerapkan perubahan yang sebenarnya.", + "regenconf_pending_applying": "Menerapkan konfigurasi yang tertunda pada kategori '{category}'…", + "regenconf_would_be_updated": "Konfigurasi akan diperbarui pada kategori '{category}'", + "regex_incompatible_with_tile": "/!\\ Pemaket! Perizinan '{permission}' memiliki show_tile yang diatur menjadi 'true' dan oleh karena itu Anda tidak dapat menentukan URL regex sebagai URL utama", + "restore_extracting": "Mengekstrak berkas yang diperlukan dari arsip…", + "restore_hook_unavailable": "Skrip pemulihan pada '{part}' tidak tersedia pada sistem Anda dan juga tidak ada di dalam arsip", + "restore_may_be_not_enough_disk_space": "Sistem Anda tampaknya tidak memiliki cukup ruang (bebas: {free_space} B, ruang yang diperlukan: {needed_space} B, batas keamanan: {margin} B)", + "service_description_redis-server": "Basis data khusus yang digunakan untuk akses data cepat, antrian tugas, dan komunikasi antar program", + "update_apt_cache_warning": "Ada yang tidak sesuai saat memperbarui cache APT (manajer paket Debian). Berikut ini adalah kumpulan baris source.list, yang mungkin membantu mengidentifikasi baris yang bermasalah:\n{sourceslist}", + "user_import_missing_columns": "Kehilangan kolom berikut: {columns}", + "user_import_nothing_to_do": "Tidak ada pengguna yang perlu diimpor" } From e5d74d420db1e87ee1b210b728f26865133ef22d Mon Sep 17 00:00:00 2001 From: cjdw Date: Fri, 26 Jul 2024 02:46:55 +0000 Subject: [PATCH 147/218] Translated using Weblate (Indonesian) Currently translated at 100.0% (805 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locales/id.json b/locales/id.json index ed37272d1..f9ad396e1 100644 --- a/locales/id.json +++ b/locales/id.json @@ -537,7 +537,7 @@ "diagnosis_ignore_filter_added": "Menambahkan filter diagnosis {category}", "diagnosis_ignore_filter_removed": "Menyingkirkan filter diagnosis {category}", "diagnosis_never_ran_yet": "Sepertinya server ini baru saja tertata dan belum ada laporan diagnosis yang ditampilkan. Anda harus memulai dengan menjalankan diagnosis lengkap, baik dari webadmin atau menggunakan 'yunohost diagnosis run' dari baris perintah.", - "diagnosis_backports_in_sources_list": "Sepertinya apt (manajer paket) dikonfigurasi untuk menggunakan repositori backports. Kecuali Anda benar-benar tahu apa yang Anda lakukan, kami sangat tidak menyarankan menginstal paket dari backport, karena kemungkinan besar akan menimbulkan ketidakstabilan atau konflik pada sistem Anda.", + "diagnosis_backports_in_sources_list": "Sepertinya apt (manajer paket) dikonfigurasi untuk menggunakan depot backports. Kecuali Anda benar-benar tahu apa yang Anda lakukan, kami sangat tidak menyarankan memasang paket dari backport, karena kemungkinan besar akan menjadi labil atau konflik pada sistem Anda.", "diagnosis_mail_fcrdns_nok_alternatives_6": "Beberapa penyedia tidak mengizinkan Anda mengonfigurasi reverse-DNS (atau fitur mereka mungkin rusak…). Jika reverse-DNS Anda dikonfigurasi dengan benar untuk IPv4, Anda dapat mencoba menonaktifkan penggunaan IPv6 saat mengirim surel dengan menjalankan yunohost settings set email.smtp.smtp_allow_ipv6 -v off. Catatan: dengan solusi tersebut berarti Anda tidak akan bisa mengirim atau menerima surel dari beberapa server khusus IPv6 di luar sana.", "diagnosis_http_timeout": "Waktu habis saat mencoba menghubungi server Anda dari luar. Tampaknya tidak dapat dijangkau.
1. Penyebab paling umum dari masalah ini adalah port 80 (dan 443) tidak diteruskan dengan benar ke server Anda.
2. Anda juga harus memastikan bahwa layanan nginx berjalan
3. Pada pengaturan yang lebih rumit: pastikan tidak ada firewall atau reverse-proxy yang mengganggu.", "diagnosis_mail_ehlo_bad_answer_details": "Ini mungkin disebabkan oleh mesin lain yang menjawab bukannya server Anda.", @@ -545,7 +545,7 @@ "diagnosis_ports_could_not_diagnose_details": "Galat: {error}", "diagnosis_mail_fcrdns_different_from_ehlo_domain": "Reverse-DNS tidak dikonfigurasi dengan benar pada IPv{ipversion}. Beberapa surel mungkin gagal terkirim atau ditandai sebagai spam.", "diagnosis_mail_fcrdns_different_from_ehlo_domain_details": "Reverse-DNS saat ini: {rdns_domain}
Nilai yang diharapkan: {ehlo_domain}", - "diagnosis_package_installed_from_sury_details": "Beberapa paket secara tidak sengaja dipasang dari repositori pihak ketiga bernama Sury. Tim YunoHost meningkatkan strategi dalam menangani paket-paket ini, namun diperkirakan bahwa beberapa pengaturan aplikasi yang terpasang PHP7.3 saat masih dalam Stretch masih memiliki beberapa inkonsistensi. Untuk memperbaiki situasi ini, Anda harus mencoba menjalankan perintah berikut: {cmd_to_fix}", + "diagnosis_package_installed_from_sury_details": "Beberapa paket secara tidak sengaja dipasang dari depot pihak ketiga bernama Sury. Tim YunoHost meningkatkan strategi dalam menangani paket tersebut, namun diperkirakan bahwa beberapa pengaturan aplikasi yang terpasang PHP7.3 saat masih dalam Stretch masih memiliki beberapa inkonsistensi. Untuk memperbaiki situasi ini, Anda harus mencoba menjalankan perintah berikut: {cmd_to_fix}", "diagnosis_ports_needed_by": "Mengekspos port ini diperlukan untuk fitur {category} (layanan {service})", "diagnosis_mail_fcrdns_nok_alternatives_4": "Beberapa penyedia tidak mengizinkan Anda mengonfigurasi reverse-DNS (atau fitur mereka mungkin rusak…). Jika Anda mengalami isu karena hal ini, pertimbangkan solusi berikut:
- Beberapa ISP menyediakan alternatif menggunakan server pos relai ini menyiratkan bahwa relai akan dapat memata-matai lalu lintas surel Anda.
- Alternatif ramah privasi adalah menggunakan VPN *dengan IP publik khusus* untuk melewati batasan semacam ini. Lihat https://yunohost.org/vpn_advantage
- Atau bisa juga ke beralih ke penyedia lain", "diagnosis_ip_broken_dnsresolution": "Resolusi nama domain tampaknya rusak karena beberapa alasan… Apakah firewall memblokir permintaan DNS?", @@ -577,7 +577,7 @@ "domain_config_xmpp_help": "Catatan: beberapa fitur XMPP mengharuskan Anda memperbarui rekaman DNS dan membuat ulang sertifikat Lets Encrypt agar dapat diaktifkan", "domain_dns_conf_special_use_tld": "Domain ini berdasarkan pada domain tingkat atas (TLD) penggunaan khusus seperti .local atau .test dan oleh karena itu tidak diharapkan memiliki rekaman DNS yang sesungguhnya.", "domain_dns_push_failed": "Gagal total dalam memperbarui rekaman DNS.", - "diagnosis_using_stable_codename_details": "Biasanya hal ini disebabkan oleh kesalahan konfigurasi dari penyedia hosting Anda. Ini berbahaya, karena segera setelah versi Debian berikutnya menjadi 'stable' yang baru, apt akan melakukan upgrade pada semua paket sistem tanpa melalui prosedur migrasi yang benar. Disarankan untuk memperbaikinya dengan mengedit sumber apt pada repositori dasar Debian, dan mengganti kata kunci stable dengan bullseye. File konfigurasi yang sesuai harus /etc/apt/sources.list, atau file dalam /etc/apt/sources.list.d/.", + "diagnosis_using_stable_codename_details": "Biasanya hal ini disebabkan oleh kesalahan konfigurasi dari penyedia hosting Anda. Ini berbahaya, karena segera setelah versi Debian berikutnya menjadi 'stable' yang baru, apt akan melakukan upgrade pada semua paket sistem tanpa melalui prosedur migrasi yang benar. Disarankan untuk memperbaikinya dengan mengedit sumber apt untuk depot dasar Debian, dan mengganti kata kunci stable dengan bullseye. Berkas konfigurasi yang sesuai harus /etc/apt/sources.list, atau berkas dalam /etc/apt/sources.list.d/.", "domain_cannot_add_xmpp_upload": "Anda tidak dapat menambahkan domain yang dimulai dengan 'xmpp-upload.'. Nama seperti ini dicadangkan untuk fitur unggah XMPP yang terintegrasi ke dalam YunoHost.", "diagnosis_using_yunohost_testing": "apt (manajer paket sistem) saat ini dikonfigurasi agar memasang pemutakhiran 'testing' apa pun untuk inti YunoHost.", "diagnosis_using_yunohost_testing_details": "Ini mungkin OK jika Anda tahu apa yang Anda lakukan, tapi perhatikan catatan rilis sebelum memasang pemutakhiran YunoHost! Jika Anda ingin menonaktifkan peningkatan 'testing', Anda harus menghapus kata kunci testing dari /etc/apt/sources.list.d/yunohost.list.", From c861ef2ae6880b2fd71dfc01170c86982b9bfd2f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 26 Jul 2024 21:09:15 +0200 Subject: [PATCH 148/218] Update changelog for 11.2.24 --- debian/changelog | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4090d0966..611e6bbad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +yunohost (11.2.24) stable; urgency=low + + - ci: we don't care about mypy in tests/ folder (ebaecfcbd) + - helpers: fix install from equivs ([#1921](http://github.com/YunoHost/yunohost/pull/1921)) + - bullseye->bookworm: re-add tweak about libluajit2 + be more robust about full-upgrade that may fail if python3.9-venv aint installed (9e1b0561e) + - i18n: Translations updated for Indonesian + + Thanks to all contributors <3 ! (cjdw, Kayou) + + -- Alexandre Aubin Fri, 26 Jul 2024 21:01:23 +0200 + yunohost (11.2.23) stable; urgency=low - helpers2.1: force sourcing getopts before the other helpers to prevent stupid issues (in particular when renaming phpversion to php_version) (3d53cf04) From 2d3dddc51a925ed4871014865a9ea8a4348b393b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 27 Jul 2024 15:06:48 +0200 Subject: [PATCH 149/218] bullseye->bookworm: explicitly import _strptime at the beginning to try to prevent "No module named '_strptime'" during migration --- src/migrations/0027_migrate_to_bookworm.py.disabled | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index 5395153cc..69c9812b3 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -3,6 +3,9 @@ import os import subprocess from time import sleep +# Explicitly import _strptime to prevent an issue that may arise later because of python3.9 being replaced by 3.11 in the middle of the upgrade etc +import _strptime # noqa: F401 + from moulinette import Moulinette, m18n from moulinette.utils.process import call_async_output from yunohost.utils.error import YunohostError From 8b56983171033b8da1363c04a7956cd4f102b222 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 27 Jul 2024 15:09:48 +0200 Subject: [PATCH 150/218] bullseye->bookworm: explicitly validate that we're on yunohost 12.x at the end of the migration --- src/migrations/0027_migrate_to_bookworm.py.disabled | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index 69c9812b3..46bde6e25 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -267,6 +267,9 @@ class MyMigration(Migration): # For some reason subprocess doesn't like the redirections so we have to use bash -c explicity... subprocess.check_call(["bash", "-c", cmd]) + if self.yunohost_major_version() != N_CURRENT_YUNOHOST + 1: + raise YunohostError("Still on YunoHost 11.x at the end of the migration, eh? Sounds like the migration didn't really complete!?", raw_msg=True) + def debian_major_version(self): # The python module "platform" and lsb_release are not reliable because # on some setup, they may still return Release=9 even after upgrading to From d376677db6314c5aec623420dc25e3173ce3b3fc Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 30 Jul 2024 15:50:45 +0200 Subject: [PATCH 151/218] diagnosis: be more robust when diagnosis DMARC records not containing '=' --- src/diagnosers/12-dnsrecords.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/diagnosers/12-dnsrecords.py b/src/diagnosers/12-dnsrecords.py index 041030553..d63e54c9c 100644 --- a/src/diagnosers/12-dnsrecords.py +++ b/src/diagnosers/12-dnsrecords.py @@ -217,7 +217,9 @@ class MyDiagnoser(Diagnoser): } if "v=DMARC1" in r["value"]: for param in current: - key, value = param.split("=") + if "=" not in param: + return False + key, value = param.split("=", 1) if key == "p": return value in ["none", "quarantine", "reject"] return expected == current From ad98a10fa8db7ac7e708d4b501bd1cd9e28db50e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 30 Jul 2024 16:00:09 +0200 Subject: [PATCH 152/218] bullseye->bookworm: make sure the non-free / non-free-firmware stuff is idempotent --- src/migrations/0027_migrate_to_bookworm.py.disabled | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index 46bde6e25..b3ae7ea51 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -411,7 +411,7 @@ class MyMigration(Migration): "-e '/backports/ s@^#*@#@' " "-e 's@ bullseye/updates @ bookworm-security @g' " "-e 's@ bullseye-@ bookworm-@g' " - "-e 's@ non-free@ non-free non-free-firmware@g' " + "-e '/non-free-firmware/!s@ non-free@ non-free non-free-firmware@g' " "-e 's@deb.*http://forge.yunohost.org@deb [signed-by=/usr/share/keyrings/yunohost-bookworm.gpg] http://forge.yunohost.org@g' " ) os.system(command) From 8705dfcf5ce31e7daac914d3c3edc2b0d9c9700c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 30 Jul 2024 16:21:08 +0200 Subject: [PATCH 153/218] debian: add rule that moulinette and ssowat must be < 12 to prevent situation in bullseye->bookworm transition where moulinette gets upgrade but yunohost doesnt and everything explodes --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index caa793b5c..06a665dec 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ Package: yunohost Essential: yes Architecture: all Depends: ${python3:Depends}, ${misc:Depends} - , moulinette (>= 11.1), ssowat (>= 11.1) + , moulinette (>= 11.1), moulinette (<< 12.0), ssowat (>= 11.1), ssowat (<< 12.0) , python3-psutil, python3-requests, python3-dnspython, python3-openssl , python3-miniupnpc, python3-dbus, python3-jinja2 , python3-toml, python3-packaging, python3-publicsuffix2 From f4727d3cb6b1b2132ef4bca698ae8ce5586d2c9c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 30 Jul 2024 16:51:22 +0200 Subject: [PATCH 154/218] bullseye->bookworm: more stuff to try to prevent aptitude derping about python dependencies --- src/migrations/0027_migrate_to_bookworm.py.disabled | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index b3ae7ea51..802947bb7 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -228,10 +228,11 @@ class MyMigration(Migration): full_upgrade_cmd += "yunohost yunohost-admin yunohost-portal moulinette ssowat " # This one is needed to solve aptitude derping with nginx dependencies full_upgrade_cmd += "libluajit2-5.1-2 " + # For some reason aptitude is derping about python3 / python3-venv so try to explicitly tell to install python3.11 to replace 3.9... if os.system('dpkg --list | grep -q "^ii python3.9-venv "') == 0: - full_upgrade_cmd += "python3.9- " + full_upgrade_cmd += "python3.11-venv python3.9-venv- " if os.system('dpkg --list | grep -q "^ii python3.9 "') == 0: - full_upgrade_cmd += "python3.9-venv- " + full_upgrade_cmd += "python3.11 python3.9- " try: aptitude_with_progress_bar(full_upgrade_cmd) From 44529b6d9229a899b52cb047d66ac04ab53cd980 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 30 Jul 2024 17:13:06 +0200 Subject: [PATCH 155/218] Update changelog for 11.2.25 --- debian/changelog | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/debian/changelog b/debian/changelog index 611e6bbad..1eb7edf34 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +yunohost (11.2.25) stable; urgency=low + + - diagnosis: be more robust when diagnosis DMARC records not containing '=' (d376677db) + - bullseye->bookworm: explicitly import _strptime at the beginning to try to prevent "No module named '_strptime'" during migration (2d3dddc51) + - bullseye->bookworm: explicitly validate that we're on yunohost 12.x at the end of the migration (8b5698317) + - bullseye->bookworm: make sure the non-free / non-free-firmware stuff is idempotent (ad98a10fa) + - bullseye->bookworm: in debian control, add rule that moulinette and ssowat must be < 12 to prevent situation in bullseye->bookworm transition where moulinette gets upgrade but yunohost doesnt and everything explodes (8705dfcf5) + - bullseye->bookworm: more stuff to try to prevent aptitude derping about python dependencies (f4727d3cb) + + -- Alexandre Aubin Tue, 30 Jul 2024 17:12:12 +0200 + yunohost (11.2.24) stable; urgency=low - ci: we don't care about mypy in tests/ folder (ebaecfcbd) From 423e79bd57a02d81fb0ec42567868acad9fbce2d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Tue, 30 Jul 2024 23:14:32 +0200 Subject: [PATCH 156/218] Update 0027_migrate_to_bookworm.py.disabled: encourage apt to remove luajit if it's installed because for some reason it's causing issues --- src/migrations/0027_migrate_to_bookworm.py.disabled | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index 802947bb7..86f2e37ff 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -188,7 +188,7 @@ class MyMigration(Migration): logger.debug(f"Running: {command}") os.system(command) - aptitude_with_progress_bar("upgrade cron rspamd- libluajit-5.1-2- --show-why -o APT::Force-LoopBreak=1 -o Dpkg::Options::='--force-confold'") + aptitude_with_progress_bar("upgrade cron rspamd- luajit- libluajit-5.1-2- --show-why -o APT::Force-LoopBreak=1 -o Dpkg::Options::='--force-confold'") aptitude_with_progress_bar("full-upgrade --show-why -o Dpkg::Options::='--force-confold'") From d766f7cdda2d19276eb5b1b2aeec5523f8845cca Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 30 Jul 2024 23:50:58 +0200 Subject: [PATCH 157/218] bullseye->bookworm: have a specific step dedicated to upgrade python3.9 to 3.11 because apt(itude) is derping about it sometimes... --- .../0027_migrate_to_bookworm.py.disabled | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index 86f2e37ff..850f20198 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -188,8 +188,16 @@ class MyMigration(Migration): logger.debug(f"Running: {command}") os.system(command) - aptitude_with_progress_bar("upgrade cron rspamd- luajit- libluajit-5.1-2- --show-why -o APT::Force-LoopBreak=1 -o Dpkg::Options::='--force-confold'") + aptitude_with_progress_bar("full-upgrade cron rspamd- luajit- libluajit-5.1-2- --show-why -o APT::Force-LoopBreak=1 -o Dpkg::Options::='--force-confold'") + # For some reason aptitude is derping about python3 / python3-venv so try to explicitly tell to install python3.11 to replace 3.9... + # Note the '+M' prefix which is here to mark the packages as automatically installed + python_upgrade_list = "python3 python3.11+M python3.9- " + if os.system('dpkg --list | grep -q "^ii python3.9-venv "') == 0: + python_upgrade_list += "python3-venv+M python3.11-venv+M python3.9-venv-" + aptitude_with_progress_bar(f"full-upgrade {python_upgrade_list} --show-why -o APT::Force-LoopBreak=1 -o Dpkg::Options::='--force-confold'") + + # Full upgrade of "every" packages except the yunohost ones which are held aptitude_with_progress_bar("full-upgrade --show-why -o Dpkg::Options::='--force-confold'") # Force regenconf of nsswitch because for some reason @@ -228,11 +236,6 @@ class MyMigration(Migration): full_upgrade_cmd += "yunohost yunohost-admin yunohost-portal moulinette ssowat " # This one is needed to solve aptitude derping with nginx dependencies full_upgrade_cmd += "libluajit2-5.1-2 " - # For some reason aptitude is derping about python3 / python3-venv so try to explicitly tell to install python3.11 to replace 3.9... - if os.system('dpkg --list | grep -q "^ii python3.9-venv "') == 0: - full_upgrade_cmd += "python3.11-venv python3.9-venv- " - if os.system('dpkg --list | grep -q "^ii python3.9 "') == 0: - full_upgrade_cmd += "python3.11 python3.9- " try: aptitude_with_progress_bar(full_upgrade_cmd) From 65ea34d7cb729f8d1f55d0e7e442a636bf64c83e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 30 Jul 2024 23:53:39 +0200 Subject: [PATCH 158/218] bullseye->bookworm: boring tweak to remove chattr +i from /etc/resolv.conf otherwise resolvconf will later explode and complain about it --- src/migrations/0027_migrate_to_bookworm.py.disabled | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/migrations/0027_migrate_to_bookworm.py.disabled b/src/migrations/0027_migrate_to_bookworm.py.disabled index 850f20198..ac8becccd 100644 --- a/src/migrations/0027_migrate_to_bookworm.py.disabled +++ b/src/migrations/0027_migrate_to_bookworm.py.disabled @@ -133,6 +133,9 @@ class MyMigration(Migration): "echo 'libc6 libraries/restart-without-asking boolean true' | debconf-set-selections" ) + # Stupid stuff because resolvconf later wants to edit /etc/resolv.conf and will miserably crash if it's immutable + os.system("chattr -i /etc/resolv.conf") + # Do not restart nginx during the upgrade of nginx-common and nginx-extras ... # c.f. https://manpages.debian.org/bullseye/init-system-helpers/deb-systemd-invoke.1p.en.html # and zcat /usr/share/doc/init-system-helpers/README.policy-rc.d.gz From fe524dd866a1852b415cde7a10c366dfd754f19f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 31 Jul 2024 15:48:06 +0200 Subject: [PATCH 159/218] Fix yunomprompt not being enable after ISO install --- bin/yunoprompt | 2 +- hooks/conf_regen/01-yunohost | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/yunoprompt b/bin/yunoprompt index 3ab510d2a..fdc51d9bd 100755 --- a/bin/yunoprompt +++ b/bin/yunoprompt @@ -69,7 +69,7 @@ then You should now proceed with YunoHost post-installation. This is where you will be asked for: - the main domain of your server; - - the administration password. + - the username and password for the first admin You can perform this step: - from your web browser, by accessing: https://yunohost.local/ or ${local_ip} diff --git a/hooks/conf_regen/01-yunohost b/hooks/conf_regen/01-yunohost index 3d7bfa023..ac92d5300 100755 --- a/hooks/conf_regen/01-yunohost +++ b/hooks/conf_regen/01-yunohost @@ -64,6 +64,10 @@ do_init_regen() { systemctl enable yunohost-api.service --quiet systemctl start yunohost-api.service + + # Enable yunoprompt (in particular for installs from ISO where we want this to show on first boot instead of asking for a login/password) + systemctl enable yunoprompt --quiet + # Yunohost-firewall is enabled only during postinstall, not init, not 100% sure why cp dpkg-origins /etc/dpkg/origins/yunohost From e88ba3428c47a6fbd99b371cf18bf8ab5c91d165 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 1 Aug 2024 18:04:53 +0200 Subject: [PATCH 160/218] Minor cosmetic / prevent double slashes --- hooks/conf_regen/02-ssl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/conf_regen/02-ssl b/hooks/conf_regen/02-ssl index 1aaab59d1..10ef7d83c 100755 --- a/hooks/conf_regen/02-ssl +++ b/hooks/conf_regen/02-ssl @@ -3,7 +3,7 @@ set -e ssl_dir="/usr/share/yunohost/ssl" -template_dir="/usr/share/yunohost/conf/ssl/" +template_dir="/usr/share/yunohost/conf/ssl" ynh_ca="/etc/yunohost/certs/yunohost.org/ca.pem" ynh_crt="/etc/yunohost/certs/yunohost.org/crt.pem" ynh_key="/etc/yunohost/certs/yunohost.org/key.pem" From 9f6f5f92fba75aea01300a57d9c83b1ffb673a84 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 1 Aug 2024 18:06:23 +0200 Subject: [PATCH 161/218] Update changelog for 11.2.26 --- debian/changelog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index 1eb7edf34..126361bfb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +yunohost (11.2.26) stable; urgency=low + + - bullseye->bookworm: encourage apt to remove luajit if it's installed because for some reason it's causing issues (423e79bd5) + - bullseye->bookworm: have a specific step dedicated to upgrade python3.9 to 3.11 because apt(itude) is derping about it sometimes... (d766f7cdd) + - bullseye->bookworm: boring tweak to remove chattr +i from /etc/resolv.conf otherwise resolvconf will later explode and complain about it (65ea34d7c) + - Fix yunomprompt not being enable after ISO install (fe524dd86) + + -- Alexandre Aubin Thu, 01 Aug 2024 18:05:33 +0200 + yunohost (11.2.25) stable; urgency=low - diagnosis: be more robust when diagnosis DMARC records not containing '=' (d376677db) From 3deffdbd57b947e1bb55951eff88e8140e624a50 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 3 Aug 2024 18:37:40 +0200 Subject: [PATCH 162/218] apt resource: fix handling of empty 'packages' list breaking dpkg-deb call --- src/utils/resources.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/utils/resources.py b/src/utils/resources.py index 71c455c77..d28788174 100644 --- a/src/utils/resources.py +++ b/src/utils/resources.py @@ -1170,7 +1170,10 @@ class AptDependenciesAppResource(AppResource): super().__init__(properties, *args, **kwargs) if isinstance(self.packages, str): - self.packages = [value.strip() for value in self.packages.split(",")] + if self.packages.strip() == "": + self.packages = [] + else: + self.packages = [value.strip() for value in self.packages.split(",")] if self.packages_from_raw_bash: out, err = self.check_output_bash_snippet(self.packages_from_raw_bash) @@ -1224,7 +1227,9 @@ class AptDependenciesAppResource(AppResource): "ynh_install_extra_app_dependencies" ) - script = " ".join([ynh_apt_install_dependencies, *self.packages]) + script = "" + if self.packages: + script += " ".join([ynh_apt_install_dependencies, *self.packages]) for repo, values in self.extras.items(): script += "\n" + " ".join( [ From 90c403490819b60f95d758c4771d610376250a94 Mon Sep 17 00:00:00 2001 From: cjdw Date: Thu, 1 Aug 2024 13:12:53 +0000 Subject: [PATCH 163/218] Translated using Weblate (Indonesian) Currently translated at 100.0% (805 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locales/id.json b/locales/id.json index f9ad396e1..23639cf60 100644 --- a/locales/id.json +++ b/locales/id.json @@ -336,8 +336,8 @@ "domain_config_cert_summary_abouttoexpire": "Sertifikat saat ini akan kedaluwarsa. Akan secara otomatis diperbarui secepatnya.", "domain_config_mail_in": "Surel datang", "password_too_simple_1": "Panjang kata sandi harus paling tidak 8 karakter", - "password_too_simple_2": "Panjang kata sandi harus paling tidak 8 karakter dan mengandung digit, huruf kapital, dan huruf kecil", - "password_too_simple_3": "Kata sandi harus terdiri dari minimal 8 karakter dan berisi karakter angka, besar, kecil, dan khusus", + "password_too_simple_2": "Kata sandi harus terdiri dari minimal 8 karakter dan berisi karakter angka, besar, dan kecil", + "password_too_simple_3": "Kata sandi harus terdiri dari minimal 8 karakter dan berisi karakter angka, besar, kecil dan khusus", "password_too_simple_4": "Panjang kata sandi harus paling tidak 12 karakter dan mengandung digit, huruf kapital, huruf kecil, dan karakter khusus", "port_already_closed": "Porta {port} telah ditutup untuk koneksi {ip_version}", "service_description_yunomdns": "Membuat Anda bisa menemukan peladen Anda menggunakan 'yunohost.local' di jaringan lokal Anda", @@ -469,7 +469,7 @@ "config_unknown_filter_key": "Kunci filter '{filter_key}' tidak sesuai.", "backup_permission": "Izin pencadangan untuk {app}", "config_forbidden_keyword": "Kata kunci '{keyword}' sudah ada, Anda tidak dapat membuat atau menggunakan panel konfigurasi disertai pertanyaan dengan id ini.", - "good_practices_about_user_password": "Anda sekarang akan menentukan kata sandi pengguna baru. Kata sandi harus terdiri dari minimal 8 karakter—walaupun sebaiknya menggunakan kata sandi yang lebih panjang (cth. parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", + "good_practices_about_user_password": "Sekarang Anda akan menentukan kata sandi pengguna baru. Kata sandi harus terdiri dari minimal 8 karakter—walaupun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", "domain_dns_push_failed_to_authenticate": "Autentikasi gagal pada API registrar untuk domain '{domain}'. Besar kemungkinan karena kredensial tidak sesuai? (Galat: {error})", "certmanager_domain_dns_ip_differs_from_public_ip": "Rekaman DNS untuk domain '{domain}' berbeda dengan IP server ini. Silakan periksa kategori 'Catatan DNS' (dasar) dalam diagnosis untuk info lebih lanjut. Jika Anda baru saja memodifikasi rekaman A, silakan menunggu hingga rekaman tersebut disebarkan (beberapa pemeriksa sebaran DNS tersedia online). (Jika Anda tahu apa yang Anda lakukan, gunakan '--no-checks' untuk mematikan pemeriksaan ini.)", "certmanager_hit_rate_limit": "Terlalu banyak sertifikat yang telah diterbitkan untuk kumpulan domain {domain} ini baru-baru ini. Silakan coba lagi nanti. Lihat https://letsencrypt.org/docs/rate-limits/ untuk detail lebih lanjut", @@ -483,7 +483,7 @@ "config_cant_set_value_on_section": "Anda tidak dapat menetapkan satu nilai pun di seluruh bagian konfigurasi.", "backup_applying_method_custom": "Memanggil metode pencadangan khusus '{method}'…", "backup_ask_for_copying_if_needed": "Apakah Anda ingin melakukan pencadangan menggunakan {size}MB untuk sementara? (Cara ini digunakan karena beberapa berkas tidak dapat disiapkan menggunakan metode yang lebih efisien.)", - "good_practices_about_admin_password": "Sekarang Anda akan menentukan kata sandi administrasi baru. Kata sandi harus terdiri dari minimal 8 karakter—walaupun sebaiknya menggunakan kata sandi yang lebih panjang (cth. parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", + "good_practices_about_admin_password": "Sekarang Anda akan menentukan kata sandi administrasi baru. Kata sandi harus terdiri dari minimal 8 karakter—walaupun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", "certmanager_acme_not_configured_for_domain": "Tantangan ACME tidak dapat dijalankan untuk {domain} saat ini karena konfigurasi pada nginx tidak memiliki potongan kode yang sesuai… Pastikan konfigurasi nginx Anda mutakhir menggunakan `yunohost tools regen-conf nginx --dry-run --with-diff`.", "diagnosis_http_special_use_tld": "Domain {domain} berdasarkan pada domain tingkat atas (TLD) penggunaan khusus seperti .local atau .test dan oleh karena itu tidak diharapkan untuk diekspos di luar jaringan lokal.", "certmanager_self_ca_conf_file_not_found": "Tidak dapat menemukan berkas konfigurasi untuk otoritas teken mandiri (berkas: {file})", From 684c3d9b2c7750457b1c0811a1326ab45ee4233b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20=C3=87=C4=B1r=C3=A7=C4=B1r?= Date: Fri, 2 Aug 2024 15:24:58 +0000 Subject: [PATCH 164/218] Translated using Weblate (Turkish) Currently translated at 3.8% (31 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/tr/ --- locales/tr.json | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/locales/tr.json b/locales/tr.json index e51aa5efa..f9351acff 100644 --- a/locales/tr.json +++ b/locales/tr.json @@ -1,7 +1,7 @@ { "password_too_simple_1": "Şifre en az 8 karakter uzunluğunda olmalı", "action_invalid": "Geçersiz işlem '{action}'", - "admin_password": "Yönetici şifresi", + "admin_password": "Yönetici parolası", "already_up_to_date": "Yapılacak yeni bir şey yok. Her şey zaten güncel.", "app_action_broke_system": "Bu işlem bazı hizmetleri bozmuş olabilir: {services}", "good_practices_about_user_password": "Şimdi yeni bir kullanıcı şifresi tanımlamak üzeresiniz. Parola en az 8 karakter uzunluğunda olmalıdır - ancak daha uzun bir parola (yani bir parola) ve/veya çeşitli karakterler (büyük harf, küçük harf, rakamlar ve özel karakterler) daha iyidir.", @@ -20,5 +20,16 @@ "app_change_url_failed": "{app}: {error} için url değiştirilemedi", "app_argument_required": "'{name}' değeri gerekli", "app_argument_invalid": "'{name}': {error} için geçerli bir değer giriniz", - "app_argument_password_no_default": "'{name}': çözümlenirken bir hata meydana geldi. Parola argümanı güvenlik nedeniyle varsayılan değer alamaz" -} \ No newline at end of file + "app_argument_password_no_default": "'{name}': çözümlenirken bir hata meydana geldi. Parola argümanı güvenlik nedeniyle varsayılan değer alamaz", + "app_failed_to_download_asset": "{app} uygulaması için {source_id}{url} adresinden indirme işlemi sağlanamadı: {out}", + "app_extraction_failed": "Kurulum dosyaları çıkarılamadı", + "app_change_url_require_full_domain": "{app} bu yeni URL'ye taşınamaz. Çünkü ana etki alanı gerekli (Yani path = / olmalı )", + "app_change_url_script_failed": "URL değiştirme betiğinde bir hata oluştu", + "app_change_url_success": "{app} URL artık {domain}{path}", + "app_config_unable_to_apply": "Yapılandırma paneli değerleri uygulanamadı.", + "app_config_unable_to_read": "Yapılandırma paneli değerleri okunamadı.", + "app_change_url_no_script": "{app_name} uygulaması henüz URL değişikliğini desteklemiyor. Paket yükseltmeniz gerekebilir.", + "app_change_url_identical_domains": "('{domain}{path}') Eski ve yeni alan adının veya URL adresler aynı.Şu anda yapacak bir şey bulunmuyor.", + "app_corrupt_source": "YunoHost, {app} için '{source_id}' ({url}) adresinden indirebildi, ancak varlık olması gereken yapılandırmalarla eşleşmiyor. Bu, sunucunuzda geçici bir ağ arızası meydana geldiği veya varlığın bir şekilde yayın yapılan veri sağlacıyısı (veya kötü niyetli bir kişi?) tarafından değiştirildiği ve YunoHost yapımcılarının araştırması ve belki de bu değişikliği dikkate almak için uygulama bildirimini güncellemesi gerektiği anlamına gelebilir.\n Beklenen sha256 sağlama toplamı: {expected_sha256}\n İndirilen sha256 sağlama toplamı: {computed_sha256}\n İndirilen dosya boyutu: {size}", + "app_failed_to_upgrade_but_continue": "{failed_app} uygulaması yükseltilirken başarısız oldu. Sıradaki güncellemeler devam ediyor. Konu ile ilgili hata kayıtlarını görüntülemek için 'yunohost log show {operation_logger_name}' komutunu çalıştırın" +} From 9915559c40a4846c5390fe89500c6dae271d1467 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 3 Aug 2024 18:42:08 +0200 Subject: [PATCH 165/218] Update changelog for 11.2.27 --- debian/changelog | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index 126361bfb..c02f67c4b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +yunohost (11.2.27) stable; urgency=low + + - apt resource: fix handling of empty 'packages' list breaking dpkg-deb call (3deffdbd5) + - i18n: Translations updated for Indonesian, Turkish + + Thanks to all contributors <3 ! (Ali Çırçır, cjdw) + + -- Alexandre Aubin Sat, 03 Aug 2024 18:41:27 +0200 + yunohost (11.2.26) stable; urgency=low - bullseye->bookworm: encourage apt to remove luajit if it's installed because for some reason it's causing issues (423e79bd5) From 200f0272d5582476fd696742596078ad45549abf Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 8 Aug 2024 01:53:58 +0200 Subject: [PATCH 166/218] ci: propagate new CI image names --- .gitlab/ci/build.gitlab-ci.yml | 2 +- .gitlab/ci/doc.gitlab-ci.yml | 2 +- .gitlab/ci/install.gitlab-ci.yml | 2 +- .gitlab/ci/lint.gitlab-ci.yml | 6 +++--- .gitlab/ci/test.gitlab-ci.yml | 2 +- .gitlab/ci/translation.gitlab-ci.yml | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index 610580dac..d8fa641b4 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -1,6 +1,6 @@ .build-stage: stage: build - image: "before-install" + image: "build-and-lint" variables: YNH_SOURCE: "https://github.com/yunohost" before_script: diff --git a/.gitlab/ci/doc.gitlab-ci.yml b/.gitlab/ci/doc.gitlab-ci.yml index 35509556a..a69b94ed5 100644 --- a/.gitlab/ci/doc.gitlab-ci.yml +++ b/.gitlab/ci/doc.gitlab-ci.yml @@ -4,7 +4,7 @@ generate-helpers-doc: stage: doc - image: "before-install" + image: "build-and-lint" needs: [] before_script: - apt-get update -y && apt-get install git hub -y diff --git a/.gitlab/ci/install.gitlab-ci.yml b/.gitlab/ci/install.gitlab-ci.yml index 65409c6eb..68f57a1c0 100644 --- a/.gitlab/ci/install.gitlab-ci.yml +++ b/.gitlab/ci/install.gitlab-ci.yml @@ -14,7 +14,7 @@ upgrade: extends: .install-stage - image: "after-install" + image: "core-tests" script: - apt-get update -o Acquire::Retries=3 - DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb diff --git a/.gitlab/ci/lint.gitlab-ci.yml b/.gitlab/ci/lint.gitlab-ci.yml index bd395ed94..ad1e46d07 100644 --- a/.gitlab/ci/lint.gitlab-ci.yml +++ b/.gitlab/ci/lint.gitlab-ci.yml @@ -5,7 +5,7 @@ lint39: stage: lint - image: "before-install" + image: "build-and-lint" needs: [] allow_failure: true script: @@ -13,14 +13,14 @@ lint39: invalidcode39: stage: lint - image: "before-install" + image: "build-and-lint" needs: [] script: - tox -e py39-invalidcode mypy: stage: lint - image: "before-install" + image: "build-and-lint" needs: [] script: - tox -e py39-mypy diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index 349665b68..bb1b8e3b6 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -5,7 +5,7 @@ .test-stage: stage: test - image: "after-install" + image: "core-tests" variables: PYTEST_ADDOPTS: "--color=yes" before_script: diff --git a/.gitlab/ci/translation.gitlab-ci.yml b/.gitlab/ci/translation.gitlab-ci.yml index 83db2b5a4..080a0c3da 100644 --- a/.gitlab/ci/translation.gitlab-ci.yml +++ b/.gitlab/ci/translation.gitlab-ci.yml @@ -13,7 +13,7 @@ test-i18n-keys: autofix-translated-strings: stage: translation - image: "before-install" + image: "build-and-lint" needs: [] before_script: - apt-get update -y && apt-get install git hub -y From 764fe6a7bab9a7f477f77d3f7a6efdb3bb2c882e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 8 Aug 2024 05:26:00 +0200 Subject: [PATCH 167/218] ci: smol optimization to avoid installing unecessary pip dependencies? --- .gitlab/ci/test.gitlab-ci.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index bb1b8e3b6..1caa3646d 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -1,15 +1,12 @@ -.install_debs: &install_debs - - apt-get update -o Acquire::Retries=3 - - DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb - - pip3 install -U mock pip pytest pytest-cov pytest-mock pytest-sugar requests-mock tox ansi2html black jinja2 "packaging<22" - .test-stage: stage: test image: "core-tests" variables: PYTEST_ADDOPTS: "--color=yes" before_script: - - *install_debs + - apt-get update -o Acquire::Retries=3 + - DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb + - pip3 install -U mock pytest pytest-cov pytest-mock pytest-sugar requests-mock "packaging<22" cache: paths: - src/tests/apps @@ -33,7 +30,8 @@ full-tests: variables: PYTEST_ADDOPTS: "--color=yes" before_script: - - *install_debs + - apt-get update -o Acquire::Retries=3 + - DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb - yunohost tools postinstall -d domain.tld -u syssa -F 'Syssa Mine' -p the_password --ignore-dyndns --force-diskspace script: - python3 -m pytest --cov=yunohost tests/ src/tests/ --junitxml=report.xml From 9083a5cc3d0685d71d7856439a35ea3dab480263 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 8 Aug 2024 05:38:22 +0200 Subject: [PATCH 168/218] ci: ughr ok, dunno what i was thinking, partially revert the previous commit, go to sleep Aleks ffs --- .gitlab/ci/test.gitlab-ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index 1caa3646d..4fead982a 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -1,12 +1,15 @@ +.install_debs: &install_debs + - apt-get update -o Acquire::Retries=3 + - DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb + - pip3 install -U mock pip pytest pytest-cov pytest-mock pytest-sugar requests-mock "packaging<22" + .test-stage: stage: test image: "core-tests" variables: PYTEST_ADDOPTS: "--color=yes" before_script: - - apt-get update -o Acquire::Retries=3 - - DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb - - pip3 install -U mock pytest pytest-cov pytest-mock pytest-sugar requests-mock "packaging<22" + - *install_debs cache: paths: - src/tests/apps @@ -30,8 +33,7 @@ full-tests: variables: PYTEST_ADDOPTS: "--color=yes" before_script: - - apt-get update -o Acquire::Retries=3 - - DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb + - *install_debs - yunohost tools postinstall -d domain.tld -u syssa -F 'Syssa Mine' -p the_password --ignore-dyndns --force-diskspace script: - python3 -m pytest --cov=yunohost tests/ src/tests/ --junitxml=report.xml From d0df3caed4a5526b24a527d9427340f3e704ce61 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 8 Aug 2024 19:36:22 +0200 Subject: [PATCH 169/218] ci: propagate misc tweaks for CI speedup made on bookworm --- .gitlab-ci.yml | 5 ++++- .gitlab/ci/build.gitlab-ci.yml | 15 +++++---------- .gitlab/ci/doc.gitlab-ci.yml | 1 - .gitlab/ci/install.gitlab-ci.yml | 2 -- .gitlab/ci/test.gitlab-ci.yml | 1 - .gitlab/ci/translation.gitlab-ci.yml | 1 - 6 files changed, 9 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3e030940b..a1be9efdc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,7 +43,10 @@ workflow: - when: always variables: - YNH_BUILD_DIR: "/ynh-build" + GIT_CLONE_PATH: '$CI_BUILDS_DIR/$CI_COMMIT_SHA/$CI_JOB_ID' + YNH_SOURCE: "https://github.com/yunohost" + YNH_DEBIAN: "bookworm" + YNH_SKIP_DIAGNOSIS_DURING_UPGRADE: "true" include: - template: Code-Quality.gitlab-ci.yml diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index d8fa641b4..422d8f74a 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -2,20 +2,18 @@ stage: build image: "build-and-lint" variables: - YNH_SOURCE: "https://github.com/yunohost" + YNH_BUILD_DIR: "$GIT_CLONE_PATH/build" before_script: - mkdir -p $YNH_BUILD_DIR - - DEBIAN_FRONTEND=noninteractive apt update artifacts: paths: - ./*.deb .build_script: &build_script - - DEBIAN_FRONTEND=noninteractive apt --assume-yes -o Dpkg::Options::="--force-confold" install devscripts --no-install-recommends - cd $YNH_BUILD_DIR/$PACKAGE - VERSION=$(dpkg-parsechangelog -S Version 2>/dev/null) - - VERSION_NIGHTLY="${VERSION}+$(date +%Y%m%d%H%M)" - - dch --package "${PACKAGE}" --force-bad-version -v "${VERSION_NIGHTLY}" -D "unstable" --force-distribution "Daily build." + - VERSION_TIMESTAMPED="${VERSION}+$(date +%Y%m%d%H%M)" + - dch --package "${PACKAGE}" --force-bad-version -v "${VERSION_TIMESTAMPED}" -D "unstable" --force-distribution "CI build." - debuild --no-lintian -us -uc - cp $YNH_BUILD_DIR/*.deb ${CI_PROJECT_DIR}/ - cd ${CI_PROJECT_DIR} @@ -36,14 +34,12 @@ build-yunohost: - DEBIAN_FRONTEND=noninteractive apt --assume-yes -o Dpkg::Options::="--force-confold" build-dep $YNH_BUILD_DIR/$PACKAGE - *build_script - build-ssowat: extends: .build-stage variables: PACKAGE: "ssowat" script: - - DEBIAN_DEPENDS=$(cat debian/control | tr "," "\n" | grep -Po "ssowat \([>,=,<]+ .*\)" | grep -Po "[0-9\.]+") - - git clone $YNH_SOURCE/$PACKAGE -b $CI_COMMIT_REF_NAME $YNH_BUILD_DIR/$PACKAGE --depth 1 || git clone $YNH_SOURCE/$PACKAGE -b $DEBIAN_DEPENDS $YNH_BUILD_DIR/$PACKAGE --depth 1 || git clone $YNH_SOURCE/$PACKAGE $YNH_BUILD_DIR/$PACKAGE --depth 1 + - git clone $YNH_SOURCE/$PACKAGE -b $CI_COMMIT_REF_NAME $YNH_BUILD_DIR/$PACKAGE --depth 1 || git clone $YNH_SOURCE/$PACKAGE -b $YNH_DEBIAN $YNH_BUILD_DIR/$PACKAGE --depth 1 || git clone $YNH_SOURCE/$PACKAGE $YNH_BUILD_DIR/$PACKAGE --depth 1 - DEBIAN_FRONTEND=noninteractive apt --assume-yes -o Dpkg::Options::="--force-confold" build-dep $YNH_BUILD_DIR/$PACKAGE - *build_script @@ -52,7 +48,6 @@ build-moulinette: variables: PACKAGE: "moulinette" script: - - DEBIAN_DEPENDS=$(cat debian/control | tr "," "\n" | grep -Po "moulinette \([>,=,<]+ .*\)" | grep -Po "[0-9\.]+") - - git clone $YNH_SOURCE/$PACKAGE -b $CI_COMMIT_REF_NAME $YNH_BUILD_DIR/$PACKAGE --depth 1 || git clone $YNH_SOURCE/$PACKAGE -b $DEBIAN_DEPENDS $YNH_BUILD_DIR/$PACKAGE --depth 1 || git clone $YNH_SOURCE/$PACKAGE $YNH_BUILD_DIR/$PACKAGE --depth 1 + - git clone $YNH_SOURCE/$PACKAGE -b $CI_COMMIT_REF_NAME $YNH_BUILD_DIR/$PACKAGE --depth 1 || git clone $YNH_SOURCE/$PACKAGE -b $YNH_DEBIAN $YNH_BUILD_DIR/$PACKAGE --depth 1 || git clone $YNH_SOURCE/$PACKAGE $YNH_BUILD_DIR/$PACKAGE --depth 1 - DEBIAN_FRONTEND=noninteractive apt --assume-yes -o Dpkg::Options::="--force-confold" build-dep $YNH_BUILD_DIR/$PACKAGE - *build_script diff --git a/.gitlab/ci/doc.gitlab-ci.yml b/.gitlab/ci/doc.gitlab-ci.yml index a69b94ed5..179190166 100644 --- a/.gitlab/ci/doc.gitlab-ci.yml +++ b/.gitlab/ci/doc.gitlab-ci.yml @@ -7,7 +7,6 @@ generate-helpers-doc: image: "build-and-lint" needs: [] before_script: - - apt-get update -y && apt-get install git hub -y - git config --global user.email "yunohost@yunohost.org" - git config --global user.name "$GITHUB_USER" script: diff --git a/.gitlab/ci/install.gitlab-ci.yml b/.gitlab/ci/install.gitlab-ci.yml index 68f57a1c0..bbe4042d8 100644 --- a/.gitlab/ci/install.gitlab-ci.yml +++ b/.gitlab/ci/install.gitlab-ci.yml @@ -16,7 +16,6 @@ upgrade: extends: .install-stage image: "core-tests" script: - - apt-get update -o Acquire::Retries=3 - DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb @@ -24,6 +23,5 @@ install-postinstall: extends: .install-stage image: "before-install" script: - - apt-get update -o Acquire::Retries=3 - DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb - yunohost tools postinstall -d domain.tld -u syssa -F 'Syssa Mine' -p the_password --ignore-dyndns --force-diskspace diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index 4fead982a..e138672d2 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -1,5 +1,4 @@ .install_debs: &install_debs - - apt-get update -o Acquire::Retries=3 - DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb - pip3 install -U mock pip pytest pytest-cov pytest-mock pytest-sugar requests-mock "packaging<22" diff --git a/.gitlab/ci/translation.gitlab-ci.yml b/.gitlab/ci/translation.gitlab-ci.yml index 080a0c3da..bc9e1308d 100644 --- a/.gitlab/ci/translation.gitlab-ci.yml +++ b/.gitlab/ci/translation.gitlab-ci.yml @@ -16,7 +16,6 @@ autofix-translated-strings: image: "build-and-lint" needs: [] before_script: - - apt-get update -y && apt-get install git hub -y - git config --global user.email "yunohost@yunohost.org" - git config --global user.name "$GITHUB_USER" - hub clone --branch ${CI_COMMIT_REF_NAME} "https://$GITHUB_TOKEN:x-oauth-basic@github.com/YunoHost/yunohost.git" github_repo From 6733526bee20811051f5e94e9d4963994a3528d8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 8 Aug 2024 19:14:05 +0200 Subject: [PATCH 170/218] ci: try skipping diagnosis during upgrade to speed things up a bit? --- debian/postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/postinst b/debian/postinst index 238817cd7..b8a07442f 100644 --- a/debian/postinst +++ b/debian/postinst @@ -27,7 +27,7 @@ do_configure() { yunohost tools migrations run --auto echo "Re-diagnosing server health..." - yunohost diagnosis run --force + [[ -n "${YNH_SKIP_DIAGNOSIS_DURING_UPGRADE:-}" ]] && echo "(Skipping)" || yunohost diagnosis run --force echo "Refreshing app catalog..." yunohost tools update apps --output-as none || true From df320a44cf299a10aec0852dbb03abf6abc4330d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 8 Aug 2024 19:24:16 +0200 Subject: [PATCH 171/218] ci: ignore boring warning 'Could not identify correctly the dns zone for domain sub.domain.tld' --- src/dns.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dns.py b/src/dns.py index 458deae7e..09cd25c8e 100644 --- a/src/dns.py +++ b/src/dns.py @@ -481,9 +481,11 @@ def _get_dns_zone_for_domain(domain): else: zone = parent_list[-1] - logger.warning( - f"Could not identify correctly the dns zone for domain {domain}, returning {zone}" - ) + # Adding this otherwise the CI is flooding about those ... + if domain not in ["example.tld", "sub.example.tld", "domain.tld", "sub.domain.tld", "domain_a.dev", "domain_b.dev"]: + logger.warning( + f"Could not identify correctly the dns zone for domain {domain}, returning {zone}" + ) return zone From 92f4a605b8c9246596bd0ac111249803747928ee Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 8 Aug 2024 19:41:29 +0200 Subject: [PATCH 172/218] ci: do not run on black PR --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1be9efdc..c217f6511 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,6 +38,8 @@ workflow: - if: $CI_COMMIT_TAG # For tags - if: $CI_COMMIT_REF_NAME == "ci-format-$CI_DEFAULT_BRANCH" # Ignore black formatting branch created by the CI when: never + - if: $CI_COMMIT_REF_NAME == "actions/black" # Ignore black formatting branch created by the CI + when: never - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push" # If it's not the default branch and if it's a push, then do not trigger a build when: never - when: always From f02d4a437612087d1e468d3087058c85a76d5b2b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 8 Aug 2024 19:47:53 +0200 Subject: [PATCH 173/218] ci: more optimization, lets not install pytest etc because it should already be in the image --- .gitlab/ci/test.gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index e138672d2..9e95e9f02 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -1,6 +1,5 @@ .install_debs: &install_debs - DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb - - pip3 install -U mock pip pytest pytest-cov pytest-mock pytest-sugar requests-mock "packaging<22" .test-stage: stage: test From de9980f31e73ba6e510f29d2bf084774c5002e7d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 8 Aug 2024 20:35:36 +0200 Subject: [PATCH 174/218] Zblerg --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c217f6511..748940b33 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ workflow: variables: GIT_CLONE_PATH: '$CI_BUILDS_DIR/$CI_COMMIT_SHA/$CI_JOB_ID' YNH_SOURCE: "https://github.com/yunohost" - YNH_DEBIAN: "bookworm" + YNH_DEBIAN: "bullseye" YNH_SKIP_DIAGNOSIS_DURING_UPGRADE: "true" include: From 938e40086563cf560e1fe105d616e91fa8821c9b Mon Sep 17 00:00:00 2001 From: alexAubin <4533074+alexAubin@users.noreply.github.com> Date: Thu, 8 Aug 2024 18:36:00 +0000 Subject: [PATCH 175/218] :art: Format Python code with Black --- src/dns.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/dns.py b/src/dns.py index 09cd25c8e..c6a9036a5 100644 --- a/src/dns.py +++ b/src/dns.py @@ -482,7 +482,14 @@ def _get_dns_zone_for_domain(domain): zone = parent_list[-1] # Adding this otherwise the CI is flooding about those ... - if domain not in ["example.tld", "sub.example.tld", "domain.tld", "sub.domain.tld", "domain_a.dev", "domain_b.dev"]: + if domain not in [ + "example.tld", + "sub.example.tld", + "domain.tld", + "sub.domain.tld", + "domain_a.dev", + "domain_b.dev", + ]: logger.warning( f"Could not identify correctly the dns zone for domain {domain}, returning {zone}" ) From 36b9188aec41b1dbf0ad32e7b046d033168dd250 Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Thu, 15 Aug 2024 20:41:09 +0200 Subject: [PATCH 176/218] Update src/app.py Co-authored-by: tituspijean --- src/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 0f1e74f37..a9b8796f5 100644 --- a/src/app.py +++ b/src/app.py @@ -2869,7 +2869,7 @@ def _get_conflicting_apps(domain, path, ignore_app=None): for p, a in apps_map[domain].items(): if a["id"] == ignore_app: continue - if path == p or ( not path.startswith("/.well-known/") and path == "/" ) or ( not path.startswith("/.well-known/") and p == "/" ): + if path == p or ( not path.startswith("/.well-known/") and ( path == "/" or p == "/" ) ): conflicts.append((p, a["id"], a["label"])) return conflicts From 4d5cc62540eebe9888b868d131212f2b505669c8 Mon Sep 17 00:00:00 2001 From: Tagadda <36127788+Tagadda@users.noreply.github.com> Date: Thu, 15 Aug 2024 18:50:36 +0000 Subject: [PATCH 177/218] :art: Format Python code with Black --- src/app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 378c45696..5b94df4b1 100644 --- a/src/app.py +++ b/src/app.py @@ -2937,7 +2937,9 @@ def _get_conflicting_apps(domain, path, ignore_app=None): for p, a in apps_map[domain].items(): if a["id"] == ignore_app: continue - if path == p or ( not path.startswith("/.well-known/") and ( path == "/" or p == "/" ) ): + if path == p or ( + not path.startswith("/.well-known/") and (path == "/" or p == "/") + ): conflicts.append((p, a["id"], a["label"])) return conflicts From 658ef88e476d09ee33d1762167c39cc08e11692b Mon Sep 17 00:00:00 2001 From: xabirequejo Date: Sun, 4 Aug 2024 10:27:02 +0000 Subject: [PATCH 178/218] Translated using Weblate (Basque) Currently translated at 100.0% (805 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/eu/ --- locales/eu.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/locales/eu.json b/locales/eu.json index 9280198b8..70b1db258 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -155,7 +155,7 @@ "app_packaging_format_not_supported": "Aplikazio hau ezin da instalatu YunoHostek ez duelako paketea ezagutzen. Sistema eguneratzea hausnartu beharko zenuke ziur asko.", "diagnosis_dns_try_dyndns_update_force": "Domeinu honen DNS konfigurazioa YunoHostek kudeatu beharko luke automatikoki. Gertatuko ez balitz, eguneratzera behartu zenezake yunohost dyndns update --force erabiliz.", "app_manifest_install_ask_path": "Aukeratu aplikazio hau instalatzeko URLaren bidea (domeinuaren atzeko aldean)", - "app_manifest_install_ask_admin": "Aukeratu administrari bat aplikazio honetarako", + "app_manifest_install_ask_admin": "Aukeratu administratzaile bat aplikazio honetarako", "app_manifest_install_ask_password": "Aukeratu administrazio-pasahitz bat aplikazio honetarako", "ask_user_domain": "Erabiltzailearen posta elektroniko eta XMPP konturako erabiliko den domeinua", "app_action_cannot_be_ran_because_required_services_down": "{services} zerbitzuak martxan egon beharko lirateke eragiketa hau exekutatu ahal izateko. Saia zaitez zerbitzuok berrabiarazten (eta ikertu zergatik ez diren abiarazi).", @@ -590,7 +590,7 @@ "migration_ldap_rollback_success": "Sistema lehengoratu da.", "regenconf_need_to_explicitly_specify_ssh": "SSH ezarpenak eskuz aldatu dira, baina aldaketak erabiltzeko '--force' zehaztu behar duzu 'ssh' atalean.", "regex_incompatible_with_tile": "/!\\ Pakete-arduradunak! {permission}' baimenak show_tile aukera 'true' bezala dauka eta horregatik ezin duzue regex URLa URL nagusi bezala ezarri", - "root_password_desynchronized": "Administrariaren pasahitza aldatu da baina YunoHostek ezin izan du aldaketa root pasahitzera hedatu!", + "root_password_desynchronized": "Administratzailearen pasahitza aldatu da baina YunoHostek ezin izan du aldaketa root pasahitzera hedatu!", "server_shutdown": "Zerbitzaria itzaliko da", "service_stop_failed": "Ezin izan da '{service}' zerbitzua geldiarazi\n\nZerbitzuen azken erregistroak: {logs}", "service_unknown": "'{service}' zerbitzu ezezaguna", @@ -669,7 +669,7 @@ "app_action_failed": "{app} aplikaziorako {action} eragiketak huts egin du", "config_action_disabled": "Ezin izan da '{action}' eragiketa exekutatu ezgaituta dagoelako, egiaztatu bere mugak betetzen dituzula. Laguntza: {help}", "all_users": "YunoHosten erabiltzaile guztiek", - "app_manifest_install_ask_init_admin_permission": "Nork izan beharko luke aplikazio honetako administrazio aukeretara sarbidea? (Aldatzea dago)", + "app_manifest_install_ask_init_admin_permission": "Nork izan beharko luke aplikazio honetako administrazio-aukeretara sarbidea? (Aldatzea dago)", "app_manifest_install_ask_init_main_permission": "Nork izan beharko luke aplikazio honetara sarbidea? (Aldatzea dago)", "ask_admin_fullname": "Administratzailearen izen osoa", "ask_admin_username": "Administratzailearen erabiltzaile-izena", @@ -681,7 +681,7 @@ "domain_config_cert_summary_expired": "LARRIA: Uneko ziurtagiria ez da baliozkoa! HTTPS ezin da erabili!", "domain_config_cert_summary_selfsigned": "ADI: Uneko zirutagiria norberak sinatutakoa da. Web-nabigatzaileek bisitariak izutuko dituen mezu bat erakutsiko dute!", "global_settings_setting_postfix_compatibility": "Postfixekin bateragarritasuna", - "global_settings_setting_root_access_explain": "Linux sistemetan 'root' administratzaile gorena da. YunoHosten testuinguruan, zuzeneko 'root' SSH saioa ezgaituta dago defektuz, zerbitzariaren sare lokaletik ez bada. 'administrariak' taldeko kideek sudo komandoa erabili dezakete root bailitzan jarduteko terminalaren bidez. Hala ere lagungarri izan liteke root pasahitz (sendo) bat izatea sistema arazteko egoeraren batean administratzaile arruntek saiorik hasi ezin balute.", + "global_settings_setting_root_access_explain": "Linux sistemetan 'root' administratzaile gorena da. YunoHosten testuinguruan, zuzeneko 'root' SSH saioa ezgaituta dago defektuz, zerbitzariaren sare lokaletik ez bada. 'administratzaileak' taldeko kideek sudo komandoa erabili dezakete root bailitzan jarduteko terminalaren bidez. Hala ere lagungarri izan liteke root pasahitz (sendo) bat izatea sistema arazteko egoeraren batean administratzaile arruntek saiorik hasi ezin balute.", "log_settings_reset": "Berrezarri ezarpenak", "log_settings_reset_all": "Berrezarri ezarpen guztiak", "root_password_changed": "root pasahitza aldatu da", @@ -725,7 +725,7 @@ "log_resource_snippet": "Baliabide bat eguneratzen / eskuratzen / eskuragarritasuna uzten", "log_settings_set": "Aplikatu ezarpenak", "migration_description_0025_global_settings_to_configpanel": "Migratu ezarpen globalen nomenklatura zaharra izendegi berri eta modernora", - "migration_description_0026_new_admins_group": "Migratu 'administrari bat baino gehiago' sistema berrira", + "migration_description_0026_new_admins_group": "Migratu 'administratzaile bat baino gehiago' sistema berrira", "password_confirmation_not_the_same": "Pasahitzak ez datoz bat", "password_too_long": "Aukeratu 127 karaktere baino laburragoa den pasahitz bat", "diagnosis_using_stable_codename_details": "Ostatatzaileak zerbait oker ezarri duenean gertatu ohi da hau. Arriskutsua da, Debianen datorren bertsioa 'estable' (egonkorra) bilakatzen denean, apt-k sistemaren pakete guztiak bertsio-berritzen saiatuko da, beharrezko migrazio-prozedurarik burutu gabe. Debianen gordailuan apt iturria editatzen konpontzea da gomendioa, stable gakoa bullseye gakoarekin ordezkatuz. Ezarpen-fitxategia /etc/apt/sources.list izan beharko litzateke, edo /etc/apt/sources.list.d/ direktorioko fitxategiren bat.", @@ -739,7 +739,7 @@ "app_resource_failed": "{app} aplikaziorako baliabideen eguneraketak / prestaketak / askapenak huts egin du: {error}", "app_not_enough_disk": "Aplikazio honek {required} espazio libre behar ditu.", "app_yunohost_version_not_supported": "Aplikazio honek YunoHost >= {required} behar du baina unean instalatutako bertsioa {current} da", - "global_settings_setting_passwordless_sudo": "Baimendu administrariek 'sudo' erabiltzea pasahitzak berriro idatzi beharrik gabe", + "global_settings_setting_passwordless_sudo": "Baimendu administratzaileek 'sudo' erabiltzea pasahitzak berriro idatzi beharrik gabe", "global_settings_setting_portal_theme": "Atariko gaia", "global_settings_setting_portal_theme_help": "Atariko gai propioak sortzeari buruzko informazio gehiago: https://yunohost.org/theming", "invalid_shell": "Shell baliogabea: {shell}", @@ -765,7 +765,7 @@ "group_user_add": "'{user}' erabiltzailea '{group}' taldera gehituko da", "ask_dyndns_recovery_password_explain": "Aukeratu DynDNS domeinurako berreskuratze-pasahitza, etorkizunean berrezarri beharko bazenu.", "ask_dyndns_recovery_password_explain_during_unsubscribe": "Sartu DynDNS domeinuaren berreskuratze-pasahitza.", - "dyndns_no_recovery_password": "Ez da berreskuratze-pasahitzik zehaztu! Domeinuaren gaineko kontrola galduz gero, YunoHost taldeko administrariarekin jarri beharko zara harremanetan!", + "dyndns_no_recovery_password": "Ez da berreskuratze-pasahitzik zehaztu! Domeinuaren gaineko kontrola galduz gero, YunoHost taldeko administratzailearekin jarri beharko zara harremanetan!", "ask_dyndns_recovery_password": "DynDNS berreskuratze-pasahitza", "dyndns_subscribed": "DynDNS domeinua harpidetu da", "dyndns_subscribe_failed": "Ezin izan da DynDNS domeinua harpidetu: {error}", From abdbb7efcd35d66923a4e038bc995dfdb337e493 Mon Sep 17 00:00:00 2001 From: Ivan Davydov Date: Sun, 4 Aug 2024 14:08:12 +0000 Subject: [PATCH 179/218] Translated using Weblate (Russian) Currently translated at 40.9% (330 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/ru/ --- locales/ru.json | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/locales/ru.json b/locales/ru.json index 09cedd59c..f00405844 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -18,7 +18,7 @@ "app_not_installed": "{app} не найдено в списке установленных приложений: {all_apps}", "app_not_properly_removed": "{app} удалены неправильно", "app_removed": "{app} удалено", - "app_requirements_checking": "Проверка необходимых пакетов для {app}…", + "app_requirements_checking": "Проверка зависимостей для {app}…", "app_sources_fetch_failed": "Невозможно получить исходные файлы, проверьте правильность URL?", "app_unknown": "Неизвестное приложение", "app_upgrade_app_name": "Обновление {app}…", @@ -44,7 +44,7 @@ "ask_new_domain": "Новый домен", "ask_new_path": "Новый путь", "ask_password": "Пароль", - "app_remove_after_failed_install": "Удаление приложения после сбоя установки…", + "app_remove_after_failed_install": "Удаление приложения после ошибки установки…", "app_upgrade_script_failed": "Внутри скрипта обновления приложения произошла ошибка", "upnp_disabled": "UPnP отключен", "app_manifest_install_ask_domain": "Выберите домен, в котором должно быть установлено это приложение", @@ -76,13 +76,13 @@ "apps_catalog_init_success": "Система каталога приложений инициализирована!", "backup_abstract_method": "Этот метод резервного копирования еще не реализован", "backup_actually_backuping": "Создание резервного архива из собранных файлов…", - "backup_applying_method_custom": "Вызов пользовательского метода резервного копирования {method}'…", + "backup_applying_method_custom": "Вызов пользовательского метода резервного копирования «{method}»…", "backup_archive_app_not_found": "Не удалось найти {app} в резервной копии", "backup_applying_method_tar": "Создание резервной копии в TAR-архиве…", "backup_archive_broken_link": "Не удалось получить доступ к резервной копии (неправильная ссылка {path})", "apps_catalog_failed_to_download": "Невозможно загрузить каталог приложений {apps_catalog}: {error}", "apps_catalog_obsolete_cache": "Кэш каталога приложений пуст или устарел.", - "backup_archive_cant_retrieve_info_json": "Не удалось загрузить информацию об архиве '{archive}'… info.json не может быть получен (или не является корректным json).", + "backup_archive_cant_retrieve_info_json": "Не удалось загрузить информацию об архиве «{archive}»… Файл info.json не может быть получен (или не является корректным json).", "app_packaging_format_not_supported": "Это приложение не может быть установлено, поскольку его формат не поддерживается вашей версией YunoHost. Возможно, вам следует обновить систему.", "app_restore_failed": "Не удалось восстановить {app}: {error}", "app_restore_script_failed": "Произошла ошибка внутри сценария восстановления приложения", @@ -91,7 +91,7 @@ "app_start_backup": "Сбор файлов для резервного копирования {app}…", "app_start_install": "Устанавливается {app}…", "backup_app_failed": "Не удалось создать резервную копию {app}", - "backup_archive_name_exists": "Резервная копия с таким именем уже существует.", + "backup_archive_name_exists": "Резервная копия с именем «{name}» уже существует.", "backup_archive_name_unknown": "Неизвестный локальный архив резервного копирования с именем '{name}'", "backup_archive_open_failed": "Не удалось открыть архив резервной копии", "backup_archive_corrupted": "Похоже, что архив резервной копии '{archive}' поврежден : {error}", @@ -114,7 +114,7 @@ "config_no_panel": "Панель конфигурации не найдена.", "danger": "Опасно:", "certmanager_warning_subdomain_dns_record": "Субдомен '{subdomain}' не соответствует IP-адресу основного домена '{domain}'. Некоторые функции будут недоступны, пока вы не исправите это и не сгенерируете сертификат снова.", - "app_argument_password_no_default": "Ошибка при парсинге аргумента пароля '{name}': аргумент пароля не может иметь значение по умолчанию по причинам безопасности", + "app_argument_password_no_default": "Ошибка при парсинге аргумента пароля «{name}»: аргумент пароля не может иметь значение по умолчанию по причинам безопасности", "custom_app_url_required": "Вы должны указать URL для обновления вашего пользовательского приложения {app}", "backup_creation_failed": "Не удалось создать резервную копию", "backup_csv_addition_failed": "Не удалось добавить файлы для резервного копирования в CSV-файл", @@ -136,8 +136,8 @@ "diagnosis_apps_issue": "Обнаружена проблема для приложения {app}", "diagnosis_apps_not_in_app_catalog": "Этого приложения нет в каталоге приложений YunoHost. Если оно было там раньше, а теперь удалено, вам стоит подумать об удалении этого приложения, так как оно больше не получит обновлений и может нарушить целостность и безопасность вашей системы.", "diagnosis_apps_deprecated_practices": "Установленная версия этого приложения все еще использует некоторые устаревшие пакеты. Вам стоит подумать об обновлении.", - "additional_urls_already_added": "Этот URL '{url}' уже добавлен в дополнительный URL для разрешения '{permission}'", - "additional_urls_already_removed": "Этот URL '{url}' уже удален из дополнительных URL для разрешения '{permission}'", + "additional_urls_already_added": "Этот URL «{url}» уже добавлен в дополнительный URL для разрешения «{permission}»", + "additional_urls_already_removed": "Этот URL «{url}» уже удален из дополнительных URL для разрешения «{permission}»", "app_action_cannot_be_ran_because_required_services_down": "Для выполнения этого действия должны быть запущены следующие службы: {services}. Попробуйте перезапустить их, чтобы продолжить (и, возможно, выяснить, почему они не работают).", "app_unsupported_remote_type": "Неподдерживаемый удаленный тип, используемый для приложения", "backup_archive_system_part_not_available": "Системная часть '{part}' недоступна в этой резервной копии", @@ -166,7 +166,7 @@ "diagnosis_description_services": "Проверка статусов сервисов", "config_validate_color": "Должен быть правильный hex цвета RGB", "diagnosis_basesystem_hardware": "Аппаратная архитектура сервера – {virt} {arch}", - "certmanager_acme_not_configured_for_domain": "Задача ACME не может быть запущена для {domain} прямо сейчас, потому что в его nginx conf отсутствует соответствующий фрагмент кода… Пожалуйста, убедитесь, что конфигурация вашего nginx обновлена, используя 'yunohost tools regen-conf nginx --dry-run --with-diff'.", + "certmanager_acme_not_configured_for_domain": "Задача ACME не может быть запущена для {domain} прямо сейчас, потому что в его конфигурации nginx отсутствует соответствующий фрагмент кода… Пожалуйста, убедитесь, что Ваша конфигурация nginx обновлена, используя «yunohost tools regen-conf nginx --dry-run --with-diff».", "diagnosis_basesystem_ynh_single_version": "{package} версия: {version} ({repo})", "diagnosis_description_mail": "Электронная почта", "diagnosis_basesystem_kernel": "Версия ядра Linux на сервере {kernel_version}", @@ -340,5 +340,24 @@ "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}" -} \ No newline at end of file + "app_not_upgraded_broken_system": "Не удалось обновить приложение «{failed_app}», система находится в сломанном состоянии, обновления следующих приложений были отменены: {apps}", + "ask_dyndns_recovery_password_explain_unavailable": "Этот домен DynDNS уже зарегистрирован. Если Вы — личность, которая изначально зарегистрировала этот домен, Вы можете ввести пароль, чтобы заново занять этот домен.", + "ask_dyndns_recovery_password": "Пароль восстановления DynDNS", + "certmanager_cert_install_failed": "Не удалась установка сертификата Let's Encrypt для {domains}", + "certmanager_cert_install_failed_selfsigned": "Установка само-подписанного сертификата для {domains} не удалась", + "backup_hook_unknown": "Хук резервного копирования «{hook}» неизвестен", + "backup_no_uncompress_archive_dir": "Такой несжатой директории не существует", + "backup_unable_to_organize_files": "Невозможно использовать быстрый метод организации файлов в архиве", + "app_resource_failed": "Установка, удаление или обновление ресурсов {app} провалилась: {error}", + "ask_dyndns_recovery_password_explain": "Пожалуйста, выберите пароль восстановления для Вашего домена DynDNS, для случая, если Вам понадобится сбросить его позже.", + "ask_dyndns_recovery_password_explain_during_unsubscribe": "Пожалуйста, выберите пароль восстановления для Вашего домена DynDNS.", + "app_not_upgraded_broken_system_continue": "Приложение «{failed_app}» не смогло обновиться и сломало систему (так что --continue-on-failure игнорируется), и, в свою очередь, обновления других приложений были отменены: {apps}", + "backup_output_symlink_dir_broken": "Директория «{path}» Вашего архива — сломанная символьная ссылка. Может быть, Вы забыли смонтировать или подключить устройство, на которое она ссылается.", + "ask_fullname": "Полное имя", + "ask_admin_username": "Имя пользователя администратора", + "backup_running_hooks": "Выполняются хуки резервного копирования…", + "app_yunohost_version_not_supported": "Это приложение требует YunoHost версии {required} или выше, но сейчас установлена версия {current}", + "apps_failed_to_upgrade": "Не удалось обновить данные приложения:{apps}", + "apps_failed_to_upgrade_line": "\n * {app_id} (чтобы увидеть соответствующий журнал, выполните «yunohost log show {operation_logger_name}»)", + "ask_admin_fullname": "Полное имя администратора" +} From 5708776df6a66c5425d36d88503265f82bb071a0 Mon Sep 17 00:00:00 2001 From: cjdw Date: Sun, 4 Aug 2024 11:00:43 +0000 Subject: [PATCH 180/218] Translated using Weblate (Indonesian) Currently translated at 100.0% (805 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/id.json b/locales/id.json index 23639cf60..1741de95f 100644 --- a/locales/id.json +++ b/locales/id.json @@ -469,7 +469,7 @@ "config_unknown_filter_key": "Kunci filter '{filter_key}' tidak sesuai.", "backup_permission": "Izin pencadangan untuk {app}", "config_forbidden_keyword": "Kata kunci '{keyword}' sudah ada, Anda tidak dapat membuat atau menggunakan panel konfigurasi disertai pertanyaan dengan id ini.", - "good_practices_about_user_password": "Sekarang Anda akan menentukan kata sandi pengguna baru. Kata sandi harus terdiri dari minimal 8 karakter—walaupun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", + "good_practices_about_user_password": "Sekarang Anda akan menentukan kata sandi pengguna baru. Kata sandi harus terdiri dari minimal 8 karakter—meskipun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", "domain_dns_push_failed_to_authenticate": "Autentikasi gagal pada API registrar untuk domain '{domain}'. Besar kemungkinan karena kredensial tidak sesuai? (Galat: {error})", "certmanager_domain_dns_ip_differs_from_public_ip": "Rekaman DNS untuk domain '{domain}' berbeda dengan IP server ini. Silakan periksa kategori 'Catatan DNS' (dasar) dalam diagnosis untuk info lebih lanjut. Jika Anda baru saja memodifikasi rekaman A, silakan menunggu hingga rekaman tersebut disebarkan (beberapa pemeriksa sebaran DNS tersedia online). (Jika Anda tahu apa yang Anda lakukan, gunakan '--no-checks' untuk mematikan pemeriksaan ini.)", "certmanager_hit_rate_limit": "Terlalu banyak sertifikat yang telah diterbitkan untuk kumpulan domain {domain} ini baru-baru ini. Silakan coba lagi nanti. Lihat https://letsencrypt.org/docs/rate-limits/ untuk detail lebih lanjut", @@ -483,7 +483,7 @@ "config_cant_set_value_on_section": "Anda tidak dapat menetapkan satu nilai pun di seluruh bagian konfigurasi.", "backup_applying_method_custom": "Memanggil metode pencadangan khusus '{method}'…", "backup_ask_for_copying_if_needed": "Apakah Anda ingin melakukan pencadangan menggunakan {size}MB untuk sementara? (Cara ini digunakan karena beberapa berkas tidak dapat disiapkan menggunakan metode yang lebih efisien.)", - "good_practices_about_admin_password": "Sekarang Anda akan menentukan kata sandi administrasi baru. Kata sandi harus terdiri dari minimal 8 karakter—walaupun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", + "good_practices_about_admin_password": "Sekarang Anda akan menentukan kata sandi administrasi baru. Kata sandi harus terdiri dari minimal 8 karakter—meskipun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", "certmanager_acme_not_configured_for_domain": "Tantangan ACME tidak dapat dijalankan untuk {domain} saat ini karena konfigurasi pada nginx tidak memiliki potongan kode yang sesuai… Pastikan konfigurasi nginx Anda mutakhir menggunakan `yunohost tools regen-conf nginx --dry-run --with-diff`.", "diagnosis_http_special_use_tld": "Domain {domain} berdasarkan pada domain tingkat atas (TLD) penggunaan khusus seperti .local atau .test dan oleh karena itu tidak diharapkan untuk diekspos di luar jaringan lokal.", "certmanager_self_ca_conf_file_not_found": "Tidak dapat menemukan berkas konfigurasi untuk otoritas teken mandiri (berkas: {file})", From 2f186b6f7fa3c04ce06c4672fa0d68fab2bedd4d Mon Sep 17 00:00:00 2001 From: cjdw Date: Tue, 6 Aug 2024 13:23:00 +0000 Subject: [PATCH 181/218] Translated using Weblate (Indonesian) Currently translated at 100.0% (805 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/id.json b/locales/id.json index 1741de95f..b12aed985 100644 --- a/locales/id.json +++ b/locales/id.json @@ -469,7 +469,7 @@ "config_unknown_filter_key": "Kunci filter '{filter_key}' tidak sesuai.", "backup_permission": "Izin pencadangan untuk {app}", "config_forbidden_keyword": "Kata kunci '{keyword}' sudah ada, Anda tidak dapat membuat atau menggunakan panel konfigurasi disertai pertanyaan dengan id ini.", - "good_practices_about_user_password": "Sekarang Anda akan menentukan kata sandi pengguna baru. Kata sandi harus terdiri dari minimal 8 karakter—meskipun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", + "good_practices_about_user_password": "Sekarang Anda akan menentukan kata sandi pengguna baru. Kata sandi harus terdiri dari minimal 8 karakter - meskipun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", "domain_dns_push_failed_to_authenticate": "Autentikasi gagal pada API registrar untuk domain '{domain}'. Besar kemungkinan karena kredensial tidak sesuai? (Galat: {error})", "certmanager_domain_dns_ip_differs_from_public_ip": "Rekaman DNS untuk domain '{domain}' berbeda dengan IP server ini. Silakan periksa kategori 'Catatan DNS' (dasar) dalam diagnosis untuk info lebih lanjut. Jika Anda baru saja memodifikasi rekaman A, silakan menunggu hingga rekaman tersebut disebarkan (beberapa pemeriksa sebaran DNS tersedia online). (Jika Anda tahu apa yang Anda lakukan, gunakan '--no-checks' untuk mematikan pemeriksaan ini.)", "certmanager_hit_rate_limit": "Terlalu banyak sertifikat yang telah diterbitkan untuk kumpulan domain {domain} ini baru-baru ini. Silakan coba lagi nanti. Lihat https://letsencrypt.org/docs/rate-limits/ untuk detail lebih lanjut", @@ -483,7 +483,7 @@ "config_cant_set_value_on_section": "Anda tidak dapat menetapkan satu nilai pun di seluruh bagian konfigurasi.", "backup_applying_method_custom": "Memanggil metode pencadangan khusus '{method}'…", "backup_ask_for_copying_if_needed": "Apakah Anda ingin melakukan pencadangan menggunakan {size}MB untuk sementara? (Cara ini digunakan karena beberapa berkas tidak dapat disiapkan menggunakan metode yang lebih efisien.)", - "good_practices_about_admin_password": "Sekarang Anda akan menentukan kata sandi administrasi baru. Kata sandi harus terdiri dari minimal 8 karakter—meskipun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", + "good_practices_about_admin_password": "Sekarang Anda akan menentukan kata sandi administrasi baru. Kata sandi harus terdiri dari minimal 8 karakter - meskipun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", "certmanager_acme_not_configured_for_domain": "Tantangan ACME tidak dapat dijalankan untuk {domain} saat ini karena konfigurasi pada nginx tidak memiliki potongan kode yang sesuai… Pastikan konfigurasi nginx Anda mutakhir menggunakan `yunohost tools regen-conf nginx --dry-run --with-diff`.", "diagnosis_http_special_use_tld": "Domain {domain} berdasarkan pada domain tingkat atas (TLD) penggunaan khusus seperti .local atau .test dan oleh karena itu tidak diharapkan untuk diekspos di luar jaringan lokal.", "certmanager_self_ca_conf_file_not_found": "Tidak dapat menemukan berkas konfigurasi untuk otoritas teken mandiri (berkas: {file})", From 498006cab68d5cf73484982ed614e0b5afcd4ea0 Mon Sep 17 00:00:00 2001 From: cjdw Date: Thu, 8 Aug 2024 10:47:00 +0000 Subject: [PATCH 182/218] Translated using Weblate (Indonesian) Currently translated at 100.0% (805 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/id.json b/locales/id.json index b12aed985..878005f4f 100644 --- a/locales/id.json +++ b/locales/id.json @@ -469,7 +469,7 @@ "config_unknown_filter_key": "Kunci filter '{filter_key}' tidak sesuai.", "backup_permission": "Izin pencadangan untuk {app}", "config_forbidden_keyword": "Kata kunci '{keyword}' sudah ada, Anda tidak dapat membuat atau menggunakan panel konfigurasi disertai pertanyaan dengan id ini.", - "good_practices_about_user_password": "Sekarang Anda akan menentukan kata sandi pengguna baru. Kata sandi harus terdiri dari minimal 8 karakter - meskipun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", + "good_practices_about_user_password": "Sekarang Anda akan menentukan kata sandi pengguna baru. Kata sandi harus terdiri dari minimal 8 karakter - meskipun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan beragam karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", "domain_dns_push_failed_to_authenticate": "Autentikasi gagal pada API registrar untuk domain '{domain}'. Besar kemungkinan karena kredensial tidak sesuai? (Galat: {error})", "certmanager_domain_dns_ip_differs_from_public_ip": "Rekaman DNS untuk domain '{domain}' berbeda dengan IP server ini. Silakan periksa kategori 'Catatan DNS' (dasar) dalam diagnosis untuk info lebih lanjut. Jika Anda baru saja memodifikasi rekaman A, silakan menunggu hingga rekaman tersebut disebarkan (beberapa pemeriksa sebaran DNS tersedia online). (Jika Anda tahu apa yang Anda lakukan, gunakan '--no-checks' untuk mematikan pemeriksaan ini.)", "certmanager_hit_rate_limit": "Terlalu banyak sertifikat yang telah diterbitkan untuk kumpulan domain {domain} ini baru-baru ini. Silakan coba lagi nanti. Lihat https://letsencrypt.org/docs/rate-limits/ untuk detail lebih lanjut", @@ -483,7 +483,7 @@ "config_cant_set_value_on_section": "Anda tidak dapat menetapkan satu nilai pun di seluruh bagian konfigurasi.", "backup_applying_method_custom": "Memanggil metode pencadangan khusus '{method}'…", "backup_ask_for_copying_if_needed": "Apakah Anda ingin melakukan pencadangan menggunakan {size}MB untuk sementara? (Cara ini digunakan karena beberapa berkas tidak dapat disiapkan menggunakan metode yang lebih efisien.)", - "good_practices_about_admin_password": "Sekarang Anda akan menentukan kata sandi administrasi baru. Kata sandi harus terdiri dari minimal 8 karakter - meskipun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan variasi karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", + "good_practices_about_admin_password": "Sekarang Anda akan menentukan kata sandi administrasi baru. Kata sandi harus terdiri dari minimal 8 karakter - meskipun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan beragam karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", "certmanager_acme_not_configured_for_domain": "Tantangan ACME tidak dapat dijalankan untuk {domain} saat ini karena konfigurasi pada nginx tidak memiliki potongan kode yang sesuai… Pastikan konfigurasi nginx Anda mutakhir menggunakan `yunohost tools regen-conf nginx --dry-run --with-diff`.", "diagnosis_http_special_use_tld": "Domain {domain} berdasarkan pada domain tingkat atas (TLD) penggunaan khusus seperti .local atau .test dan oleh karena itu tidak diharapkan untuk diekspos di luar jaringan lokal.", "certmanager_self_ca_conf_file_not_found": "Tidak dapat menemukan berkas konfigurasi untuk otoritas teken mandiri (berkas: {file})", From 9a6f7dac3b3fcf95040acddef4e515abcb62e5ca Mon Sep 17 00:00:00 2001 From: xabirequejo Date: Thu, 15 Aug 2024 15:45:24 +0000 Subject: [PATCH 183/218] Translated using Weblate (Basque) Currently translated at 100.0% (805 of 805 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/eu/ --- locales/eu.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/locales/eu.json b/locales/eu.json index 70b1db258..665ed374d 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -36,7 +36,7 @@ "diagnosis_http_bad_status_code": "Zerbitzari hau ez den beste gailu batek erantzun omen dio eskaerari (agian routerrak).
1. Honen arrazoi ohikoena 80 (eta 443) ataka zerbitzarira ondo birbidaltzen ez dela da.
2. Konfigurazio konplexua badarabilzu, egiaztatu suebakiak edo reverse-proxyk oztopatzen ez dutela.", "diagnosis_http_timeout": "Denbora agortu da sare lokaletik kanpo zure zerbitzarira konektatzeko ahaleginean. Eskuragarri ez dagoela dirudi.
1. 80 (eta 443) ataka zerbitzarira modu egokian birzuzentzen ez direla da ohiko zergatia.
2. Badaezpada egiaztatu nginx martxan dagoela.
3. Konfigurazio konplexuetan, egiaztatu suebakiak edo reverse-proxyk konexioa oztopatzen ez dutela.", "app_sources_fetch_failed": "Ezinezkoa izan da fitxategiak eskuratzea, zuzena al da URLa?", - "app_make_default_location_already_used": "Ezinezkoa izan da '{app}' '{domain}' domeinuan lehenestea, '{other_app}'(e)k lehendik ere erabiltzen duelako", + "app_make_default_location_already_used": "Ezin da '{app}' '{domain}' domeinuan lehenetsi, '{other_app}'(e)k lehendik ere erabiltzen duelako", "app_already_installed_cant_change_url": "Aplikazio hau instalatuta dago dagoeneko. URLa ezin da aldatu aukera honekin. Markatu 'app changeurl' markatzeko moduan badago.", "diagnosis_ip_not_connected_at_all": "Badirudi zerbitzaria ez dagoela internetera konektatuta!?", "app_already_up_to_date": "{app} egunean da dagoeneko", @@ -51,7 +51,7 @@ "config_validate_url": "Benetazko URL bat izan behar da", "app_restore_script_failed": "Errorea gertatu da aplikazioa lehengoratzeko aginduan", "app_upgrade_some_app_failed": "Ezinezkoa izan da aplikazio batzuk eguneratzea", - "app_install_failed": "Ezinezkoa izan da {app} instalatzea: {error}", + "app_install_failed": "Ezin da {app} instalatu: {error}", "diagnosis_basesystem_kernel": "Zerbitzariak Linuxen {kernel_version} kernela darabil", "app_argument_invalid": "Aukeratu balio egoki bat '{name}' argumenturako: {error}", "app_already_installed": "{app} instalatuta dago dagoeneko", @@ -132,7 +132,7 @@ "diagnosis_http_could_not_diagnose": "Ezinezkoa izan da domeinuak IPv{ipversion} kanpotik eskuragarri dauden egiaztatzea.", "diagnosis_http_ok": "{domain} domeinua HTTP bidez bisitatu daiteke sare lokaletik kanpo.", "diagnosis_http_unreachable": "Badirudi {domain} domeinua ez dagoela eskuragarri HTTP bidez sare lokaletik kanpo.", - "apps_catalog_failed_to_download": "Ezinezkoa izan da {apps_catalog} aplikazioen zerrenda eskuratzea: {error}", + "apps_catalog_failed_to_download": "Ezin da {apps_catalog} aplikazioen zerrenda eskuratu: {error}", "apps_catalog_init_success": "Abiarazi da aplikazioen katalogo sistema!", "apps_catalog_obsolete_cache": "Aplikazioen katalogoaren katxea hutsik edo zaharkituta dago.", "diagnosis_description_mail": "Posta elektronikoa", @@ -148,7 +148,7 @@ "diagnosis_http_hairpinning_issue": "Dirudienez zure sareak ez du hairpinninga gaituta.", "diagnosis_http_partially_unreachable": "Badirudi {domain} domeinua ezin dela bisitatu HTTP bidez IPv{failed} sare lokaletik kanpo, bai ordea IPv{passed} erabiliz.", "backup_archive_cant_retrieve_info_json": "Ezinezkoa izan da '{archive}' fitxategiko informazioa eskuratzea… info.json fitxategia ezin izan da eskuratu (edo ez da baliozko json-a).", - "diagnosis_domain_expiration_not_found": "Ezinezkoa izan da domeinu batzuen iraungitze data egiaztatzea", + "diagnosis_domain_expiration_not_found": "Ezin da domeinu batzuen iraungitze data egiaztatu", "diagnosis_domain_expiration_not_found_details": "Badirudi {domain} domeinuari buruzko WHOIS informazioak ez duela zehazten noiz iraungiko den?", "certmanager_domain_not_diagnosed_yet": "Oraindik ez dago {domain} domeinurako diagnostikorik. Berrabiarazi diagnostikoak 'DNS balioak' eta 'Web' ataletarako diagnostikoen gunean Let's Encrypt ziurtagirirako prest ote dagoen egiaztatzeko. (Edo zertan ari zaren baldin badakizu, erabili '--no-checks' egiaztatzea desgaitzeko.)", "diagnosis_domain_expiration_warning": "Domeinu batzuk iraungitzear daude!", @@ -263,14 +263,14 @@ "log_user_import": "Inportatu erabiltzaileak", "diagnosis_mail_fcrdns_ok": "Alderantzizko DNSa zuzen konfiguratuta dago!", "diagnosis_mail_queue_unavailable_details": "Errorea: {error}", - "dyndns_provider_unreachable": "Ezinezkoa izan da DynDNS {provider} enpresarekin konektatzea: agian zure YunoHost zerbitzaria ez dago internetera konektatuta edo dynette zerbitzaria ez dago martxan.", + "dyndns_provider_unreachable": "Ezin da DynDNS {provider} enpresarekin konektatu: agian zure YunoHost zerbitzaria ez dago internetera konektatuta edo dynette zerbitzaria ez dago martxan.", "extracting": "Ateratzen…", "diagnosis_ports_unreachable": "{port}. ataka ez dago eskuragarri kanpotik.", "diagnosis_regenconf_manually_modified_details": "Ez dago arazorik zertan ari zaren baldin badakizu! YunoHostek fitxategi hau automatikoki eguneratzeari utziko dio… Baina kontuan izan YunoHosten eguneraketek aldaketa garrantzitsuak izan ditzaketela. Nahi izatekotan, desberdintasunak aztertu ditzakezu yunohost tools regen-conf {category} --dry-run --with-diff komandoa exekutatuz, eta gomendatutako konfiguraziora bueltatu yunohost tools regen-conf {category} --force erabiliz", "dyndns_domain_not_provided": "{provider} DynDNS enpresak ezin du {domain} domeinua eskaini.", "firewall_reload_failed": "Ezinezkoa izan da suebakia birkargatzea", "hook_name_unknown": "'{name}' 'hook' izen ezezaguna", - "domain_deletion_failed": "Ezinezkoa izan da {domain} ezabatzea: {error}", + "domain_deletion_failed": "Ezin da {domain} ezabatu: {error}", "log_regen_conf": "Berregin '{}' sistemaren konfigurazioa", "dpkg_lock_not_available": "Ezin da komando hau une honetan exekutatu beste aplikazio batek dpkg (sistemaren paketeen kudeatzailea) blokeatuta duelako, erabiltzen ari baita", "group_created": "'{group}' taldea sortu da", @@ -387,7 +387,7 @@ "diagnosis_mail_outgoing_port_25_ok": "SMTP posta zerbitzaria posta elektronikoa bidaltzeko gai da (25. atakaren irteera ez dago blokeatuta).", "diagnosis_ports_partially_unreachable": "{port}. ataka ez dago eskuragarri kanpotik IPv{failed} erabiliz.", "diagnosis_ports_forwarding_tip": "Arazoa konpontzeko, litekeena da operadorearen routerrean ataken birbideraketa konfiguratu behar izatea, https://yunohost.org/isp_box_config-n agertzen den bezala", - "domain_creation_failed": "Ezinezkoa izan da {domain} domeinua sortzea: {error}", + "domain_creation_failed": "Ezin da {domain} domeinua sortu: {error}", "domains_available": "Erabilgarri dauden domeinuak:", "group_already_exist_on_system": "{group} taldea existitzen da dagoeneko sistemaren taldeetan", "diagnosis_processes_killed_by_oom_reaper": "Memoria agortu eta sistemak prozesu batzuk amaituarazi behar izan ditu. Honek esan nahi du sistemak ez duela memoria nahikoa edo prozesuren batek memoria gehiegi behar duela. Amaituarazi d(ir)en prozesua(k):\n{kills_summary}", @@ -400,7 +400,7 @@ "domain_cannot_remove_main": "Ezin duzu '{domain}' ezabatu domeinu nagusia delako. Beste domeinu bat ezarri beharko duzu nagusi bezala 'yunohost domain main-domain -n ' erabiliz; honako hauek dituzu aukeran: {other_domains}", "domain_created": "Sortu da domeinua", "domain_dyndns_already_subscribed": "Dagoeneko izena eman duzu DynDNS domeinu batean", - "domain_hostname_failed": "Ezinezkoa izan da hostname berria ezartzea. Honek arazoak ekar litzake etorkizunean (litekeena da ondo egotea).", + "domain_hostname_failed": "Ezin da hostname berria ezarri. Honek arazoak ekar litzake etorkizunean (litekeena da ondo egotea).", "domain_uninstall_app_first": "Honako aplikazio hauek domeinuan instalatuta daude:\n{apps}\n\nDesinstalatu 'yunohost app remove the_app_id' exekutatuz edo alda itzazu beste domeinu batera 'yunohost app change-url the_app_id' erabiliz domeinua ezabatu baino lehen", "file_does_not_exist": "{path} fitxategia ez da existitzen.", "firewall_rules_cmd_failed": "Suebakiko arau batzuen exekuzioak huts egin du. Informazio gehiago erregistroetan.", @@ -423,7 +423,7 @@ "domain_cert_gen_failed": "Ezinezkoa izan da ziurtagiria sortzea", "field_invalid": "'{}' ez da baliogarria", "diagnosis_mail_outgoing_port_25_blocked_relay_vpn": "Operadore batzuei bost axola zaie internetaren neutraltasuna (Net Neutrality) eta ez dute 25. ataka desblokeatzen uzten.
- Operadore batzuek relay posta zerbitzari bat eskaini dezakete, baina kasu horretan zure posta elektronikoa zelatatu dezakete.
- Pribatutasuna bermatzeko *IP publikoa* duen VPN bat erabiltzea izan daiteke irtenbidea. Ikus https://yunohost.org/vpn_advantage
- Edo operadore desberdin batera aldatu", - "ldap_server_down": "Ezin izan da LDAP zerbitzarira konektatu", + "ldap_server_down": "Ezin da LDAP zerbitzarira konektatu", "ldap_server_is_down_restart_it": "LDAP zerbitzaria ez dago martxan, saia zaitez berrabiarazten…", "log_app_upgrade": "'{}' aplikazioa eguneratu", "log_tools_shutdown": "Itzali zerbitzaria", @@ -515,7 +515,7 @@ "service_disable_failed": "Ezin izan da '{service}' zerbitzua geldiarazi zerbitzaria abiaraztean.\n\nZerbitzuen erregistro berrienak: {logs}", "migrations_skip_migration": "{id} migrazioa saihesten…", "upnp_disabled": "UPnP itzalita dago", - "main_domain_change_failed": "Ezinezkoa izan da domeinu nagusia aldatzea", + "main_domain_change_failed": "Ezin da domeinu nagusia aldatu", "regenconf_failed": "Ezinezkoa izan da ondorengo atal(ar)en konfigurazioa berregitea: {categories}", "pattern_email_forward": "Helbide elektroniko baliagarri bat izan behar da, '+' karakterea onartzen da (adibidez: izena+urtea@domeinua.eus)", "regenconf_file_manually_removed": "'{conf}' konfigurazio fitxategia eskuz ezabatu da eta ez da berriro sortuko", @@ -592,7 +592,7 @@ "regex_incompatible_with_tile": "/!\\ Pakete-arduradunak! {permission}' baimenak show_tile aukera 'true' bezala dauka eta horregatik ezin duzue regex URLa URL nagusi bezala ezarri", "root_password_desynchronized": "Administratzailearen pasahitza aldatu da baina YunoHostek ezin izan du aldaketa root pasahitzera hedatu!", "server_shutdown": "Zerbitzaria itzaliko da", - "service_stop_failed": "Ezin izan da '{service}' zerbitzua geldiarazi\n\nZerbitzuen azken erregistroak: {logs}", + "service_stop_failed": "Ezin da '{service}' zerbitzua geldiarazi\n\nZerbitzuaren azken erregistroak: {logs}", "service_unknown": "'{service}' zerbitzu ezezaguna", "show_tile_cant_be_enabled_for_url_not_defined": "Ezin duzu 'show_tile' gaitu une honetan, '{permission}' baimenerako URL bat zehaztu behar duzulako", "upnp_enabled": "UPnP piztuta dago", From 436826abf94848bf4c2dca3f6de1e68e6571ceec Mon Sep 17 00:00:00 2001 From: ljf Date: Thu, 10 Jun 2021 18:56:41 +0200 Subject: [PATCH 184/218] [enh] Be able to use postfix as a backup mx hosts --- conf/postfix/main.cf | 8 ++++++++ hooks/conf_regen/19-postfix | 20 ++++++++++++++++++++ locales/en.json | 4 ++++ share/config_global.toml | 17 ++++++++++++++--- src/settings.py | 2 ++ 5 files changed, 48 insertions(+), 3 deletions(-) diff --git a/conf/postfix/main.cf b/conf/postfix/main.cf index 01af1b619..bf26f89c6 100644 --- a/conf/postfix/main.cf +++ b/conf/postfix/main.cf @@ -211,3 +211,11 @@ smtp_sasl_security_options = noanonymous # where to find sasl_passwd smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd {% endif %} + +{% if backup_mx_domains != "" %} +# Backup MX (secondary MX) +relay_domains = $mydestination {{backup_mx_domains}} +relay_recipient_maps = hash:/etc/postfix/relay_recipients +maximal_queue_lifetime = 20d +{% endif %} + diff --git a/hooks/conf_regen/19-postfix b/hooks/conf_regen/19-postfix index d6ddcb5ee..2e829055a 100755 --- a/hooks/conf_regen/19-postfix +++ b/hooks/conf_regen/19-postfix @@ -45,6 +45,21 @@ do_pre_regen() { cat <<<"[${relay_host}]:${relay_port} ${relay_user}:${relay_password}" >${postfix_dir}/sasl_passwd fi + + # Use this postfix server as a backup MX + export backup_mx_domains="$(yunohost settings get 'email.smtp.smtp_backup_mx_domains' | sed "s/,/ /g")" + export backup_mx_emails="$(yunohost settings get 'email.smtp.smtp_backup_mx_emails_whitelisted' | sed "s/,/ /g")" + rm -f ${postfix_dir}/relay_recipients + touch ${postfix_dir}/relay_recipients + if [ -n "${backup_mx_domains}" ] && [ -n "${backup_mx_emails}" ] + then + for mail in ${backup_mx_emails} + do + echo "$mail OK" >> ${postfix_dir}/relay_recipients + done + postmap ${postfix_dir}/relay_recipients + fi + export main_domain export domain_list="$(yunohost domain list --features mail_in mail_out --output-as json | jq -r ".domains[]" | tr '\n' ' ')" ynh_render_template "main.cf" "${postfix_dir}/main.cf" @@ -78,6 +93,11 @@ do_post_regen() { postmap /etc/postfix/sasl_passwd fi + if [ -e /etc/postfix/relay_recipients ]; then + chmod 750 /etc/postfix/relay_recipients* + chown postfix:root /etc/postfix/relay_recipients* + fi + postmap -F hash:/etc/postfix/sni python3 -c 'from yunohost.app import regen_mail_app_user_config_for_dovecot_and_postfix as r; r(only="postfix")' diff --git a/locales/en.json b/locales/en.json index b10293434..aa725ac90 100644 --- a/locales/en.json +++ b/locales/en.json @@ -462,6 +462,10 @@ "global_settings_setting_smtp_relay_password": "SMTP relay password", "global_settings_setting_smtp_relay_port": "SMTP relay port", "global_settings_setting_smtp_relay_user": "SMTP relay user", + "global_settings_setting_smtp_backup_mx_domains": "Domains to act as secondary MX for", + "global_settings_setting_smtp_backup_mx_domains_help": "Allow this server to act as a backup *secondary* MX domain for the listed domain. This means that if the main MX for the domain is not reachable (for example because of an outage), mails will still be sent to this server, which will keep them during a maximum of 20 days and try to relay them to the real destination once it goes back up. Several domains can be provided, separated by commas.", + "global_settings_setting_smtp_backup_mx_emails_whitelisted": "SMTP backup MX emails whitelist", + "global_settings_setting_smtp_backup_mx_emails_whitelisted_help": "When acting as a secondary MX, the exhaustive list of allowed recipient's email addresses must be provided (otherwise mails will be refused and discarded). Several entries can be provided, separated by commas.", "global_settings_setting_ssh_compatibility": "SSH Compatibility", "global_settings_setting_ssh_compatibility_help": "Compatibility vs. security tradeoff for the SSH server. Affects the ciphers (and other security-related aspects). See https://infosec.mozilla.org/guidelines/openssh for more info.", "global_settings_setting_ssh_password_authentication": "Password authentication", diff --git a/share/config_global.toml b/share/config_global.toml index 40b71ab19..d836e50d5 100644 --- a/share/config_global.toml +++ b/share/config_global.toml @@ -107,7 +107,7 @@ name = "Email" [email.pop3.pop3_enabled] type = "boolean" default = false - + [email.smtp] name = "SMTP" [email.smtp.smtp_allow_ipv6] @@ -117,7 +117,7 @@ name = "Email" [email.smtp.smtp_relay_enabled] type = "boolean" default = false - + [email.smtp.smtp_relay_host] type = "string" default = "" @@ -134,7 +134,7 @@ name = "Email" default = "" optional = true visible="smtp_relay_enabled" - + [email.smtp.smtp_relay_password] type = "password" default = "" @@ -142,6 +142,17 @@ name = "Email" visible="smtp_relay_enabled" help = "" # This is empty string on purpose, otherwise the core automatically set the 'good_practice_admin_password' string here which is not relevant, because the admin is not actually "choosing" the password ... + [email.smtp.smtp_backup_mx_domains] + type = "string" + default = "" + optional = true + + [email.smtp.smtp_backup_mx_emails_whitelisted] + type = "string" + default = "" + optional = true + visible = "smtp_backup_mx_domains" + [misc] name = "Other" [misc.portal] diff --git a/src/settings.py b/src/settings.py index abe1a8f13..4f42183be 100644 --- a/src/settings.py +++ b/src/settings.py @@ -335,6 +335,8 @@ def reconfigure_ssh_and_fail2ban(setting_name, old_value, new_value): @post_change_hook("smtp_relay_port") @post_change_hook("smtp_relay_user") @post_change_hook("smtp_relay_password") +@post_change_hook("smtp_backup_mx_domains") +@post_change_hook("smtp_backup_mx_emails_whitelisted") @post_change_hook("postfix_compatibility") def reconfigure_postfix(setting_name, old_value, new_value): if old_value != new_value: From 980777ebf1ff56695c7da1a75b7315b0e391a69f Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Fri, 26 Nov 2021 18:12:20 +0100 Subject: [PATCH 185/218] [enh] Conserver group permission --- conf/ssh/sshd_config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/ssh/sshd_config b/conf/ssh/sshd_config index 4a239d2ad..c340e451f 100644 --- a/conf/ssh/sshd_config +++ b/conf/ssh/sshd_config @@ -84,7 +84,7 @@ Subsystem sftp internal-sftp # Apply following instructions to user with sftp perm only Match Group sftp.main,!ssh.main - ForceCommand internal-sftp + ForceCommand internal-sftp -u 0002 # We can't restrict to /home/%u because the chroot base must be owned by root # So we chroot only on /home # See https://serverfault.com/questions/584986/bad-ownership-or-modes-for-chroot-directory-component @@ -97,7 +97,7 @@ Match Group sftp.main,!ssh.main PermitUserRC no Match Group sftp.app,!ssh.app - ForceCommand internal-sftp + ForceCommand internal-sftp -u 0002 ChrootDirectory %h AllowTcpForwarding no AllowStreamLocalForwarding no From 0f662d069c7d13facde172cf75265c42289e6175 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 15 Aug 2024 23:10:02 +0000 Subject: [PATCH 186/218] [CI] Reformat / remove stale translated strings --- locales/en.json | 10 +++++----- locales/eu.json | 2 +- locales/fr.json | 2 +- locales/gl.json | 2 +- locales/id.json | 2 +- locales/ru.json | 2 +- locales/sk.json | 2 +- locales/tr.json | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/locales/en.json b/locales/en.json index aa725ac90..ed8ad7428 100644 --- a/locales/en.json +++ b/locales/en.json @@ -456,16 +456,16 @@ "global_settings_setting_security_experimental_enabled_help": "Enable experimental security features (don't enable this if you don't know what you're doing!)", "global_settings_setting_smtp_allow_ipv6": "Allow IPv6", "global_settings_setting_smtp_allow_ipv6_help": "Allow the use of IPv6 to receive and send mail", + "global_settings_setting_smtp_backup_mx_domains": "Domains to act as secondary MX for", + "global_settings_setting_smtp_backup_mx_domains_help": "Allow this server to act as a backup *secondary* MX domain for the listed domain. This means that if the main MX for the domain is not reachable (for example because of an outage), mails will still be sent to this server, which will keep them during a maximum of 20 days and try to relay them to the real destination once it goes back up. Several domains can be provided, separated by commas.", + "global_settings_setting_smtp_backup_mx_emails_whitelisted": "SMTP backup MX emails whitelist", + "global_settings_setting_smtp_backup_mx_emails_whitelisted_help": "When acting as a secondary MX, the exhaustive list of allowed recipient's email addresses must be provided (otherwise mails will be refused and discarded). Several entries can be provided, separated by commas.", "global_settings_setting_smtp_relay_enabled": "Enable SMTP relay", "global_settings_setting_smtp_relay_enabled_help": "Enable the SMTP relay to use in order to send mail instead of this yunohost instance. Useful if you are in one of this situation: your 25 port is blocked by your ISP or VPS provider, you have a residential IP listed on DUHL, you are not able to configure reverse DNS or this server is not directly exposed on the internet and you want use an other one to send mails.", "global_settings_setting_smtp_relay_host": "SMTP relay host", "global_settings_setting_smtp_relay_password": "SMTP relay password", "global_settings_setting_smtp_relay_port": "SMTP relay port", "global_settings_setting_smtp_relay_user": "SMTP relay user", - "global_settings_setting_smtp_backup_mx_domains": "Domains to act as secondary MX for", - "global_settings_setting_smtp_backup_mx_domains_help": "Allow this server to act as a backup *secondary* MX domain for the listed domain. This means that if the main MX for the domain is not reachable (for example because of an outage), mails will still be sent to this server, which will keep them during a maximum of 20 days and try to relay them to the real destination once it goes back up. Several domains can be provided, separated by commas.", - "global_settings_setting_smtp_backup_mx_emails_whitelisted": "SMTP backup MX emails whitelist", - "global_settings_setting_smtp_backup_mx_emails_whitelisted_help": "When acting as a secondary MX, the exhaustive list of allowed recipient's email addresses must be provided (otherwise mails will be refused and discarded). Several entries can be provided, separated by commas.", "global_settings_setting_ssh_compatibility": "SSH Compatibility", "global_settings_setting_ssh_compatibility_help": "Compatibility vs. security tradeoff for the SSH server. Affects the ciphers (and other security-related aspects). See https://infosec.mozilla.org/guidelines/openssh for more info.", "global_settings_setting_ssh_password_authentication": "Password authentication", @@ -808,4 +808,4 @@ "yunohost_installing": "Installing YunoHost…", "yunohost_not_installed": "YunoHost is not correctly installed. Please run 'yunohost tools postinstall'", "yunohost_postinstall_end_tip": "The post-install completed! To finalize your setup, please consider:\n - diagnose potential issues through the 'Diagnosis' section of the webadmin (or 'yunohost diagnosis run' in command-line);\n - reading the 'Finalizing your setup' and 'Getting to know YunoHost' parts in the admin documentation: https://yunohost.org/admindoc." -} +} \ No newline at end of file diff --git a/locales/eu.json b/locales/eu.json index 665ed374d..fb3d4d9a1 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -804,4 +804,4 @@ "migration_0027_modified_files": "Ondorengo fitxategiak eskuz moldatu direla antzeman da eta litekeena da bertsio-berritzeak gainean idaztea: {manually_modified_files}", "migration_0027_not_enough_free_space": "/var/-en erabilgarri dagoen espazioa oso txikia da! Gutxienez GB 1 izan beharko zenuke erabilgarri migrazioari ekiteko.", "migration_0027_patching_sources_list": "sources.lists fitxategia petatxatzen…" -} +} \ No newline at end of file diff --git a/locales/fr.json b/locales/fr.json index 2dbf01313..ec38af6e7 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -804,4 +804,4 @@ "migration_0027_still_on_bullseye_after_main_upgrade": "Quelque chose s'est mal passé lors de la mise à jour du système, il semble que celui-ci soit toujours sous Debian Bullseye.", "migration_0027_system_not_fully_up_to_date": "Votre système n'est pas complètement à jour. Veuillez effectuer une mise à jour classique avant de procéder à la migration vers Bookworm.", "migration_0027_yunohost_upgrade": "Démarrage de la mise à jour du cœur de YunoHost…" -} +} \ No newline at end of file diff --git a/locales/gl.json b/locales/gl.json index dc7e0bfdf..7f718efb5 100644 --- a/locales/gl.json +++ b/locales/gl.json @@ -804,4 +804,4 @@ "migration_0027_not_enough_free_space": "Hai moi pouco espazo en /var/! Deberías ter polo menos 1GB libre para realizar a migración.", "migration_0027_patch_yunohost_conflicts": "Aplicando a solución para resolver o problema conflictivo…", "migration_0027_system_not_fully_up_to_date": "O teu sistema non está totalmente actualizado. Fai unha actualización corrente antes de iniciar a migración a Bookworm." -} +} \ No newline at end of file diff --git a/locales/id.json b/locales/id.json index 878005f4f..69b43c241 100644 --- a/locales/id.json +++ b/locales/id.json @@ -804,4 +804,4 @@ "update_apt_cache_warning": "Ada yang tidak sesuai saat memperbarui cache APT (manajer paket Debian). Berikut ini adalah kumpulan baris source.list, yang mungkin membantu mengidentifikasi baris yang bermasalah:\n{sourceslist}", "user_import_missing_columns": "Kehilangan kolom berikut: {columns}", "user_import_nothing_to_do": "Tidak ada pengguna yang perlu diimpor" -} +} \ No newline at end of file diff --git a/locales/ru.json b/locales/ru.json index f00405844..ac5a70025 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -360,4 +360,4 @@ "apps_failed_to_upgrade": "Не удалось обновить данные приложения:{apps}", "apps_failed_to_upgrade_line": "\n * {app_id} (чтобы увидеть соответствующий журнал, выполните «yunohost log show {operation_logger_name}»)", "ask_admin_fullname": "Полное имя администратора" -} +} \ No newline at end of file diff --git a/locales/sk.json b/locales/sk.json index 2586b5930..1568108d9 100644 --- a/locales/sk.json +++ b/locales/sk.json @@ -280,4 +280,4 @@ "domain_config_xmpp": "Krátke správy (XMPP)", "log_app_makedefault": "Nastaviť '{}' ako predvolenú aplikáciu", "domain_config_cert_renew_help": "Certifikát bude automaticky obnovený po 15 dňoch platnosti. Ak chcete, môžete ho obnoviť aj ručne. (Neodporúča sa)." -} +} \ No newline at end of file diff --git a/locales/tr.json b/locales/tr.json index f9351acff..d8a53da94 100644 --- a/locales/tr.json +++ b/locales/tr.json @@ -32,4 +32,4 @@ "app_change_url_identical_domains": "('{domain}{path}') Eski ve yeni alan adının veya URL adresler aynı.Şu anda yapacak bir şey bulunmuyor.", "app_corrupt_source": "YunoHost, {app} için '{source_id}' ({url}) adresinden indirebildi, ancak varlık olması gereken yapılandırmalarla eşleşmiyor. Bu, sunucunuzda geçici bir ağ arızası meydana geldiği veya varlığın bir şekilde yayın yapılan veri sağlacıyısı (veya kötü niyetli bir kişi?) tarafından değiştirildiği ve YunoHost yapımcılarının araştırması ve belki de bu değişikliği dikkate almak için uygulama bildirimini güncellemesi gerektiği anlamına gelebilir.\n Beklenen sha256 sağlama toplamı: {expected_sha256}\n İndirilen sha256 sağlama toplamı: {computed_sha256}\n İndirilen dosya boyutu: {size}", "app_failed_to_upgrade_but_continue": "{failed_app} uygulaması yükseltilirken başarısız oldu. Sıradaki güncellemeler devam ediyor. Konu ile ilgili hata kayıtlarını görüntülemek için 'yunohost log show {operation_logger_name}' komutunu çalıştırın" -} +} \ No newline at end of file From d63c61e0df5540b5aee67b96756756f6ad906fbd Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 16 Aug 2024 16:07:10 +0200 Subject: [PATCH 187/218] Add diagnoser about rfkill blocking Wi-Fi card (#1841) --- locales/en.json | 6 ++++-- locales/fr.json | 2 ++ src/diagnosers/00-basesystem.py | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/locales/en.json b/locales/en.json index ed8ad7428..71a961919 100644 --- a/locales/en.json +++ b/locales/en.json @@ -807,5 +807,7 @@ "yunohost_configured": "YunoHost is now configured", "yunohost_installing": "Installing YunoHost…", "yunohost_not_installed": "YunoHost is not correctly installed. Please run 'yunohost tools postinstall'", - "yunohost_postinstall_end_tip": "The post-install completed! To finalize your setup, please consider:\n - diagnose potential issues through the 'Diagnosis' section of the webadmin (or 'yunohost diagnosis run' in command-line);\n - reading the 'Finalizing your setup' and 'Getting to know YunoHost' parts in the admin documentation: https://yunohost.org/admindoc." -} \ No newline at end of file + "yunohost_postinstall_end_tip": "The post-install completed! To finalize your setup, please consider:\n - diagnose potential issues through the 'Diagnosis' section of the webadmin (or 'yunohost diagnosis run' in command-line);\n - reading the 'Finalizing your setup' and 'Getting to know YunoHost' parts in the admin documentation: https://yunohost.org/admindoc.", + "diagnosis_rfkill_wifi": "The Wi-Fi card is disabled and a system warning might prevent app installations", + "diagnosis_rfkill_wifi_details": "This warning sneaks in many command outputs, breaking some apps. It is usually required to specify your country code with the command sudo raspi-config. Here is the error:
{rfkill_wifi_error}" +} diff --git a/locales/fr.json b/locales/fr.json index ec38af6e7..ce1a50cc2 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -782,6 +782,8 @@ "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.", "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_rfkill_wifi": "La carte Wi-Fi est désactivée et un avertissement du système pourrait empêcher d'installer des applications", + "diagnosis_rfkill_wifi_details": "Cet avertissement se glisse dans beaucoup de retours de commandes, cassant certaines applications. Il s'agit généralement de spécifier votre code pays avec la commande sudo raspi-config. Voici l'erreur:
{rfkill_wifi_error}", "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é", diff --git a/src/diagnosers/00-basesystem.py b/src/diagnosers/00-basesystem.py index 4f9137352..1bf9fb9fb 100644 --- a/src/diagnosers/00-basesystem.py +++ b/src/diagnosers/00-basesystem.py @@ -192,6 +192,16 @@ class MyDiagnoser(Diagnoser): summary="diagnosis_high_number_auth_failures", ) + rfkill_wifi = self.rfkill_wifi() + if len(rfkill_wifi) > 0: + yield dict( + meta={"test": "rfkill_wifi"}, + status="ERROR", + summary="diagnosis_rfkill_wifi", + details=["diagnosis_rfkill_wifi_details"], + data={"rfkill_wifi_error": rfkill_wifi} + ) + def bad_sury_packages(self): packages_to_check = ["openssl", "libssl1.1", "libssl-dev"] for package in packages_to_check: @@ -301,3 +311,10 @@ class MyDiagnoser(Diagnoser): ) write_to_json(cache_file, CVEs) return CVEs[0]["VULNERABLE"] + + def rfkill_wifi(self): + if os.path.isfile("/etc/profile.d/wifi-check.sh"): + cmd = "bash /etc/profile.d/wifi-check.sh" + return check_output(cmd) + else: + return "" From 586d1c7f63c69603b39009e91483a2501aa4e4fb Mon Sep 17 00:00:00 2001 From: xabirequejo Date: Fri, 16 Aug 2024 10:44:46 +0000 Subject: [PATCH 188/218] Translated using Weblate (Basque) Currently translated at 100.0% (809 of 809 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/eu/ --- locales/eu.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/locales/eu.json b/locales/eu.json index fb3d4d9a1..f23e0a79a 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -803,5 +803,9 @@ "migration_0027_patch_yunohost_conflicts": "Arazo gatazkatsu bati adabakia jartzen…", "migration_0027_modified_files": "Ondorengo fitxategiak eskuz moldatu direla antzeman da eta litekeena da bertsio-berritzeak gainean idaztea: {manually_modified_files}", "migration_0027_not_enough_free_space": "/var/-en erabilgarri dagoen espazioa oso txikia da! Gutxienez GB 1 izan beharko zenuke erabilgarri migrazioari ekiteko.", - "migration_0027_patching_sources_list": "sources.lists fitxategia petatxatzen…" -} \ No newline at end of file + "migration_0027_patching_sources_list": "sources.lists fitxategia petatxatzen…", + "global_settings_setting_smtp_backup_mx_emails_whitelisted": "Baimendutako posta elektronikoen MXren SMTP babeskopia", + "global_settings_setting_smtp_backup_mx_domains": "Bigarren mailako MX gisa jarduteko domeinuak", + "global_settings_setting_smtp_backup_mx_domains_help": "Zerbitzari honek zerrendan agertzen den domeinurako *bigarren mailako* MX domeinu gisa jardun dezake. Domeinurako lehenetsitako MX lortu ezin denean (adibidez, itzalaldi baten ondorioz), mezuak bigarren zerbitzari horretara bidaliko dira —gehienez 20 egunez mantenduko dituena— eta berriro eskuragarri dagoenean benetako helburura helarazten saiatuko da. Hainbat domeinu zehaztu daitezke, komaz bereizita.", + "global_settings_setting_smtp_backup_mx_emails_whitelisted_help": "Bigarren mailako MX gisa jarduten duenean, baimendutako hartzaileen posta elektronikoko helbideen zerrenda zehatza eman beharko da (bestela, mezuak ukatu eta baztertuko dira). Hainbat sarrera eman daitezke, komaz bereizita." +} From 2e70143da24733bda7628c5d5a5502276cf79881 Mon Sep 17 00:00:00 2001 From: alexAubin <4533074+alexAubin@users.noreply.github.com> Date: Fri, 16 Aug 2024 14:09:58 +0000 Subject: [PATCH 189/218] :art: Format Python code with Black --- src/diagnosers/00-basesystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diagnosers/00-basesystem.py b/src/diagnosers/00-basesystem.py index 1bf9fb9fb..bee2fcdb9 100644 --- a/src/diagnosers/00-basesystem.py +++ b/src/diagnosers/00-basesystem.py @@ -199,7 +199,7 @@ class MyDiagnoser(Diagnoser): status="ERROR", summary="diagnosis_rfkill_wifi", details=["diagnosis_rfkill_wifi_details"], - data={"rfkill_wifi_error": rfkill_wifi} + data={"rfkill_wifi_error": rfkill_wifi}, ) def bad_sury_packages(self): From 5d3280c0fd581b61373415eab17e6dd082434531 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 16 Aug 2024 14:18:35 +0000 Subject: [PATCH 190/218] [CI] Reformat / remove stale translated strings --- locales/en.json | 8 ++++---- locales/eu.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/locales/en.json b/locales/en.json index 71a961919..3f291c808 100644 --- a/locales/en.json +++ b/locales/en.json @@ -316,6 +316,8 @@ "diagnosis_regenconf_allgood": "All configuration files are in line with the recommended configuration!", "diagnosis_regenconf_manually_modified": "Configuration file {file} appears to have been manually modified.", "diagnosis_regenconf_manually_modified_details": "This is probably OK if you know what you're doing! YunoHost will stop updating this file automatically… But beware that YunoHost upgrades could contain important recommended changes. If you want to, you can inspect the differences with yunohost tools regen-conf {category} --dry-run --with-diff and force the reset to the recommended configuration with yunohost tools regen-conf {category} --force", + "diagnosis_rfkill_wifi": "The Wi-Fi card is disabled and a system warning might prevent app installations", + "diagnosis_rfkill_wifi_details": "This warning sneaks in many command outputs, breaking some apps. It is usually required to specify your country code with the command sudo raspi-config. Here is the error:
{rfkill_wifi_error}", "diagnosis_rootfstotalspace_critical": "The root filesystem only has a total of {space} which is quite worrisome! You will likely run out of disk space very quickly! It's recommended to have at least 16 GB for the root filesystem.", "diagnosis_rootfstotalspace_warning": "The root filesystem only has a total of {space}. This may be okay, but be careful because ultimately you may run out of disk space quickly… It's recommended to have at least 16 GB for the root filesystem.", "diagnosis_security_vulnerable_to_meltdown": "You appear vulnerable to the Meltdown critical security vulnerability", @@ -807,7 +809,5 @@ "yunohost_configured": "YunoHost is now configured", "yunohost_installing": "Installing YunoHost…", "yunohost_not_installed": "YunoHost is not correctly installed. Please run 'yunohost tools postinstall'", - "yunohost_postinstall_end_tip": "The post-install completed! To finalize your setup, please consider:\n - diagnose potential issues through the 'Diagnosis' section of the webadmin (or 'yunohost diagnosis run' in command-line);\n - reading the 'Finalizing your setup' and 'Getting to know YunoHost' parts in the admin documentation: https://yunohost.org/admindoc.", - "diagnosis_rfkill_wifi": "The Wi-Fi card is disabled and a system warning might prevent app installations", - "diagnosis_rfkill_wifi_details": "This warning sneaks in many command outputs, breaking some apps. It is usually required to specify your country code with the command sudo raspi-config. Here is the error:
{rfkill_wifi_error}" -} + "yunohost_postinstall_end_tip": "The post-install completed! To finalize your setup, please consider:\n - diagnose potential issues through the 'Diagnosis' section of the webadmin (or 'yunohost diagnosis run' in command-line);\n - reading the 'Finalizing your setup' and 'Getting to know YunoHost' parts in the admin documentation: https://yunohost.org/admindoc." +} \ No newline at end of file diff --git a/locales/eu.json b/locales/eu.json index f23e0a79a..398499a5a 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -808,4 +808,4 @@ "global_settings_setting_smtp_backup_mx_domains": "Bigarren mailako MX gisa jarduteko domeinuak", "global_settings_setting_smtp_backup_mx_domains_help": "Zerbitzari honek zerrendan agertzen den domeinurako *bigarren mailako* MX domeinu gisa jardun dezake. Domeinurako lehenetsitako MX lortu ezin denean (adibidez, itzalaldi baten ondorioz), mezuak bigarren zerbitzari horretara bidaliko dira —gehienez 20 egunez mantenduko dituena— eta berriro eskuragarri dagoenean benetako helburura helarazten saiatuko da. Hainbat domeinu zehaztu daitezke, komaz bereizita.", "global_settings_setting_smtp_backup_mx_emails_whitelisted_help": "Bigarren mailako MX gisa jarduten duenean, baimendutako hartzaileen posta elektronikoko helbideen zerrenda zehatza eman beharko da (bestela, mezuak ukatu eta baztertuko dira). Hainbat sarrera eman daitezke, komaz bereizita." -} +} \ No newline at end of file From b734e2ea89778330c82430ae88b814961d10ddd0 Mon Sep 17 00:00:00 2001 From: xabirequejo Date: Sat, 17 Aug 2024 10:47:20 +0000 Subject: [PATCH 191/218] Translated using Weblate (Basque) Currently translated at 100.0% (811 of 811 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/eu/ --- locales/eu.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/locales/eu.json b/locales/eu.json index 398499a5a..404ecbae5 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -807,5 +807,7 @@ "global_settings_setting_smtp_backup_mx_emails_whitelisted": "Baimendutako posta elektronikoen MXren SMTP babeskopia", "global_settings_setting_smtp_backup_mx_domains": "Bigarren mailako MX gisa jarduteko domeinuak", "global_settings_setting_smtp_backup_mx_domains_help": "Zerbitzari honek zerrendan agertzen den domeinurako *bigarren mailako* MX domeinu gisa jardun dezake. Domeinurako lehenetsitako MX lortu ezin denean (adibidez, itzalaldi baten ondorioz), mezuak bigarren zerbitzari horretara bidaliko dira —gehienez 20 egunez mantenduko dituena— eta berriro eskuragarri dagoenean benetako helburura helarazten saiatuko da. Hainbat domeinu zehaztu daitezke, komaz bereizita.", - "global_settings_setting_smtp_backup_mx_emails_whitelisted_help": "Bigarren mailako MX gisa jarduten duenean, baimendutako hartzaileen posta elektronikoko helbideen zerrenda zehatza eman beharko da (bestela, mezuak ukatu eta baztertuko dira). Hainbat sarrera eman daitezke, komaz bereizita." -} \ No newline at end of file + "global_settings_setting_smtp_backup_mx_emails_whitelisted_help": "Bigarren mailako MX gisa jarduten duenean, baimendutako hartzaileen posta elektronikoko helbideen zerrenda zehatza eman beharko da (bestela, mezuak ukatu eta baztertuko dira). Hainbat sarrera eman daitezke, komaz bereizita.", + "diagnosis_rfkill_wifi_details": "Ohartarazpena komando askotan ageri da, aplikazio batzuk hautsiz. Herrialdearen kodea zehaztuz konpon daiteke sudo raspi-config komandoaren bidez. Hau da errorea:
{rfkill_wifi_error}", + "diagnosis_rfkill_wifi": "Wi-Fi txartela ezgaituta dago eta sistemaren ohartarazpen batek aplikazioen instalazioak eragotzi ditzake" +} From 6113fde48a7cb45af5dcff741f8cdfe3a89df11f Mon Sep 17 00:00:00 2001 From: ppr Date: Sat, 17 Aug 2024 08:09:19 +0000 Subject: [PATCH 192/218] Translated using Weblate (French) Currently translated at 99.5% (807 of 811 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/fr/ --- locales/fr.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/locales/fr.json b/locales/fr.json index ce1a50cc2..a5e6ae6fa 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -805,5 +805,9 @@ "migration_0027_start": "Démarrage de la migration vers Bookworm…", "migration_0027_still_on_bullseye_after_main_upgrade": "Quelque chose s'est mal passé lors de la mise à jour du système, il semble que celui-ci soit toujours sous Debian Bullseye.", "migration_0027_system_not_fully_up_to_date": "Votre système n'est pas complètement à jour. Veuillez effectuer une mise à jour classique avant de procéder à la migration vers Bookworm.", - "migration_0027_yunohost_upgrade": "Démarrage de la mise à jour du cœur de YunoHost…" -} \ No newline at end of file + "migration_0027_yunohost_upgrade": "Démarrage de la mise à jour du cœur de YunoHost…", + "global_settings_setting_smtp_backup_mx_domains": "Domaines à utiliser comme MX secondaire pour", + "global_settings_setting_smtp_backup_mx_emails_whitelisted": "Sauvegarde SMTP des courriels sur liste blanche du MX", + "global_settings_setting_smtp_backup_mx_emails_whitelisted_help": "Dans le cas d'un MX secondaire, la liste exhaustive des adresses électroniques des destinataires autorisés doit être fournie (sinon les courriers seront refusés et rejetés). Plusieurs entrées peuvent être fournies, séparées par des virgules.", + "global_settings_setting_smtp_backup_mx_domains_help": "Autorise ce serveur à agir en tant que domaine MX *secondaire* de secours pour le domaine listé. Cela signifie que si le MX principal pour le domaine n'est pas accessible (par exemple à cause d'une panne), les courriers électroniques seront quand même envoyés à ce serveur, qui les conservera pendant un maximum de 20 jours et essaiera de les relayer vers la destination réelle une fois qu'il sera rétabli. Plusieurs domaines peuvent être fournis, séparés par des virgules." +} From c5953b5420512ac17a914b3062598e867cd14b9d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 18 Aug 2024 22:44:27 +0200 Subject: [PATCH 193/218] ci: try to fix the full test not working because i removed the pytest install @_@ --- .gitlab/ci/test.gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index 9e95e9f02..438098c14 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -32,6 +32,7 @@ full-tests: PYTEST_ADDOPTS: "--color=yes" before_script: - *install_debs + - pip install mock pip pyOpenSSL pytest pytest-cov pytest-mock pytest-sugar requests-mock "packaging<22" - yunohost tools postinstall -d domain.tld -u syssa -F 'Syssa Mine' -p the_password --ignore-dyndns --force-diskspace script: - python3 -m pytest --cov=yunohost tests/ src/tests/ --junitxml=report.xml From 51787a2f8b9a90616537e28f956ddf8866afa55c Mon Sep 17 00:00:00 2001 From: Emmanuel Averty Date: Fri, 11 Aug 2023 12:05:30 +0200 Subject: [PATCH 194/218] trigger hooks when adding or removing user into group --- src/user.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/user.py b/src/user.py index 1b1b75261..e7341bf09 100644 --- a/src/user.py +++ b/src/user.py @@ -1137,6 +1137,7 @@ def user_group_update( ): from yunohost.permission import permission_sync_to_user from yunohost.utils.ldap import _get_ldap_interface, _ldap_path_extract + from yunohost.hook import hook_callback existing_users = list(user_list()["users"].keys()) @@ -1176,6 +1177,11 @@ def user_group_update( new_group_members = copy.copy(current_group_members) new_attr_dict = {} + # Group permissions + current_group_permissions = [ + _ldap_path_extract(p, "cn") for p in group.get("permission", []) + ] + if add: users_to_add = [add] if not isinstance(add, list) else add @@ -1289,6 +1295,36 @@ def user_group_update( if sync_perm: permission_sync_to_user() + if add and users_to_add: + for permission in current_group_permissions: + app = permission.split(".")[0] + sub_permission = permission.split(".")[1] + + hook_callback( + "post_app_addaccess", + args=[ + app, + ",".join(users_to_add), + sub_permission, + "" + ], + ) + + if remove and users_to_remove: + for permission in current_group_permissions: + app = permission.split(".")[0] + sub_permission = permission.split(".")[1] + + hook_callback( + "post_app_removeaccess", + args=[ + app, + ",".join(users_to_remove), + sub_permission, + "" + ], + ) + if not from_import: if groupname != "all_users": if not new_attr_dict: From aae24614c42852d4ba654646918282da0fbeca00 Mon Sep 17 00:00:00 2001 From: zamentur <4080016+zamentur@users.noreply.github.com> Date: Sun, 18 Aug 2024 22:57:18 +0000 Subject: [PATCH 195/218] :art: Format Python code with Black --- src/user.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/user.py b/src/user.py index e7341bf09..671a223c2 100644 --- a/src/user.py +++ b/src/user.py @@ -1302,12 +1302,7 @@ def user_group_update( hook_callback( "post_app_addaccess", - args=[ - app, - ",".join(users_to_add), - sub_permission, - "" - ], + args=[app, ",".join(users_to_add), sub_permission, ""], ) if remove and users_to_remove: @@ -1317,12 +1312,7 @@ def user_group_update( hook_callback( "post_app_removeaccess", - args=[ - app, - ",".join(users_to_remove), - sub_permission, - "" - ], + args=[app, ",".join(users_to_remove), sub_permission, ""], ) if not from_import: From eb14e404d6fdcb940f8e6048dc0a7c2799c4e75c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 18 Aug 2024 11:26:55 +0000 Subject: [PATCH 196/218] [CI] Reformat / remove stale translated strings --- locales/eu.json | 2 +- locales/fr.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/locales/eu.json b/locales/eu.json index 404ecbae5..2783c06a9 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -810,4 +810,4 @@ "global_settings_setting_smtp_backup_mx_emails_whitelisted_help": "Bigarren mailako MX gisa jarduten duenean, baimendutako hartzaileen posta elektronikoko helbideen zerrenda zehatza eman beharko da (bestela, mezuak ukatu eta baztertuko dira). Hainbat sarrera eman daitezke, komaz bereizita.", "diagnosis_rfkill_wifi_details": "Ohartarazpena komando askotan ageri da, aplikazio batzuk hautsiz. Herrialdearen kodea zehaztuz konpon daiteke sudo raspi-config komandoaren bidez. Hau da errorea:
{rfkill_wifi_error}", "diagnosis_rfkill_wifi": "Wi-Fi txartela ezgaituta dago eta sistemaren ohartarazpen batek aplikazioen instalazioak eragotzi ditzake" -} +} \ No newline at end of file diff --git a/locales/fr.json b/locales/fr.json index a5e6ae6fa..299d1f6cc 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -807,7 +807,7 @@ "migration_0027_system_not_fully_up_to_date": "Votre système n'est pas complètement à jour. Veuillez effectuer une mise à jour classique avant de procéder à la migration vers Bookworm.", "migration_0027_yunohost_upgrade": "Démarrage de la mise à jour du cœur de YunoHost…", "global_settings_setting_smtp_backup_mx_domains": "Domaines à utiliser comme MX secondaire pour", - "global_settings_setting_smtp_backup_mx_emails_whitelisted": "Sauvegarde SMTP des courriels sur liste blanche du MX", + "global_settings_setting_smtp_backup_mx_emails_whitelisted": "Sauvegarde SMTP des emails sur liste blanche du MX", "global_settings_setting_smtp_backup_mx_emails_whitelisted_help": "Dans le cas d'un MX secondaire, la liste exhaustive des adresses électroniques des destinataires autorisés doit être fournie (sinon les courriers seront refusés et rejetés). Plusieurs entrées peuvent être fournies, séparées par des virgules.", "global_settings_setting_smtp_backup_mx_domains_help": "Autorise ce serveur à agir en tant que domaine MX *secondaire* de secours pour le domaine listé. Cela signifie que si le MX principal pour le domaine n'est pas accessible (par exemple à cause d'une panne), les courriers électroniques seront quand même envoyés à ce serveur, qui les conservera pendant un maximum de 20 jours et essaiera de les relayer vers la destination réelle une fois qu'il sera rétabli. Plusieurs domaines peuvent être fournis, séparés par des virgules." -} +} \ No newline at end of file From a76cd05e87bbe62d7926b288b146b11220893502 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 25 Aug 2024 13:17:12 +0200 Subject: [PATCH 197/218] apps: in apt resource, fix empty string in packages_from_raw_bash breaking dpkg-build --- src/utils/resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/resources.py b/src/utils/resources.py index d28788174..4c8485f28 100644 --- a/src/utils/resources.py +++ b/src/utils/resources.py @@ -1197,7 +1197,7 @@ class AptDependenciesAppResource(AppResource): f"Error while running apt resource packages_from_raw_bash snippet for '{key}' extras:" ) logger.error(err) - values["packages"] = values.get("packages", []) + [value.strip() for value in out.split("\n")] # type: ignore + values["packages"] = values.get("packages", []) + [value.strip() for value in out.split("\n") if value.strip()] # type: ignore if ( not isinstance(values.get("repo"), str) From bc2ed45e9dac06309d0b1c2a238243c9e6d45ccc Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 25 Aug 2024 13:22:38 +0200 Subject: [PATCH 198/218] Update changelog for 11.2.28 --- debian/changelog | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/debian/changelog b/debian/changelog index c02f67c4b..05f67c6dd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +yunohost (11.2.28) stable; urgency=low + + - ci: various changes due to CI infrastructure changes (200f0272d, 764fe6a7b, 9083a5cc3, d0df3caed, 6733526be, df320a44c, 92f4a605b, f02d4a437, c5953b542) + - apps: exclude .well-known subpaths from conflict checks ([#1647](http://github.com/YunoHost/yunohost/pull/1647)) + - apps: in apt resource, fix empty string in packages_from_raw_bash breaking dpkg-build (a76cd05e8) + - sftp: Tweak umask for SFTP ([#1384](http://github.com/YunoHost/yunohost/pull/1384)) + - mail: Be able to use postfix as a backup ("secondary") MX hosts ([#1253](http://github.com/YunoHost/yunohost/pull/1253)) + - diagnosis: Add check regarding rfkill blocking Wi-Fi card on RPi ([#1841](http://github.com/YunoHost/yunohost/pull/1841)) + - users: trigger hooks when adding or removing user into group (51787a2f8) + - i18n: Translations updated for Basque, French, Indonesian, Russian + + Thanks to all contributors <3 ! (cjdw, Emmanuel Averty, Ivan Davydov, ljf, ppr, Tagada, tituspijean, xabirequejo) + + -- Alexandre Aubin Sun, 25 Aug 2024 13:17:43 +0200 + yunohost (11.2.27) stable; urgency=low - apt resource: fix handling of empty 'packages' list breaking dpkg-deb call (3deffdbd5) From 9b0553580b1c93eda87b25e5203894fc78aa0e0e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 26 Aug 2024 19:51:03 +0200 Subject: [PATCH 199/218] apps: generalize replacing __INSTALL_DIR__ and __APP__ in config panel 'bind' statement to any setting --- helpers/helpers.v1.d/config | 12 ++++++------ helpers/helpers.v2.1.d/config | 12 ++++++------ src/app.py | 13 +++++++++++++ 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/helpers/helpers.v1.d/config b/helpers/helpers.v1.d/config index d2cc2760e..eae4d928d 100644 --- a/helpers/helpers.v1.d/config +++ b/helpers/helpers.v1.d/config @@ -22,7 +22,7 @@ _ynh_app_config_get_one() { if [[ "$bind" == "settings" ]]; then ynh_die --message="File '${short_setting}' can't be stored in settings" fi - old[$short_setting]="$(ls "$(echo $bind | sed s@__INSTALL_DIR__@$install_dir@ | sed s@__FINALPATH__@$final_path@ | sed s/__APP__/$app/)" 2>/dev/null || echo YNH_NULL)" + old[$short_setting]="$(ls "$bind" 2>/dev/null || echo YNH_NULL)" file_hash[$short_setting]="true" # Get multiline text from settings or from a full file @@ -32,7 +32,7 @@ _ynh_app_config_get_one() { elif [[ "$bind" == *":"* ]]; then ynh_die --message="For technical reasons, multiline text '${short_setting}' can't be stored automatically in a variable file, you have to create custom getter/setter" else - old[$short_setting]="$(cat $(echo $bind | sed s@__INSTALL_DIR__@$install_dir@ | sed s@__FINALPATH__@$final_path@ | sed s/__APP__/$app/) 2>/dev/null || echo YNH_NULL)" + old[$short_setting]="$(cat "$bind" 2>/dev/null || echo YNH_NULL)" fi # Get value from a kind of key/value file @@ -47,7 +47,7 @@ _ynh_app_config_get_one() { bind_after="$(echo "${bind_key_}" | cut -d'>' -f1)" bind_key_="$(echo "${bind_key_}" | cut -d'>' -f2)" fi - local bind_file="$(echo "$bind" | cut -d: -f2 | sed s@__INSTALL_DIR__@$install_dir@ | sed s@__FINALPATH__@$final_path@ | sed s/__APP__/$app/)" + local bind_file="$(echo "$bind" | cut -d: -f2)" old[$short_setting]="$(ynh_read_var_in_file --file="${bind_file}" --key="${bind_key_}" --after="${bind_after}")" fi @@ -73,7 +73,7 @@ _ynh_app_config_apply_one() { if [[ "$bind" == "settings" ]]; then ynh_die --message="File '${short_setting}' can't be stored in settings" fi - local bind_file="$(echo "$bind" | sed s@__INSTALL_DIR__@$install_dir@ | sed s@__FINALPATH__@$final_path@ | sed s/__APP__/$app/)" + local bind_file="$bind" if [[ "${!short_setting}" == "" ]]; then ynh_backup_if_checksum_is_different --file="$bind_file" ynh_secure_remove --file="$bind_file" @@ -98,7 +98,7 @@ _ynh_app_config_apply_one() { if [[ "$bind" == *":"* ]]; then ynh_die --message="For technical reasons, multiline text '${short_setting}' can't be stored automatically in a variable file, you have to create custom getter/setter" fi - local bind_file="$(echo "$bind" | sed s@__INSTALL_DIR__@$install_dir@ | sed s@__FINALPATH__@$final_path@ | sed s/__APP__/$app/)" + local bind_file="$bind" ynh_backup_if_checksum_is_different --file="$bind_file" echo "${!short_setting}" >"$bind_file" ynh_store_file_checksum --file="$bind_file" --update_only @@ -113,7 +113,7 @@ _ynh_app_config_apply_one() { bind_key_="$(echo "${bind_key_}" | cut -d'>' -f2)" fi bind_key_=${bind_key_:-$short_setting} - local bind_file="$(echo "$bind" | cut -d: -f2 | sed s@__INSTALL_DIR__@$install_dir@ | sed s@__FINALPATH__@$final_path@ | sed s/__APP__/$app/)" + local bind_file="$(echo "$bind" | cut -d: -f2)" ynh_backup_if_checksum_is_different --file="$bind_file" ynh_write_var_in_file --file="${bind_file}" --key="${bind_key_}" --value="${!short_setting}" --after="${bind_after}" diff --git a/helpers/helpers.v2.1.d/config b/helpers/helpers.v2.1.d/config index 73b5d85b3..2c708209b 100644 --- a/helpers/helpers.v2.1.d/config +++ b/helpers/helpers.v2.1.d/config @@ -22,7 +22,7 @@ _ynh_app_config_get_one() { if [[ "$bind" == "settings" ]]; then ynh_die "File '${short_setting}' can't be stored in settings" fi - old[$short_setting]="$(ls "$(echo $bind | sed s@__INSTALL_DIR__@${install_dir:-}@ | sed s/__APP__/$app/)" 2>/dev/null || echo YNH_NULL)" + old[$short_setting]="$(ls "$bind" 2>/dev/null || echo YNH_NULL)" file_hash[$short_setting]="true" # Get multiline text from settings or from a full file @@ -32,7 +32,7 @@ _ynh_app_config_get_one() { elif [[ "$bind" == *":"* ]]; then ynh_die "For technical reasons, multiline text '${short_setting}' can't be stored automatically in a variable file, you have to create custom getter/setter" else - old[$short_setting]="$(cat $(echo $bind | sed s@__INSTALL_DIR__@${install_dir:-}@ | sed s/__APP__/$app/) 2>/dev/null || echo YNH_NULL)" + old[$short_setting]="$(cat "$bind" 2>/dev/null || echo YNH_NULL)" fi # Get value from a kind of key/value file @@ -47,7 +47,7 @@ _ynh_app_config_get_one() { bind_after="$(echo "${bind_key_}" | cut -d'>' -f1)" bind_key_="$(echo "${bind_key_}" | cut -d'>' -f2)" fi - local bind_file="$(echo "$bind" | cut -d: -f2 | sed s@__INSTALL_DIR__@${install_dir:-}@ | sed s/__APP__/$app/)" + local bind_file="$(echo "$bind" | cut -d: -f2)" old[$short_setting]="$(ynh_read_var_in_file --file="${bind_file}" --key="${bind_key_}" --after="${bind_after}")" fi @@ -73,7 +73,7 @@ _ynh_app_config_apply_one() { if [[ "$bind" == "settings" ]]; then ynh_die "File '${short_setting}' can't be stored in settings" fi - local bind_file="$(echo "$bind" | sed s@__INSTALL_DIR__@${install_dir:-}@ | sed s/__APP__/$app/)" + local bind_file="$bind" if [[ "${!short_setting}" == "" ]]; then ynh_backup_if_checksum_is_different "$bind_file" ynh_safe_rm "$bind_file" @@ -101,7 +101,7 @@ _ynh_app_config_apply_one() { if [[ "$bind" == *":"* ]]; then ynh_die "For technical reasons, multiline text '${short_setting}' can't be stored automatically in a variable file, you have to create custom getter/setter" fi - local bind_file="$(echo "$bind" | sed s@__INSTALL_DIR__@${install_dir:-}@ | sed s/__APP__/$app/)" + local bind_file="$bind" ynh_backup_if_checksum_is_different "$bind_file" echo "${!short_setting}" >"$bind_file" if _ynh_file_checksum_exists "$bind_file" @@ -119,7 +119,7 @@ _ynh_app_config_apply_one() { bind_key_="$(echo "${bind_key_}" | cut -d'>' -f2)" fi bind_key_=${bind_key_:-$short_setting} - local bind_file="$(echo "$bind" | cut -d: -f2 | sed s@__INSTALL_DIR__@${install_dir:-}@ | sed s/__APP__/$app/)" + local bind_file="$(echo "$bind" | cut -d: -f2)" ynh_backup_if_checksum_is_different "$bind_file" ynh_write_var_in_file --file="${bind_file}" --key="${bind_key_}" --value="${!short_setting}" --after="${bind_after}" diff --git a/src/app.py b/src/app.py index 5b94df4b1..34765af81 100644 --- a/src/app.py +++ b/src/app.py @@ -2022,6 +2022,19 @@ ynh_app_config_run $1 raise YunohostError("app_action_failed", action=action, app=app) return values + def _get_config_panel(self): + + ret = super()._get_config_panel() + + app = self.entity + settings = _get_app_settings(self.entity) + + for _, _, option in self._iterate(): + if "bind" in option: + option["bind"] = _hydrate_app_template(option["bind"], settings) + + return ret + def _get_app_settings(app): """ From c14ebc8be4f15d1d0c6cd94a5c60ce4bdd5dfb50 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 26 Aug 2024 20:14:08 +0200 Subject: [PATCH 200/218] perf: add cache for _get_app_settings() --- src/app.py | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/src/app.py b/src/app.py index 34765af81..538800dda 100644 --- a/src/app.py +++ b/src/app.py @@ -2036,7 +2036,11 @@ ynh_app_config_run $1 return ret -def _get_app_settings(app): +app_settings_cache: Dict[str, Dict[str, Any]] = {} +app_settings_cache_timestamp: Dict[str, int] = {} + + +def _get_app_settings(app: str) -> Dict[str, Any]: """ Get settings of an installed app @@ -2044,12 +2048,22 @@ def _get_app_settings(app): app -- The app id (like nextcloud__2) """ - if not _is_installed(app): - raise YunohostValidationError( - "app_not_installed", app=app, all_apps=_get_all_installed_apps_id() - ) + _assert_is_installed(app) + + global app_settings_cache + global app_settings_cache_timestamp + + app_setting_path = os.path.join(APPS_SETTING_PATH, app, "settings.yml") + app_setting_timestamp = os.path.getmtime(app_setting_path) + + # perf: app settings are cached using the settings.yml's modification date, + # such that we don't have to worry too much about calling this function + # too many times (because ultimately parsing yml is not free) + if app_settings_cache_timestamp.get(app) == app_setting_timestamp: + return app_settings_cache[app].copy() + try: - with open(os.path.join(APPS_SETTING_PATH, app, "settings.yml")) as f: + with open(app_setting_path) as f: settings = yaml.safe_load(f) or {} # If label contains unicode char, this may later trigger issues when building strings... # FIXME: this should be propagated to read_yaml so that this fix applies everywhere I think... @@ -2081,8 +2095,15 @@ def _get_app_settings(app): # Make the app id available as $app too settings["app"] = app - if app == settings["id"]: - return settings + # FIXME: it's not clear why this code exists... Shouldn't we hard-define 'id' as $app ...? + if app != settings["id"]: + return {} + + # Cache the settings + app_settings_cache[app] = settings.copy() + app_settings_cache_timestamp[app] = app_setting_timestamp + + return settings except (IOError, TypeError, KeyError): logger.error(m18n.n("app_not_correctly_installed", app=app)) return {} From c409888a4bbf74b32c651955b7443193c6746304 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 26 Aug 2024 20:14:48 +0200 Subject: [PATCH 201/218] quality: use _assert_is_installed for consistency instead of if not _is_intalled(app): raise --- src/app.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/app.py b/src/app.py index 538800dda..b9d64138d 100644 --- a/src/app.py +++ b/src/app.py @@ -328,10 +328,7 @@ def app_map(app=None, raw=False, user=None): result = {} if app is not None: - if not _is_installed(app): - raise YunohostValidationError( - "app_not_installed", app=app, all_apps=_get_all_installed_apps_id() - ) + _assert_is_installed(app) apps = [ app, ] @@ -1424,10 +1421,7 @@ def app_remove(operation_logger, app, purge=False, force_workdir=None): ) from yunohost.domain import domain_list, domain_config_get, domain_config_set - if not _is_installed(app): - raise YunohostValidationError( - "app_not_installed", app=app, all_apps=_get_all_installed_apps_id() - ) + _assert_is_installed(app) operation_logger.start() @@ -2728,16 +2722,6 @@ def _list_upgradable_apps(): def _is_installed(app: str) -> bool: - """ - Check if application is installed - - Keyword arguments: - app -- id of App to check - - Returns: - Boolean - - """ return os.path.isdir(APPS_SETTING_PATH + app) From 2102242a61bedf0495385c558e66f5f5c06f16ba Mon Sep 17 00:00:00 2001 From: alexAubin <4533074+alexAubin@users.noreply.github.com> Date: Mon, 26 Aug 2024 18:20:38 +0000 Subject: [PATCH 202/218] :art: Format Python code with Black --- src/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index b9d64138d..479921427 100644 --- a/src/app.py +++ b/src/app.py @@ -2018,7 +2018,7 @@ ynh_app_config_run $1 def _get_config_panel(self): - ret = super()._get_config_panel() + ret = super()._get_config_panel() app = self.entity settings = _get_app_settings(self.entity) From 7c7906046766d0f898a880725aab3f631ce24d96 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 26 Aug 2024 20:52:21 +0200 Subject: [PATCH 203/218] perf: hmmm try to fix race condition in previous cache system ? --- src/app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 479921427..6abe37db2 100644 --- a/src/app.py +++ b/src/app.py @@ -2020,7 +2020,6 @@ ynh_app_config_run $1 ret = super()._get_config_panel() - app = self.entity settings = _get_app_settings(self.entity) for _, _, option in self._iterate(): @@ -2115,6 +2114,11 @@ def _set_app_settings(app, settings): with open(os.path.join(APPS_SETTING_PATH, app, "settings.yml"), "w") as f: yaml.safe_dump(settings, f, default_flow_style=False) + if app in app_settings_cache_timestamp: + del app_settings_cache_timestamp[app] + if app in app_settings_cache: + del app_settings_cache[app] + def _get_manifest_of_app(path): "Get app manifest stored in json or in toml" From a6785d34bc08ab6936ddc2b40341a6a6987c56e6 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 27 Aug 2024 13:11:32 +0200 Subject: [PATCH 204/218] apps/config panels: move the computation of the actual 'bind' value to core to avoid having an epic python snippets in the bash code.. --- helpers/helpers.v1.d/config | 56 ++--------------------------------- helpers/helpers.v2.1.d/config | 56 ++--------------------------------- src/app.py | 54 +++++++++++++++++++++++++++++---- 3 files changed, 53 insertions(+), 113 deletions(-) diff --git a/helpers/helpers.v1.d/config b/helpers/helpers.v1.d/config index eae4d928d..e36897d82 100644 --- a/helpers/helpers.v1.d/config +++ b/helpers/helpers.v1.d/config @@ -126,60 +126,9 @@ _ynh_app_config_apply_one() { fi fi } + _ynh_app_config_get() { - # From settings - local lines - lines=$( - python3 <" in bind_section: - bind_section = bind_section + bind_panel_file - else: - bind_section = regex + bind_section + bind_panel_file - - for name, param in section.items(): - if not isinstance(param, dict): - continue - - bind = param.get('bind') - - if not bind: - if bind_section: - bind = bind_section - else: - bind = 'settings' - elif bind[-1] == ":" and bind_section and ":" in bind_section: - regex, bind_file = bind_section.split(":") - if ">" in bind: - bind = bind + bind_file - else: - bind = regex + bind + bind_file - if bind == "settings" and param.get('type', 'string') == 'file': - bind = 'null' - - print('|'.join([ - name, - param.get('type', 'string'), - bind - ])) -EOL - ) - for line in $lines; do + for line in $YNH_APP_CONFIG_PANEL_OPTIONS_TYPES_AND_BINDS; do # Split line into short_setting, type and bind IFS='|' read short_setting type bind <<<"$line" binds[${short_setting}]="$bind" @@ -188,7 +137,6 @@ EOL formats[${short_setting}]="" ynh_app_config_get_one $short_setting $type $bind done - } _ynh_app_config_apply() { diff --git a/helpers/helpers.v2.1.d/config b/helpers/helpers.v2.1.d/config index 2c708209b..b853d44d8 100644 --- a/helpers/helpers.v2.1.d/config +++ b/helpers/helpers.v2.1.d/config @@ -135,60 +135,9 @@ _ynh_app_config_apply_one() { fi fi } + _ynh_app_config_get() { - # From settings - local lines - lines=$( - python3 <" in bind_section: - bind_section = bind_section + bind_panel_file - else: - bind_section = regex + bind_section + bind_panel_file - - for name, param in section.items(): - if not isinstance(param, dict): - continue - - bind = param.get('bind') - - if not bind: - if bind_section: - bind = bind_section - else: - bind = 'settings' - elif bind[-1] == ":" and bind_section and ":" in bind_section: - regex, bind_file = bind_section.split(":") - if ">" in bind: - bind = bind + bind_file - else: - bind = regex + bind + bind_file - if bind == "settings" and param.get('type', 'string') == 'file': - bind = 'null' - - print('|'.join([ - name, - param.get('type', 'string'), - bind - ])) -EOL - ) - for line in $lines; do + for line in $YNH_APP_CONFIG_PANEL_OPTIONS_TYPES_AND_BINDS; do # Split line into short_setting, type and bind IFS='|' read short_setting type bind <<<"$line" binds[${short_setting}]="$bind" @@ -197,7 +146,6 @@ EOL formats[${short_setting}]="" ynh_app_config_get_one $short_setting $type $bind done - } _ynh_app_config_apply() { diff --git a/src/app.py b/src/app.py index 6abe37db2..903e573b9 100644 --- a/src/app.py +++ b/src/app.py @@ -1998,6 +1998,7 @@ ynh_app_config_run $1 "install_dir": settings.get("install_dir", ""), "YNH_APP_BASEDIR": os.path.join(APPS_SETTING_PATH, app), "YNH_APP_PACKAGING_FORMAT": str(manifest["packaging_format"]), + "YNH_APP_CONFIG_PANEL_OPTIONS_TYPES_AND_BINDS": self._dump_options_types_and_binds(), } ) app_script_env = _make_environment_for_app_script(app) @@ -2006,6 +2007,7 @@ ynh_app_config_run $1 app_script_env.update(env) env = app_script_env + ret, values = hook_exec(config_script, args=[action], env=env) if ret != 0: if action == "show": @@ -2020,14 +2022,56 @@ ynh_app_config_run $1 ret = super()._get_config_panel() - settings = _get_app_settings(self.entity) - - for _, _, option in self._iterate(): - if "bind" in option: - option["bind"] = _hydrate_app_template(option["bind"], settings) + self._compute_binds() return ret + def _compute_binds(self): + """ + This compute the 'bind' statement for every option + In particular to handle __FOOBAR__ syntax + and to handle the fact that bind statements may be defined panel-wide or section-wide + """ + + settings = _get_app_settings(self.entity) + + for panel, section, option in self._iterate(): + + bind_panel = panel.get('bind') + + bind_section = section.get('bind') + if not bind_section: + bind_section = bind_panel + elif bind_section[-1] == ":" and bind_panel and ":" in bind_panel: + selector, bind_panel_file = bind_panel.split(":") + if ">" in bind_section: + bind_section = bind_section + bind_panel_file + else: + bind_section = selector + bind_section + bind_panel_file + + bind = option.get('bind') + if not bind: + if bind_section: + bind = bind_section + else: + bind = 'settings' + elif bind[-1] == ":" and bind_section and ":" in bind_section: + selector, bind_file = bind_section.split(":") + if ">" in bind: + bind = bind + bind_file + else: + bind = selector + bind + bind_file + if bind == "settings" and option.get('type', 'string') == 'file': + bind = 'null' + + option["bind"] = _hydrate_app_template(bind, settings) + + def _dump_options_types_and_binds(self): + lines = [] + for _, _, option in self._iterate(): + lines.append('|'.join([option['id'], option.get('type', 'string'), option["bind"]])) + return '\n'.join(lines) + app_settings_cache: Dict[str, Dict[str, Any]] = {} app_settings_cache_timestamp: Dict[str, int] = {} From 9517b26c630f48d741077973fdb1f759b13e573f Mon Sep 17 00:00:00 2001 From: alexAubin <4533074+alexAubin@users.noreply.github.com> Date: Tue, 27 Aug 2024 11:11:57 +0000 Subject: [PATCH 205/218] :art: Format Python code with Black --- src/app.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/app.py b/src/app.py index 903e573b9..24b78fb37 100644 --- a/src/app.py +++ b/src/app.py @@ -2007,7 +2007,6 @@ ynh_app_config_run $1 app_script_env.update(env) env = app_script_env - ret, values = hook_exec(config_script, args=[action], env=env) if ret != 0: if action == "show": @@ -2037,9 +2036,9 @@ ynh_app_config_run $1 for panel, section, option in self._iterate(): - bind_panel = panel.get('bind') + bind_panel = panel.get("bind") - bind_section = section.get('bind') + bind_section = section.get("bind") if not bind_section: bind_section = bind_panel elif bind_section[-1] == ":" and bind_panel and ":" in bind_panel: @@ -2049,28 +2048,30 @@ ynh_app_config_run $1 else: bind_section = selector + bind_section + bind_panel_file - bind = option.get('bind') + bind = option.get("bind") if not bind: if bind_section: bind = bind_section else: - bind = 'settings' + bind = "settings" elif bind[-1] == ":" and bind_section and ":" in bind_section: selector, bind_file = bind_section.split(":") if ">" in bind: bind = bind + bind_file else: bind = selector + bind + bind_file - if bind == "settings" and option.get('type', 'string') == 'file': - bind = 'null' + if bind == "settings" and option.get("type", "string") == "file": + bind = "null" option["bind"] = _hydrate_app_template(bind, settings) def _dump_options_types_and_binds(self): lines = [] for _, _, option in self._iterate(): - lines.append('|'.join([option['id'], option.get('type', 'string'), option["bind"]])) - return '\n'.join(lines) + lines.append( + "|".join([option["id"], option.get("type", "string"), option["bind"]]) + ) + return "\n".join(lines) app_settings_cache: Dict[str, Dict[str, Any]] = {} From ca2572d00b8cb87d6e0175980d6d3bd3991d10e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20M?= Date: Tue, 20 Aug 2024 03:15:21 +0000 Subject: [PATCH 206/218] Translated using Weblate (Galician) Currently translated at 100.0% (811 of 811 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/gl/ --- locales/gl.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/locales/gl.json b/locales/gl.json index 7f718efb5..57f9f2a72 100644 --- a/locales/gl.json +++ b/locales/gl.json @@ -803,5 +803,11 @@ "migration_0027_modified_files": "Detectamos que os seguintes ficheiros semella foron modificados manualmente e poderían ser sobreescritos durante a actualización: {manually_modified_files}", "migration_0027_not_enough_free_space": "Hai moi pouco espazo en /var/! Deberías ter polo menos 1GB libre para realizar a migración.", "migration_0027_patch_yunohost_conflicts": "Aplicando a solución para resolver o problema conflictivo…", - "migration_0027_system_not_fully_up_to_date": "O teu sistema non está totalmente actualizado. Fai unha actualización corrente antes de iniciar a migración a Bookworm." -} \ No newline at end of file + "migration_0027_system_not_fully_up_to_date": "O teu sistema non está totalmente actualizado. Fai unha actualización corrente antes de iniciar a migración a Bookworm.", + "global_settings_setting_smtp_backup_mx_domains": "Dominios que actúan como MX secundario para", + "global_settings_setting_smtp_backup_mx_emails_whitelisted": "Lista de enderezos para apoio MX de SMTP", + "diagnosis_rfkill_wifi": "A tarxeta Wi-Fi está desactivada e un aviso do sistema podería previr a instalación de apps", + "diagnosis_rfkill_wifi_details": "Este aviso aparece na saída de varias ordes, estragando algunhas apps. Normalmente require indicar o código de país coa orde sudo raspi-config. Aquí tes o erro:
{rfkill_wifi_error}", + "global_settings_setting_smtp_backup_mx_domains_help": "Permitir a este servidor actuar como un dominio MX *secundario* de apoio para o dominio da lista. Así se o MX principal para o dominio non está accesible (por exemplo por quedar ser electricidade), os correos seguirán enviándose ao servidor, que os gardará un máximo de 20 días e intentará entregalos ao destino real unha vez volva ser accesible. Pódense indicar varios dominios, separados por comas.", + "global_settings_setting_smtp_backup_mx_emails_whitelisted_help": "Para actuar como MX secundario, hai que proporcionar unha lista detallada de enderezos de correspondentes permitidos (doutro xeito os correos serán rexeitados e desbotados). Pódense indicar varias entradas, separadas por comas." +} From 243a34d2d59129d78e56bbf0e4ea84818b79928a Mon Sep 17 00:00:00 2001 From: cjdw Date: Mon, 19 Aug 2024 04:39:57 +0000 Subject: [PATCH 207/218] Translated using Weblate (Indonesian) Currently translated at 100.0% (811 of 811 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/locales/id.json b/locales/id.json index 69b43c241..ff7949c7b 100644 --- a/locales/id.json +++ b/locales/id.json @@ -803,5 +803,11 @@ "service_description_redis-server": "Basis data khusus yang digunakan untuk akses data cepat, antrian tugas, dan komunikasi antar program", "update_apt_cache_warning": "Ada yang tidak sesuai saat memperbarui cache APT (manajer paket Debian). Berikut ini adalah kumpulan baris source.list, yang mungkin membantu mengidentifikasi baris yang bermasalah:\n{sourceslist}", "user_import_missing_columns": "Kehilangan kolom berikut: {columns}", - "user_import_nothing_to_do": "Tidak ada pengguna yang perlu diimpor" -} \ No newline at end of file + "user_import_nothing_to_do": "Tidak ada pengguna yang perlu diimpor", + "global_settings_setting_smtp_backup_mx_domains": "Domain yang digunakan sebagai MX sekunder", + "global_settings_setting_smtp_backup_mx_domains_help": "Izinkan server ini digunakan sebagai domain MX *sekunder* cadangan pada domain yang terdaftar. Ini berarti bahwa jika MX utama untuk domain tersebut tidak dapat dijangkau (misalnya karena gangguan), surel akan tetap dikirim ke server ini, yang akan menyimpannya selama maksimal 20 hari dan mencoba meneruskannya ke tujuan yang sebenarnya setelah kembali aktif. Beberapa domain dapat disediakan, dipisahkan dengan koma.", + "global_settings_setting_smtp_backup_mx_emails_whitelisted": "Daftar surel yang diperbolehkan sebagai MX cadangan SMTP", + "diagnosis_rfkill_wifi": "Kartu Wi-Fi dinonaktifkan dan peringatan sistem mungkin akan mencegah pemasangan aplikasi", + "diagnosis_rfkill_wifi_details": "Peringatan ini muncul di banyak keluaran perintah, sehingga merusak beberapa aplikasi. Biasanya Anda diminta untuk menentukan kode negara dengan perintah sudo raspi-config. Galat yang muncul:
{rfkill_wifi_error}", + "global_settings_setting_smtp_backup_mx_emails_whitelisted_help": "Bila digunakan sebagai MX sekunder, daftar lengkap alamat surel penerima yang diizinkan harus disediakan (sebaliknya surel akan ditolak dan dibuang). Beberapa alamat dapat diberikan, dipisahkan dengan koma." +} From e11b61f49e2eec9fcaf5bf76e2b8bb1574e34360 Mon Sep 17 00:00:00 2001 From: xabirequejo Date: Tue, 20 Aug 2024 15:37:40 +0000 Subject: [PATCH 208/218] Translated using Weblate (Basque) Currently translated at 100.0% (811 of 811 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/eu/ --- locales/eu.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locales/eu.json b/locales/eu.json index 2783c06a9..5083497ce 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -655,7 +655,7 @@ "global_settings_setting_ssh_port": "SSH ataka", "global_settings_setting_webadmin_allowlist_help": "Administrazio-atarira sar daitezken IP helbideak. CIDR notazioa ahalbidetzen da.", "global_settings_setting_webadmin_allowlist_enabled_help": "Baimendu IP zehatz batzuk bakarrik administrazio-atarian.", - "global_settings_setting_smtp_allow_ipv6_help": "Baimendu IPv6 posta elektronikoa jaso eta bidaltzeko", + "global_settings_setting_smtp_allow_ipv6_help": "Gaitu IPv6 posta elektronikoa jaso eta bidaltzeko", "global_settings_setting_smtp_relay_enabled_help": "YunoHosten ordez posta elektronikoa bidaltzeko SMTP relay helbidea. Erabilgarri izan daiteke egoera hauetan: operadore edo VPS enpresak 25. ataka blokeatzen badu, DUHLen zure etxeko IPa ageri bada, ezin baduzu alderantzizko DNSa ezarri edo zerbitzari hau ez badago zuzenean internetera konektatuta baina posta elektronikoa bidali nahi baduzu.", "migration_0024_rebuild_python_venv_broken_app": "{app} aplikazioari ez ikusiarena egin zaio ezin delako ingurune birtuala modu errazean birsortu. Horren ordez, aplikazioaren eguneraketa behartzen saia zaitezke `yunohost app upgrade --force {app}` arazoa konpontzeko.", "migration_0024_rebuild_python_venv_disclaimer_rebuild": "Ondorengo aplikazioen virtualenv-a birsortzeko saiakera egingo da (eragiketak luze jo dezake!): {rebuild_apps}", @@ -695,7 +695,7 @@ "diagnosis_using_stable_codename": "apt (sistemaren pakete kudeatzailea) 'stable' (egonkorra) izen kodea duten paketeak instalatzeko ezarrita dago une honetan, eta ez uneko Debianen bertsioaren (bullseye) izen kodea.", "diagnosis_using_yunohost_testing": "apt (sistemaren pakete kudeatzailea) YunoHosten muinerako 'testing' (proba) izen kodea duten paketeak instalatzeko ezarrita dago une honetan.", "diagnosis_using_yunohost_testing_details": "Ez dago arazorik zertan ari zaren baldin badakizu, baina arretaz irakurri oharrak YunoHosten eguneraketak instalatu baino lehen! 'testing' (proba) bertsioak ezgaitu nahi badituzu, kendu testing gakoa /etc/apt/sources.list.d/yunohost.list fitxategitik.", - "global_settings_setting_smtp_allow_ipv6": "Baimendu IPv6", + "global_settings_setting_smtp_allow_ipv6": "Gaitu IPv6", "global_settings_setting_smtp_relay_host": "SMTP errele-ostatatzailea", "domain_config_acme_eligible": "ACME hautagarritasuna", "domain_config_acme_eligible_explain": "Ez dirudi domeinu hau Let's Encrypt ziurtagirirako prest dagoenik. Egiaztatu DNS ezarpenak eta zerbitzariaren HTTP irisgarritasuna. Diagnostikoen guneko 'DNS erregistroak' eta 'Web' atalek zer dagoen gaizki ulertzen lagun zaitzakete.", @@ -810,4 +810,4 @@ "global_settings_setting_smtp_backup_mx_emails_whitelisted_help": "Bigarren mailako MX gisa jarduten duenean, baimendutako hartzaileen posta elektronikoko helbideen zerrenda zehatza eman beharko da (bestela, mezuak ukatu eta baztertuko dira). Hainbat sarrera eman daitezke, komaz bereizita.", "diagnosis_rfkill_wifi_details": "Ohartarazpena komando askotan ageri da, aplikazio batzuk hautsiz. Herrialdearen kodea zehaztuz konpon daiteke sudo raspi-config komandoaren bidez. Hau da errorea:
{rfkill_wifi_error}", "diagnosis_rfkill_wifi": "Wi-Fi txartela ezgaituta dago eta sistemaren ohartarazpen batek aplikazioen instalazioak eragotzi ditzake" -} \ No newline at end of file +} From 4dfcc13a3f03d004f76c5474b26a88d30c91f9f0 Mon Sep 17 00:00:00 2001 From: ppr Date: Tue, 20 Aug 2024 17:56:45 +0000 Subject: [PATCH 209/218] Translated using Weblate (French) Currently translated at 99.6% (808 of 811 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/fr/ --- locales/fr.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/fr.json b/locales/fr.json index 299d1f6cc..8d3f70480 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -809,5 +809,5 @@ "global_settings_setting_smtp_backup_mx_domains": "Domaines à utiliser comme MX secondaire pour", "global_settings_setting_smtp_backup_mx_emails_whitelisted": "Sauvegarde SMTP des emails sur liste blanche du MX", "global_settings_setting_smtp_backup_mx_emails_whitelisted_help": "Dans le cas d'un MX secondaire, la liste exhaustive des adresses électroniques des destinataires autorisés doit être fournie (sinon les courriers seront refusés et rejetés). Plusieurs entrées peuvent être fournies, séparées par des virgules.", - "global_settings_setting_smtp_backup_mx_domains_help": "Autorise ce serveur à agir en tant que domaine MX *secondaire* de secours pour le domaine listé. Cela signifie que si le MX principal pour le domaine n'est pas accessible (par exemple à cause d'une panne), les courriers électroniques seront quand même envoyés à ce serveur, qui les conservera pendant un maximum de 20 jours et essaiera de les relayer vers la destination réelle une fois qu'il sera rétabli. Plusieurs domaines peuvent être fournis, séparés par des virgules." -} \ No newline at end of file + "global_settings_setting_smtp_backup_mx_domains_help": "Autoriser ce serveur à agir en tant que domaine MX *secondaire* de secours pour le domaine listé. Cela signifie que si le MX principal pour le domaine n'est pas accessible (par exemple à cause d'une panne), les courriers électroniques seront quand même envoyés à ce serveur, qui les conservera pendant un maximum de 20 jours et essaiera de les relayer vers la destination réelle une fois qu'il sera rétabli. Plusieurs domaines peuvent être fournis, séparés par des virgules." +} From 5ad9962757884e08f928ae1360f713bc7d6e7bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20M?= Date: Wed, 21 Aug 2024 04:10:28 +0000 Subject: [PATCH 210/218] Translated using Weblate (Galician) Currently translated at 100.0% (811 of 811 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/gl/ --- locales/gl.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/gl.json b/locales/gl.json index 57f9f2a72..dc5ae7e7a 100644 --- a/locales/gl.json +++ b/locales/gl.json @@ -100,7 +100,7 @@ "backup_permission": "Permiso de copia para {app}", "backup_output_symlink_dir_broken": "O directorio de arquivo '{path}' é unha ligazón simbólica rota. Pode ser que esqueceses re/montar ou conectar o medio de almacenaxe ao que apunta.", "backup_output_directory_required": "Debes proporcionar un directorio de saída para a copia", - "backup_output_directory_not_empty": "Debes elexir un directorio de saída baleiro", + "backup_output_directory_not_empty": "Debes elixir un directorio de saída baleiro", "backup_output_directory_forbidden": "Elixe un directorio de saída diferente. As copias non poden crearse en /bin, /boot, /dev, /etc, /lib, /root, /sbin, /sys, /usr, /var ou subcartafoles de /home/yunohost.backup/archives", "backup_nothings_done": "Nada que gardar", "backup_no_uncompress_archive_dir": "Non hai tal directorio do arquivo descomprimido", @@ -781,7 +781,7 @@ "log_dyndns_unsubscribe": "Retirar subscrición para o subdominio YunoHost '{}'", "ask_dyndns_recovery_password_explain_unavailable": "Este dominio DynDNS xa está rexistrado. Se es a persoa que o rexistrou orixinalmente, podes escribir o código de recuperación para reclamar o dominio.", "dyndns_too_many_requests": "O servicio dyndns de YunoHost recibeu demasiadas peticións do teu sistema, agarda 1 hora e volve intentalo.", - "global_settings_setting_ssh_port_help": "É recomendable un porto inferior a 1024 para evitar os intentos de apropiación por parte de servizos de non-administración na máquina remota. Tamén deberías evitar elexir un porto que xa está sendo utilizado, como 80 ou 443.", + "global_settings_setting_ssh_port_help": "É recomendable un porto inferior a 1024 para evitar os intentos de apropiación por parte de servizos de non-administración na máquina remota. Tamén deberías evitar elixir un porto que xa está sendo utilizado, como 80 ou 443.", "diagnosis_ignore_criteria_error": "Os criterios deben ter o formato key=value (ex. domain=yolo.test)", "diagnosis_ignore_already_filtered": "(Xa existe un filtro de diagnóstico de {category} con estes criterios)", "diagnosis_ignore_filter_removed": "Eliminouse o filtro do diagnóstico para {category}", From 9223d30a8312e6fd005498060977b34ada6912ae Mon Sep 17 00:00:00 2001 From: cjdw Date: Wed, 21 Aug 2024 00:06:09 +0000 Subject: [PATCH 211/218] Translated using Weblate (Indonesian) Currently translated at 100.0% (811 of 811 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/id/ --- locales/id.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/id.json b/locales/id.json index ff7949c7b..c2c835e23 100644 --- a/locales/id.json +++ b/locales/id.json @@ -469,7 +469,7 @@ "config_unknown_filter_key": "Kunci filter '{filter_key}' tidak sesuai.", "backup_permission": "Izin pencadangan untuk {app}", "config_forbidden_keyword": "Kata kunci '{keyword}' sudah ada, Anda tidak dapat membuat atau menggunakan panel konfigurasi disertai pertanyaan dengan id ini.", - "good_practices_about_user_password": "Sekarang Anda akan menentukan kata sandi pengguna baru. Kata sandi harus terdiri dari minimal 8 karakter - meskipun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan beragam karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", + "good_practices_about_user_password": "Sekarang Anda akan menentukan kata sandi pengguna baru. Kata sandi harus terdiri dari minimal 8 karakter—meskipun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan beragam karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", "domain_dns_push_failed_to_authenticate": "Autentikasi gagal pada API registrar untuk domain '{domain}'. Besar kemungkinan karena kredensial tidak sesuai? (Galat: {error})", "certmanager_domain_dns_ip_differs_from_public_ip": "Rekaman DNS untuk domain '{domain}' berbeda dengan IP server ini. Silakan periksa kategori 'Catatan DNS' (dasar) dalam diagnosis untuk info lebih lanjut. Jika Anda baru saja memodifikasi rekaman A, silakan menunggu hingga rekaman tersebut disebarkan (beberapa pemeriksa sebaran DNS tersedia online). (Jika Anda tahu apa yang Anda lakukan, gunakan '--no-checks' untuk mematikan pemeriksaan ini.)", "certmanager_hit_rate_limit": "Terlalu banyak sertifikat yang telah diterbitkan untuk kumpulan domain {domain} ini baru-baru ini. Silakan coba lagi nanti. Lihat https://letsencrypt.org/docs/rate-limits/ untuk detail lebih lanjut", @@ -483,7 +483,7 @@ "config_cant_set_value_on_section": "Anda tidak dapat menetapkan satu nilai pun di seluruh bagian konfigurasi.", "backup_applying_method_custom": "Memanggil metode pencadangan khusus '{method}'…", "backup_ask_for_copying_if_needed": "Apakah Anda ingin melakukan pencadangan menggunakan {size}MB untuk sementara? (Cara ini digunakan karena beberapa berkas tidak dapat disiapkan menggunakan metode yang lebih efisien.)", - "good_practices_about_admin_password": "Sekarang Anda akan menentukan kata sandi administrasi baru. Kata sandi harus terdiri dari minimal 8 karakter - meskipun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan beragam karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", + "good_practices_about_admin_password": "Sekarang Anda akan menentukan kata sandi administrasi baru. Kata sandi harus terdiri dari minimal 8 karakter—meskipun sebaiknya menggunakan kata sandi yang lebih panjang (misalnya parafrasa) dan/atau menggunakan beragam karakter (huruf besar, huruf kecil, angka, dan karakter khusus).", "certmanager_acme_not_configured_for_domain": "Tantangan ACME tidak dapat dijalankan untuk {domain} saat ini karena konfigurasi pada nginx tidak memiliki potongan kode yang sesuai… Pastikan konfigurasi nginx Anda mutakhir menggunakan `yunohost tools regen-conf nginx --dry-run --with-diff`.", "diagnosis_http_special_use_tld": "Domain {domain} berdasarkan pada domain tingkat atas (TLD) penggunaan khusus seperti .local atau .test dan oleh karena itu tidak diharapkan untuk diekspos di luar jaringan lokal.", "certmanager_self_ca_conf_file_not_found": "Tidak dapat menemukan berkas konfigurasi untuk otoritas teken mandiri (berkas: {file})", From a40874c305a61383b73a4529b6d9a50cfb75d0e7 Mon Sep 17 00:00:00 2001 From: craftrac Date: Fri, 23 Aug 2024 08:55:47 +0000 Subject: [PATCH 212/218] Translated using Weblate (Greek) Currently translated at 1.1% (9 of 811 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/el/ --- locales/el.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/locales/el.json b/locales/el.json index a85bd0710..c5f95b8bf 100644 --- a/locales/el.json +++ b/locales/el.json @@ -1,4 +1,12 @@ { "password_too_simple_1": "Ο κωδικός πρόσβασης πρέπει να έχει τουλάχιστον 8 χαρακτήρες", - "aborting": "Ματαίωση." -} \ No newline at end of file + "aborting": "Ματαίωση.", + "action_invalid": "Μη έγκυρη ενέργεια '{action}'", + "app_action_broke_system": "Αυτή η ενέργεια φαίνεται να έχει προκαλέσει προβλήματα σε αυτές τις σημαντικές υπηρεσίες: {services}", + "app_already_installed": "Η φαρμογή {app} είναι ήδη εγκατεστημένη", + "admin_password": "Κωδικός διαχείρισης", + "all_users": "Όλοι οι χρήστες YunoHost", + "admins": "Διαχειριστές", + "app_action_failed": "Αποτυχία εκτέλεσης ενέργειας {action} για την εφαρμογή {app}", + "already_up_to_date": "Δεν υπάρχει τίποτα να γίνει. Όλα είναι επικαιροποιημένα." +} From 71b50549f59ce1863a70e6b899b19238a4fad80b Mon Sep 17 00:00:00 2001 From: xabirequejo Date: Sun, 25 Aug 2024 11:40:22 +0000 Subject: [PATCH 213/218] Translated using Weblate (Basque) Currently translated at 100.0% (811 of 811 strings) Translation: YunoHost/core Translate-URL: https://translate.yunohost.org/projects/yunohost/core/eu/ --- locales/eu.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/locales/eu.json b/locales/eu.json index 5083497ce..236295730 100644 --- a/locales/eu.json +++ b/locales/eu.json @@ -461,7 +461,7 @@ "user_import_success": "Erabiltzaileak arazorik gabe inportatu dira", "yunohost_already_installed": "YunoHost instalatuta dago dagoeneko", "migrations_success_forward": "{id} migrazioak amaitu du", - "migrations_to_be_ran_manually": "{id} migrazioa eskuz abiarazi behar da. Joan Tresnak → Migrazioak atalera administrazio-atarian edo bestela exekutatu 'yunohost tools migrations run'.", + "migrations_to_be_ran_manually": "{id} migrazioa eskuz abiarazi behar da. Joan Tresnak → Migrazioak atalera administrazio-gunean edo bestela exekutatu 'yunohost tools migrations run'.", "permission_currently_allowed_for_all_users": "Baimen hau erabiltzaile guztiei esleitzen zaie eta baita beste talde batzuei ere. Litekeena da 'all users' baimena edo esleituta duten taldeei baimena kendu nahi izatea.", "permission_require_account": "'{permission}' baimena zerbitzarian kontua duten erabiltzaileentzat da eta, beraz, ezin da gaitu bisitarientzat.", "postinstall_low_rootfsspace": "'root' fitxategi-sistemak 10 GB edo espazio gutxiago dauka, kezkatzekoa dena! Litekeena da espaziorik gabe geratzea aurki! Gomendagarria da 'root' fitxategi-sistemak gutxienez 16 GB libre izatea. Jakinarazpen honen ondoren YunoHost instalatzen jarraitu nahi baduzu, berrabiarazi agindua '--force-diskspace' gehituz", @@ -579,7 +579,7 @@ "port_already_opened": "{port}. ataka dagoeneko irekita dago {ip_version} konexioetarako", "user_home_creation_failed": "Ezin izan da erabiltzailearentzat '{home}' direktorioa sortu", "user_unknown": "Erabiltzaile ezezaguna: {user}", - "yunohost_postinstall_end_tip": "Instalazio ondorengo prozesua amaitu da! Sistemaren konfigurazioa bukatzeko:\n- erabili 'Diagnostikoak' gunea ohiko arazoei aurre hartzeko. Administrazio-atarian abiarazi edo 'yunohost diagnosis run' exekutatu;\n- irakurri 'Finalizing your setup' eta 'Getting to know YunoHost' atalak. Dokumentazioan aurki ditzakezu: https://yunohost.org/admindoc.", + "yunohost_postinstall_end_tip": "Instalazio ondorengo prozesua amaitu da! Sistemaren konfigurazioa bukatzeko:\n- erabili 'Diagnostikoak' gunea ohiko arazoei aurre hartzeko. Abiarazi administrazio-gunean edo exekutatu 'yunohost diagnosis run';\n- irakurri 'Finalizing your setup' eta 'Getting to know YunoHost' atalak. Dokumentazioan aurki ditzakezu: https://yunohost.org/admindoc.", "yunohost_not_installed": "YunoHost ez da zuzen instalatu. Exekutatu 'yunohost tools postinstall'", "unlimit": "Mugarik ez", "restore_already_installed_apps": "Ondorengo aplikazioak ezin dira lehengoratu dagoeneko instalatuta daudelako: {apps}", @@ -620,7 +620,7 @@ "service_description_redis-server": "Datuak bizkor atzitzeko, zereginak lerratzeko eta programen arteko komunikaziorako datubase berezi bat da", "service_description_rspamd": "Spama bahetu eta posta elektronikoarekin zerikusia duten bestelako futzioen ardura dauka", "service_description_slapd": "Erabiltzaileak, domeinuak eta hauei lotutako informazioa gordetzen du", - "service_description_yunohost-api": "YunoHosten web-atariaren eta sistemaren arteko hartuemana kudeatzen du", + "service_description_yunohost-api": "YunoHosten web-interfazearen eta sistemaren arteko hartuemana kudeatzen du", "domain_config_default_app": "Lehenetsitako aplikazioa", "tools_upgrade": "Sistemaren paketeak eguneratzen", "tools_upgrade_failed": "Ezin izan dira paketeak eguneratu: {packages_list}", @@ -654,7 +654,7 @@ "global_settings_setting_ssh_password_authentication_help": "Baimendu pasahitz bidezko autentikazioa SSHrako", "global_settings_setting_ssh_port": "SSH ataka", "global_settings_setting_webadmin_allowlist_help": "Administrazio-atarira sar daitezken IP helbideak. CIDR notazioa ahalbidetzen da.", - "global_settings_setting_webadmin_allowlist_enabled_help": "Baimendu IP zehatz batzuk bakarrik administrazio-atarian.", + "global_settings_setting_webadmin_allowlist_enabled_help": "Baimendu IP zehatz batzuk bakarrik administrazio-gunerako.", "global_settings_setting_smtp_allow_ipv6_help": "Gaitu IPv6 posta elektronikoa jaso eta bidaltzeko", "global_settings_setting_smtp_relay_enabled_help": "YunoHosten ordez posta elektronikoa bidaltzeko SMTP relay helbidea. Erabilgarri izan daiteke egoera hauetan: operadore edo VPS enpresak 25. ataka blokeatzen badu, DUHLen zure etxeko IPa ageri bada, ezin baduzu alderantzizko DNSa ezarri edo zerbitzari hau ez badago zuzenean internetera konektatuta baina posta elektronikoa bidali nahi baduzu.", "migration_0024_rebuild_python_venv_broken_app": "{app} aplikazioari ez ikusiarena egin zaio ezin delako ingurune birtuala modu errazean birsortu. Horren ordez, aplikazioaren eguneraketa behartzen saia zaitezke `yunohost app upgrade --force {app}` arazoa konpontzeko.", @@ -720,7 +720,7 @@ "global_settings_setting_ssh_password_authentication": "Pasahitz bidezko autentifikazioa", "global_settings_setting_user_strength_help": "Betekizun hauek lehenbizikoz sortzerakoan edo pasahitza aldatzerakoan bete behar dira soilik", "global_settings_setting_webadmin_allowlist": "Administrazio-atarira sartzeko baimendutako IPak", - "global_settings_setting_webadmin_allowlist_enabled": "Gaitu administrazio-ataria sartzeko baimendutako IPak", + "global_settings_setting_webadmin_allowlist_enabled": "Gaitu administrazio-gunera sartzeko baimendutako IPak", "invalid_credentials": "Pasahitz edo erabiltzaile-izen baliogabea", "log_resource_snippet": "Baliabide bat eguneratzen / eskuratzen / eskuragarritasuna uzten", "log_settings_set": "Aplikatu ezarpenak", From d4f774ad722a1063fe2c2cdb41664a3e0c9acdeb Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 27 Aug 2024 14:42:22 +0200 Subject: [PATCH 214/218] quality: fix typing issue --- src/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.py b/src/app.py index 24b78fb37..c2d930bc9 100644 --- a/src/app.py +++ b/src/app.py @@ -2075,7 +2075,7 @@ ynh_app_config_run $1 app_settings_cache: Dict[str, Dict[str, Any]] = {} -app_settings_cache_timestamp: Dict[str, int] = {} +app_settings_cache_timestamp: Dict[str, float] = {} def _get_app_settings(app: str) -> Dict[str, Any]: From 3d4804be68074e3827bb1b9ff76670cb6660feac Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 27 Aug 2024 14:48:10 +0200 Subject: [PATCH 215/218] Update changelog for 11.2.29 --- debian/changelog | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/debian/changelog b/debian/changelog index 05f67c6dd..81f1934d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +yunohost (11.2.29) stable; urgency=low + + - apps: generalize replacing __INSTALL_DIR__ and __APP__ in config panel 'bind' statement to any setting (9b0553580) + - apps/config panels: move the computation of the actual 'bind' value to the python core (a6785d34b) + - perf: add cache for _get_app_settings() (c14ebc8be, 7c7906046) + - quality: use _assert_is_installed for consistency instead of if not _is_intalled(app): raise (c409888a4) + - i18n: Translations updated for Basque, French, Galician, Greek, Indonesian + + Thanks to all contributors <3 ! (cjdw, craftrac, José M, ppr, xabirequejo) + + -- Alexandre Aubin Tue, 27 Aug 2024 14:46:26 +0200 + yunohost (11.2.28) stable; urgency=low - ci: various changes due to CI infrastructure changes (200f0272d, 764fe6a7b, 9083a5cc3, d0df3caed, 6733526be, df320a44c, 92f4a605b, f02d4a437, c5953b542) From 488f563b458dbd6f8bc2af0d51a6131ffdbbffd3 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 28 Aug 2024 23:03:57 +0200 Subject: [PATCH 216/218] 2.1 helpers: check if the patches directory exists before trying to get its realpath --- helpers/helpers.v2.1.d/sources | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/helpers.v2.1.d/sources b/helpers/helpers.v2.1.d/sources index 312014b67..4d7ed1d1e 100644 --- a/helpers/helpers.v2.1.d/sources +++ b/helpers/helpers.v2.1.d/sources @@ -224,8 +224,8 @@ ynh_setup_source() { fi # Apply patches - local patches_folder=$(realpath "$YNH_APP_BASEDIR/patches/$source_id") - if [ -d "$patches_folder" ]; then + if [ -d "$YNH_APP_BASEDIR/patches/" ]; then + local patches_folder=$(realpath "$YNH_APP_BASEDIR/patches/$source_id") pushd "$dest_dir" for patchfile in "$patches_folder/"*.patch; do echo "Applying $patchfile" From 606e246ec4e5265f2a1db5c4e2497952852649bd Mon Sep 17 00:00:00 2001 From: selfhoster1312 Date: Thu, 29 Aug 2024 17:41:41 +0200 Subject: [PATCH 217/218] docs: ynh_install_app_dependencies -> ynh_apt_install_dependencies --- helpers/helpers.v2.1.d/apt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helpers/helpers.v2.1.d/apt b/helpers/helpers.v2.1.d/apt index 6b2ecad1c..f9f0cdee2 100644 --- a/helpers/helpers.v2.1.d/apt +++ b/helpers/helpers.v2.1.d/apt @@ -4,9 +4,9 @@ YNH_APT_INSTALL_DEPENDENCIES_REPLACE="true" # Define and install dependencies with a equivs control file # -# example : ynh_install_app_dependencies dep1 dep2 "dep3|dep4|dep5" +# example : ynh_apt_install_dependencies dep1 dep2 "dep3|dep4|dep5" # -# usage: ynh_install_app_dependencies dep [dep [...]] +# usage: ynh_apt_install_dependencies dep [dep [...]] # | arg: dep - the package name to install in dependence. # | arg: "dep1|dep2|…" - You can specify alternatives. It will require to install (dep1 or dep2, etc). # @@ -72,9 +72,9 @@ ynh_apt_install_dependencies() { # Specific tweak related to Postgresql (cf end of the helper) local psql_installed="$(_ynh_apt_package_is_installed "postgresql-$PSQL_VERSION" && echo yes || echo no)" - # The first time we run ynh_install_app_dependencies, we will replace the + # The first time we run ynh_apt_install_dependencies, we will replace the # entire control file (This is in particular meant to cover the case of - # upgrade script where ynh_install_app_dependencies is called with this + # upgrade script where ynh_apt_install_dependencies is called with this # expected effect) Otherwise, any subsequent call will add dependencies # to those already present in the equivs control file. if [[ $YNH_APT_INSTALL_DEPENDENCIES_REPLACE == "true" ]] From aff885e6b79f6e4e44adcd56a1a90151cedefc08 Mon Sep 17 00:00:00 2001 From: selfhoster1312 Date: Wed, 28 Aug 2024 11:51:37 +0200 Subject: [PATCH 218/218] helpers v2.1: ynh_add_swap and ynh_smart_mktemp --- helpers/helpers.v2.1.d/utils | 145 +++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) diff --git a/helpers/helpers.v2.1.d/utils b/helpers/helpers.v2.1.d/utils index aca976c54..e4f6d297a 100644 --- a/helpers/helpers.v2.1.d/utils +++ b/helpers/helpers.v2.1.d/utils @@ -456,3 +456,148 @@ ynh_spawn_app_shell() { # Spawn the app shell su -s /bin/bash $app } + +# Add swap +# +# usage: ynh_add_swap --size=SWAP in Mb +# | arg: -s, --size= - Amount of SWAP to add in Mb. +ynh_add_swap () { + if systemd-detect-virt --container --quiet; then + ynh_print_warn --message="You are inside a container/VM. swap will not be added, but that can cause troubles for the app $app. Please make sure you have enough RAM available." + return + fi + + # Declare an array to define the options of this helper. + declare -Ar args_array=( [s]=size= ) + local size + # Manage arguments with getopts + ynh_handle_getopts_args "$@" + + local swap_max_size=$(( $size * 1024 )) + + local free_space=$(df --output=avail / | sed 1d) + # Because we don't want to fill the disk with a swap file, divide by 2 the available space. + local usable_space=$(( $free_space / 2 )) + + SD_CARD_CAN_SWAP=${SD_CARD_CAN_SWAP:-0} + + # Swap on SD card only if it's is specified + if ynh_is_main_device_a_sd_card && [ "$SD_CARD_CAN_SWAP" == "0" ] + then + ynh_print_warn --message="The main mountpoint of your system '/' is on an SD card, swap will not be added to prevent some damage of this one, but that can cause troubles for the app $app. If you still want activate the swap, you can relaunch the command preceded by 'SD_CARD_CAN_SWAP=1'" + return + fi + + # Compare the available space with the size of the swap. + # And set a acceptable size from the request + if [ $usable_space -ge $swap_max_size ] + then + local swap_size=$swap_max_size + elif [ $usable_space -ge $(( $swap_max_size / 2 )) ] + then + local swap_size=$(( $swap_max_size / 2 )) + elif [ $usable_space -ge $(( $swap_max_size / 3 )) ] + then + local swap_size=$(( $swap_max_size / 3 )) + elif [ $usable_space -ge $(( $swap_max_size / 4 )) ] + then + local swap_size=$(( $swap_max_size / 4 )) + else + echo "Not enough space left for a swap file" >&2 + local swap_size=0 + fi + + # If there's enough space for a swap, and no existing swap here + if [ $swap_size -ne 0 ] && [ ! -e /swap_$app ] + then + # Create file + truncate -s 0 /swap_$app + + # set the No_COW attribute on the swapfile with chattr + chattr +C /swap_$app + + # Preallocate space for the swap file, fallocate may sometime not be used, use dd instead in this case + if ! fallocate -l ${swap_size}K /swap_$app + then + dd if=/dev/zero of=/swap_$app bs=1024 count=${swap_size} + fi + chmod 0600 /swap_$app + # Create the swap + mkswap /swap_$app + # And activate it + swapon /swap_$app + # Then add an entry in fstab to load this swap at each boot. + echo -e "/swap_$app swap swap defaults 0 0 #Swap added by $app" >> /etc/fstab + fi +} + +ynh_del_swap () { + # If there a swap at this place + if [ -e /swap_$app ] + then + # Clean the fstab + sed -i "/#Swap added by $app/d" /etc/fstab + # Desactive the swap file + swapoff /swap_$app + # And remove it + rm /swap_$app + fi +} + +# Check if the device of the main mountpoint "/" is an SD card +# +# [internal] +# +# return 0 if it's an SD card, else 1 +ynh_is_main_device_a_sd_card () { + if [ "$(systemd-detect-virt)" != "none" ]; then + # Assume virtualization does not take place on SD card + return 1 + fi + + local main_device=$(lsblk --output PKNAME --noheadings $(findmnt / --nofsroot --uniq --output source --noheadings --first-only)) + + if echo $main_device | grep --quiet "mmc" && [ $(tail -n1 /sys/block/$main_device/queue/rotational) == "0" ] + then + return 0 + else + return 1 + fi +} + +# Check available space before creating a temp directory. +# +# usage: ynh_smart_mktemp --min_size="Min size" +# +# | arg: -s, --min_size= - Minimal size needed for the temporary directory, in Mb +ynh_smart_mktemp () { + # Declare an array to define the options of this helper. + declare -Ar args_array=( [s]=min_size= ) + local min_size + # Manage arguments with getopts + ynh_handle_getopts_args "$@" + + min_size="${min_size:-300}" + # Transform the minimum size from megabytes to kilobytes + min_size=$(( $min_size * 1024 )) + + # Check if there's enough free space in a directory + is_there_enough_space () { + local free_space=$(df --output=avail "$1" | sed 1d) + test $free_space -ge $min_size + } + + if is_there_enough_space /tmp; then + local tmpdir=/tmp + elif is_there_enough_space /var; then + local tmpdir=/var + elif is_there_enough_space /; then + local tmpdir=/ + elif is_there_enough_space /home; then + local tmpdir=/home + else + ynh_die "Insufficient free space to continue..." + fi + + echo "$(mktemp --directory --tmpdir="$tmpdir")" +}