Re: [gentoo-dev] Protecting config files of webapps

2014-04-04 Thread Thomas Kahle
On 04/04/14 15:34, Matthew Summers wrote:
> On Wed, Apr 2, 2014 at 3:18 PM, Thomas Kahle  wrote:
>> Hi,
>>
>> www-apps/tt-rss is configured through a file config.php sitting
>> in its install directory.  At the moment the file is overwritten
>> when upgrading with webapp-config.  Who is responsible for
>> config-protecting this file?
>>
>> a) the ebuild should install an env file (www-apps/otrs does this)
>> b) the user can be informed with einfo but needs to do it herself
>> c) This is a bug in webapp-config
>>
>> c) seems strange to me, but a user has reported this in bug
>> 496788 and it was closed as a duplicate implying c).
>>
> 
> It depends. webapp-config is designed to keep a pristine copy in
> /usr/share/webapps/$PN/$PV/ so when you write "its install directory"
> I'm not sure which one you mean. Is it that one in /usr/share OR is it
> the directory, likely withinin /var/www/, that the cli invocation of
> webapp-config placed it's files? 

I did not know about the pristine copy in /usr/share, that's
quite useful indeed.  My analysis of the situation at the moment:

The ebuild tries to use the config protect functionality of
webapp-config as per eclass manpage.  It has:

webapp_configfile ${MY_HTDOCSDIR}/config.php

This failed somehow.  When upgrading my site install,
/var/www/../config.php was overwritten by the pristine version.
I don't know if this bug is different from
https://bugs.gentoo.org/show_bug.cgi?id=493520
At least the patch in that bug seems to only work around the
problem, introducing a user configurable config protect variable.

> If the latter, then it's a bug.  webapp-config is supposed to
> keep track of modified files across multiple installations of
> the same webapp, even differing versions of the same webapp. If
> it's not doing that, its a bug in webapp-config.

Yes.

Cheers,
Thomas


-- 
Thomas Kahle
http://dev.gentoo.org/~tomka/





signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] Protecting config files of webapps

2014-04-04 Thread Matthew Summers
On Wed, Apr 2, 2014 at 3:18 PM, Thomas Kahle  wrote:
> Hi,
>
> www-apps/tt-rss is configured through a file config.php sitting
> in its install directory.  At the moment the file is overwritten
> when upgrading with webapp-config.  Who is responsible for
> config-protecting this file?
>
> a) the ebuild should install an env file (www-apps/otrs does this)
> b) the user can be informed with einfo but needs to do it herself
> c) This is a bug in webapp-config
>
> c) seems strange to me, but a user has reported this in bug
> 496788 and it was closed as a duplicate implying c).
>
> Cheers,
> Thomas
>
>
> --
> Thomas Kahle
> http://dev.gentoo.org/~tomka/
>

It depends. webapp-config is designed to keep a pristine copy in
/usr/share/webapps/$PN/$PV/ so when you write "its install directory"
I'm not sure which one you mean. Is it that one in /usr/share OR is it
the directory, likely withinin /var/www/, that the cli invocation of
webapp-config placed it's files? If the latter, then it's a bug.
webapp-config is supposed to keep track of modified files across
multiple installations of the same webapp, even differing versions of
the same webapp. If it's not doing that, its a bug in webapp-config.

I'm adding blueness@g.o to CC since he is working on this package some.

Thanks,
Matt


Matthew Summers
Gentoo Foundation Inc.
GPG: 111B C438 35FA EDB5 B5D3 736F 45EE 5DC0 0878 9D46



[gentoo-dev] Protecting config files of webapps

2014-04-02 Thread Thomas Kahle
Hi,

www-apps/tt-rss is configured through a file config.php sitting
in its install directory.  At the moment the file is overwritten
when upgrading with webapp-config.  Who is responsible for
config-protecting this file?

a) the ebuild should install an env file (www-apps/otrs does this)
b) the user can be informed with einfo but needs to do it herself
c) This is a bug in webapp-config

c) seems strange to me, but a user has reported this in bug
496788 and it was closed as a duplicate implying c).

Cheers,
Thomas


-- 
Thomas Kahle
http://dev.gentoo.org/~tomka/



signature.asc
Description: OpenPGP digital signature