Installable packages may contain configuration files, usually installed in /etc/
. When updating packages, if such files are changed, the system does not rewrite them, but asks the user. The list of files and their source md5 sums is stored in the dpkg database. You can get it, though not very beautiful:
dpkg-query --showformat='${Conffiles}\n' --show \*
How to get a list of all modified configuration files, then write them to the archive? Maybe there is some kind of ready-made utility?