Debian still having trouble with merged /usr
Debian still having trouble with merged /usr
Posted Apr 7, 2022 5:51 UTC (Thu) by smurf (subscriber, #17840)In reply to: Debian still having trouble with merged /usr by josh
Parent article: Debian still having trouble with merged /usr
The easiest remedy for this is to move /var/lib/dpkg to /usr/state/ (or wherever), and bind-mount /var/lib/dpkg to that. No, a symlink isn't sufficient.
Posted Apr 7, 2022 6:10 UTC (Thu)
by josh (subscriber, #17465)
[Link] (13 responses)
Posted Apr 7, 2022 8:14 UTC (Thu)
by bluca (subscriber, #118303)
[Link] (12 responses)
Posted Apr 8, 2022 4:25 UTC (Fri)
by pabs (subscriber, #43278)
[Link] (11 responses)
Posted Apr 8, 2022 11:09 UTC (Fri)
by smurf (subscriber, #17840)
[Link] (10 responses)
Specifically you want a 3-way merge between the old /etc, the new one as updated by dpkg, and your current /etc contents. Surprise, there's etckeeper and git, so this is a solved problem.
Solution: teach dpkg to redirect any files in /etc to /usr/state/etc instead, use etckeeper to check those into git, pull that from your system's /etc, ask the user to fix any merge conflicts, done. Maybe do the manual merge in a scratch /run/etc directory so the system isn't in a broken state while you do this. Ditto for updating config file formats to newer versions, and other shenanigans some packages get into.
The chances of this actually happening while dpkg's current maintainer guards their fiefdom are somewhat less than zero, however. Otherwise I'd've started implementing this scheme years ago.
Posted Apr 8, 2022 11:36 UTC (Fri)
by farnz (subscriber, #17727)
[Link] (9 responses)
Ultimately, the deep bug is outside dpkg - programs should read and merge multiple config locations, so that you can have /usr/etc containing the packaged config, and /etc containing the user config.
Posted Apr 9, 2022 1:39 UTC (Sat)
by josh (subscriber, #17465)
[Link] (8 responses)
Posted Apr 9, 2022 2:22 UTC (Sat)
by pabs (subscriber, #43278)
[Link] (7 responses)
Posted Apr 9, 2022 9:37 UTC (Sat)
by bluca (subscriber, #118303)
[Link]
Posted Apr 9, 2022 9:39 UTC (Sat)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Posted Apr 9, 2022 9:51 UTC (Sat)
by smurf (subscriber, #17840)
[Link] (4 responses)
OpenWRT tries to do something along these lines. Rather than hack the individual services they invented their own data structure (still text based, but a common format – though personally I'd use YAML instead of their scheme) and then generate the service-specific config files from that. Requires a generator script for each service supported that way, of course.
Posted Apr 12, 2022 0:03 UTC (Tue)
by pabs (subscriber, #43278)
[Link]
OTOH, the OpenWRT approach is *great* in the situation where there is a reasonably complete web app for the config in the Luci web interface. A discoverable graphical interface is often way easier to use than config file formats with a wide range of options, some of which might not be well documented.
Posted Apr 12, 2022 10:05 UTC (Tue)
by Cyberax (✭ supporter ✭, #52523)
[Link] (2 responses)
Posted Apr 12, 2022 11:04 UTC (Tue)
by rahulsundaram (subscriber, #21946)
[Link] (1 responses)
Posted Apr 12, 2022 19:56 UTC (Tue)
by Cyberax (✭ supporter ✭, #52523)
[Link]
Debian still having trouble with merged /usr
Debian still having trouble with merged /usr
Debian still having trouble with merged /usr
Debian still having trouble with merged /usr
Debian still having trouble with merged /usr
Debian still having trouble with merged /usr
Debian still having trouble with merged /usr
Debian still having trouble with merged /usr
Debian still having trouble with merged /usr
Debian still having trouble with merged /usr
Debian still having trouble with merged /usr
Debian still having trouble with merged /usr
Debian still having trouble with merged /usr
Debian still having trouble with merged /usr