Re: Moving conf file from one package to another
On Mon, Oct 21, 2013, at 18:00, Andreas Beckmann wrote:
> On 2013-10-21 17:07, Ondřej Surý wrote:
> > Hi,
> > I am preparing new version of nsd and I need to reuse the conffile from
> > nsd3 package (that will get replaces by nsd package).
> > And I need to move /etc/nsd3/nsd.conf to /etc/nsd/nsd.conf and move it
> > from nsd3 to nsd package.
> > Should I:
> > - prepare transitional package nsd3 (src:nsd) that will Depend on nsd
> > - the nsd3 package will move conffile to /etc/nsd/nsd.conf (using
> > dpkg-maintscript-helper)
> > - the nsd package will Breaks: nsd3 (<< 4.0.0), Replaces: nsd3 (<<
> > 4.0.0)
> > - nsd package will fully replace nsd3 package (since nsd3 package will
> > be empty)
> > Or is there some simpler way?
> That sounds a like you would need this small hack to do the job:
> mv_conffile /etc/nsd3/nsd.conf /etc/nsd/nsd.conf 4.0.0~ nsd3 -- "$@" 0
> Note the additional 0 at the end, that is needed to make
> dpkg-maintscript-helper properly take over the conffile even on the
> initial installation of nsd, otherwise it would skip the job ... it just
> adds an "old version" in case "$@" does not contain one ...
So, there's no need to jump through hoops in nsd3? That's cool :).
Thanks for the hint.
Also thanks for the *.maintscript, I have missed that the dh_installdeb
can use it.
Ondřej Surý <email@example.com>
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server