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] [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 .mr.developer.cfg
# moulinette lib # moulinette lib
src/yunohost/locales src/locales
# Test # Test
src/yunohost/tests/apps src/tests/apps

View file

@ -12,7 +12,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
@ -37,7 +37,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:
@ -58,8 +58,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
@ -75,7 +75,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
@ -84,126 +84,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

View file

@ -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

View file

@ -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 %}

View file

@ -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 %}

11
debian/install vendored
View file

@ -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/
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/ 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: 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:

View file

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

View file

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

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

View file

@ -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 %}

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