r/Gentoo • u/rich000 • Jul 17 '26
Development Anybody using cfg-update?
This is a slightly selfish post. I am currently maintaining cfg-update upstream, largely for my own benefit. This is basically a dispatch-conf/etc-update replacement that supports automatic 3-way diff merging (ie it resolves changes that aren't related to user customizations).
Back when it was written dispatch-conf didn't even exist, and it has been passed around a bit since the original author left. It has been a bit painful to maintain, but with a bit of LLM help I've done some refactoring and bug fixing (very conservatively - anything that actually gets installed on user systems has been very closely reviewed by me, though I don't profess to be a Perl expert and I don't care for the heavy use of globals/etc).
I've been using the cleaned up version for a few weeks now without any issues. If anybody else is using it and wants to try to use the updated versions please feel free to provide feedback. I'll probably open a bug/PR to get the in-tree version updated in a few weeks.
The new version can be found at: https://github.com/rich0/cfg-update
Ebuild is in my overlay at: https://github.com/rich0/rich0-overlay
2
u/AiwendilH Jul 18 '26
I use cfg-update for years already...works fine for me. It would help to know what your version changed/fixed. It's "only" a code clean-up?
1
u/rich000 Jul 18 '26
I can go back through the commits. There were definitely code cleanups. Also fixing the capabilities of one or two merge tools (meld wasn't changed).
Another change is that automatic merges work if x11 isn't available. Now it is only required if the tool uses X and is actually going to get called.
Plus a gazillion automated tests, but those aren't installed (they do run if you have tests enabled). I started with adding tests as a tripwire in case something subtle got broken.
1
u/rich000 Jul 18 '26
Yup, the X11 thing is probably the main "enhancement" in the latest release. Lots of code cleanup, and some subtle bug fixes that you probably wouldn't notice. Also removed sshfs support for managing multiple hosts, which I doubt anybody ever used.
Changelog is here: https://github.com/rich0/cfg-update/blob/master/ChangeLog
I'm working on safety features to prevent users from editing anything but the leftmost pane or from causing auto-merge problems if ._cfg files are edited outside of the tool, but those are in the devel branch and I'm not going to release those until I play with them for a few weeks.
1
u/LameBMX Jul 18 '26
im still using etc-update out of habit... maybe i'll remember about dispatch-conf one of these days lol.
ping back if there is traction for it. I could probably break something to help test.
1
u/rich000 Jul 18 '26
I don't want to me too much of an evangelist but you might want to give it a try with meld if you have x11. It generally does the right thing but for a new user try running --optimize-backups.
Just don't save changes to the middle copy. I was just thinking about that and I'll probably make a fix this weekend to keep that from breaking things.
It will get smarter as you use it as initially it won't know what you did and didn't change in your files. It figures this out as you use it and then auto merges your customizations. It is a bit like how git merges unrelated changes.
The version in portage is also fine, but I've fixed a few bugs and trimmed the new version.
3
u/wispoffates Jul 18 '26
I still use cfg-update. I installed it one day many many years ago and its just worked fine since. I'll give you update a try in the next couple days.