ElektraInitiative / libelektra

Elektra serves as a universal and secure framework to access configuration settings in a global, hierarchical key database.
https://www.libelektra.org
BSD 3-Clause "New" or "Revised" License
208 stars 123 forks source link

augeas: update 1.4.0 to 1.5.0 breaks syntax #812

Closed mpranj closed 8 years ago

mpranj commented 8 years ago

On OS X (homebrew) the augeas package was updated recently. Apparently there were some syntax changes. Take this also as a hint that travis builds will fail form now on.

 30/107 Test  #30: testmod_augeas .....................***Failed    0.01 sec
AUGEAS       TESTS
==================

/Users/mpranj/workspace/libelektra/src/plugins/augeas/testmod_augeas.c:34: error in test_hostLensRead: call to kdbGet was not successful
number: 85
description: : an Augeas error occurred
ingroup: : plugin
module: : storage
at: /Users/mpranj/workspace/libelektra/src/plugins/augeas/augeas.c:414
reason: : Syntax error in lens definition
mountpoint: : user/tests/augeas-hosts
configfile: : /Users/mpranj/workspace/libelektra/src/plugins/augeas/augeas/hosts-read
/Users/mpranj/workspace/libelektra/src/plugins/augeas/testmod_augeas.c:35: error in test_hostLensRead: error in kdbGet
/Users/mpranj/workspace/libelektra/src/plugins/augeas/testmod_augeas.c:39: fatal in test_hostLensRead: ip address of localhost not found

@fberlakovich can you take a look if there is an easy fix?

fberlakovich commented 8 years ago

@fberlakovich can you take a look if there is an easy fix?

I am busy until Tuesday, but I hope to find some time to look at it next week.

markus2330 commented 8 years ago

What puzzles me is that we only use lenses (in the testcase Hosts.lns) that are distributed with augeas. Can you check if the error also happens if augeas is used directly? Maybe providing augeas version + the lens would help, too.

markus2330 commented 8 years ago

It would be great if you can look into it: it fails every build which makes it cumbersome to check what the status of a PR is.

fberlakovich commented 8 years ago

The last time I tried I couldn't reproduce it, but I will have another look


Von: markus2330 notifications@github.com Gesendet: 11.07.2016 18:59 An: ElektraInitiative/libelektra Cc: Felix Berlakovich; Mention Betreff: Re: [ElektraInitiative/libelektra] augeas: update 1.4.0 to 1.5.0 breaks syntax (#812)

It would be great if you can look into it: it fails every build which makes it cumbersome to check what the status of a PR is.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ElektraInitiative/libelektra/issues/812#issuecomment-231796570, or mute the threadhttps://github.com/notifications/unsubscribe/AHlkSMWGcB_P184mYcqej0wrJg1fNgOaks5qUnZqgaJpZM4I93Zx.

markus2330 commented 8 years ago

Thank you! Maybe you can improve the test cases so that the error message is more useful?

fberlakovich commented 8 years ago

@mpranj Could you provide the library version that is installed with Augeas 1.5.0 in homebrew? I manually compiled Augeas 1.5.0 on Debian Jessie 8.5 and cannot reproduce the issue. Could it be that your lens file got corrupted?

fberlakovich commented 8 years ago

Or could you even provide the hosts lens that is used on OS X?

markus2330 commented 8 years ago

Looks like the problem is the current homebrew package. (Based on that Augeas 1.5.0 worked on Jessie without problems.) Is it possible that we continue to use the old homebrew augeas package and report the issue in the homebrew issue tracker?

rautesamtr commented 8 years ago

I can confirm that kdb mount /etc/hosts system/hosts augeas lens=Hosts.lns works on Arch Linux with current augeas 1.5.0 package and on OS X with hombrew --HEAD augeas but not with the bottled augeas:

The command ls failed while accessing the key database with the info:
Error (#85) occurred!
Description: an Augeas error occurred
Ingroup: plugin
Module: storage
At: /tmp/elektra-20160712-89341-o077zh/elektra-0.8.17/src/plugins/augeas/augeas.c:414
Reason: Syntax error in lens definition
Mountpoint: system/system/hosts
Configfile: /etc/hosts

Also the testcase run fine with --HEAD version of augeas.

Edit: Sorry for the many edits.

rautesamtr commented 8 years ago

I did some further testing. Switching HEAD manually to 1.5.0 taged version of augeas in brews formula also results in working testcases. So I tried to build and install augeas 1.5.0 from source package which resulted in the known test failure / lens not found. So it seems 1.5.0 from git which uses autogen.sh works, but 1.5.0 from source package which uses configure does not. Hope this info helps.

markus2330 commented 8 years ago

Yes, its one more hint that it is a packaging problem.

We could report it at homebrew. And the easiest workaround would be to use the old augeas package in homebrew.

rautesamtr commented 8 years ago

Not sure if it is a homebrew packaging problem or a problem in the source package tough.

And the easiest workaround would be to use the old augeas package in homebrew.

that would mean we would have to use a custom formula anyhow. homebrew only has versions for some specific packages. so no it is not an easy solution in this case.

markus2330 commented 8 years ago

I saw your fix after writing the message. If you fix works its perfect. It should be still reported to upstream (homebrew) though.

rautesamtr commented 8 years ago

It should be still reported to upstream (homebrew) though.

done: https://github.com/Homebrew/homebrew-core/issues/2961

markus2330 commented 8 years ago

Thank you for reporting! I think we can close the issue for now.