From bbc8d2ff89506aee8275513dba48538c59770144 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 25 Feb 2019 14:48:17 +0100 Subject: [PATCH 01/14] adding notification --- check_process | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index 63e9c04..31b90cd 100644 --- a/check_process +++ b/check_process @@ -39,8 +39,8 @@ Level 9=0 Level 10=0 ;;; Options -Email= -Notification=none +Email=yalh@yahoo.com +Notification=change #;;; Upgrade options # ; commit=CommitHash # name=Name and date of the commit. From fb8ef1acb6b5dda8545d88bdbe6028106fc6c262 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 25 Feb 2019 14:56:01 +0100 Subject: [PATCH 02/14] Add notifications --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 31b90cd..7585451 100644 --- a/check_process +++ b/check_process @@ -40,7 +40,7 @@ Level 10=0 ;;; Options Email=yalh@yahoo.com -Notification=change +Notification=yes #;;; Upgrade options # ; commit=CommitHash # name=Name and date of the commit. From 8b1d7ef7ca812ddb47f1b7b5e6c770d88e4ff19f Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 14 Mar 2019 01:20:29 +0100 Subject: [PATCH 03/14] Apply last example_ynh --- pull_request_template.md | 23 +++++++++++++++++++++++ scripts/_common.sh | 7 +++++++ 2 files changed, 30 insertions(+) create mode 100644 pull_request_template.md diff --git a/pull_request_template.md b/pull_request_template.md new file mode 100644 index 0000000..b24579e --- /dev/null +++ b/pull_request_template.md @@ -0,0 +1,23 @@ +## Problem +- *Description of why you made this PR* + +## Solution +- *And how do you fix that problem* + +## PR Status +- [ ] Code finished. +- [ ] Tested with Package_check. +- [ ] Fix or enhancement tested. +- [ ] Upgrade from last version tested. +- [ ] Can be reviewed and tested. + +## Validation +--- +- [ ] **Code review** +- [ ] **Approval (LGTM)** +*Code review and approval have to be from a member of @YunoHost/apps group* +- **CI succeeded** : +[![Build Status](https://ci-apps-hq.yunohost.org/jenkins/job/writefreely_ynh%20-BRANCH-/badge/icon)](https://ci-apps-hq.yunohost.org/jenkins/job/writefreely_ynh%20-BRANCH-/) +*Please replace '-BRANCH-' in this link by the name of the branch used.* +*If the PR is from a forked repository. Please provide public results from package_check.* +When the PR is marked as ready to merge, you have to wait for 3 days before really merging it. diff --git a/scripts/_common.sh b/scripts/_common.sh index b905339..eea5970 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,5 +1,12 @@ #!/bin/bash +#================================================= +# COMMON VARIABLES +#================================================= + +# dependencies used by the app +#pkg_dependencies="deb1 deb2" + #================================================= # PERSONAL HELPERS #================================================= From 7ef468db728a8d705fe64dea925bbe4f991b0a3a Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 15 Mar 2019 09:43:19 +0100 Subject: [PATCH 04/14] Manage YEP-2.4 --- scripts/install | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index af97734..9862f1d 100755 --- a/scripts/install +++ b/scripts/install @@ -11,15 +11,6 @@ source detect_arch source ynh_systemd_action source /usr/share/yunohost/helpers -#================================================= -# MANAGE APPLICATION NOT COMPATIBLE WITH ARM -#================================================= - -if [ $architecture = "arm" ] -then - ynh_die "WriteFreely not available on Arm" -fi - #================================================= # MANAGE SCRIPT FAILURE #================================================= @@ -31,6 +22,15 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# MANAGE APPLICATION NOT COMPATIBLE WITH ARM +#================================================= + +if [ $architecture = "arm" ] +then + ynh_die "WriteFreely not available on Arm" +fi + #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= From 0a4c49b4d5aed0d20d4e20b8188fc8fab7f48a62 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 15 Mar 2019 09:52:31 +0100 Subject: [PATCH 05/14] test removing arm detection --- scripts/install | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/install b/scripts/install index 9862f1d..7911473 100755 --- a/scripts/install +++ b/scripts/install @@ -26,10 +26,6 @@ ynh_abort_if_errors # MANAGE APPLICATION NOT COMPATIBLE WITH ARM #================================================= -if [ $architecture = "arm" ] -then - ynh_die "WriteFreely not available on Arm" -fi #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST From 18a189e8a49ea9b10407f6698e257ab3949409a6 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 15 Mar 2019 19:41:21 +0100 Subject: [PATCH 06/14] add arm detection --- scripts/install | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/install b/scripts/install index 7911473..9862f1d 100755 --- a/scripts/install +++ b/scripts/install @@ -26,6 +26,10 @@ ynh_abort_if_errors # MANAGE APPLICATION NOT COMPATIBLE WITH ARM #================================================= +if [ $architecture = "arm" ] +then + ynh_die "WriteFreely not available on Arm" +fi #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST From e7670641f4d19287a1c013ed3f203501c1ecb2e8 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 15 Mar 2019 19:42:12 +0100 Subject: [PATCH 07/14] avoid rm --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 9862f1d..90bc1e4 100755 --- a/scripts/install +++ b/scripts/install @@ -26,7 +26,7 @@ ynh_abort_if_errors # MANAGE APPLICATION NOT COMPATIBLE WITH ARM #================================================= -if [ $architecture = "arm" ] +if [ $architecture = "ar1m" ] then ynh_die "WriteFreely not available on Arm" fi From 1aec9add661ca69bc5a6f0b57bfd0b0c81eaa9fe Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 15 Mar 2019 19:44:21 +0100 Subject: [PATCH 08/14] Move arm detection --- scripts/install | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index 90bc1e4..85ff14d 100755 --- a/scripts/install +++ b/scripts/install @@ -22,15 +22,6 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# MANAGE APPLICATION NOT COMPATIBLE WITH ARM -#================================================= - -if [ $architecture = "ar1m" ] -then - ynh_die "WriteFreely not available on Arm" -fi - #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= @@ -79,6 +70,15 @@ path_url=$(ynh_normalize_url_path $path_url) # Register (book) web path ynh_webpath_register $app $domain $path_url +#================================================= +# MANAGE APPLICATION NOT COMPATIBLE WITH ARM +#================================================= + +if [ $architecture = "arm" ] +then + ynh_die "WriteFreely not available on Arm" +fi + #================================================= # STORE SETTINGS FROM MANIFEST #================================================= From 30d22707b1d6e23ffd103cb9cfe4673c698b8f63 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 15 Mar 2019 19:45:51 +0100 Subject: [PATCH 09/14] Move or remove arm detection --- scripts/backup | 9 --------- scripts/remove | 9 --------- scripts/restore | 18 +++++++++--------- scripts/upgrade | 9 --------- 4 files changed, 9 insertions(+), 36 deletions(-) diff --git a/scripts/backup b/scripts/backup index 5e002b0..b41461a 100755 --- a/scripts/backup +++ b/scripts/backup @@ -11,15 +11,6 @@ source ../settings/scripts/detect_arch source ../settings/scripts/ynh_systemd_action source /usr/share/yunohost/helpers -#================================================= -# MANAGE APPLICATION NOT COMPATIBLE WITH ARM -#================================================= - -if [ $architecture = "arm" ] -then - ynh_die "WriteFreely not available on Arm" -fi - #================================================= # MANAGE SCRIPT FAILURE #================================================= diff --git a/scripts/remove b/scripts/remove index 048c44c..0aaaaf0 100755 --- a/scripts/remove +++ b/scripts/remove @@ -11,15 +11,6 @@ source _common.sh source ynh_systemd_action source /usr/share/yunohost/helpers -#================================================= -# MANAGE APPLICATION NOT COMPATIBLE WITH ARM -#================================================= - -if [ $architecture = "arm" ] -then - ynh_die "WriteFreely not available on Arm" -fi - #================================================= # LOAD SETTINGS #================================================= diff --git a/scripts/restore b/scripts/restore index 5617b42..6b80dee 100755 --- a/scripts/restore +++ b/scripts/restore @@ -11,15 +11,6 @@ source ../settings/scripts/detect_arch source ../settings/scripts/ynh_systemd_action source /usr/share/yunohost/helpers -#================================================= -# MANAGE APPLICATION NOT COMPATIBLE WITH ARM -#================================================= - -if [ $architecture = "arm" ] -then - ynh_die "WriteFreely not available on Arm" -fi - #================================================= # MANAGE SCRIPT FAILURE #================================================= @@ -53,6 +44,15 @@ ynh_webpath_available $domain $path_url \ test ! -d $final_path \ || ynh_die "There is already a directory: $final_path " +#================================================= +# MANAGE APPLICATION NOT COMPATIBLE WITH ARM +#================================================= + +if [ $architecture = "arm" ] +then + ynh_die "WriteFreely not available on Arm" +fi + #================================================= # STANDARD RESTORATION STEPS #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 9e3924c..a37ed12 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,15 +12,6 @@ source ynh_systemd_action source ynh_check_app_version_changed source /usr/share/yunohost/helpers -#================================================= -# MANAGE APPLICATION NOT COMPATIBLE WITH ARM -#================================================= - -if [ $architecture = "arm" ] -then - ynh_die "WriteFreely not available on Arm" -fi - #================================================= # LOAD SETTINGS #================================================= From 64cfdf97bc681da9577a5a132d39f78bc71bb601 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 16 Mar 2019 02:58:59 +0100 Subject: [PATCH 10/14] deactivate arm check --- scripts/install | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scripts/install b/scripts/install index 85ff14d..96741c6 100755 --- a/scripts/install +++ b/scripts/install @@ -70,15 +70,6 @@ path_url=$(ynh_normalize_url_path $path_url) # Register (book) web path ynh_webpath_register $app $domain $path_url -#================================================= -# MANAGE APPLICATION NOT COMPATIBLE WITH ARM -#================================================= - -if [ $architecture = "arm" ] -then - ynh_die "WriteFreely not available on Arm" -fi - #================================================= # STORE SETTINGS FROM MANIFEST #================================================= From b2b5a86a917c164c2b49b2dc102a1a5528a7bc32 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 16 Mar 2019 03:04:43 +0100 Subject: [PATCH 11/14] Arm detection --- scripts/install | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/install b/scripts/install index 96741c6..85ff14d 100755 --- a/scripts/install +++ b/scripts/install @@ -70,6 +70,15 @@ path_url=$(ynh_normalize_url_path $path_url) # Register (book) web path ynh_webpath_register $app $domain $path_url +#================================================= +# MANAGE APPLICATION NOT COMPATIBLE WITH ARM +#================================================= + +if [ $architecture = "arm" ] +then + ynh_die "WriteFreely not available on Arm" +fi + #================================================= # STORE SETTINGS FROM MANIFEST #================================================= From fa88882434c23aa75970c2e883b082d102b5999c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 16 Mar 2019 04:02:45 +0100 Subject: [PATCH 12/14] add arm build --- README.md | 2 +- conf/arm.src | 6 ++++++ conf/{app.src => x86-64.src} | 0 scripts/backup | 1 - scripts/change_url | 10 ---------- scripts/detect_arch | 2 ++ scripts/install | 11 +---------- scripts/remove | 1 - scripts/restore | 10 ---------- scripts/upgrade | 2 +- 10 files changed, 11 insertions(+), 34 deletions(-) create mode 100644 conf/arm.src rename conf/{app.src => x86-64.src} (100%) diff --git a/README.md b/README.md index 67a1ce1..46c195f 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ If User Mode is configured Multiple users, the app be used by multiple users #### Supported architectures * x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/writefreely%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/writefreely/) -* ARMv8-A - **Not supported** [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/writefreely%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/writefreely/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/writefreely%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/writefreely/) * Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/writefreely%20%28Community%29.svg)](https://ci-stretch.nohost.me/ci/apps/writefreely/) ## Limitations diff --git a/conf/arm.src b/conf/arm.src new file mode 100644 index 0000000..94fa552 --- /dev/null +++ b/conf/arm.src @@ -0,0 +1,6 @@ +SOURCE_URL=https://github.com/YunoHost-Apps/writefreely_ynh/releases/download/v0.8.1/writefreely_0.8.1_linux_arm64.tar.gz +SOURCE_SUM=6490b34dbc6857d1b0f60d1d6ddb9c20b29e742e0fa10662b49c311970818d14 +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=tar.gz +SOURCE_IN_SUBDIR=false +SOURCE_FILENAME= diff --git a/conf/app.src b/conf/x86-64.src similarity index 100% rename from conf/app.src rename to conf/x86-64.src diff --git a/scripts/backup b/scripts/backup index b41461a..05f7f25 100755 --- a/scripts/backup +++ b/scripts/backup @@ -7,7 +7,6 @@ #================================================= source ../settings/scripts/_common.sh -source ../settings/scripts/detect_arch source ../settings/scripts/ynh_systemd_action source /usr/share/yunohost/helpers diff --git a/scripts/change_url b/scripts/change_url index a65cba6..be9cfcf 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -6,19 +6,9 @@ # IMPORT GENERIC HELPERS #================================================= -source detect_arch source _common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE APPLICATION NOT COMPATIBLE WITH ARM -#================================================= - -if [ $architecture = "arm" ] -then - ynh_die "WriteFreely not available on Arm" -fi - #================================================= # RETRIEVE ARGUMENTS #================================================= diff --git a/scripts/detect_arch b/scripts/detect_arch index 4e258d9..72440b7 100644 --- a/scripts/detect_arch +++ b/scripts/detect_arch @@ -6,6 +6,8 @@ elif [ -n "$(uname -m | grep 86)" ]; then architecture="i386" elif [ -n "$(uname -m | grep arm)" ]; then architecture="arm" +elif [ -n "$(uname -m | grep aarch64)" ]; then + architecture="arm" else ynh_die "Unable to detect your achitecture, please open a bug describing \ your hardware and the result of the command \"uname -m\"." 1 diff --git a/scripts/install b/scripts/install index 85ff14d..1d3a262 100755 --- a/scripts/install +++ b/scripts/install @@ -70,15 +70,6 @@ path_url=$(ynh_normalize_url_path $path_url) # Register (book) web path ynh_webpath_register $app $domain $path_url -#================================================= -# MANAGE APPLICATION NOT COMPATIBLE WITH ARM -#================================================= - -if [ $architecture = "arm" ] -then - ynh_die "WriteFreely not available on Arm" -fi - #================================================= # STORE SETTINGS FROM MANIFEST #================================================= @@ -152,7 +143,7 @@ ynh_print_info "Setting up source files ..." ynh_app_setting_set $app final_path $final_path # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source "$final_path" +ynh_setup_source "$final_path" $architecture #================================================= # NGINX CONFIGURATION diff --git a/scripts/remove b/scripts/remove index 0aaaaf0..0b0eba9 100755 --- a/scripts/remove +++ b/scripts/remove @@ -6,7 +6,6 @@ # IMPORT GENERIC HELPERS #================================================= -source detect_arch source _common.sh source ynh_systemd_action source /usr/share/yunohost/helpers diff --git a/scripts/restore b/scripts/restore index 6b80dee..d2eae01 100755 --- a/scripts/restore +++ b/scripts/restore @@ -7,7 +7,6 @@ #================================================= source ../settings/scripts/_common.sh -source ../settings/scripts/detect_arch source ../settings/scripts/ynh_systemd_action source /usr/share/yunohost/helpers @@ -44,15 +43,6 @@ ynh_webpath_available $domain $path_url \ test ! -d $final_path \ || ynh_die "There is already a directory: $final_path " -#================================================= -# MANAGE APPLICATION NOT COMPATIBLE WITH ARM -#================================================= - -if [ $architecture = "arm" ] -then - ynh_die "WriteFreely not available on Arm" -fi - #================================================= # STANDARD RESTORATION STEPS #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index a37ed12..c566b44 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -107,7 +107,7 @@ ynh_print_info "Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src if [ "$upgrade_type" == "UPGRADE_APP" ] then - ynh_setup_source "$final_path" + ynh_setup_source "$final_path" $architecture fi #================================================= From 41d4fda1f879257825bd0ac4158e1661a508b004 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 16 Mar 2019 04:09:58 +0100 Subject: [PATCH 13/14] Fix architecture detection --- scripts/detect_arch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/detect_arch b/scripts/detect_arch index 72440b7..d82d3ca 100644 --- a/scripts/detect_arch +++ b/scripts/detect_arch @@ -1,6 +1,6 @@ #!/bin/bash -if [ -n "$(uname -m | grep 64)" ]; then +if [ -n "$(uname -m | grep x86_64)" ]; then architecture="x86-64" elif [ -n "$(uname -m | grep 86)" ]; then architecture="i386" From ffab37130649408dc10553e653e25e8e5f4aa735 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 16 Mar 2019 04:30:42 +0100 Subject: [PATCH 14/14] Fix ARM checksum --- conf/arm.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/arm.src b/conf/arm.src index 94fa552..f230dbf 100644 --- a/conf/arm.src +++ b/conf/arm.src @@ -1,5 +1,5 @@ SOURCE_URL=https://github.com/YunoHost-Apps/writefreely_ynh/releases/download/v0.8.1/writefreely_0.8.1_linux_arm64.tar.gz -SOURCE_SUM=6490b34dbc6857d1b0f60d1d6ddb9c20b29e742e0fa10662b49c311970818d14 +SOURCE_SUM=6d79707d68ffba331e6c490c881b8767c1f6d75785b84a1fe7669b3915db02e3 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false