On Mon, Nov 04, Imobach González Sosa wrote:
On Mon, 2019-11-04 at 09:39 +0100, Thorsten Kukuk wrote:
On Mon, Nov 04, Andrei Borzenkov wrote:
Hi all,
I wonder was it coordinated with YaST?
Yes, it was, but as nobody really knows which files YaST is reading we clearly missed some files.
Yes, YaST reads or writes quite a lot of files[1], especially under /etc/sysconfig.
YaST should use libeconf to read login.defs, like shadow, util-linux and pam do already.
The problem I see with libeconf is that, as far as I understood, it only supports key=value configuration files (as it is stated in the project's README[2]). That's fine for many configuration files (like sysconfig, login.defs, etc.), but I am not sure whether it will be good enough for other cases (ini files -having sections into account-, YAML- like (Salt), JSON (docker), etc.).
The whole stuff makes only sense with ini style files.
Why not using augeas (or any other similar library) to parse the files instead of rolling our own? libaugeas and its lenses are quite small.
The parser is far the smallest part, and we haven't found anything which is merging the configuration files in the way we need it (the systemd developer were not willing to provide their code as standalone library or make the interface public). Thorsten
The YaST team has a Ruby gem[3] that offers a high level API to configuration files using augeas to parse them. As a proof of concept, we already implemented support to behave more or less like libeconf. But I would be great if we could join forces and reduce code duplication. Of course, we could rely on libeconf when possible and use augeas when needed...
Regards, Imo
[1] https://etherpad.suse.de/p/yast-usr-etc [2] https://github.com/openSUSE/libeconf/blob/master/README.md [3] https://github.com/config-files-api/config_files_api [4] https://github.com/config-files-api/config_files_api/pull/32
-- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & MicroOS SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany Managing Director: Felix Imendoerffer (HRB 36809, AG Nürnberg) -- Imobach González Sosa YaST Team at SUSE LINUX GmbH https://imobachgs.github.io/
-- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & MicroOS SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany Managing Director: Felix Imendoerffer (HRB 36809, AG Nürnberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org