Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sympa.conf-dist comments format is not supported by Conf::_load_config_file_to_hash() #822

Closed
salaun-urennes1 opened this issue Dec 13, 2019 · 5 comments · Fixed by #823
Closed
Labels
bug ready A PR is waiting to be merged. Close to be solved
Milestone

Comments

@salaun-urennes1
Copy link
Collaborator

Version

6.2.48

Installation method

Sources

Expected behavior

sympa.conf-dist should be useable as a template for sympa.conf

Actual behavior

sympa.pl does not support the comments format from sympa.conf-dist

Additional information

I am in a situation where I want to build a new clean sympa.conf file with all options and detailed comments :

tar -zxvf sympa-6.2.48.tar.gz
cd sympa-6.2.48
./configure ; make
cp -p sympa.conf-dist /etc/sympa/sympa.conf
sympa.pl --health_check
err Conf::_load_config_file_to_hash() Error at line 4: /etc/sympa/sympa.conf
err Conf::_load_config_file_to_hash() Error at line 9: /etc/sympa/sympa.conf
err Conf::_load_config_file_to_hash() Error at line 10: /etc/sympa/sympa.conf
...

Comments in sympa.conf-dist are split on multiple lines without # prefix on each line : like this
###\\ Service description ////###

domain

Primary mail domain name

Example: domain mail.example.org

#domain (You must define this parameter)

## listmaster
   Email addresses of listmasters
   Email addresses of the listmasters (users authorized to perform global
   server commands). Some error reports may also be sent to these addresses.
   Listmasters can be defined for each virtual host, however, the default
   listmasters will have privileges to manage all virtual hosts.
## Example: listmaster  your_email_address@domain.tld
#listmaster     (You must define this parameter)

Conf::_load_config_file_to_hash() does not support this form of comments.

Or did I have a strange idea to reuse sympa.con-dist as a fresh sympa.conf file?

@ldidry
Copy link
Contributor

ldidry commented Dec 13, 2019

It seems that the sympa.conf-dist file created by make has this strange commenting, but not the one installed in /etc/sympa/sympa.conf-dist by make install.

Did you launch make install? (it’s not in your snippet)
If yes, does /etc/sympa/sympa.conf-dist has the bad commenting?

@salaun-urennes1
Copy link
Collaborator Author

Hi Luc,
I just had another try to check if make install copies sympa.conf-dist in /etc/sympa directory :

$ make install
...
installing sympa.conf-dist

** You can find documentation at:
** https://sympa-community.github.io/manual/
...
$ diff sympa.conf-dist /etc/sympa/sympa.conf-dist|wc -l
0

So the installed sympa.conf-dist is the one generated during make process, with the comments issue.

@ikedas
Copy link
Member

ikedas commented Dec 13, 2019

@salaun-urennes1, could you please check PR #823?
The bug looks caused by my change in the past, though I can't remember why I made such changes...

@ikedas ikedas added bug ready A PR is waiting to be merged. Close to be solved labels Dec 13, 2019
@ikedas ikedas added this to the 6.2.50 milestone Dec 13, 2019
@salaun-urennes1
Copy link
Collaborator Author

I tried the PR and confirm it fixes the bug :

git clone https://github.com/sympa-community/sympa.git sympa-from-github
cd sympa-from-github
git fetch origin pull/823/head
git checkout -b pullrequest823 FETCH_HEAD
yum install automake gettext-devel
aclocal;autoconf;automake --add-missing
./configure --prefix=/usr/local/sympa  --with-unitsdir=/etc/systemd/system  --without-initdir --with-aliases_file=/tmp/aliases_not_used
make 
make install
head /etc/sympa/sympa.conf-dist
###\\\\ Service description ////###

## domain
## Primary mail domain name
## Example: domain	mail.example.org
#domain	(You must define this parameter)

## listmaster
## Email addresses of listmasters
## Email addresses of the listmasters (users authorized to perform global

@ikedas
Copy link
Member

ikedas commented Dec 13, 2019

Thanks!

ikedas added a commit that referenced this issue Dec 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ready A PR is waiting to be merged. Close to be solved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants