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

Merge pull request #48 from YunoHost-Apps/testing

Upgrade to 2.22~ynh1
This commit is contained in:
yalh76 2022-08-15 01:05:47 +02:00 committed by GitHub
commit 23f558c891
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 133 additions and 75 deletions

View file

@ -16,9 +16,8 @@
# Fetching information # Fetching information
current_version=$(cat manifest.json | jq -j '.version|split("~")[0]') current_version=$(cat manifest.json | jq -j '.version|split("~")[0]')
repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]') repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]')
asset=$(curl --silent "https://download.dotclear.org/latest/" | grep "dotclear-.*?.zip" -Po | head -1)
asset=$(curl --silent "https://download.dotclear.org/latest/" | grep "dotclear-.*?.tar.gz" -Po | head -1) version=${asset%.zip}
version=${asset%.tar.gz}
version=${version#dotclear-} version=${version#dotclear-}
# Later down the script, we assume the version has only digits and dots # Later down the script, we assume the version has only digits and dots
@ -55,20 +54,20 @@ src="app"
tempdir="$(mktemp -d)" tempdir="$(mktemp -d)"
# Download sources and calculate checksum # Download sources and calculate checksum
curl --silent -4 -L http://download.dotclear.org/latest/dotclear-$version.tar.gz -o "$tempdir/$asset" curl --silent -4 -L http://download.dotclear.org/latest/dotclear-$version.zip -o "$tempdir/$asset"
checksum=$(sha256sum "$tempdir/$asset" | head -c 64) checksum=$(sha256sum "$tempdir/$asset" | head -c 64)
# Delete temporary directory # Delete temporary directory
rm -rf $tempdir rm -rf $tempdir
# Get extension # Get extension
if [[ $asset == *.tar.gz ]]; then if [[ $asset == *.zip ]]; then
extension=tar.gz extension=zip
fi fi
# Rewrite source file # Rewrite source file
cat <<EOT > conf/$src.src cat <<EOT > conf/$src.src
SOURCE_URL=http://download.dotclear.org/latest/dotclear-$version.tar.gz SOURCE_URL=http://download.dotclear.org/latest/dotclear-$version.zip
SOURCE_SUM=$checksum SOURCE_SUM=$checksum
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=$extension SOURCE_FORMAT=$extension

View file

@ -1,70 +1,60 @@
<!--
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.
-->
# DotClear 2 for YunoHost # DotClear 2 for YunoHost
[![Integration level](https://dash.yunohost.org/integration/dotclear2.svg)](https://dash.yunohost.org/appci/app/dotclear2) ![](https://ci-apps.yunohost.org/ci/badges/dotclear2.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/dotclear2.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/dotclear2.svg)](https://dash.yunohost.org/appci/app/dotclear2) ![Working status](https://ci-apps.yunohost.org/ci/badges/dotclear2.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/dotclear2.maintain.svg)
[![Install dotclear2 with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=dotclear2) [![Install DotClear 2 with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=dotclear2)
> *This package allow you to install dotclear2 quickly and simply on a YunoHost server. *[Lire ce readme en français.](./README_fr.md)*
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
> *This package allows you to install DotClear 2 quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
## Overview ## Overview
Dotclear is an open-source web publishing software.
**Shipped version:** 2.20.1 Blog publishing application
**Shipped version:** 2.22~ynh1
**Demo:** https://www.softaculous.com/demos/Dotclear
## Screenshots ## Screenshots
![](https://installatron.com/images/remote/ss2_dotclear.png) ![Screenshot of DotClear 2](./doc/screenshots/ss2_dotclear.png)
## Demo ## Disclaimers / important information
* [Official demo](https://www.softaculous.com/demos/Dotclear)
## Configuration ## Configuration
How to configure this app: by an admin panel. How to configure this app: by an admin panel.
## Documentation
* Official documentation: https://dotclear.org/documentation/2.0
## YunoHost specific features
#### Multi-users support #### Multi-users support
Are LDAP supported? **Yes** Are LDAP supported? **Yes**
Are HTTP auth supported? **No** (PR are welcome!) Are HTTP auth supported? **No** (PR are welcome!)
Can the app be used by multiple users? **Yes** Can the app be used by multiple users? **Yes**
#### Supported architectures ## Documentation and resources
* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/dotclear2%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/dotclear2/) * Official app website: <https://dotclear.org>
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/dotclear2%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/dotclear2/) * Official admin documentation: <https://dotclear.org/documentation/2.0>
* Upstream app code repository: <https://git.dotclear.org/dev/dotclear>
* YunoHost documentation for this app: <https://yunohost.org/app_dotclear2>
* Report a bug: <https://github.com/YunoHost-Apps/dotclear2_ynh/issues>
## Limitations ## Developer info
* Only YunoHost users can have an admin account. (PR are welcome!) Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/dotclear2_ynh/tree/testing).
**More information on the documentation page:**
https://yunohost.org/packaging_apps
## Links
* Report a bug: https://github.com/YunoHost-Apps/dotclear2_ynh/issues
* App website: https://dotclear.org
* Upstream app repository: https://git.dotclear.org/dev/dotclear
* YunoHost website: https://yunohost.org/
---
Developers info
----------------
**Only if you want to use a testing branch for coding, instead of merging directly into master.**
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/dotclear2_ynh/tree/testing).
To try the testing branch, please proceed like that. To try the testing branch, please proceed like that.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/dotclear2_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/dotclear2_ynh/tree/testing --debug
or or
sudo yunohost app upgrade dotclear2 -u https://github.com/YunoHost-Apps/dotclear2_ynh/tree/testing --debug sudo yunohost app upgrade dotclear2 -u https://github.com/YunoHost-Apps/dotclear2_ynh/tree/testing --debug
``` ```
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>

60
README_fr.md Normal file
View file

@ -0,0 +1,60 @@
<!--
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.
-->
# DotClear 2 pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/dotclear2.svg)](https://dash.yunohost.org/appci/app/dotclear2) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/dotclear2.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/dotclear2.maintain.svg)
[![Installer DotClear 2 avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=dotclear2)
*[Read this readme in english.](./README.md)*
> *Ce package vous permet d'installer DotClear 2 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.*
## Vue d'ensemble
Moteur de blog
**Version incluse :** 2.22~ynh1
**Démo :** https://www.softaculous.com/demos/Dotclear
## Captures d'écran
![Capture d'écran de DotClear 2](./doc/screenshots/ss2_dotclear.png)
## Avertissements / informations importantes
## Configuration
How to configure this app: by an admin panel.
#### Multi-users support
Are LDAP supported? **Yes**
Are HTTP auth supported? **No** (PR are welcome!)
Can the app be used by multiple users? **Yes**
## Documentations et ressources
* Site officiel de l'app : <https://dotclear.org>
* Documentation officielle de l'admin : <https://dotclear.org/documentation/2.0>
* Dépôt de code officiel de l'app : <https://git.dotclear.org/dev/dotclear>
* Documentation YunoHost pour cette app : <https://yunohost.org/app_dotclear2>
* Signaler un bug : <https://github.com/YunoHost-Apps/dotclear2_ynh/issues>
## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/dotclear2_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit.
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/dotclear2_ynh/tree/testing --debug
ou
sudo yunohost app upgrade dotclear2 -u https://github.com/YunoHost-Apps/dotclear2_ynh/tree/testing --debug
```
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>

View file

@ -2,8 +2,8 @@
; Manifest ; Manifest
domain="domain.tld" domain="domain.tld"
path="/path" path="/path"
admin="john"
is_public=1 is_public=1
admin="john"
; Checks ; Checks
pkg_linter=1 pkg_linter=1
setup_sub_dir=1 setup_sub_dir=1
@ -12,7 +12,7 @@
setup_private=1 setup_private=1
setup_public=1 setup_public=1
upgrade=1 upgrade=1
upgrade=1 from_commit=f356f5b8f496f626aba3ec0f9d9c40c4cb54e7f6 upgrade=1 from_commit=f356f5b8f496f626aba3ec0f9d9c40c4cb54e7f6
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
port_already_use=0 port_already_use=0

View file

@ -1,5 +1,5 @@
SOURCE_URL=http://download.dotclear.org/latest/dotclear-2.20.1.zip SOURCE_URL=https://download.dotclear.org/latest/dotclear-2.22.zip
SOURCE_SUM=fdd919ac1d1499987bb6707a585f9e5eae34d3cdf9f62db9852ea9cd6f8e17a9 SOURCE_SUM=94895d2479654c233f9b269a007ebb36bcf8cba34f4c1071424957f79b90ad6f
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=true SOURCE_IN_SUBDIR=true

View file

@ -4,11 +4,6 @@ location __PATH__/ {
# Path to source # Path to source
alias __FINALPATH__/ ; alias __FINALPATH__/ ;
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
index index.php; index index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file

9
doc/DISCLAIMER.md Normal file
View file

@ -0,0 +1,9 @@
## Configuration
How to configure this app: by an admin panel.
#### Multi-users support
Are LDAP supported? **Yes**
Are HTTP auth supported? **No** (PR are welcome!)
Can the app be used by multiple users? **Yes**

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View file

@ -6,15 +6,22 @@
"en": "Blog publishing application", "en": "Blog publishing application",
"fr": "Moteur de blog" "fr": "Moteur de blog"
}, },
"version": "2.20.1~ynh2", "version": "2.22~ynh1",
"license": "GPL-2.0-or-later",
"url": "https://dotclear.org/", "url": "https://dotclear.org/",
"upstream": {
"license": "GPL-2.0-or-later",
"website": "https://dotclear.org",
"demo": "https://www.softaculous.com/demos/Dotclear",
"admindoc": "https://dotclear.org/documentation/2.0",
"code": "https://git.dotclear.org/dev/dotclear"
},
"license": "GPL-2.0-or-later",
"maintainer": { "maintainer": {
"name": "kay0u", "name": "kay0u",
"email": "pierre@kayou.io" "email": "pierre@kayou.io"
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.3.2" "yunohost": ">= 11.0.0"
}, },
"multi_instance": true, "multi_instance": true,
"services": [ "services": [
@ -23,11 +30,10 @@
"mysql" "mysql"
], ],
"arguments": { "arguments": {
"install" : [ "install": [
{ {
"name": "domain", "name": "domain",
"type": "domain", "type": "domain"
"example": "example.com"
}, },
{ {
"name": "path", "name": "path",
@ -35,15 +41,14 @@
"example": "/dotclear2", "example": "/dotclear2",
"default": "/dotclear2" "default": "/dotclear2"
}, },
{
"name": "admin",
"type": "user",
"example": "johndoe"
},
{ {
"name": "is_public", "name": "is_public",
"type": "boolean", "type": "boolean",
"default": true "default": true
},
{
"name": "admin",
"type": "user"
} }
] ]
} }

View file

@ -53,7 +53,7 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_script_progression --message="Configuring system user..." --weight=2 ynh_script_progression --message="Configuring system user..." --weight=2
# Create a 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 # CREATE A MYSQL DATABASE
@ -64,7 +64,6 @@ db_name=$(ynh_sanitize_dbid --db_name=$app)
db_user=$db_name db_user=$db_name
ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
#================================================= #=================================================
@ -107,6 +106,8 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
# Create a dedicated PHP-FPM config # Create a dedicated PHP-FPM config
ynh_add_fpm_config ynh_add_fpm_config
#=================================================
# SPECIFIC SETUP
#================================================= #=================================================
# ADD A CONFIGURATION # ADD A CONFIGURATION
#================================================= #=================================================
@ -171,6 +172,7 @@ chown $app:$app "$php_config"
#================================================= #=================================================
# SETUP APPLICATION WITH CURL # SETUP APPLICATION WITH CURL
#================================================= #=================================================
ynh_script_progression --message="Setuping application with CURL..."
# Set the app as temporarily public for curl call # Set the app as temporarily public for curl call
ynh_script_progression --message="Configuring SSOwat..." ynh_script_progression --message="Configuring SSOwat..."

View file

@ -58,7 +58,7 @@ ynh_remove_fpm_config
#================================================= #=================================================
# REMOVE FAIL2BAN CONFIGURATION # REMOVE FAIL2BAN CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Removing Fail2ban configuration..." ynh_script_progression --message="Removing Fail2Ban configuration..."
# Remove the dedicated Fail2Ban config # Remove the dedicated Fail2Ban config
ynh_remove_fail2ban_config ynh_remove_fail2ban_config

View file

@ -36,8 +36,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
ynh_script_progression --message="Validating restoration parameters..." ynh_script_progression --message="Validating restoration parameters..."
ynh_webpath_available --domain=$domain --path_url=$path_url \
|| ynh_die --message="Path not available: ${domain}${path_url}"
test ! -d $final_path \ test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path " || ynh_die --message="There is already a directory: $final_path "
@ -56,7 +54,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_script_progression --message="Recreating the dedicated system user..." --weight=2 ynh_script_progression --message="Recreating the dedicated system user..." --weight=2
# Create the dedicated user (if not existing) # Create the 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"
#================================================= #=================================================
# RESTORE THE APP MAIN DIR # RESTORE THE APP MAIN DIR

View file

@ -1,8 +1,8 @@
diff --git a/inc/core/class.dc.core.php b/inc/core/class.dc.core.php diff --git a/inc/core/class.dc.core.php b/inc/core/class.dc.core.php
index 3d0c45d..98a70a6 100644 index e9c0ac2..0c6f2e5 100644
--- a/inc/core/class.dc.core.php --- a/inc/core/class.dc.core.php
+++ b/inc/core/class.dc.core.php +++ b/inc/core/class.dc.core.php
@@ -839,8 +839,8 @@ class dcCore @@ -941,8 +941,8 @@ class dcCore
} }
if ($cur->isField('user_pwd')) { if ($cur->isField('user_pwd')) {