From 5de9e4fe6a2da619d1def5e91bd3ee30b53faddd Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 10 Nov 2021 17:56:02 +0100 Subject: [PATCH 1/6] Yolorework the repo dir structure --- {data/templates => conf}/dnsmasq/domain.tpl | 0 {data/templates => conf}/dnsmasq/plain/dnsmasq.conf | 0 {data/templates => conf}/dnsmasq/plain/etcdefault | 0 .../dnsmasq/plain/resolv.dnsmasq.conf | 0 {data/templates => conf}/dovecot/dovecot-ldap.conf | 0 {data/templates => conf}/dovecot/dovecot.conf | 0 {data/templates => conf}/dovecot/dovecot.sieve | 0 {data/templates => conf}/dovecot/post-ext.conf | 0 {data/templates => conf}/dovecot/pre-ext.conf | 0 {data/templates => conf}/fail2ban/jail.conf | 0 .../templates => conf}/fail2ban/yunohost-jails.conf | 0 {data/templates => conf}/fail2ban/yunohost.conf | 0 {data/templates => conf}/mdns/yunomdns.service | 0 .../templates => conf}/metronome/domain.tpl.cfg.lua | 0 .../templates => conf}/metronome/metronome.cfg.lua | 0 {lib => conf}/metronome/modules/ldap.lib.lua | 0 {lib => conf}/metronome/modules/mod_auth_ldap2.lua | 0 {lib => conf}/metronome/modules/mod_legacyauth.lua | 0 .../metronome/modules/mod_storage_ldap.lua | 0 {lib => conf}/metronome/modules/vcard.lib.lua | 0 {data/templates => conf}/nginx/autoconfig.tpl.xml | 0 .../nginx/plain/acme-challenge.conf.inc | 0 {data/templates => conf}/nginx/plain/global.conf | 0 {data/templates => conf}/nginx/plain/ssowat.conf | 0 .../nginx/plain/yunohost_panel.conf.inc | 0 .../nginx/plain/yunohost_sso.conf.inc | 0 .../templates => conf}/nginx/redirect_to_admin.conf | 0 {data/templates => conf}/nginx/security.conf.inc | 0 {data/templates => conf}/nginx/server.tpl.conf | 0 {data/templates => conf}/nginx/yunohost_admin.conf | 0 .../nginx/yunohost_admin.conf.inc | 0 .../templates => conf}/nginx/yunohost_api.conf.inc | 0 {data/templates => conf}/nslcd/nslcd.conf | 0 {data/templates => conf}/nsswitch/nsswitch.conf | 0 {data/templates => conf}/postfix/main.cf | 0 .../templates => conf}/postfix/plain/header_checks | 0 .../postfix/plain/ldap-accounts.cf | 0 .../postfix/plain/ldap-aliases.cf | 0 .../postfix/plain/ldap-domains.cf | 0 {data/templates => conf}/postfix/plain/master.cf | 0 .../postfix/plain/sender_canonical | 0 .../postfix/plain/smtp_reply_filter | 0 {data/templates => conf}/postfix/postsrsd | 0 {data/templates => conf}/rspamd/dkim_signing.conf | 0 {data/templates => conf}/rspamd/metrics.local.conf | 0 {data/templates => conf}/rspamd/milter_headers.conf | 0 {data/templates => conf}/rspamd/rspamd.sieve | 0 {data/templates => conf}/slapd/config.ldif | 0 {data/templates => conf}/slapd/db_init.ldif | 0 {data/templates => conf}/slapd/ldap.conf | 0 {data/templates => conf}/slapd/mailserver.ldif | 0 {data/templates => conf}/slapd/permission.ldif | 0 {data/templates => conf}/slapd/slapd.default | 0 {data/templates => conf}/slapd/sudo.ldif | 0 .../templates => conf}/slapd/systemd-override.conf | 0 {data/templates => conf}/ssh/sshd_config | 0 {data/templates => conf}/ssl/openssl.cnf | 0 {data/templates => conf}/yunohost/dpkg-origins | 0 {data/templates => conf}/yunohost/firewall.yml | 0 .../yunohost/proc-hidepid.service | 0 {data/templates => conf}/yunohost/services.yml | 0 .../templates => conf}/yunohost/yunoprompt.service | 0 .../generate_bash_completion.py | 0 {data/helpers.d => helpers}/apt | 0 {data/helpers.d => helpers}/backup | 0 {data/helpers.d => helpers}/config | 0 {data/helpers.d => helpers}/fail2ban | 0 {data/helpers.d => helpers}/getopts | 0 {data/helpers.d => helpers}/hardware | 0 {data/helpers.d => helpers}/logging | 0 {data/helpers.d => helpers}/logrotate | 0 {data/helpers.d => helpers}/multimedia | 0 {data/helpers.d => helpers}/mysql | 0 {data/helpers.d => helpers}/network | 0 {data/helpers.d => helpers}/nginx | 0 {data/helpers.d => helpers}/nodejs | 0 {data/helpers.d => helpers}/permission | 0 {data/helpers.d => helpers}/php | 0 {data/helpers.d => helpers}/postgresql | 0 {data/helpers.d => helpers}/setting | 0 {data/helpers.d => helpers}/string | 0 {data/helpers.d => helpers}/systemd | 0 {data/helpers.d => helpers}/user | 0 {data/helpers.d => helpers}/utils | 0 {data/hooks => hooks}/backup/05-conf_ldap | 0 {data/hooks => hooks}/backup/17-data_home | 0 {data/hooks => hooks}/backup/18-data_multimedia | 0 {data/hooks => hooks}/backup/20-conf_ynh_settings | 0 {data/hooks => hooks}/backup/21-conf_ynh_certs | 0 {data/hooks => hooks}/backup/23-data_mail | 0 {data/hooks => hooks}/backup/27-data_xmpp | 0 .../backup/50-conf_manually_modified_files | 0 {data/hooks => hooks}/conf_regen/01-yunohost | 0 {data/hooks => hooks}/conf_regen/02-ssl | 0 {data/hooks => hooks}/conf_regen/03-ssh | 0 {data/hooks => hooks}/conf_regen/06-slapd | 0 {data/hooks => hooks}/conf_regen/09-nslcd | 0 {data/hooks => hooks}/conf_regen/10-apt | 0 {data/hooks => hooks}/conf_regen/12-metronome | 0 {data/hooks => hooks}/conf_regen/15-nginx | 0 {data/hooks => hooks}/conf_regen/19-postfix | 0 {data/hooks => hooks}/conf_regen/25-dovecot | 0 {data/hooks => hooks}/conf_regen/31-rspamd | 0 {data/hooks => hooks}/conf_regen/34-mysql | 0 {data/hooks => hooks}/conf_regen/35-redis | 0 {data/hooks => hooks}/conf_regen/37-mdns | 0 {data/hooks => hooks}/conf_regen/43-dnsmasq | 0 {data/hooks => hooks}/conf_regen/46-nsswitch | 0 {data/hooks => hooks}/conf_regen/52-fail2ban | 0 .../hooks => hooks}/post_user_create/ynh_multimedia | 0 .../hooks => hooks}/post_user_delete/ynh_multimedia | 0 {data/hooks => hooks}/restore/05-conf_ldap | 0 {data/hooks => hooks}/restore/17-data_home | 0 {data/hooks => hooks}/restore/18-data_multimedia | 0 {data/hooks => hooks}/restore/20-conf_ynh_settings | 0 {data/hooks => hooks}/restore/21-conf_ynh_certs | 0 {data/hooks => hooks}/restore/23-data_mail | 0 {data/hooks => hooks}/restore/27-data_xmpp | 0 .../restore/50-conf_manually_modified_files | 0 .../100000-most-used-passwords.txt.gz | Bin .../actionsmap/yunohost.yml => share/actionsmap.yml | 0 {data/other => share}/config_domain.toml | 0 {data/other => share}/dnsbl_list.yml | 0 {data/other => share}/ffdhe2048.pem | 0 {data => share}/helpers | 0 {data/other => share}/registrar_list.toml | 0 src/{yunohost => }/__init__.py | 0 src/{yunohost => }/app.py | 0 src/{yunohost => }/app_catalog.py | 0 src/{yunohost => }/authenticators/ldap_admin.py | 0 src/{yunohost => }/backup.py | 0 src/{yunohost => }/certificate.py | 0 .../data_migrations/0021_migrate_to_bullseye.py | 0 .../data_migrations/0022_php73_to_php74_pools.py | 0 .../data_migrations/0023_postgresql_11_to_13.py | 0 src/{yunohost => }/data_migrations/__init__.py | 0 src/{yunohost => }/diagnosis.py | 0 {data/hooks => src}/diagnosis/00-basesystem.py | 0 {data/hooks => src}/diagnosis/10-ip.py | 0 {data/hooks => src}/diagnosis/12-dnsrecords.py | 0 {data/hooks => src}/diagnosis/14-ports.py | 0 {data/hooks => src}/diagnosis/21-web.py | 0 {data/hooks => src}/diagnosis/24-mail.py | 0 {data/hooks => src}/diagnosis/30-services.py | 0 {data/hooks => src}/diagnosis/50-systemresources.py | 0 {data/hooks => src}/diagnosis/70-regenconf.py | 0 {data/hooks => src}/diagnosis/80-apps.py | 0 src/{yunohost => }/dns.py | 0 src/{yunohost => }/domain.py | 0 src/{yunohost => }/dyndns.py | 0 src/{yunohost => }/firewall.py | 0 src/{yunohost => }/hook.py | 0 src/{yunohost => }/log.py | 0 src/{yunohost => }/permission.py | 0 src/{yunohost => }/regenconf.py | 0 src/{yunohost => }/service.py | 0 src/{yunohost => }/settings.py | 0 src/{yunohost => }/ssh.py | 0 src/{yunohost => }/tests/__init__.py | 0 src/{yunohost => }/tests/conftest.py | 0 src/{yunohost => }/tests/test_app_catalog.py | 0 src/{yunohost => }/tests/test_app_config.py | 0 src/{yunohost => }/tests/test_apps.py | 0 src/{yunohost => }/tests/test_appurl.py | 0 src/{yunohost => }/tests/test_backuprestore.py | 0 src/{yunohost => }/tests/test_changeurl.py | 0 src/{yunohost => }/tests/test_dns.py | 0 src/{yunohost => }/tests/test_domains.py | 0 src/{yunohost => }/tests/test_ldapauth.py | 0 src/{yunohost => }/tests/test_permission.py | 0 src/{yunohost => }/tests/test_questions.py | 0 src/{yunohost => }/tests/test_regenconf.py | 0 src/{yunohost => }/tests/test_service.py | 0 src/{yunohost => }/tests/test_settings.py | 0 src/{yunohost => }/tests/test_user-group.py | 0 src/{yunohost => }/tools.py | 0 src/{yunohost => }/user.py | 0 src/{yunohost => }/utils/__init__.py | 0 src/{yunohost => }/utils/config.py | 0 src/{yunohost => }/utils/dns.py | 0 src/{yunohost => }/utils/error.py | 0 src/{yunohost => }/utils/filesystem.py | 0 src/{yunohost => }/utils/i18n.py | 0 src/{yunohost => }/utils/ldap.py | 0 src/{yunohost => }/utils/legacy.py | 0 src/{yunohost => }/utils/network.py | 0 src/{yunohost => }/utils/packages.py | 0 src/{yunohost => }/utils/password.py | 0 src/{yunohost => }/utils/yunopaste.py | 0 src/{yunohost => }/vendor/__init__.py | 0 src/{yunohost => }/vendor/acme_tiny/__init__.py | 0 src/{yunohost => }/vendor/acme_tiny/acme_tiny.py | 0 .../vendor/spectre-meltdown-checker/Dockerfile | 0 .../vendor/spectre-meltdown-checker/LICENSE | 0 .../vendor/spectre-meltdown-checker/README.md | 0 .../spectre-meltdown-checker/docker-compose.yml | 0 .../spectre-meltdown-checker.sh | 0 197 files changed, 0 insertions(+), 0 deletions(-) rename {data/templates => conf}/dnsmasq/domain.tpl (100%) rename {data/templates => conf}/dnsmasq/plain/dnsmasq.conf (100%) rename {data/templates => conf}/dnsmasq/plain/etcdefault (100%) rename {data/templates => conf}/dnsmasq/plain/resolv.dnsmasq.conf (100%) rename {data/templates => conf}/dovecot/dovecot-ldap.conf (100%) rename {data/templates => conf}/dovecot/dovecot.conf (100%) rename {data/templates => conf}/dovecot/dovecot.sieve (100%) rename {data/templates => conf}/dovecot/post-ext.conf (100%) rename {data/templates => conf}/dovecot/pre-ext.conf (100%) rename {data/templates => conf}/fail2ban/jail.conf (100%) rename {data/templates => conf}/fail2ban/yunohost-jails.conf (100%) rename {data/templates => conf}/fail2ban/yunohost.conf (100%) rename {data/templates => conf}/mdns/yunomdns.service (100%) rename {data/templates => conf}/metronome/domain.tpl.cfg.lua (100%) rename {data/templates => conf}/metronome/metronome.cfg.lua (100%) rename {lib => conf}/metronome/modules/ldap.lib.lua (100%) rename {lib => conf}/metronome/modules/mod_auth_ldap2.lua (100%) rename {lib => conf}/metronome/modules/mod_legacyauth.lua (100%) rename {lib => conf}/metronome/modules/mod_storage_ldap.lua (100%) rename {lib => conf}/metronome/modules/vcard.lib.lua (100%) rename {data/templates => conf}/nginx/autoconfig.tpl.xml (100%) rename {data/templates => conf}/nginx/plain/acme-challenge.conf.inc (100%) rename {data/templates => conf}/nginx/plain/global.conf (100%) rename {data/templates => conf}/nginx/plain/ssowat.conf (100%) rename {data/templates => conf}/nginx/plain/yunohost_panel.conf.inc (100%) rename {data/templates => conf}/nginx/plain/yunohost_sso.conf.inc (100%) rename {data/templates => conf}/nginx/redirect_to_admin.conf (100%) rename {data/templates => conf}/nginx/security.conf.inc (100%) rename {data/templates => conf}/nginx/server.tpl.conf (100%) rename {data/templates => conf}/nginx/yunohost_admin.conf (100%) rename {data/templates => conf}/nginx/yunohost_admin.conf.inc (100%) rename {data/templates => conf}/nginx/yunohost_api.conf.inc (100%) rename {data/templates => conf}/nslcd/nslcd.conf (100%) rename {data/templates => conf}/nsswitch/nsswitch.conf (100%) rename {data/templates => conf}/postfix/main.cf (100%) rename {data/templates => conf}/postfix/plain/header_checks (100%) rename {data/templates => conf}/postfix/plain/ldap-accounts.cf (100%) rename {data/templates => conf}/postfix/plain/ldap-aliases.cf (100%) rename {data/templates => conf}/postfix/plain/ldap-domains.cf (100%) rename {data/templates => conf}/postfix/plain/master.cf (100%) rename {data/templates => conf}/postfix/plain/sender_canonical (100%) rename {data/templates => conf}/postfix/plain/smtp_reply_filter (100%) rename {data/templates => conf}/postfix/postsrsd (100%) rename {data/templates => conf}/rspamd/dkim_signing.conf (100%) rename {data/templates => conf}/rspamd/metrics.local.conf (100%) rename {data/templates => conf}/rspamd/milter_headers.conf (100%) rename {data/templates => conf}/rspamd/rspamd.sieve (100%) rename {data/templates => conf}/slapd/config.ldif (100%) rename {data/templates => conf}/slapd/db_init.ldif (100%) rename {data/templates => conf}/slapd/ldap.conf (100%) rename {data/templates => conf}/slapd/mailserver.ldif (100%) rename {data/templates => conf}/slapd/permission.ldif (100%) rename {data/templates => conf}/slapd/slapd.default (100%) rename {data/templates => conf}/slapd/sudo.ldif (100%) rename {data/templates => conf}/slapd/systemd-override.conf (100%) rename {data/templates => conf}/ssh/sshd_config (100%) rename {data/templates => conf}/ssl/openssl.cnf (100%) rename {data/templates => conf}/yunohost/dpkg-origins (100%) rename {data/templates => conf}/yunohost/firewall.yml (100%) rename {data/templates => conf}/yunohost/proc-hidepid.service (100%) rename {data/templates => conf}/yunohost/services.yml (100%) rename {data/templates => conf}/yunohost/yunoprompt.service (100%) rename data/actionsmap/yunohost_completion.py => doc/generate_bash_completion.py (100%) rename {data/helpers.d => helpers}/apt (100%) rename {data/helpers.d => helpers}/backup (100%) rename {data/helpers.d => helpers}/config (100%) rename {data/helpers.d => helpers}/fail2ban (100%) rename {data/helpers.d => helpers}/getopts (100%) rename {data/helpers.d => helpers}/hardware (100%) rename {data/helpers.d => helpers}/logging (100%) rename {data/helpers.d => helpers}/logrotate (100%) rename {data/helpers.d => helpers}/multimedia (100%) rename {data/helpers.d => helpers}/mysql (100%) rename {data/helpers.d => helpers}/network (100%) rename {data/helpers.d => helpers}/nginx (100%) rename {data/helpers.d => helpers}/nodejs (100%) rename {data/helpers.d => helpers}/permission (100%) rename {data/helpers.d => helpers}/php (100%) rename {data/helpers.d => helpers}/postgresql (100%) rename {data/helpers.d => helpers}/setting (100%) rename {data/helpers.d => helpers}/string (100%) rename {data/helpers.d => helpers}/systemd (100%) rename {data/helpers.d => helpers}/user (100%) rename {data/helpers.d => helpers}/utils (100%) rename {data/hooks => hooks}/backup/05-conf_ldap (100%) rename {data/hooks => hooks}/backup/17-data_home (100%) rename {data/hooks => hooks}/backup/18-data_multimedia (100%) rename {data/hooks => hooks}/backup/20-conf_ynh_settings (100%) rename {data/hooks => hooks}/backup/21-conf_ynh_certs (100%) rename {data/hooks => hooks}/backup/23-data_mail (100%) rename {data/hooks => hooks}/backup/27-data_xmpp (100%) rename {data/hooks => hooks}/backup/50-conf_manually_modified_files (100%) rename {data/hooks => hooks}/conf_regen/01-yunohost (100%) rename {data/hooks => hooks}/conf_regen/02-ssl (100%) rename {data/hooks => hooks}/conf_regen/03-ssh (100%) rename {data/hooks => hooks}/conf_regen/06-slapd (100%) rename {data/hooks => hooks}/conf_regen/09-nslcd (100%) rename {data/hooks => hooks}/conf_regen/10-apt (100%) rename {data/hooks => hooks}/conf_regen/12-metronome (100%) rename {data/hooks => hooks}/conf_regen/15-nginx (100%) rename {data/hooks => hooks}/conf_regen/19-postfix (100%) rename {data/hooks => hooks}/conf_regen/25-dovecot (100%) rename {data/hooks => hooks}/conf_regen/31-rspamd (100%) rename {data/hooks => hooks}/conf_regen/34-mysql (100%) rename {data/hooks => hooks}/conf_regen/35-redis (100%) rename {data/hooks => hooks}/conf_regen/37-mdns (100%) rename {data/hooks => hooks}/conf_regen/43-dnsmasq (100%) rename {data/hooks => hooks}/conf_regen/46-nsswitch (100%) rename {data/hooks => hooks}/conf_regen/52-fail2ban (100%) rename {data/hooks => hooks}/post_user_create/ynh_multimedia (100%) rename {data/hooks => hooks}/post_user_delete/ynh_multimedia (100%) rename {data/hooks => hooks}/restore/05-conf_ldap (100%) rename {data/hooks => hooks}/restore/17-data_home (100%) rename {data/hooks => hooks}/restore/18-data_multimedia (100%) rename {data/hooks => hooks}/restore/20-conf_ynh_settings (100%) rename {data/hooks => hooks}/restore/21-conf_ynh_certs (100%) rename {data/hooks => hooks}/restore/23-data_mail (100%) rename {data/hooks => hooks}/restore/27-data_xmpp (100%) rename {data/hooks => hooks}/restore/50-conf_manually_modified_files (100%) rename data/other/password/100000-most-used.txt.gz => share/100000-most-used-passwords.txt.gz (100%) rename data/actionsmap/yunohost.yml => share/actionsmap.yml (100%) rename {data/other => share}/config_domain.toml (100%) rename {data/other => share}/dnsbl_list.yml (100%) rename {data/other => share}/ffdhe2048.pem (100%) rename {data => share}/helpers (100%) rename {data/other => share}/registrar_list.toml (100%) rename src/{yunohost => }/__init__.py (100%) rename src/{yunohost => }/app.py (100%) rename src/{yunohost => }/app_catalog.py (100%) rename src/{yunohost => }/authenticators/ldap_admin.py (100%) rename src/{yunohost => }/backup.py (100%) rename src/{yunohost => }/certificate.py (100%) rename src/{yunohost => }/data_migrations/0021_migrate_to_bullseye.py (100%) rename src/{yunohost => }/data_migrations/0022_php73_to_php74_pools.py (100%) rename src/{yunohost => }/data_migrations/0023_postgresql_11_to_13.py (100%) rename src/{yunohost => }/data_migrations/__init__.py (100%) rename src/{yunohost => }/diagnosis.py (100%) rename {data/hooks => src}/diagnosis/00-basesystem.py (100%) rename {data/hooks => src}/diagnosis/10-ip.py (100%) rename {data/hooks => src}/diagnosis/12-dnsrecords.py (100%) rename {data/hooks => src}/diagnosis/14-ports.py (100%) rename {data/hooks => src}/diagnosis/21-web.py (100%) rename {data/hooks => src}/diagnosis/24-mail.py (100%) rename {data/hooks => src}/diagnosis/30-services.py (100%) rename {data/hooks => src}/diagnosis/50-systemresources.py (100%) rename {data/hooks => src}/diagnosis/70-regenconf.py (100%) rename {data/hooks => src}/diagnosis/80-apps.py (100%) rename src/{yunohost => }/dns.py (100%) rename src/{yunohost => }/domain.py (100%) rename src/{yunohost => }/dyndns.py (100%) rename src/{yunohost => }/firewall.py (100%) rename src/{yunohost => }/hook.py (100%) rename src/{yunohost => }/log.py (100%) rename src/{yunohost => }/permission.py (100%) rename src/{yunohost => }/regenconf.py (100%) rename src/{yunohost => }/service.py (100%) rename src/{yunohost => }/settings.py (100%) rename src/{yunohost => }/ssh.py (100%) rename src/{yunohost => }/tests/__init__.py (100%) rename src/{yunohost => }/tests/conftest.py (100%) rename src/{yunohost => }/tests/test_app_catalog.py (100%) rename src/{yunohost => }/tests/test_app_config.py (100%) rename src/{yunohost => }/tests/test_apps.py (100%) rename src/{yunohost => }/tests/test_appurl.py (100%) rename src/{yunohost => }/tests/test_backuprestore.py (100%) rename src/{yunohost => }/tests/test_changeurl.py (100%) rename src/{yunohost => }/tests/test_dns.py (100%) rename src/{yunohost => }/tests/test_domains.py (100%) rename src/{yunohost => }/tests/test_ldapauth.py (100%) rename src/{yunohost => }/tests/test_permission.py (100%) rename src/{yunohost => }/tests/test_questions.py (100%) rename src/{yunohost => }/tests/test_regenconf.py (100%) rename src/{yunohost => }/tests/test_service.py (100%) rename src/{yunohost => }/tests/test_settings.py (100%) rename src/{yunohost => }/tests/test_user-group.py (100%) rename src/{yunohost => }/tools.py (100%) rename src/{yunohost => }/user.py (100%) rename src/{yunohost => }/utils/__init__.py (100%) rename src/{yunohost => }/utils/config.py (100%) rename src/{yunohost => }/utils/dns.py (100%) rename src/{yunohost => }/utils/error.py (100%) rename src/{yunohost => }/utils/filesystem.py (100%) rename src/{yunohost => }/utils/i18n.py (100%) rename src/{yunohost => }/utils/ldap.py (100%) rename src/{yunohost => }/utils/legacy.py (100%) rename src/{yunohost => }/utils/network.py (100%) rename src/{yunohost => }/utils/packages.py (100%) rename src/{yunohost => }/utils/password.py (100%) rename src/{yunohost => }/utils/yunopaste.py (100%) rename src/{yunohost => }/vendor/__init__.py (100%) rename src/{yunohost => }/vendor/acme_tiny/__init__.py (100%) rename src/{yunohost => }/vendor/acme_tiny/acme_tiny.py (100%) rename src/{yunohost => }/vendor/spectre-meltdown-checker/Dockerfile (100%) rename src/{yunohost => }/vendor/spectre-meltdown-checker/LICENSE (100%) rename src/{yunohost => }/vendor/spectre-meltdown-checker/README.md (100%) rename src/{yunohost => }/vendor/spectre-meltdown-checker/docker-compose.yml (100%) rename src/{yunohost => }/vendor/spectre-meltdown-checker/spectre-meltdown-checker.sh (100%) diff --git a/data/templates/dnsmasq/domain.tpl b/conf/dnsmasq/domain.tpl similarity index 100% rename from data/templates/dnsmasq/domain.tpl rename to conf/dnsmasq/domain.tpl diff --git a/data/templates/dnsmasq/plain/dnsmasq.conf b/conf/dnsmasq/plain/dnsmasq.conf similarity index 100% rename from data/templates/dnsmasq/plain/dnsmasq.conf rename to conf/dnsmasq/plain/dnsmasq.conf diff --git a/data/templates/dnsmasq/plain/etcdefault b/conf/dnsmasq/plain/etcdefault similarity index 100% rename from data/templates/dnsmasq/plain/etcdefault rename to conf/dnsmasq/plain/etcdefault diff --git a/data/templates/dnsmasq/plain/resolv.dnsmasq.conf b/conf/dnsmasq/plain/resolv.dnsmasq.conf similarity index 100% rename from data/templates/dnsmasq/plain/resolv.dnsmasq.conf rename to conf/dnsmasq/plain/resolv.dnsmasq.conf diff --git a/data/templates/dovecot/dovecot-ldap.conf b/conf/dovecot/dovecot-ldap.conf similarity index 100% rename from data/templates/dovecot/dovecot-ldap.conf rename to conf/dovecot/dovecot-ldap.conf diff --git a/data/templates/dovecot/dovecot.conf b/conf/dovecot/dovecot.conf similarity index 100% rename from data/templates/dovecot/dovecot.conf rename to conf/dovecot/dovecot.conf diff --git a/data/templates/dovecot/dovecot.sieve b/conf/dovecot/dovecot.sieve similarity index 100% rename from data/templates/dovecot/dovecot.sieve rename to conf/dovecot/dovecot.sieve diff --git a/data/templates/dovecot/post-ext.conf b/conf/dovecot/post-ext.conf similarity index 100% rename from data/templates/dovecot/post-ext.conf rename to conf/dovecot/post-ext.conf diff --git a/data/templates/dovecot/pre-ext.conf b/conf/dovecot/pre-ext.conf similarity index 100% rename from data/templates/dovecot/pre-ext.conf rename to conf/dovecot/pre-ext.conf diff --git a/data/templates/fail2ban/jail.conf b/conf/fail2ban/jail.conf similarity index 100% rename from data/templates/fail2ban/jail.conf rename to conf/fail2ban/jail.conf diff --git a/data/templates/fail2ban/yunohost-jails.conf b/conf/fail2ban/yunohost-jails.conf similarity index 100% rename from data/templates/fail2ban/yunohost-jails.conf rename to conf/fail2ban/yunohost-jails.conf diff --git a/data/templates/fail2ban/yunohost.conf b/conf/fail2ban/yunohost.conf similarity index 100% rename from data/templates/fail2ban/yunohost.conf rename to conf/fail2ban/yunohost.conf diff --git a/data/templates/mdns/yunomdns.service b/conf/mdns/yunomdns.service similarity index 100% rename from data/templates/mdns/yunomdns.service rename to conf/mdns/yunomdns.service diff --git a/data/templates/metronome/domain.tpl.cfg.lua b/conf/metronome/domain.tpl.cfg.lua similarity index 100% rename from data/templates/metronome/domain.tpl.cfg.lua rename to conf/metronome/domain.tpl.cfg.lua diff --git a/data/templates/metronome/metronome.cfg.lua b/conf/metronome/metronome.cfg.lua similarity index 100% rename from data/templates/metronome/metronome.cfg.lua rename to conf/metronome/metronome.cfg.lua diff --git a/lib/metronome/modules/ldap.lib.lua b/conf/metronome/modules/ldap.lib.lua similarity index 100% rename from lib/metronome/modules/ldap.lib.lua rename to conf/metronome/modules/ldap.lib.lua diff --git a/lib/metronome/modules/mod_auth_ldap2.lua b/conf/metronome/modules/mod_auth_ldap2.lua similarity index 100% rename from lib/metronome/modules/mod_auth_ldap2.lua rename to conf/metronome/modules/mod_auth_ldap2.lua diff --git a/lib/metronome/modules/mod_legacyauth.lua b/conf/metronome/modules/mod_legacyauth.lua similarity index 100% rename from lib/metronome/modules/mod_legacyauth.lua rename to conf/metronome/modules/mod_legacyauth.lua diff --git a/lib/metronome/modules/mod_storage_ldap.lua b/conf/metronome/modules/mod_storage_ldap.lua similarity index 100% rename from lib/metronome/modules/mod_storage_ldap.lua rename to conf/metronome/modules/mod_storage_ldap.lua diff --git a/lib/metronome/modules/vcard.lib.lua b/conf/metronome/modules/vcard.lib.lua similarity index 100% rename from lib/metronome/modules/vcard.lib.lua rename to conf/metronome/modules/vcard.lib.lua diff --git a/data/templates/nginx/autoconfig.tpl.xml b/conf/nginx/autoconfig.tpl.xml similarity index 100% rename from data/templates/nginx/autoconfig.tpl.xml rename to conf/nginx/autoconfig.tpl.xml diff --git a/data/templates/nginx/plain/acme-challenge.conf.inc b/conf/nginx/plain/acme-challenge.conf.inc similarity index 100% rename from data/templates/nginx/plain/acme-challenge.conf.inc rename to conf/nginx/plain/acme-challenge.conf.inc diff --git a/data/templates/nginx/plain/global.conf b/conf/nginx/plain/global.conf similarity index 100% rename from data/templates/nginx/plain/global.conf rename to conf/nginx/plain/global.conf diff --git a/data/templates/nginx/plain/ssowat.conf b/conf/nginx/plain/ssowat.conf similarity index 100% rename from data/templates/nginx/plain/ssowat.conf rename to conf/nginx/plain/ssowat.conf diff --git a/data/templates/nginx/plain/yunohost_panel.conf.inc b/conf/nginx/plain/yunohost_panel.conf.inc similarity index 100% rename from data/templates/nginx/plain/yunohost_panel.conf.inc rename to conf/nginx/plain/yunohost_panel.conf.inc diff --git a/data/templates/nginx/plain/yunohost_sso.conf.inc b/conf/nginx/plain/yunohost_sso.conf.inc similarity index 100% rename from data/templates/nginx/plain/yunohost_sso.conf.inc rename to conf/nginx/plain/yunohost_sso.conf.inc diff --git a/data/templates/nginx/redirect_to_admin.conf b/conf/nginx/redirect_to_admin.conf similarity index 100% rename from data/templates/nginx/redirect_to_admin.conf rename to conf/nginx/redirect_to_admin.conf diff --git a/data/templates/nginx/security.conf.inc b/conf/nginx/security.conf.inc similarity index 100% rename from data/templates/nginx/security.conf.inc rename to conf/nginx/security.conf.inc diff --git a/data/templates/nginx/server.tpl.conf b/conf/nginx/server.tpl.conf similarity index 100% rename from data/templates/nginx/server.tpl.conf rename to conf/nginx/server.tpl.conf diff --git a/data/templates/nginx/yunohost_admin.conf b/conf/nginx/yunohost_admin.conf similarity index 100% rename from data/templates/nginx/yunohost_admin.conf rename to conf/nginx/yunohost_admin.conf diff --git a/data/templates/nginx/yunohost_admin.conf.inc b/conf/nginx/yunohost_admin.conf.inc similarity index 100% rename from data/templates/nginx/yunohost_admin.conf.inc rename to conf/nginx/yunohost_admin.conf.inc diff --git a/data/templates/nginx/yunohost_api.conf.inc b/conf/nginx/yunohost_api.conf.inc similarity index 100% rename from data/templates/nginx/yunohost_api.conf.inc rename to conf/nginx/yunohost_api.conf.inc diff --git a/data/templates/nslcd/nslcd.conf b/conf/nslcd/nslcd.conf similarity index 100% rename from data/templates/nslcd/nslcd.conf rename to conf/nslcd/nslcd.conf diff --git a/data/templates/nsswitch/nsswitch.conf b/conf/nsswitch/nsswitch.conf similarity index 100% rename from data/templates/nsswitch/nsswitch.conf rename to conf/nsswitch/nsswitch.conf diff --git a/data/templates/postfix/main.cf b/conf/postfix/main.cf similarity index 100% rename from data/templates/postfix/main.cf rename to conf/postfix/main.cf diff --git a/data/templates/postfix/plain/header_checks b/conf/postfix/plain/header_checks similarity index 100% rename from data/templates/postfix/plain/header_checks rename to conf/postfix/plain/header_checks diff --git a/data/templates/postfix/plain/ldap-accounts.cf b/conf/postfix/plain/ldap-accounts.cf similarity index 100% rename from data/templates/postfix/plain/ldap-accounts.cf rename to conf/postfix/plain/ldap-accounts.cf diff --git a/data/templates/postfix/plain/ldap-aliases.cf b/conf/postfix/plain/ldap-aliases.cf similarity index 100% rename from data/templates/postfix/plain/ldap-aliases.cf rename to conf/postfix/plain/ldap-aliases.cf diff --git a/data/templates/postfix/plain/ldap-domains.cf b/conf/postfix/plain/ldap-domains.cf similarity index 100% rename from data/templates/postfix/plain/ldap-domains.cf rename to conf/postfix/plain/ldap-domains.cf diff --git a/data/templates/postfix/plain/master.cf b/conf/postfix/plain/master.cf similarity index 100% rename from data/templates/postfix/plain/master.cf rename to conf/postfix/plain/master.cf diff --git a/data/templates/postfix/plain/sender_canonical b/conf/postfix/plain/sender_canonical similarity index 100% rename from data/templates/postfix/plain/sender_canonical rename to conf/postfix/plain/sender_canonical diff --git a/data/templates/postfix/plain/smtp_reply_filter b/conf/postfix/plain/smtp_reply_filter similarity index 100% rename from data/templates/postfix/plain/smtp_reply_filter rename to conf/postfix/plain/smtp_reply_filter diff --git a/data/templates/postfix/postsrsd b/conf/postfix/postsrsd similarity index 100% rename from data/templates/postfix/postsrsd rename to conf/postfix/postsrsd diff --git a/data/templates/rspamd/dkim_signing.conf b/conf/rspamd/dkim_signing.conf similarity index 100% rename from data/templates/rspamd/dkim_signing.conf rename to conf/rspamd/dkim_signing.conf diff --git a/data/templates/rspamd/metrics.local.conf b/conf/rspamd/metrics.local.conf similarity index 100% rename from data/templates/rspamd/metrics.local.conf rename to conf/rspamd/metrics.local.conf diff --git a/data/templates/rspamd/milter_headers.conf b/conf/rspamd/milter_headers.conf similarity index 100% rename from data/templates/rspamd/milter_headers.conf rename to conf/rspamd/milter_headers.conf diff --git a/data/templates/rspamd/rspamd.sieve b/conf/rspamd/rspamd.sieve similarity index 100% rename from data/templates/rspamd/rspamd.sieve rename to conf/rspamd/rspamd.sieve diff --git a/data/templates/slapd/config.ldif b/conf/slapd/config.ldif similarity index 100% rename from data/templates/slapd/config.ldif rename to conf/slapd/config.ldif diff --git a/data/templates/slapd/db_init.ldif b/conf/slapd/db_init.ldif similarity index 100% rename from data/templates/slapd/db_init.ldif rename to conf/slapd/db_init.ldif diff --git a/data/templates/slapd/ldap.conf b/conf/slapd/ldap.conf similarity index 100% rename from data/templates/slapd/ldap.conf rename to conf/slapd/ldap.conf diff --git a/data/templates/slapd/mailserver.ldif b/conf/slapd/mailserver.ldif similarity index 100% rename from data/templates/slapd/mailserver.ldif rename to conf/slapd/mailserver.ldif diff --git a/data/templates/slapd/permission.ldif b/conf/slapd/permission.ldif similarity index 100% rename from data/templates/slapd/permission.ldif rename to conf/slapd/permission.ldif diff --git a/data/templates/slapd/slapd.default b/conf/slapd/slapd.default similarity index 100% rename from data/templates/slapd/slapd.default rename to conf/slapd/slapd.default diff --git a/data/templates/slapd/sudo.ldif b/conf/slapd/sudo.ldif similarity index 100% rename from data/templates/slapd/sudo.ldif rename to conf/slapd/sudo.ldif diff --git a/data/templates/slapd/systemd-override.conf b/conf/slapd/systemd-override.conf similarity index 100% rename from data/templates/slapd/systemd-override.conf rename to conf/slapd/systemd-override.conf diff --git a/data/templates/ssh/sshd_config b/conf/ssh/sshd_config similarity index 100% rename from data/templates/ssh/sshd_config rename to conf/ssh/sshd_config diff --git a/data/templates/ssl/openssl.cnf b/conf/ssl/openssl.cnf similarity index 100% rename from data/templates/ssl/openssl.cnf rename to conf/ssl/openssl.cnf diff --git a/data/templates/yunohost/dpkg-origins b/conf/yunohost/dpkg-origins similarity index 100% rename from data/templates/yunohost/dpkg-origins rename to conf/yunohost/dpkg-origins diff --git a/data/templates/yunohost/firewall.yml b/conf/yunohost/firewall.yml similarity index 100% rename from data/templates/yunohost/firewall.yml rename to conf/yunohost/firewall.yml diff --git a/data/templates/yunohost/proc-hidepid.service b/conf/yunohost/proc-hidepid.service similarity index 100% rename from data/templates/yunohost/proc-hidepid.service rename to conf/yunohost/proc-hidepid.service diff --git a/data/templates/yunohost/services.yml b/conf/yunohost/services.yml similarity index 100% rename from data/templates/yunohost/services.yml rename to conf/yunohost/services.yml diff --git a/data/templates/yunohost/yunoprompt.service b/conf/yunohost/yunoprompt.service similarity index 100% rename from data/templates/yunohost/yunoprompt.service rename to conf/yunohost/yunoprompt.service diff --git a/data/actionsmap/yunohost_completion.py b/doc/generate_bash_completion.py similarity index 100% rename from data/actionsmap/yunohost_completion.py rename to doc/generate_bash_completion.py diff --git a/data/helpers.d/apt b/helpers/apt similarity index 100% rename from data/helpers.d/apt rename to helpers/apt diff --git a/data/helpers.d/backup b/helpers/backup similarity index 100% rename from data/helpers.d/backup rename to helpers/backup diff --git a/data/helpers.d/config b/helpers/config similarity index 100% rename from data/helpers.d/config rename to helpers/config diff --git a/data/helpers.d/fail2ban b/helpers/fail2ban similarity index 100% rename from data/helpers.d/fail2ban rename to helpers/fail2ban diff --git a/data/helpers.d/getopts b/helpers/getopts similarity index 100% rename from data/helpers.d/getopts rename to helpers/getopts diff --git a/data/helpers.d/hardware b/helpers/hardware similarity index 100% rename from data/helpers.d/hardware rename to helpers/hardware diff --git a/data/helpers.d/logging b/helpers/logging similarity index 100% rename from data/helpers.d/logging rename to helpers/logging diff --git a/data/helpers.d/logrotate b/helpers/logrotate similarity index 100% rename from data/helpers.d/logrotate rename to helpers/logrotate diff --git a/data/helpers.d/multimedia b/helpers/multimedia similarity index 100% rename from data/helpers.d/multimedia rename to helpers/multimedia diff --git a/data/helpers.d/mysql b/helpers/mysql similarity index 100% rename from data/helpers.d/mysql rename to helpers/mysql diff --git a/data/helpers.d/network b/helpers/network similarity index 100% rename from data/helpers.d/network rename to helpers/network diff --git a/data/helpers.d/nginx b/helpers/nginx similarity index 100% rename from data/helpers.d/nginx rename to helpers/nginx diff --git a/data/helpers.d/nodejs b/helpers/nodejs similarity index 100% rename from data/helpers.d/nodejs rename to helpers/nodejs diff --git a/data/helpers.d/permission b/helpers/permission similarity index 100% rename from data/helpers.d/permission rename to helpers/permission diff --git a/data/helpers.d/php b/helpers/php similarity index 100% rename from data/helpers.d/php rename to helpers/php diff --git a/data/helpers.d/postgresql b/helpers/postgresql similarity index 100% rename from data/helpers.d/postgresql rename to helpers/postgresql diff --git a/data/helpers.d/setting b/helpers/setting similarity index 100% rename from data/helpers.d/setting rename to helpers/setting diff --git a/data/helpers.d/string b/helpers/string similarity index 100% rename from data/helpers.d/string rename to helpers/string diff --git a/data/helpers.d/systemd b/helpers/systemd similarity index 100% rename from data/helpers.d/systemd rename to helpers/systemd diff --git a/data/helpers.d/user b/helpers/user similarity index 100% rename from data/helpers.d/user rename to helpers/user diff --git a/data/helpers.d/utils b/helpers/utils similarity index 100% rename from data/helpers.d/utils rename to helpers/utils diff --git a/data/hooks/backup/05-conf_ldap b/hooks/backup/05-conf_ldap similarity index 100% rename from data/hooks/backup/05-conf_ldap rename to hooks/backup/05-conf_ldap diff --git a/data/hooks/backup/17-data_home b/hooks/backup/17-data_home similarity index 100% rename from data/hooks/backup/17-data_home rename to hooks/backup/17-data_home diff --git a/data/hooks/backup/18-data_multimedia b/hooks/backup/18-data_multimedia similarity index 100% rename from data/hooks/backup/18-data_multimedia rename to hooks/backup/18-data_multimedia diff --git a/data/hooks/backup/20-conf_ynh_settings b/hooks/backup/20-conf_ynh_settings similarity index 100% rename from data/hooks/backup/20-conf_ynh_settings rename to hooks/backup/20-conf_ynh_settings diff --git a/data/hooks/backup/21-conf_ynh_certs b/hooks/backup/21-conf_ynh_certs similarity index 100% rename from data/hooks/backup/21-conf_ynh_certs rename to hooks/backup/21-conf_ynh_certs diff --git a/data/hooks/backup/23-data_mail b/hooks/backup/23-data_mail similarity index 100% rename from data/hooks/backup/23-data_mail rename to hooks/backup/23-data_mail diff --git a/data/hooks/backup/27-data_xmpp b/hooks/backup/27-data_xmpp similarity index 100% rename from data/hooks/backup/27-data_xmpp rename to hooks/backup/27-data_xmpp diff --git a/data/hooks/backup/50-conf_manually_modified_files b/hooks/backup/50-conf_manually_modified_files similarity index 100% rename from data/hooks/backup/50-conf_manually_modified_files rename to hooks/backup/50-conf_manually_modified_files diff --git a/data/hooks/conf_regen/01-yunohost b/hooks/conf_regen/01-yunohost similarity index 100% rename from data/hooks/conf_regen/01-yunohost rename to hooks/conf_regen/01-yunohost diff --git a/data/hooks/conf_regen/02-ssl b/hooks/conf_regen/02-ssl similarity index 100% rename from data/hooks/conf_regen/02-ssl rename to hooks/conf_regen/02-ssl diff --git a/data/hooks/conf_regen/03-ssh b/hooks/conf_regen/03-ssh similarity index 100% rename from data/hooks/conf_regen/03-ssh rename to hooks/conf_regen/03-ssh diff --git a/data/hooks/conf_regen/06-slapd b/hooks/conf_regen/06-slapd similarity index 100% rename from data/hooks/conf_regen/06-slapd rename to hooks/conf_regen/06-slapd diff --git a/data/hooks/conf_regen/09-nslcd b/hooks/conf_regen/09-nslcd similarity index 100% rename from data/hooks/conf_regen/09-nslcd rename to hooks/conf_regen/09-nslcd diff --git a/data/hooks/conf_regen/10-apt b/hooks/conf_regen/10-apt similarity index 100% rename from data/hooks/conf_regen/10-apt rename to hooks/conf_regen/10-apt diff --git a/data/hooks/conf_regen/12-metronome b/hooks/conf_regen/12-metronome similarity index 100% rename from data/hooks/conf_regen/12-metronome rename to hooks/conf_regen/12-metronome diff --git a/data/hooks/conf_regen/15-nginx b/hooks/conf_regen/15-nginx similarity index 100% rename from data/hooks/conf_regen/15-nginx rename to hooks/conf_regen/15-nginx diff --git a/data/hooks/conf_regen/19-postfix b/hooks/conf_regen/19-postfix similarity index 100% rename from data/hooks/conf_regen/19-postfix rename to hooks/conf_regen/19-postfix diff --git a/data/hooks/conf_regen/25-dovecot b/hooks/conf_regen/25-dovecot similarity index 100% rename from data/hooks/conf_regen/25-dovecot rename to hooks/conf_regen/25-dovecot diff --git a/data/hooks/conf_regen/31-rspamd b/hooks/conf_regen/31-rspamd similarity index 100% rename from data/hooks/conf_regen/31-rspamd rename to hooks/conf_regen/31-rspamd diff --git a/data/hooks/conf_regen/34-mysql b/hooks/conf_regen/34-mysql similarity index 100% rename from data/hooks/conf_regen/34-mysql rename to hooks/conf_regen/34-mysql diff --git a/data/hooks/conf_regen/35-redis b/hooks/conf_regen/35-redis similarity index 100% rename from data/hooks/conf_regen/35-redis rename to hooks/conf_regen/35-redis diff --git a/data/hooks/conf_regen/37-mdns b/hooks/conf_regen/37-mdns similarity index 100% rename from data/hooks/conf_regen/37-mdns rename to hooks/conf_regen/37-mdns diff --git a/data/hooks/conf_regen/43-dnsmasq b/hooks/conf_regen/43-dnsmasq similarity index 100% rename from data/hooks/conf_regen/43-dnsmasq rename to hooks/conf_regen/43-dnsmasq diff --git a/data/hooks/conf_regen/46-nsswitch b/hooks/conf_regen/46-nsswitch similarity index 100% rename from data/hooks/conf_regen/46-nsswitch rename to hooks/conf_regen/46-nsswitch diff --git a/data/hooks/conf_regen/52-fail2ban b/hooks/conf_regen/52-fail2ban similarity index 100% rename from data/hooks/conf_regen/52-fail2ban rename to hooks/conf_regen/52-fail2ban diff --git a/data/hooks/post_user_create/ynh_multimedia b/hooks/post_user_create/ynh_multimedia similarity index 100% rename from data/hooks/post_user_create/ynh_multimedia rename to hooks/post_user_create/ynh_multimedia diff --git a/data/hooks/post_user_delete/ynh_multimedia b/hooks/post_user_delete/ynh_multimedia similarity index 100% rename from data/hooks/post_user_delete/ynh_multimedia rename to hooks/post_user_delete/ynh_multimedia diff --git a/data/hooks/restore/05-conf_ldap b/hooks/restore/05-conf_ldap similarity index 100% rename from data/hooks/restore/05-conf_ldap rename to hooks/restore/05-conf_ldap diff --git a/data/hooks/restore/17-data_home b/hooks/restore/17-data_home similarity index 100% rename from data/hooks/restore/17-data_home rename to hooks/restore/17-data_home diff --git a/data/hooks/restore/18-data_multimedia b/hooks/restore/18-data_multimedia similarity index 100% rename from data/hooks/restore/18-data_multimedia rename to hooks/restore/18-data_multimedia diff --git a/data/hooks/restore/20-conf_ynh_settings b/hooks/restore/20-conf_ynh_settings similarity index 100% rename from data/hooks/restore/20-conf_ynh_settings rename to hooks/restore/20-conf_ynh_settings diff --git a/data/hooks/restore/21-conf_ynh_certs b/hooks/restore/21-conf_ynh_certs similarity index 100% rename from data/hooks/restore/21-conf_ynh_certs rename to hooks/restore/21-conf_ynh_certs diff --git a/data/hooks/restore/23-data_mail b/hooks/restore/23-data_mail similarity index 100% rename from data/hooks/restore/23-data_mail rename to hooks/restore/23-data_mail diff --git a/data/hooks/restore/27-data_xmpp b/hooks/restore/27-data_xmpp similarity index 100% rename from data/hooks/restore/27-data_xmpp rename to hooks/restore/27-data_xmpp diff --git a/data/hooks/restore/50-conf_manually_modified_files b/hooks/restore/50-conf_manually_modified_files similarity index 100% rename from data/hooks/restore/50-conf_manually_modified_files rename to hooks/restore/50-conf_manually_modified_files diff --git a/data/other/password/100000-most-used.txt.gz b/share/100000-most-used-passwords.txt.gz similarity index 100% rename from data/other/password/100000-most-used.txt.gz rename to share/100000-most-used-passwords.txt.gz diff --git a/data/actionsmap/yunohost.yml b/share/actionsmap.yml similarity index 100% rename from data/actionsmap/yunohost.yml rename to share/actionsmap.yml diff --git a/data/other/config_domain.toml b/share/config_domain.toml similarity index 100% rename from data/other/config_domain.toml rename to share/config_domain.toml diff --git a/data/other/dnsbl_list.yml b/share/dnsbl_list.yml similarity index 100% rename from data/other/dnsbl_list.yml rename to share/dnsbl_list.yml diff --git a/data/other/ffdhe2048.pem b/share/ffdhe2048.pem similarity index 100% rename from data/other/ffdhe2048.pem rename to share/ffdhe2048.pem diff --git a/data/helpers b/share/helpers similarity index 100% rename from data/helpers rename to share/helpers diff --git a/data/other/registrar_list.toml b/share/registrar_list.toml similarity index 100% rename from data/other/registrar_list.toml rename to share/registrar_list.toml diff --git a/src/yunohost/__init__.py b/src/__init__.py similarity index 100% rename from src/yunohost/__init__.py rename to src/__init__.py diff --git a/src/yunohost/app.py b/src/app.py similarity index 100% rename from src/yunohost/app.py rename to src/app.py diff --git a/src/yunohost/app_catalog.py b/src/app_catalog.py similarity index 100% rename from src/yunohost/app_catalog.py rename to src/app_catalog.py diff --git a/src/yunohost/authenticators/ldap_admin.py b/src/authenticators/ldap_admin.py similarity index 100% rename from src/yunohost/authenticators/ldap_admin.py rename to src/authenticators/ldap_admin.py diff --git a/src/yunohost/backup.py b/src/backup.py similarity index 100% rename from src/yunohost/backup.py rename to src/backup.py diff --git a/src/yunohost/certificate.py b/src/certificate.py similarity index 100% rename from src/yunohost/certificate.py rename to src/certificate.py diff --git a/src/yunohost/data_migrations/0021_migrate_to_bullseye.py b/src/data_migrations/0021_migrate_to_bullseye.py similarity index 100% rename from src/yunohost/data_migrations/0021_migrate_to_bullseye.py rename to src/data_migrations/0021_migrate_to_bullseye.py diff --git a/src/yunohost/data_migrations/0022_php73_to_php74_pools.py b/src/data_migrations/0022_php73_to_php74_pools.py similarity index 100% rename from src/yunohost/data_migrations/0022_php73_to_php74_pools.py rename to src/data_migrations/0022_php73_to_php74_pools.py diff --git a/src/yunohost/data_migrations/0023_postgresql_11_to_13.py b/src/data_migrations/0023_postgresql_11_to_13.py similarity index 100% rename from src/yunohost/data_migrations/0023_postgresql_11_to_13.py rename to src/data_migrations/0023_postgresql_11_to_13.py diff --git a/src/yunohost/data_migrations/__init__.py b/src/data_migrations/__init__.py similarity index 100% rename from src/yunohost/data_migrations/__init__.py rename to src/data_migrations/__init__.py diff --git a/src/yunohost/diagnosis.py b/src/diagnosis.py similarity index 100% rename from src/yunohost/diagnosis.py rename to src/diagnosis.py diff --git a/data/hooks/diagnosis/00-basesystem.py b/src/diagnosis/00-basesystem.py similarity index 100% rename from data/hooks/diagnosis/00-basesystem.py rename to src/diagnosis/00-basesystem.py diff --git a/data/hooks/diagnosis/10-ip.py b/src/diagnosis/10-ip.py similarity index 100% rename from data/hooks/diagnosis/10-ip.py rename to src/diagnosis/10-ip.py diff --git a/data/hooks/diagnosis/12-dnsrecords.py b/src/diagnosis/12-dnsrecords.py similarity index 100% rename from data/hooks/diagnosis/12-dnsrecords.py rename to src/diagnosis/12-dnsrecords.py diff --git a/data/hooks/diagnosis/14-ports.py b/src/diagnosis/14-ports.py similarity index 100% rename from data/hooks/diagnosis/14-ports.py rename to src/diagnosis/14-ports.py diff --git a/data/hooks/diagnosis/21-web.py b/src/diagnosis/21-web.py similarity index 100% rename from data/hooks/diagnosis/21-web.py rename to src/diagnosis/21-web.py diff --git a/data/hooks/diagnosis/24-mail.py b/src/diagnosis/24-mail.py similarity index 100% rename from data/hooks/diagnosis/24-mail.py rename to src/diagnosis/24-mail.py diff --git a/data/hooks/diagnosis/30-services.py b/src/diagnosis/30-services.py similarity index 100% rename from data/hooks/diagnosis/30-services.py rename to src/diagnosis/30-services.py diff --git a/data/hooks/diagnosis/50-systemresources.py b/src/diagnosis/50-systemresources.py similarity index 100% rename from data/hooks/diagnosis/50-systemresources.py rename to src/diagnosis/50-systemresources.py diff --git a/data/hooks/diagnosis/70-regenconf.py b/src/diagnosis/70-regenconf.py similarity index 100% rename from data/hooks/diagnosis/70-regenconf.py rename to src/diagnosis/70-regenconf.py diff --git a/data/hooks/diagnosis/80-apps.py b/src/diagnosis/80-apps.py similarity index 100% rename from data/hooks/diagnosis/80-apps.py rename to src/diagnosis/80-apps.py diff --git a/src/yunohost/dns.py b/src/dns.py similarity index 100% rename from src/yunohost/dns.py rename to src/dns.py diff --git a/src/yunohost/domain.py b/src/domain.py similarity index 100% rename from src/yunohost/domain.py rename to src/domain.py diff --git a/src/yunohost/dyndns.py b/src/dyndns.py similarity index 100% rename from src/yunohost/dyndns.py rename to src/dyndns.py diff --git a/src/yunohost/firewall.py b/src/firewall.py similarity index 100% rename from src/yunohost/firewall.py rename to src/firewall.py diff --git a/src/yunohost/hook.py b/src/hook.py similarity index 100% rename from src/yunohost/hook.py rename to src/hook.py diff --git a/src/yunohost/log.py b/src/log.py similarity index 100% rename from src/yunohost/log.py rename to src/log.py diff --git a/src/yunohost/permission.py b/src/permission.py similarity index 100% rename from src/yunohost/permission.py rename to src/permission.py diff --git a/src/yunohost/regenconf.py b/src/regenconf.py similarity index 100% rename from src/yunohost/regenconf.py rename to src/regenconf.py diff --git a/src/yunohost/service.py b/src/service.py similarity index 100% rename from src/yunohost/service.py rename to src/service.py diff --git a/src/yunohost/settings.py b/src/settings.py similarity index 100% rename from src/yunohost/settings.py rename to src/settings.py diff --git a/src/yunohost/ssh.py b/src/ssh.py similarity index 100% rename from src/yunohost/ssh.py rename to src/ssh.py diff --git a/src/yunohost/tests/__init__.py b/src/tests/__init__.py similarity index 100% rename from src/yunohost/tests/__init__.py rename to src/tests/__init__.py diff --git a/src/yunohost/tests/conftest.py b/src/tests/conftest.py similarity index 100% rename from src/yunohost/tests/conftest.py rename to src/tests/conftest.py diff --git a/src/yunohost/tests/test_app_catalog.py b/src/tests/test_app_catalog.py similarity index 100% rename from src/yunohost/tests/test_app_catalog.py rename to src/tests/test_app_catalog.py diff --git a/src/yunohost/tests/test_app_config.py b/src/tests/test_app_config.py similarity index 100% rename from src/yunohost/tests/test_app_config.py rename to src/tests/test_app_config.py diff --git a/src/yunohost/tests/test_apps.py b/src/tests/test_apps.py similarity index 100% rename from src/yunohost/tests/test_apps.py rename to src/tests/test_apps.py diff --git a/src/yunohost/tests/test_appurl.py b/src/tests/test_appurl.py similarity index 100% rename from src/yunohost/tests/test_appurl.py rename to src/tests/test_appurl.py diff --git a/src/yunohost/tests/test_backuprestore.py b/src/tests/test_backuprestore.py similarity index 100% rename from src/yunohost/tests/test_backuprestore.py rename to src/tests/test_backuprestore.py diff --git a/src/yunohost/tests/test_changeurl.py b/src/tests/test_changeurl.py similarity index 100% rename from src/yunohost/tests/test_changeurl.py rename to src/tests/test_changeurl.py diff --git a/src/yunohost/tests/test_dns.py b/src/tests/test_dns.py similarity index 100% rename from src/yunohost/tests/test_dns.py rename to src/tests/test_dns.py diff --git a/src/yunohost/tests/test_domains.py b/src/tests/test_domains.py similarity index 100% rename from src/yunohost/tests/test_domains.py rename to src/tests/test_domains.py diff --git a/src/yunohost/tests/test_ldapauth.py b/src/tests/test_ldapauth.py similarity index 100% rename from src/yunohost/tests/test_ldapauth.py rename to src/tests/test_ldapauth.py diff --git a/src/yunohost/tests/test_permission.py b/src/tests/test_permission.py similarity index 100% rename from src/yunohost/tests/test_permission.py rename to src/tests/test_permission.py diff --git a/src/yunohost/tests/test_questions.py b/src/tests/test_questions.py similarity index 100% rename from src/yunohost/tests/test_questions.py rename to src/tests/test_questions.py diff --git a/src/yunohost/tests/test_regenconf.py b/src/tests/test_regenconf.py similarity index 100% rename from src/yunohost/tests/test_regenconf.py rename to src/tests/test_regenconf.py diff --git a/src/yunohost/tests/test_service.py b/src/tests/test_service.py similarity index 100% rename from src/yunohost/tests/test_service.py rename to src/tests/test_service.py diff --git a/src/yunohost/tests/test_settings.py b/src/tests/test_settings.py similarity index 100% rename from src/yunohost/tests/test_settings.py rename to src/tests/test_settings.py diff --git a/src/yunohost/tests/test_user-group.py b/src/tests/test_user-group.py similarity index 100% rename from src/yunohost/tests/test_user-group.py rename to src/tests/test_user-group.py diff --git a/src/yunohost/tools.py b/src/tools.py similarity index 100% rename from src/yunohost/tools.py rename to src/tools.py diff --git a/src/yunohost/user.py b/src/user.py similarity index 100% rename from src/yunohost/user.py rename to src/user.py diff --git a/src/yunohost/utils/__init__.py b/src/utils/__init__.py similarity index 100% rename from src/yunohost/utils/__init__.py rename to src/utils/__init__.py diff --git a/src/yunohost/utils/config.py b/src/utils/config.py similarity index 100% rename from src/yunohost/utils/config.py rename to src/utils/config.py diff --git a/src/yunohost/utils/dns.py b/src/utils/dns.py similarity index 100% rename from src/yunohost/utils/dns.py rename to src/utils/dns.py diff --git a/src/yunohost/utils/error.py b/src/utils/error.py similarity index 100% rename from src/yunohost/utils/error.py rename to src/utils/error.py diff --git a/src/yunohost/utils/filesystem.py b/src/utils/filesystem.py similarity index 100% rename from src/yunohost/utils/filesystem.py rename to src/utils/filesystem.py diff --git a/src/yunohost/utils/i18n.py b/src/utils/i18n.py similarity index 100% rename from src/yunohost/utils/i18n.py rename to src/utils/i18n.py diff --git a/src/yunohost/utils/ldap.py b/src/utils/ldap.py similarity index 100% rename from src/yunohost/utils/ldap.py rename to src/utils/ldap.py diff --git a/src/yunohost/utils/legacy.py b/src/utils/legacy.py similarity index 100% rename from src/yunohost/utils/legacy.py rename to src/utils/legacy.py diff --git a/src/yunohost/utils/network.py b/src/utils/network.py similarity index 100% rename from src/yunohost/utils/network.py rename to src/utils/network.py diff --git a/src/yunohost/utils/packages.py b/src/utils/packages.py similarity index 100% rename from src/yunohost/utils/packages.py rename to src/utils/packages.py diff --git a/src/yunohost/utils/password.py b/src/utils/password.py similarity index 100% rename from src/yunohost/utils/password.py rename to src/utils/password.py diff --git a/src/yunohost/utils/yunopaste.py b/src/utils/yunopaste.py similarity index 100% rename from src/yunohost/utils/yunopaste.py rename to src/utils/yunopaste.py diff --git a/src/yunohost/vendor/__init__.py b/src/vendor/__init__.py similarity index 100% rename from src/yunohost/vendor/__init__.py rename to src/vendor/__init__.py diff --git a/src/yunohost/vendor/acme_tiny/__init__.py b/src/vendor/acme_tiny/__init__.py similarity index 100% rename from src/yunohost/vendor/acme_tiny/__init__.py rename to src/vendor/acme_tiny/__init__.py diff --git a/src/yunohost/vendor/acme_tiny/acme_tiny.py b/src/vendor/acme_tiny/acme_tiny.py similarity index 100% rename from src/yunohost/vendor/acme_tiny/acme_tiny.py rename to src/vendor/acme_tiny/acme_tiny.py diff --git a/src/yunohost/vendor/spectre-meltdown-checker/Dockerfile b/src/vendor/spectre-meltdown-checker/Dockerfile similarity index 100% rename from src/yunohost/vendor/spectre-meltdown-checker/Dockerfile rename to src/vendor/spectre-meltdown-checker/Dockerfile diff --git a/src/yunohost/vendor/spectre-meltdown-checker/LICENSE b/src/vendor/spectre-meltdown-checker/LICENSE similarity index 100% rename from src/yunohost/vendor/spectre-meltdown-checker/LICENSE rename to src/vendor/spectre-meltdown-checker/LICENSE diff --git a/src/yunohost/vendor/spectre-meltdown-checker/README.md b/src/vendor/spectre-meltdown-checker/README.md similarity index 100% rename from src/yunohost/vendor/spectre-meltdown-checker/README.md rename to src/vendor/spectre-meltdown-checker/README.md diff --git a/src/yunohost/vendor/spectre-meltdown-checker/docker-compose.yml b/src/vendor/spectre-meltdown-checker/docker-compose.yml similarity index 100% rename from src/yunohost/vendor/spectre-meltdown-checker/docker-compose.yml rename to src/vendor/spectre-meltdown-checker/docker-compose.yml diff --git a/src/yunohost/vendor/spectre-meltdown-checker/spectre-meltdown-checker.sh b/src/vendor/spectre-meltdown-checker/spectre-meltdown-checker.sh similarity index 100% rename from src/yunohost/vendor/spectre-meltdown-checker/spectre-meltdown-checker.sh rename to src/vendor/spectre-meltdown-checker/spectre-meltdown-checker.sh From 05f25fa85fa8495f97a81927991c1af9de6b1723 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 10 Nov 2021 18:25:37 +0100 Subject: [PATCH 2/6] Propagate dir structure change to scripts etc --- .coveragerc | 2 +- .gitignore | 4 +- .gitlab/ci/test.gitlab-ci.yml | 76 ++++++++++++++++----------------- conf/dovecot/dovecot.conf | 2 +- conf/nginx/security.conf.inc | 2 +- conf/postfix/main.cf | 2 +- debian/install | 9 ++-- debian/rules | 2 +- doc/generate_bash_completion.py | 5 +-- doc/generate_helper_doc.py | 2 +- doc/generate_manpages.py | 2 +- doc/helper_doc_template.md | 2 +- hooks/conf_regen/01-yunohost | 4 +- hooks/conf_regen/02-ssl | 8 ++-- hooks/conf_regen/03-ssh | 2 +- hooks/conf_regen/06-slapd | 6 +-- hooks/conf_regen/09-nslcd | 2 +- hooks/conf_regen/12-metronome | 2 +- hooks/conf_regen/15-nginx | 4 +- hooks/conf_regen/19-postfix | 2 +- hooks/conf_regen/25-dovecot | 2 +- hooks/conf_regen/31-rspamd | 2 +- hooks/conf_regen/34-mysql | 2 +- hooks/conf_regen/37-mdns | 2 +- hooks/conf_regen/43-dnsmasq | 2 +- hooks/conf_regen/46-nsswitch | 2 +- hooks/conf_regen/52-fail2ban | 2 +- src/diagnosis/10-ip.py | 2 +- src/diagnosis/24-mail.py | 2 +- src/dns.py | 2 +- src/domain.py | 2 +- src/service.py | 2 +- src/utils/config.py | 2 +- src/utils/password.py | 2 +- tests/add_missing_keys.py | 22 +++++----- tests/test_actionmap.py | 2 +- tests/test_i18n_keys.py | 26 +++++------ tox.ini | 6 +-- 38 files changed, 113 insertions(+), 111 deletions(-) diff --git a/.coveragerc b/.coveragerc index ed13dfa68..fe22c8381 100644 --- a/.coveragerc +++ b/.coveragerc @@ -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/* diff --git a/.gitignore b/.gitignore index 75f4ae6ea..eae46b4c5 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index 1aad46fbe..49c07e4b6 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -11,7 +11,7 @@ - *install_debs cache: paths: - - src/yunohost/tests/apps + - src/tests/apps key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG" needs: - job: build-yunohost @@ -36,7 +36,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: @@ -57,8 +57,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 @@ -74,7 +74,7 @@ test-actionmap: - python3 -m pytest tests/test_actionmap.py only: changes: - - data/actionsmap/*.yml + - share/actionsmap.yml test-helpers: extends: .test-stage @@ -83,126 +83,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 diff --git a/conf/dovecot/dovecot.conf b/conf/dovecot/dovecot.conf index c7e937979..273bd45dc 100644 --- a/conf/dovecot/dovecot.conf +++ b/conf/dovecot/dovecot.conf @@ -23,7 +23,7 @@ ssl_cert = /path/to/dhparam -ssl_dh = /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 %} diff --git a/debian/install b/debian/install index 4680bc6be..55c535ae8 100644 --- a/debian/install +++ b/debian/install @@ -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/ +doc/bash-completion.sh /etc/bash_completion.d/yunohost lib/metronome/modules/* /usr/lib/metronome/modules/ locales/* /usr/lib/moulinette/yunohost/locales/ -src/yunohost /usr/lib/moulinette +src/ /usr/lib/moulinette/yunohost diff --git a/debian/rules b/debian/rules index 341ba2b01..d0cbd5138 100755 --- a/debian/rules +++ b/debian/rules @@ -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: diff --git a/doc/generate_bash_completion.py b/doc/generate_bash_completion.py index c801e2f3c..72a524210 100644 --- a/doc/generate_bash_completion.py +++ b/doc/generate_bash_completion.py @@ -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): diff --git a/doc/generate_helper_doc.py b/doc/generate_helper_doc.py index f2d5bf444..189a445d4 100644 --- a/doc/generate_helper_doc.py +++ b/doc/generate_helper_doc.py @@ -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: diff --git a/doc/generate_manpages.py b/doc/generate_manpages.py index fa042fb17..bdb1fcaee 100644 --- a/doc/generate_manpages.py +++ b/doc/generate_manpages.py @@ -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): diff --git a/doc/helper_doc_template.md b/doc/helper_doc_template.md index d41c0b6e9..ac5d455fb 100644 --- a/doc/helper_doc_template.md +++ b/doc/helper_doc_template.md @@ -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 %} diff --git a/hooks/conf_regen/01-yunohost b/hooks/conf_regen/01-yunohost index 963bd49d3..027be8020 100755 --- a/hooks/conf_regen/01-yunohost +++ b/hooks/conf_regen/01-yunohost @@ -8,7 +8,7 @@ do_init_regen() { exit 1 fi - cd /usr/share/yunohost/templates/yunohost + cd /usr/share/yunohost/conf/yunohost [[ -d /etc/yunohost ]] || mkdir -p /etc/yunohost @@ -71,7 +71,7 @@ do_init_regen() { do_pre_regen() { 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/cron.d/ diff --git a/hooks/conf_regen/02-ssl b/hooks/conf_regen/02-ssl index 03478552c..f27a23cf8 100755 --- a/hooks/conf_regen/02-ssl +++ b/hooks/conf_regen/02-ssl @@ -6,7 +6,7 @@ ssl_dir="/usr/share/yunohost/yunohost-config/ssl/yunoCA" ynh_ca="/etc/yunohost/certs/yunohost.org/ca.pem" ynh_crt="/etc/yunohost/certs/yunohost.org/crt.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() { @@ -26,7 +26,7 @@ regen_local_ca() { RANDFILE=.rnd openssl rand -hex 19 >serial rm -f 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 openssl req -x509 \ -new \ @@ -57,7 +57,7 @@ do_init_regen() { # Make sure this conf exists 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 if [[ ! -f "$ynh_ca" ]]; then @@ -99,7 +99,7 @@ do_init_regen() { do_pre_regen() { 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" } diff --git a/hooks/conf_regen/03-ssh b/hooks/conf_regen/03-ssh index dd1589204..0c700c01f 100755 --- a/hooks/conf_regen/03-ssh +++ b/hooks/conf_regen/03-ssh @@ -7,7 +7,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/ssh + cd /usr/share/yunohost/conf/ssh # do not listen to IPv6 if unavailable [[ -f /proc/net/if_inet6 ]] && ipv6_enabled=true || ipv6_enabled=false diff --git a/hooks/conf_regen/06-slapd b/hooks/conf_regen/06-slapd index 0c52e4998..616b383ec 100755 --- a/hooks/conf_regen/06-slapd +++ b/hooks/conf_regen/06-slapd @@ -4,8 +4,8 @@ set -e tmp_backup_dir_file="/root/slapd-backup-dir.txt" -config="/usr/share/yunohost/templates/slapd/config.ldif" -db_init="/usr/share/yunohost/templates/slapd/db_init.ldif" +config="/usr/share/yunohost/conf/slapd/config.ldif" +db_init="/usr/share/yunohost/conf/slapd/db_init.ldif" do_init_regen() { if [[ $EUID -ne 0 ]]; then @@ -109,7 +109,7 @@ do_pre_regen() { schema_dir="${ldap_dir}/schema" mkdir -p "$ldap_dir" "$schema_dir" - cd /usr/share/yunohost/templates/slapd + cd /usr/share/yunohost/conf/slapd # copy configuration files cp -a ldap.conf "$ldap_dir" diff --git a/hooks/conf_regen/09-nslcd b/hooks/conf_regen/09-nslcd index ff1c05433..9d5e5e538 100755 --- a/hooks/conf_regen/09-nslcd +++ b/hooks/conf_regen/09-nslcd @@ -10,7 +10,7 @@ do_init_regen() { do_pre_regen() { 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" } diff --git a/hooks/conf_regen/12-metronome b/hooks/conf_regen/12-metronome index 5dfa7b5dc..4802b750e 100755 --- a/hooks/conf_regen/12-metronome +++ b/hooks/conf_regen/12-metronome @@ -5,7 +5,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/metronome + cd /usr/share/yunohost/conf/metronome # create directories for pending conf metronome_dir="${pending_dir}/etc/metronome" diff --git a/hooks/conf_regen/15-nginx b/hooks/conf_regen/15-nginx index b585e3cb5..c1d943681 100755 --- a/hooks/conf_regen/15-nginx +++ b/hooks/conf_regen/15-nginx @@ -10,7 +10,7 @@ do_init_regen() { exit 1 fi - cd /usr/share/yunohost/templates/nginx + cd /usr/share/yunohost/conf/nginx nginx_dir="/etc/nginx" nginx_conf_dir="${nginx_dir}/conf.d" @@ -47,7 +47,7 @@ do_init_regen() { do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/nginx + cd /usr/share/yunohost/conf/nginx nginx_dir="${pending_dir}/etc/nginx" nginx_conf_dir="${nginx_dir}/conf.d" diff --git a/hooks/conf_regen/19-postfix b/hooks/conf_regen/19-postfix index 7865cd312..4a7325c41 100755 --- a/hooks/conf_regen/19-postfix +++ b/hooks/conf_regen/19-postfix @@ -7,7 +7,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/postfix + cd /usr/share/yunohost/conf/postfix postfix_dir="${pending_dir}/etc/postfix" mkdir -p "$postfix_dir" diff --git a/hooks/conf_regen/25-dovecot b/hooks/conf_regen/25-dovecot index e95816604..9a51d0363 100755 --- a/hooks/conf_regen/25-dovecot +++ b/hooks/conf_regen/25-dovecot @@ -7,7 +7,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/dovecot + cd /usr/share/yunohost/conf/dovecot dovecot_dir="${pending_dir}/etc/dovecot" mkdir -p "${dovecot_dir}/global_script" diff --git a/hooks/conf_regen/31-rspamd b/hooks/conf_regen/31-rspamd index 72a35fdcc..536aec7c2 100755 --- a/hooks/conf_regen/31-rspamd +++ b/hooks/conf_regen/31-rspamd @@ -5,7 +5,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/rspamd + cd /usr/share/yunohost/conf/rspamd install -D -m 644 metrics.local.conf \ "${pending_dir}/etc/rspamd/local.d/metrics.conf" diff --git a/hooks/conf_regen/34-mysql b/hooks/conf_regen/34-mysql index 13730e0bb..d7ddf1a90 100755 --- a/hooks/conf_regen/34-mysql +++ b/hooks/conf_regen/34-mysql @@ -6,7 +6,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/mysql + cd /usr/share/yunohost/conf/mysql # Nothing to do } diff --git a/hooks/conf_regen/37-mdns b/hooks/conf_regen/37-mdns index faa581efa..ff674c391 100755 --- a/hooks/conf_regen/37-mdns +++ b/hooks/conf_regen/37-mdns @@ -29,7 +29,7 @@ do_init_regen() { do_pre_regen() { pending_dir="$1" - cd /usr/share/yunohost/templates/mdns + cd /usr/share/yunohost/conf/mdns mkdir -p ${pending_dir}/etc/systemd/system/ cp yunomdns.service ${pending_dir}/etc/systemd/system/ diff --git a/hooks/conf_regen/43-dnsmasq b/hooks/conf_regen/43-dnsmasq index 13c442158..406762ecb 100755 --- a/hooks/conf_regen/43-dnsmasq +++ b/hooks/conf_regen/43-dnsmasq @@ -6,7 +6,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/dnsmasq + cd /usr/share/yunohost/conf/dnsmasq # create directory for pending conf dnsmasq_dir="${pending_dir}/etc/dnsmasq.d" diff --git a/hooks/conf_regen/46-nsswitch b/hooks/conf_regen/46-nsswitch index 2c984a905..cc34d0277 100755 --- a/hooks/conf_regen/46-nsswitch +++ b/hooks/conf_regen/46-nsswitch @@ -10,7 +10,7 @@ do_init_regen() { do_pre_regen() { 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" } diff --git a/hooks/conf_regen/52-fail2ban b/hooks/conf_regen/52-fail2ban index 6cbebbfb1..8129e977d 100755 --- a/hooks/conf_regen/52-fail2ban +++ b/hooks/conf_regen/52-fail2ban @@ -7,7 +7,7 @@ set -e do_pre_regen() { pending_dir=$1 - cd /usr/share/yunohost/templates/fail2ban + cd /usr/share/yunohost/conf/fail2ban fail2ban_dir="${pending_dir}/etc/fail2ban" mkdir -p "${fail2ban_dir}/filter.d" diff --git a/src/diagnosis/10-ip.py b/src/diagnosis/10-ip.py index 408019668..bc00fe25c 100644 --- a/src/diagnosis/10-ip.py +++ b/src/diagnosis/10-ip.py @@ -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 resolver_file = ( - "/usr/share/yunohost/templates/dnsmasq/plain/resolv.dnsmasq.conf" + "/usr/share/yunohost/conf/dnsmasq/plain/resolv.dnsmasq.conf" ) resolvers = [ r.split(" ")[1] diff --git a/src/diagnosis/24-mail.py b/src/diagnosis/24-mail.py index c5af4bbc6..f29b2786d 100644 --- a/src/diagnosis/24-mail.py +++ b/src/diagnosis/24-mail.py @@ -14,7 +14,7 @@ from yunohost.domain import _get_maindomain, domain_list from yunohost.settings import settings_get 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): diff --git a/src/dns.py b/src/dns.py index 534ade918..cad0ff2f5 100644 --- a/src/dns.py +++ b/src/dns.py @@ -50,7 +50,7 @@ from yunohost.hook import hook_callback 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): diff --git a/src/domain.py b/src/domain.py index 0bd84ea82..3c244f9cf 100644 --- a/src/domain.py +++ b/src/domain.py @@ -44,7 +44,7 @@ from yunohost.log import is_unit_operation 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" # Lazy dev caching to avoid re-query ldap every time we need the domain list diff --git a/src/service.py b/src/service.py index 73534e2e3..527ca5813 100644 --- a/src/service.py +++ b/src/service.py @@ -48,7 +48,7 @@ from moulinette.utils.filesystem import ( MOULINETTE_LOCK = "/var/run/moulinette_yunohost.lock" 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") diff --git a/src/utils/config.py b/src/utils/config.py index 5d1d1f9d2..352e25be6 100644 --- a/src/utils/config.py +++ b/src/utils/config.py @@ -192,7 +192,7 @@ def evaluate_simple_js_expression(expr, context={}): class ConfigPanel: entity_type = "config" 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" @classmethod diff --git a/src/utils/password.py b/src/utils/password.py index 188850183..04a1ed272 100644 --- a/src/utils/password.py +++ b/src/utils/password.py @@ -36,7 +36,7 @@ SMALL_PWD_LIST = [ "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 STRENGTH_LEVELS = [ diff --git a/tests/add_missing_keys.py b/tests/add_missing_keys.py index 30c6c6640..1bf335418 100644 --- a/tests/add_missing_keys.py +++ b/tests/add_missing_keys.py @@ -24,11 +24,11 @@ def find_expected_string_keys(): p3 = re.compile(r"YunohostValidationError\(\n*\s*[\'\"](\w+)[\'\"]") p4 = re.compile(r"# i18n: [\'\"]?(\w+)[\'\"]?") - python_files = glob.glob("src/yunohost/*.py") - python_files.extend(glob.glob("src/yunohost/utils/*.py")) - python_files.extend(glob.glob("src/yunohost/data_migrations/*.py")) - python_files.extend(glob.glob("src/yunohost/authenticators/*.py")) - python_files.extend(glob.glob("data/hooks/diagnosis/*.py")) + python_files = glob.glob("src/*.py") + python_files.extend(glob.glob("src/utils/*.py")) + python_files.extend(glob.glob("src/data_migrations/*.py")) + python_files.extend(glob.glob("src/authenticators/*.py")) + python_files.extend(glob.glob("src/diagnosis/*.py")) python_files.append("bin/yunohost") 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) # Also we expect to have "diagnosis_description_" for each diagnosis 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() for m in p3.findall(content): if m.endswith("_"): @@ -63,14 +63,14 @@ def find_expected_string_keys(): ] # For each migration, expect to find "migration_description_" - for path in glob.glob("src/yunohost/data_migrations/*.py"): + for path in glob.glob("src/data_migrations/*.py"): if "__init__" in path: continue yield "migration_description_" + os.path.basename(path)[:-3] # For each default service, expect to find "service_description_" for service, info in yaml.safe_load( - open("data/templates/yunohost/services.yml") + open("conf/yunohost/services.yml") ).items(): if info is None: continue @@ -79,7 +79,7 @@ def find_expected_string_keys(): # For all unit operations, expect to find "log_" # A unit operation is created either using the @is_unit_operation decorator # 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 ( subprocess.check_output(cmd, shell=True).decode("utf-8").strip().split("\n") ): @@ -94,14 +94,14 @@ def find_expected_string_keys(): # Global settings descriptions # Will be on a line like : ("service.ssh.allow_deprecated_dsa_hostkey", {"type": "bool", ... p5 = re.compile(r" \(\n*\s*[\"\'](\w[\w\.]+)[\"\'],") - content = open("src/yunohost/settings.py").read() + content = open("src/settings.py").read() for m in ( "global_settings_setting_" + s.replace(".", "_") for s in p5.findall(content) ): yield m # 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(): continue for action in category["actions"].values(): diff --git a/tests/test_actionmap.py b/tests/test_actionmap.py index 0b8abb152..e482bdfe1 100644 --- a/tests/test_actionmap.py +++ b/tests/test_actionmap.py @@ -2,4 +2,4 @@ import yaml def test_yaml_syntax(): - yaml.safe_load(open("data/actionsmap/yunohost.yml")) + yaml.safe_load(open("share/actionsmap.yml")) diff --git a/tests/test_i18n_keys.py b/tests/test_i18n_keys.py index 103241085..d0ae75bfc 100644 --- a/tests/test_i18n_keys.py +++ b/tests/test_i18n_keys.py @@ -25,11 +25,11 @@ def find_expected_string_keys(): p3 = re.compile(r"YunohostValidationError\(\n*\s*[\'\"](\w+)[\'\"]") p4 = re.compile(r"# i18n: [\'\"]?(\w+)[\'\"]?") - python_files = glob.glob("src/yunohost/*.py") - python_files.extend(glob.glob("src/yunohost/utils/*.py")) - python_files.extend(glob.glob("src/yunohost/data_migrations/*.py")) - python_files.extend(glob.glob("src/yunohost/authenticators/*.py")) - python_files.extend(glob.glob("data/hooks/diagnosis/*.py")) + python_files = glob.glob("src/*.py") + python_files.extend(glob.glob("src/utils/*.py")) + python_files.extend(glob.glob("src/data_migrations/*.py")) + python_files.extend(glob.glob("src/authenticators/*.py")) + python_files.extend(glob.glob("src/diagnosis/*.py")) python_files.append("bin/yunohost") 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) # Also we expect to have "diagnosis_description_" for each diagnosis 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() for m in p3.findall(content): if m.endswith("_"): @@ -64,14 +64,14 @@ def find_expected_string_keys(): ] # For each migration, expect to find "migration_description_" - for path in glob.glob("src/yunohost/data_migrations/*.py"): + for path in glob.glob("src/data_migrations/*.py"): if "__init__" in path: continue yield "migration_description_" + os.path.basename(path)[:-3] # For each default service, expect to find "service_description_" for service, info in yaml.safe_load( - open("data/templates/yunohost/services.yml") + open("conf/yunohost/services.yml") ).items(): if info is None: continue @@ -80,7 +80,7 @@ def find_expected_string_keys(): # For all unit operations, expect to find "log_" # A unit operation is created either using the @is_unit_operation decorator # 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 ( subprocess.check_output(cmd, shell=True).decode("utf-8").strip().split("\n") ): @@ -95,14 +95,14 @@ def find_expected_string_keys(): # Global settings descriptions # Will be on a line like : ("service.ssh.allow_deprecated_dsa_hostkey", {"type": "bool", ... p5 = re.compile(r" \(\n*\s*[\"\'](\w[\w\.]+)[\"\'],") - content = open("src/yunohost/settings.py").read() + content = open("src/settings.py").read() for m in ( "global_settings_setting_" + s.replace(".", "_") for s in p5.findall(content) ): yield m # 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(): continue for action in category["actions"].values(): @@ -130,13 +130,13 @@ def find_expected_string_keys(): yield "backup_applying_method_%s" % 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"] for registrar in supported_registrars: for key in registrars[registrar].keys(): 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(): if not isinstance(panel, dict): continue diff --git a/tox.ini b/tox.ini index f00cc7fb8..e5cffb696 100644 --- a/tox.ini +++ b/tox.ini @@ -8,8 +8,8 @@ deps = py39-black-{run,check}: black py39-mypy: mypy >= 0.900 commands = - py39-lint: flake8 src doc data tests --ignore E402,E501,E203,W503 --exclude src/yunohost/vendor - py39-invalidcode: flake8 src data --exclude src/yunohost/tests,src/yunohost/vendor --select F,E722,W605 + py39-lint: flake8 src doc data tests --ignore E402,E501,E203,W503 --exclude src/vendor + 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-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) From ebf9d522e05f01038ffbe948e9c23e162c57baa9 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 10 Nov 2021 19:51:11 +0100 Subject: [PATCH 3/6] Adapt diagnosers code to load them as python modules instead of hooks --- src/diagnosis.py | 68 ++++++++++++++++++----------- src/diagnosis/00-basesystem.py | 21 +++++---- src/diagnosis/10-ip.py | 13 +++--- src/diagnosis/12-dnsrecords.py | 12 +++-- src/diagnosis/14-ports.py | 6 +-- src/diagnosis/21-web.py | 6 +-- src/diagnosis/24-mail.py | 11 +++-- src/diagnosis/30-services.py | 6 +-- src/diagnosis/50-systemresources.py | 6 +-- src/diagnosis/70-regenconf.py | 6 +-- src/diagnosis/80-apps.py | 6 +-- 11 files changed, 74 insertions(+), 87 deletions(-) diff --git a/src/diagnosis.py b/src/diagnosis.py index 4ac5e2731..a7b6c725c 100644 --- a/src/diagnosis.py +++ b/src/diagnosis.py @@ -27,6 +27,8 @@ import re import os import time +import glob +from importlib import import_module from moulinette import m18n, Moulinette from moulinette.utils import log @@ -38,7 +40,6 @@ from moulinette.utils.filesystem import ( ) from yunohost.utils.error import YunohostError, YunohostValidationError -from yunohost.hook import hook_list, hook_exec logger = log.getActionLogger("yunohost.diagnosis") @@ -48,15 +49,13 @@ DIAGNOSIS_SERVER = "diagnosis.yunohost.org" def diagnosis_list(): - all_categories_names = [h for h, _ in _list_diagnosis_categories()] - return {"categories": all_categories_names} + return {"categories": _list_diagnosis_categories()} def diagnosis_get(category, item): # Get all the categories - all_categories = _list_diagnosis_categories() - all_categories_names = [c for c, _ in all_categories] + all_categories_names = _list_diagnosis_categories() if category not in all_categories_names: raise YunohostValidationError( @@ -84,8 +83,7 @@ def diagnosis_show( return # Get all the categories - all_categories = _list_diagnosis_categories() - all_categories_names = [category for category, _ in all_categories] + all_categories_names = _list_diagnosis_categories() # Check the requested category makes sense if categories == []: @@ -174,8 +172,7 @@ def diagnosis_run( return # Get all the categories - all_categories = _list_diagnosis_categories() - all_categories_names = [category for category, _ in all_categories] + all_categories_names = _list_diagnosis_categories() # Check the requested category makes sense if categories == []: @@ -192,10 +189,11 @@ def diagnosis_run( diagnosed_categories = [] for category in categories: logger.debug("Running diagnosis for %s ..." % category) - path = [p for n, p in all_categories if n == category][0] + + diagnoser = _load_diagnoser(category) try: - code, report = hook_exec(path, args={"force": force}, env=None) + code, report = diagnoser.diagnose(force=force) except Exception: import traceback @@ -275,8 +273,7 @@ def _diagnosis_ignore(add_filter=None, remove_filter=None, list=False): def validate_filter_criterias(filter_): # Get all the categories - all_categories = _list_diagnosis_categories() - all_categories_names = [category for category, _ in all_categories] + all_categories_names = _list_diagnosis_categories() # Sanity checks for the provided arguments if len(filter_) == 0: @@ -404,12 +401,8 @@ def add_ignore_flag_to_issues(report): class Diagnoser: - def __init__(self, args, env, loggers): + def __init__(self): - # FIXME ? That stuff with custom loggers is weird ... (mainly inherited from the bash hooks, idk) - self.logger_debug, self.logger_warning, self.logger_info = loggers - self.env = env - self.args = args or {} self.cache_file = Diagnoser.cache_file(self.id_) self.description = Diagnoser.get_description(self.id_) @@ -424,10 +417,10 @@ class Diagnoser: os.makedirs(DIAGNOSIS_CACHE) return write_to_json(self.cache_file, report) - def diagnose(self): + def diagnose(self, force=False): if ( - not self.args.get("force", False) + not force and self.cached_time_ago() < self.cache_duration ): self.logger_debug("Cache still valid : %s" % self.cache_file) @@ -666,13 +659,36 @@ class Diagnoser: def _list_diagnosis_categories(): - hooks_raw = hook_list("diagnosis", list_by="priority", show_info=True)["hooks"] - hooks = [] - for _, some_hooks in sorted(hooks_raw.items(), key=lambda h: int(h[0])): - for name, info in some_hooks.items(): - hooks.append((name, info["path"])) - return hooks + paths = glob.glob(os.path.dirname(__file__) + "/diagnosis/??-*.py") + names = sorted([os.path.basename(path)[: -len(".py")] for path in paths]) + + return names + + +def _load_diagnoser(diagnoser_name): + + logger.debug(f"Loading diagnoser {diagnoser_name}") + + paths = glob.glob(os.path.dirname(__file__) + f"/diagnosis/??-{diagnoser_name}.py") + + if len(paths) != 1: + raise YunohostError(f"Uhoh, found several matches (or none?) for diagnoser {diagnoser_name} : {paths}", raw_msg=True) + + module_id = os.path.basename(paths[0][: -len(".py")]) + + try: + # this is python builtin method to import a module using a name, we + # use that to import the migration as a python object so we'll be + # able to run it in the next loop + module = import_module("yunohost.diagnosis.{}".format(module_id)) + return module.MyDiagnoser() + except Exception as e: + import traceback + + traceback.print_exc() + + raise YunohostError(f"Failed to load diagnoser {diagnoser_name} : {e}", raw_msg=True) def _email_diagnosis_issues(): diff --git a/src/diagnosis/00-basesystem.py b/src/diagnosis/00-basesystem.py index b472a2d32..66a2bf47b 100644 --- a/src/diagnosis/00-basesystem.py +++ b/src/diagnosis/00-basesystem.py @@ -4,13 +4,16 @@ import os import json import subprocess +from moulinette.utils import log from moulinette.utils.process import check_output from moulinette.utils.filesystem import read_file, read_json, write_to_json from yunohost.diagnosis import Diagnoser from yunohost.utils.packages import ynh_packages_version +logger = log.getActionLogger("yunohost.diagnosis") -class BaseSystemDiagnoser(Diagnoser): + +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 @@ -172,7 +175,7 @@ class BaseSystemDiagnoser(Diagnoser): try: return int(n_failures) except Exception: - self.logger_warning( + logger.warning( "Failed to parse number of recent auth failures, expected an int, got '%s'" % n_failures ) @@ -196,7 +199,7 @@ class BaseSystemDiagnoser(Diagnoser): if not os.path.exists(dpkg_log) or os.path.getmtime( cache_file ) > os.path.getmtime(dpkg_log): - self.logger_debug( + logger.debug( "Using cached results for meltdown checker, from %s" % cache_file ) return read_json(cache_file)[0]["VULNERABLE"] @@ -209,7 +212,7 @@ class BaseSystemDiagnoser(Diagnoser): # example output from the script: # [{"NAME":"MELTDOWN","CVE":"CVE-2017-5754","VULNERABLE":false,"INFOS":"PTI mitigates the vulnerability"}] try: - self.logger_debug("Running meltdown vulnerability checker") + logger.debug("Running meltdown vulnerability checker") call = subprocess.Popen( "bash %s --batch json --variant 3" % SCRIPT_PATH, shell=True, @@ -231,7 +234,7 @@ class BaseSystemDiagnoser(Diagnoser): # stuff which should be the last line output = output.strip() if "\n" in output: - self.logger_debug("Original meltdown checker output : %s" % output) + logger.debug("Original meltdown checker output : %s" % output) output = output.split("\n")[-1] CVEs = json.loads(output) @@ -241,18 +244,14 @@ class BaseSystemDiagnoser(Diagnoser): import traceback traceback.print_exc() - self.logger_warning( + logger.warning( "Something wrong happened when trying to diagnose Meltdown vunerability, exception: %s" % e ) raise Exception("Command output for failed meltdown check: '%s'" % output) - self.logger_debug( + logger.debug( "Writing results from meltdown checker to cache file, %s" % cache_file ) write_to_json(cache_file, CVEs) return CVEs[0]["VULNERABLE"] - - -def main(args, env, loggers): - return BaseSystemDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/10-ip.py b/src/diagnosis/10-ip.py index bc00fe25c..4ad4cfbfc 100644 --- a/src/diagnosis/10-ip.py +++ b/src/diagnosis/10-ip.py @@ -4,6 +4,7 @@ import re import os import random +from moulinette.utils import log from moulinette.utils.network import download_text from moulinette.utils.process import check_output from moulinette.utils.filesystem import read_file @@ -11,8 +12,10 @@ from moulinette.utils.filesystem import read_file from yunohost.diagnosis import Diagnoser from yunohost.utils.network import get_network_interfaces +logger = log.getActionLogger("yunohost.diagnosis") -class IPDiagnoser(Diagnoser): + +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 @@ -144,7 +147,7 @@ class IPDiagnoser(Diagnoser): ) if not any(is_default_route(r) for r in routes): - self.logger_debug( + logger.debug( "No default route for IPv%s, so assuming there's no IP address for that version" % protocol ) @@ -220,11 +223,7 @@ class IPDiagnoser(Diagnoser): try: return download_text(url, timeout=30).strip() except Exception as e: - self.logger_debug( + logger.debug( "Could not get public IPv%s : %s" % (str(protocol), str(e)) ) return None - - -def main(args, env, loggers): - return IPDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/12-dnsrecords.py b/src/diagnosis/12-dnsrecords.py index d45ebd9b8..305fda79b 100644 --- a/src/diagnosis/12-dnsrecords.py +++ b/src/diagnosis/12-dnsrecords.py @@ -6,6 +6,7 @@ import re from datetime import datetime, timedelta from publicsuffix2 import PublicSuffixList +from moulinette.utils import log from moulinette.utils.process import check_output from yunohost.utils.dns import ( @@ -18,8 +19,9 @@ from yunohost.diagnosis import Diagnoser from yunohost.domain import domain_list, _get_maindomain from yunohost.dns import _build_dns_conf, _get_dns_zone_for_domain +logger = log.getActionLogger("yunohost.diagnosis") -class DNSRecordsDiagnoser(Diagnoser): +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 @@ -31,7 +33,7 @@ class DNSRecordsDiagnoser(Diagnoser): major_domains = domain_list(exclude_subdomains=True)["domains"] for domain in major_domains: - self.logger_debug("Diagnosing DNS conf for %s" % domain) + logger.debug("Diagnosing DNS conf for %s" % domain) for report in self.check_domain( domain, @@ -223,7 +225,7 @@ class DNSRecordsDiagnoser(Diagnoser): ) ) else: - self.logger_debug("Dyndns domain: %s" % (domain)) + logger.debug("Dyndns domain: %s" % (domain)) continue expire_in = expire_date - datetime.now() @@ -298,7 +300,3 @@ class DNSRecordsDiagnoser(Diagnoser): return datetime.strptime(match.group(1), "%d-%b-%Y") return "expiration_not_found" - - -def main(args, env, loggers): - return DNSRecordsDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/14-ports.py b/src/diagnosis/14-ports.py index 7581a1ac6..e339a946c 100644 --- a/src/diagnosis/14-ports.py +++ b/src/diagnosis/14-ports.py @@ -6,7 +6,7 @@ from yunohost.diagnosis import Diagnoser from yunohost.service import _get_services -class PortsDiagnoser(Diagnoser): +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 @@ -146,7 +146,3 @@ class PortsDiagnoser(Diagnoser): "diagnosis_ports_forwarding_tip", ], ) - - -def main(args, env, loggers): - return PortsDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/21-web.py b/src/diagnosis/21-web.py index 450296e7e..3d9fb9f73 100644 --- a/src/diagnosis/21-web.py +++ b/src/diagnosis/21-web.py @@ -13,7 +13,7 @@ from yunohost.utils.dns import is_special_use_tld DIAGNOSIS_SERVER = "diagnosis.yunohost.org" -class WebDiagnoser(Diagnoser): +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 @@ -198,7 +198,3 @@ class WebDiagnoser(Diagnoser): summary="diagnosis_http_partially_unreachable", details=[detail.replace("error_http_check", "diagnosis_http")], ) - - -def main(args, env, loggers): - return WebDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/24-mail.py b/src/diagnosis/24-mail.py index f29b2786d..af7af1a16 100644 --- a/src/diagnosis/24-mail.py +++ b/src/diagnosis/24-mail.py @@ -6,6 +6,7 @@ import re from subprocess import CalledProcessError +from moulinette.utils import log from moulinette.utils.process import check_output from moulinette.utils.filesystem import read_yaml @@ -16,8 +17,10 @@ from yunohost.utils.dns import dig DEFAULT_DNS_BLACKLIST = "/usr/share/yunohost/dnsbl_list.yml" +logger = log.getActionLogger("yunohost.diagnosis") -class MailDiagnoser(Diagnoser): + +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 600 @@ -42,7 +45,7 @@ class MailDiagnoser(Diagnoser): "check_queue", # i18n: diagnosis_mail_queue_ok ] for check in checks: - self.logger_debug("Running " + check) + logger.debug("Running " + check) reports = list(getattr(self, check)()) for report in reports: yield report @@ -292,7 +295,3 @@ class MailDiagnoser(Diagnoser): if global_ipv6: outgoing_ips.append(global_ipv6) return (outgoing_ipversions, outgoing_ips) - - -def main(args, env, loggers): - return MailDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/30-services.py b/src/diagnosis/30-services.py index adbcc73b9..daf86ab1e 100644 --- a/src/diagnosis/30-services.py +++ b/src/diagnosis/30-services.py @@ -6,7 +6,7 @@ from yunohost.diagnosis import Diagnoser from yunohost.service import service_status -class ServicesDiagnoser(Diagnoser): +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 300 @@ -41,7 +41,3 @@ class ServicesDiagnoser(Diagnoser): item["summary"] = "diagnosis_services_running" yield item - - -def main(args, env, loggers): - return ServicesDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/50-systemresources.py b/src/diagnosis/50-systemresources.py index a662e392e..265e62acb 100644 --- a/src/diagnosis/50-systemresources.py +++ b/src/diagnosis/50-systemresources.py @@ -9,7 +9,7 @@ from moulinette.utils.process import check_output from yunohost.diagnosis import Diagnoser -class SystemResourcesDiagnoser(Diagnoser): +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 300 @@ -214,7 +214,3 @@ def round_(n): if n > 10: n = int(round(n)) return n - - -def main(args, env, loggers): - return SystemResourcesDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/70-regenconf.py b/src/diagnosis/70-regenconf.py index 8ccbeed58..63f6f2b32 100644 --- a/src/diagnosis/70-regenconf.py +++ b/src/diagnosis/70-regenconf.py @@ -9,7 +9,7 @@ from yunohost.regenconf import _get_regenconf_infos, _calculate_hash from moulinette.utils.filesystem import read_file -class RegenconfDiagnoser(Diagnoser): +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 300 @@ -70,7 +70,3 @@ class RegenconfDiagnoser(Diagnoser): for path, hash_ in infos["conffiles"].items(): if hash_ != _calculate_hash(path): yield {"path": path, "category": category} - - -def main(args, env, loggers): - return RegenconfDiagnoser(args, env, loggers).diagnose() diff --git a/src/diagnosis/80-apps.py b/src/diagnosis/80-apps.py index 5aec48ed8..e62acaa1f 100644 --- a/src/diagnosis/80-apps.py +++ b/src/diagnosis/80-apps.py @@ -7,7 +7,7 @@ from yunohost.app import app_list from yunohost.diagnosis import Diagnoser -class AppDiagnoser(Diagnoser): +class MyDiagnoser(Diagnoser): id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1] cache_duration = 300 @@ -90,7 +90,3 @@ class AppDiagnoser(Diagnoser): == 0 ): yield ("error", "diagnosis_apps_deprecated_practices") - - -def main(args, env, loggers): - return AppDiagnoser(args, env, loggers).diagnose() From 248d7f5678437ef0f25b0783e90fda510eae213f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 10 Nov 2021 19:53:05 +0100 Subject: [PATCH 4/6] data_migrations -> migrations --- .../0021_migrate_to_bullseye.py | 0 .../0022_php73_to_php74_pools.py | 0 .../0023_postgresql_11_to_13.py | 0 src/{data_migrations => migrations}/__init__.py | 0 src/tools.py | 10 +++++----- tests/add_missing_keys.py | 4 ++-- tests/test_i18n_keys.py | 4 ++-- tox.ini | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) rename src/{data_migrations => migrations}/0021_migrate_to_bullseye.py (100%) rename src/{data_migrations => migrations}/0022_php73_to_php74_pools.py (100%) rename src/{data_migrations => migrations}/0023_postgresql_11_to_13.py (100%) rename src/{data_migrations => migrations}/__init__.py (100%) diff --git a/src/data_migrations/0021_migrate_to_bullseye.py b/src/migrations/0021_migrate_to_bullseye.py similarity index 100% rename from src/data_migrations/0021_migrate_to_bullseye.py rename to src/migrations/0021_migrate_to_bullseye.py diff --git a/src/data_migrations/0022_php73_to_php74_pools.py b/src/migrations/0022_php73_to_php74_pools.py similarity index 100% rename from src/data_migrations/0022_php73_to_php74_pools.py rename to src/migrations/0022_php73_to_php74_pools.py diff --git a/src/data_migrations/0023_postgresql_11_to_13.py b/src/migrations/0023_postgresql_11_to_13.py similarity index 100% rename from src/data_migrations/0023_postgresql_11_to_13.py rename to src/migrations/0023_postgresql_11_to_13.py diff --git a/src/data_migrations/__init__.py b/src/migrations/__init__.py similarity index 100% rename from src/data_migrations/__init__.py rename to src/migrations/__init__.py diff --git a/src/tools.py b/src/tools.py index a92e478de..f9de32cfe 100644 --- a/src/tools.py +++ b/src/tools.py @@ -933,12 +933,12 @@ def _get_migrations_list(): migrations = [] try: - from . import data_migrations + from . import migrations except ImportError: # not data migrations present, return empty list return migrations - migrations_path = data_migrations.__path__[0] + migrations_path = migrations.__path__[0] if not os.path.exists(migrations_path): logger.warn(m18n.n("migrations_cant_reach_migration_file", migrations_path)) @@ -973,11 +973,11 @@ def _get_migration_by_name(migration_name): """ try: - from . import data_migrations + from . import migrations except ImportError: raise AssertionError("Unable to find migration with name %s" % migration_name) - migrations_path = data_migrations.__path__[0] + migrations_path = migrations.__path__[0] migrations_found = [ x for x in os.listdir(migrations_path) @@ -1001,7 +1001,7 @@ def _load_migration(migration_file): # this is python builtin method to import a module using a name, we # use that to import the migration as a python object so we'll be # able to run it in the next loop - module = import_module("yunohost.data_migrations.{}".format(migration_id)) + module = import_module("yunohost.migrations.{}".format(migration_id)) return module.MyMigration(migration_id) except Exception as e: import traceback diff --git a/tests/add_missing_keys.py b/tests/add_missing_keys.py index 1bf335418..e1ecbf56e 100644 --- a/tests/add_missing_keys.py +++ b/tests/add_missing_keys.py @@ -26,7 +26,7 @@ def find_expected_string_keys(): python_files = glob.glob("src/*.py") python_files.extend(glob.glob("src/utils/*.py")) - python_files.extend(glob.glob("src/data_migrations/*.py")) + python_files.extend(glob.glob("src/migrations/*.py")) python_files.extend(glob.glob("src/authenticators/*.py")) python_files.extend(glob.glob("src/diagnosis/*.py")) python_files.append("bin/yunohost") @@ -63,7 +63,7 @@ def find_expected_string_keys(): ] # For each migration, expect to find "migration_description_" - for path in glob.glob("src/data_migrations/*.py"): + for path in glob.glob("src/migrations/*.py"): if "__init__" in path: continue yield "migration_description_" + os.path.basename(path)[:-3] diff --git a/tests/test_i18n_keys.py b/tests/test_i18n_keys.py index d0ae75bfc..b25d35923 100644 --- a/tests/test_i18n_keys.py +++ b/tests/test_i18n_keys.py @@ -27,7 +27,7 @@ def find_expected_string_keys(): python_files = glob.glob("src/*.py") python_files.extend(glob.glob("src/utils/*.py")) - python_files.extend(glob.glob("src/data_migrations/*.py")) + python_files.extend(glob.glob("src/migrations/*.py")) python_files.extend(glob.glob("src/authenticators/*.py")) python_files.extend(glob.glob("src/diagnosis/*.py")) python_files.append("bin/yunohost") @@ -64,7 +64,7 @@ def find_expected_string_keys(): ] # For each migration, expect to find "migration_description_" - for path in glob.glob("src/data_migrations/*.py"): + for path in glob.glob("src/migrations/*.py"): if "__init__" in path: continue yield "migration_description_" + os.path.basename(path)[:-3] diff --git a/tox.ini b/tox.ini index e5cffb696..3e3fcbf2e 100644 --- a/tox.ini +++ b/tox.ini @@ -12,4 +12,4 @@ commands = 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-run: black src doc data tests - py39-mypy: mypy --ignore-missing-import --install-types --non-interactive --follow-imports silent src/ --exclude (acme_tiny|data_migrations) + py39-mypy: mypy --ignore-missing-import --install-types --non-interactive --follow-imports silent src/ --exclude (acme_tiny|migrations) From e19330b0c2b13f32f47e1f0d51a4695893b6e210 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 10 Nov 2021 19:56:59 +0100 Subject: [PATCH 5/6] Aaaaand forgot to git add diagnosis/__init__.py --- src/diagnosis/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/diagnosis/__init__.py diff --git a/src/diagnosis/__init__.py b/src/diagnosis/__init__.py new file mode 100644 index 000000000..e69de29bb From 6b9ac717de86f8925d5e92b737e3126a1baaf290 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 14 Nov 2021 23:15:08 +0100 Subject: [PATCH 6/6] debian: fix metronome modules install --- debian/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/install b/debian/install index 55c535ae8..0a23cbfc9 100644 --- a/debian/install +++ b/debian/install @@ -5,6 +5,6 @@ helpers/* /usr/share/yunohost/helpers.d/ conf/* /usr/share/yunohost/conf/ doc/yunohost.8.gz /usr/share/man/man8/ doc/bash-completion.sh /etc/bash_completion.d/yunohost -lib/metronome/modules/* /usr/lib/metronome/modules/ +conf/metronome/modules/* /usr/lib/metronome/modules/ locales/* /usr/lib/moulinette/yunohost/locales/ src/ /usr/lib/moulinette/yunohost