Skip to content

Commit

Permalink
Merge pull request #1 from YunoHost/dev
Browse files Browse the repository at this point in the history
fetch
  • Loading branch information
ericgaspar authored Feb 2, 2023
2 parents e73209b + 7c4c318 commit 9f60913
Show file tree
Hide file tree
Showing 97 changed files with 364 additions and 590 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ workflow:
- when: always

variables:
YNH_BUILD_DIR: "ynh-build"
YNH_BUILD_DIR: "/ynh-build"

include:
- template: Code-Quality.gitlab-ci.yml
Expand Down
10 changes: 6 additions & 4 deletions .gitlab/ci/build.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- DEBIAN_FRONTEND=noninteractive apt update
artifacts:
paths:
- $YNH_BUILD_DIR/*.deb
- ./*.deb

.build_script: &build_script
- DEBIAN_FRONTEND=noninteractive apt --assume-yes -o Dpkg::Options::="--force-confold" install devscripts --no-install-recommends
Expand All @@ -17,6 +17,8 @@
- VERSION_NIGHTLY="${VERSION}+$(date +%Y%m%d%H%M)"
- dch --package "${PACKAGE}" --force-bad-version -v "${VERSION_NIGHTLY}" -D "unstable" --force-distribution "Daily build."
- debuild --no-lintian -us -uc
- cp $YNH_BUILD_DIR/*.deb ${CI_PROJECT_DIR}/
- cd ${CI_PROJECT_DIR}

########################################
# BUILD DEB
Expand All @@ -31,7 +33,7 @@ build-yunohost:
- mkdir -p $YNH_BUILD_DIR/$PACKAGE
- cat archive.tar.gz | tar -xz -C $YNH_BUILD_DIR/$PACKAGE
- rm archive.tar.gz
- DEBIAN_FRONTEND=noninteractive apt --assume-yes -o Dpkg::Options::="--force-confold" build-dep $(pwd)/$YNH_BUILD_DIR/$PACKAGE
- DEBIAN_FRONTEND=noninteractive apt --assume-yes -o Dpkg::Options::="--force-confold" build-dep $YNH_BUILD_DIR/$PACKAGE
- *build_script


Expand All @@ -42,7 +44,7 @@ build-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
- DEBIAN_FRONTEND=noninteractive apt --assume-yes -o Dpkg::Options::="--force-confold" build-dep $(pwd)/$YNH_BUILD_DIR/$PACKAGE
- DEBIAN_FRONTEND=noninteractive apt --assume-yes -o Dpkg::Options::="--force-confold" build-dep $YNH_BUILD_DIR/$PACKAGE
- *build_script

build-moulinette:
Expand All @@ -52,5 +54,5 @@ build-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
- DEBIAN_FRONTEND=noninteractive apt --assume-yes -o Dpkg::Options::="--force-confold" build-dep $(pwd)/$YNH_BUILD_DIR/$PACKAGE
- DEBIAN_FRONTEND=noninteractive apt --assume-yes -o Dpkg::Options::="--force-confold" build-dep $YNH_BUILD_DIR/$PACKAGE
- *build_script
4 changes: 2 additions & 2 deletions .gitlab/ci/install.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ upgrade:
image: "after-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 ./$YNH_BUILD_DIR/*.deb
- DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ${CI_PROJECT_DIR}/*.deb


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 ./$YNH_BUILD_DIR/*.deb
- 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
2 changes: 1 addition & 1 deletion .gitlab/ci/test.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.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 ./$YNH_BUILD_DIR/*.deb
- 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:
Expand Down
2 changes: 1 addition & 1 deletion conf/nginx/server.tpl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ map $http_upgrade $connection_upgrade {
server {
listen 80;
listen [::]:80;
server_name {{ domain }}{% if xmpp_enabled != "True" %} xmpp-upload.{{ domain }} muc.{{ domain }}{% endif %};
server_name {{ domain }}{% if xmpp_enabled == "True" %} xmpp-upload.{{ domain }} muc.{{ domain }}{% endif %};

access_by_lua_file /usr/share/ssowat/access.lua;

Expand Down
49 changes: 49 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
yunohost (11.1.5) stable; urgency=low

- Release as stable !

- diagnosis: we can't yield an ERROR if there's no IPv6, otherwise that blocks all subsequent network-related diagnoser because of the dependency system ... (ade92e43)
- domains: fix domain_config.toml typos in conditions (480f7a43)
- certs: Don't try restarting metronome if no domain configured for it (452ba8bb)

Thanks to all contributors <3 ! (Axolotle)

-- Alexandre Aubin <[email protected]> Wed, 01 Feb 2023 20:21:56 +0100

yunohost (11.1.4.1) testing; urgency=low

- debian: don't dump upgradable apps during postinst's catalog update (82d30f02)
- ynh_setup_source: Output checksums when source is 'corrupt' ([#1578](https://github.com/yunohost/yunohost/pull/1578))
- metronome: Auto-enable/disable metronome if there's no/at least one domain configured for XMPP (c990cee6)

Thanks to all contributors <3 ! (tituspijean)

-- Alexandre Aubin <[email protected]> Wed, 01 Feb 2023 17:10:32 +0100

yunohost (11.1.4) testing; urgency=low

- settings: Add DNS exposure setting given the IP version ([#1451](https://github.com/yunohost/yunohost/pull/1451))

Thanks to all contributors <3 ! (Tagada)

-- Alexandre Aubin <[email protected]> Mon, 30 Jan 2023 16:28:56 +0100

yunohost (11.1.3.1) testing; urgency=low

- nginx: add xmpp-upload. and muc. server_name only if xmpp_enabled is enabled (c444dee4)
- [i18n] Translations updated for Arabic, Basque, French, Galician, Spanish, Turkish

Thanks to all contributors <3 ! (Alperen İsa Nalbant, ButterflyOfFire, cristian amoyao, Éric Gaspar, José M, Kayou, ppr, quiwy, xabirequejo)

-- Alexandre Aubin <[email protected]> Mon, 30 Jan 2023 15:44:30 +0100

yunohost (11.1.3) testing; urgency=low

- helpers: Include procedures in MySQL database backup ([#1570](https://github.com/yunohost/yunohost/pull/1570))
- users: be able to change the loginShell of a user ([#1538](https://github.com/yunohost/yunohost/pull/1538))
- debian: refresh catalog upon package upgrade (be5b1c1b)

Thanks to all contributors <3 ! (Éric Gaspar, Kay0u, ljf, Metin Bektas)

-- Alexandre Aubin <[email protected]> Thu, 19 Jan 2023 23:08:10 +0100

yunohost (11.1.2.2) testing; urgency=low

- Minor technical fixes (b37d4baf, 68342171)
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Package: yunohost
Essential: yes
Architecture: all
Depends: ${python3:Depends}, ${misc:Depends}
, moulinette (>= 11.0), ssowat (>= 11.0)
, moulinette (>= 11.1), ssowat (>= 11.1)
, python3-psutil, python3-requests, python3-dnspython, python3-openssl
, python3-miniupnpc, python3-dbus, python3-jinja2
, python3-toml, python3-packaging, python3-publicsuffix2
Expand Down
3 changes: 3 additions & 0 deletions debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ do_configure() {

echo "Re-diagnosing server health..."
yunohost diagnosis run --force

echo "Refreshing app catalog..."
yunohost tools update apps --output-as none || true
fi

# Trick to let yunohost handle the restart of the API,
Expand Down
13 changes: 6 additions & 7 deletions doc/generate_api_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,18 @@
import sys
import yaml
import json
import requests


def main():
""" """
with open("../share/actionsmap.yml") as f:
action_map = yaml.safe_load(f)

try:
with open("/etc/yunohost/current_host", "r") as f:
domain = f.readline().rstrip()
except IOError:
domain = requests.get("http://ip.yunohost.org").text
# try:
# with open("/etc/yunohost/current_host", "r") as f:
# domain = f.readline().rstrip()
# except IOError:
# domain = requests.get("http://ip.yunohost.org").text

with open("../debian/changelog") as f:
top_changelog = f.readline()
api_version = top_changelog[top_changelog.find("(") + 1 : top_changelog.find(")")]
Expand Down
2 changes: 0 additions & 2 deletions doc/generate_bash_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def get_dict_actions(OPTION_SUBTREE, category):


with open(ACTIONSMAP_FILE, "r") as stream:

# Getting the dictionary containning what actions are possible per category
OPTION_TREE = yaml.safe_load(stream)

Expand Down Expand Up @@ -65,7 +64,6 @@ def get_dict_actions(OPTION_SUBTREE, category):
os.makedirs(BASH_COMPLETION_FOLDER, exist_ok=True)

with open(BASH_COMPLETION_FILE, "w") as generated_file:

# header of the file
generated_file.write("#\n")
generated_file.write("# completion for yunohost\n")
Expand Down
8 changes: 0 additions & 8 deletions doc/generate_helper_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def get_current_commit():


def render(helpers):

current_commit = get_current_commit()

data = {
Expand Down Expand Up @@ -56,20 +55,17 @@ def shell_to_html(shell):

class Parser:
def __init__(self, filename):

self.filename = filename
self.file = open(filename, "r").readlines()
self.blocks = None

def parse_blocks(self):

self.blocks = []

current_reading = "void"
current_block = {"name": None, "line": -1, "comments": [], "code": []}

for i, line in enumerate(self.file):

if line.startswith("#!/bin/bash"):
continue

Expand Down Expand Up @@ -117,7 +113,6 @@ def parse_blocks(self):
current_reading = "code"

elif current_reading == "code":

if line == "}":
# We're getting out of the function
current_reading = "void"
Expand All @@ -138,7 +133,6 @@ def parse_blocks(self):
continue

def parse_block(self, b):

b["brief"] = ""
b["details"] = ""
b["usage"] = ""
Expand All @@ -164,7 +158,6 @@ def parse_block(self, b):

elif subblock.startswith("usage"):
for line in subblock.split("\n"):

if line.startswith("| arg"):
linesplit = line.split()
argname = linesplit[2]
Expand Down Expand Up @@ -216,7 +209,6 @@ def malformed_error(line_number):


def main():

helper_files = sorted(glob.glob("../helpers/*"))
helpers = []

Expand Down
1 change: 0 additions & 1 deletion doc/generate_manpages.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def main():

# man pages of "yunohost *"
with open(ACTIONSMAP_FILE, "r") as actionsmap:

# Getting the dictionary containning what actions are possible per domain
actionsmap = ordered_yaml_load(actionsmap)

Expand Down
1 change: 0 additions & 1 deletion doc/generate_resource_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
resources = sorted(AppResourceClassesByType.values(), key=lambda r: r.priority)

for klass in resources:

doc = klass.__doc__.replace("\n ", "\n")

print("")
Expand Down
2 changes: 1 addition & 1 deletion helpers/utils
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ ynh_setup_source() {
|| ynh_die --message="$out"
# Check the control sum
echo "${src_sum} ${src_filename}" | ${src_sumprg} --check --status \
|| ynh_die --message="Corrupt source"
|| ynh_die --message="Corrupt source for ${src_filename}: Expected ${src_sum} but got $(${src_sumprg} ${src_filename} | cut --delimiter=' ' --fields=1) (size: $(du -hs ${src_filename} | cut --delimiter=' ' --fields=1))."
fi

# Keep files to be backup/restored at the end of the helper
Expand Down
18 changes: 16 additions & 2 deletions hooks/conf_regen/12-metronome
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,22 @@ do_post_regen() {
chown -R metronome: /var/lib/metronome/
chown -R metronome: /etc/metronome/conf.d/

[[ -z "$regen_conf_files" ]] \
|| systemctl restart metronome
if [[ -z "$(ls /etc/metronome/conf.d/*.cfg.lua 2>/dev/null)" ]]
then
if systemctl is-enabled metronome &>/dev/null
then
systemctl disable metronome --now 2>/dev/null
fi
else
if ! systemctl is-enabled metronome &>/dev/null
then
systemctl enable metronome --now 2>/dev/null
sleep 3
fi

[[ -z "$regen_conf_files" ]] \
|| systemctl restart metronome
fi
}

do_$1_regen ${@:2}
40 changes: 28 additions & 12 deletions locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"app_not_installed": "إنّ التطبيق {app} غير مُنصَّب",
"app_not_properly_removed": "لم يتم حذف تطبيق {app} بشكلٍ جيّد",
"app_removed": "تمت إزالة تطبيق {app}",
"app_requirements_checking": "جار فحص الحزم اللازمة لـ {app}…",
"app_sources_fetch_failed": "تعذرت عملية جلب مصادر الملفات",
"app_requirements_checking": "جار فحص متطلبات تطبيق {app}…",
"app_sources_fetch_failed": "تعذر جلب ملفات المصدر ، هل عنوان URL صحيح؟",
"app_unknown": "برنامج مجهول",
"app_upgrade_app_name": "جارٍ تحديث {app}…",
"app_upgrade_failed": "تعذرت عملية ترقية {app}",
Expand Down Expand Up @@ -39,7 +39,7 @@
"done": "تم",
"downloading": "عملية التنزيل جارية …",
"dyndns_ip_updated": "لقد تم تحديث عنوان الإيبي الخاص بك على نظام أسماء النطاقات الديناميكي",
"dyndns_key_generating": "عملية توليد مفتاح نظام أسماء النطاقات جارية. يمكن للعملية أن تستغرق بعضا من الوقت",
"dyndns_key_generating": "جارٍ إنشاء مفتاح DNS ... قد يستغرق الأمر بعض الوقت.",
"dyndns_key_not_found": "لم يتم العثور على مفتاح DNS الخاص باسم النطاق هذا",
"extracting": "عملية فك الضغط جارية…",
"installation_complete": "إكتملت عملية التنصيب",
Expand All @@ -49,15 +49,15 @@
"pattern_domain": "يتوجب أن يكون إسم نطاق صالح (مثل my-domain.org)",
"pattern_email": "يتوجب أن يكون عنوان بريد إلكتروني صالح (مثل [email protected])",
"pattern_password": "يتوجب أن تكون مكونة من 3 حروف على الأقل",
"restore_extracting": "جارٍ فك الضغط عن الملفات التي نحتاجها من النسخة الاحتياطية…",
"restore_extracting": "جارٍ فك الضغط عن الملفات اللازمة من النسخة الاحتياطية…",
"server_shutdown": "سوف ينطفئ الخادوم",
"server_shutdown_confirm": "سوف ينطفئ الخادوم حالا. متأكد ؟ [{answers}]",
"server_reboot": "سيعاد تشغيل الخادوم",
"server_reboot_confirm": "سيعاد تشغيل الخادوم في الحين. هل أنت متأكد ؟ [{answers}]",
"service_add_failed": "تعذرت إضافة خدمة '{service}'",
"service_already_stopped": "إنّ خدمة '{service}' متوقفة مِن قبلُ",
"service_disabled": "لن يتم إطلاق خدمة '{service}' أثناء بداية تشغيل النظام.",
"service_enabled": "تم تنشيط خدمة '{service}'",
"service_disabled": "لن يتم إطلاق خدمة '{service}' أثناء بداية تشغيل النظام بتاتا.",
"service_enabled": "سيتم الآن بدء تشغيل الخدمة '{service}' تلقائيًا أثناء تمهيد النظام.",
"service_removed": "تمت إزالة خدمة '{service}'",
"service_started": "تم إطلاق تشغيل خدمة '{service}'",
"service_stopped": "تمّ إيقاف خدمة '{service}'",
Expand All @@ -71,10 +71,10 @@
"user_deleted": "تم حذف المستخدم",
"user_deletion_failed": "لا يمكن حذف المستخدم",
"user_unknown": "المستخدم {user} مجهول",
"user_update_failed": "لا يمكن تحديث المستخدم",
"user_updated": "تم تحديث المستخدم",
"user_update_failed": "لا يمكن تحديث المستخدم {user}: {error}",
"user_updated": "تم تحديث معلومات المستخدم",
"yunohost_installing": "عملية تنصيب واي يونوهوست جارية …",
"yunohost_not_installed": "إنَّ واي يونوهوست ليس مُنَصَّب أو هو مثبت حاليا بشكل خاطئ. قم بتنفيذ الأمر 'yunohost tools postinstall'",
"yunohost_not_installed": "إنَّ واي يونوهوست ليس مُنَصَّب بشكل جيد. فضلًا قم بتنفيذ الأمر 'yunohost tools postinstall'",
"migrations_list_conflict_pending_done": "لا يمكنك استخدام --previous و --done معًا على نفس سطر الأوامر.",
"service_description_metronome": "يُدير حسابات الدردشة الفورية XMPP",
"service_description_nginx": "يقوم بتوفير النفاذ و السماح بالوصول إلى كافة مواقع الويب المستضافة على خادومك",
Expand Down Expand Up @@ -119,7 +119,7 @@
"already_up_to_date": "كل شيء على ما يرام. ليس هناك ما يتطلّب تحديثًا.",
"service_description_slapd": "يخزّن المستخدمين والنطاقات والمعلومات المتعلقة بها",
"service_reloaded": "تم إعادة تشغيل خدمة '{service}'",
"service_restarted": "تم إعادة تشغيل خدمة '{service}'",
"service_restarted": "تم إعادة تشغيل خدمة '{service}'",
"group_unknown": "الفريق '{group}' مجهول",
"group_deletion_failed": "فشلت عملية حذف الفريق '{group}': {error}",
"group_deleted": "تم حذف الفريق '{group}'",
Expand Down Expand Up @@ -193,5 +193,21 @@
"diagnosis_ports_ok": "المنفذ {port} مفتوح ومتاح الوصول إليه مِن الخارج.",
"global_settings_setting_smtp_allow_ipv6": "سماح IPv6",
"disk_space_not_sufficient_update": "ليس هناك مساحة كافية لتحديث هذا التطبيق",
"domain_cert_gen_failed": "لا يمكن إعادة توليد الشهادة"
}
"domain_cert_gen_failed": "لا يمكن إعادة توليد الشهادة",
"diagnosis_apps_issue": "تم العثور على مشكلة في تطبيق {app}",
"tools_upgrade": "تحديث حُزم النظام",
"service_description_yunomdns": "يسمح لك بالوصول إلى خادمك الخاص باستخدام 'yunohost.local' في شبكتك المحلية",
"good_practices_about_user_password": "أنت الآن على وشك تحديد كلمة مرور مستخدم جديدة. يجب أن تتكون كلمة المرور من 8 أحرف على الأقل - على الرغم من أنه من الممارسات الجيدة استخدام كلمة مرور أطول (أي عبارة مرور) و / أو مجموعة متنوعة من الأحرف (الأحرف الكبيرة والصغيرة والأرقام والأحرف الخاصة).",
"root_password_changed": "تم تغيير كلمة مرور الجذر",
"root_password_desynchronized": "تم تغيير كلمة مرور المدير ، لكن لم يتمكن YunoHost من نشرها على كلمة مرور الجذر!",
"user_import_bad_line": "سطر غير صحيح {line}: {details}",
"user_import_success": "تم استيراد المستخدمين بنجاح",
"visitors": "الزوار",
"password_too_simple_3": "يجب أن تتكون كلمة المرور من 8 أحرف على الأقل وأن تحتوي على أرقام وأرقام علوية وسفلية وأحرف خاصة",
"password_too_simple_4": "يجب أن تتكون كلمة المرور من 12 حرفًا على الأقل وأن تحتوي على أرقام وأرقام علوية وسفلية وأحرف خاصة",
"service_unknown": "الخدمة '{service}' غير معروفة",
"unbackup_app": "لن يتم حفظ التطبيق '{app}'",
"unrestore_app": "لن يتم استعادة التطبيق '{app}'",
"yunohost_already_installed": "إنّ YunoHost مُنصّب مِن قَبل",
"hook_name_unknown": "إسم الإجراء '{name}' غير معروف"
}
Loading

0 comments on commit 9f60913

Please sign in to comment.