guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WIP gnu social package


From: nee
Subject: Re: WIP gnu social package
Date: Fri, 12 Jan 2018 16:54:23 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

Hello, I fixed a bunch of problems I had and now I've been adding
database migrations when the package version changes.
This is very insufficiently tested right now.
I only tested this with one pre-existing installation so far, but it
seems to work fine there. I want write system tests to cover each case.
After this is done a qvitter package could be added (I never installed
it before) and maybe the plugins code could be altered to load plugins
from guix packages.

I'm appending the patches from my package path, since my website only
ever displays the latest version.

Am 25.09.2017 um 23:14 schrieb nee:
> - Setting up the database requires the sql root password, the new
>   social_db_user password, and a password for the first admin user to
>   create in gnu social.
>   Having plaintext passwords in /etc/config.scm sounds pretty bad.
>   I'm not sure what the solution here is.
>   - Could we add a password store to guix? It could automatically
>     generate passwords and pass them to services.
>   - Should I generate a script that must be run manually and asks for
>     password input through stdin?
>   - Something else?
> 
I'm experimenting with the password generator approach right now.
Current downsides:
- there is a plaintext file with all the service passwords in /root/
Positives:
- It requires no user input for a new installation.
- It's simple to move with a backup.

Gnu social needs the password for it's mysql-user to generate the config
file, so at least this one has to be saved somewhere or entered every
time you reconfigure.

I also wrote a new macro 'with-passwords. I'm not very experienced with
writing macros so it would be nice to get some feedback on it.

> - The password of the database-user ends up in the config.php which is
>   generated by mixed-text-file. This file can be read by everyone. Can I
>   somehow set the owner on it and remove the reading rights from other
>   users?
> 
I moved the config.php file to /var for now, so I can use basic guile
file writing operations. I have to read up on etc-service-types some day.
Can these files be created to be not publicly readable by everyone?

> Here are some other open problems with the packages:
> 
> - I build php with --enable-intl now, causes a new broken tests to
>   appear.
>   I on a quick look I couldn't figure out what was wrong, and I'm not
>   familiar with php, so I disabled the failing tests.
>   Setting the language in gnu social does not seem to work. Nothing
>   happens, but the installation phase does no longer complain about the
>   missing php module.
> 
Not sure if I tested this wrong, or this was fixed by the php version
upgrade that happened meanwhile, but now setting the language works.
Before I log in GNU Social presents itself in the language of my browser.
After logging in the language from the config.php is used.

> - A bunch of plugins that are shipped with gs seem to rely on writeable
>   cache directories in their working directory.
>   Those can not be changed through the config file.
>   It will take me some time to find and patch them all.
> 
I added a setting to change the cache directory for extlib/HTMLPurifier/
upstream patch: https://git.gnu.io/gnu/gnu-social/merge_requests/156 (it
got merged)

I don't know of any other functions trying to write in the current
directory right now.

> - The admin area must be patched out and all configuration options must
>   be represented by the service.
> 
I patched out the link to the Admin menu in the package.

> - The following plugins throw warnings: Poll, OpenId, Favorite,
>   Bookmark, DirectMessage those warnings might be related to the
>   php/mariadb versions used with gnu social
> 
> - common warnings that appear:
>  Warning: Declaration of InviteAction::handle($args) should be
> compatible with Action::handle() in
> /gnu/store/qfzqxlfkrzri73jrphlqccsd35s0kcy3-gnu-social-1.2.0-beta4/actions/invite.php
> on line 298
> 
>   Warning: Cannot modify header information - headers already sent by
> (output started at
> /gnu/store/qfzqxlfkrzri73jrphlqccsd35s0kcy3-gnu-social-1.2.0-beta4/actions/invite.php:298)
> in
> /gnu/store/qfzqxlfkrzri73jrphlqccsd35s0kcy3-gnu-social-1.2.0-beta4/lib/action.php
> on line 1277
> 
> The /settings/poll url completely breaks.
> 
These warnings seems to be a general GNU Social problem unrelated to
guix. When php-fpm is set to not send warnings to the browser it looks
like any other installation.

Attachment: php.scm
Description: Text Data

Attachment: gnu-social.scm
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]