Re: How to use remove-on-upgrade to remove a configuration file?

2021-08-30 Thread Niels Thykier
Niels Thykier:
> Ludovic Rousseau:
>> Hello Niels,
>>
>> Le 08/08/2021 à 09:09, Niels Thykier a écrit :
>>> Ludovic Rousseau:
 [...]
>>>
>>> Hi Ludovic,
>>>
>>> You cannot use that feature yet as it would break during upgrade. The
>>> dpkg version in stable does not support the feature.  Which is also why
>>> there is no debhelper feature to support it yet.
>>
>> OK. I was searching for something that does not (yet) exist :-)
>>
>> My plan was to upload the package in Bullseye +1 so after the (soon)
>> release of Bullseye.
>> Bullseye will then be the new stable and will have dpkg 1.20.9. So that
>> should work. No?
>>
>> Thanks
>>
> 
>>From an upgrade/low-level tech perspective, yes, it would work.
> 
>>From an "how do I use this feature" perspective, I would recommend that
> you/people wait until relevant wiring has been added to debhelper.
> 
> ~Niels
> 

Hi,

I just uploaded debhelper/13.5 that adds support for the new feature via
the following methods:

 * Use of "rm_conffile" in debian/.maintscript will now be
   optimized into the "remove-on-upgrade" feature in cases where I
   believe I could do it safely and reliably.
   - This is easiest to use for most people; you can just keep doing
 what you have been doing and it will "just work(tm)".
   - This method also have the advantage that we can "roll it back"
 centrally if it turns out that some critical piece of
 infrastructure does not support the new vales in DEBIAN/conffiles.

 * debian/.conffiles is now installed again in all compat levels
   for the case you want to use the feature directly.
   - This method provides the highest degree of freedom/control but you
 will in general want ensure you are using debhelper (>= 13.5~) and
 that is currently not available in -backports.

For bullseye, my recommendation would be to stick with "rm_conffile" in
debian/.maintscripts.

Also note that DEBIAN/conffiles has been a list of files since
"forever".  Most likely some bits of code assumed this would never
change and we will probably see the effects of that soon.

Thanks,
~Niels



Re: How to use remove-on-upgrade to remove a configuration file?

2021-08-08 Thread Niels Thykier
Ludovic Rousseau:
> Hello Niels,
> 
> Le 08/08/2021 à 09:09, Niels Thykier a écrit :
>> Ludovic Rousseau:
>>> [...]
>>
>> Hi Ludovic,
>>
>> You cannot use that feature yet as it would break during upgrade. The
>> dpkg version in stable does not support the feature.  Which is also why
>> there is no debhelper feature to support it yet.
> 
> OK. I was searching for something that does not (yet) exist :-)
> 
> My plan was to upload the package in Bullseye +1 so after the (soon)
> release of Bullseye.
> Bullseye will then be the new stable and will have dpkg 1.20.9. So that
> should work. No?
> 
> Thanks
> 

>From an upgrade/low-level tech perspective, yes, it would work.

>From an "how do I use this feature" perspective, I would recommend that
you/people wait until relevant wiring has been added to debhelper.

~Niels



Re: How to use remove-on-upgrade to remove a configuration file?

2021-08-08 Thread Ludovic Rousseau

Hello Niels,

Le 08/08/2021 à 09:09, Niels Thykier a écrit :

Ludovic Rousseau:

Hello,

I am fixing Debian bug #990154.

After some work I am able to remove the obsolete conf file using:
rm_conffile /etc/reader.conf.d/0comments 1.9.3-2~ pcscd
in debian/pcscd.maintscript

Nice.
Now I would like to use the method documented in deb-conffiles
https://manpages.debian.org/unstable/dpkg-dev/deb-conffiles.5.en.html

I would need to add in the DEBIAN/conffiles of the pcscd package the line:
remove-on-upgrade /etc/reader.conf.d/0comments

But how do I generate a .deb package with this extra line?
What is the magic dh command or file to do that?
Where is it documented?

I tried to use a file debian/pcscd.conffiles but this file is no more
used with debhelper version 12
https://manpages.debian.org/buster/debhelper/dh_installdeb.1.en.html

I searched for occurrences of "remove-on-upgrade" in
https://codesearch.debian.net/ but I only find references to dpkg source
code.
No Debian package is using or has used "remove-on-upgrade"?

Thanks



Hi Ludovic,

You cannot use that feature yet as it would break during upgrade. The
dpkg version in stable does not support the feature.  Which is also why
there is no debhelper feature to support it yet.


OK. I was searching for something that does not (yet) exist :-)

My plan was to upload the package in Bullseye +1 so after the (soon) release of 
Bullseye.
Bullseye will then be the new stable and will have dpkg 1.20.9. So that should 
work. No?

Thanks

--
Dr. Ludovic Rousseau



Re: How to use remove-on-upgrade to remove a configuration file?

2021-08-08 Thread Niels Thykier
Ludovic Rousseau:
> Hello,
> 
> I am fixing Debian bug #990154.
> 
> After some work I am able to remove the obsolete conf file using:
> rm_conffile /etc/reader.conf.d/0comments 1.9.3-2~ pcscd
> in debian/pcscd.maintscript
> 
> Nice.
> Now I would like to use the method documented in deb-conffiles
> https://manpages.debian.org/unstable/dpkg-dev/deb-conffiles.5.en.html
> 
> I would need to add in the DEBIAN/conffiles of the pcscd package the line:
> remove-on-upgrade /etc/reader.conf.d/0comments
> 
> But how do I generate a .deb package with this extra line?
> What is the magic dh command or file to do that?
> Where is it documented?
> 
> I tried to use a file debian/pcscd.conffiles but this file is no more
> used with debhelper version 12
> https://manpages.debian.org/buster/debhelper/dh_installdeb.1.en.html
> 
> I searched for occurrences of "remove-on-upgrade" in
> https://codesearch.debian.net/ but I only find references to dpkg source
> code.
> No Debian package is using or has used "remove-on-upgrade"?
> 
> Thanks
> 

Hi Ludovic,

You cannot use that feature yet as it would break during upgrade. The
dpkg version in stable does not support the feature.  Which is also why
there is no debhelper feature to support it yet.

Thanks,
~Niels



How to use remove-on-upgrade to remove a configuration file?

2021-08-07 Thread Ludovic Rousseau

Hello,

I am fixing Debian bug #990154.

After some work I am able to remove the obsolete conf file using:
rm_conffile /etc/reader.conf.d/0comments 1.9.3-2~ pcscd
in debian/pcscd.maintscript

Nice.
Now I would like to use the method documented in deb-conffiles
https://manpages.debian.org/unstable/dpkg-dev/deb-conffiles.5.en.html

I would need to add in the DEBIAN/conffiles of the pcscd package the line:
remove-on-upgrade /etc/reader.conf.d/0comments

But how do I generate a .deb package with this extra line?
What is the magic dh command or file to do that?
Where is it documented?

I tried to use a file debian/pcscd.conffiles but this file is no more used with 
debhelper version 12
https://manpages.debian.org/buster/debhelper/dh_installdeb.1.en.html

I searched for occurrences of "remove-on-upgrade" in 
https://codesearch.debian.net/ but I only find references to dpkg source code.
No Debian package is using or has used "remove-on-upgrade"?

Thanks

--
Dr. Ludovic Rousseau