[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: config file name and format change



On Thu, Feb 04, 2021 at 10:37:18PM +0100, Christoph Biedl wrote:
> Marc Haber wrote...
> 
> > My idea would be to have two distinct systemd units, ser2net and
> > ser2net-oldconfig, with appropriate ConditionPathExists directives.
> 
> From my experience, that is a bad idea. While being easier right now,
> this results in having to maintain two flavours for ... possibly
> forever. In my opinion it is better to do a huge but one-time effort
> than having to deal with repeated little work for a long time. Also, I
> found the latter in similar situations fairly annoying every time I had
> to think about it, but perhaps that's just me.
> 
> So I advise to provide an upgrade path for all users even if this means
> work for you as the package maintainer. Still in my experience it's
> better if the maintainer spends time on a sound automated solution
> than leaving figuring out the gory details to the users. For me, this
> is also an implication of the Social Contract ("guided by the needs
> of our users").

Qouting the original post

  The program can still read the old file format, the only "limitation"
  is that files with .yaml ending cannot be in the old format.


I do read that as a NONbreaking change.

 
> To ease the job:
> 
> Upstream should implement a function every decent daemon ought to have:
> Dump the configuration as it was parsed, then exit. This is very helpful
> when debugging some weird configuration issues, escpecially typos in
> file names. Also, unless there's already some "dry-run" option, this
> allows using validate: in an Ansible playbook so configuration errors
> can be detected *before* a daemon is restarted. And in that particular
> case of configuration file format change, it allows users to verify
> they've upgraded their configuration to the new format sucessfully.
> 
> As a bonus, that dump could be a valid configuration file. Aaaand ...
> there is the converter tool that should exist anyway.
> 
> As a last resort: The old format is extremely simple, the new one is not
> that complicated. It seems feasible to do the conversion with a few
> lines of awk, so it could be done in preinst. Also, that method could
> even preserve any comments.
> 
> All this is more work than some alert boxes or a paragraph in
> README.Debian. But I think it's worth it.
> 
>     Christoph, ser2net user since 2004



Groeten
Geert Stappers
-- 
Silence is hard to parse


Reply to: