Managing apt/dpkg/debconf configurations.
I'm managing a number of (ubuntu) workstations and servers and found it labour-intensive to keep configurations similar.
I use aptitude to set my manual/auto selections and have some preferences on certain debconf questions.
I know about some tricks/hacks to import/export package selections and I know about the debconf-pre-seed configuration at install time.
This all feels to limited to me.
What I would like is a way to 'package' certain parts of the dpkg/apt/debconf configuration and diff them to other systems and apply them on top of each other.
Of course I know about packages like ubuntu-standard and ubuntu-desktop, but they are too limited for my needs, since they only are just a list of dependencies (and recommendations, which can be ignored per system).
I know there are ways of 'cloning' systems, but many times systems don't need to be exactly the same, and after cloning, systems may wander off in different directions.
I would like to have some tool/collection of scripts to be able to diff/apply system/packaging related stuff.
It should be able to have a branching/merging workflow like git.
let's call it 'debdiff'
example (just a brainfart):
(after installing a basic system)
- (un)install some packages
- reconfigure some debconf settings.
- manually edit some files in /etc
--- installed the following packages
--- uninstalled the following packages
--- changed to manual
--- changed to auto
--- changed debconf settings:
adduser - system wide readable home directories: false
Xorg-base - who can start X: console_users_only
--- diffs to config files
well, you get the picture.
> debdiff save 'basic kde'
> debdiff list
(0) ubuntu clean install
(1) paranoid system settings
(2) basic kde
(3) non-packaged, local changes
> debdiff export 'basic kde'
> scp 'basic kde.debdiff' othermachine:
> debdiff apply 'basic kde'
or comparing entire systems:
> debdiff export
> scp myhostname-200902100802.debdiff othermachine:
> debdiff compare myhostname-200902100802.debdiff
--- diffs in paranoid system settings:
package 'apparmor-profiles' is not installed
debconf setting 'shadow passwords'
-- branch 'basic kde' is not merged on this system
Well, I think this is enough mockup-session for now :)
Of course there are some problems to work out, and I probably forgot some essential stuff.
I would just like to know if there's anything close to the process I described.
If not, what would be needed to get something off the ground?
Basically I think tools like git are very good at merging/diffing, and the de-centralized approach is well suited for configuring individual systems, yet have some 'central' repositories to merge from.
What is missing is a textual representation of apt/dpkg/debconf's state though.
A first step would be to just be able to diff total system states (so no applying/saving of state), so I can manually change stuff I need.
After that, some way to 'package' these diffs and apply them elsewhere would be a next step.
I would like to hear anyone's opinion on this subject and tools/tricks that are already available that might be useful.
If I get enough feedback I might start implementing something.
Have a nice day,