Gentoo Archives: gentoo-dev

From: Thomas Kahle <tomka@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Protecting config files of webapps
Date: Fri, 04 Apr 2014 18:16:05
Message-Id: 533EF6D5.4080107@gentoo.org
In Reply to: Re: [gentoo-dev] Protecting config files of webapps by Matthew Summers
1 On 04/04/14 15:34, Matthew Summers wrote:
2 > On Wed, Apr 2, 2014 at 3:18 PM, Thomas Kahle <tomka@g.o> wrote:
3 >> Hi,
4 >>
5 >> www-apps/tt-rss is configured through a file config.php sitting
6 >> in its install directory. At the moment the file is overwritten
7 >> when upgrading with webapp-config. Who is responsible for
8 >> config-protecting this file?
9 >>
10 >> a) the ebuild should install an env file (www-apps/otrs does this)
11 >> b) the user can be informed with einfo but needs to do it herself
12 >> c) This is a bug in webapp-config
13 >>
14 >> c) seems strange to me, but a user has reported this in bug
15 >> 496788 and it was closed as a duplicate implying c).
16 >>
17 >
18 > It depends. webapp-config is designed to keep a pristine copy in
19 > /usr/share/webapps/$PN/$PV/ so when you write "its install directory"
20 > I'm not sure which one you mean. Is it that one in /usr/share OR is it
21 > the directory, likely withinin /var/www/, that the cli invocation of
22 > webapp-config placed it's files?
23
24 I did not know about the pristine copy in /usr/share, that's
25 quite useful indeed. My analysis of the situation at the moment:
26
27 The ebuild tries to use the config protect functionality of
28 webapp-config as per eclass manpage. It has:
29
30 webapp_configfile ${MY_HTDOCSDIR}/config.php
31
32 This failed somehow. When upgrading my site install,
33 /var/www/../config.php was overwritten by the pristine version.
34 I don't know if this bug is different from
35 https://bugs.gentoo.org/show_bug.cgi?id=493520
36 At least the patch in that bug seems to only work around the
37 problem, introducing a user configurable config protect variable.
38
39 > If the latter, then it's a bug. webapp-config is supposed to
40 > keep track of modified files across multiple installations of
41 > the same webapp, even differing versions of the same webapp. If
42 > it's not doing that, its a bug in webapp-config.
43
44 Yes.
45
46 Cheers,
47 Thomas
48
49
50 --
51 Thomas Kahle
52 http://dev.gentoo.org/~tomka/

Attachments

File name MIME type
signature.asc application/pgp-signature