How can I view the differences between the current state of a conffile and the clean state when the package was installed?
I am running Ubuntu Server upgrade from 12.04 to 14.04. The installer claims that several configuration files were changed locally:
Configuration file `/etc/bash.bashrc'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** bash.bashrc (Y/I/N/O/D/Z) [default=N] ?
(Source of the example: https://raphaelhertzog.com/2010/09/21/debian-conffile-configuration-file-managed-by-dpkg/)
When I choose D to check differences, my current conffile is compared to the clean state in the new package version.
Sometimes there are lots of lines that were changed between the package versions and are not local modifications for sure. I would like to filter such changes and display the true local modifications. Otherwise an important single-line local modification can be easily overlooked.
For example php.ini
has 447 changed lines according to:
diff /usr/share/php5/php.ini-production /etc/php5/apache2/php.ini | grep -E '^[<>]' -c