mirror of
https://github.com/YunoHost-Apps/calibreweb_ynh.git
synced 2024-09-03 18:16:20 +02:00
Init commit 0.6.7Beta
This commit is contained in:
parent
a1965181f7
commit
b2731a37d1
8 changed files with 33 additions and 107 deletions
|
@ -1,3 +1,3 @@
|
||||||
SOURCE_URL=https://github.com/janeczku/calibre-web/archive/7c89f0b5b97678c8b93a484ee7e5acf746240938.zip
|
SOURCE_URL=https://github.com/janeczku/calibre-web/archive/06fde4fcd00fcd067a58939e1d9eabee62a86913.zip
|
||||||
SOURCE_SUM=7127c42c2573d85a56da41ea705944a724742e9059a6c138de9cfd78424cce88
|
SOURCE_SUM=81aa6e95837569e9ebdb6da73529d8cbb33dfde65fd07a384ae6cc79dcfe5afa
|
||||||
SOURCE_FORMAT=zip
|
SOURCE_FORMAT=zip
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
config_login_type=1,
|
config_login_type=1,
|
||||||
config_ldap_provider_url=\'localhost\',
|
config_ldap_provider_url=\'localhost\',
|
||||||
config_ldap_port=389,
|
config_ldap_port=389,
|
||||||
config_ldap_schema=\'ldap\',
|
config_ldap_authentication=0,
|
||||||
config_ldap_serv_username=\'cn=admin,dc=yunohost,dc=org\',
|
|
||||||
config_ldap_serv_password=\'eXVub2hvc3RfZGV2\',
|
|
||||||
config_ldap_dn=\'dc=yunohost,dc=org\',
|
config_ldap_dn=\'dc=yunohost,dc=org\',
|
||||||
config_ldap_user_object=\'\(\&\(objectClass=posixAccount\)\(uid=%s\)\)\',
|
config_ldap_user_object=\'\(\&\(objectClass=posixAccount\)\(permission=cn=calibreweb.main,ou=permission,dc=yunohost,dc=org\)\(uid=%s\)\)\',
|
||||||
config_ldap_openldap=1,
|
config_ldap_openldap=1,
|
||||||
config_ldap_group_object_filter='\(\&\(objectClass=posixGroup\)\(permission=cn=%s.main,ou=permission,dc=yunohost,dc=org\)\)',
|
config_ldap_group_object_filter=\'\(\&\(objectClass=posixGroup\)\(permission=cn=%s.main,ou=permission,dc=yunohost,dc=org\)\)\',
|
||||||
config_ldap_group_members_field='memberUid',
|
config_ldap_group_members_field=\'memberUid\',
|
||||||
config_ldap_group_name='calibreweb'
|
config_ldap_group_name=\'calibreweb\'
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Browsing, reading and downloading eBooks using a Calibre database",
|
"en": "Browsing, reading and downloading eBooks using a Calibre database",
|
||||||
"fr": "Explorer, lire et télécharger des eBooks à partir d'une base de données Calibre"
|
"fr": "Explorer, lire et télécharger des eBooks à partir d'une base de données Calibre"
|
||||||
},
|
},
|
||||||
"version": "0.96.6~ynh4",
|
"version": "0.96.7beta~ynh4",
|
||||||
"url": "https://github.com/janeczku/calibre-web",
|
"url": "https://github.com/janeczku/calibre-web",
|
||||||
"license": "free",
|
"license": "free",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -172,8 +172,6 @@ ynh_systemd_action -a stop
|
||||||
|
|
||||||
|
|
||||||
#set database settings as per conf file
|
#set database settings as per conf file
|
||||||
#insertion of dummy value for config_ldap_serv_username and config_ldap_serv_password : required for calibreweb and simpleldap but not
|
|
||||||
#required by Yunohost ldap.
|
|
||||||
conf="\"UPDATE settings SET $(. <(echo -E echo $(<../conf/init_calibre_db_settings))), $(. <(echo -E echo $(<../conf/init_calibre_db_ldap_settings))) WHERE ID=1\""
|
conf="\"UPDATE settings SET $(. <(echo -E echo $(<../conf/init_calibre_db_settings))), $(. <(echo -E echo $(<../conf/init_calibre_db_ldap_settings))) WHERE ID=1\""
|
||||||
eval sqlite3 $final_path/app.db "$conf"
|
eval sqlite3 $final_path/app.db "$conf"
|
||||||
|
|
||||||
|
@ -188,31 +186,32 @@ eval sqlite3 $final_path/app.db "$conf"
|
||||||
#ynh_print_ON
|
#ynh_print_ON
|
||||||
|
|
||||||
#Creation des autres utilisateurs
|
#Creation des autres utilisateurs
|
||||||
if [ $public_library -eq 1 ]; then
|
#Disabled => Will be handled by LDAP
|
||||||
table_schema=$(get_db "user")
|
#if [ $public_library -eq 1 ]; then
|
||||||
|
# table_schema=$(get_db "user")
|
||||||
|
|
||||||
for i in $(ynh_user_list); do
|
# for i in $(ynh_user_list); do
|
||||||
if [ $i = $admin ]; then continue; fi
|
# if [ $i = $admin ]; then continue; fi
|
||||||
mail=$(ynh_user_get_info $i 'mail')
|
# mail=$(ynh_user_get_info $i 'mail')
|
||||||
######################################
|
# ######################################
|
||||||
#Build new entry for user
|
# #Build new entry for user
|
||||||
######################################
|
# ######################################
|
||||||
insert_user=$table_schema
|
# insert_user=$table_schema
|
||||||
insert_user="${insert_user/id/null}" #so that a new entry is created
|
# insert_user="${insert_user/id/null}" #so that a new entry is created
|
||||||
insert_user="${insert_user/nickname/\'$i\'}"
|
# insert_user="${insert_user/nickname/\'$i\'}"
|
||||||
insert_user="${insert_user/role/0}" #standard role
|
# insert_user="${insert_user/role/0}" #standard role
|
||||||
# pass_hash=$(python /etc/yunohost/apps/$app/conf/generate_password_hash.py "$pass_clear" $final_path/vendor)
|
# # pass_hash=$(python /etc/yunohost/apps/$app/conf/generate_password_hash.py "$pass_clear" $final_path/vendor)
|
||||||
# insert_user="${insert_user/password/\'$pass_hash\'}" #we get the same pass even if it's not thanks to LDAP, ones never knows...
|
# # insert_user="${insert_user/password/\'$pass_hash\'}" #we get the same pass even if it's not thanks to LDAP, ones never knows...
|
||||||
insert_user="${insert_user/email/\'$mail\'}"
|
# insert_user="${insert_user/email/\'$mail\'}"
|
||||||
|
#
|
||||||
#######################################
|
# #######################################
|
||||||
# Insert New entry in database
|
# # Insert New entry in database
|
||||||
#######################################
|
# #######################################
|
||||||
|
#
|
||||||
sqlite3 $final_path/app.db "INSERT INTO user ($table_schema) SELECT $insert_user FROM user WHERE ID = 1;"
|
# sqlite3 $final_path/app.db "INSERT INTO user ($table_schema) SELECT $insert_user FROM user WHERE ID = 1;"
|
||||||
|
#
|
||||||
done
|
# done
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SECURE FILES AND DIRECTORIES
|
# SECURE FILES AND DIRECTORIES
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/cps/admin.py 2020-02-23 09:08:01.000000000 +0100
|
|
||||||
+++ b/cps/admin.py 2020-04-12 12:51:28.100811662 +0200
|
|
||||||
@@ -43,7 +43,7 @@
|
|
||||||
from .web import admin_required, render_title_template, before_request, unconfigured, login_required_if_no_ano
|
|
||||||
|
|
||||||
feature_support = {
|
|
||||||
- 'ldap': False, # bool(services.ldap),
|
|
||||||
+ 'ldap': bool(services.ldap),
|
|
||||||
'goodreads': bool(services.goodreads_support)
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
--- a/optional-requirements.txt 2020-02-23 09:08:01.000000000 +0100
|
|
||||||
+++ b/optional-requirements.txt 2020-04-13 10:50:30.317525119 +0200
|
|
||||||
@@ -1,34 +1,3 @@
|
|
||||||
-# GDrive Integration
|
|
||||||
-google-api-python-client==1.7.11,<1.8.0
|
|
||||||
-gevent>=1.2.1,<1.5.0
|
|
||||||
-greenlet>=0.4.12,<0.5.0
|
|
||||||
-httplib2>=0.9.2,<0.18.0
|
|
||||||
-oauth2client>=4.0.0,<4.14.0
|
|
||||||
-uritemplate>=3.0.0,<3.1.0
|
|
||||||
-pyasn1-modules>=0.0.8,<0.3.0
|
|
||||||
-pyasn1>=0.1.9,<0.5.0
|
|
||||||
-PyDrive>=1.3.1,<1.14.0
|
|
||||||
-PyYAML>=3.12
|
|
||||||
-rsa==3.4.2,<4.1.0
|
|
||||||
-six>=1.10.0,<1.14.0
|
|
||||||
-
|
|
||||||
-# goodreads
|
|
||||||
-goodreads>=0.3.2,<0.4.0
|
|
||||||
-python-Levenshtein>=0.12.0,<0.13.0
|
|
||||||
-
|
|
||||||
# ldap login
|
|
||||||
python_ldap>=3.0.0,<3.3.0
|
|
||||||
flask-simpleldap>1.3.0,<1.5.0
|
|
||||||
-
|
|
||||||
-#oauth
|
|
||||||
-flask-dance>=0.13.0
|
|
||||||
-sqlalchemy_utils>=0.33.5,<0.37.0
|
|
||||||
-
|
|
||||||
-# extracting metadata
|
|
||||||
-lxml>=3.8.0,<4.6.0
|
|
||||||
-Pillow>=4.0.0,<7.1.0
|
|
||||||
-rarfile>=2.7
|
|
||||||
-
|
|
||||||
-# other
|
|
||||||
-natsort>=2.2.0,<7.1.0
|
|
||||||
-git+https://github.com/OzzieIsaacs/comicapi.git@ad8bfe5a1c31db882480433f86db2c5c57634a3f#egg=comicapi
|
|
|
@ -1,12 +0,0 @@
|
||||||
--- a/cps/services/simpleldap.py 2020-02-23 09:08:01.000000000 +0100
|
|
||||||
+++ b/cps/services/simpleldap.py 2020-04-13 18:57:49.302535092 +0200
|
|
||||||
@@ -35,8 +35,7 @@
|
|
||||||
app.config['LDAP_HOST'] = config.config_ldap_provider_url
|
|
||||||
app.config['LDAP_PORT'] = config.config_ldap_port
|
|
||||||
app.config['LDAP_SCHEMA'] = config.config_ldap_schema
|
|
||||||
- app.config['LDAP_USERNAME'] = config.config_ldap_user_object.replace('%s', config.config_ldap_serv_username)\
|
|
||||||
- + ',' + config.config_ldap_dn
|
|
||||||
+ app.config['LDAP_USERNAME'] = config.config_ldap_serv_username
|
|
||||||
app.config['LDAP_PASSWORD'] = base64.b64decode(config.config_ldap_serv_password)
|
|
||||||
app.config['LDAP_REQUIRE_CERT'] = bool(config.config_ldap_require_cert)
|
|
||||||
if config.config_ldap_require_cert:
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/cps/web.py 2020-02-23 09:08:01.000000000 +0100
|
|
||||||
+++ b/cps/web.py 2020-04-12 12:52:23.940774100 +0200
|
|
||||||
@@ -53,7 +53,7 @@
|
|
||||||
from .redirect import redirect_back
|
|
||||||
|
|
||||||
feature_support = {
|
|
||||||
- 'ldap': False, # bool(services.ldap),
|
|
||||||
+ 'ldap': bool(services.ldap),
|
|
||||||
'goodreads': bool(services.goodreads_support)
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue