Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #193979 > unrolled thread
| Started by | Harald Dunkel <harald.dunkel@aixigo.de> |
|---|---|
| First post | 2018-03-21 09:20 +0100 |
| Last post | 2018-03-21 17:00 +0100 |
| Articles | 4 on this page of 24 — 14 participants |
Back to article view | Back to linux.debian.user
how to view config file changes without running an upgrade? Harald Dunkel <harald.dunkel@aixigo.de> - 2018-03-21 09:20 +0100
Re: how to view config file changes without running an upgrade? The Wanderer <wanderer@fastmail.fm> - 2018-03-21 12:50 +0100
Re: how to view config file changes without running an upgrade? rhkramer@gmail.com - 2018-03-21 13:30 +0100
Re: how to view config file changes without running an upgrade? Hans <hans.ullrich@loop.de> - 2018-03-21 14:30 +0100
Re: how to view config file changes without running an upgrade? Curt <curty@free.fr> - 2018-03-21 14:50 +0100
Re: how to view config file changes without running an upgrade? Curt <curty@free.fr> - 2018-03-21 15:20 +0100
Re: how to view config file changes without running an upgrade? Cindy-Sue Causey <butterflybytes@gmail.com> - 2018-03-21 16:40 +0100
Re: how to view config file changes without running an upgrade? deloptes <deloptes@gmail.com> - 2018-03-21 22:00 +0100
Re: how to view config file changes without running an upgrade? Richard Hector <richard@walnut.gen.nz> - 2018-03-21 22:40 +0100
Re: how to view config file changes without running an upgrade? deloptes <deloptes@gmail.com> - 2018-03-21 22:50 +0100
Re: how to view config file changes without running an upgrade? Curt <curty@free.fr> - 2018-03-22 11:20 +0100
Re: how to view config file changes without running an upgrade? felmon davis <moelmoel2714@gmail.com> - 2018-03-27 09:00 +0200
Re: how to view config file changes without running an upgrade? Curt <curty@free.fr> - 2018-03-27 09:30 +0200
Re: how to view config file changes without running an upgrade? Jason <electron@emypeople.net> - 2018-03-22 03:30 +0100
Re: how to view config file changes without running an upgrade? Harald Dunkel <harald.dunkel@aixigo.de> - 2018-03-21 16:50 +0100
Re: how to view config file changes without running an upgrade? Greg Wooledge <wooledg@eeg.ccf.org> - 2018-03-21 17:20 +0100
Re: how to view config file changes without running an upgrade? deloptes <deloptes@gmail.com> - 2018-03-21 22:00 +0100
Re: how to view config file changes without running an upgrade? Harald Dunkel <harald.dunkel@aixigo.de> - 2018-03-22 11:20 +0100
Re: how to view config file changes without running an upgrade? Tomaž Šolc <tomaz.solc@tablix.org> - 2018-03-23 10:20 +0100
Re: how to view config file changes without running an upgrade? David Wright <deblis@lionunicorn.co.uk> - 2018-03-21 16:00 +0100
Re: how to view config file changes without running an upgrade? Greg Wooledge <wooledg@eeg.ccf.org> - 2018-03-21 16:20 +0100
Re: how to view config file changes without running an upgrade? David Wright <deblis@lionunicorn.co.uk> - 2018-03-21 18:20 +0100
Re: how to view config file changes without running an upgrade? <tomas@tuxteam.de> - 2018-03-21 16:20 +0100
Re: how to view config file changes without running an upgrade? Harald Dunkel <harald.dunkel@aixigo.de> - 2018-03-21 17:00 +0100
Page 2 of 2 — ← Prev page 1 [2]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2018-03-21 16:20 +0100 |
| Message-ID | <vvNGW-3I2-29@gated-at.bofh.it> |
| In reply to | #193987 |
On Wed, Mar 21, 2018 at 09:56:09AM -0500, David Wright wrote: > If you unpack the package somewhere, either using ar etc or, > more easily, by selecting it in mc and copying CONTENTS into, > say, /tmp Or "dpkg -x". > $ for j in $(dpkg -L packagename) ; do [ -f $j ] && diff -u $j /tmp/CONTENTS/$j ; done This only works if the filenames contained in the package are "safe", not containing any whitespace characters or ? or * or [ or any other characters that a shell may interpret as part of word splitting or filename expansion (with or without extended globs enabled). https://mywiki.wooledge.org/Quotes https://mywiki.wooledge.org/BashPitfalls#pf1 For most Debian packages, the filenames probably are "safe", but relying on that is not a good habit to fall into. dpkg -L packagename | while IFS= read -r f; do [ -f "$f" ] && diff -u "$f" /tmp/CONTENTS/"$f"; done That's safe for all filenames that don't contain newlines. And I'm pretty sure a filename with a newline cannot occur in a package, because all of the tools like dpkg -L would break. In any case, dpkg -L would *definitely* break, so you wouldn't be able to do this at all.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2018-03-21 18:20 +0100 |
| Message-ID | <vvPz4-4Vf-17@gated-at.bofh.it> |
| In reply to | #193988 |
On Wed 21 Mar 2018 at 11:16:04 (-0400), Greg Wooledge wrote: > On Wed, Mar 21, 2018 at 09:56:09AM -0500, David Wright wrote: > > If you unpack the package somewhere, either using ar etc or, > > more easily, by selecting it in mc and copying CONTENTS into, > > say, /tmp > > Or "dpkg -x". Noted. One of the reason I use mc is that I'll usually be using a function that does mc sh://alum.local/~ "$@" (with a few mods so that the colouring is different from normal) to get to my apt-cache-ng archive. Then the copying is cross-host to where I'm actually performing the check. > > $ for j in $(dpkg -L packagename) ; do [ -f $j ] && diff -u $j /tmp/CONTENTS/$j ; done > > This only works if the filenames contained in the package are "safe", > not containing any whitespace characters or ? or * or [ or any other > characters that a shell may interpret as part of word splitting or > filename expansion (with or without extended globs enabled). > > https://mywiki.wooledge.org/Quotes > https://mywiki.wooledge.org/BashPitfalls#pf1 Yes, I use your pages a fair bit, for which thanks. > For most Debian packages, the filenames probably are "safe", but relying > on that is not a good habit to fall into. Nope. Hence my "add quotes to taste". But failure on that account is likely to be noisy so at least you won't get false successes. > dpkg -L packagename | while IFS= read -r f; do [ -f "$f" ] && diff -u "$f" /tmp/CONTENTS/"$f"; done > > That's safe for all filenames that don't contain newlines. And I'm > pretty sure a filename with a newline cannot occur in a package, because > all of the tools like dpkg -L would break. In any case, dpkg -L would > *definitely* break, so you wouldn't be able to do this at all. Neatly done. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2018-03-21 16:20 +0100 |
| Message-ID | <vvNGZ-3I2-93@gated-at.bofh.it> |
| In reply to | #193987 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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. > > -backup_initramfs=yes > +backup_initramfs=no > $ > > 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. Cheers - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlqyd5QACgkQBcgs9XrR2kZKnACdFHM4A2iW/7QC7jx7xuaQCnES TO4An21mt6j41xDmZx2pEXMkq6W42guW =K1wP -----END PGP SIGNATURE-----
[toc] | [prev] | [next] | [standalone]
| From | Harald Dunkel <harald.dunkel@aixigo.de> |
|---|---|
| Date | 2018-03-21 17:00 +0100 |
| Message-ID | <vvOjF-3Xl-21@gated-at.bofh.it> |
| In reply to | #193979 |
PS: Please note that there are 2 "branches" of config file we work with: - the "orig" config files included in the *.deb file - the local config files active on the server Both branches might change over time, so manually backing up a config file to *.orig at first time modification doesn't really help. Its easy to forget, and the *.orig file is not maintained during package upgrades. Regards Harri
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | linux.debian.user
csiph-web