Hi Alan and Conrad, I agree with the idea having ping6(8) as a hardlink to ping(8) to provide the historical ping6(8) behavior.
Alan Somers <asom...@freebsd.org> wrote in <CAOtMX2hjaYq+8_S0yXeAJutF2gNy3wgivmvOd=ov-itbyud...@mail.gmail.com>: as> Jan (please keep him CCed on replies) has been musing about the same as> thing. That might satisfy everyone. Jan, would it be straightforward as> to implement? as> -Alan as> as> On Sun, Aug 25, 2019 at 5:51 PM Conrad Meyer <c...@freebsd.org> wrote: as> > as> > Hi Alan, Hiroki, as> > as> > It would be pretty easy to install a `ping6` link to the `ping(8)` as> > binary with different option parsing (conditional on argv[0]). That as> > removes most of the issues of code and space duplication, I think? as> > And the goal would be for the 'ping6' name to retain option as> > compatibility with historical ping6. as> > as> > It's not an uncommon pattern; for example, 'id', 'groups', and as> > 'whoami' are all a single binary with multiple linked names. Another as> > example is Clang, which provides 'cc', 'c++', 'clang', 'clang-cpp', as> > 'clang++' and 'cpp' links to the same inode — and those have very as> > different behavior depending on argv[0]. as> > as> > It's less work than forcing the ping6 compatibility crowd to create a as> > port and doesn't hurt ping(8) much, AFAICT. Is it an acceptable as> > middle ground? as> > as> > Best, as> > Conrad as> > as> > On Sun, Aug 25, 2019 at 1:26 PM alan somers <asom...@gmail.com> wrote: as> > > as> > > On Sun, Aug 25, 2019, 2:11 PM Hiroki Sato <h...@allbsd.org> wrote: as> > >> as> > >> Alan Somers <asom...@freebsd.org> wrote as> > >> in <CAOtMX2hLxx=skvh1zoimacagqjjparsvkml9j+bgpqsz5un...@mail.gmail.com>: as> > >> as> > >> as> On Sun, Aug 25, 2019 at 1:22 PM Hiroki Sato <h...@allbsd.org> wrote: as> > >> as> > as> > >> as> > Hi, as> > >> as> > as> > >> as> > Alan Somers <asom...@freebsd.org> wrote as> > >> as> > in <201908231522.x7nfmluj068...@repo.freebsd.org>: as> > >> as> > as> > >> as> > as> Author: asomers as> > >> as> > as> Date: Fri Aug 23 15:22:20 2019 as> > >> as> > as> New Revision: 351423 as> > >> as> > as> URL: https://svnweb.freebsd.org/changeset/base/351423 as> > >> as> > as> as> > >> as> > as> Log: as> > >> as> > as> ping6: Rename options for better consistency with ping as> > >> as> > as> as> > >> as> > as> Now equivalent options have the same flags, and nonequivalent options have as> > >> as> > as> different flags. This is a prelude to merging the two commands. as> > >> as> > as> as> > >> as> > as> Submitted by: Ján Sučan <sucan...@gmail.com> as> > >> as> > as> MFC: Never as> > >> as> > as> Sponsored by: Google LLC (Google Summer of Code 2019) as> > >> as> > as> Differential Revision: https://reviews.freebsd.org/D21345 as> > >> as> > as> > >> as> > I have an objection on renaming the existing option flags in ping6(8) as> > >> as> > for compatibility with ping(8). as> > >> as> > as> > >> as> > Is it sufficient to add INET6 support to ping(8) with consistent as> > >> as> > flags and keep CLI of ping6(8) backward compatible? People have used as> > >> as> > ping6(8) for >15 years, so it is too late to rename the flags. I do as> > >> as> > not think the renaming is useful if "ping -6 localhost" or "ping ::1" as> > >> as> > works. as> > >> as> > as> > >> as> > -- Hiroki as> > >> as> as> > >> as> If ping works with inet6, then why would we want to keep a separate as> > >> as> tool around? If it's just for the sake of people who don't want to or as> > >> as> can't update scripts, would a version in ports suffice? as> > >> as> > >> Because removing (or renaming) it causes a POLA violation. Do we as> > >> really have a strong, unavoidable reason to force people to rewrite as> > >> their script now? This is still a fairly essential and actively used as> > >> tool, not like rcp or rlogin. Although deprecating ping6(8) and as> > >> removing it from the base system in the future release at some point as> > >> may work, changing the existing interface will simply confuse people as> > >> who have used IPv6 for a long time. as> > >> as> > >> In my understanding, the purpose to integrate ping(8) and ping6(8) as> > >> into a single utility is to provide a consistent CLI and reduce as> > >> duplicate code, not to break compatibility. as> > >> as> > >> -- Hiroki as> > > as> > > as> > > 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 code because that would be, well, duplicate code. as> > > as> > > When would be a better time than a major version bump to make a change like this? as> > > as> > > 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 need it, don't you? as> as> -- Hiroki
pgpPqFZjpkBkt.pgp
Description: PGP signature