Re: how to view config file changes without running an upgrade?
-----BEGIN PGP SIGNED MESSAGE-----
On Wed, Mar 21, 2018 at 09:56:09AM -0500, David Wright wrote:
> On Wed 21 Mar 2018 at 09:13:43 (+0100), Harald Dunkel wrote:
> > How can I view the diffs between my local modified config file
> > (maybe modified 2 years ago) and the maintainer's config file
> > included in the currently installed package or in a pending
> > package upgrade? I would like to review my diffs, before running
> > "apt upgrade".
> If you unpack the package somewhere, either using ar etc or,
> more easily, by selecting it in mc and copying CONTENTS into,
> say, /tmp
> $ for j in $(dpkg -L packagename) ; do [ -f $j ] && diff -u $j /tmp/CONTENTS/$j ; done
> will list any changes. For example:
> $ for j in $(dpkg -L initramfs-tools) ; do [ -f $j ] && diff -u $j /tmp/CONTENTS/$j ; done
> --- /etc/initramfs-tools/update-initramfs.conf 2018-01-22 15:19:07.666686422 -0600
> +++ /tmp/CONTENTS//etc/initramfs-tools/update-initramfs.conf 2014-10-27 00:00:00.000000000 -0500
> @@ -17,4 +17,4 @@
> # Default is no
> # If set to no leaves no .bak backup files.
> Add quotes "" to taste. And you may need to chmod u+w /tmp/CONTENTS
> to clear it out when finished.
Note that the config files might be changed by post-install scripts
(possibly depending on user input through debconf).
I guess the OP's wishes can only be really had with snapshotting
(or equivalently, some overlayfs trickery). While that seems more
or less feasible, it might be too heavy-handed to be enticing.
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
-----END PGP SIGNATURE-----