From 54a6a1b3d246c68e99271c17ba7893aab95859b1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 9 Dec 2023 18:26:02 +0100 Subject: [PATCH 1/8] Aleks forgot to remove pdb.set_trace ... --- src/app.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/app.py b/src/app.py index 4dd76532c..ad20b3552 100644 --- a/src/app.py +++ b/src/app.py @@ -501,10 +501,6 @@ def app_change_url(operation_logger, app, domain, path): change_url_script = os.path.join(tmp_workdir_for_app, "scripts/change_url") - import pdb - - pdb.set_trace() - # Execute App change_url script change_url_failed = True try: From 9489d200b2c663d1fbe5d437565f2ae4311e01b5 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 9 Dec 2023 18:26:43 +0100 Subject: [PATCH 2/8] Update changelog for 11.2.8.2 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 89e2231ea..97812a78f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +yunohost (11.2.8.2) stable; urgency=low + + - Aleks forgot to remove pdb.set_trace ... (54a6a1b3) + + -- Alexandre Aubin Sat, 09 Dec 2023 18:26:10 +0100 + yunohost (11.2.8.1) stable; urgency=low - apps: fix change_url again, otherwise the lack of path_url default to the old path and fucks up the nginx regen (169c9214) From 8e3e78884282e211a4ea55002e30115baee2fb93 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 10 Dec 2023 12:07:39 +0100 Subject: [PATCH 3/8] ynh_setup_source: properly handle --keep for directories when the dir already exists in the new setup --- helpers/utils | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/helpers/utils b/helpers/utils index 8b28000d6..edbdbdc3a 100644 --- a/helpers/utils +++ b/helpers/utils @@ -374,7 +374,13 @@ ynh_setup_source() { for stuff_to_keep in $keep; do if [ -e "$keep_dir/$stuff_to_keep" ]; then mkdir --parents "$(dirname "$dest_dir/$stuff_to_keep")" - cp --archive "$keep_dir/$stuff_to_keep" "$dest_dir/$stuff_to_keep" + + # We add "--no-target-directory" (short option is -T) to handle the special case + # when we "keep" a folder, but then the new setup already contains the same dir (but possibly empty) + # in which case a regular "cp" will create a copy of the directory inside the directory ... + # resulting in something like /var/www/$app/data/data instead of /var/www/$app/data + # cf https://unix.stackexchange.com/q/94831 for a more elaborate explanation on the option + cp --archive --no-target-directory "$keep_dir/$stuff_to_keep" "$dest_dir/$stuff_to_keep" fi done fi From 64c616076fd2180b7832e275019439a08bf782c4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 11 Dec 2023 11:48:55 +0100 Subject: [PATCH 4/8] i18n: fix fucked up tags --- locales/it.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/it.json b/locales/it.json index 98512df40..43a442621 100644 --- a/locales/it.json +++ b/locales/it.json @@ -300,8 +300,8 @@ "diagnosis_domain_expiration_not_found": "Non riesco a controllare la data di scadenza di alcuni domini", "diagnosis_dns_try_dyndns_update_force": "La configurazione DNS di questo dominio dovrebbe essere gestita automaticamente da YunoHost. Se non avviene, puoi provare a forzare un aggiornamento usando il comando yunohost dyndns update --force.", "diagnosis_dns_point_to_doc": "Controlla la documentazione a https://yunohost.org/dns_config se hai bisogno di aiuto nel configurare i record DNS.", - "diagnosis_dns_discrepancy": "Il record DNS non sembra seguire la configurazione DNS raccomandata:
Type: {type}
Name: {name}
Current value: {current}
Expected value: {value}", - "diagnosis_dns_missing_record": "Stando alla configurazione DNS raccomandata, dovresti aggiungere un record DNS con le seguenti informazioni.
Type: {type}
Name: {name}
Value: {value}", + "diagnosis_dns_discrepancy": "Il record DNS non sembra seguire la configurazione DNS raccomandata:
Type: {type}
Name: {name}
Current value: {current}
Expected value: {value}", + "diagnosis_dns_missing_record": "Stando alla configurazione DNS raccomandata, dovresti aggiungere un record DNS con le seguenti informazioni.
Type: {type}
Name: {name}
Value: {value}", "diagnosis_dns_bad_conf": "Alcuni record DNS sono mancanti o incorretti per il dominio {domain} (categoria {category})", "diagnosis_dns_good_conf": "I recordDNS sono configurati correttamente per il dominio {domain} (categoria {category})", "diagnosis_ip_weird_resolvconf_details": "Il file /etc/resolv.conf dovrebbe essere un symlink a /etc/resolvconf/run/resolv.conf che punta a 127.0.0.1 (dnsmasq). Se vuoi configurare manualmente i DNS, modifica /etc/resolv.dnsmasq.conf.", From 830d7b47e04835823eab0ce129671b0e11d977ab Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 13 Dec 2023 13:15:42 +0100 Subject: [PATCH 5/8] systemutils: when checking debian version and system arch, redirect stderr to /dev/null to prevent stupid issues, for example when the current working dir doesnt exist anymore.. --- src/utils/system.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/system.py b/src/utils/system.py index a169bd62c..71ed49b1d 100644 --- a/src/utils/system.py +++ b/src/utils/system.py @@ -29,11 +29,11 @@ YUNOHOST_PACKAGES = ["yunohost", "yunohost-admin", "moulinette", "ssowat"] def debian_version(): - return check_output('grep "^VERSION_CODENAME=" /etc/os-release | cut -d= -f2') + return check_output('grep "^VERSION_CODENAME=" /etc/os-release 2>/dev/null | cut -d= -f2') def system_arch(): - return check_output("dpkg --print-architecture") + return check_output("dpkg --print-architecture 2>/dev/null") def system_virt(): @@ -44,7 +44,7 @@ def system_virt(): # Detect virt technology (if not bare metal) and arch # Gotta have this "|| true" because it systemd-detect-virt return 'none' # with an error code on bare metal ~.~ - return check_output("systemd-detect-virt || true") + return check_output("systemd-detect-virt 2>/dev/null || true") def free_space_in_directory(dirpath): From c0337bf1eff2df756fcced26d55292b8903da189 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 13 Dec 2023 15:10:30 +0100 Subject: [PATCH 6/8] logs: Ignore boring java warning --- src/hook.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hook.py b/src/hook.py index 4b07d1c17..8ce5a6d0e 100644 --- a/src/hook.py +++ b/src/hook.py @@ -377,6 +377,8 @@ def hook_exec( r"pg_ctlcluster \d\d main start", r"Ver\s*Cluster\s*Port\s*Status\s*Owner\s*Data\s*directory", r"/var/lib/postgresql/\d\d/main /var/log/postgresql/postgresql-\d\d-main.log", + # Java boring messages + r"cannot open '/etc/ssl/certs/java/cacerts'", ] return all(not re.search(w, msg) for w in irrelevant_warnings) From 770fdb686138c9a05d63577e40f32343a5076e47 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Fri, 15 Dec 2023 01:23:49 +0100 Subject: [PATCH 7/8] [fix] First source patches failure doesn't stop app script --- helpers/utils | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/helpers/utils b/helpers/utils index edbdbdc3a..e16ddc70b 100644 --- a/helpers/utils +++ b/helpers/utils @@ -351,13 +351,12 @@ ynh_setup_source() { if [ -d "$YNH_APP_BASEDIR/sources/patches/" ]; then local patches_folder=$(realpath $YNH_APP_BASEDIR/sources/patches/) if (($(find $patches_folder -type f -name "${source_id}-*.patch" 2>/dev/null | wc --lines) > "0")); then - ( - cd "$dest_dir" - for p in $patches_folder/${source_id}-*.patch; do - echo $p - patch --strip=1 <$p - done - ) || ynh_die --message="Unable to apply patches" + pushd "$dest_dir" + for p in $patches_folder/${source_id}-*.patch; do + echo $p + patch --strip=1 <$p || ynh_die --message="Unable to apply patches" + done + popd fi fi From 5738526349c392249c5745d23127eb65eb0bd1c4 Mon Sep 17 00:00:00 2001 From: YapWC <34093361+YapWC@users.noreply.github.com> Date: Tue, 19 Dec 2023 10:13:03 +0800 Subject: [PATCH 8/8] Update user.py Allowed dots to be used in creating username --- src/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user.py b/src/user.py index 00876854e..4ad23525a 100644 --- a/src/user.py +++ b/src/user.py @@ -38,7 +38,7 @@ from yunohost.utils.system import binary_to_human logger = getActionLogger("yunohost.user") FIELDS_FOR_IMPORT = { - "username": r"^[a-z0-9_]+$", + "username": r"^[a-z0-9_.]+$", "firstname": r"^([^\W\d_]{1,30}[ ,.\'-]{0,3})+$", "lastname": r"^([^\W\d_]{1,30}[ ,.\'-]{0,3})+$", "password": r"^|(.{3,})$",