#403 [Debian] conf.d is present but ignored by default
Reporter
phyzome
Owner
MattJ
Created
Updated
Stars
★ (1)
Tags
Priority-Medium
Type-Defect
Status-Accepted
phyzome
on
*What steps will reproduce the problem?*
1. See conf.d directory in fresh 0.9.3 installation on Debian Wheezy
2. Add configuration chunks to it
I expect them to be picked up automatically on start. Instead, they are not.
Many Debian packages (apt, emacs, alsa, xorg...) have been moving to a model where instead of foo.conf containing both distribution and administrator configuration, there is a foo.conf with just distribution config and a foo.d/ directory where admins (and other packages!) can drop configuration, scripts, etc. It appears that Prosody used to automatically include this dir but no longer does, yet the dir itself is still packaged.
There are two obvious ways to resolve this discrepancy: Remove the dir from the package or add the Include line again. I would vastly prefer the latter, since it makes my backup, configuration, and upgrade procedures much nicer; I can simply drop a config file into place, and on upgrade I don't need to diff the config file and pick out my host configuration.
phyzome
on
I should note that the example config and the website docs don't mention the Include directive necessary to perform the workaround:
Include "conf.d/*.cfg.lua"
Waqas
on
Did you install using Debian packages from the Debian or our repos? Or did you install from source?
We document this on our page for packagers [1], but the text could be improved. This line is included by default in our Debian packages.
[1] https://prosody.im/doc/packagers#including_separate_files
phyzome
on
This is the deb package from <https://prosody.im/download/package_repository>. I remember seeing this line in 0.8, which I received from whatever repositories Raspberry Pi's Debian distro comes with.
Waqas
on
Alright, this line may have been removed from the default package config during our last reset of the package build system (we switched from home grown scripts to a standard Debian package building environment). We'll fix this, thanks for the report.
Changes
tags Status-Accepted
owner MattJ
Waqas
on
Changes
tags Milestone-0.9
title [Debian] conf.d is present but ignored by default
MattJ
on
Waqas, stick to the Windows packages and stop making things up :)
Our Debian packages have never used conf.avail/conf.d. I'm not sure why they are creating conf.d, this is probably a mistake.
When Prosody was added to Debian officially, the package was converted to use a split config structure that is commonly found in other Debian daemons. However our package on packages.prosody.im continued with a single config.
My personal opinion is that split configs are more confusing and harder to debug. If we *were* ever to adopt them then I would at least want some better tooling (similar to Apache's a2ensite, etc.) and a way to produce a merged file for debugging purposes. I know very well that not everyone shares this view :)
Finally I'll note that the difference between the packages generally isn't a problem. If people start using the Debian packages, and upgrade to ours, as long as they keep their config when they upgrade (which I generally recommend) then they'll continue to have support for split configs. Likewise if they move from ours to Debian's, everything will continue to work.
Tim McCormack
on
Subscribing, post-Google Code.
MattJ
on
Reviewing old open bugs that haven't moved for a while.
I see two possible resolutions to this one:
Option #1: Just close the issue. The problem only occurs if you install Debian's package, use conf.d, and then install our package and choose to overwrite your config with the default one from the package. This is not an issue that happens often.
Option #2: Add Include 'conf.d/*.cfg.lua' to our default config. If we do this, we can create an empty conf.d/ in the package, we don't have to actually put any files there.
And the need for tools for producing a merged config that I mentioned previously is separate to this issue, so we shouldn't block this issue on solving that.
phyzome
on
As a user, I'd be happy with Prosody either removing the conf.d from the package or adding a wildcard include -- it was the mismatch that bothered me. (The wildcard include would be more in line with Debian configuration standards though, I think.)
Zash
on
Dropping milestone. Way too late for 0.9 anyways.
Changes
tagsMilestone-0.9
James Bowery
on
Debian Buster still has this nonsense in `/etc/prosody/prosody.cfg.lua` -- note, in particular the statement "This line..." which refers to nothing but should refer to a line consisting of `Include 'conf.d/*.cfg.lua'`:
```----------- Virtual hosts -----------
-- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
-- Settings under each VirtualHost entry apply *only* to that host.
-- It's customary to maintain VirtualHost entries in separate config files
-- under /etc/prosody/conf.d/ directory. Examples of such config files can
-- be found in /etc/prosody/conf.avail/ directory.
------ Additional config files ------
-- For organizational purposes you may prefer to add VirtualHost and
-- Component definitions in their own config files. This line includes
-- all config files in /etc/prosody/conf.d/
VirtualHost "localhost"
```
*What steps will reproduce the problem?* 1. See conf.d directory in fresh 0.9.3 installation on Debian Wheezy 2. Add configuration chunks to it I expect them to be picked up automatically on start. Instead, they are not. Many Debian packages (apt, emacs, alsa, xorg...) have been moving to a model where instead of foo.conf containing both distribution and administrator configuration, there is a foo.conf with just distribution config and a foo.d/ directory where admins (and other packages!) can drop configuration, scripts, etc. It appears that Prosody used to automatically include this dir but no longer does, yet the dir itself is still packaged. There are two obvious ways to resolve this discrepancy: Remove the dir from the package or add the Include line again. I would vastly prefer the latter, since it makes my backup, configuration, and upgrade procedures much nicer; I can simply drop a config file into place, and on upgrade I don't need to diff the config file and pick out my host configuration.
I should note that the example config and the website docs don't mention the Include directive necessary to perform the workaround: Include "conf.d/*.cfg.lua"
Did you install using Debian packages from the Debian or our repos? Or did you install from source? We document this on our page for packagers [1], but the text could be improved. This line is included by default in our Debian packages. [1] https://prosody.im/doc/packagers#including_separate_files
This is the deb package from <https://prosody.im/download/package_repository>. I remember seeing this line in 0.8, which I received from whatever repositories Raspberry Pi's Debian distro comes with.
Alright, this line may have been removed from the default package config during our last reset of the package build system (we switched from home grown scripts to a standard Debian package building environment). We'll fix this, thanks for the report.
ChangesWaqas, stick to the Windows packages and stop making things up :) Our Debian packages have never used conf.avail/conf.d. I'm not sure why they are creating conf.d, this is probably a mistake. When Prosody was added to Debian officially, the package was converted to use a split config structure that is commonly found in other Debian daemons. However our package on packages.prosody.im continued with a single config. My personal opinion is that split configs are more confusing and harder to debug. If we *were* ever to adopt them then I would at least want some better tooling (similar to Apache's a2ensite, etc.) and a way to produce a merged file for debugging purposes. I know very well that not everyone shares this view :) Finally I'll note that the difference between the packages generally isn't a problem. If people start using the Debian packages, and upgrade to ours, as long as they keep their config when they upgrade (which I generally recommend) then they'll continue to have support for split configs. Likewise if they move from ours to Debian's, everything will continue to work.
Subscribing, post-Google Code.
Reviewing old open bugs that haven't moved for a while. I see two possible resolutions to this one: Option #1: Just close the issue. The problem only occurs if you install Debian's package, use conf.d, and then install our package and choose to overwrite your config with the default one from the package. This is not an issue that happens often. Option #2: Add Include 'conf.d/*.cfg.lua' to our default config. If we do this, we can create an empty conf.d/ in the package, we don't have to actually put any files there. And the need for tools for producing a merged config that I mentioned previously is separate to this issue, so we shouldn't block this issue on solving that.
As a user, I'd be happy with Prosody either removing the conf.d from the package or adding a wildcard include -- it was the mismatch that bothered me. (The wildcard include would be more in line with Debian configuration standards though, I think.)
Dropping milestone. Way too late for 0.9 anyways.
ChangesMilestone-0.9Debian Buster still has this nonsense in `/etc/prosody/prosody.cfg.lua` -- note, in particular the statement "This line..." which refers to nothing but should refer to a line consisting of `Include 'conf.d/*.cfg.lua'`: ```----------- Virtual hosts ----------- -- You need to add a VirtualHost entry for each domain you wish Prosody to serve. -- Settings under each VirtualHost entry apply *only* to that host. -- It's customary to maintain VirtualHost entries in separate config files -- under /etc/prosody/conf.d/ directory. Examples of such config files can -- be found in /etc/prosody/conf.avail/ directory. ------ Additional config files ------ -- For organizational purposes you may prefer to add VirtualHost and -- Component definitions in their own config files. This line includes -- all config files in /etc/prosody/conf.d/ VirtualHost "localhost" ```