From a108a54bd99f1a1f28cacc6601c2ce3c3674fd15 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 20 May 2022 00:01:04 +0200 Subject: [PATCH 1/4] 0.25-0 --- conf/app.src | 4 ++-- conf/nginx.conf | 4 ---- conf/systemd.service | 2 +- manifest.json | 9 +++------ 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/conf/app.src b/conf/app.src index 36cf4e6..c943df8 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lstu/-/archive/0.23-0/lstu-0.23-0.tar.gz -SOURCE_SUM=77bbe521403da22db2753fbeb4939a2decb220e0a21e88b4754a774a9a217c6d +SOURCE_URL=https://framagit.org/fiat-tux/hat-softwares/lstu/-/archive/0.25-0/lstu-0.25-0.tar.gz +SOURCE_SUM=eae4bc13ef761996a13c8133647dce14e040a67173b099b630ef35dba3b19209 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/nginx.conf b/conf/nginx.conf index a72f47f..85b19c1 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,10 +1,6 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - access_log /var/log/nginx/lstu.access.log; error_log /var/log/nginx/lstu.error.log; diff --git a/conf/systemd.service b/conf/systemd.service index 205089d..3930360 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Shortened URLs service +Description=Lstu: Shortened URLs service Documentation=https://framagit.org/luc/lstu Requires=network.target After=network.target diff --git a/manifest.json b/manifest.json index de2fc2a..1029244 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "URL Shortener", "fr": "Raccourcisseur d'URL" }, - "version": "0.23-0~ynh1", + "version": "0.25-0~ynh1", "url": "https://lstu.fr", "upstream": { "license": "WTFPL", @@ -21,7 +21,7 @@ "email": "abld@abld.info" }, "requirements": { - "yunohost": ">= 4.2.4" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ @@ -51,10 +51,7 @@ "en": "Choose a theme", "fr": "Choisissez un theme" }, - "choices": [ - "default", - "milligram" - ], + "choices": ["default", "milligram"], "default": "milligram" }, { From 84f9a27a044acc651814466f79806f486aae7ab6 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 19 May 2022 22:01:13 +0000 Subject: [PATCH 2/4] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 907bebb..7ab0847 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 URL Shortener -**Shipped version:** 0.23-0~ynh1 +**Shipped version:** 0.25-0~ynh1 **Demo:** https://lstu.fr diff --git a/README_fr.md b/README_fr.md index 59725e8..f7bfd91 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 Raccourcisseur d'URL -**Version incluse :** 0.23-0~ynh1 +**Version incluse :** 0.25-0~ynh1 **Démo :** https://lstu.fr From 3fc7417c0487f4597ea2a2265be8bd266daaeeaa Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 20 May 2022 00:05:05 +0200 Subject: [PATCH 3/4] Update lstu.conf.template --- conf/lstu.conf.template | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/conf/lstu.conf.template b/conf/lstu.conf.template index 1020da4..0ba8420 100644 --- a/conf/lstu.conf.template +++ b/conf/lstu.conf.template @@ -31,6 +31,11 @@ # optional, but you won't have access to admin /stats if not set and if adminpwd is not set either hashed_adminpwd => '__HASHED_PASSWORD__', + # indicates if you want to really delete URLs from admin page (/stats) + # or just want to deactivate the shorten URL (won’t redirect anymore, can’t be used anymore) + # optional, default to 0 (false) + #really_delete_urls => 0, + # choose a theme. See the available themes in `themes` directory # optional, default is 'default' theme => '__THEME__', # default or milligram @@ -66,6 +71,10 @@ # optional #fixed_domain => 'example.org', + # if set to 1, Lstu will try to prevent its use without using the web interface + # optional, default is 0 + #disable_api => 0, + # choose what database you want to use # valid choices are sqlite, postgresql and mysql (all lowercase) # optional, default is sqlite @@ -179,12 +188,12 @@ # please note that everybody can still use shortend URLs # optional, no default #ldap => { - # uri => 'ldap://localhost:389', # server URI + # uri => 'ldap://localhost:389', # server URI # user_tree => 'dc=yunohost,dc=org', # search base DN # bind_dn => 'ou=users,dc=yunohost,dc=org', # search bind DN # bind_pwd => '', # search bind password # user_attr => 'uid', # user attribute (uid, mail, sAMAccountName, etc.) - # user_filter => '(!(uid=ldap_user))', # user filter (to exclude some users, etc.) + # user_filter => '(!(uid=ldap_user))', # user filter (to exclude some users, etc.) #}, # set `htpasswd` if you want to use an htpasswd file instead of ldap From 2c6ad720d32812b7803fc3540877c2aa7d9bfd74 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 21 May 2022 00:02:24 +0200 Subject: [PATCH 4/4] Silence warnings --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index cc17ea1..57272de 100644 --- a/scripts/install +++ b/scripts/install @@ -72,7 +72,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port #================================================= ynh_script_progression --message="Installing dependencies..." -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies #================================================= # CREATE A POSTGRESQL DATABASE diff --git a/scripts/restore b/scripts/restore index 1e73da7..3b63ff4 100644 --- a/scripts/restore +++ b/scripts/restore @@ -78,7 +78,7 @@ chown -R $app:www-data "$final_path" ynh_script_progression --message="Reinstalling dependencies..." # Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies #================================================= # RESTORE THE POSTGRESQL DATABASE diff --git a/scripts/upgrade b/scripts/upgrade index 7cd33f4..03cc820 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -156,7 +156,7 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Upgrading dependencies..." -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies #================================================= # CONFIGURE LSTU