From 60a1ca469cc7ae3b3dbe3745b1645a5994c46652 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 17 Jul 2021 17:07:13 +0200 Subject: [PATCH 1/9] Fix linter warnings --- check_process | 10 +- conf/02periodic | 2 +- config_panel.toml | 14 +-- manifest.json | 12 +- scripts/_common.sh | 278 ++------------------------------------------- scripts/_variables | 4 - scripts/backup | 13 +-- scripts/install | 11 +- scripts/restore | 5 +- scripts/upgrade | 14 +-- 10 files changed, 37 insertions(+), 326 deletions(-) delete mode 100644 scripts/_variables diff --git a/check_process b/check_process index 0e71ef0..c8ffbd8 100644 --- a/check_process +++ b/check_process @@ -26,12 +26,12 @@ setup_private=0 setup_public=0 upgrade=1 - upgrade=1 from_commit=5a359c6833a5415932ab427a80dbbdc6ca3c8e23 + upgrade=1 from_commit=4e342d41ea448c4a9de2bbbc6b6cffe92320ef71 backup_restore=1 multi_instance=0 port_already_use=0 change_url=0 - actions=1 + actions=0 config_panel=1 ;; Test complet 2/3 ; Manifest @@ -61,11 +61,9 @@ setup_nourl=1 upgrade=1 backup_restore=1 -;;; Levels - Level 5=auto ;;; Options Email= Notification=change ;;; Upgrade options - ; commit=b86b9d09ed97bf04b7e1afad72376d8d695b418b - name=Mar 14, 2018 Update helpers + ; commit=4e342d41ea448c4a9de2bbbc6b6cffe92320ef71 + name=Merge pull request #16 from YunoHost-Apps/testing diff --git a/conf/02periodic b/conf/02periodic index c640f40..8c783d6 100644 --- a/conf/02periodic +++ b/conf/02periodic @@ -23,4 +23,4 @@ APT::Periodic::AutocleanInterval "30"; // 1: progress report (actually any string) // 2: + command outputs (remove -qq, remove 2>/dev/null, add -d) // 3: + trace on -APT::Periodic::Verbose "__VERBOSITY__"; +APT::Periodic::Verbose "__UNATTENDED_VERBOSITY__"; diff --git a/config_panel.toml b/config_panel.toml index 726ea6e..319d454 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -14,12 +14,12 @@ name = "Unattended-upgrades configuration" default = "Security only" [main.unattended_configuration.ynh_update] - ask = "Would you like to update YunoHost packages automatically ?" + ask = "Would you like to update YunoHost packages automatically?" type = "boolean" default = true [main.unattended_configuration.unattended_mail] - ask = "Would you like to receive an email from Unattended-Upgrades ?" + ask = "Would you like to receive an email from Unattended-Upgrades?" choices = ["If an upgrade has been done", "Only if there was an error", "Never"] default = "If an upgrade has been done" @@ -28,7 +28,7 @@ name = "Unattended-upgrades configuration" name = "apticron cron file" [main.apticron_configuration.previous_apticron] - ask = "Would you like to receive an email to inform which upgrades need to be done ?" + ask = "Would you like to receive an email to inform which upgrades need to be done?" type = "boolean" default = true @@ -39,12 +39,12 @@ name = "Unattended-upgrades configuration" help = "Choose an hour between 12 and 23." [main.apticron_configuration.after_apticron] - ask = "Would you like to receive an email to verify if there any upgrades left after each auto upgrade ?" + ask = "Would you like to receive an email to verify if there any upgrades left after each auto upgrade?" type = "boolean" default = true [main.apticron_configuration.after_apticron_hour] - ask = "When do you want to receive this email ?" + ask = "When do you want to receive this email?" type = "number" default = "2" help = "Choose an hour between 0 and 10." @@ -64,7 +64,7 @@ name = "Unattended-upgrades configuration" name = "Overwriting config files" [main.overwrite_files.overwrite_periodic] - ask = "Overwrite the config file 02periodic ?" + ask = "Overwrite the config file 02periodic?" type = "boolean" default = true help = "If the file is overwritten, a backup will be created." @@ -74,7 +74,7 @@ name = "Unattended-upgrades configuration" name = "Global configuration" [main.global_config.email_type] - ask = "Send HTML email to admin ?" + ask = "Send HTML email to admin?" type = "boolean" default = true help = "Allow app scripts to send HTML mails instead of plain text." diff --git a/manifest.json b/manifest.json index 0a0ea05..8a02415 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "packaging_format": 1, "description": { "en": "Daily automatic upgrades", - "fr": "Mise à jour automatique quotidienne." + "fr": "Mise à jour automatique quotidienne" }, "version": "1.0~ynh5", "url": "https://wiki.debian.org/UnattendedUpgrades", @@ -18,7 +18,7 @@ "email": "maniackc_dev@crudelis.fr" }], "requirements": { - "yunohost": ">= 3.6.0" + "yunohost": ">= 4.2.0" }, "multi_instance": false, "services": [], @@ -38,7 +38,7 @@ "name": "ynh_update", "type": "boolean", "ask": { - "en": "Would you like to update YunoHost packages automatically ?", + "en": "Would you like to update YunoHost packages automatically?", "fr": "Souhaitez-vous mettre à jour les paquets YunoHost automatiquement ?" }, "default": true @@ -47,7 +47,7 @@ "name": "previous_apticron", "type": "boolean", "ask": { - "en": "Would you like to receive an email to inform which upgrades need to be done ?", + "en": "Would you like to receive an email to inform which upgrades need to be done?", "fr": "Souhaitez-vous recevoir un email pour vous informer des mises à jour nécessaires ?" }, "default": true @@ -56,7 +56,7 @@ "name": "after_apticron", "type": "boolean", "ask": { - "en": "Would you like to receive an email to verify if there any upgrades left after each auto upgrade ?", + "en": "Would you like to receive an email to verify if there any upgrades left after each auto upgrade?", "fr": "Souhaitez-vous recevoir un email pour vérifier s'il reste des mises à jour après chaque mise à niveau automatique ?" }, "default": true @@ -65,7 +65,7 @@ "name": "unattended_mail", "type": "string", "ask": { - "en": "Would you like to receive an email from Unattended-Upgrades ?", + "en": "Would you like to receive an email from Unattended-Upgrades?", "fr": "Souhaitez-vous recevoir un email de Unattended-Upgrades ?" }, "choices": ["If an upgrade has been done", "Only if there was an error", "Never"], diff --git a/scripts/_common.sh b/scripts/_common.sh index 3770c0f..2e332e6 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,5 +1,12 @@ #!/bin/bash +#================================================= +# COMMON VARIABLES +#================================================= + +# dependencies used by the app +pkg_dependencies="apticron unattended-upgrades apt-listchanges" + #================================================= # PERSONAL HELPERS #================================================= @@ -43,83 +50,6 @@ IS_PACKAGE_CHECK () { # FUTUR OFFICIAL HELPERS #================================================= -# Install or update the main directory yunohost.multimedia -# -# usage: ynh_multimedia_build_main_dir -ynh_multimedia_build_main_dir () { - local ynh_media_release="v1.2" - local checksum="806a827ba1902d6911095602a9221181" - - # Download yunohost.multimedia scripts - wget -nv https://github.com/YunoHost-Apps/yunohost.multimedia/archive/${ynh_media_release}.tar.gz - - # Check the control sum - echo "${checksum} ${ynh_media_release}.tar.gz" | md5sum -c --status \ - || ynh_die "Corrupt source" - - # Check if the package acl is installed. Or install it. - ynh_package_is_installed 'acl' \ - || ynh_package_install acl - - # Extract - mkdir yunohost.multimedia-master - tar -xf ${ynh_media_release}.tar.gz -C yunohost.multimedia-master --strip-components 1 - ./yunohost.multimedia-master/script/ynh_media_build.sh -} - -# Add a directory in yunohost.multimedia -# This "directory" will be a symbolic link to a existing directory. -# -# usage: ynh_multimedia_addfolder "Source directory" "Destination directory" -# -# | arg: -s, --source_dir= - Source directory - The real directory which contains your medias. -# | arg: -d, --dest_dir= - Destination directory - The name and the place of the symbolic link, relative to "/home/yunohost.multimedia" -ynh_multimedia_addfolder () { - # Declare an array to define the options of this helper. - declare -Ar args_array=( [s]=source_dir= [d]=dest_dir= ) - local source_dir - local dest_dir - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - - ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --source="$source_dir" --dest="$dest_dir" -} - -# Move a directory in yunohost.multimedia, and replace by a symbolic link -# -# usage: ynh_multimedia_movefolder "Source directory" "Destination directory" -# -# | arg: -s, --source_dir= - Source directory - The real directory which contains your medias. -# It will be moved to "Destination directory" -# A symbolic link will replace it. -# | arg: -d, --dest_dir= - Destination directory - The new name and place of the directory, relative to "/home/yunohost.multimedia" -ynh_multimedia_movefolder () { - # Declare an array to define the options of this helper. - declare -Ar args_array=( [s]=source_dir= [d]=dest_dir= ) - local source_dir - local dest_dir - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - - ./yunohost.multimedia-master/script/ynh_media_addfolder.sh --inv --source="$source_dir" --dest="$dest_dir" -} - -# Allow an user to have an write authorisation in multimedia directories -# -# usage: ynh_multimedia_addaccess user_name -# -# | arg: -u, --user_name= - The name of the user which gain this access. -ynh_multimedia_addaccess () { - # Declare an array to define the options of this helper. - declare -Ar args_array=( [u]=user_name=) - local user_name - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - - groupadd -f multimedia - usermod -a -G multimedia $user_name -} - #================================================= # EXPERIMENTAL HELPERS #================================================= @@ -265,30 +195,6 @@ __PRE_TAG1__$(yunohost tools diagnosis | grep -B 100 "services:" | sed '/service #================================================= -ynh_debian_release () { - lsb_release --codename --short -} - -is_stretch () { - if [ "$(ynh_debian_release)" == "stretch" ] - then - return 0 - else - return 1 - fi -} - -is_jessie () { - if [ "$(ynh_debian_release)" == "jessie" ] - then - return 0 - else - return 1 - fi -} - -#================================================= - ynh_maintenance_mode_ON () { # Load value of $path_url and $domain from the config if their not set if [ -z $path_url ]; then @@ -578,173 +484,3 @@ ynh_check_ram () { echo $ram fi } - -#================================================= - -# Define the values to configure php-fpm -# -# usage: ynh_get_scalable_phpfpm --usage=usage --footprint=footprint [--print] -# | arg: -f, --footprint - Memory footprint of the service (low/medium/high). -# low - Less than 20Mb of ram by pool. -# medium - Between 20Mb and 40Mb of ram by pool. -# high - More than 40Mb of ram by pool. -# Or specify exactly the footprint, the load of the service as Mb by pool instead of having a standard value. -# To have this value, use the following command and stress the service. -# watch -n0.5 ps -o user,cmd,%cpu,rss -u APP -# -# | arg: -u, --usage - Expected usage of the service (low/medium/high). -# low - Personal usage, behind the sso. -# medium - Low usage, few people or/and publicly accessible. -# high - High usage, frequently visited website. -# -# | arg: -p, --print - Print the result -# -# -# -# The footprint of the service will be used to defined the maximum footprint we can allow, which is half the maximum RAM. -# So it will be used to defined 'pm.max_children' -# A lower value for the footprint will allow more children for 'pm.max_children'. And so for -# 'pm.start_servers', 'pm.min_spare_servers' and 'pm.max_spare_servers' which are defined from the -# value of 'pm.max_children' -# NOTE: 'pm.max_children' can't exceed 4 times the number of processor's cores. -# -# The usage value will defined the way php will handle the children for the pool. -# A value set as 'low' will set the process manager to 'ondemand'. Children will start only if the -# service is used, otherwise no child will stay alive. This config gives the lower footprint when the -# service is idle. But will use more proc since it has to start a child as soon it's used. -# Set as 'medium', the process manager will be at dynamic. If the service is idle, a number of children -# equal to pm.min_spare_servers will stay alive. So the service can be quick to answer to any request. -# The number of children can grow if needed. The footprint can stay low if the service is idle, but -# not null. The impact on the proc is a little bit less than 'ondemand' as there's always a few -# children already available. -# Set as 'high', the process manager will be set at 'static'. There will be always as many children as -# 'pm.max_children', the footprint is important (but will be set as maximum a quarter of the maximum -# RAM) but the impact on the proc is lower. The service will be quick to answer as there's always many -# children ready to answer. -ynh_get_scalable_phpfpm () { - local legacy_args=ufp - # Declare an array to define the options of this helper. - declare -Ar args_array=( [u]=usage= [f]=footprint= [p]=print ) - local usage - local footprint - local print - # Manage arguments with getopts - ynh_handle_getopts_args "$@" - # Set all characters as lowercase - footprint=${footprint,,} - usage=${usage,,} - print=${print:-0} - - if [ "$footprint" = "low" ] - then - footprint=20 - elif [ "$footprint" = "medium" ] - then - footprint=35 - elif [ "$footprint" = "high" ] - then - footprint=50 - fi - - # Define the way the process manager handle child processes. - if [ "$usage" = "low" ] - then - php_pm=ondemand - elif [ "$usage" = "medium" ] - then - php_pm=dynamic - elif [ "$usage" = "high" ] - then - php_pm=static - else - ynh_die --message="Does not recognize '$usage' as an usage value." - fi - - # Get the total of RAM available, except swap. - local max_ram=$(ynh_check_ram --no_swap) - - less0() { - # Do not allow value below 1 - if [ $1 -le 0 ] - then - echo 1 - else - echo $1 - fi - } - - # Define pm.max_children - # The value of pm.max_children is the total amount of ram divide by 2 and divide again by the footprint of a pool for this app. - # So if php-fpm start the maximum of children, it won't exceed half of the ram. - php_max_children=$(( $max_ram / 2 / $footprint )) - # If process manager is set as static, use half less children. - # Used as static, there's always as many children as the value of pm.max_children - if [ "$php_pm" = "static" ] - then - php_max_children=$(( $php_max_children / 2 )) - fi - php_max_children=$(less0 $php_max_children) - - # To not overload the proc, limit the number of children to 4 times the number of cores. - local core_number=$(nproc) - local max_proc=$(( $core_number * 4 )) - if [ $php_max_children -gt $max_proc ] - then - php_max_children=$max_proc - fi - - if [ "$php_pm" = "dynamic" ] - then - # Define pm.start_servers, pm.min_spare_servers and pm.max_spare_servers for a dynamic process manager - php_min_spare_servers=$(( $php_max_children / 8 )) - php_min_spare_servers=$(less0 $php_min_spare_servers) - - php_max_spare_servers=$(( $php_max_children / 2 )) - php_max_spare_servers=$(less0 $php_max_spare_servers) - - php_start_servers=$(( $php_min_spare_servers + ( $php_max_spare_servers - $php_min_spare_servers ) /2 )) - php_start_servers=$(less0 $php_start_servers) - else - php_min_spare_servers=0 - php_max_spare_servers=0 - php_start_servers=0 - fi - - if [ $print -eq 1 ] - then - ynh_debug --message="Footprint=${footprint}Mb by pool." - ynh_debug --message="Process manager=$php_pm" - ynh_debug --message="Max RAM=${max_ram}Mb" - if [ "$php_pm" != "static" ]; then - ynh_debug --message="\nMax estimated footprint=$(( $php_max_children * $footprint ))" - ynh_debug --message="Min estimated footprint=$(( $php_min_spare_servers * $footprint ))" - fi - if [ "$php_pm" = "dynamic" ]; then - ynh_debug --message="Estimated average footprint=$(( $php_max_spare_servers * $footprint ))" - elif [ "$php_pm" = "static" ]; then - ynh_debug --message="Estimated footprint=$(( $php_max_children * $footprint ))" - fi - ynh_debug --message="\nRaw php-fpm values:" - ynh_debug --message="pm.max_children = $php_max_children" - if [ "$php_pm" = "dynamic" ]; then - ynh_debug --message="pm.start_servers = $php_start_servers" - ynh_debug --message="pm.min_spare_servers = $php_min_spare_servers" - ynh_debug --message="pm.max_spare_servers = $php_max_spare_servers" - fi - fi -} - -#================================================= - -# Execute a command as another user -# usage: exec_as USER COMMAND [ARG ...] -exec_as() { - local USER=$1 - shift 1 - - if [[ $USER = $(whoami) ]]; then - eval "$@" - else - sudo -u "$USER" "$@" - fi -} diff --git a/scripts/_variables b/scripts/_variables deleted file mode 100644 index f920283..0000000 --- a/scripts/_variables +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -# Dependencies -app_depencencies="apticron unattended-upgrades apt-listchanges" diff --git a/scripts/backup b/scripts/backup index bfc9b77..c580d77 100644 --- a/scripts/backup +++ b/scripts/backup @@ -19,16 +19,18 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME #================================================= -# SPECIFIC BACKUP +# DECLARE DATA AND CONF FILES TO BACKUP +#================================================= +ynh_print_info --message="Declaring files to be backed up..." + #================================================= # BACKUP UNATTENDED-UPGRADES CONFIG #================================================= -ynh_script_progression --message="Backing up unattended-upgrades config..." ynh_backup --src_path="/etc/apt/apt.conf.d/50unattended-upgrades" # Backup also the backup of the config file @@ -37,21 +39,18 @@ ynh_backup --src_path="/etc/apt/50unattended-upgrades.backup" #================================================= # BACKUP APT PERIODIC #================================================= -ynh_script_progression --message="Backing up APT periodic..." ynh_backup --src_path="/etc/apt/apt.conf.d/02periodic" #================================================= # BACKUP APTICRON CONFIG #================================================= -ynh_script_progression --message="Backing up Apticron config..." ynh_backup --src_path="/etc/apticron/apticron.conf" #================================================= # BACKUP THE CRON FILE #================================================= -ynh_script_progression --message="Backing up cron file..." ynh_backup --src_path="/etc/cron.d/apticron" @@ -59,4 +58,4 @@ ynh_backup --src_path="/etc/cron.d/apticron" # END OF SCRIPT #================================================= -ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last +ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/install b/scripts/install index ea7a6aa..840e8a4 100644 --- a/scripts/install +++ b/scripts/install @@ -6,9 +6,6 @@ # IMPORT GENERIC HELPERS #================================================= -# Load common variables for all scripts. -source _variables - source _common.sh source /usr/share/yunohost/helpers @@ -54,7 +51,7 @@ ynh_app_setting_set --app=$app --key=admin_mail_html --value=1 #================================================= ynh_script_progression --message="Installing dependencies..." --weight=10 -ynh_install_app_dependencies $app_depencencies +ynh_install_app_dependencies $pkg_dependencies #================================================= # SPECIFIC SETUP @@ -132,11 +129,7 @@ fi #================================================= ynh_script_progression --message="Configure APT Periodic for Unattended" --weight=2 -cp "../conf/02periodic" "/etc/apt/apt.conf.d/02periodic" -ynh_replace_string --match_string="__VERBOSITY__" --replace_string="$unattended_verbosity" --target_file="/etc/apt/apt.conf.d/02periodic" -# This config file is used by /etc/cron.daily/apt - -ynh_store_file_checksum "/etc/apt/apt.conf.d/02periodic" +ynh_add_config --template="../conf/02periodic" --destination="/etc/apt/apt.conf.d/02periodic" #================================================= # MODIFY ORIGINAL APTICRON CRON FILE diff --git a/scripts/restore b/scripts/restore index 78fc6fc..cfd9f25 100644 --- a/scripts/restore +++ b/scripts/restore @@ -6,9 +6,6 @@ # IMPORT GENERIC HELPERS #================================================= -# Load common variables for all scripts. -source ../settings/scripts/_variables - source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -33,7 +30,7 @@ app=$YNH_APP_INSTANCE_NAME #================================================= ynh_script_progression --message="Reinstalling dependencies..." --weight=10 -ynh_install_app_dependencies $app_depencencies +ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE UNATTENDED-UPGRADES CONFIG diff --git a/scripts/upgrade b/scripts/upgrade index 57113ce..8c7df94 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -6,9 +6,6 @@ # IMPORT GENERIC HELPERS #================================================= -# Load common variables for all scripts. -source _variables - source _common.sh source /usr/share/yunohost/helpers @@ -82,7 +79,7 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Upgrading dependencies..." --weight=5 -ynh_install_app_dependencies $app_depencencies +ynh_install_app_dependencies $pkg_dependencies #================================================= # SPECIFIC UPGRADE @@ -106,13 +103,8 @@ ynh_install_app_dependencies $app_depencencies if [ $overwrite_periodic -eq 1 ] then ynh_script_progression --message="Upgrading APT Periodic for Unattended..." --weight=3 - ynh_backup_if_checksum_is_different --file="/etc/apt/apt.conf.d/02periodic" - - cp "../conf/02periodic" "/etc/apt/apt.conf.d/02periodic" - ynh_replace_string --match_string="__VERBOSITY__" --replace_string="$unattended_verbosity" --target_file="/etc/apt/apt.conf.d/02periodic" - # This config file is used by /etc/cron.daily/apt - - ynh_store_file_checksum --file="/etc/apt/apt.conf.d/02periodic" + + ynh_add_config --template="../conf/02periodic" --destination="/etc/apt/apt.conf.d/02periodic" fi #================================================= From a2de6bfaf3be8c1d03a8b8b89d65340f8b58ca79 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 17 Jul 2021 17:25:54 +0200 Subject: [PATCH 2/9] Add templates --- .github/ISSUE_TEMPLATE.md | 55 ++++++++++++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 16 ++++++++++ doc/DISCLAIMER.md | 10 ++++++ doc/DISCLAIMER_fr.md | 10 ++++++ manifest.json | 6 ++++ 5 files changed, 97 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 doc/DISCLAIMER.md create mode 100644 doc/DISCLAIMER_fr.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..2729a6b --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,55 @@ +--- +name: Bug report +about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently. + +--- + +**How to post a meaningful bug report** +1. *Read this whole template first.* +2. *Determine if you are on the right place:* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* + - *When in doubt, post here and we will figure it out together.* +3. *Delete the italic comments as you write over them below, and remove this guide.* +--- + +### Describe the bug + +*A clear and concise description of what the bug is.* + +### Context + +- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* +- YunoHost version: x.x.x +- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* + - If yes, please explain: +- Using, or trying to install package version/branch: +- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* + +### Steps to reproduce + +- *If you performed a command from the CLI, the command itself is enough. For example:* + ```sh + sudo yunohost app install the_app + ``` +- *If you used the webadmin, please perform the equivalent command from the CLI first.* +- *If the error occurs in your browser, explain what you did:* + 1. *Go to '...'* + 2. *Click on '...'* + 3. *Scroll down to '...'* + 4. *See error* + +### Expected behavior + +*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* + +### Logs + +*When an operation fails, YunoHost provides a simple way to share the logs.* +- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.* +- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.* + +*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* + +*If applicable and useful, add screenshots to help explain your problem.* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## Automatic tests + +Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..55939ac --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,10 @@ +## Configuration + +Have a look to the following config files for Unattended-upgrades + * /etc/apt/apt.conf.d/50unattended-upgrades + * /etc/apt/apt.conf.d/02periodic + +And this one for Apticron + * /etc/apticron/apticron.conf +With its cron file + * /etc/cron.d/apticron diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..6731a1a --- /dev/null +++ b/doc/DISCLAIMER_fr.md @@ -0,0 +1,10 @@ +## Configuration + +Regardez les fichiers de configuration suivant pour Unattended-upgrades + * /etc/apt/apt.conf.d/50unattended-upgrades + * /etc/apt/apt.conf.d/02periodic + +Et celui-ci pour Apticron + * /etc/apticron/apticron.conf +Avec son cron + * /etc/cron.d/apticron diff --git a/manifest.json b/manifest.json index 8a02415..4c342b6 100644 --- a/manifest.json +++ b/manifest.json @@ -8,6 +8,12 @@ }, "version": "1.0~ynh5", "url": "https://wiki.debian.org/UnattendedUpgrades", + "upstream": { + "license": "GPL-2.0-or-later", + "website": "https://wiki.debian.org/UnattendedUpgrades", + "admindoc": "https://wiki.debian.org/UnattendedUpgrades", + "userdoc": "https://manpages.debian.org/stretch/apticron/apticron.1.en.html" + }, "license": "GPL-2.0-or-later", "maintainer": { "name": "", From 8cd755751c71d9f1aeb5b319f004162b4e3c84e8 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 17 Jul 2021 15:26:01 +0000 Subject: [PATCH 3/9] Auto-update README --- README.md | 61 ++++++++++++++++++++-------------------------------- README_fr.md | 59 +++++++++++++++++--------------------------------- 2 files changed, 43 insertions(+), 77 deletions(-) diff --git a/README.md b/README.md index fca5e4e..d447c35 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,27 @@ + + # Unattended-upgrades for YunoHost -[![Integration level](https://dash.yunohost.org/integration/unattended_upgrades.svg)](https://dash.yunohost.org/appci/app/unattended_upgrades) ![](https://ci-apps.yunohost.org/ci/badges/unattended_upgrades.status.svg) [![](https://ci-apps.yunohost.org/ci/badges/unattended_upgrades.maintain.svg)](https://github.com/YunoHost/Apps/#what-to-do-if-i-cant-maintain-my-app-anymore-) -[![Install Unattended-upgrades with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=unattended_upgrades) +[![Integration level](https://dash.yunohost.org/integration/unattended_upgrades.svg)](https://dash.yunohost.org/appci/app/unattended_upgrades) ![](https://ci-apps.yunohost.org/ci/badges/unattended_upgrades.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/unattended_upgrades.maintain.svg) +[![Install Unattended-upgrades with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=unattended_upgrades) *[Lire ce readme en français.](./README_fr.md)* -> *This package allow you to install Unattended-upgrades and Apticron quickly and simply on a YunoHost server. -If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* +> *This package allows you to install Unattended-upgrades quickly and simply on a YunoHost server. +If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -Unattended-upgrades can download and install security upgrades automatically and unattended, taking care to only install packages from the configured APT source, and checking for dpkg prompts about configuration file changes. +Daily automatic upgrades -Apticron is a simple script which sends emails about pending package updates such as security updates, properly handling packages on hold both by dselect and aptitude. +**Shipped version:** 1.0~ynh5 -## Screenshots -## Demo -No demo available. +## Disclaimers / important information ## Configuration @@ -31,41 +34,23 @@ And this one for Apticron With its cron file * /etc/cron.d/apticron -## Documentation +## Documentation and resources - * Official Unattended-upgrades documentation: https://wiki.debian.org/UnattendedUpgrades - * Official Apticron documentation: https://manpages.debian.org/stretch/apticron/apticron.1.en.html - * YunoHost documentation: There no other documentations, feel free to contribute. +* Official app website: https://wiki.debian.org/UnattendedUpgrades +* Official user documentation: https://manpages.debian.org/stretch/apticron/apticron.1.en.html +* Official admin documentation: https://wiki.debian.org/UnattendedUpgrades +* YunoHost documentation for this app: https://yunohost.org/app_unattended_upgrades +* Report a bug: https://github.com/YunoHost-Apps/unattended_upgrades_ynh/issues -## YunoHost specific features +## Developer info -#### Multi-users support - -#### Supported architectures - -* x86-64b - [![](https://ci-apps.yunohost.org/ci/logs/unattended_upgrades%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/unattended_upgrades/) -* ARMv8-A - [![](https://ci-apps-arm.yunohost.org/ci/logs/unattended_upgrades%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/unattended_upgrades/) -* Buster x86-64b - [![](https://ci-buster.nohost.me/ci/logs/unattended_upgrades%20%28Apps%29.svg)](https://ci-buster.nohost.me/ci/apps/unattended_upgrades/) - -## Limitations - -## Additionnal informations - -## Links - - * Report a bug: https://github.com/YunoHost-Apps/unattended_upgrades_ynh/issues - * YunoHost website: https://yunohost.org/ - ---- - -Developers infos ----------------- - -Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/unattended_upgrades_ynh/tree/testing). +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/unattended_upgrades_ynh/tree/testing). To try the testing branch, please proceed like that. ``` -sudo yunohost app install https://github.com/YunoHost-Apps/unattended_upgrades_ynh/tree/testing --force --debug +sudo yunohost app install https://github.com/YunoHost-Apps/unattended_upgrades_ynh/tree/testing --debug or sudo yunohost app upgrade unattended_upgrades -u https://github.com/YunoHost-Apps/unattended_upgrades_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index 5f91225..7016a29 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,24 +1,23 @@ # Unattended-upgrades pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/unattended_upgrades.svg)](https://dash.yunohost.org/appci/app/unattended_upgrades) ![](https://ci-apps.yunohost.org/ci/badges/unattended_upgrades.status.svg) [![](https://ci-apps.yunohost.org/ci/badges/unattended_upgrades.maintain.svg)](https://github.com/YunoHost/Apps/#what-to-do-if-i-cant-maintain-my-app-anymore-) -[![Installer Unattended-upgrades avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=unattended_upgrades) +[![Niveau d'intégration](https://dash.yunohost.org/integration/unattended_upgrades.svg)](https://dash.yunohost.org/appci/app/unattended_upgrades) ![](https://ci-apps.yunohost.org/ci/badges/unattended_upgrades.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/unattended_upgrades.maintain.svg) +[![Installer Unattended-upgrades avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=unattended_upgrades) *[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* -> *Ce package vous permet d'installer Unattended-upgrades et Apticron rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/install_fr) pour savoir comment l'installer et en profiter.* +> *Ce package vous permet d'installer Unattended-upgrades rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* -## Résumé +## Vue d'ensemble -Unattended-upgrades peut télécharger et installer des mises à niveau de sécurité automatiquement et sans surveillance, en prenant soin de n'installer que des paquets depuis la source APT configurée, et en vérifiant les invites dpkg sur les changements de fichier de configuration. +Mise à jour automatique quotidienne -Apticron est un script simple qui envoie des mails sur les mises à jour de paquets en attente telles que les mises à jour de sécurité, la gestion correcte des paquets en attente par dselect et aptitude. +**Version incluse :** 1.0~ynh5 -## Captures d'écran -## Démo -Aucune démo pour cette application. +## Avertissements / informations importantes ## Configuration @@ -31,41 +30,23 @@ Et celui-ci pour Apticron Avec son cron * /etc/cron.d/apticron -## Documentation +## Documentations et ressources - * Documentation officielle de Unattended-upgrades: https://wiki.debian.org/UnattendedUpgrades - * Documentation officielle de Apticron: https://manpages.debian.org/stretch/apticron/apticron.1.en.html - * Documentation YunoHost: Il n'y a pas d'autre documentation, n'hésitez pas à contribuer. +* Site officiel de l'app : https://wiki.debian.org/UnattendedUpgrades +* Documentation officielle utilisateur : https://manpages.debian.org/stretch/apticron/apticron.1.en.html +* Documentation officielle de l'admin : https://wiki.debian.org/UnattendedUpgrades +* Documentation YunoHost pour cette app : https://yunohost.org/app_unattended_upgrades +* Signaler un bug : https://github.com/YunoHost-Apps/unattended_upgrades_ynh/issues -## Fonctionnalités spécifiques à YunoHost - -#### Support multi-utilisateurs - -#### Architectures supportées. - -* x86-64b - [![](https://ci-apps.yunohost.org/ci/logs/unattended_upgrades%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/unattended_upgrades/) -* ARMv8-A - [![](https://ci-apps-arm.yunohost.org/ci/logs/unattended_upgrades%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/unattended_upgrades/) -* Buster x86-64b - [![](https://ci-buster.nohost.me/ci/logs/unattended_upgrades%20%28Apps%29.svg)](https://ci-buster.nohost.me/ci/apps/unattended_upgrades/) - -## Limitations - -## Informations additionnelles - -## Liens - - * Reporter un bug: https://github.com/YunoHost-Apps/unattended_upgrades_ynh/issues - * Site de YunoHost: https://yunohost.org/ - ---- - -Informations à l'intention des développeurs ----------------- +## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/unattended_upgrades_ynh/tree/testing). -Pour tester la branche testing, merci de procéder ainsi. +Pour essayer la branche testing, procédez comme suit. ``` -sudo yunohost app install https://github.com/YunoHost-Apps/unattended_upgrades_ynh/tree/testing --force --debug +sudo yunohost app install https://github.com/YunoHost-Apps/unattended_upgrades_ynh/tree/testing --debug ou sudo yunohost app upgrade unattended_upgrades -u https://github.com/YunoHost-Apps/unattended_upgrades_ynh/tree/testing --debug ``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file From c85fd015f91c1a3f145068b17832e36149a16c49 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 17 Jul 2021 19:23:07 +0200 Subject: [PATCH 4/9] Update check_process --- check_process | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/check_process b/check_process index c8ffbd8..0e0f071 100644 --- a/check_process +++ b/check_process @@ -26,12 +26,12 @@ setup_private=0 setup_public=0 upgrade=1 - upgrade=1 from_commit=4e342d41ea448c4a9de2bbbc6b6cffe92320ef71 + upgrade=1 from_commit=5a359c6833a5415932ab427a80dbbdc6ca3c8e23 backup_restore=1 multi_instance=0 port_already_use=0 change_url=0 - actions=0 + actions=1 config_panel=1 ;; Test complet 2/3 ; Manifest @@ -61,9 +61,11 @@ setup_nourl=1 upgrade=1 backup_restore=1 +;;; Levels + Level 5=auto ;;; Options Email= Notification=change ;;; Upgrade options - ; commit=4e342d41ea448c4a9de2bbbc6b6cffe92320ef71 - name=Merge pull request #16 from YunoHost-Apps/testing + ; commit=b86b9d09ed97bf04b7e1afad72376d8d695b418b + name=Mar 14, 2018 Update helpers From 9dc7a0288ed9cd8e71fd492cb39ea40eb70418ab Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 17 Jul 2021 20:41:10 +0200 Subject: [PATCH 5/9] Update check_process --- check_process | 2 -- 1 file changed, 2 deletions(-) diff --git a/check_process b/check_process index 0e0f071..26ce9d0 100644 --- a/check_process +++ b/check_process @@ -61,8 +61,6 @@ setup_nourl=1 upgrade=1 backup_restore=1 -;;; Levels - Level 5=auto ;;; Options Email= Notification=change From df0fbd2f03fadc545031da907de3798b85054e9e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 17 Jul 2021 20:42:40 +0200 Subject: [PATCH 6/9] Fix --- YEP.md | 117 ------------------------------ scripts/actions/reset_default_app | 2 - 2 files changed, 119 deletions(-) delete mode 100644 YEP.md diff --git a/YEP.md b/YEP.md deleted file mode 100644 index 914d03c..0000000 --- a/YEP.md +++ /dev/null @@ -1,117 +0,0 @@ -#### [Level 0](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-0) -[YEP 1.1 - Nommer son app et son dépot](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-11) -`Validated` -[YEP 1.2 - Inscrire l'app sur un "répertoire" connu](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-12) -`Validated` - -#### [Level 1](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-1) -[YEP 2.2 - Utiliser bash pour les scripts principaux](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-22) -`Validated` -[YEP 2.5 - Copier correctement des fichiers](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-25) -`Don't know` -[YEP 2.7 - Donner des permissions suffisantes aux instructions bash](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-27) -`Validated` -[YEP 2.15 - Suivre les instructions d'installation de l'application](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-215) -`Validated` - -#### [Level 2](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-2) -[YEP 1.5 - Mettre à jour régulièrement le statut de l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-11) -`Validated` -[YEP 2.18.2 - Gérer l'installation à la racine d’un nom de domaine](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2182) -`Not applicable` -[YEP 2.18.3 - Gérer l'installation sur un sous-domaine](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2183) -`Not applicable` -[YEP 2.18.4 - Gérer l'installation sur un chemin /path](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2184) -`Not applicable` -[YEP 4.6 - Gère le multi-instance](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-11) -`Not applicable` - -#### [Level 3](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-3) -[YEP 2.3 - Sauvegarder les réponses lors de l'installation](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-23) -`Validated` - -#### [Level 4](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-4) -[YEP 4.1 - Lier au ldap](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-41) -`Not applicable` -[YEP 4.2 - Lier l'authentification au sso](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-42) -`Not applicable` - -#### [Level 5](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-5) -[YEP 1.3 - Indiquer la licence associée au paquet](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-13) -`Validated` -[YEP 2.1 - Respecter le format du manifeste](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-21) -`Validated` - *Automatically verified.* -[YEP 2.12 - Utiliser les commandes pratiques (helpers)](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-212) -`Validated` -[YEP 2.18.1 - Lancer le script d'installation d'une webapp correctement](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2181) -`Not applicable` - -#### [Level 6](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-6) -[YEP 1.4 - Informer sur l'intention de maintenir un paquet](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-14) -`Validated` -[YEP 1.6 - Se tenir informé sur l'évolution du packaging d'apps](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-16) -`Validated` -[YEP 1.7 - Ajouter l'app à l'organisation YunoHost-Apps](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-17) -`Validated` - *Automatically verified.* -[YEP 1.8 - Publier des demandes de test](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-18) -`Validated` -[YEP 1.9 - Documenter l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-19) -`Validated` -[YEP 1.10 - Garder un historique de version propre](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-110) -`Don't know` -[YEP 2.9 - Enlever toutes traces de l'app lors de la suppression](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-29) -`Validated` -[YEP 3.3 - Faciliter le contrôle de l'intégrité des sources](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-33) -`Validated` -[YEP 3.5 - Suivre les recommendations de la documentation de l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-35) -`Validated` -[YEP 3.6 - Mettre à jour les versions contenant des CVE](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-36) -`Validated` -[YEP 4.3 - Fournir un script de sauvegarde YunoHost fonctionnel](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-43) -`Validated` - *Automatically verified.* -[YEP 4.4 - Fournir un script de restauration YunoHost fonctionnel](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-44) -`Validated` - *Automatically verified.* - -#### [Level 7](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-7) -[YEP 2.6 - Annuler l'action si les valeurs d'entrées sont incorrectes](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-26) -`Validated` -[YEP 3.2 - Ouvrir un port correctement](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-32) -`Not applicable` - -#### [Level 8](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-8) -[YEP 2.4 - Détecter et gérer les erreurs](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-24) -`Validated` -[YEP 2.8 - Modifier correctement une configuration système](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-28) -`Validated` -[YEP 2.16 - Vérifier la disponibilité des dépendances sur ARM, x86 et x64](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-216) -`Not yet validated` - *Automatically verified.* -[YEP 2.18.5 - Gérer la tuile YunoHost pour faciliter la navigation entre les applications](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-2185) -`Not applicable` -[YEP 3.4 - Isoler l'app](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-34) -`Not applicable` -[YEP 4.5 - Utiliser les hooks](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-45) -`Not applicable` - -#### [Level 9](https://github.com/YunoHost/doc/blob/master/packaging_apps_levels_fr.md#niveau-9) -[YEP 2.10 - Configurer les logs de l'application](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-210) -`Not applicable` -[YEP 2.11 - Utiliser une variable plutôt que l'app id directement](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-211) -`Validated` -[YEP 2.13 - Traduire le paquet en anglais](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-213) -`Not yet validated` -[YEP 2.14 - Remplir correctement un fichier de conf](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-214) -`Not yet validated` -[YEP 2.17 - Prendre en compte la version d'origine lors des mises à jour](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-217) -`Validated` -[YEP 4.2.1 - Déconnexion](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-421) -`Not applicable` - -#### Other YEP -[YEP 3.1 - Ne pas demander ou stocker de mot de passe LDAP](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-31) -`Not applicable` -[YEP 4.7 - Ajouter un module à la CLI](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-47) -`Not applicable` -[YEP 4.8 - Ajouter un module à l'admin web](https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-48) -`Not applicable` - -State of each YEP can be one of these: `Validated`, `Partially validated`, `Not yet validated`, `Not applicable`, `Don't know`. diff --git a/scripts/actions/reset_default_app b/scripts/actions/reset_default_app index 5be79e4..bee4768 100755 --- a/scripts/actions/reset_default_app +++ b/scripts/actions/reset_default_app @@ -7,8 +7,6 @@ #================================================= # Load common variables for all scripts. -source scripts/_variables - source scripts/_common.sh source /usr/share/yunohost/helpers From 2960f628a4334c7bf79b148044ac758008fe4157 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 17 Jul 2021 20:43:22 +0200 Subject: [PATCH 7/9] Update reset_default_config --- scripts/actions/reset_default_config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/actions/reset_default_config b/scripts/actions/reset_default_config index a30c30f..7f6a4f7 100755 --- a/scripts/actions/reset_default_config +++ b/scripts/actions/reset_default_config @@ -106,7 +106,7 @@ then cp /etc/yunohost/apps/$app/conf/02periodic "$config_file" # Recreate the default config - ynh_replace_string --match_string="__VERBOSITY__" --replace_string="$unattended_verbosity" --target_file="/etc/apt/apt.conf.d/02periodic" + ynh_replace_string --match_string="__UNATTENDED_VERBOSITY__" --replace_string="$unattended_verbosity" --target_file="/etc/apt/apt.conf.d/02periodic" fi # Calculate and store the config file checksum into the app settings From 9490b99980fd6e99719f03b578e93af7050646d0 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 17 Jul 2021 20:44:39 +0200 Subject: [PATCH 8/9] Update reset_default_config --- scripts/actions/reset_default_config | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/actions/reset_default_config b/scripts/actions/reset_default_config index 7f6a4f7..1cad8f5 100755 --- a/scripts/actions/reset_default_config +++ b/scripts/actions/reset_default_config @@ -103,10 +103,7 @@ fi if [ "$file" = "02periodic" ] then # Get the default file and overwrite the current config - cp /etc/yunohost/apps/$app/conf/02periodic "$config_file" - - # Recreate the default config - ynh_replace_string --match_string="__UNATTENDED_VERBOSITY__" --replace_string="$unattended_verbosity" --target_file="/etc/apt/apt.conf.d/02periodic" + ynh_add_config --template="../conf/02periodic" --destination="/etc/apt/apt.conf.d/02periodic" fi # Calculate and store the config file checksum into the app settings From a1dc16d7648d52a594b38c9360f07412fd5e8480 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 17 Jul 2021 23:44:15 +0200 Subject: [PATCH 9/9] Update check_process --- check_process | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/check_process b/check_process index 26ce9d0..edac46d 100644 --- a/check_process +++ b/check_process @@ -26,13 +26,13 @@ setup_private=0 setup_public=0 upgrade=1 - upgrade=1 from_commit=5a359c6833a5415932ab427a80dbbdc6ca3c8e23 + upgrade=1 from_commit=4e342d41ea448c4a9de2bbbc6b6cffe92320ef71 backup_restore=1 multi_instance=0 port_already_use=0 change_url=0 - actions=1 - config_panel=1 + actions=0 + config_panel=0 ;; Test complet 2/3 ; Manifest upgrade_level="Security and updates" @@ -65,5 +65,5 @@ Email= Notification=change ;;; Upgrade options - ; commit=b86b9d09ed97bf04b7e1afad72376d8d695b418b - name=Mar 14, 2018 Update helpers + ; commit=4e342d41ea448c4a9de2bbbc6b6cffe92320ef71 + name=Merge pull request #16 from YunoHost-Apps/testing