diff --git a/README.md b/README.md index 61cda90..64b2961 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,27 @@ -# Redmine app for YunoHost +# Redmine for YunoHost -**Shipped version:** 4.0.4 +[![Integration level](https://dash.yunohost.org/integration/redmine.svg)](https://dash.yunohost.org/appci/app/redmine) ![](https://ci-apps.yunohost.org/ci/badges/redmine.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/redmine.maintain.svg) +[![Install Redmine with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=redmine) -- [Yunohost project](https://yunohost.org) -- [Redmine website](https://www.redmine.org/) +*[Lire ce readme en français.](./README_fr.md)* -![](https://dudodiprj2sv7.cloudfront.net/product-logos/ck/rN/L1BJGTE8HK3O-180x180.PNG) +> *This package allows you to install Redmine 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 +Quick description of this app. -[![Install Redmine with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=redmine) +**Shipped version:** 4.1.1 + +## Screenshots + +![](https://www.redmine.org/screenshots/issue_list.png) + +## Demo + +* [Official demo](Link to a demo site for this app.) + +## Configuration ### Installing guide @@ -20,7 +33,47 @@ 1. Login in redmine with admin / admin - -### Upgrade this package: +## Documentation - $ sudo yunohost app upgrade redmine -u https://github.com/YunoHost-Apps/redmine_ynh + * Official documentation: Link to the official documentation of this app + * YunoHost documentation: If specific documentation is needed, feel free to contribute. + +## YunoHost specific features + +#### Multi-user support + +Are LDAP and HTTP auth supported? +Can the app be used by multiple users? + +#### Supported architectures + +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/redmine%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/redmine/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/Rredmine%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/redmine/) + +## Limitations + +* Any known limitations. + +## Additional information + +* Other info you would like to add about this app. + +## Links + + * Report a bug: https://github.com/YunoHost-Apps/redmine_ynh/issues + * App website: https://www.redmine.org/ + * Upstream app repository: Link to the official repository of the upstream app. + * YunoHost website: https://yunohost.org/ + +--- + +## Developer info + +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/redmine_ynh/tree/testing). + +To try the testing branch, please proceed like that. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/redmine_ynh/tree/testing --debug +or +sudo yunohost app upgrade redmine -u https://github.com/YunoHost-Apps/redmine_ynh/tree/testing --debug +``` diff --git a/check_process b/check_process index 0cbeae3..089936a 100644 --- a/check_process +++ b/check_process @@ -8,8 +8,6 @@ domain="domain.tld" (DOMAIN) path="/" (PATH) is_public=1 (PUBLIC|public=1|private=0) -# password="pass" -# nextclouddomain="domain.tld" port="9980" (PORT) ; Checks pkg_linter=1 @@ -21,22 +19,8 @@ upgrade=1 backup_restore=1 multi_instance=1 - incorrect_path=1 port_already_use=0 change_url=0 -;;; Levels - Level 1=auto - Level 2=auto - Level 3=auto -# Level 4: - Level 4=1 (This app supports the Nextcloud LDAP auth) -# Level 5: - Level 5=auto - Level 6=auto - Level 7=auto - Level 8=0 - Level 9=0 - Level 10=0 ;;; Options Email= Notification=none diff --git a/conf/app.src b/conf/app.src index ed60d38..54259a5 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,6 @@ -SOURCE_URL=http://www.redmine.org/releases/redmine-4.0.4.tar.gz -SOURCE_SUM=61775c1cc5d373676d1610c344e828ecc7c9e63e2e517908ebfaa19a42bc12dc4677c8aa5f49b288d0a716a8705bcb66b2ee228b9f0d22c56cbd68f6e1072c4f -SOURCE_SUM_PRG=sha512sum +SOURCE_URL=https://www.redmine.org/releases/redmine-4.1.1.tar.gz +SOURCE_SUM=05faafe764330f2d77b0aacddf9d8ddce579c3d26bb8e03a7d6e7ff461f1cdda +SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true SOURCE_EXTRACT=true diff --git a/conf/nginx.conf b/conf/nginx.conf index 7958911..ff90445 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -3,7 +3,7 @@ location __PATH__/ { # Path to source # alias __FINALPATH__/ ; - proxy_pass http://127.0.0.1:3000/; + proxy_pass http://127.0.0.1:__PORT__/; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/conf/systemd.service b/conf/systemd.service index c5a3ef6..9e1f8d7 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -5,8 +5,8 @@ Requires=postgresql.service [Service] Type=simple -User=root -Group=users +User=__APP__ +Group=__APP__ WorkingDirectory=/opt/redmine Environment=RAILS_SERVE_STATIC_FILES=true ExecStart=/bin/bash -c "/opt/redmine/bin/rails s -e production -b 127.0.0.1 -p 3000" diff --git a/manifest.json b/manifest.json index 61b4988..9b8128d 100644 --- a/manifest.json +++ b/manifest.json @@ -3,10 +3,10 @@ "id": "redmine", "packaging_format": 1, "description": { - "en": "A flexible project management web application.", - "fr": "Un gestionnaire de projet flexible sous forme d'application web." + "en": "Flexible project management web application.", + "fr": "Gestionnaire de projet flexible sous forme d'application web." }, - "version": "4.0.2", + "version": "4.1.1", "url": "https://www.redmine.org/", "license": "GPL-2.0", "maintainer": { @@ -14,13 +14,11 @@ "email": "liberodark@gmail.com" }, "requirements": { - "yunohost": ">= 2.7.2" + "yunohost": ">= 3.8.1" }, "multi_instance": false, "services": [ - "nginx", - "php5-fpm", - "mysql" + "nginx" ], "arguments": { "install": [{ @@ -48,10 +46,10 @@ "name": "is_public", "type": "boolean", "ask": { - "en": "Is it a public site ?", + "en": "Is it a public site?", "fr": "Est-ce un site public ?" }, - "default": "true" + "default": true } ] } diff --git a/scripts/backup b/scripts/backup index 37458d4..8cf19b2 100644 --- a/scripts/backup +++ b/scripts/backup @@ -14,7 +14,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. true } # Exit if an error occurs during the execution of the script @@ -23,6 +22,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= +ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -31,30 +31,31 @@ domain=$(ynh_app_setting_get $app domain) db_name=$(ynh_app_setting_get $app psql_db) #================================================= -# STANDARD BACKUP STEPS +# DECLARE DATA AND CONF FILES TO BACKUP +#================================================= +ynh_print_info --message="Declaring files to be backed up..." + #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_backup "$final_path" +ynh_backup --src_path="$final_path" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= -# BACKUP THE PSQL DATABASE +# BACKUP THE MYSQL DATABASE #================================================= +ynh_print_info --message="Backing up the MySQL database..." -ynh_psql_dump_db "$db_name" > db.sql -ynh_backup "db.sql" +ynh_psql_dump_db --database="$db_name" > db.sql #================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP THE CRON FILE +# END OF SCRIPT #================================================= -#ynh_backup "/etc/cron.d/$app" +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 5249fa8..9510a90 100644 --- a/scripts/install +++ b/scripts/install @@ -29,24 +29,12 @@ domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC -### If it's a multi-instance app, meaning it can be installed several times independently -### The id of the app as stated in the manifest is available as $YNH_APP_ID -### The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...) -### The app instance name is available as $YNH_APP_INSTANCE_NAME -### - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample -### - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2 -### - ynhexample__{N} for the subsequent installations, with N=3,4, ... -### The app instance name is probably what interests you most, since this is -### guaranteed to be unique. This is a good unique identifier to define installation path, -### db names, ... app=$YNH_APP_INSTANCE_NAME #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -### If the app uses nginx as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app". -### If the app provides an internal web server (or uses another application server such as uwsgi), the final path should be "/opt/yunohost/$app" final_path=/opt/$app test ! -e "$final_path" || ynh_die "This path already contains a folder" @@ -77,25 +65,18 @@ ynh_app_setting_set $app is_public $is_public ### - Remove the section "CLOSE A PORT" in the remove script # Find a free port -#port=$(ynh_find_port 3000) +port=$(ynh_find_port 3000) + # Open this port #yunohost firewall allow --no-upnp TCP $port 2>&1 -#ynh_app_setting_set $app port $port +ynh_app_setting_set $app port $port #================================================= # INSTALL DEPENDENCIES #================================================= - ynh_print_info "Installing dependencies..." -### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package. -### Those deb packages will be installed as dependencies of this package. -### If you're not using this helper: -### - Remove the section "REMOVE DEPENDENCIES" in the remove script -### - As well as the section "REINSTALL DEPENDENCIES" in the restore script -### - And the section "UPGRADE DEPENDENCIES" in the upgrade script - -ynh_install_app_dependencies postgresql ruby-dev zlib1g-dev libpq-dev +ynh_install_app_dependencies $pkg_dependencies ynh_print_info "Installing Rails & Bunlder..." @@ -106,15 +87,6 @@ gem install rails:5.2.2 bundler:2.0.1 #================================================= ynh_print_info "Creating a PostgreSQL database..." -### Use these lines if you need a database for the application. -### `ynh_mysql_setup_db` will create a database, an associated user and a ramdom password. -### The password will be stored as 'mysqlpwd' into the app settings, -### and will be available as $db_pwd -### If you're not using these lines: -### - Remove the section "BACKUP THE POSTGRESQL DATABASE" in the backup script -### - Remove also the section "REMOVE THE POSTGRESQL DATABASE" in the remove script -### - As well as the section "RESTORE THE POSTGRESQL DATABASE" in the restore script - db_name=$(ynh_sanitize_dbid $app) db_pwd=$(ynh_string_random 8) ynh_app_setting_set $app db_name $db_name diff --git a/scripts/remove b/scripts/remove index 5f1e63b..0378a96 100644 --- a/scripts/remove +++ b/scripts/remove @@ -91,16 +91,6 @@ ynh_print_info "Removing logrotate configuration" # Remove the app-specific logrotate config ynh_remove_logrotate -#================================================= -# CLOSE A PORT -#================================================= - -if yunohost firewall list | grep -q "\- $port$" -then - ynh_print_info "Closing port $port" - ynh_exec_warn_less yunohost firewall disallow TCP $port -fi - #================================================= # SPECIFIC REMOVE #================================================= diff --git a/scripts/restore b/scripts/restore index 7b701f1..e47ddf7 100644 --- a/scripts/restore +++ b/scripts/restore @@ -85,7 +85,7 @@ chown -R $app: $final_path #================================================= # Define and install dependencies -ynh_install_app_dependencies postgresql ruby-dev zlib1g-dev libpq-dev +ynh_install_app_dependencies $pkg_dependencies ynh_print_info "Installing Rails & Bunlder..." diff --git a/scripts/upgrade b/scripts/upgrade index b8308fe..72ada4c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,7 +15,6 @@ ynh_print_info "Loading installation settings..." app=$YNH_APP_INSTANCE_NAME - domain=$(ynh_app_setting_get $app domain) path_url=$(ynh_app_setting_get $app path) admin=$(ynh_app_setting_get $app admin) @@ -169,12 +168,12 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_print_info "Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1 -systemctl reload nginx +ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT #================================================= -ynh_print_info "Upgrade of $app completed" +ynh_script_progression --message="Upgrade of $app completed" --time --last