purpleidea / mgmt

Next generation distributed, event-driven, parallel config management!
https://purpleidea.com/tags/mgmtconfig/
GNU General Public License v3.0
3.67k stars 315 forks source link

Port augeas resource to pure-golang #715

Open purpleidea opened 1 year ago

purpleidea commented 1 year ago

More information here: https://github.com/dominikh/go-augeas/issues/16

[Copied here]

A pure-golang implementation of this would be better, more portable, and also allow for building with: CGO_ENABLED=0. This would allow for easier reproducible builds for example, as explained here: https://go.dev/blog/rebuild

Would someone like to port this to remove the "C" implementation?

I'm considering (but have not yet decided) to drop "C" stuff in mgmt. https://github.com/purpleidea/mgmt/ if I decide to do so, and this isn't ported, then I would have to either drop the augeas resource entirely or at least from the default builds.

Thank you!

Not sure how strongly people feel about augeas, I really like the idea of keeping it in, but this might be overshadowed by having to use "C". The virt resource also uses "C", but there are alternatives we can port that to.

ffrank commented 8 months ago

Gave ccgo a spin, but both v3 and v4 choke pretty hard on the augeas source. The augeas code is full of preprocessor macros, so might be extra challenging.

Also ccgo seems to be under very active development, might be worth checking back later.

Rewriting 30k lines of C code manually does seem daunting.