Subject: Re: [PATCH iproute2-next 1/2] configure: add the --color option

From: Andrea Claudi <[email-masked]>
Date: Fri, 15 Sep 2023 21:52:22 +0200

On Fri, Sep 15, 2023 at 08:59:12AM -0700, Stephen Hemminger wrote:
> On Wed, 13 Sep 2023 19:58:25 +0200
> Andrea Claudi <[email-masked]> wrote:
> 
> > This commit allows users/packagers to choose a default for the color
> > output feature provided by some iproute2 tools.
> > 
> > The configure script option is documented in the script itself and it is
> > pretty much self-explanatory. The default value is set to "never" to
> > avoid changes to the current ip, tc, and bridge behaviour.
> > 
> > Signed-off-by: Andrea Claudi <[email-masked]>
> > ---
> 
> More build time config is not the answer either.
> Don't want complaints from distribution users about the change.
> Needs to be an environment variable or config file.
>

Hi Stephen,
This is not modifying the default behaviour; as David noted color output
will be off as it is right now. If packagers want to make use of this,
it's up to them to choose a sane default for their environment. After
all, we are providing options such as '--prefix' and '--libdir', and
there are endless possibilities to choose obviously wrong values for
these vars. Packagers are gonna deal with their own choices.

I think I can improve this in two ways:

1. Exclude 'always' from the allowed color choices
This is the setting with the highest chance to produce complaints, since
it is enabling color output regardless of stdout state. 'auto' instead
produces color output only on stdout that are terminals. Of course
'always' will remain as a param choice for the command line.

2. Add packaging guidelines to README (or README.packaging)
iproute packaging is a bit tricky, since some packaging systems simply
assume that configure comes from autotools. We even leverage this to our
advantage, providing configure options that packaging systems use
flawlessly as the autotools ones. I can provide some info about this,
and add some recommendations about sane configure defaults, especially
about the --color option.

What do you think? Is this approach fine for you?