From 511a43d206ac6f6d08b9c6a2af21f2c2196d725c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 27 Aug 2021 14:55:37 +0200 Subject: [PATCH 01/13] 0.9.0 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 0a1ed21..f95b4d5 100755 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/mattermost/focalboard/releases/download/v0.8.0/focalboard-server-linux-amd64.tar.gz -SOURCE_SUM=69022aac1b9029e47986acd94466a964ef987a73c556aa23b5eee5c981152d76 +SOURCE_URL=https://github.com/mattermost/focalboard/releases/download/v0.9.0-rc7/focalboard-server-linux-amd64.tar.gz +SOURCE_SUM=2aca013398814c70f8f50669c22d053a16867f63ae56c81c4a2295f43bbac3a4 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 5a85392..7a47550 100755 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Self-hosted alternative to Trello, Notion, and Asana", "fr": "Alternative auto-hébergée à Trello, Notion et Asana" }, - "version": "0.8.0~ynh1", + "version": "0.9.0~ynh1", "url": "https://www.focalboard.com/", "upstream": { "license": "MIT", From b6da06093bbedda47134b45e1c9152260eb71dd4 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Fri, 27 Aug 2021 12:55:42 +0000 Subject: [PATCH 02/13] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 982e83c..7bec1b3 100755 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Self-hosted alternative to Trello, Notion, and Asana -**Shipped version:** 0.8.0~ynh1 +**Shipped version:** 0.9.0~ynh1 diff --git a/README_fr.md b/README_fr.md index 45383ba..3481876 100755 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Alternative auto-hébergée à Trello, Notion et Asana -**Version incluse :** 0.8.0~ynh1 +**Version incluse :** 0.9.0~ynh1 From f44a225f38fdd07a53756f1ec2473af787cdabe0 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 27 Aug 2021 14:59:43 +0200 Subject: [PATCH 03/13] Fix --- doc/DESCRIPTION.md | 1 + doc/DISCLAIMER.md | 0 2 files changed, 1 insertion(+) create mode 100644 doc/DESCRIPTION.md create mode 100644 doc/DISCLAIMER.md diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..e70eb21 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1 @@ +Focalboard is a project management tool that helps define, organize, track and manage work across teams, using a familiar kanban board view. Focalboard comes in two editions: \ No newline at end of file diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..e69de29 From 41c7e6a651f890d807648d433d36bacbd7268e74 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Fri, 27 Aug 2021 13:01:07 +0000 Subject: [PATCH 04/13] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7bec1b3..7de42f0 100755 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Self-hosted alternative to Trello, Notion, and Asana +Focalboard is a project management tool that helps define, organize, track and manage work across teams, using a familiar kanban board view. Focalboard comes in two editions: **Shipped version:** 0.9.0~ynh1 diff --git a/README_fr.md b/README_fr.md index 3481876..956c913 100755 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble -Alternative auto-hébergée à Trello, Notion et Asana +Focalboard is a project management tool that helps define, organize, track and manage work across teams, using a familiar kanban board view. Focalboard comes in two editions: **Version incluse :** 0.9.0~ynh1 From 3811d80bbf55c6a9d6adca57b8a1a91e94645ef5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 27 Aug 2021 15:01:13 +0200 Subject: [PATCH 05/13] Add userdoc --- manifest.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 7a47550..afd5850 100755 --- a/manifest.json +++ b/manifest.json @@ -11,7 +11,8 @@ "upstream": { "license": "MIT", "website": "https://www.focalboard.com/", - "admindoc": "https://www.focalboard.com/guide/user/", + "admindoc": "https://www.focalboard.com/guide/admin/", + "userdoc": "https://www.focalboard.com/guide/user/", "code": "https://github.com/mattermost/focalboard" }, "license": "MIT", From 5df29dffd2e3eeee020f1e9b1a06a1bb1fde7624 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Fri, 27 Aug 2021 13:04:14 +0000 Subject: [PATCH 06/13] Auto-update README --- README.md | 3 ++- README_fr.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7de42f0..eaf44dc 100755 --- a/README.md +++ b/README.md @@ -28,7 +28,8 @@ Focalboard is a project management tool that helps define, organize, track and m ## Documentation and resources * Official app website: https://www.focalboard.com/ -* Official admin documentation: https://www.focalboard.com/guide/user/ +* Official user documentation: https://www.focalboard.com/guide/user/ +* Official admin documentation: https://www.focalboard.com/guide/admin/ * Upstream app code repository: https://github.com/mattermost/focalboard * YunoHost documentation for this app: https://yunohost.org/app_focalboard * Report a bug: https://github.com/YunoHost-Apps/focalboard_ynh/issues diff --git a/README_fr.md b/README_fr.md index 956c913..6c76c3d 100755 --- a/README_fr.md +++ b/README_fr.md @@ -24,7 +24,8 @@ Focalboard is a project management tool that helps define, organize, track and m ## Documentations et ressources * Site officiel de l'app : https://www.focalboard.com/ -* Documentation officielle de l'admin : https://www.focalboard.com/guide/user/ +* Documentation officielle utilisateur : https://www.focalboard.com/guide/user/ +* Documentation officielle de l'admin : https://www.focalboard.com/guide/admin/ * Dépôt de code officiel de l'app : https://github.com/mattermost/focalboard * Documentation YunoHost pour cette app : https://yunohost.org/app_focalboard * Signaler un bug : https://github.com/YunoHost-Apps/focalboard_ynh/issues From 7d2dd0f346d60c31535d039fbd68c454a2aab82d Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 28 Aug 2021 11:25:50 +0000 Subject: [PATCH 07/13] Auto-update README --- README.md | 1 + README_fr.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eaf44dc..8323583 100755 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Focalboard is a project management tool that helps define, organize, track and manage work across teams, using a familiar kanban board view. Focalboard comes in two editions: + **Shipped version:** 0.9.0~ynh1 diff --git a/README_fr.md b/README_fr.md index 6c76c3d..56dec2f 100755 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,8 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble -Focalboard is a project management tool that helps define, organize, track and manage work across teams, using a familiar kanban board view. Focalboard comes in two editions: +Focalboard est un outil de gestion de projet qui aide à définir, organiser, suivre et gérer le travail entre les équipes, à l'aide d'une vue de tableau kanban familière. + **Version incluse :** 0.9.0~ynh1 From 51725c4bca3918ca8ce03666f7fc10ba76164626 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 7 Sep 2021 09:47:37 +0200 Subject: [PATCH 08/13] Update systemd.service --- conf/systemd.service | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/conf/systemd.service b/conf/systemd.service index e5e4ff5..c1c8648 100755 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -10,5 +10,35 @@ RestartSec=5s ExecStart=__FINALPATH__/bin/focalboard-server WorkingDirectory=__FINALPATH__ +# Sandboxing options to harden security +# Depending on specificities of your service/app, you may need to tweak these +# .. but this should be a good baseline +# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html +NoNewPrivileges=yes +PrivateTmp=yes +PrivateDevices=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 +RestrictNamespaces=yes +RestrictRealtime=yes +DevicePolicy=closed +ProtectSystem=full +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +LockPersonality=yes +SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap + +# Denying access to capabilities that should not be relevant for webapps +# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html +CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD +CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE +CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT +CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK +CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM +CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG +CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE +CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW +CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG + [Install] WantedBy=multi-user.target From 404cbdb47615d08929b668a949fe0a4ac400f335 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 7 Sep 2021 23:04:23 +0200 Subject: [PATCH 09/13] Update restore --- scripts/restore | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 911fcf5..0bb26e1 100755 --- a/scripts/restore +++ b/scripts/restore @@ -41,8 +41,6 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " From c0c0c399ed045de6b594c511c429042d8d2e144e Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 16 Sep 2021 23:12:57 +0200 Subject: [PATCH 10/13] Create updater.sh --- .github/workflows/updater.sh | 130 +++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 .github/workflows/updater.sh diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh new file mode 100644 index 0000000..5ae9941 --- /dev/null +++ b/.github/workflows/updater.sh @@ -0,0 +1,130 @@ +#!/bin/bash + +#================================================= +# PACKAGE UPDATING HELPER +#================================================= + +# This script is meant to be run by GitHub Actions +# The YunoHost-Apps organisation offers a template Action to run this script periodically +# Since each app is different, maintainers can adapt its contents so as to perform +# automatic actions when a new upstream release is detected. + +# Remove this exit command when you are ready to run this Action +#exit 1 + +#================================================= +# FETCHING LATEST RELEASE AND ITS ASSETS +#================================================= + +# Fetching information +current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') +repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') +# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions) +version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) +assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'")) + +if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then + version=${version:1} +fi + +# Setting up the environment variables +echo "Current version: $current_version" +echo "Latest release from upstream: $version" +echo "VERSION=$version" >> $GITHUB_ENV +# For the time being, let's assume the script will fail +echo "PROCEED=false" >> $GITHUB_ENV + +# Proceed only if the retrieved version is greater than the current one +if ! dpkg --compare-versions "$current_version" "lt" "$version" ; then + echo "::warning ::No new version available" + exit 0 +# Proceed only if a PR for this new version does not already exist +elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$version ; then + echo "::warning ::A branch already exists for this update" + exit 0 +fi + +# Each release can hold multiple assets (e.g. binaries for different architectures, source code, etc.) +echo "${#assets[@]} available asset(s)" + +#================================================= +# UPDATE SOURCE FILES +#================================================= + +# Here we use the $assets variable to get the resources published in the upstream release. +# Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like. + +# Let's loop over the array of assets URLs +for asset_url in ${assets[@]}; do + +echo "Handling asset at $asset_url" + +# Assign the asset to a source file in conf/ directory +# Here we base the source file name upon a unique keyword in the assets url (admin vs. update) +# Leave $src empty to ignore the asset +case $asset_url in + *".tar.gz"*) + src="app" + ;; +esac + +# If $src is not empty, let's process the asset +if [ ! -z "$src" ]; then + +# Create the temporary directory +tempdir="$(mktemp -d)" + +# Download sources and calculate checksum +filename=${asset_url##*/} +curl --silent -4 -L $asset_url -o "$tempdir/$filename" +checksum=$(sha256sum "$tempdir/$filename" | head -c 64) + +# Delete temporary directory +rm -rf $tempdir + +# Get extension +if [[ $filename == *.tar.gz ]]; then + extension=tar.gz +else + extension=${filename##*.} +fi + +# Rewrite source file +cat < conf/$src.src +SOURCE_URL=$asset_url +SOURCE_SUM=$checksum +SOURCE_SUM_PRG=sha256sum +SOURCE_FORMAT=$extension +SOURCE_IN_SUBDIR=true +SOURCE_EXTRACT=true +EOT +echo "... conf/$src.src updated" + +else +echo "... asset ignored" +fi + +done + +#================================================= +# SPECIFIC UPDATE STEPS +#================================================= + +# Any action on the app's source code can be done. +# The GitHub Action workflow takes care of committing all changes after this script ends. + +#================================================= +# GENERIC FINALIZATION +#================================================= + +# Install moreutils, needed for sponge +sudo apt-get install moreutils + +# Replace new version in manifest +echo "$(jq -s --indent 4 ".[] | .version = \"$version~ynh1\"" manifest.json)" > manifest.json + +# No need to update the README, yunohost-bot takes care of it + +# The Action will proceed only if the PROCEED environment variable is set to true +echo "PROCEED=true" >> $GITHUB_ENV +exit 0 From 9fb26f47795fd1aea5c2744ffde9fdbcca491400 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 16 Sep 2021 23:14:12 +0200 Subject: [PATCH 11/13] Update app.src --- conf/app.src | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/app.src b/conf/app.src index f95b4d5..bfc63d9 100755 --- a/conf/app.src +++ b/conf/app.src @@ -3,5 +3,4 @@ SOURCE_SUM=2aca013398814c70f8f50669c22d053a16867f63ae56c81c4a2295f43bbac3a4 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= SOURCE_EXTRACT=true From ed26366ab4f356c8cf6311bff6da56f91e06b489 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 18 Sep 2021 18:53:12 +0200 Subject: [PATCH 12/13] Update DESCRIPTION.md --- doc/DESCRIPTION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index 1b2243f..5e36a7e 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1 +1 @@ -Focalboard is a project management tool that helps define, organize, track and manage work across teams, using a familiar kanban board view. Focalboard comes in two editions: +Focalboard is a project management tool that helps define, organize, track and manage work across teams, using a familiar kanban board view. From 6e915f6430f761d1d7cbe95ded53df5989f593a9 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 18 Sep 2021 16:53:23 +0000 Subject: [PATCH 13/13] Auto-update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8323583..c7441c9 100755 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Focalboard is a project management tool that helps define, organize, track and manage work across teams, using a familiar kanban board view. Focalboard comes in two editions: +Focalboard is a project management tool that helps define, organize, track and manage work across teams, using a familiar kanban board view. **Shipped version:** 0.9.0~ynh1