Merge pull request #1377 from YunoHost/rework-dir-topology

Rework dir topology
This commit is contained in:
Alexandre Aubin 2021-11-15 03:34:47 +01:00 committed by GitHub
commit f824d9e0ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
211 changed files with 193 additions and 204 deletions

View file

@ -1,2 +1,2 @@
[report]
omit=src/yunohost/tests/*,src/yunohost/vendor/*,/usr/lib/moulinette/yunohost/*
omit=src/tests/*,src/vendor/*,/usr/lib/moulinette/yunohost/*

4
.gitignore vendored
View file

@ -31,7 +31,7 @@ pip-log.txt
.mr.developer.cfg
# moulinette lib
src/yunohost/locales
src/locales
# Test
src/yunohost/tests/apps
src/tests/apps

View file

@ -12,7 +12,7 @@
- *install_debs
cache:
paths:
- src/yunohost/tests/apps
- src/tests/apps
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
needs:
- job: build-yunohost
@ -37,7 +37,7 @@ full-tests:
- *install_debs
- yunohost tools postinstall -d domain.tld -p the_password --ignore-dyndns --force-diskspace
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
- bash test_helpers.sh
needs:
@ -58,8 +58,8 @@ test-i18n-keys:
only:
changes:
- locales/en.json
- src/yunohost/*.py
- data/hooks/diagnosis/*.py
- src/*.py
- src/diagnosis/*.py
test-translation-format-consistency:
extends: .test-stage
@ -75,7 +75,7 @@ test-actionmap:
- python3 -m pytest tests/test_actionmap.py
only:
changes:
- data/actionsmap/*.yml
- share/actionsmap.yml
test-helpers:
extends: .test-stage
@ -84,126 +84,126 @@ test-helpers:
- bash test_helpers.sh
only:
changes:
- data/helpers.d/*
- helpers/*
test-domains:
extends: .test-stage
script:
- python3 -m pytest src/yunohost/tests/test_domains.py
- python3 -m pytest src/tests/test_domains.py
only:
changes:
- src/yunohost/domain.py
- src/domain.py
test-dns:
extends: .test-stage
script:
- python3 -m pytest src/yunohost/tests/test_dns.py
- python3 -m pytest src/tests/test_dns.py
only:
changes:
- src/yunohost/dns.py
- src/yunohost/utils/dns.py
- src/dns.py
- src/utils/dns.py
test-apps:
extends: .test-stage
script:
- python3 -m pytest src/yunohost/tests/test_apps.py
- python3 -m pytest src/tests/test_apps.py
only:
changes:
- src/yunohost/app.py
- src/app.py
test-appscatalog:
extends: .test-stage
script:
- python3 -m pytest src/yunohost/tests/test_app_catalog.py
- python3 -m pytest src/tests/test_app_catalog.py
only:
changes:
- src/yunohost/app_calalog.py
- src/app_calalog.py
test-appurl:
extends: .test-stage
script:
- python3 -m pytest src/yunohost/tests/test_appurl.py
- python3 -m pytest src/tests/test_appurl.py
only:
changes:
- src/yunohost/app.py
- src/app.py
test-questions:
extends: .test-stage
script:
- python3 -m pytest src/yunohost/tests/test_questions.py
- python3 -m pytest src/tests/test_questions.py
only:
changes:
- src/yunohost/utils/config.py
- src/utils/config.py
test-app-config:
extends: .test-stage
script:
- python3 -m pytest src/yunohost/tests/test_app_config.py
- python3 -m pytest src/tests/test_app_config.py
only:
changes:
- src/yunohost/app.py
- src/yunohost/utils/config.py
- src/app.py
- src/utils/config.py
test-changeurl:
extends: .test-stage
script:
- python3 -m pytest src/yunohost/tests/test_changeurl.py
- python3 -m pytest src/tests/test_changeurl.py
only:
changes:
- src/yunohost/app.py
- src/app.py
test-backuprestore:
extends: .test-stage
script:
- python3 -m pytest src/yunohost/tests/test_backuprestore.py
- python3 -m pytest src/tests/test_backuprestore.py
only:
changes:
- src/yunohost/backup.py
- src/backup.py
test-permission:
extends: .test-stage
script:
- python3 -m pytest src/yunohost/tests/test_permission.py
- python3 -m pytest src/tests/test_permission.py
only:
changes:
- src/yunohost/permission.py
- src/permission.py
test-settings:
extends: .test-stage
script:
- python3 -m pytest src/yunohost/tests/test_settings.py
- python3 -m pytest src/tests/test_settings.py
only:
changes:
- src/yunohost/settings.py
- src/settings.py
test-user-group:
extends: .test-stage
script:
- python3 -m pytest src/yunohost/tests/test_user-group.py
- python3 -m pytest src/tests/test_user-group.py
only:
changes:
- src/yunohost/user.py
- src/user.py
test-regenconf:
extends: .test-stage
script:
- python3 -m pytest src/yunohost/tests/test_regenconf.py
- python3 -m pytest src/tests/test_regenconf.py
only:
changes:
- src/yunohost/regenconf.py
- src/regenconf.py
test-service:
extends: .test-stage
script:
- python3 -m pytest src/yunohost/tests/test_service.py
- python3 -m pytest src/tests/test_service.py
only:
changes:
- src/yunohost/service.py
- src/service.py
test-ldapauth:
extends: .test-stage
script:
- python3 -m pytest src/yunohost/tests/test_ldapauth.py
- python3 -m pytest src/tests/test_ldapauth.py
only:
changes:
- src/yunohost/authenticators/*.py
- src/authenticators/*.py

View file

@ -23,7 +23,7 @@ ssl_cert = </etc/yunohost/certs/{{ main_domain }}/crt.pem
ssl_key = </etc/yunohost/certs/{{ main_domain }}/key.pem
# 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
ssl_min_protocol = TLSv1.2

View file

@ -18,7 +18,7 @@ ssl_prefer_server_ciphers off;
# Pre-defined FFDHE group (RFC 7919)
# From https://ssl-config.mozilla.org/ffdhe2048.txt
# https://security.stackexchange.com/a/149818
ssl_dhparam /usr/share/yunohost/other/ffdhe2048.pem;
ssl_dhparam /usr/share/yunohost/ffdhe2048.pem;
{% endif %}

View file

@ -36,7 +36,7 @@ smtpd_tls_mandatory_ciphers = medium
# curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam.pem
# 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
{% else %}

11
debian/install vendored
View file

@ -1,7 +1,10 @@
bin/* /usr/bin/
data/* /usr/share/yunohost/
data/bash-completion.d/yunohost /etc/bash_completion.d/
share/* /usr/share/yunohost/
hooks/* /usr/share/yunohost/hooks/
helpers/* /usr/share/yunohost/helpers.d/
conf/* /usr/share/yunohost/conf/
doc/yunohost.8.gz /usr/share/man/man8/
lib/metronome/modules/* /usr/lib/metronome/modules/
doc/bash-completion.sh /etc/bash_completion.d/yunohost
conf/metronome/modules/* /usr/lib/metronome/modules/
locales/* /usr/lib/moulinette/yunohost/locales/
src/yunohost /usr/lib/moulinette
src/ /usr/lib/moulinette/yunohost

2
debian/rules vendored
View file

@ -6,7 +6,7 @@
override_dh_auto_build:
# 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
override_dh_installinit:

View file

@ -12,9 +12,8 @@ import os
import yaml
THIS_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
ACTIONSMAP_FILE = THIS_SCRIPT_DIR + "/yunohost.yml"
os.system(f"mkdir {THIS_SCRIPT_DIR}/../bash-completion.d")
BASH_COMPLETION_FILE = THIS_SCRIPT_DIR + "/../bash-completion.d/yunohost"
ACTIONSMAP_FILE = THIS_SCRIPT_DIR + "/../share/actionsmap.yml"
BASH_COMPLETION_FILE = THIS_SCRIPT_DIR + "/bash-completion.sh"
def get_dict_actions(OPTION_SUBTREE, category):

View file

@ -217,7 +217,7 @@ def malformed_error(line_number):
def main():
helper_files = sorted(glob.glob("../data/helpers.d/*"))
helper_files = sorted(glob.glob("../helpers/*"))
helpers = []
for helper_file in helper_files:

View file

@ -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__))
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):

View file

@ -52,7 +52,7 @@ Doc auto-generated by [this script](https://github.com/YunoHost/yunohost/blob/{{
{{ h.details }}
{%- 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]
----------------
{% endfor %}

Some files were not shown because too many files have changed in this diff Show more