1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/streams_ynh.git synced 2024-09-03 20:26:20 +02:00

We adapt latest Zap YunoHost package for Streams, and needed stuff for Composer

This commit is contained in:
dragondaddy 2023-07-27 17:21:00 +02:00
parent d34b16074c
commit 94be454900
10 changed files with 60 additions and 45 deletions

View file

@ -1,3 +1,3 @@
SOURCE_URL=https://codeberg.org/zot-archive/zap/archive/078714b9dde991d02f8cce1183ce357d96405558.tar.gz
SOURCE_SUM=6159da945fe504bffe23f80d299bfe3e146a9d9df76412f5bea6d1d415516d34
SOURCE_URL=https://codeberg.org/streams/streams/archive/c6cfd33c0e1b88e30399a4f9efd557512bb9ec86.tar.gz
SOURCE_SUM=a336c9f70109459bc167736aaa9211fba05a009110d8d0e9586af126337c8ec8
SOURCE_FORMAT=tar.gz

View file

@ -1,6 +1,7 @@
SOURCE_URL=https://codeberg.org/zot-archive/zap-addons/archive/b2ddcc67735fb413f14efcc9c49780469b8b61cf.tar.gz
SOURCE_SUM=009f5047096fdbe3becaebfb7ac3ee34d7efd3f4f891e3a645484a7e406598a1
SOURCE_URL=https://codeberg.org/streams/streams-addons/archive/0ff7cafbb205611c9f5fbbb8d8294c0b9dba0d70.tar.gz
SOURCE_SUM=2118bb796e1113a50b72c525708484563656edfe4b03c50b01ef973d839f3bce
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=
SOURCE_FILENAME=

View file

@ -1,2 +1,2 @@
# Run poller periodically to update Hubzilla
*/10 * * * * __APP__ cd __FINALPATH__; /usr/bin/php__PHPVERSION__ Zotlabs/Daemon/Master.php Cron > /dev/null 2>&1
# Run poller periodically to update your website
*/10 * * * * __APP__ cd __FINALPATH__; /usr/bin/php__PHPVERSION__ Code/Daemon/Run.php Cron > /dev/null 2>&1

View file

@ -1,13 +1,24 @@
[Zap](https://zotlabs.com/zap/) is an an ethical alternative to Fediverse that provides powerful features for creating interconnected websites featuring a decentralized identity, communications, and permissions framework built using common webserver technology.
[Streams](https://codeberg.org/streams/streams/) is an open source fediverse server with a long history of innovation. See [FEATURES](https://codeberg.org/streams/streams/src/branch/dev/FEATURES.md).
This software is dedicated to the public domain to the extent permissable by law and is not associated with any consumer brand or product.
Compatible with **Mastodon**, **Pleroma**, **Pixelfed**, **Friendica**, **Hubzilla**, **Funkwhale**, **Peertube**, **Plume**, **WriteFreely** and many, many more.
## Unique Features of ZAP
## Unique Features of Streams
- **Groups** : public, private, and moderated.
- **Events** : Calendar and attendance; automatic birthday notifications for friends using this feature.
- **Cloud**storage : Built-in network file storage integrated with social networking access.
- **Editor** : Supports both markdown and bbcode. Use either or both - if you want.
- **Share**: Drag-and-drop a number of different things such as files, photos, webpages, maps, phone numbers to share- them.
- **Lists**: Sometimes referred to as circles or aspects, this lets you define your own groups of related friends and- communicate with them as a private group.
- **Extend** : Change or upgrade your software functionality as desired by installing additional features from addons and- the free app collection.
- **Federated Single Sign-on** : Makes private/protected resources on external sites as accessible as on local sites.
- **Federated Access Control** : Works with Federated Single Sign-on to provide private/protected media and web resources to anybody, including those visiting from different sites.
- **Groups** : Public, private, and moderated. These work across nearly all fediverse platforms.
- **Events** : Calendar and attendance; automatic timezone adjusted birthday notifications for friends using this feature.
- **Permissions** : Because not everybody wishes to converse with and share intimate facets of their life with random strangers.
- **Cloud storage** : Built-in network file storage integrated with federated access control and social networking access/permissions. Available over WebDAV.
- **Editor** : Supports markdown, html, and bbcode. Use any or all of these in any post to create a media rich experience. Post editing and preview are supported. It is somewhat unlikely that in normal use you will exceed the federated post length limits (roughly 100 printed pages of text). There are no arbitrary limits placed on the number of attached photos, files, or poll responses.
- **Share** : Drag-and-drop a number of different things such as files, photos, videos, webpages, maps, fediverse articles, and phone numbers to share them.
- **Lists** : Sometimes referred to as circles or aspects, this lets you define your own groups of related friends and communicate with them as a private group.
- **Extend** : Change or upgrade your software functionality as desired by installing additional features from addons and the free app collection.
- **Guest Pass** : Provide special guest access to private resources and media - on your terms.
- **Friend Zoom** : Set your degree of closeness to any connection and then interactively zoom in to filter your stream to close friends; or zoom out to see posts by casual acquaintances.
- **Location Services** : Check-in, check-out, and search by distance
- **Delivery Reports** : In a decentralised multi-platform world, stuff happens. Sites and networks sometimes go down. Project developers sometimes introduce bugs and incompatibilities. This allows you to determine what happened to your post or comment and where it actually went once you published it.
- **Failsafe** : Because the best time to have a current backup of your data is 10 seconds ago. Clone your online identity and content to multiple sites using the Nomad protocol and mirror any changes in near realtime. Then, if your chosen site goes down (either temporarily or permanently) or you get booted off of it for some reason, your online life doesn't have to come to an end or force you to start over. All your friends and all your content are available on any of your cloned instances - at any time.
- **ActivityPub** : Provides the ActivityPub "Client to Server" API for use with external apps.

View file

@ -1,19 +1,15 @@
## Installation
Before installing, read the [Zap installation instructions](https://codeberg.org/zot/zap/src/branch/release/install/INSTALL.txt) for important information about:
### Register a new domain and add it to YunoHost
- Zap requires a dedicated domain, so obtain one and add it using the YunoHost admin panel. **Domains -> Add domain**. As Zap uses the full domain and is installed on the root, you can create a subdomain such as Zap.domain.tld. Don't forget to update your DNS if you manage them manually.
- Your Streams based website requires a dedicated domain, so obtain one and add it using the YunoHost admin panel. **Domains -> Add domain**. As your website uses the full domain and is installed on the root, you can create a subdomain such as mywebsite.domain.tld. Don't forget to update your DNS if you manage them manually.
## LDAP Admin user rights, logs and failed database updates
- **For admin rights**: When installation is complete, you will need to visit your new hub's page and login with the **admin account username** which was entered at the time of installation process. You should then be able to create your first channel and have the **admin rights** for the hub.
- **For admin rights**: When installation is complete, you will need to visit your new website and login with the **admin account username** which was entered at the time of installation process. You should then be able to create your first channel and have the **admin rights** for your website.
- **For normal YunoHost users :** Normal LDAP users can login through Ldap authentication and create there channels.
- **For normal YunoHost users :** Normal LDAP users can login through LDAP authentication and create their channels.
- **Failing to get admin rights :** If the admin cannot access the admin settings at `https://zap.example.com/admin` or you want to grant admin rights to any other user(s) on the hub, then you have to **manually add 4096** to the **account_roles** under **accounts** for that user in the **database through phpMYAdmin**.
- **Failing to get admin rights :** If the admin cannot access the admin settings at `https://mywebsite.domain.tld/admin` or you want to grant admin rights to any other registered user(s) on your website, then you have to **manually add 4096** to the **account_roles** under **accounts** for that user in the **database through software like phpMYAdmin**.
- **For logs:** Go to **admin->logs** and enter the file name **php.log**.
- **Failed Database after Upgrade:** Some times databse upgrade fails after version upgrade. You can go to hub eg. `https://zap.example.com/admin/dbsync/` and check the numbers of failled update. These updates will have to be ran manually by **phpMYAdmin**.
- **Failed Database after Upgrade:** Some times databse upgrade fails after version upgrade. You can go to hub eg. `https://mywebsite.domain.tld/admin/dbsync/` and check the numbers of failled update. These updates will have to be ran manually using software such as **phpMYAdmin**.

View file

@ -1,18 +1,18 @@
{
"name": "Zap",
"id": "zap",
"name": "Streams",
"id": "streams",
"packaging_format": 1,
"description": {
"en": "Ethical fediverse server alternative",
"fr": "serveur fedverse éthique"
"en": "An open source fediverse server",
"fr": "Un serveur fediverse open source"
},
"version": "21.11.28~ynh1",
"url": "https://codeberg.org/zot-archive/zap",
"version": "23.07.24~ynh1",
"url": "https://codeberg.org/streams/streams",
"upstream": {
"license": "MIT",
"code": "https://codeberg.org/zot-archive/zap"
"license": "Public Domain",
"code": "https://codeberg.org/streams/streams"
},
"license": "MIT",
"license": "Public Domain",
"maintainer": {
"name": ""
},
@ -22,7 +22,7 @@
"multi_instance": true,
"services": [
"nginx",
"php7.4-fpm",
"php8.1-fpm",
"mysql",
"postgresql"
],
@ -32,8 +32,8 @@
"name": "domain",
"type": "domain",
"help": {
"en": "ZAP must run in the root of this domain. It means no other app can be accessed/run from this domain. We advise to use a dedicated subdomain such as zap.domain.tld",
"fr": "ZAP doit être installé à la racine du domaine. Cela implique qu'aucune autre app ne pourra être installée ou accessible sur ce domain. Nous conseillons un sous-domaine dédié par exemple zap.domain.tld."
"en": "Your Streams based website must run in the root of this domain. It means no other app can be accessed/run from this domain. We advise to use a dedicated subdomain such as streams.domain.tld",
"fr": "Votre site basé sur Streams doit être installé à la racine du domaine. Cela implique qu'aucune autre app ne pourra être installée ou accessible sur ce domain. Nous conseillons un sous-domaine dédié par exemple streams.domain.tld."
}
},
{
@ -44,8 +44,8 @@
"name": "database",
"type": "string",
"ask": {
"en": "Choose the database to be used for the Zap [mysql:1,postgresql:2]",
"fr": "Choisissez la database de l'Zap [mysql:1,postgresql:2]"
"en": "Choose the database to be used for your website [mysql:1,postgresql:2]",
"fr": "Choisissez la base de données utilisée pour votre site [mysql:1,postgresql:2]"
},
"choices": ["1", "2"],
"default": "1"

View file

@ -5,7 +5,8 @@
#=================================================
# dependencies used by the app
YNH_PHP_VERSION="7.4"
YNH_PHP_VERSION="8.1"
YNH_COMPOSER_VERSION="2.5.8"
pkg_dependencies="postgresql postgresql-contrib php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-pgsql php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-gd"

View file

@ -78,22 +78,27 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
# 1 - Zap
ynh_script_progression --message="Setting up Zap source files..."
# 1 - Streams
ynh_script_progression --message="Setting up Streams source files..."
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src
git clone https://codeberg.org/zot-archive/zap.git "$final_path" --quiet
git clone https://codeberg.org/streams/streams.git "$final_path" --quiet
# 2 - Zap Addons
# 2 - Composer
ynh_script_progression --message="Pulling in external libraries with Composer..."
ynh_install_composer
# 3 - Streams Addons
# Make addon Directory and unpack the addons to this directory
ynh_script_progression --message="Setting up Zap addons source files..."
ynh_script_progression --message="Setting up Streams addons source files..."
pushd "$final_path"
mkdir -p extend/addon/zaddons
mkdir addon
git clone https://codeberg.org/zot-archive/zap-addons.git $final_path/extend/addon/zaddons --quiet
git clone https://codeberg.org/streams/streams-addons.git $final_path/extend/addon/zaddons --quiet
filelist=(`ls extend/addon/zaddons`)
cd addon
for a in "${filelist[@]}" ; do

View file

@ -86,6 +86,7 @@ ynh_script_progression --message="Upgrading source files..."
if [ `cd $final_path && git rev-parse --is-inside-work-tree` ]; then
pushd "$final_path"
git pull --quiet
ynh_install_composer
cd extend/addon/zaddons
git pull --quiet
cd ../../..