Date: Sun, 25 Aug 2019 22:40:27 -0600 From: Warner Losh <imp@bsdimp.com> To: Jan Sucan <sucanjan@gmail.com> Cc: Alan Somers <asomers@freebsd.org>, "Conrad E. Meyer" <cem@freebsd.org>, Hiroki Sato <hrs@allbsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org> Subject: Re: svn commit: r351423 - in head: . sbin/ping6 sbin/ping6/tests Message-ID: <CANCZdfpo%2BiqmnoRmnFH6QbKFpazjzFP36qTLqi65%2Bn-6rySHBw@mail.gmail.com> In-Reply-To: <379c3378-f9dd-4d6b-35ca-fa1ac7e6386b@gmail.com> References: <201908231522.x7NFMLuJ068037@repo.freebsd.org> <20190826.042056.1329861772202588895.hrs@allbsd.org> <CAOtMX2hLxx=SKvh1ZoiMAcagQJjPaRSvkML9J%2BBgpQsz5uNNbw@mail.gmail.com> <20190826.050922.1810654532466043358.hrs@allbsd.org> <CAOtMX2jhmV%2BqRH%2BU1jMzdXsnckAvkzJhQiU6H65jUjdpK%2BXU3Q@mail.gmail.com> <CAG6CVpUULfa9KYWWRLwDxVS6UJ-s3GRGAcjXPo4a5yJjYRG_7w@mail.gmail.com> <CAOtMX2hjaYq%2B8_S0yXeAJutF2gNy3wgivmvOd=OV-iTByUdYKA@mail.gmail.com> <379c3378-f9dd-4d6b-35ca-fa1ac7e6386b@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Aug 25, 2019, 10:35 PM Jan Sucan <sucanjan@gmail.com> wrote: > Hello, > > I can implement it. I suppose that ping6's manual page should be kept it > this case. > The differences are small enough you may be able to combine man pages. I was also thinking about printing a warning for each option renamed to > lead a willing user to use the new unified option set of ping. It could > be either only with -v, or by default and suppressed with -q. Or should > the option translation be completely transparent? > This I'm unsure about., so I'll leave it to others to opine. Warner -Jan > > On 26. 8. 2019 1:58, Alan Somers wrote: > > Jan (please keep him CCed on replies) has been musing about the same > > thing. That might satisfy everyone. Jan, would it be straightforward > > to implement? > > -Alan > > > > On Sun, Aug 25, 2019 at 5:51 PM Conrad Meyer <cem@freebsd.org> wrote: > >> Hi Alan, Hiroki, > >> > >> It would be pretty easy to install a `ping6` link to the `ping(8)` > >> binary with different option parsing (conditional on argv[0]). That > >> removes most of the issues of code and space duplication, I think? > >> And the goal would be for the 'ping6' name to retain option > >> compatibility with historical ping6. > >> > >> It's not an uncommon pattern; for example, 'id', 'groups', and > >> 'whoami' are all a single binary with multiple linked names. Another > >> example is Clang, which provides 'cc', 'c++', 'clang', 'clang-cpp', > >> 'clang++' and 'cpp' links to the same inode =E2=80=94 and those have v= ery > >> different behavior depending on argv[0]. > >> > >> It's less work than forcing the ping6 compatibility crowd to create a > >> port and doesn't hurt ping(8) much, AFAICT. Is it an acceptable > >> middle ground? > >> > >> Best, > >> Conrad > >> > >> On Sun, Aug 25, 2019 at 1:26 PM alan somers <asomers@gmail.com> wrote: > >>> On Sun, Aug 25, 2019, 2:11 PM Hiroki Sato <hrs@allbsd.org> wrote: > >>>> Alan Somers <asomers@freebsd.org> wrote > >>>> in <CAOtMX2hLxx=3D > SKvh1ZoiMAcagQJjPaRSvkML9J+BgpQsz5uNNbw@mail.gmail.com>: > >>>> > >>>> as> On Sun, Aug 25, 2019 at 1:22 PM Hiroki Sato <hrs@allbsd.org> > wrote: > >>>> as> > > >>>> as> > Hi, > >>>> as> > > >>>> as> > Alan Somers <asomers@FreeBSD.org> wrote > >>>> as> > in <201908231522.x7NFMLuJ068037@repo.freebsd.org>: > >>>> as> > > >>>> as> > as> Author: asomers > >>>> as> > as> Date: Fri Aug 23 15:22:20 2019 > >>>> as> > as> New Revision: 351423 > >>>> as> > as> URL: https://svnweb.freebsd.org/changeset/base/351423 > >>>> as> > as> > >>>> as> > as> Log: > >>>> as> > as> ping6: Rename options for better consistency with ping > >>>> as> > as> > >>>> as> > as> Now equivalent options have the same flags, and > nonequivalent options have > >>>> as> > as> different flags. This is a prelude to merging the two > commands. > >>>> as> > as> > >>>> as> > as> Submitted by: J=C3=A1n Su=C4=8Dan <sucanjan@gmail.co= m> > >>>> as> > as> MFC: Never > >>>> as> > as> Sponsored by: Google LLC (Google Summer of Code 2019= ) > >>>> as> > as> Differential Revision: > https://reviews.freebsd.org/D21345 > >>>> as> > > >>>> as> > I have an objection on renaming the existing option flags in > ping6(8) > >>>> as> > for compatibility with ping(8). > >>>> as> > > >>>> as> > Is it sufficient to add INET6 support to ping(8) with > consistent > >>>> as> > flags and keep CLI of ping6(8) backward compatible? People > have used > >>>> as> > ping6(8) for >15 years, so it is too late to rename the > flags. I do > >>>> as> > not think the renaming is useful if "ping -6 localhost" or > "ping ::1" > >>>> as> > works. > >>>> as> > > >>>> as> > -- Hiroki > >>>> as> > >>>> as> If ping works with inet6, then why would we want to keep a > separate > >>>> as> tool around? If it's just for the sake of people who don't want > to or > >>>> as> can't update scripts, would a version in ports suffice? > >>>> > >>>> Because removing (or renaming) it causes a POLA violation. Do we > >>>> really have a strong, unavoidable reason to force people to rewrit= e > >>>> their script now? This is still a fairly essential and actively > used > >>>> tool, not like rcp or rlogin. Although deprecating ping6(8) and > >>>> removing it from the base system in the future release at some poi= nt > >>>> may work, changing the existing interface will simply confuse peop= le > >>>> who have used IPv6 for a long time. > >>>> > >>>> In my understanding, the purpose to integrate ping(8) and ping6(8) > >>>> into a single utility is to provide a consistent CLI and reduce > >>>> duplicate code, not to break compatibility. > >>>> > >>>> -- Hiroki > >>> > >>> Those goals are incompatible. We can't provide a consistent CLI > without breaking compatibility because ping and ping6 have conflicting > options. And we can't keep ping6 around while also removing duplicate co= de > because that would be, well, duplicate code. > >>> > >>> When would be a better time than a major version bump to make a chang= e > like this? > >>> > >>> The lack of a ping6 command in freebsd 13 should serve as a pretty > obvious reminder that scripts will need updating. I think that putting a > version of ping6 in ports should be a sufficient crutch for those who nee= d > it, don't you? > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpo%2BiqmnoRmnFH6QbKFpazjzFP36qTLqi65%2Bn-6rySHBw>