GithubHelp home page GithubHelp logo

yunohost-apps / shaarli_ynh Goto Github PK

View Code? Open in Web Editor NEW
20.0 9.0 13.0 901 KB

Shaarli package for YunoHost

License: GNU General Public License v3.0

PHP 13.28% Shell 86.72%
shaarli privacy yunohost-apps

shaarli_ynh's Introduction

Shaarli for YunoHost

Integration level Working status Maintenance status

Install Shaarli with YunoHost

Read this README is other languages.

This package allows you to install Shaarli quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult the guide to learn how to install it.

Overview

Shaarli is a minimalist bookmark manager and link sharing service that you can install on your own server. It is designed to be personal (single-user), fast and handy.

Features

  • share, comment and save interesting links
  • bookmark useful/frequent links and share them between computers
  • a minimal blog/microblog/writing platform
  • a read-it-later/todo list
  • a notepad to draft and save articles/posts/ideas
  • a knowledge base to keep notes, documentation and code snippets
  • a shared clipboard/notepad/pastebin between computers
  • playlist manager for online media
  • feed other blogs, aggregators, social networks...

Shipped version: 0.13.0~ynh1

Demo: https://demo.shaarli.org/

Screenshots

Screenshot of Shaarli

Documentation and resources

Developer info

Please send your pull request to the testing branch.

To try the testing branch, please proceed like that:

sudo yunohost app install https://github.com/YunoHost-Apps/shaarli_ynh/tree/testing --debug
or
sudo yunohost app upgrade shaarli -u https://github.com/YunoHost-Apps/shaarli_ynh/tree/testing --debug

More info regarding app packaging: https://yunohost.org/packaging_apps

shaarli_ynh's People

Contributors

ackak avatar alexaubin avatar anmol26s avatar ericgaspar avatar julienmalik avatar kloadut avatar lapineige avatar mkody avatar rafi594 avatar rokaz avatar salamandar avatar tagadda avatar yalh76 avatar yunohost-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shaarli_ynh's Issues

Commit is not up to date in the community.json

Hellow,

I found that the commit on community.json is outdated, hence people installing the app via this list won't benefit from the last upgrades / improvements ...

Please create a PR to update it on the list (I do not maintain this app so it's not relevant for me to do it and it might be refused...)

ProTip™ : possibly you can now set the commit to 'HEAD', to use the latest commit of master automatically in the future. If you do this, it is strongly recommended to use a 'testing' branch for changes that are not deemed stable yet.

Failed installation from webadmin

Install failed

tried to install from web-admin interface failed

Context

  • Hardware: Pi_thing (v4)
  • YunoHost version: current (latest stable)
  • I have access to my server: Through SSH | through the webadmin...
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: no
  • Using, or trying to install package version/branch: provided by web interface app manager

Steps to reproduce

go to apps section on webadmin; search shaali; click on green Install button; set admin user for Shaarli and its password; choose a label; let default installation route

Expected behavior

have a Shaarli instance for personal use, but I got this

2021-05-12 10:23:16,623: WARNING - PHP Parse error: syntax error, unexpected end of file in Command line code on line 1

Logs

Full log: https://paste.yunohost.org/raw/oxufatinec

Relevant to the issue:

2021-05-12 10:23:16,461: INFO - [##########++........] > Configuring Shaarli...
2021-05-12 10:23:16,462: DEBUG - + echo '[##########++........] > Configuring Shaarli...'
2021-05-12 10:23:16,463: DEBUG - ++ cat /etc/timezone
2021-05-12 10:23:16,468: DEBUG - + timezone=Europe/London
2021-05-12 10:23:16,470: DEBUG - ++ php7.3 -r 'echo sha1(uniqid("", true) ."_". mt_rand());'
2021-05-12 10:23:16,549: DEBUG - + salt=a092761f47ce6b20e0807c44b630cbff2b69f489
2021-05-12 10:23:16,552: DEBUG - ++ php7.3 -r 'echo sha1('\'**********\''.'\''xmgz'\''.'\''a092761f47ce6b20e0807c44b630cbff2b69f489'\'');'
2021-05-12 10:23:16,623: WARNING - PHP Parse error:  syntax error, unexpected end of file in Command line code on line 1
2021-05-12 10:23:16,631: DEBUG - + hash=
2021-05-12 10:23:16,632: DEBUG - + ynh_exit_properly
2021-05-12 10:23:16,632: DEBUG - + local exit_code=254
2021-05-12 10:23:16,633: DEBUG - + rm -rf /var/cache/yunohost/download/
2021-05-12 10:23:16,637: DEBUG - + '[' 254 -eq 0 ']'
2021-05-12 10:23:16,638: DEBUG - + trap '' EXIT
2021-05-12 10:23:16,638: DEBUG - + set +o errexit
2021-05-12 10:23:16,638: DEBUG - + set +o nounset
2021-05-12 10:23:16,639: DEBUG - + sleep 0.5
2021-05-12 10:23:17,140: DEBUG - + type -t ynh_clean_setup
2021-05-12 10:23:17,141: DEBUG - + ynh_clean_setup
2021-05-12 10:23:17,141: DEBUG - + true
2021-05-12 10:23:17,142: DEBUG - + exit 1
2021-05-12 10:23:17,144: ERROR - Unable to install shaarli: An error occurred inside the app installation script

thank you

App is inaccessible on the root path

Hi
The app gets install on root path, but gives 404 Forbidden message.

The error is created by the fact that nginx.conf should have alias path ending with the slash / .
So it should be alias /var/www/shaarli/; rather then this alias /var/www/shaarli;.

Thanks

Insufficient permissions:

i tried to install shaarli in new server yunohost... but:
Insufficient permissions:
"data/log.txt" file is not writable

is it a bug ?

Handle upgrade from old app

Is this possible in any simple way ?

  • Figure out how to import links from previous app

Right now a simple export + import should work. Maybe we can automate that, but manually it should works.

Upgrade fails with the material theme

Describe the bug

Upgrade to 0.12.x fails and restoration too.

Context

I am using a theme for Shaarli (material theme).

Steps to reproduce

  • Have a theme downloaded (material for me) in /var/www/shaarli/tpl/
  • Have the theme set in /var/www/shaarli/data/config.json.php to material
  • Upgrade the app to 0.12.x

Expected behavior

The upgrade works as intended.

Logs

The logs below were a nice hint:

2020-12-01 11:38:47,607: WARNING - chmod: cannot access '/var/www/shaarli/tpl/material/dist/fonts/roboto/Apache': No such file or directory
2020-12-01 11:38:47,608: WARNING - chmod: cannot access 'License.txt': No such file or directory

https://paste.yunohost.org/raw/gisicapeki

Templates are not updated on upgrade (was: Title and descriptions fields do not autofill anymore)

Describe the bug

When adding a link (ex: https://github.com/shaarli/Shaarli), the title and description fields are not auto-filled.

Context

  • This worked with the previous version of the package (0.10.4).
  • I host it on a subdomain (b.domain.tld)
  • Hardware: Kimsufi 2G
  • YunoHost version: 4.0.8.3
  • I have access to my server: Through SSH | through the webadmin
  • Using package version/branch: the latest available through the Yunohost update interface
  • If upgrading, current package version: 0.12.1~ynh1
  • Theme: default

Steps to reproduce

Expected behavior

  • Field "Title" should be filled with "GitHub - shaarli/Shaarli: The personal, minimalist, super-fast, database free, bookmarking service - community repo"
  • Description should be filled with "The personal, minimalist, super-fast, database free, bookmarking service - community repo - shaarli/Shaarli"

You can try on https://demo.shaarli.org/admin/shaare?post=https%3A%2F%2Fgithub.com%2Fshaarli%2FShaarli with login demo and password demo.

Logs

I could not find any meaningful log.

Manage automatic update of Shaarli's sources

Manages automatic update of minor changes, like bugfix releases, security fix, ...
Should it be done in another branch ? Or kept in master, with have a branch for stable releases ?

install failed

Hi,
I have an installation error.
I have removed in the install script | python ../conf/user_list.py because "../conf/user_list.py" doesn't exist.
And after that, the installation work find.

Integrate the LDAP/SSOWAT authentication

I know the README states this as a TODO, but here is an issue to track progress and get notified if this situation changes ;-).

Thanks for the existing packaging.

Logrotate config is missing specific_user

The log file (/var/www/shaarli/data/log.txt) is not owned by root, so logrotate fails:

logrotate[1744762]: error: skipping "/var/www/shaarli/data/log.txt" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.

Adding this line to the logrotate file fixes the issue:

    su shaarli shaarli

so the install and upgrade scripts should have :

ynh_use_logrotate --specific_user=shaarli

Invalid app manifest: Expecting ,

Hello :-)

I've just installed Yunohost on a freshly spawned server and I've encountered the following error when installing Shaarli through this repository:

admin@server:~$ sudo yunohost app install https://github.com/YunoHost-Apps/shaarli_ynh
WARNING! Installing 3rd party applications may compromise the integrity and security of your system. You should probably NOT install it unless you know what you are doing. Are you willing to take that risk? [Y/N] : y
Error: Invalid app manifest: Expecting , delimiter: line 55 column 9 (char 1523)

I suppose the problem lies within the help key in the manifest.json file, with a missing ,.

Thanks :-)

Tighten files permissions

See #54 (comment)

Currently files permissions are really wide, and I don't see the reason why. We should change the permissions to allow only shaarli ($app user) to read its files.

Update to 0.12.1: templates were outdated - resulting in "You have been banned after too many failed login attempts" error

Hello,

A few days ago, I updated my Yunohost Shaarli through Yunohost.
Since then, I couldn't connect to my Shaarli instance and got this error

image

In the Nginx logs, I could see this error:

Undefined variable: user_can_login in /var/www/shaarli/tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php on line 10" while reading response header from upstream

I realised the issue was that the variable user_can_login was nowhere to be seen except in the templates.
My templates were dating from 2019.
So I downloaded the latest Shaarli version and copied its tpl folder to my /var/www/shaarli/tpl

I suppose the issue comes from this line in the upgrade procedure:

cp -a "$tmpdir/tpl" "$final_path/"

I guess one should only copy back folder that are not vintage and default, which are shipped with shaarli itself.

Unable to share with Shaarlier for Android + [resolved] Shaarli UI is broken, CSS/JS not loading (Nginx issue ?)

Describe the bug

I can't share an article/link through the Shaarlier app for Android. No error is returned but after about 10 tries I am banned by fail2ban. I use the secret code of the API to configure the sharing with Shaarlier. Sharing an article is normally done by logging in on the Shaarli web page without using the Shaarlier application.

Context

  • Hardware : Raspberry Pi at home
  • YunoHost version : 4.3.4.1
  • I have access to my server: Through SSH & through the webadmin & direct access via keyboard / screen
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: yes
    • If yes, please explain : exotic ssh port
  • Using, or trying to install package version/branch : master branch

Steps to reproduce

  • Shaarli's installation via webadmin with the public option is true
  • Shaarlier's installation on Android 10 phone
  • Get the secret API's code in Shaarli
  • Setting up Shaarlier on the phone
    1. URL eg : https://server.tld/shaarli/
    2. Enter the API's code retrieve
    3. Apply and testing connexion
    4. If it's OK share an article/link
    5. Link shared with no error message
    6. Problem nothing is shared
    7. After 10 more attempts you're ban

Expected behavior

Provided that the Shaarlier application is set up correctly, it should normally be possible to share an article/link and not be banned by fail2ban.

Unable to upgrade and unable to access now

2018-11-19 13:00:50,931: WARNING - Source path '/var/www/shaarli' does not exist
2018-11-19 13:00:50,941: WARNING - !!
2018-11-19 13:00:50,943: WARNING -   shaarli's script has encountered an error. Its execution was cancelled.
2018-11-19 13:00:50,944: WARNING - !!
2018-11-19 13:00:50,945: WARNING - 
2018-11-19 13:00:51,047: WARNING - Unable to back up the app 'shaarli'
2018-11-19 13:00:51,049: WARNING - There is nothing to save
2018-11-19 13:00:51,266: WARNING - Backup failed, the upgrade process was aborted.
2018-11-19 13:00:51,420: ERROR - Unable to upgrade shaarli

The shaarli app still appears in the list, but when I click it, the browser reloads the applications list.

"/var/www/shaarli/data/log.txt" is actualy a directoy for unknow reason :|

Hello,

I'm helping someone debug a broken yunohost apps upgrade and for a totally weird and unknown reason the "file" "/var/www/shaarli/data/log.txt" turned out the actually be a ... directory :|

The problem is that this breaks fail2ban which wants to parse this file and complains because it is a directory :x

Also "/var/www/shaarli/data/log.txt" is owned by root for some reason? The other files are own by "shaarli".

After a quick look in the code I really have no idea on how it has append but here is the full upgrade logs https://paste.yunohost.org/raw/dapixodeni

Add Fail2Ban support

This app isn't secured against bruteforce with fail2ban.
We need to implement this for public shaarli instances.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.