Re: how to view config file changes without running an upgrade?
- Date: Wed, 21 Mar 2018 09:56:09 -0500
- From: David Wright <deblis@xxxxxxxxxxxxxxxxx>
- Subject: Re: how to view config file changes without running an upgrade?
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,
$ 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.