1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wallabag2_ynh.git synced 2024-10-01 13:35:06 +02:00

Merge pull request #43 from YunoHost-Apps/2.3

Update source to 2.3.2
This commit is contained in:
JimboJoe 2018-01-30 07:18:02 +01:00 committed by GitHub
commit 5c4b874536
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 59 additions and 96 deletions

View file

@ -7,7 +7,7 @@ This is a Wallabag v2 package for YunoHost.
**NB: Since @jeromelebleu is no longer maintaining this package, I (@lapineige) take over this repository. But I have limited time and experience, so feel free to help !**
**Shipped version:** 2.2.3
**Shipped version:** 2.3.2
[Wallabag](https://www.wallabag.org/) is a self hostable Read-It-Later application allowing
you to not miss any content anymore. Click, save, read it when you can.
@ -56,7 +56,7 @@ Paquet Wallabag v2 pour Yunohost.
**NB: Depuis que @jeromelebleu ne maintiens plus ce paquet, je (@lapineige) reprends la charge de ce dépôt. Mais j'ai un temps et une expérience limitées, donc n'hésitez pas à donner un coup de main :) !**
**Version actuelle:** 2.2.3
**Version actuelle:** 2.3.2
[Wallabag](https://www.wallabag.org/) est une application de lecture différée : elle permet simplement darchiver une page web en ne conservant que le contenu. Les éléments superflus (menus, publicités, etc.) sont supprimés.

View file

@ -11,6 +11,7 @@
setup_private=0
setup_public=0
upgrade=1
upgrade=1 from_commit=f75d58cb32c51a0981333ea88974dc3199324e65
backup_restore=1
multi_instance=1
incorrect_path=1
@ -32,3 +33,7 @@
;;; Options
Email=
Notification=none
;;; Upgrade options
; commit=f75d58cb32c51a0981333ea88974dc3199324e65
name= Previous package version
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&

View file

@ -1,3 +1,3 @@
SOURCE_URL=https://static.wallabag.org/releases/wallabag-release-2.2.3.tar.gz
SOURCE_SUM=13fe5cb7cfc741abee08312f0055e9549e60590daff2fac41be5266f7956d857
SOURCE_URL=https://static.wallabag.org/releases/wallabag-release-2.3.2.tar.gz
SOURCE_SUM=047a49d48a1199bd1634cab76d4af3dba95096885d4f7814377210fa76fbcc9f
SOURCE_FORMAT=tar.gz

View file

@ -1,50 +0,0 @@
parameters:
database_driver: pdo_mysql
database_host: localhost
database_port: 3306
database_name: {DBNAME}
database_user: {DBUSER}
database_password: {DBPASS}
database_path: null
database_table_prefix: null
database_socket: null
database_charset: utf8mb4
mailer_transport: smtp
mailer_host: localhost
mailer_user: null
mailer_password: null
locale: en
# A secret key that's used to generate certain security-related tokens
secret: {DESKEY}
# two factor stuff
twofactor_auth: true
twofactor_sender: no-reply@wallabag.org
# fosuser stuff
fosuser_registration: false
fosuser_confirmation: true
from_email: no-reply@wallabag.org
rss_limit: 50
# RabbitMQ processing
rabbitmq_host: localhost
rabbitmq_port: 5672
rabbitmq_user: guest
rabbitmq_password: guest
rabbitmq_prefetch_count: 10
# Redis processing
redis_scheme: tcp
redis_host: localhost
redis_port: 6379
redis_path: null
redis_password: null
# sites credentials
sites_credentials: {}

View file

@ -8,7 +8,7 @@
},
"url": "https://www.wallabag.org",
"license": "MIT",
"version": "2.2.3",
"version": "2.3.2-1",
"maintainer": {
"name": "lapineige",
"email": ""

View file

@ -3,7 +3,7 @@
#
# Package dependencies
PKG_DEPENDENCIES="php5-cli php5-mysql php5-json php5-gd php5-tidy php5-curl php-gettext redis-server"
PKG_DEPENDENCIES="php5-cli php5-mysql php5-json php5-gd php5-tidy php5-curl php-gettext php5-redis"
# Execute a command as another user
# usage: exec_as USER COMMAND [ARG ...]
@ -36,12 +36,6 @@ QUIET () { # redirect standard output to /dev/null
$@ > /dev/null
}
HUMAN_SIZE () { # Transforms a Kb-based size to a human-readable size
human=$(numfmt --to=iec --from-unit=1K $1)
echo $human
}
CHECK_SIZE () { # Check if enough disk space available on backup storage
file_to_analyse=$1
backup_size=$(du --summarize "$file_to_analyse" | cut -f1)
@ -55,15 +49,6 @@ CHECK_SIZE () { # Check if enough disk space available on backup storage
fi
}
CHECK_DOMAINPATH () { # Check domain/path availability
yunohost app checkurl $domain$path_url -a $app
}
CHECK_FINALPATH () { # Check if destination directory already exists
final_path="/var/www/$app"
test ! -e "$final_path" || ynh_die "This path already contains a folder"
}
# ============= FUTURE YUNOHOST HELPER =============
# Delete a file checksum from the app settings

View file

@ -28,6 +28,7 @@ app=$YNH_APP_INSTANCE_NAME
db_name=$(ynh_app_setting_get "$app" db_name)
db_pwd=$(ynh_app_setting_get "$app" mysqlpwd)
db_user="$db_name"
final_path=$(ynh_app_setting_get "$app" final_path)
#=================================================
# CHECK PATHS SYNTAX
@ -87,7 +88,7 @@ then
ynh_replace_string "rewrite ^ /" "rewrite ^ $new_path/" "$nginx_conf_path"
else
# Replace locations starting with old_path
# Look for every possible patterns for location directive(see https://nginx.org/en/docs/http/ngx_http_core_module.html#location)
# Look for every possible patterns for location directive (see https://nginx.org/en/docs/http/ngx_http_core_module.html#location)
ynh_replace_string "location\( \(=\|~\|~\*\|\^~\)\)\? \(\^\)\?$old_path" "location\1 \3$new_path" "$nginx_conf_path"
# Replace path in "rewrite" directive
ynh_replace_string "rewrite ^ $old_path" "rewrite ^ $new_path" "$nginx_conf_path"
@ -113,6 +114,9 @@ fi
# Configure Wallabag instance URL
ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_user" <<< "UPDATE craue_config_setting SET value = 'https://$new_domain$new_path' WHERE name = 'wallabag_url'"
# Change domain name in parameters.yml
ynh_replace_string "domain_name: https://$old_domain$old_path" "domain_name: https://$new_domain$new_path" $final_path/app/config/parameters.yml
# If "Download images locally" option has been enabled in Internal Settings
download_images_enabled=$(ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_user" <<< "SELECT value from craue_config_setting WHERE name='download_images_enabled '" | tail -n 1)
if [ "$download_images_enabled" = "1" ] ; then

View file

@ -31,9 +31,15 @@ admin=$YNH_APP_ARG_ADMIN
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#=================================================
final_path=/var/www/$app
test ! -e "$final_path" || ynh_die "This path already contains a folder"
path_url=$(ynh_normalize_url_path $path_url) # Check and normalize path
CHECK_DOMAINPATH # Check domain and path availability
CHECK_FINALPATH # Check if destination directory is not already in use
# Check web path availability
ynh_webpath_available $domain $path_url
# Register (book) web path
ynh_webpath_register $app $domain $path_url
#=================================================
# STORE SETTINGS FROM MANIFEST
@ -86,11 +92,16 @@ ynh_system_user_create $app # Create a dedicated system user
# Copy and set Wallabag dist configuration
wb_conf="${TMPDIR}/app/config/parameters.yml"
cp ../conf/parameters.yml "$wb_conf"
ynh_replace_string "{DBNAME}" "${db_name}" "$wb_conf"
ynh_replace_string "{DBUSER}" "${db_user}" "$wb_conf"
ynh_replace_string "{DBPASS}" "${db_pwd}" "$wb_conf"
ynh_replace_string "{DESKEY}" "${deskey}" "$wb_conf"
cp ${TMPDIR}/app/config/parameters.yml.dist $wb_conf
ynh_replace_string "fosuser_registration: true" "fosuser_registration: false" "$wb_conf"
ynh_replace_string "database_name: wallabag" "database_name: ${db_name}" "$wb_conf"
ynh_replace_string "database_user: root" "database_user: ${db_user}" "$wb_conf"
ynh_replace_string "database_password: ~" "database_password: ${db_pwd}" "$wb_conf"
ynh_replace_string "database_table_prefix: wallabag_" "database_table_prefix: null" "$wb_conf"
ynh_replace_string "secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv" "secret: ${deskey}" "$wb_conf"
ynh_replace_string "domain_name: https://your-wallabag-url-instance.com" "domain_name: https://$domain$path_url" "$wb_conf"
# Restrict rights to Wallabag user only
chmod 600 "$wb_conf"

View file

@ -89,11 +89,15 @@ ynh_system_user_create $app # Create dedicated user if not existing
# Copy and set Wallabag dist configuration
wb_conf="${TMPDIR}/app/config/parameters.yml"
cp ../conf/parameters.yml "$wb_conf"
ynh_replace_string "{DBNAME}" "${db_name}" "$wb_conf"
ynh_replace_string "{DBUSER}" "${db_user}" "$wb_conf"
ynh_replace_string "{DBPASS}" "${db_pwd}" "$wb_conf"
ynh_replace_string "{DESKEY}" "${deskey}" "$wb_conf"
cp ${TMPDIR}/app/config/parameters.yml.dist $wb_conf
ynh_replace_string "fosuser_registration: true" "fosuser_registration: false" "$wb_conf"
ynh_replace_string "database_name: wallabag" "database_name: ${db_name}" "$wb_conf"
ynh_replace_string "database_user: root" "database_user: ${db_user}" "$wb_conf"
ynh_replace_string "database_password: ~" "database_password: ${db_pwd}" "$wb_conf"
ynh_replace_string "database_table_prefix: wallabag_" "database_table_prefix: null" "$wb_conf"
ynh_replace_string "secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv" "secret: ${deskey}" "$wb_conf"
ynh_replace_string "domain_name: https://your-wallabag-url-instance.com" "domain_name: https://$domain$path_url" "$wb_conf"
# Replace files and set permissions
ynh_secure_remove "${final_path}/var/cache"

View file

@ -1,17 +1,20 @@
--- a/app/config/services.yml 2016-05-25 18:09:56.374914445 +0200
+++ b/app/config/services.yml 2016-05-25 18:07:38.775042951 +0200
@@ -36,3 +36,7 @@
arguments: ["@session"]
@@ -43,6 +43,10 @@
tags:
- { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin }
+
+ yunohost.ldap:
+ class: Symfony\Component\Ldap\LdapClient
+ arguments: ["localhost"]
+
craue_config_cache_provider:
class: Symfony\Component\Cache\Adapter\FilesystemAdapter
public: false
--- a/app/config/security.yml 2016-05-25 18:09:46.814645164 +0200
+++ b/app/config/security.yml 2016-05-25 18:07:38.775042951 +0200
@@ -11,6 +11,14 @@
entity: { class: WallabagUserBundle:User, property: username }
@@ -13,6 +13,14 @@
property: username
fos_userbundle:
id: fos_user.user_provider.username
+ yunohost_users:
@ -25,7 +28,7 @@
# the main part of the security, where you can set up firewalls
# for specific sections of your app
@@ -36,6 +44,9 @@
@@ -38,6 +46,9 @@
secured_area:
pattern: ^/

View file

@ -15,12 +15,13 @@ diff --git a/app/config/services.yml b/app/config/services.yml
index 8a09fde..ee63e06 100644
--- a/app/config/services.yml
+++ b/app/config/services.yml
@@ -37,6 +37,9 @@ services:
@@ -43,6 +43,10 @@
tags:
- { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin }
+ yunohost.logout_success_handler:
+ class: Wallabag\YunoHostBundle\Security\LogoutSuccessHandler
+
+
yunohost.ldap:
class: Symfony\Component\Ldap\LdapClient