1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kanboard_ynh.git synced 2024-09-03 19:36:17 +02:00

Upgrade version to 1.2.19

This commit is contained in:
ericgaspar 2021-06-07 23:50:22 +02:00
parent fb885bf403
commit d98068094d
No known key found for this signature in database
GPG key ID: 574F281483054D44
7 changed files with 107 additions and 81 deletions

View file

@ -1,9 +1,9 @@
;; Test complet
; Manifest
domain="domain.tld" (DOMAIN)
path="/path" (PATH)
admin="john" (USER)
is_public=1 (PUBLIC|public=1|private=0)
domain="domain.tld"
path="/path"
admin="john"
is_public=1
; Checks
pkg_linter=1
setup_sub_dir=1
@ -15,7 +15,6 @@
upgrade=1 from_commit=f159f7a9bdbe470ec026edf09a6eebf10f23425e
backup_restore=1
multi_instance=1
port_already_use=0
change_url=1
;;; Upgrade options
; commit=f159f7a9bdbe470ec026edf09a6eebf10f23425e

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/kanboard/kanboard/archive/v1.2.18.tar.gz
SOURCE_SUM=10851cdc42c66b2bc742ac5b656a09da1b60c65c1f73876fc6c689e9385d5811
SOURCE_URL=https://github.com/kanboard/kanboard/archive/refs/tags/v1.2.19.tar.gz
SOURCE_SUM=8c2ee5394ab23a71c71525081b2738a86f1592d40d814e679791c09cede562d0
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

55
issue_template.md Normal file
View file

@ -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. *Make sure 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.*
- *In doubt, ask here and we will figure it out together.*
3. *Delete these 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 kanboard
```
- *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.*

View file

@ -6,7 +6,7 @@
"en": "Kanban project management software",
"fr": "Logiciel de gestion de projet Kanban"
},
"version": "1.2.18~ynh2",
"version": "1.2.19~ynh1",
"url": "https://kanboard.net/",
"license": "MIT",
"maintainer": {
@ -14,7 +14,7 @@
"email": ""
},
"requirements": {
"yunohost": ">= 4.1.7"
"yunohost": ">= 4.2.0"
},
"previous_maintainers": [{
"name": "mbugeia",

View file

@ -58,6 +58,14 @@ db_name=$(ynh_sanitize_dbid --db_name=$app)
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -69,6 +77,12 @@ ynh_setup_source --dest_dir="$final_path"
mkdir -p $final_path/sessions/
chmod 750 "$final_path"
chown -R $app $final_path/{data,plugins,sessions}
chmod -R 700 $final_path/sessions
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -77,14 +91,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2
# Create a dedicated nginx config
ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=2
# Create a system user
ynh_system_user_create --username=$app
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
@ -101,12 +107,10 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
ynh_script_progression --message="Configuring Kanboard..."
cp ../conf/config.php "$config_php"
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$config_php"
ynh_replace_string --match_string="__DB_NAME__" --replace_string=$db_name --target_file="$config_php"
ynh_replace_string --match_string="__USER__" --replace_string=$admin --target_file="$config_php"
ynh_replace_string --match_string="__EMAIL__" --replace_string=$email --target_file="$config_php"
ynh_replace_string --match_string="__DOMAIN__" --replace_string=$domain --target_file="$config_php"
ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php"
chmod 400 "$final_path/config.php"
chown $app "$final_path/config.php"
#=================================================
# DATABASE INITIALIZATION
@ -120,17 +124,6 @@ pushd $final_path
php$phpversion cli db:migrate --no-interaction --verbose
popd
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#================================================
# Set permissions to app files
chown -R root: $final_path
chown -R $app $final_path/{data,plugins,sessions}
chmod -R 700 $final_path/sessions
#=================================================
# SETUP FAIL2BAN
#=================================================

View file

@ -46,6 +46,14 @@ test ! -d $final_path \
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=3
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
@ -53,19 +61,9 @@ ynh_script_progression --message="Restoring Kanboard main directory..." --weight
ynh_restore_file --origin_path="$final_path"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=3
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app
#=================================================
# RESTORE USER RIGHTS
#=================================================
# Restore permissions to app files
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
chown -R $app $final_path/{data,plugins,sessions}
#=================================================

View file

@ -70,6 +70,14 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
@ -81,11 +89,17 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=3
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path"
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config.php"
fi
mkdir -p $final_path/sessions/
chmod 750 "$final_path"
chown -R $app $final_path/{data,plugins,sessions}
chmod -R 700 $final_path/sessions
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -94,14 +108,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
@ -110,20 +116,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=5
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --package="$extra_php_dependencies"
#=================================================
# SPECIFIC UPGRADE
#=================================================
# CREATE CONFIG.PHP
#=================================================
ynh_script_progression --message="Reconfiguring Kanboard..." --weight=2
# Copy and edit config.php
config_php="$final_path/config.php"
ynh_backup_if_checksum_is_different --file="$config_php"
ynh_add_config --template="../conf/config.php" --destination="$config_php"
#=================================================
# UPGRADE KANBOARD
#=================================================
@ -136,17 +128,6 @@ pushd $final_path
php$phpversion cli plugin:upgrade --no-interaction --verbose
popd
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
# Set permissions to app files
chown -R root: $final_path
chown -R $app $final_path/{data,plugins,sessions}
chmod -R 700 $final_path/sessions
#=================================================
# SETUP FAIL2BAN
#=================================================