miket Guru

Joined: 28 Apr 2007 Posts: 506 Location: Gainesville, FL, USA
|
Posted: Wed Jul 03, 2019 4:51 am Post subject: |
|
|
I havn't used Prosody, but I did use ejabberd many years ago on an old, dead machine from which I recovered the filesystem that I still keep on line. Ejabberd also used /etc/jabber/ and /var/spool/jabber. While the /etc/jabber directory had package-specific files like ejabberd.cfg, the /var/spool/jabber directory has a lot of files I guess that the maintainer hoped would be the same across the various Jabber daemons.
I would not share the maintainer's confidence that, say, ejabberd and prosody could both use a share like /var/spool/jabber/roster.DCD without conflict. I kind of get that the he would want to set it up so that all Jabber daemons use the same set of directories, but surely that could make for problems if you wanted to replace one daemon for another.
Here's an example from a different kind of server daemon. If you wanted to switch from Apache to nginx, you'd continue to serve documents from /var/www/. The two packages, however, use their own separate /etc directories for configuration!
Jabber doesn't have standardized files to serve like a web server does, so it would sure seem to be better to use package specific directories.
Fortunately, there's a way out! I notice that the ebuilds define the environment variables JABBER_ETC and JABBER_SPOOL. These are the variables which supply the directory names you find problematic. The ebuild for ejabber defines these two also--when the same directory names as values!
The quick and dirty way to override these is to specify the environment variables on the Portage command line, like this: Code: | JABBER_ETC=/etc/prodody JABBER_SPOOL=/var/lib/prosody emerge prodody | but that's the suboptimal way. You really would want your configuration to stick when you upgrade the package. Here's how. In the /etc/portage/env/ directory, set up file prosody.conf with these contents: Code: | JABBER_ETC="/etc/prodody"
JABBER_SPOOL="/var/lib/prosody" |
Next make a reference to this file in /etc/portage/package.env: Code: | net-im/prosody prosody.conf |
Now when you emerge prosody, the directories should be what you want. |
|