Merge pull request #17 from YunoHost-Apps/version-2

Cleanup packaging v2, bump to cells v4
This commit is contained in:
Salamandar 2024-01-28 23:59:01 +01:00 committed by GitHub
commit fa06d74dc3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 92 additions and 29 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*~
*.sw[op]

View file

@ -16,9 +16,10 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
## Overview
File sharing platform
Cells V4 now provides secure, cloud-native, scalable, self-hosted, open-core document sharing and collaboration without putting your data at risk.
**Shipped version:** 3.0.9~ynh2
**Shipped version:** 4.3.1~ynh1
## Screenshots

View file

@ -16,9 +16,10 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
## Vue densemble
Plateforme de partage de fichiers
Cells V4 offre désormais un partage et une collaboration de documents sécurisés, cloud natifs, évolutifs, auto-hébergés et open-core sans mettre vos données en danger.
**Version incluse :** 3.0.9~ynh2
**Version incluse :** 4.3.1~ynh1
## Captures décran

View file

@ -1,7 +1,7 @@
# Basic no-TLS config for the embedded gateway
proxyconfig:
binds:
- localhost:__PORT__
- 127.0.0.1:__PORT__
reverseproxyurl: https://__DOMAIN__
tlsconfig:
selfsigned:

View file

@ -1,13 +1,12 @@
location / {
proxy_pass https://localhost:__PORT__;
proxy_pass https://127.0.0.1:__PORT__;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}
location /ws/ {
proxy_pass https://localhost:__PORT__;
proxy_pass https://127.0.0.1:__PORT__;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";

View file

@ -8,11 +8,11 @@ AssertFileIsExecutable=__INSTALL_DIR__/cells
[Service]
User=__APP__
Group=__APP__
WorkingDirectory=__DATA_DIR__/
WorkingDirectory=__INSTALL_DIR__/
PermissionsStartOnly=true
AmbientCapabilities=CAP_NET_BIND_SERVICE
ExecStart=__INSTALL_DIR__/cells start
ExecStart=__INSTALL_DIR__/cells start --grpc_discovery_port __PORT_DISCOVERY_GRPC__ --grpc_port __PORT_GRPC__
Restart=on-failure
StandardOutput=journal
StandardError=inherit
@ -25,7 +25,7 @@ SuccessExitStatus=0
# Add environment variables
Environment=CELLS_ENABLE_METRICS=false
# Environment=CELLS_WORKING_DIR=__INSTALL_DIR__
# Environment=CELLS_DATA_DIR=__DATA_DIR__
Environment=CELLS_DATA_DIR=__DATA_DIR__
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1 @@
Cells V4 now provides secure, cloud-native, scalable, self-hosted, open-core document sharing and collaboration without putting your data at risk.

1
doc/DESCRIPTION_fr.md Normal file
View file

@ -0,0 +1 @@
Cells V4 offre désormais un partage et une collaboration de documents sécurisés, cloud natifs, évolutifs, auto-hébergés et open-core sans mettre vos données en danger.

View file

View file

@ -7,12 +7,12 @@ name = "Pydio"
description.en = "File sharing platform"
description.fr = "Plateforme de partage de fichiers"
version = "3.0.9~ynh2"
version = "4.3.1~ynh1"
maintainers = ["julienmalik"]
[upstream]
license = "AGPL-3.0-or-later"
license = "AGPL-3.0"
website = "https://pydio.com"
admindoc = "https://pydio.com/en/docs"
code = "https://github.com/pydio/cells"
@ -20,15 +20,16 @@ cpe = "cpe:2.3:a:pydio:cells"
fund = "https://pydio.com/en/pricing"
[integration]
yunohost = ">= 11.1.21"
architectures = ["amd64"]
yunohost = ">= 11.2"
architectures = ["amd64", "armhf", "arm64"]
multi_instance = true
ldap = false
sso = false
disk = "50M"
ram.build = "500M"
ram.runtime = "500M"
ram.build = "700M"
ram.runtime = "700M"
[install]
[install.domain]
@ -45,9 +46,15 @@ ram.runtime = "500M"
type = "password"
[resources]
[resources.sources]
[resources.sources.main]
url = "https://download.pydio.com/pub/cells/release/3.0.9/linux-amd64/pydio-cells-3.0.9-linux-amd64.zip"
sha256 = "54b1f92dcaa0204f0b2e6ebb1daff0d4911d0b1c60d68acacfeb6290170dd4a8"
amd64.url = "https://download.pydio.com/pub/cells/release/4.3.1/linux-amd64/pydio-cells-4.3.1-linux-amd64.zip"
amd64.sha256 = "966337451cf007ff9294f15db830cda128162604bb44ccd91510fae292c790ee"
arm64.url = "https://download.pydio.com/pub/cells/release/4.3.1/linux-arm64/pydio-cells-4.3.1-linux-arm64.zip"
arm64.sha256 = "840d9a85e15892b52dd549152bef240015584b82feace9137e8b5b1660e80c43"
armhf.url = "https://download.pydio.com/pub/cells/release/4.3.1/linux-arm/pydio-cells-4.3.1-linux-arm.zip"
armhf.sha256 = "af200d58f3efd917bf8add2a0e8bfb3bc832780cca470070530afa6bb1caefd0"
in_subdir = false
[resources.system_user]
@ -66,6 +73,8 @@ ram.runtime = "500M"
[resources.ports]
main.default = 8080
discovery_grpc.default = 50051
grpc.default = 50053
[resources.apt]
packages = [

41
scripts/change_url Normal file
View file

@ -0,0 +1,41 @@
#!/bin/bash
#=================================================
# GENERIC STARTING
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD MODIFICATIONS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name="$app" --action="stop" --log_path="systemd"
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
ynh_change_url_nginx_config
#=================================================
# GENERIC FINALISATION
#=================================================
# START SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Change of URL completed for $app" --last

View file

@ -32,7 +32,10 @@ ynh_add_config --template="../conf/install-conf.yml" --destination="$install_dir
ynh_delete_file_checksum --file="$install_dir/install-conf.yml"
pushd "$install_dir"
ynh_exec_as "$app" ./cells configure --cli --yaml "./install-conf.yml"
# See https://pydio.com/fr/docs/cells/v4/working-directories
ynh_exec_as "$app" env \
CELLS_DATA_DIR="$data_dir" \
./cells configure --cli --yaml "./install-conf.yml"
popd
ynh_secure_remove --file="$install_dir/install-conf.yml"
@ -54,10 +57,9 @@ yunohost service add "$app" --description="File sharing platform"
ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" --line_match="Restart done"
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd"
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression --message="Installation of $app completed" --last

View file

@ -26,8 +26,6 @@ ynh_script_progression --message="Restoring the data directory..." --weight=1
ynh_restore_file --origin_path="$data_dir" --not_mandatory
chmod 750 "$data_dir"
chmod -R o-rwx "$data_dir"
chown -R "$app:www-data" "$data_dir"
#=================================================
@ -55,8 +53,7 @@ yunohost service add "$app" --description="File sharing platform"
#=================================================
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" --line_match="Restart done"
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd"
ynh_systemd_action --service_name=nginx --action=reload
#=================================================

View file

@ -16,13 +16,20 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="stop"
ynh_systemd_action --service_name="$app" --action="stop"
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Previous installs might have been listening on local ipv6
if ynh_compare_current_package_version --comparison lt "4.3.1~ynh1"; then
jq ".defaults.sites[0].Binds[0] = \"127.0.0.1:$port\"" "$install_dir/.config/pydio/cells/pydio.json" \
> "$install_dir/_pydio.json"
mv "$install_dir/_pydio.json" "$install_dir/.config/pydio/cells/pydio.json"
fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -54,7 +61,9 @@ yunohost service add "$app" --description="File sharing platform"
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" --line_match="Restart done"
ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd"
ynh_exec_warn journalctl -xu "$app.service"
#=================================================
# END OF SCRIPT

View file

@ -6,4 +6,4 @@ test_format = 1.0
exclude = ["change_url"]
test_upgrade_from.5725c85c09f1d3b76d12a4dc4d367ec911cd0019.name = "Last packaging v2 version"
test_upgrade_from.5725c85c09f1d3b76d12a4dc4d367ec911cd0019.name = "Last packaging v1 version"