== Why it's irritating when Ubuntu packages don't include their configuration files I'll start with [[my tweets https://twitter.com/thatcks/status/707990593427922946]]: > This is my angry face when Ubuntu openssh-server generates a fixed > /etc/ssh/sshd_config on the fly in postinst vs making it a config > file. \\ > Ubuntu dovecot also does the 'generate static configuration files at > install time' thing and now I want to set it on fire. (Twitter has become my venue of choice for short rants.) Both of these packages have the same bad idea, although their mechanisms differ somewhat. Specifically, the installed and running software has some configuration files (here ((/etc/ssh/sshd_config)) and _/etc/dovecot/conf.d/*_), but these files are not actually packaged in the _.deb_s; instead they are created at install time when the package is installed from scratch. (The behavior may be there in the Debian versions as well, but I don't run Debian so I can't easily check.) Years ago I wrote about [[wishing to be able to retrieve the stock version of some package file PackageFileRestoration]]. At the time I gave a recipe for doing this by hand on a Debian based system; you _apt-get download_ the _.deb_, use _dpkg -x_ to unpack it in a temporary directory, and fish the file out. Naturally this only works *if the _.deb_ actually packages the file*. If it does not, you have two options. First, you can find, read, and probably simulate by hand the process the _.postinst_ script uses to create the file (the postinst script itself is likely in _/var/lib/dpkg/info_). Second, you have to install an uncustomized version of the package somehow, either on a test machine or by purging and then reinstalling the package (which is likely to be very disruptive if you have any important local customizations). This is what I call 'not helpful'. There are all sorts of reasons to want to retrieve the original version of a configuration file that you've altered (or merely may have altered). Even when this is possible, how to do it is package specific, which means that you need package specific knowledge or research. Ubuntu packaging should do better here. (I don't expect things to ever change, though. I rather expect that this is inherited from Debian and Debian has some intricate reason of their own for doing it this way (and for different packages doing it differently). Debian sometimes makes me angry with their apparent love of [[robot logic ../unix/UnixAnnoyance]], technical intricacies, and apparent inability to ever do something in a single unified way.)