mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Propagate dir structure change to scripts etc
This commit is contained in:
parent
5de9e4fe6a
commit
05f25fa85f
38 changed files with 113 additions and 111 deletions
|
@ -1,2 +1,2 @@
|
||||||
[report]
|
[report]
|
||||||
omit=src/yunohost/tests/*,src/yunohost/vendor/*,/usr/lib/moulinette/yunohost/*
|
omit=src/tests/*,src/vendor/*,/usr/lib/moulinette/yunohost/*
|
||||||
|
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -31,7 +31,7 @@ pip-log.txt
|
||||||
.mr.developer.cfg
|
.mr.developer.cfg
|
||||||
|
|
||||||
# moulinette lib
|
# moulinette lib
|
||||||
src/yunohost/locales
|
src/locales
|
||||||
|
|
||||||
# Test
|
# Test
|
||||||
src/yunohost/tests/apps
|
src/tests/apps
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
- *install_debs
|
- *install_debs
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- src/yunohost/tests/apps
|
- src/tests/apps
|
||||||
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
|
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
|
||||||
needs:
|
needs:
|
||||||
- job: build-yunohost
|
- job: build-yunohost
|
||||||
|
@ -36,7 +36,7 @@ full-tests:
|
||||||
- *install_debs
|
- *install_debs
|
||||||
- yunohost tools postinstall -d domain.tld -p the_password --ignore-dyndns --force-diskspace
|
- yunohost tools postinstall -d domain.tld -p the_password --ignore-dyndns --force-diskspace
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest --cov=yunohost tests/ src/yunohost/tests/ data/hooks/diagnosis/ --junitxml=report.xml
|
- python3 -m pytest --cov=yunohost tests/ src/tests/ src/diagnosis/ --junitxml=report.xml
|
||||||
- cd tests
|
- cd tests
|
||||||
- bash test_helpers.sh
|
- bash test_helpers.sh
|
||||||
needs:
|
needs:
|
||||||
|
@ -57,8 +57,8 @@ test-i18n-keys:
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- locales/en.json
|
- locales/en.json
|
||||||
- src/yunohost/*.py
|
- src/*.py
|
||||||
- data/hooks/diagnosis/*.py
|
- src/diagnosis/*.py
|
||||||
|
|
||||||
test-translation-format-consistency:
|
test-translation-format-consistency:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
|
@ -74,7 +74,7 @@ test-actionmap:
|
||||||
- python3 -m pytest tests/test_actionmap.py
|
- python3 -m pytest tests/test_actionmap.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- data/actionsmap/*.yml
|
- share/actionsmap.yml
|
||||||
|
|
||||||
test-helpers:
|
test-helpers:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
|
@ -83,126 +83,126 @@ test-helpers:
|
||||||
- bash test_helpers.sh
|
- bash test_helpers.sh
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- data/helpers.d/*
|
- helpers/*
|
||||||
|
|
||||||
test-domains:
|
test-domains:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest src/yunohost/tests/test_domains.py
|
- python3 -m pytest src/tests/test_domains.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- src/yunohost/domain.py
|
- src/domain.py
|
||||||
|
|
||||||
test-dns:
|
test-dns:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest src/yunohost/tests/test_dns.py
|
- python3 -m pytest src/tests/test_dns.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- src/yunohost/dns.py
|
- src/dns.py
|
||||||
- src/yunohost/utils/dns.py
|
- src/utils/dns.py
|
||||||
|
|
||||||
test-apps:
|
test-apps:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest src/yunohost/tests/test_apps.py
|
- python3 -m pytest src/tests/test_apps.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- src/yunohost/app.py
|
- src/app.py
|
||||||
|
|
||||||
test-appscatalog:
|
test-appscatalog:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest src/yunohost/tests/test_app_catalog.py
|
- python3 -m pytest src/tests/test_app_catalog.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- src/yunohost/app_calalog.py
|
- src/app_calalog.py
|
||||||
|
|
||||||
test-appurl:
|
test-appurl:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest src/yunohost/tests/test_appurl.py
|
- python3 -m pytest src/tests/test_appurl.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- src/yunohost/app.py
|
- src/app.py
|
||||||
|
|
||||||
test-questions:
|
test-questions:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest src/yunohost/tests/test_questions.py
|
- python3 -m pytest src/tests/test_questions.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- src/yunohost/utils/config.py
|
- src/utils/config.py
|
||||||
|
|
||||||
test-app-config:
|
test-app-config:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest src/yunohost/tests/test_app_config.py
|
- python3 -m pytest src/tests/test_app_config.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- src/yunohost/app.py
|
- src/app.py
|
||||||
- src/yunohost/utils/config.py
|
- src/utils/config.py
|
||||||
|
|
||||||
test-changeurl:
|
test-changeurl:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest src/yunohost/tests/test_changeurl.py
|
- python3 -m pytest src/tests/test_changeurl.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- src/yunohost/app.py
|
- src/app.py
|
||||||
|
|
||||||
test-backuprestore:
|
test-backuprestore:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest src/yunohost/tests/test_backuprestore.py
|
- python3 -m pytest src/tests/test_backuprestore.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- src/yunohost/backup.py
|
- src/backup.py
|
||||||
|
|
||||||
test-permission:
|
test-permission:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest src/yunohost/tests/test_permission.py
|
- python3 -m pytest src/tests/test_permission.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- src/yunohost/permission.py
|
- src/permission.py
|
||||||
|
|
||||||
test-settings:
|
test-settings:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest src/yunohost/tests/test_settings.py
|
- python3 -m pytest src/tests/test_settings.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- src/yunohost/settings.py
|
- src/settings.py
|
||||||
|
|
||||||
test-user-group:
|
test-user-group:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest src/yunohost/tests/test_user-group.py
|
- python3 -m pytest src/tests/test_user-group.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- src/yunohost/user.py
|
- src/user.py
|
||||||
|
|
||||||
test-regenconf:
|
test-regenconf:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest src/yunohost/tests/test_regenconf.py
|
- python3 -m pytest src/tests/test_regenconf.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- src/yunohost/regenconf.py
|
- src/regenconf.py
|
||||||
|
|
||||||
test-service:
|
test-service:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest src/yunohost/tests/test_service.py
|
- python3 -m pytest src/tests/test_service.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- src/yunohost/service.py
|
- src/service.py
|
||||||
|
|
||||||
test-ldapauth:
|
test-ldapauth:
|
||||||
extends: .test-stage
|
extends: .test-stage
|
||||||
script:
|
script:
|
||||||
- python3 -m pytest src/yunohost/tests/test_ldapauth.py
|
- python3 -m pytest src/tests/test_ldapauth.py
|
||||||
only:
|
only:
|
||||||
changes:
|
changes:
|
||||||
- src/yunohost/authenticators/*.py
|
- src/authenticators/*.py
|
||||||
|
|
|
@ -23,7 +23,7 @@ ssl_cert = </etc/yunohost/certs/{{ main_domain }}/crt.pem
|
||||||
ssl_key = </etc/yunohost/certs/{{ main_domain }}/key.pem
|
ssl_key = </etc/yunohost/certs/{{ main_domain }}/key.pem
|
||||||
|
|
||||||
# curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam
|
# curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam
|
||||||
ssl_dh = </usr/share/yunohost/other/ffdhe2048.pem
|
ssl_dh = </usr/share/yunohost/ffdhe2048.pem
|
||||||
|
|
||||||
# intermediate configuration
|
# intermediate configuration
|
||||||
ssl_min_protocol = TLSv1.2
|
ssl_min_protocol = TLSv1.2
|
||||||
|
|
|
@ -18,7 +18,7 @@ ssl_prefer_server_ciphers off;
|
||||||
# Pre-defined FFDHE group (RFC 7919)
|
# Pre-defined FFDHE group (RFC 7919)
|
||||||
# From https://ssl-config.mozilla.org/ffdhe2048.txt
|
# From https://ssl-config.mozilla.org/ffdhe2048.txt
|
||||||
# https://security.stackexchange.com/a/149818
|
# https://security.stackexchange.com/a/149818
|
||||||
ssl_dhparam /usr/share/yunohost/other/ffdhe2048.pem;
|
ssl_dhparam /usr/share/yunohost/ffdhe2048.pem;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ smtpd_tls_mandatory_ciphers = medium
|
||||||
|
|
||||||
# curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam.pem
|
# curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam.pem
|
||||||
# not actually 1024 bits, this applies to all DHE >= 1024 bits
|
# not actually 1024 bits, this applies to all DHE >= 1024 bits
|
||||||
smtpd_tls_dh1024_param_file = /usr/share/yunohost/other/ffdhe2048.pem
|
smtpd_tls_dh1024_param_file = /usr/share/yunohost/ffdhe2048.pem
|
||||||
|
|
||||||
tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
|
tls_medium_cipherlist = ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
9
debian/install
vendored
9
debian/install
vendored
|
@ -1,7 +1,10 @@
|
||||||
bin/* /usr/bin/
|
bin/* /usr/bin/
|
||||||
data/* /usr/share/yunohost/
|
share/* /usr/share/yunohost/
|
||||||
data/bash-completion.d/yunohost /etc/bash_completion.d/
|
hooks/* /usr/share/yunohost/hooks/
|
||||||
|
helpers/* /usr/share/yunohost/helpers.d/
|
||||||
|
conf/* /usr/share/yunohost/conf/
|
||||||
doc/yunohost.8.gz /usr/share/man/man8/
|
doc/yunohost.8.gz /usr/share/man/man8/
|
||||||
|
doc/bash-completion.sh /etc/bash_completion.d/yunohost
|
||||||
lib/metronome/modules/* /usr/lib/metronome/modules/
|
lib/metronome/modules/* /usr/lib/metronome/modules/
|
||||||
locales/* /usr/lib/moulinette/yunohost/locales/
|
locales/* /usr/lib/moulinette/yunohost/locales/
|
||||||
src/yunohost /usr/lib/moulinette
|
src/ /usr/lib/moulinette/yunohost
|
||||||
|
|
2
debian/rules
vendored
2
debian/rules
vendored
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
override_dh_auto_build:
|
override_dh_auto_build:
|
||||||
# Generate bash completion file
|
# Generate bash completion file
|
||||||
python3 data/actionsmap/yunohost_completion.py
|
python3 doc/generate_bash_completion.py
|
||||||
python3 doc/generate_manpages.py --gzip --output doc/yunohost.8.gz
|
python3 doc/generate_manpages.py --gzip --output doc/yunohost.8.gz
|
||||||
|
|
||||||
override_dh_installinit:
|
override_dh_installinit:
|
||||||
|
|
|
@ -12,9 +12,8 @@ import os
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
THIS_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
THIS_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||||
ACTIONSMAP_FILE = THIS_SCRIPT_DIR + "/yunohost.yml"
|
ACTIONSMAP_FILE = THIS_SCRIPT_DIR + "/../share/actionsmap.yml"
|
||||||
os.system(f"mkdir {THIS_SCRIPT_DIR}/../bash-completion.d")
|
BASH_COMPLETION_FILE = THIS_SCRIPT_DIR + "/bash-completion.sh"
|
||||||
BASH_COMPLETION_FILE = THIS_SCRIPT_DIR + "/../bash-completion.d/yunohost"
|
|
||||||
|
|
||||||
|
|
||||||
def get_dict_actions(OPTION_SUBTREE, category):
|
def get_dict_actions(OPTION_SUBTREE, category):
|
||||||
|
|
|
@ -217,7 +217,7 @@ def malformed_error(line_number):
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
helper_files = sorted(glob.glob("../data/helpers.d/*"))
|
helper_files = sorted(glob.glob("../helpers/*"))
|
||||||
helpers = []
|
helpers = []
|
||||||
|
|
||||||
for helper_file in helper_files:
|
for helper_file in helper_files:
|
||||||
|
|
|
@ -22,7 +22,7 @@ template = Template(open(os.path.join(base_path, "manpage.template")).read())
|
||||||
|
|
||||||
|
|
||||||
THIS_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
THIS_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||||
ACTIONSMAP_FILE = os.path.join(THIS_SCRIPT_DIR, "../data/actionsmap/yunohost.yml")
|
ACTIONSMAP_FILE = os.path.join(THIS_SCRIPT_DIR, "../share/actionsmap.yml")
|
||||||
|
|
||||||
|
|
||||||
def ordered_yaml_load(stream):
|
def ordered_yaml_load(stream):
|
||||||
|
|
|
@ -52,7 +52,7 @@ Doc auto-generated by [this script](https://github.com/YunoHost/yunohost/blob/{{
|
||||||
{{ h.details }}
|
{{ h.details }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/{{ current_commit }}/data/helpers.d/{{ category }}#L{{ h.line + 1 }})
|
[Dude, show me the code!](https://github.com/YunoHost/yunohost/blob/{{ current_commit }}/helpers/{{ category }}#L{{ h.line + 1 }})
|
||||||
[/details]
|
[/details]
|
||||||
----------------
|
----------------
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -8,7 +8,7 @@ do_init_regen() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/yunohost
|
cd /usr/share/yunohost/conf/yunohost
|
||||||
|
|
||||||
[[ -d /etc/yunohost ]] || mkdir -p /etc/yunohost
|
[[ -d /etc/yunohost ]] || mkdir -p /etc/yunohost
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ do_init_regen() {
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir=$1
|
pending_dir=$1
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/yunohost
|
cd /usr/share/yunohost/conf/yunohost
|
||||||
|
|
||||||
mkdir -p $pending_dir/etc/systemd/system
|
mkdir -p $pending_dir/etc/systemd/system
|
||||||
mkdir -p $pending_dir/etc/cron.d/
|
mkdir -p $pending_dir/etc/cron.d/
|
||||||
|
|
|
@ -6,7 +6,7 @@ ssl_dir="/usr/share/yunohost/yunohost-config/ssl/yunoCA"
|
||||||
ynh_ca="/etc/yunohost/certs/yunohost.org/ca.pem"
|
ynh_ca="/etc/yunohost/certs/yunohost.org/ca.pem"
|
||||||
ynh_crt="/etc/yunohost/certs/yunohost.org/crt.pem"
|
ynh_crt="/etc/yunohost/certs/yunohost.org/crt.pem"
|
||||||
ynh_key="/etc/yunohost/certs/yunohost.org/key.pem"
|
ynh_key="/etc/yunohost/certs/yunohost.org/key.pem"
|
||||||
openssl_conf="/usr/share/yunohost/templates/ssl/openssl.cnf"
|
openssl_conf="/usr/share/yunohost/conf/ssl/openssl.cnf"
|
||||||
|
|
||||||
regen_local_ca() {
|
regen_local_ca() {
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ regen_local_ca() {
|
||||||
RANDFILE=.rnd openssl rand -hex 19 >serial
|
RANDFILE=.rnd openssl rand -hex 19 >serial
|
||||||
rm -f index.txt
|
rm -f index.txt
|
||||||
touch index.txt
|
touch index.txt
|
||||||
cp /usr/share/yunohost/templates/ssl/openssl.cnf openssl.ca.cnf
|
cp /usr/share/yunohost/conf/ssl/openssl.cnf openssl.ca.cnf
|
||||||
sed -i "s/yunohost.org/${domain}/g" openssl.ca.cnf
|
sed -i "s/yunohost.org/${domain}/g" openssl.ca.cnf
|
||||||
openssl req -x509 \
|
openssl req -x509 \
|
||||||
-new \
|
-new \
|
||||||
|
@ -57,7 +57,7 @@ do_init_regen() {
|
||||||
|
|
||||||
# Make sure this conf exists
|
# Make sure this conf exists
|
||||||
mkdir -p ${ssl_dir}
|
mkdir -p ${ssl_dir}
|
||||||
cp /usr/share/yunohost/templates/ssl/openssl.cnf ${ssl_dir}/openssl.ca.cnf
|
cp /usr/share/yunohost/conf/ssl/openssl.cnf ${ssl_dir}/openssl.ca.cnf
|
||||||
|
|
||||||
# create default certificates
|
# create default certificates
|
||||||
if [[ ! -f "$ynh_ca" ]]; then
|
if [[ ! -f "$ynh_ca" ]]; then
|
||||||
|
@ -99,7 +99,7 @@ do_init_regen() {
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir=$1
|
pending_dir=$1
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/ssl
|
cd /usr/share/yunohost/conf/ssl
|
||||||
|
|
||||||
install -D -m 644 openssl.cnf "${pending_dir}/${ssl_dir}/openssl.cnf"
|
install -D -m 644 openssl.cnf "${pending_dir}/${ssl_dir}/openssl.cnf"
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ set -e
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir=$1
|
pending_dir=$1
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/ssh
|
cd /usr/share/yunohost/conf/ssh
|
||||||
|
|
||||||
# do not listen to IPv6 if unavailable
|
# do not listen to IPv6 if unavailable
|
||||||
[[ -f /proc/net/if_inet6 ]] && ipv6_enabled=true || ipv6_enabled=false
|
[[ -f /proc/net/if_inet6 ]] && ipv6_enabled=true || ipv6_enabled=false
|
||||||
|
|
|
@ -4,8 +4,8 @@ set -e
|
||||||
|
|
||||||
tmp_backup_dir_file="/root/slapd-backup-dir.txt"
|
tmp_backup_dir_file="/root/slapd-backup-dir.txt"
|
||||||
|
|
||||||
config="/usr/share/yunohost/templates/slapd/config.ldif"
|
config="/usr/share/yunohost/conf/slapd/config.ldif"
|
||||||
db_init="/usr/share/yunohost/templates/slapd/db_init.ldif"
|
db_init="/usr/share/yunohost/conf/slapd/db_init.ldif"
|
||||||
|
|
||||||
do_init_regen() {
|
do_init_regen() {
|
||||||
if [[ $EUID -ne 0 ]]; then
|
if [[ $EUID -ne 0 ]]; then
|
||||||
|
@ -109,7 +109,7 @@ do_pre_regen() {
|
||||||
schema_dir="${ldap_dir}/schema"
|
schema_dir="${ldap_dir}/schema"
|
||||||
mkdir -p "$ldap_dir" "$schema_dir"
|
mkdir -p "$ldap_dir" "$schema_dir"
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/slapd
|
cd /usr/share/yunohost/conf/slapd
|
||||||
|
|
||||||
# copy configuration files
|
# copy configuration files
|
||||||
cp -a ldap.conf "$ldap_dir"
|
cp -a ldap.conf "$ldap_dir"
|
||||||
|
|
|
@ -10,7 +10,7 @@ do_init_regen() {
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir=$1
|
pending_dir=$1
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/nslcd
|
cd /usr/share/yunohost/conf/nslcd
|
||||||
|
|
||||||
install -D -m 644 nslcd.conf "${pending_dir}/etc/nslcd.conf"
|
install -D -m 644 nslcd.conf "${pending_dir}/etc/nslcd.conf"
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ set -e
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir=$1
|
pending_dir=$1
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/metronome
|
cd /usr/share/yunohost/conf/metronome
|
||||||
|
|
||||||
# create directories for pending conf
|
# create directories for pending conf
|
||||||
metronome_dir="${pending_dir}/etc/metronome"
|
metronome_dir="${pending_dir}/etc/metronome"
|
||||||
|
|
|
@ -10,7 +10,7 @@ do_init_regen() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/nginx
|
cd /usr/share/yunohost/conf/nginx
|
||||||
|
|
||||||
nginx_dir="/etc/nginx"
|
nginx_dir="/etc/nginx"
|
||||||
nginx_conf_dir="${nginx_dir}/conf.d"
|
nginx_conf_dir="${nginx_dir}/conf.d"
|
||||||
|
@ -47,7 +47,7 @@ do_init_regen() {
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir=$1
|
pending_dir=$1
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/nginx
|
cd /usr/share/yunohost/conf/nginx
|
||||||
|
|
||||||
nginx_dir="${pending_dir}/etc/nginx"
|
nginx_dir="${pending_dir}/etc/nginx"
|
||||||
nginx_conf_dir="${nginx_dir}/conf.d"
|
nginx_conf_dir="${nginx_dir}/conf.d"
|
||||||
|
|
|
@ -7,7 +7,7 @@ set -e
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir=$1
|
pending_dir=$1
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/postfix
|
cd /usr/share/yunohost/conf/postfix
|
||||||
|
|
||||||
postfix_dir="${pending_dir}/etc/postfix"
|
postfix_dir="${pending_dir}/etc/postfix"
|
||||||
mkdir -p "$postfix_dir"
|
mkdir -p "$postfix_dir"
|
||||||
|
|
|
@ -7,7 +7,7 @@ set -e
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir=$1
|
pending_dir=$1
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/dovecot
|
cd /usr/share/yunohost/conf/dovecot
|
||||||
|
|
||||||
dovecot_dir="${pending_dir}/etc/dovecot"
|
dovecot_dir="${pending_dir}/etc/dovecot"
|
||||||
mkdir -p "${dovecot_dir}/global_script"
|
mkdir -p "${dovecot_dir}/global_script"
|
||||||
|
|
|
@ -5,7 +5,7 @@ set -e
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir=$1
|
pending_dir=$1
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/rspamd
|
cd /usr/share/yunohost/conf/rspamd
|
||||||
|
|
||||||
install -D -m 644 metrics.local.conf \
|
install -D -m 644 metrics.local.conf \
|
||||||
"${pending_dir}/etc/rspamd/local.d/metrics.conf"
|
"${pending_dir}/etc/rspamd/local.d/metrics.conf"
|
||||||
|
|
|
@ -6,7 +6,7 @@ set -e
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir=$1
|
pending_dir=$1
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/mysql
|
cd /usr/share/yunohost/conf/mysql
|
||||||
|
|
||||||
# Nothing to do
|
# Nothing to do
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ do_init_regen() {
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir="$1"
|
pending_dir="$1"
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/mdns
|
cd /usr/share/yunohost/conf/mdns
|
||||||
mkdir -p ${pending_dir}/etc/systemd/system/
|
mkdir -p ${pending_dir}/etc/systemd/system/
|
||||||
cp yunomdns.service ${pending_dir}/etc/systemd/system/
|
cp yunomdns.service ${pending_dir}/etc/systemd/system/
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ set -e
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir=$1
|
pending_dir=$1
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/dnsmasq
|
cd /usr/share/yunohost/conf/dnsmasq
|
||||||
|
|
||||||
# create directory for pending conf
|
# create directory for pending conf
|
||||||
dnsmasq_dir="${pending_dir}/etc/dnsmasq.d"
|
dnsmasq_dir="${pending_dir}/etc/dnsmasq.d"
|
||||||
|
|
|
@ -10,7 +10,7 @@ do_init_regen() {
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir=$1
|
pending_dir=$1
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/nsswitch
|
cd /usr/share/yunohost/conf/nsswitch
|
||||||
|
|
||||||
install -D -m 644 nsswitch.conf "${pending_dir}/etc/nsswitch.conf"
|
install -D -m 644 nsswitch.conf "${pending_dir}/etc/nsswitch.conf"
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ set -e
|
||||||
do_pre_regen() {
|
do_pre_regen() {
|
||||||
pending_dir=$1
|
pending_dir=$1
|
||||||
|
|
||||||
cd /usr/share/yunohost/templates/fail2ban
|
cd /usr/share/yunohost/conf/fail2ban
|
||||||
|
|
||||||
fail2ban_dir="${pending_dir}/etc/fail2ban"
|
fail2ban_dir="${pending_dir}/etc/fail2ban"
|
||||||
mkdir -p "${fail2ban_dir}/filter.d"
|
mkdir -p "${fail2ban_dir}/filter.d"
|
||||||
|
|
|
@ -152,7 +152,7 @@ class IPDiagnoser(Diagnoser):
|
||||||
|
|
||||||
# We use the resolver file as a list of well-known, trustable (ie not google ;)) IPs that we can ping
|
# We use the resolver file as a list of well-known, trustable (ie not google ;)) IPs that we can ping
|
||||||
resolver_file = (
|
resolver_file = (
|
||||||
"/usr/share/yunohost/templates/dnsmasq/plain/resolv.dnsmasq.conf"
|
"/usr/share/yunohost/conf/dnsmasq/plain/resolv.dnsmasq.conf"
|
||||||
)
|
)
|
||||||
resolvers = [
|
resolvers = [
|
||||||
r.split(" ")[1]
|
r.split(" ")[1]
|
||||||
|
|
|
@ -14,7 +14,7 @@ from yunohost.domain import _get_maindomain, domain_list
|
||||||
from yunohost.settings import settings_get
|
from yunohost.settings import settings_get
|
||||||
from yunohost.utils.dns import dig
|
from yunohost.utils.dns import dig
|
||||||
|
|
||||||
DEFAULT_DNS_BLACKLIST = "/usr/share/yunohost/other/dnsbl_list.yml"
|
DEFAULT_DNS_BLACKLIST = "/usr/share/yunohost/dnsbl_list.yml"
|
||||||
|
|
||||||
|
|
||||||
class MailDiagnoser(Diagnoser):
|
class MailDiagnoser(Diagnoser):
|
||||||
|
|
|
@ -50,7 +50,7 @@ from yunohost.hook import hook_callback
|
||||||
|
|
||||||
logger = getActionLogger("yunohost.domain")
|
logger = getActionLogger("yunohost.domain")
|
||||||
|
|
||||||
DOMAIN_REGISTRAR_LIST_PATH = "/usr/share/yunohost/other/registrar_list.toml"
|
DOMAIN_REGISTRAR_LIST_PATH = "/usr/share/yunohost/registrar_list.toml"
|
||||||
|
|
||||||
|
|
||||||
def domain_dns_suggest(domain):
|
def domain_dns_suggest(domain):
|
||||||
|
|
|
@ -44,7 +44,7 @@ from yunohost.log import is_unit_operation
|
||||||
|
|
||||||
logger = getActionLogger("yunohost.domain")
|
logger = getActionLogger("yunohost.domain")
|
||||||
|
|
||||||
DOMAIN_CONFIG_PATH = "/usr/share/yunohost/other/config_domain.toml"
|
DOMAIN_CONFIG_PATH = "/usr/share/yunohost/config_domain.toml"
|
||||||
DOMAIN_SETTINGS_DIR = "/etc/yunohost/domains"
|
DOMAIN_SETTINGS_DIR = "/etc/yunohost/domains"
|
||||||
|
|
||||||
# Lazy dev caching to avoid re-query ldap every time we need the domain list
|
# Lazy dev caching to avoid re-query ldap every time we need the domain list
|
||||||
|
|
|
@ -48,7 +48,7 @@ from moulinette.utils.filesystem import (
|
||||||
MOULINETTE_LOCK = "/var/run/moulinette_yunohost.lock"
|
MOULINETTE_LOCK = "/var/run/moulinette_yunohost.lock"
|
||||||
|
|
||||||
SERVICES_CONF = "/etc/yunohost/services.yml"
|
SERVICES_CONF = "/etc/yunohost/services.yml"
|
||||||
SERVICES_CONF_BASE = "/usr/share/yunohost/templates/yunohost/services.yml"
|
SERVICES_CONF_BASE = "/usr/share/yunohost/conf/yunohost/services.yml"
|
||||||
|
|
||||||
logger = getActionLogger("yunohost.service")
|
logger = getActionLogger("yunohost.service")
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@ def evaluate_simple_js_expression(expr, context={}):
|
||||||
class ConfigPanel:
|
class ConfigPanel:
|
||||||
entity_type = "config"
|
entity_type = "config"
|
||||||
save_path_tpl: Union[str, None] = None
|
save_path_tpl: Union[str, None] = None
|
||||||
config_path_tpl = "/usr/share/yunohost/other/config_{entity_type}.toml"
|
config_path_tpl = "/usr/share/yunohost/config_{entity_type}.toml"
|
||||||
save_mode = "full"
|
save_mode = "full"
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
@ -36,7 +36,7 @@ SMALL_PWD_LIST = [
|
||||||
"rpi",
|
"rpi",
|
||||||
]
|
]
|
||||||
|
|
||||||
MOST_USED_PASSWORDS = "/usr/share/yunohost/other/password/100000-most-used.txt"
|
MOST_USED_PASSWORDS = "/usr/share/yunohost/password/100000-most-used-passwords.txt"
|
||||||
|
|
||||||
# Length, digits, lowers, uppers, others
|
# Length, digits, lowers, uppers, others
|
||||||
STRENGTH_LEVELS = [
|
STRENGTH_LEVELS = [
|
||||||
|
|
|
@ -24,11 +24,11 @@ def find_expected_string_keys():
|
||||||
p3 = re.compile(r"YunohostValidationError\(\n*\s*[\'\"](\w+)[\'\"]")
|
p3 = re.compile(r"YunohostValidationError\(\n*\s*[\'\"](\w+)[\'\"]")
|
||||||
p4 = re.compile(r"# i18n: [\'\"]?(\w+)[\'\"]?")
|
p4 = re.compile(r"# i18n: [\'\"]?(\w+)[\'\"]?")
|
||||||
|
|
||||||
python_files = glob.glob("src/yunohost/*.py")
|
python_files = glob.glob("src/*.py")
|
||||||
python_files.extend(glob.glob("src/yunohost/utils/*.py"))
|
python_files.extend(glob.glob("src/utils/*.py"))
|
||||||
python_files.extend(glob.glob("src/yunohost/data_migrations/*.py"))
|
python_files.extend(glob.glob("src/data_migrations/*.py"))
|
||||||
python_files.extend(glob.glob("src/yunohost/authenticators/*.py"))
|
python_files.extend(glob.glob("src/authenticators/*.py"))
|
||||||
python_files.extend(glob.glob("data/hooks/diagnosis/*.py"))
|
python_files.extend(glob.glob("src/diagnosis/*.py"))
|
||||||
python_files.append("bin/yunohost")
|
python_files.append("bin/yunohost")
|
||||||
|
|
||||||
for python_file in python_files:
|
for python_file in python_files:
|
||||||
|
@ -51,7 +51,7 @@ def find_expected_string_keys():
|
||||||
# For each diagnosis, try to find strings like "diagnosis_stuff_foo" (c.f. diagnosis summaries)
|
# For each diagnosis, try to find strings like "diagnosis_stuff_foo" (c.f. diagnosis summaries)
|
||||||
# Also we expect to have "diagnosis_description_<name>" for each diagnosis
|
# Also we expect to have "diagnosis_description_<name>" for each diagnosis
|
||||||
p3 = re.compile(r"[\"\'](diagnosis_[a-z]+_\w+)[\"\']")
|
p3 = re.compile(r"[\"\'](diagnosis_[a-z]+_\w+)[\"\']")
|
||||||
for python_file in glob.glob("data/hooks/diagnosis/*.py"):
|
for python_file in glob.glob("src/diagnosis/*.py"):
|
||||||
content = open(python_file).read()
|
content = open(python_file).read()
|
||||||
for m in p3.findall(content):
|
for m in p3.findall(content):
|
||||||
if m.endswith("_"):
|
if m.endswith("_"):
|
||||||
|
@ -63,14 +63,14 @@ def find_expected_string_keys():
|
||||||
]
|
]
|
||||||
|
|
||||||
# For each migration, expect to find "migration_description_<name>"
|
# For each migration, expect to find "migration_description_<name>"
|
||||||
for path in glob.glob("src/yunohost/data_migrations/*.py"):
|
for path in glob.glob("src/data_migrations/*.py"):
|
||||||
if "__init__" in path:
|
if "__init__" in path:
|
||||||
continue
|
continue
|
||||||
yield "migration_description_" + os.path.basename(path)[:-3]
|
yield "migration_description_" + os.path.basename(path)[:-3]
|
||||||
|
|
||||||
# For each default service, expect to find "service_description_<name>"
|
# For each default service, expect to find "service_description_<name>"
|
||||||
for service, info in yaml.safe_load(
|
for service, info in yaml.safe_load(
|
||||||
open("data/templates/yunohost/services.yml")
|
open("conf/yunohost/services.yml")
|
||||||
).items():
|
).items():
|
||||||
if info is None:
|
if info is None:
|
||||||
continue
|
continue
|
||||||
|
@ -79,7 +79,7 @@ def find_expected_string_keys():
|
||||||
# For all unit operations, expect to find "log_<name>"
|
# For all unit operations, expect to find "log_<name>"
|
||||||
# A unit operation is created either using the @is_unit_operation decorator
|
# A unit operation is created either using the @is_unit_operation decorator
|
||||||
# or using OperationLogger(
|
# or using OperationLogger(
|
||||||
cmd = "grep -hr '@is_unit_operation' src/yunohost/ -A3 2>/dev/null | grep '^def' | sed -E 's@^def (\\w+)\\(.*@\\1@g'"
|
cmd = "grep -hr '@is_unit_operation' src/ -A3 2>/dev/null | grep '^def' | sed -E 's@^def (\\w+)\\(.*@\\1@g'"
|
||||||
for funcname in (
|
for funcname in (
|
||||||
subprocess.check_output(cmd, shell=True).decode("utf-8").strip().split("\n")
|
subprocess.check_output(cmd, shell=True).decode("utf-8").strip().split("\n")
|
||||||
):
|
):
|
||||||
|
@ -94,14 +94,14 @@ def find_expected_string_keys():
|
||||||
# Global settings descriptions
|
# Global settings descriptions
|
||||||
# Will be on a line like : ("service.ssh.allow_deprecated_dsa_hostkey", {"type": "bool", ...
|
# Will be on a line like : ("service.ssh.allow_deprecated_dsa_hostkey", {"type": "bool", ...
|
||||||
p5 = re.compile(r" \(\n*\s*[\"\'](\w[\w\.]+)[\"\'],")
|
p5 = re.compile(r" \(\n*\s*[\"\'](\w[\w\.]+)[\"\'],")
|
||||||
content = open("src/yunohost/settings.py").read()
|
content = open("src/settings.py").read()
|
||||||
for m in (
|
for m in (
|
||||||
"global_settings_setting_" + s.replace(".", "_") for s in p5.findall(content)
|
"global_settings_setting_" + s.replace(".", "_") for s in p5.findall(content)
|
||||||
):
|
):
|
||||||
yield m
|
yield m
|
||||||
|
|
||||||
# Keys for the actionmap ...
|
# Keys for the actionmap ...
|
||||||
for category in yaml.safe_load(open("data/actionsmap/yunohost.yml")).values():
|
for category in yaml.safe_load(open("share/actionsmap.yml")).values():
|
||||||
if "actions" not in category.keys():
|
if "actions" not in category.keys():
|
||||||
continue
|
continue
|
||||||
for action in category["actions"].values():
|
for action in category["actions"].values():
|
||||||
|
|
|
@ -2,4 +2,4 @@ import yaml
|
||||||
|
|
||||||
|
|
||||||
def test_yaml_syntax():
|
def test_yaml_syntax():
|
||||||
yaml.safe_load(open("data/actionsmap/yunohost.yml"))
|
yaml.safe_load(open("share/actionsmap.yml"))
|
||||||
|
|
|
@ -25,11 +25,11 @@ def find_expected_string_keys():
|
||||||
p3 = re.compile(r"YunohostValidationError\(\n*\s*[\'\"](\w+)[\'\"]")
|
p3 = re.compile(r"YunohostValidationError\(\n*\s*[\'\"](\w+)[\'\"]")
|
||||||
p4 = re.compile(r"# i18n: [\'\"]?(\w+)[\'\"]?")
|
p4 = re.compile(r"# i18n: [\'\"]?(\w+)[\'\"]?")
|
||||||
|
|
||||||
python_files = glob.glob("src/yunohost/*.py")
|
python_files = glob.glob("src/*.py")
|
||||||
python_files.extend(glob.glob("src/yunohost/utils/*.py"))
|
python_files.extend(glob.glob("src/utils/*.py"))
|
||||||
python_files.extend(glob.glob("src/yunohost/data_migrations/*.py"))
|
python_files.extend(glob.glob("src/data_migrations/*.py"))
|
||||||
python_files.extend(glob.glob("src/yunohost/authenticators/*.py"))
|
python_files.extend(glob.glob("src/authenticators/*.py"))
|
||||||
python_files.extend(glob.glob("data/hooks/diagnosis/*.py"))
|
python_files.extend(glob.glob("src/diagnosis/*.py"))
|
||||||
python_files.append("bin/yunohost")
|
python_files.append("bin/yunohost")
|
||||||
|
|
||||||
for python_file in python_files:
|
for python_file in python_files:
|
||||||
|
@ -52,7 +52,7 @@ def find_expected_string_keys():
|
||||||
# For each diagnosis, try to find strings like "diagnosis_stuff_foo" (c.f. diagnosis summaries)
|
# For each diagnosis, try to find strings like "diagnosis_stuff_foo" (c.f. diagnosis summaries)
|
||||||
# Also we expect to have "diagnosis_description_<name>" for each diagnosis
|
# Also we expect to have "diagnosis_description_<name>" for each diagnosis
|
||||||
p3 = re.compile(r"[\"\'](diagnosis_[a-z]+_\w+)[\"\']")
|
p3 = re.compile(r"[\"\'](diagnosis_[a-z]+_\w+)[\"\']")
|
||||||
for python_file in glob.glob("data/hooks/diagnosis/*.py"):
|
for python_file in glob.glob("src/diagnosis/*.py"):
|
||||||
content = open(python_file).read()
|
content = open(python_file).read()
|
||||||
for m in p3.findall(content):
|
for m in p3.findall(content):
|
||||||
if m.endswith("_"):
|
if m.endswith("_"):
|
||||||
|
@ -64,14 +64,14 @@ def find_expected_string_keys():
|
||||||
]
|
]
|
||||||
|
|
||||||
# For each migration, expect to find "migration_description_<name>"
|
# For each migration, expect to find "migration_description_<name>"
|
||||||
for path in glob.glob("src/yunohost/data_migrations/*.py"):
|
for path in glob.glob("src/data_migrations/*.py"):
|
||||||
if "__init__" in path:
|
if "__init__" in path:
|
||||||
continue
|
continue
|
||||||
yield "migration_description_" + os.path.basename(path)[:-3]
|
yield "migration_description_" + os.path.basename(path)[:-3]
|
||||||
|
|
||||||
# For each default service, expect to find "service_description_<name>"
|
# For each default service, expect to find "service_description_<name>"
|
||||||
for service, info in yaml.safe_load(
|
for service, info in yaml.safe_load(
|
||||||
open("data/templates/yunohost/services.yml")
|
open("conf/yunohost/services.yml")
|
||||||
).items():
|
).items():
|
||||||
if info is None:
|
if info is None:
|
||||||
continue
|
continue
|
||||||
|
@ -80,7 +80,7 @@ def find_expected_string_keys():
|
||||||
# For all unit operations, expect to find "log_<name>"
|
# For all unit operations, expect to find "log_<name>"
|
||||||
# A unit operation is created either using the @is_unit_operation decorator
|
# A unit operation is created either using the @is_unit_operation decorator
|
||||||
# or using OperationLogger(
|
# or using OperationLogger(
|
||||||
cmd = "grep -hr '@is_unit_operation' src/yunohost/ -A3 2>/dev/null | grep '^def' | sed -E 's@^def (\\w+)\\(.*@\\1@g'"
|
cmd = "grep -hr '@is_unit_operation' src/ -A3 2>/dev/null | grep '^def' | sed -E 's@^def (\\w+)\\(.*@\\1@g'"
|
||||||
for funcname in (
|
for funcname in (
|
||||||
subprocess.check_output(cmd, shell=True).decode("utf-8").strip().split("\n")
|
subprocess.check_output(cmd, shell=True).decode("utf-8").strip().split("\n")
|
||||||
):
|
):
|
||||||
|
@ -95,14 +95,14 @@ def find_expected_string_keys():
|
||||||
# Global settings descriptions
|
# Global settings descriptions
|
||||||
# Will be on a line like : ("service.ssh.allow_deprecated_dsa_hostkey", {"type": "bool", ...
|
# Will be on a line like : ("service.ssh.allow_deprecated_dsa_hostkey", {"type": "bool", ...
|
||||||
p5 = re.compile(r" \(\n*\s*[\"\'](\w[\w\.]+)[\"\'],")
|
p5 = re.compile(r" \(\n*\s*[\"\'](\w[\w\.]+)[\"\'],")
|
||||||
content = open("src/yunohost/settings.py").read()
|
content = open("src/settings.py").read()
|
||||||
for m in (
|
for m in (
|
||||||
"global_settings_setting_" + s.replace(".", "_") for s in p5.findall(content)
|
"global_settings_setting_" + s.replace(".", "_") for s in p5.findall(content)
|
||||||
):
|
):
|
||||||
yield m
|
yield m
|
||||||
|
|
||||||
# Keys for the actionmap ...
|
# Keys for the actionmap ...
|
||||||
for category in yaml.safe_load(open("data/actionsmap/yunohost.yml")).values():
|
for category in yaml.safe_load(open("src/actionsmap.yml")).values():
|
||||||
if "actions" not in category.keys():
|
if "actions" not in category.keys():
|
||||||
continue
|
continue
|
||||||
for action in category["actions"].values():
|
for action in category["actions"].values():
|
||||||
|
@ -130,13 +130,13 @@ def find_expected_string_keys():
|
||||||
yield "backup_applying_method_%s" % method
|
yield "backup_applying_method_%s" % method
|
||||||
yield "backup_method_%s_finished" % method
|
yield "backup_method_%s_finished" % method
|
||||||
|
|
||||||
registrars = toml.load(open("data/other/registrar_list.toml"))
|
registrars = toml.load(open("share/registrar_list.toml"))
|
||||||
supported_registrars = ["ovh", "gandi", "godaddy"]
|
supported_registrars = ["ovh", "gandi", "godaddy"]
|
||||||
for registrar in supported_registrars:
|
for registrar in supported_registrars:
|
||||||
for key in registrars[registrar].keys():
|
for key in registrars[registrar].keys():
|
||||||
yield f"domain_config_{key}"
|
yield f"domain_config_{key}"
|
||||||
|
|
||||||
domain_config = toml.load(open("data/other/config_domain.toml"))
|
domain_config = toml.load(open("share/config_domain.toml"))
|
||||||
for panel in domain_config.values():
|
for panel in domain_config.values():
|
||||||
if not isinstance(panel, dict):
|
if not isinstance(panel, dict):
|
||||||
continue
|
continue
|
||||||
|
|
6
tox.ini
6
tox.ini
|
@ -8,8 +8,8 @@ deps =
|
||||||
py39-black-{run,check}: black
|
py39-black-{run,check}: black
|
||||||
py39-mypy: mypy >= 0.900
|
py39-mypy: mypy >= 0.900
|
||||||
commands =
|
commands =
|
||||||
py39-lint: flake8 src doc data tests --ignore E402,E501,E203,W503 --exclude src/yunohost/vendor
|
py39-lint: flake8 src doc data tests --ignore E402,E501,E203,W503 --exclude src/vendor
|
||||||
py39-invalidcode: flake8 src data --exclude src/yunohost/tests,src/yunohost/vendor --select F,E722,W605
|
py39-invalidcode: flake8 src data --exclude src/tests,src/vendor --select F,E722,W605
|
||||||
py39-black-check: black --check --diff src doc data tests
|
py39-black-check: black --check --diff src doc data tests
|
||||||
py39-black-run: black src doc data tests
|
py39-black-run: black src doc data tests
|
||||||
py39-mypy: mypy --ignore-missing-import --install-types --non-interactive --follow-imports silent src/yunohost/ --exclude (acme_tiny|data_migrations)
|
py39-mypy: mypy --ignore-missing-import --install-types --non-interactive --follow-imports silent src/ --exclude (acme_tiny|data_migrations)
|
||||||
|
|
Loading…
Add table
Reference in a new issue