Amitai Schlair | 11 Jul 2008 20:59

[RCD] config file location

Hello!

RoundCube places its config files within its directory hierarchy. This  
is a fine default, but for packages it's important to be able to  
override the default. Why? Many sysadmins (and packagers, and package  
systems) expect all binaries and data installed under the root of the  
package tree to be read-only once they've been installed; think NFS  
sharing, or package tools throwing warnings on delete/update when  
files don't match the checksums recorded when they were installed.

Config files aren't read-only, and therefore it's important to be able  
to place them elsewhere if desired (/etc, for instance.) I've patched  
roundcubemail-0.1.1-dep's main.inc:rcmail_load_config() to inspect the  
environment and prefix $RCMAIL_CONFIG_DIR if set, rather than  
"config", when reading the config files. The default behavior remains  
unchanged, of course!

http://netbsd.schmonz.com/patches/roundcube-config-dir.diff

To take advantage of the patch, I added "SetEnv RCMAIL_CONFIG_DIR /etc/ 
roundcube" to the RoundCube section of my Apache config, and placed  
{db,main}.inc.php in /etc/roundcube where I like them. :-)

Sorry this is against an old version, but there's nothing at all  
clever about the changes so they should be straightforward to bring up  
to date. The installer would need similar help as well.

- Amitai
_______________________________________________
List info: http://lists.roundcube.net/dev/
(Continue reading)

Vincent Bernat | 11 Jul 2008 22:25
Gravatar

Re: [RCD] config file location

OoO Pendant le journal télévisé du vendredi 11 juillet 2008, vers 20:59,
Amitai Schlair <schmonz <at> schmonz.com> disait :

> RoundCube places its config files within its directory hierarchy. This  
> is a fine default, but for packages it's important to be able to  
> override the default. Why? Many sysadmins (and packagers, and package  
> systems) expect all binaries and data installed under the root of the  
> package tree to be read-only once they've been installed; think NFS  
> sharing, or package tools throwing warnings on delete/update when  
> files don't match the checksums recorded when they were installed.

> Config files aren't read-only, and therefore it's important to be able  
> to place them elsewhere if desired (/etc, for instance.) I've patched  
> roundcubemail-0.1.1-dep's main.inc:rcmail_load_config() to inspect the  
> environment and prefix $RCMAIL_CONFIG_DIR if set, rather than  
> "config", when reading the config files. The default behavior remains  
> unchanged, of course!

> http://netbsd.schmonz.com/patches/roundcube-config-dir.diff

> To take advantage of the patch, I added "SetEnv RCMAIL_CONFIG_DIR /etc/ 
> roundcube" to the RoundCube section of my Apache config, and placed  
> {db,main}.inc.php in /etc/roundcube where I like them. :-)

Hi Amitai!

In Debian, we just use symlinks to achieve the same thing.
--

-- 
BOFH excuse #368:
Failure to adjust for daylight savings time.
(Continue reading)

Amitai Schlair | 12 Jul 2008 00:09

Re: [RCD] config file location

On Jul 11, 2008, at 4:25 PM, Vincent Bernat wrote:

> OoO Pendant le journal télévisé du vendredi 11 juillet 2008, vers  
> 20:59,
> Amitai Schlair <schmonz <at> schmonz.com> disait :
>
>> To take advantage of the patch, I added "SetEnv RCMAIL_CONFIG_DIR / 
>> etc/
>> roundcube" to the RoundCube section of my Apache config, and placed
>> {db,main}.inc.php in /etc/roundcube where I like them. :-)
>
> In Debian, we just use symlinks to achieve the same thing.

IIRC, we used to do likewise in pkgsrc. Because of the way in which we  
auto-compare config files against their original installed versions  
(in order to determine whether the sysadmin modified anything, which  
tells us whether to keep or discard when uninstalling), the symlink  
approach got complicated and we abandoned it. It'd be great if  
RoundCube could incorporate the minor changes necessary to follow an  
environment variable, if set, to find its config files.
_______________________________________________
List info: http://lists.roundcube.net/dev/

Michael Baierl | 12 Jul 2008 21:54
Favicon

Re: [RCD] config file location

Please be aware that not everyone has access to the Apache  
configuration. Actually most people using hosted services don't have.

lg,
Mike
-- 
Michael Baierl
<http://mbaierl.com/>

Am 11.07.2008 um 20:59 schrieb Amitai Schlair <schmonz <at> schmonz.com>:

> Hello!
>
> RoundCube places its config files within its directory hierarchy. This
> is a fine default, but for packages it's important to be able to
> override the default. Why? Many sysadmins (and packagers, and package
> systems) expect all binaries and data installed under the root of the
> package tree to be read-only once they've been installed; think NFS
> sharing, or package tools throwing warnings on delete/update when
> files don't match the checksums recorded when they were installed.
>
> Config files aren't read-only, and therefore it's important to be able
> to place them elsewhere if desired (/etc, for instance.) I've patched
> roundcubemail-0.1.1-dep's main.inc:rcmail_load_config() to inspect the
> environment and prefix $RCMAIL_CONFIG_DIR if set, rather than
> "config", when reading the config files. The default behavior remains
> unchanged, of course!
>
> http://netbsd.schmonz.com/patches/roundcube-config-dir.diff
>
(Continue reading)

Amitai Schlair | 13 Jul 2008 06:38

Re: [RCD] config file location

On Jul 12, 2008, at 3:54 PM, Michael Baierl wrote:

> Please be aware that not everyone has access to the Apache
> configuration. Actually most people using hosted services don't have.

Sure, my proposal doesn't help those users, but neither does it make  
things any worse for them. What would you suggest instead?

Thanks,

- Amitai
_______________________________________________
List info: http://lists.roundcube.net/dev/

till | 14 Jul 2008 01:55
Picon
Gravatar

Re: [RCD] config file location

On Sun, Jul 13, 2008 at 12:38 AM, Amitai Schlair <schmonz <at> schmonz.com> wrote:
> On Jul 12, 2008, at 3:54 PM, Michael Baierl wrote:
>
>> Please be aware that not everyone has access to the Apache
>> configuration. Actually most people using hosted services don't have.
>
> Sure, my proposal doesn't help those users, but neither does it make
> things any worse for them. What would you suggest instead?

I think currently, this is a none issue. :)

But being productive I suggest that instead of an env variable (which
setting is so system specific etc.), I think we could implement a
constant in index.php which would direct the code to the location of
the configuration files. If empty, fall back on "local" (which is
roundcube/config/).

This could be overwritten/replaced with a simple sed by a package
maintainer if he thinks this is absolutely necessary.

Bottom line is though, I feel like the advantage of roundcube is unzip
and go (almost literally), what you are doing makes it harder for the
end user to deal with it. Not everyone running roundcube is a system
administrator - it's more the contrary.

And personally I don't want to support people - "my distro puts it in
/etc", "my distro puts it in /usr/local/etc" etc. pp.. :-)

My two cents (currently USD) :D

(Continue reading)

Andreas van Cranenburgh | 14 Jul 2008 02:26
Picon
Gravatar

[RCD] updated esperanto translation


Here's the updated esperanto translation, see detachments.

--

-- 
    -- Andreas     [ http://unstable.nl | gopher://unstable.nl ]

 --- 8< --- detachments --- 8< ---
 The following attachments have been detached and are available for viewing.
  http://detached.gigo.com/rc/wY/rNj2PRvN/labels.inc
  http://detached.gigo.com/rc/wY/rNj2PRvN/messages.inc
 Only click these links if you trust the sender, as well as this message.
 --- 8< --- detachments --- 8< ---

_______________________________________________
List info: http://lists.roundcube.net/dev/
Adam Carmichael | 14 Jul 2008 08:05

Re: [RCD] config file location

> On Sun, Jul 13, 2008 at 12:38 AM, Amitai Schlair <schmonz <at> schmonz.com>
wrote:
> > On Jul 12, 2008, at 3:54 PM, Michael Baierl wrote:
> >
> >> Please be aware that not everyone has access to the Apache
> > configuration. Actually most people using hosted services don't have.
> >
> > Sure, my proposal doesn't help those users, but neither does it make
> > things any worse for them. What would you suggest instead?

> But being productive I suggest that instead of an env variable (which
> setting is so system specific etc.), I think we could implement a
> constant in index.php which would direct the code to the location of
> the configuration files. If empty, fall back on "local" (which is
> roundcube/config/).
> 
> This could be overwritten/replaced with a simple sed by a package
> maintainer if he thinks this is absolutely necessary.
I like an idea similar to how BSD (and probably most *nixes too) handles
/etc/rc configs. (rc is a bunch of system startup scripts, not Roundcube in
this case). Variables are loaded from /etc/rc.conf and then machine
specific variables are overridden in /etc/rc.conf.local

The idea is that when upgrading between releases, your distro's scripts do
not touch /etc/rc.conf.local. How does this affect us as developers, admins
and users? When upgrading from 0.1 to 0.2 or even between svn checkouts, we
have a shortlist of variables that are changed from the defaults.

I run two version of RC at the moment, one is against an "svn co" that I
run whenever I see a few diffs I like, the other is the stable release. If
(Continue reading)

Amitai Schlair | 14 Jul 2008 09:42

Re: [RCD] config file location

On Jul 13, 2008, at 7:55 PM, till wrote:

> But being productive I suggest that instead of an env variable (which
> setting is so system specific etc.), I think we could implement a
> constant in index.php which would direct the code to the location of
> the configuration files. If empty, fall back on "local" (which is
> roundcube/config/).
>
> This could be overwritten/replaced with a simple sed by a package
> maintainer if he thinks this is absolutely necessary.

Sure, that sounds great to me. I came up with my patch because I  
wanted to be able to set the path in one place without knowing much  
about RoundCube; if index.php is a better place, then yes please. :-)
_______________________________________________
List info: http://lists.roundcube.net/dev/

Kris Steinhoff | 14 Jul 2008 18:44
Picon

[RCD] patch: automatically generate a contact's display name

I've submitted a patch (http://trac.roundcube.net/ticket/1485212) that  
gives RoundCube the ability to dynamically generate a contact's  
display name by concatenating the first and last name fields and it  
also eliminates the separate display name field. This functionality is  
turned on with a new config option:

$rcmail_config['display_name_type'] = 'automatic';

This patch lays a foundation for some other work I'm doing on getting  
RoundCube's address book to use another database, with a different  
schema that doesn't include a display name. (Has anyone one done  
anything like this? Or have any advice about it?)

thanks
-kris
_______________________________________________
List info: http://lists.roundcube.net/dev/


Gmane