mirror of
https://github.com/YunoHost-Apps/spip_ynh.git
synced 2024-09-03 20:25:59 +02:00
commit
17711b75f8
12 changed files with 93 additions and 90 deletions
7
.github/workflows/updater.sh
vendored
7
.github/workflows/updater.sh
vendored
|
@ -17,7 +17,7 @@
|
|||
current_version=$(cat manifest.json | jq -j '.version|split("~")[0]')
|
||||
repo=$(cat manifest.json | jq -j '.upstream.code|split("https://git.spip.net/")[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://git.spip.net/api/v1/repos/spip/spip/tags" | jq -r '.[] | .name' | sort -V | tail -1)
|
||||
version=$(curl --silent "https://git.spip.net/api/v1/repos/spip/spip/tags" | jq -r '.[] | .name' | grep -v "alpha" | grep -v "beta" | grep -v "rc" | sort -V | tail -1)
|
||||
assets=("https://files.spip.net/spip/archives/spip-$version.zip")
|
||||
|
||||
# Later down the script, we assume the version has only digits and dots
|
||||
|
@ -27,11 +27,6 @@ if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then
|
|||
version=${version:1}
|
||||
fi
|
||||
|
||||
if [[ $version == *"-alpha" || $version == *"-beta" ]]; then
|
||||
echo "::warning ::This is not a release version"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Setting up the environment variables
|
||||
echo "Current version: $current_version"
|
||||
echo "Latest release from upstream: $version"
|
||||
|
|
24
README.md
24
README.md
|
@ -5,7 +5,7 @@ It shall NOT be edited by hand.
|
|||
|
||||
# SPIP for YunoHost
|
||||
|
||||
[![Integration level](https://dash.yunohost.org/integration/spip.svg)](https://dash.yunohost.org/appci/app/spip) ![](https://ci-apps.yunohost.org/ci/badges/spip.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/spip.maintain.svg)
|
||||
[![Integration level](https://dash.yunohost.org/integration/spip.svg)](https://dash.yunohost.org/appci/app/spip) ![Working status](https://ci-apps.yunohost.org/ci/badges/spip.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/spip.maintain.svg)
|
||||
[![Install SPIP with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=spip)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
@ -17,13 +17,14 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
CMS with a focus on collaborative edition and multilingualism
|
||||
|
||||
**Shipped version:** 4.0.4~ynh1
|
||||
**Shipped version:** 4.1.5~ynh1
|
||||
|
||||
|
||||
**Demo:** https://demo.spip.net/
|
||||
|
||||
## Screenshots
|
||||
|
||||
![](./doc/screenshots/220px-Logo_SPIP.png)
|
||||
![Screenshot of SPIP](./doc/screenshots/220px-Logo_SPIP.png)
|
||||
|
||||
## Disclaimers / important information
|
||||
|
||||
|
@ -62,22 +63,23 @@ You should see that SPIP is installed after that.
|
|||
|
||||
## Documentation and resources
|
||||
|
||||
* Official app website: http://www.spip.net/
|
||||
* Official user documentation: https://www.spip.net/en_rubrique57.html
|
||||
* Official admin documentation: https://www.spip.net/en_rubrique209.html
|
||||
* Upstream app code repository: https://git.spip.net/spip/spip
|
||||
* YunoHost documentation for this app: https://yunohost.org/app_spip
|
||||
* Report a bug: https://github.com/YunoHost-Apps/spip_ynh/issues
|
||||
* Official app website: <http://www.spip.net/>
|
||||
* Official user documentation: <https://www.spip.net/en_rubrique57.html>
|
||||
* Official admin documentation: <https://www.spip.net/en_rubrique209.html>
|
||||
* Upstream app code repository: <https://git.spip.net/spip/spip>
|
||||
* YunoHost documentation for this app: <https://yunohost.org/app_spip>
|
||||
* Report a bug: <https://github.com/YunoHost-Apps/spip_ynh/issues>
|
||||
|
||||
## Developer info
|
||||
|
||||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/spip_ynh/tree/testing).
|
||||
|
||||
To try the testing branch, please proceed like that.
|
||||
```
|
||||
|
||||
``` bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/spip_ynh/tree/testing --debug
|
||||
or
|
||||
sudo yunohost app upgrade spip -u https://github.com/YunoHost-Apps/spip_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**More info regarding app packaging:** https://yunohost.org/packaging_apps
|
||||
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>
|
||||
|
|
30
README_fr.md
30
README_fr.md
|
@ -1,10 +1,14 @@
|
|||
<!--
|
||||
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||
It shall NOT be edited by hand.
|
||||
-->
|
||||
|
||||
# SPIP pour YunoHost
|
||||
|
||||
[![Niveau d'intégration](https://dash.yunohost.org/integration/spip.svg)](https://dash.yunohost.org/appci/app/spip) ![](https://ci-apps.yunohost.org/ci/badges/spip.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/spip.maintain.svg)
|
||||
[![Niveau d'intégration](https://dash.yunohost.org/integration/spip.svg)](https://dash.yunohost.org/appci/app/spip) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/spip.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/spip.maintain.svg)
|
||||
[![Installer SPIP avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=spip)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
> *Ce package vous permet d'installer SPIP rapidement et simplement sur un serveur YunoHost.
|
||||
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||
|
@ -13,13 +17,14 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
|||
|
||||
CMS conçu pour l'édition collaborative et le multilinguisme
|
||||
|
||||
**Version incluse :** 4.0.4~ynh1
|
||||
**Version incluse :** 4.1.5~ynh1
|
||||
|
||||
|
||||
**Démo :** https://demo.spip.net/
|
||||
|
||||
## Captures d'écran
|
||||
|
||||
![](./doc/screenshots/220px-Logo_SPIP.png)
|
||||
![Capture d'écran de SPIP](./doc/screenshots/220px-Logo_SPIP.png)
|
||||
|
||||
## Avertissements / informations importantes
|
||||
|
||||
|
@ -55,22 +60,23 @@ Notez qu'une tâche cron sera exécutée après la fin de cette commande. Vous d
|
|||
|
||||
## Documentations et ressources
|
||||
|
||||
* Site officiel de l'app : http://www.spip.net/
|
||||
* Documentation officielle utilisateur : https://www.spip.net/en_rubrique57.html
|
||||
* Documentation officielle de l'admin : https://www.spip.net/en_rubrique209.html
|
||||
* Dépôt de code officiel de l'app : https://git.spip.net/spip/spip
|
||||
* Documentation YunoHost pour cette app : https://yunohost.org/app_spip
|
||||
* Signaler un bug : https://github.com/YunoHost-Apps/spip_ynh/issues
|
||||
* Site officiel de l'app : <http://www.spip.net/>
|
||||
* Documentation officielle utilisateur : <https://www.spip.net/en_rubrique57.html>
|
||||
* Documentation officielle de l'admin : <https://www.spip.net/en_rubrique209.html>
|
||||
* Dépôt de code officiel de l'app : <https://git.spip.net/spip/spip>
|
||||
* Documentation YunoHost pour cette app : <https://yunohost.org/app_spip>
|
||||
* Signaler un bug : <https://github.com/YunoHost-Apps/spip_ynh/issues>
|
||||
|
||||
## Informations pour les développeurs
|
||||
|
||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/spip_ynh/tree/testing).
|
||||
|
||||
Pour essayer la branche testing, procédez comme suit.
|
||||
```
|
||||
|
||||
``` bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/spip_ynh/tree/testing --debug
|
||||
ou
|
||||
sudo yunohost app upgrade spip -u https://github.com/YunoHost-Apps/spip_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
|
||||
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
; Manifest
|
||||
domain="domain.tld"
|
||||
path="/path"
|
||||
admin="john"
|
||||
users_status="Editor"
|
||||
is_public=1
|
||||
password="thisisapassword"
|
||||
admin="john"
|
||||
password="1Strong-Password"
|
||||
users_status="Editor"
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=1
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
SOURCE_URL=https://files.spip.net/spip/archives/spip-v4.0.4.zip
|
||||
SOURCE_SUM=9450a3e0f09a805b450691ba361e5aedaf5fda88c5968d0d762505901c03634a
|
||||
SOURCE_URL=https://files.spip.net/spip/archives/spip-v4.1.5.zip
|
||||
SOURCE_SUM=ede38c530e459b63f083200eed2e7d385b67c5a08ec5abf73ae75acb9aca3ef6
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_FILENAME=
|
||||
SOURCE_EXTRACT=true
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
location __PATH__/ {
|
||||
|
||||
# Path to source
|
||||
alias __FINALPATH__/ ;
|
||||
alias __FINALPATH__/;
|
||||
|
||||
index index.php;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "CMS with a focus on collaborative edition and multilingualism",
|
||||
"fr": "CMS conçu pour l'édition collaborative et le multilinguisme"
|
||||
},
|
||||
"version": "4.0.4~ynh1",
|
||||
"version": "4.1.5~ynh1",
|
||||
"url": "http://www.spip.net/",
|
||||
"upstream": {
|
||||
"license": "GPL-3.0-or-later",
|
||||
|
@ -41,6 +41,11 @@
|
|||
"example": "/spip",
|
||||
"default": "/spip"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user"
|
||||
|
@ -49,11 +54,6 @@
|
|||
"name": "password",
|
||||
"type": "password"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"name": "users_status",
|
||||
"type": "string",
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# SET ALL CONSTANTS
|
||||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
YNH_PHP_VERSION="7.3"
|
||||
YNH_PHP_VERSION="7.4"
|
||||
|
||||
pkg_dependencies="php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-gd"
|
||||
pkg_dependencies="libsodium23 php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysqli php${YNH_PHP_VERSION}-zip"
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
|
|
|
@ -25,8 +25,8 @@ ynh_abort_if_errors
|
|||
|
||||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url=$YNH_APP_ARG_PATH
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
password=$YNH_APP_ARG_PASSWORD
|
||||
users_status=$YNH_APP_ARG_USERS_STATUS
|
||||
|
||||
|
@ -54,6 +54,8 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin
|
|||
ynh_app_setting_set --app=$app --key=password --value=$password
|
||||
ynh_app_setting_set --app=$app --key=users_status --value=$users_status
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
|
@ -67,7 +69,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
ynh_script_progression --message="Configuring system user..."
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# CREATE A MYSQL DATABASE
|
||||
|
@ -93,14 +95,6 @@ chmod 750 "$final_path"
|
|||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring NGINX web server..."
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -109,6 +103,14 @@ ynh_script_progression --message="Configuring PHP-FPM..."
|
|||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring NGINX web server..."
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
|
@ -153,8 +155,9 @@ ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3b" "adresse_db=localhos
|
|||
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=fin"
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
# ADD A CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adding a configuration file..."
|
||||
|
||||
#ynh_replace_string "'','utf8');" "'ldap.php','utf8');" $final_path/config/connect.php
|
||||
cp ../conf/mes_options.php $final_path/config/mes_options.php
|
||||
|
|
|
@ -39,14 +39,6 @@ ynh_script_progression --message="Removing the MySQL database..."
|
|||
# Remove a database if it exists, along with the associated user
|
||||
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing dependencies..."
|
||||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
|
@ -71,6 +63,14 @@ ynh_script_progression --message="Removing PHP-FPM configuration..."
|
|||
# Remove the dedicated PHP-FPM config
|
||||
ynh_remove_fpm_config
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing dependencies..."
|
||||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -39,17 +39,11 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..."
|
||||
|
||||
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
|
||||
test ! -d $final_path \
|
||||
|| ynh_die --message="There is already a directory: $final_path "
|
||||
|
||||
#=================================================
|
||||
# STANDARD RESTORATION STEPS
|
||||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the NGINX configuration..."
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
|
@ -69,6 +63,14 @@ chmod 750 "$final_path"
|
|||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..."
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -81,15 +83,12 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
|||
ynh_add_fpm_config --phpversion=$phpversion
|
||||
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..."
|
||||
ynh_script_progression --message="Restoring the NGINX web server configuration..."
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
|
|
@ -118,7 +118,7 @@ fi
|
|||
ynh_script_progression --message="Making sure dedicated system user exists..."
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -136,14 +136,6 @@ chmod 750 "$final_path"
|
|||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..."
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
|
@ -159,6 +151,14 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..."
|
|||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..."
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
|
@ -209,14 +209,11 @@ ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=fin"
|
|||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating a configuration file..."
|
||||
|
||||
#ynh_replace_string --match_string="'','utf8');" --replace_string="'ldap.php','utf8');" --target_file=$final_path/config/connect.php
|
||||
cp ../conf/mes_options.php $final_path/config/mes_options.php
|
||||
|
||||
#=================================================
|
||||
# STORE THE CONFIG FILE CHECKSUM
|
||||
#=================================================
|
||||
|
||||
if [ ! -f $final_path/config/connect.php ]; then
|
||||
mv $final_path/config/connect.php.ynh_bkp $final_path/config/connect.php
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue