diff --git a/README.md b/README.md index 525b910..88a4d03 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Browsing, reading and downloading eBooks using a Calibre database -**Shipped version:** 0.6.16 +**Shipped version:** 0.6.17 diff --git a/README_fr.md b/README_fr.md index 6e7784f..a83a2b8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Explorer, lire et télécharger des eBooks à partir d'une base de données Calibre -**Version incluse :** 0.6.16 +**Version incluse :** 0.6.17 diff --git a/conf/app.src b/conf/app.src index c1d3c84..180c76c 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,3 +1,3 @@ -SOURCE_URL=https://github.com/janeczku/calibre-web/releases/download/0.6.16/calibre-web-0.6.16.zip -SOURCE_SUM=7f9f1217b0010625765796c2122bd941b23f9d1a99f83eb6c9c4c9fa3cb2dcbc +SOURCE_URL=https://github.com/janeczku/calibre-web/releases/download/0.6.17/calibre-web-0.6.17.zip +SOURCE_SUM=3560aa9f793eead98d8df053963a569fbe08ace93418b6e8e70a2831a9314733 SOURCE_FORMAT=zip diff --git a/manifest.json b/manifest.json index 0179e67..603d9db 100644 --- a/manifest.json +++ b/manifest.json @@ -6,10 +6,10 @@ "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" }, - "version": "0.96.16~ynh2", + "version": "0.96.17~ynh1", "url": "https://github.com/janeczku/calibre-web", "upstream": { - "version": "0.6.16", + "version": "0.6.17", "license": "GPL-3.0-only", "admindoc": "https://github.com/janeczku/calibre-web/wiki", "code": "https://github.com/janeczku/calibre-web" diff --git a/scripts/_common.sh b/scripts/_common.sh index a80c917..a693094 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,6 +1,6 @@ #!/bin/bash -PKG_DEPENDENCIES="sqlite3 libldap2-dev libsasl2-dev python3-dev imagemagick python3-lxml libjpeg-dev zlib1g-dev" +PKG_DEPENDENCIES="sqlite3 libldap2-dev libsasl2-dev python3-dev imagemagick python3-lxml libjpeg-dev zlib1g-dev libffi-dev" #PKG_DEPENDENCIES="sqlite3 python3-pip imagemagick" DOSSIER_MEDIA=/home/yunohost.multimedia diff --git a/scripts/install b/scripts/install index d018813..7942c7e 100755 --- a/scripts/install +++ b/scripts/install @@ -96,17 +96,17 @@ ynh_setup_source "$final_path" # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing package dependencies..." --weight=30 +ynh_script_progression --message="Installing package dependencies..." --weight=80 ynh_install_app_dependencies $PKG_DEPENDENCIES #use latest version of pip as per documentation in https://github.com/pypa/get-pip #cannot use helper as maintaining the checksum would be a pain in the a*** -curl https://bootstrap.pypa.io/get-pip.py | python3 +ynh_exec_quiet curl https://bootstrap.pypa.io/get-pip.py | python3 -ynh_script_progression --message="Installing pip requirements..." --weight=50 +ynh_script_progression --message="Installing pip requirements..." --weight=40 pip3 install --no-cache-dir --target $final_path/vendor -r $final_path/requirements.txt -ynh_script_progression --message="Installing pip additionnal requirements..." --weight=60 +ynh_script_progression --message="Installing pip additionnal requirements..." --weight=40 pip3 install --no-cache-dir --upgrade --target $final_path/vendor -r $final_path/optional-requirements.txt #================================================= diff --git a/scripts/remove b/scripts/remove index 20e5597..9ee29a5 100755 --- a/scripts/remove +++ b/scripts/remove @@ -68,7 +68,7 @@ ynh_secure_remove --file="$final_path" # Remove the data directory if --purge option is used if [ "${YNH_APP_PURGE:-0}" -eq 1 ] then - ynh_script_progression --message="Removing app data directory..." --time --weight=1 + ynh_script_progression --message="Removing app data directory..." --weight=1 ynh_secure_remove --file="$calibre_dir" fi @@ -122,4 +122,8 @@ ynh_system_user_delete --username=$app # MESSAGE TO USER #================================================= ynh_script_progression --message="Removal of $app completed" --last -ynh_print_info "The library folder $calibre_dir was not deleted. Delete it manually if required" +# Remove the data directory if --purge option is used +if [ "${YNH_APP_PURGE:-0}" -eq 0 ] +then + ynh_print_info "The library folder $calibre_dir was not deleted. Delete it manually if required" +fi diff --git a/scripts/upgrade b/scripts/upgrade index ef7aa85..9a42761 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -170,7 +170,7 @@ then #use latest version of pip as per documentation in https://github.com/pypa/get-pip #cannot use helper as maintaining the checksum would be a pain in the a*** - curl https://bootstrap.pypa.io/get-pip.py | python3 + ynh_exec_quiet curl https://bootstrap.pypa.io/get-pip.py | python3 ynh_script_progression --message="Installing pip requirements ..." --weight=30 pip3 install --no-cache-dir --upgrade --target $final_path/vendor -r $final_path/requirements.txt diff --git a/sources/patches/app-admin.html.patch b/sources/patches/app-admin.html.patch index 5dedd55..7b30e00 100644 --- a/sources/patches/app-admin.html.patch +++ b/sources/patches/app-admin.html.patch @@ -1,5 +1,5 @@ ---- a/cps/templates/admin.html 2022-01-24 19:18:40.000000000 +0100 -+++ b/cps/templates/admin.html 2022-01-26 23:47:53.669309039 +0100 +--- a/cps/templates/admin.html 2022-03-06 16:10:41.000000000 +0100 ++++ b/cps/templates/admin.html 2022-03-08 20:59:38.344889625 +0100 @@ -189,11 +189,6 @@ diff --git a/sources/patches/app-config_sql.py.patch.src b/sources/patches/app-config_sql.py.patch.src index 7574855..0594aed 100644 --- a/sources/patches/app-config_sql.py.patch.src +++ b/sources/patches/app-config_sql.py.patch.src @@ -1,15 +1,15 @@ ---- a/cps/config_sql.py 2021-06-06 11:06:52.499532119 +0200 -+++ b/cps/config_sql.py 2021-06-06 12:18:29.420244329 +0200 -@@ -63,7 +63,7 @@ +--- a/cps/config_sql.py 2022-03-06 16:10:41.000000000 +0100 ++++ b/cps/config_sql.py 2022-03-08 21:04:33.966228954 +0100 +@@ -61,7 +61,7 @@ mail_server_type = Column(SmallInteger, default=0) mail_gmail_token = Column(JSON, default={}) - config_calibre_dir = Column(String) + config_calibre_dir = Column(String, default='__CALIBRE_DIR__') + config_calibre_uuid = Column(String) config_port = Column(Integer, default=constants.DEFAULT_PORT) config_external_port = Column(Integer, default=constants.DEFAULT_PORT) - config_certfile = Column(String) -@@ -79,11 +79,11 @@ +@@ -78,11 +78,11 @@ config_theme = Column(Integer, default=0) config_log_level = Column(SmallInteger, default=logger.DEFAULT_LOG_LEVEL) @@ -25,7 +25,7 @@ config_anonbrowse = Column(SmallInteger, default=0) config_public_reg = Column(SmallInteger, default=0) config_remote_login = Column(Boolean, default=False) -@@ -107,11 +107,11 @@ +@@ -108,11 +108,11 @@ config_goodreads_api_key = Column(String) config_goodreads_api_secret = Column(String) config_register_email = Column(Boolean, default=False) @@ -39,7 +39,7 @@ config_ldap_port = Column(SmallInteger, default=389) config_ldap_authentication = Column(SmallInteger, default=constants.LDAP_AUTH_SIMPLE) config_ldap_serv_username = Column(String, default='cn=admin,dc=example,dc=org') -@@ -120,11 +120,11 @@ +@@ -121,11 +121,11 @@ config_ldap_cacert_path = Column(String, default="") config_ldap_cert_path = Column(String, default="") config_ldap_key_path = Column(String, default="") diff --git a/sources/patches/app-constants.py.patch.src b/sources/patches/app-constants.py.patch.src index 852e911..f91682c 100644 --- a/sources/patches/app-constants.py.patch.src +++ b/sources/patches/app-constants.py.patch.src @@ -1,15 +1,15 @@ ---- a/cps/constants.py 2021-05-22 14:08:46.000000000 +0200 -+++ b/cps/constants.py 2021-06-06 11:02:36.060353942 +0200 -@@ -25,7 +25,7 @@ +--- a/cps/constants.py 2022-03-06 16:10:41.000000000 +0100 ++++ b/cps/constants.py 2022-03-08 21:06:19.917000241 +0100 +@@ -27,7 +27,7 @@ HOME_CONFIG = os.path.isfile(os.path.join(os.path.dirname(os.path.abspath(__file__)), '.HOMEDIR')) - #In executables updater is not available, so variable is set to False there + # In executables updater is not available, so variable is set to False there -UPDATER_AVAILABLE = True +UPDATER_AVAILABLE = False # Base dir is parent of current file, necessary if called from different folder - if sys.version_info < (3, 0): -@@ -127,12 +127,12 @@ + BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir)) +@@ -124,12 +124,12 @@ DEFAULT_MAIL_SERVER = "mail.example.org" DEFAULT_PASSWORD = "admin123" # nosec diff --git a/sources/patches/app-optional-requirements.txt.patch b/sources/patches/app-optional-requirements.txt.patch index 0df4493..90f74bf 100644 --- a/sources/patches/app-optional-requirements.txt.patch +++ b/sources/patches/app-optional-requirements.txt.patch @@ -1,6 +1,6 @@ ---- a/optional-requirements.txt 2022-01-24 19:18:40.000000000 +0100 -+++ b/optional-requirements.txt 2022-01-26 23:46:47.077607055 +0100 -@@ -1,20 +1,5 @@ +--- a/optional-requirements.txt 2022-03-06 16:10:41.000000000 +0100 ++++ b/optional-requirements.txt 2022-03-08 21:08:06.964027001 +0100 +@@ -1,19 +1,5 @@ # GDrive Integration -google-api-python-client>=1.7.11,<2.37.0 gevent>20.6.0,<22.0.0 @@ -13,7 +13,6 @@ -PyDrive2>=1.3.1,<1.11.0 -PyYAML>=3.12 -rsa>=3.4.2,<4.9.0 --six>=1.10.0,<1.17.0 - -# Gmail -google-auth-oauthlib>=0.4.3,<0.5.0 @@ -21,7 +20,7 @@ # goodreads goodreads>=0.3.2,<0.4.0 -@@ -24,10 +9,6 @@ +@@ -23,10 +9,6 @@ python-ldap>=3.0.0,<3.5.0 Flask-SimpleLDAP>=1.4.0,<1.5.0 @@ -30,5 +29,5 @@ -SQLAlchemy-Utils>=0.33.5,<0.39.0 - # metadata extraction - rarfile>=2.7 + rarfile>=3.2 scholarly>=1.2.0,<1.6 diff --git a/sources/patches/app-ub.py.patch.src b/sources/patches/app-ub.py.patch.src index 680611c..c7601bf 100644 --- a/sources/patches/app-ub.py.patch.src +++ b/sources/patches/app-ub.py.patch.src @@ -1,6 +1,6 @@ ---- a/cps/ub.py 2021-06-06 10:55:46.704487817 +0200 -+++ b/cps/ub.py 2021-06-06 12:32:23.867151407 +0200 -@@ -179,7 +179,7 @@ +--- a/cps/ub.py 2022-03-06 16:10:41.000000000 +0100 ++++ b/cps/ub.py 2022-03-08 21:09:41.238818846 +0100 +@@ -231,7 +231,7 @@ kindle_mail = Column(String(120), default="") shelf = relationship('Shelf', backref='user', lazy='dynamic', order_by='Shelf.name') downloads = relationship('Downloads', backref='user', lazy='dynamic') @@ -9,9 +9,9 @@ sidebar_view = Column(Integer, default=1) default_language = Column(String(3), default="all") denied_tags = Column(String, default="") -@@ -678,7 +678,7 @@ +@@ -768,7 +768,7 @@ # Generate User admin with admin123 password, and access to everything - def create_admin_user(session): + def create_admin_user(_session): user = User() - user.name = "admin" + user.name = "__ADMIN__"