Re: rm_conffile and left behind files

2021-03-06 Thread Paul Wise
On Sun, Mar 7, 2021 at 5:07 AM Tong Sun wrote:

> Is it OK that I simply `rm` them, like `rm /etc/dnsmasq.d/dbab-*`?

I think so, yes.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise



Re: rm_conffile and left behind files

2021-03-06 Thread Tong Sun
On Sat, Mar 6, 2021 at 11:54 PM Paul Wise wrote:
>
> On Sun, Mar 7, 2021 at 4:45 AM Tong Sun wrote:
>
> > Ah, indeed. the two files are modified after the package was
> > installed. Actually they are generated, not from within the package.
>
> Configuration files should either be conffiles installed in the .deb
> or files created by the package at postinst/run time, but not both of
> these at the same time.

Those were created by the package at postinst time, and can be updated
later, as per user's request.

> So the .deb should not contain the files and they should get removed
> from disk by the prerm. Also you will need to transition them from
> conffiles to regular files, I don't know how to do that though.

OK. I'll try to look that up. Meanwhile,

Is it OK that I simply `rm` them, like `rm /etc/dnsmasq.d/dbab-*`?
since they are all auto-generated, i.e., they don't contain
customizations made by the administrator that they don’t want to wipe
out.



Re: rm_conffile and left behind files

2021-03-06 Thread Paul Wise
On Sun, Mar 7, 2021 at 4:45 AM Tong Sun wrote:

> Ah, indeed. the two files are modified after the package was
> installed. Actually they are generated, not from within the package.

Configuration files should either be conffiles installed in the .deb
or files created by the package at postinst/run time, but not both of
these at the same time.

So the .deb should not contain the files and they should get removed
from disk by the prerm. Also you will need to transition them from
conffiles to regular files, I don't know how to do that though.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise



Re: rm_conffile and left behind files

2021-03-06 Thread Tong Sun
On Sat, Mar 6, 2021 at 10:47 PM Paul Wise - p...@debian.org
 wrote:
>
> On Sun, Mar 7, 2021 at 3:31 AM Tong Sun wrote:
>
> > after I remove the package
>
> Did you remove the package or purge it? Removing it will not run the
> postrm, but purging it will.

I use purge.

> > the last two files ... still remains and are left behind, while the first 
> > one was indeed gone.
>
> Were the two files modified after the package was installed?

Ah, indeed. the two files are modified after the package was
installed. Actually they are generated, not from within the package.

So what should I do?



Re: rm_conffile and left behind files

2021-03-06 Thread Paul Wise
On Sun, Mar 7, 2021 at 3:31 AM Tong Sun wrote:

> after I remove the package

Did you remove the package or purge it? Removing it will not run the
postrm, but purging it will.

> the last two files ... still remains and are left behind, while the first one 
> was indeed gone.

Were the two files modified after the package was installed?

-- 
bye,
pabs

https://wiki.debian.org/PaulWise



rm_conffile and left behind files

2021-03-06 Thread Tong Sun
Hi,

$ head /var/lib/dpkg/info/dbab.postrm
#!/bin/sh
set -e
# Automatically added by dh_installdeb/13.3.1
dpkg-maintscript-helper rm_conffile /etc/dbab -- "$@"
dpkg-maintscript-helper rm_conffile /etc/dnsmasq.d/dbab-map.adblock.conf --
"$@"
dpkg-maintscript-helper rm_conffile /etc/dnsmasq.d/dbab-map.trashsites.conf
-- "$@"
# End automatically added section

However, after I remove the package, the last two
files, /etc/dnsmasq.d/dbab-map.adblock.conf &
/etc/dnsmasq.d/dbab-map.trashsites.conf, still remains and are left behind,
while the first one was indeed gone.

What was the problem?
How can I fix it?

thx!