Re: svn commit: r368045 - in head: . etc/mtree rescue/rescue sbin sbin/ping sbin/ping/tests sbin/ping6 sbin/ping6/tests tools/build/mk

2020-11-27 Thread Alan Somers
On Fri, Nov 27, 2020 at 5:08 AM Bjoern A. Zeeb <
bzeeb-li...@lists.zabbadoz.net> wrote:

> On 26 Nov 2020, at 18:51, Alan Somers wrote:
>
> > On Thu, Nov 26, 2020 at 2:16 AM Bjoern A. Zeeb <
> > bzeeb-li...@lists.zabbadoz.net> wrote:
> >
> >> On 26 Nov 2020, at 4:29, Alan Somers wrote:
> >>
> >>> Author: asomers
> >>> Date: Thu Nov 26 04:29:30 2020
> >>> New Revision: 368045
> >>> URL: https://svnweb.freebsd.org/changeset/base/368045
> >>>
> >>> Log:
> >>>   Merge ping6 to ping
> >>>
> >>>   There is now a single ping binary, which chooses to use ICMP or
> >>> ICMPv4
> >>>   based on the -4 and -6 options, and the format of the address.
> >>>
> >>>   Submitted by:   Ján Sučan 
> >>>   Sponsored by:   Google LLC (Google Summer of Code 2019)
> >>>   MFC after:  Never
> >>>   Differential Revision:  https://reviews.freebsd.org/D21377
> >>
> >> I don’t have IPv4 anymore.
> >> I don’t see any WITHOUT_INET or -DINET checks.
> >> How can I compile INET out now?
> >>
> >
> > I don't see any such checks before, either.  Was it ever possible to
> > exclude ping by building WITHOUT_INET?
>
> No, for various reasons including startup scripts relying on it etc.
> I think no one ever bothered to fully find it all.
>
> But it was possible to just ditch the binary (not installing it into
> custom images, or rm -f it post-install along with other things).
>
>
> Now it’s a “dual-stack handling” binary and those we’ve tried
> with a lot of care to make sure they grow compiling out both ways as you
> cannot throw away the binary anymore.
>
> I don’t know how hard it is to do this now.  I’ll be happy to have a
> look and help if it’s not a 5 minute job for you knowing the code and
> split up.   Would we just have to handle main.c with #ifdefs and the old
> ping[4] files from the Makefile or is ping6 also using shared code from
> the former ping[4]?
>
>
> /bz
>

Yes, that's about right.  ping.c is the old ping.c, and ping6.c is the old
ping6.c, with main() removed from both.  So it should be pretty easy to
compile out INET.
-Alan
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r368045 - in head: . etc/mtree rescue/rescue sbin sbin/ping sbin/ping/tests sbin/ping6 sbin/ping6/tests tools/build/mk

2020-11-27 Thread Bjoern A. Zeeb

On 26 Nov 2020, at 18:51, Alan Somers wrote:


On Thu, Nov 26, 2020 at 2:16 AM Bjoern A. Zeeb <
bzeeb-li...@lists.zabbadoz.net> wrote:


On 26 Nov 2020, at 4:29, Alan Somers wrote:


Author: asomers
Date: Thu Nov 26 04:29:30 2020
New Revision: 368045
URL: https://svnweb.freebsd.org/changeset/base/368045

Log:
  Merge ping6 to ping

  There is now a single ping binary, which chooses to use ICMP or
ICMPv4
  based on the -4 and -6 options, and the format of the address.

  Submitted by:   Ján Sučan 
  Sponsored by:   Google LLC (Google Summer of Code 2019)
  MFC after:  Never
  Differential Revision:  https://reviews.freebsd.org/D21377


I don’t have IPv4 anymore.
I don’t see any WITHOUT_INET or -DINET checks.
How can I compile INET out now?



I don't see any such checks before, either.  Was it ever possible to
exclude ping by building WITHOUT_INET?


No, for various reasons including startup scripts relying on it etc.
I think no one ever bothered to fully find it all.

But it was possible to just ditch the binary (not installing it into 
custom images, or rm -f it post-install along with other things).



Now it’s a “dual-stack handling” binary and those we’ve tried 
with a lot of care to make sure they grow compiling out both ways as you 
cannot throw away the binary anymore.


I don’t know how hard it is to do this now.  I’ll be happy to have a 
look and help if it’s not a 5 minute job for you knowing the code and 
split up.   Would we just have to handle main.c with #ifdefs and the old 
ping[4] files from the Makefile or is ping6 also using shared code from 
the former ping[4]?



/bz


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r368045 - in head: . etc/mtree rescue/rescue sbin sbin/ping sbin/ping/tests sbin/ping6 sbin/ping6/tests tools/build/mk

2020-11-26 Thread Alan Somers
On Thu, Nov 26, 2020 at 2:16 AM Bjoern A. Zeeb <
bzeeb-li...@lists.zabbadoz.net> wrote:

> On 26 Nov 2020, at 4:29, Alan Somers wrote:
>
> > Author: asomers
> > Date: Thu Nov 26 04:29:30 2020
> > New Revision: 368045
> > URL: https://svnweb.freebsd.org/changeset/base/368045
> >
> > Log:
> >   Merge ping6 to ping
> >
> >   There is now a single ping binary, which chooses to use ICMP or
> > ICMPv4
> >   based on the -4 and -6 options, and the format of the address.
> >
> >   Submitted by:   Ján Sučan 
> >   Sponsored by:   Google LLC (Google Summer of Code 2019)
> >   MFC after:  Never
> >   Differential Revision:  https://reviews.freebsd.org/D21377
>
> I don’t have IPv4 anymore.
> I don’t see any WITHOUT_INET or -DINET checks.
> How can I compile INET out now?
>

I don't see any such checks before, either.  Was it ever possible to
exclude ping by building WITHOUT_INET?


>
>
> Also can we please have a ping6 [binary, compat shell script, or
> hardlink] back which defaults to -6 with appropriate option parsing by
> default?
> People used that in scripts and whatnot for about 20 years (and
> there’s even still stuff in tools in our own tree referencing it).
>

Done.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r368045 - in head: . etc/mtree rescue/rescue sbin sbin/ping sbin/ping/tests sbin/ping6 sbin/ping6/tests tools/build/mk

2020-11-26 Thread Warner Losh
On Thu, Nov 26, 2020, 8:37 AM Alan Somers  wrote:

>
>
>
> > >
>> > >  I think you should add a LINKS=... here so people script which uses
>> > > ping6 won't break (and of course adding support in the code to do ipv6
>> > > ping if progname is ping6 if this isn't the case).
>> > >
>> > >  Cheers,
>> > >
>> > > --
>> > > Emmanuel Vadot 
>> > >
>> >
>> > Yes, that would make sense.  But for how long?  Would the ping6 hard
>> link
>> > stick around forever, or eventually be removed in some future version of
>> > FreeBSD?
>>
>>  I have no opinion on this matter.
>>  But since ping6 was present for a very long time I guess we're stuck
>> with it for a long time too.
>>
>
> Do you have an opinion on whether there should be a /rescue/ping6 link
> too?
>

Yes. It should, imho.

Warner

>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r368045 - in head: . etc/mtree rescue/rescue sbin sbin/ping sbin/ping/tests sbin/ping6 sbin/ping6/tests tools/build/mk

2020-11-26 Thread Emmanuel Vadot
On Thu, 26 Nov 2020 08:37:13 -0700
Alan Somers  wrote:

> > >
> > > >  I think you should add a LINKS=... here so people script which uses
> > > > ping6 won't break (and of course adding support in the code to do ipv6
> > > > ping if progname is ping6 if this isn't the case).
> > > >
> > > >  Cheers,
> > > >
> > > > --
> > > > Emmanuel Vadot 
> > > >
> > >
> > > Yes, that would make sense.  But for how long?  Would the ping6 hard link
> > > stick around forever, or eventually be removed in some future version of
> > > FreeBSD?
> >
> >  I have no opinion on this matter.
> >  But since ping6 was present for a very long time I guess we're stuck
> > with it for a long time too.
> >
> 
> Do you have an opinion on whether there should be a /rescue/ping6 link too?

 I'll be honest I don't use ipv6 at all, I've just noticed this problem
when reading my morning email :)

-- 
Emmanuel Vadot  
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r368045 - in head: . etc/mtree rescue/rescue sbin sbin/ping sbin/ping/tests sbin/ping6 sbin/ping6/tests tools/build/mk

2020-11-26 Thread Alan Somers
> >
> > >  I think you should add a LINKS=... here so people script which uses
> > > ping6 won't break (and of course adding support in the code to do ipv6
> > > ping if progname is ping6 if this isn't the case).
> > >
> > >  Cheers,
> > >
> > > --
> > > Emmanuel Vadot 
> > >
> >
> > Yes, that would make sense.  But for how long?  Would the ping6 hard link
> > stick around forever, or eventually be removed in some future version of
> > FreeBSD?
>
>  I have no opinion on this matter.
>  But since ping6 was present for a very long time I guess we're stuck
> with it for a long time too.
>

Do you have an opinion on whether there should be a /rescue/ping6 link too?
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r368045 - in head: . etc/mtree rescue/rescue sbin sbin/ping sbin/ping/tests sbin/ping6 sbin/ping6/tests tools/build/mk

2020-11-26 Thread Emmanuel Vadot
On Thu, 26 Nov 2020 07:36:37 -0700
Alan Somers  wrote:

> On Thu, Nov 26, 2020 at 1:27 AM Emmanuel Vadot 
> wrote:
> 
> >
> >  Hi Alan,
> >
> > On Thu, 26 Nov 2020 04:29:31 + (UTC)
> > Alan Somers  wrote:
> >
> > > Author: asomers
> > > Date: Thu Nov 26 04:29:30 2020
> > > New Revision: 368045
> > > URL: https://svnweb.freebsd.org/changeset/base/368045
> > >
> > > Log:
> > >   Merge ping6 to ping
> > >
> > >   There is now a single ping binary, which chooses to use ICMP or ICMPv4
> > >   based on the -4 and -6 options, and the format of the address.
> > >
> > >   Submitted by:   Ján Su?an 
> > >   Sponsored by:   Google LLC (Google Summer of Code 2019)
> > >   MFC after:  Never
> > >   Differential Revision:  https://reviews.freebsd.org/D21377
> > >
> > > Added:
> > >   head/sbin/ping/main.c   (contents, props changed)
> > >   head/sbin/ping/main.h   (contents, props changed)
> > >   head/sbin/ping/ping.h   (contents, props changed)
> > >   head/sbin/ping/ping6.c
> > >  - copied, changed from r368010, head/sbin/ping6/ping6.c
> > >   head/sbin/ping/ping6.h   (contents, props changed)
> > >   head/sbin/ping/tests/ping_6_c1_s8_t1.out
> > >  - copied unchanged from r368010,
> > head/sbin/ping6/tests/ping6_c1_s8_t1.out
> > > Deleted:
> > >   head/sbin/ping6/Makefile
> > >   head/sbin/ping6/Makefile.depend
> > >   head/sbin/ping6/ping6.8
> > >   head/sbin/ping6/ping6.c
> > >   head/sbin/ping6/tests/Makefile
> > >   head/sbin/ping6/tests/ping6_c1_s8_t1.out
> > >   head/sbin/ping6/tests/ping6_test.sh
> > > Modified:
> > >   head/ObsoleteFiles.inc
> > >   head/UPDATING
> > >   head/etc/mtree/BSD.tests.dist
> > >   head/rescue/rescue/Makefile
> > >   head/sbin/Makefile
> > >   head/sbin/ping/Makefile
> > >   head/sbin/ping/ping.8
> > >   head/sbin/ping/ping.c
> > >   head/sbin/ping/tests/Makefile
> > >   head/sbin/ping/tests/ping_test.sh
> > >   head/tools/build/mk/OptionalObsoleteFiles.inc
> > >
> > > Modified: head/ObsoleteFiles.inc
> > >
> > ==
> > > --- head/ObsoleteFiles.incThu Nov 26 02:14:52 2020(r368044)
> > > +++ head/ObsoleteFiles.incThu Nov 26 04:29:30 2020(r368045)
> > > @@ -36,6 +36,16 @@
> > >  #   xargs -n1 | sort | uniq -d;
> > >  # done
> > >
> > > +# 20201124: ping6(8) was merged into ping(8)
> > > +OLD_FILES+=sbin/ping6
> > > +OLD_FILES+=rescue/ping6
> > > +OLD_FILES+=usr/lib/debug/sbin/ping6.debug
> > > +OLD_FILES+=usr/share/man/man8/ping6.8.gz
> > > +OLD_FILES+=usr/tests/sbin/ping6/Kyuafile
> > > +OLD_FILES+=usr/tests/sbin/ping6/ping6_c1_s8_t1.out
> > > +OLD_FILES+=usr/tests/sbin/ping6/ping6_test
> > > +OLD_DIRS+=usr/tests/sbin/ping6
> > > +
> > >  # 20201025: Remove cal data files
> > >  OLD_FILES+=usr/share/calendar/calendar.all
> > >  OLD_FILES+=usr/share/calendar/calendar.australia
> > >
> > > Modified: head/UPDATING
> > >
> > ==
> > > --- head/UPDATING Thu Nov 26 02:14:52 2020(r368044)
> > > +++ head/UPDATING Thu Nov 26 04:29:30 2020(r368045)
> > > @@ -26,6 +26,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
> > >   world, or to merely disable the most expensive debugging
> > functionality
> > >   at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
> > >
> > > +20201124:
> > > + ping6 has been merged into ping.  It can now be called as "ping
> > -6".
> > > + See ping(8) for details.
> > > +
> > >  20201108:
> > >   Default value of net.add_addr_allfibs has been changed to 0.
> > >   If you have multi-fib configuration and rely on existence of all
> > >
> > > Modified: head/etc/mtree/BSD.tests.dist
> > >
> > ==
> > > --- head/etc/mtree/BSD.tests.dist Thu Nov 26 02:14:52 2020
> > (r368044)
> > > +++ head/etc/mtree/BSD.tests.dist Thu Nov 26 04:29:30 2020
> > (r368045)
> > > @@ -448,8 +448,6 @@
> > >  ..
> > >  ping
> > >  ..
> > > -ping6
> > > -..
> > >  route
> > >  ..
> > >  ..
> > >
> > > Modified: head/rescue/rescue/Makefile
> > >
> > ==
> > > --- head/rescue/rescue/Makefile   Thu Nov 26 02:14:52 2020
> > (r368044)
> > > +++ head/rescue/rescue/Makefile   Thu Nov 26 04:29:30 2020
> > (r368045)
> > > @@ -103,7 +103,6 @@ CRUNCH_PROGS_sbin+= ccdconfig
> > >  .endif
> > >
> > >  .if ${MK_INET6_SUPPORT} != "no"
> > > -CRUNCH_PROGS_sbin+= ping6
> > >  CRUNCH_PROGS_sbin+= rtsol
> > >  .endif
> > >
> > >
> > > Modified: head/sbin/Makefile
> > >
> > ==
> > > --- head/sbin/MakefileThu Nov 26 02:14:52 2020(r368044)
> > > +++ head/sbin/MakefileThu Nov 26 04:29:30 2020(r368045)
> > > @@ -73,7 +73,6 @@ 

Re: svn commit: r368045 - in head: . etc/mtree rescue/rescue sbin sbin/ping sbin/ping/tests sbin/ping6 sbin/ping6/tests tools/build/mk

2020-11-26 Thread Alan Somers
On Thu, Nov 26, 2020 at 1:27 AM Emmanuel Vadot 
wrote:

>
>  Hi Alan,
>
> On Thu, 26 Nov 2020 04:29:31 + (UTC)
> Alan Somers  wrote:
>
> > Author: asomers
> > Date: Thu Nov 26 04:29:30 2020
> > New Revision: 368045
> > URL: https://svnweb.freebsd.org/changeset/base/368045
> >
> > Log:
> >   Merge ping6 to ping
> >
> >   There is now a single ping binary, which chooses to use ICMP or ICMPv4
> >   based on the -4 and -6 options, and the format of the address.
> >
> >   Submitted by:   Ján Su?an 
> >   Sponsored by:   Google LLC (Google Summer of Code 2019)
> >   MFC after:  Never
> >   Differential Revision:  https://reviews.freebsd.org/D21377
> >
> > Added:
> >   head/sbin/ping/main.c   (contents, props changed)
> >   head/sbin/ping/main.h   (contents, props changed)
> >   head/sbin/ping/ping.h   (contents, props changed)
> >   head/sbin/ping/ping6.c
> >  - copied, changed from r368010, head/sbin/ping6/ping6.c
> >   head/sbin/ping/ping6.h   (contents, props changed)
> >   head/sbin/ping/tests/ping_6_c1_s8_t1.out
> >  - copied unchanged from r368010,
> head/sbin/ping6/tests/ping6_c1_s8_t1.out
> > Deleted:
> >   head/sbin/ping6/Makefile
> >   head/sbin/ping6/Makefile.depend
> >   head/sbin/ping6/ping6.8
> >   head/sbin/ping6/ping6.c
> >   head/sbin/ping6/tests/Makefile
> >   head/sbin/ping6/tests/ping6_c1_s8_t1.out
> >   head/sbin/ping6/tests/ping6_test.sh
> > Modified:
> >   head/ObsoleteFiles.inc
> >   head/UPDATING
> >   head/etc/mtree/BSD.tests.dist
> >   head/rescue/rescue/Makefile
> >   head/sbin/Makefile
> >   head/sbin/ping/Makefile
> >   head/sbin/ping/ping.8
> >   head/sbin/ping/ping.c
> >   head/sbin/ping/tests/Makefile
> >   head/sbin/ping/tests/ping_test.sh
> >   head/tools/build/mk/OptionalObsoleteFiles.inc
> >
> > Modified: head/ObsoleteFiles.inc
> >
> ==
> > --- head/ObsoleteFiles.incThu Nov 26 02:14:52 2020(r368044)
> > +++ head/ObsoleteFiles.incThu Nov 26 04:29:30 2020(r368045)
> > @@ -36,6 +36,16 @@
> >  #   xargs -n1 | sort | uniq -d;
> >  # done
> >
> > +# 20201124: ping6(8) was merged into ping(8)
> > +OLD_FILES+=sbin/ping6
> > +OLD_FILES+=rescue/ping6
> > +OLD_FILES+=usr/lib/debug/sbin/ping6.debug
> > +OLD_FILES+=usr/share/man/man8/ping6.8.gz
> > +OLD_FILES+=usr/tests/sbin/ping6/Kyuafile
> > +OLD_FILES+=usr/tests/sbin/ping6/ping6_c1_s8_t1.out
> > +OLD_FILES+=usr/tests/sbin/ping6/ping6_test
> > +OLD_DIRS+=usr/tests/sbin/ping6
> > +
> >  # 20201025: Remove cal data files
> >  OLD_FILES+=usr/share/calendar/calendar.all
> >  OLD_FILES+=usr/share/calendar/calendar.australia
> >
> > Modified: head/UPDATING
> >
> ==
> > --- head/UPDATING Thu Nov 26 02:14:52 2020(r368044)
> > +++ head/UPDATING Thu Nov 26 04:29:30 2020(r368045)
> > @@ -26,6 +26,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
> >   world, or to merely disable the most expensive debugging
> functionality
> >   at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
> >
> > +20201124:
> > + ping6 has been merged into ping.  It can now be called as "ping
> -6".
> > + See ping(8) for details.
> > +
> >  20201108:
> >   Default value of net.add_addr_allfibs has been changed to 0.
> >   If you have multi-fib configuration and rely on existence of all
> >
> > Modified: head/etc/mtree/BSD.tests.dist
> >
> ==
> > --- head/etc/mtree/BSD.tests.dist Thu Nov 26 02:14:52 2020
> (r368044)
> > +++ head/etc/mtree/BSD.tests.dist Thu Nov 26 04:29:30 2020
> (r368045)
> > @@ -448,8 +448,6 @@
> >  ..
> >  ping
> >  ..
> > -ping6
> > -..
> >  route
> >  ..
> >  ..
> >
> > Modified: head/rescue/rescue/Makefile
> >
> ==
> > --- head/rescue/rescue/Makefile   Thu Nov 26 02:14:52 2020
> (r368044)
> > +++ head/rescue/rescue/Makefile   Thu Nov 26 04:29:30 2020
> (r368045)
> > @@ -103,7 +103,6 @@ CRUNCH_PROGS_sbin+= ccdconfig
> >  .endif
> >
> >  .if ${MK_INET6_SUPPORT} != "no"
> > -CRUNCH_PROGS_sbin+= ping6
> >  CRUNCH_PROGS_sbin+= rtsol
> >  .endif
> >
> >
> > Modified: head/sbin/Makefile
> >
> ==
> > --- head/sbin/MakefileThu Nov 26 02:14:52 2020(r368044)
> > +++ head/sbin/MakefileThu Nov 26 04:29:30 2020(r368045)
> > @@ -73,7 +73,6 @@ SUBDIR.${MK_CCD}+=  ccdconfig
> >  SUBDIR.${MK_CXX}+=   devd
> >  SUBDIR.${MK_HAST}+=  hastctl
> >  SUBDIR.${MK_HAST}+=  hastd
> > -SUBDIR.${MK_INET6}+= ping6
> >  SUBDIR.${MK_INET6}+= rtsol
> >  SUBDIR.${MK_IPFILTER}+=  ipf
> >  SUBDIR.${MK_IPFW}+=  ipfw
> >
> > Modified: head/sbin/ping/Makefile
> >
> 

Re: svn commit: r368045 - in head: . etc/mtree rescue/rescue sbin sbin/ping sbin/ping/tests sbin/ping6 sbin/ping6/tests tools/build/mk

2020-11-26 Thread Bjoern A. Zeeb

On 26 Nov 2020, at 4:29, Alan Somers wrote:


Author: asomers
Date: Thu Nov 26 04:29:30 2020
New Revision: 368045
URL: https://svnweb.freebsd.org/changeset/base/368045

Log:
  Merge ping6 to ping

  There is now a single ping binary, which chooses to use ICMP or 
ICMPv4

  based on the -4 and -6 options, and the format of the address.

  Submitted by: Ján Sučan 
  Sponsored by: Google LLC (Google Summer of Code 2019)
  MFC after:Never
  Differential Revision:https://reviews.freebsd.org/D21377


I don’t have IPv4 anymore.
I don’t see any WITHOUT_INET or -DINET checks.
How can I compile INET out now?


Also can we please have a ping6 [binary, compat shell script, or 
hardlink] back which defaults to -6 with appropriate option parsing by 
default?
People used that in scripts and whatnot for about 20 years (and 
there’s even still stuff in tools in our own tree referencing it).


/bz
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r368045 - in head: . etc/mtree rescue/rescue sbin sbin/ping sbin/ping/tests sbin/ping6 sbin/ping6/tests tools/build/mk

2020-11-26 Thread Emmanuel Vadot


 Hi Alan,

On Thu, 26 Nov 2020 04:29:31 + (UTC)
Alan Somers  wrote:

> Author: asomers
> Date: Thu Nov 26 04:29:30 2020
> New Revision: 368045
> URL: https://svnweb.freebsd.org/changeset/base/368045
> 
> Log:
>   Merge ping6 to ping
>   
>   There is now a single ping binary, which chooses to use ICMP or ICMPv4
>   based on the -4 and -6 options, and the format of the address.
>   
>   Submitted by:   Ján Su?an 
>   Sponsored by:   Google LLC (Google Summer of Code 2019)
>   MFC after:  Never
>   Differential Revision:  https://reviews.freebsd.org/D21377
> 
> Added:
>   head/sbin/ping/main.c   (contents, props changed)
>   head/sbin/ping/main.h   (contents, props changed)
>   head/sbin/ping/ping.h   (contents, props changed)
>   head/sbin/ping/ping6.c
>  - copied, changed from r368010, head/sbin/ping6/ping6.c
>   head/sbin/ping/ping6.h   (contents, props changed)
>   head/sbin/ping/tests/ping_6_c1_s8_t1.out
>  - copied unchanged from r368010, head/sbin/ping6/tests/ping6_c1_s8_t1.out
> Deleted:
>   head/sbin/ping6/Makefile
>   head/sbin/ping6/Makefile.depend
>   head/sbin/ping6/ping6.8
>   head/sbin/ping6/ping6.c
>   head/sbin/ping6/tests/Makefile
>   head/sbin/ping6/tests/ping6_c1_s8_t1.out
>   head/sbin/ping6/tests/ping6_test.sh
> Modified:
>   head/ObsoleteFiles.inc
>   head/UPDATING
>   head/etc/mtree/BSD.tests.dist
>   head/rescue/rescue/Makefile
>   head/sbin/Makefile
>   head/sbin/ping/Makefile
>   head/sbin/ping/ping.8
>   head/sbin/ping/ping.c
>   head/sbin/ping/tests/Makefile
>   head/sbin/ping/tests/ping_test.sh
>   head/tools/build/mk/OptionalObsoleteFiles.inc
> 
> Modified: head/ObsoleteFiles.inc
> ==
> --- head/ObsoleteFiles.incThu Nov 26 02:14:52 2020(r368044)
> +++ head/ObsoleteFiles.incThu Nov 26 04:29:30 2020(r368045)
> @@ -36,6 +36,16 @@
>  #   xargs -n1 | sort | uniq -d;
>  # done
>  
> +# 20201124: ping6(8) was merged into ping(8)
> +OLD_FILES+=sbin/ping6
> +OLD_FILES+=rescue/ping6
> +OLD_FILES+=usr/lib/debug/sbin/ping6.debug
> +OLD_FILES+=usr/share/man/man8/ping6.8.gz
> +OLD_FILES+=usr/tests/sbin/ping6/Kyuafile
> +OLD_FILES+=usr/tests/sbin/ping6/ping6_c1_s8_t1.out
> +OLD_FILES+=usr/tests/sbin/ping6/ping6_test
> +OLD_DIRS+=usr/tests/sbin/ping6
> +
>  # 20201025: Remove cal data files
>  OLD_FILES+=usr/share/calendar/calendar.all
>  OLD_FILES+=usr/share/calendar/calendar.australia
> 
> Modified: head/UPDATING
> ==
> --- head/UPDATING Thu Nov 26 02:14:52 2020(r368044)
> +++ head/UPDATING Thu Nov 26 04:29:30 2020(r368045)
> @@ -26,6 +26,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
>   world, or to merely disable the most expensive debugging functionality
>   at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
>  
> +20201124:
> + ping6 has been merged into ping.  It can now be called as "ping -6".
> + See ping(8) for details.
> +
>  20201108:
>   Default value of net.add_addr_allfibs has been changed to 0.
>   If you have multi-fib configuration and rely on existence of all
> 
> Modified: head/etc/mtree/BSD.tests.dist
> ==
> --- head/etc/mtree/BSD.tests.dist Thu Nov 26 02:14:52 2020
> (r368044)
> +++ head/etc/mtree/BSD.tests.dist Thu Nov 26 04:29:30 2020
> (r368045)
> @@ -448,8 +448,6 @@
>  ..
>  ping
>  ..
> -ping6
> -..
>  route
>  ..
>  ..
> 
> Modified: head/rescue/rescue/Makefile
> ==
> --- head/rescue/rescue/Makefile   Thu Nov 26 02:14:52 2020
> (r368044)
> +++ head/rescue/rescue/Makefile   Thu Nov 26 04:29:30 2020
> (r368045)
> @@ -103,7 +103,6 @@ CRUNCH_PROGS_sbin+= ccdconfig
>  .endif
>  
>  .if ${MK_INET6_SUPPORT} != "no"
> -CRUNCH_PROGS_sbin+= ping6
>  CRUNCH_PROGS_sbin+= rtsol
>  .endif
>  
> 
> Modified: head/sbin/Makefile
> ==
> --- head/sbin/MakefileThu Nov 26 02:14:52 2020(r368044)
> +++ head/sbin/MakefileThu Nov 26 04:29:30 2020(r368045)
> @@ -73,7 +73,6 @@ SUBDIR.${MK_CCD}+=  ccdconfig
>  SUBDIR.${MK_CXX}+=   devd
>  SUBDIR.${MK_HAST}+=  hastctl
>  SUBDIR.${MK_HAST}+=  hastd
> -SUBDIR.${MK_INET6}+= ping6
>  SUBDIR.${MK_INET6}+= rtsol
>  SUBDIR.${MK_IPFILTER}+=  ipf
>  SUBDIR.${MK_IPFW}+=  ipfw
> 
> Modified: head/sbin/ping/Makefile
> ==
> --- head/sbin/ping/Makefile   Thu Nov 26 02:14:52 2020(r368044)
> +++ head/sbin/ping/Makefile   Thu Nov 26 04:29:30 2020(r368045)
> @@ -5,11 +5,17 @@
>  
>  PACKAGE=runtime
>  PROG=ping
> -SRCS=  

svn commit: r368045 - in head: . etc/mtree rescue/rescue sbin sbin/ping sbin/ping/tests sbin/ping6 sbin/ping6/tests tools/build/mk

2020-11-25 Thread Alan Somers
Author: asomers
Date: Thu Nov 26 04:29:30 2020
New Revision: 368045
URL: https://svnweb.freebsd.org/changeset/base/368045

Log:
  Merge ping6 to ping
  
  There is now a single ping binary, which chooses to use ICMP or ICMPv4
  based on the -4 and -6 options, and the format of the address.
  
  Submitted by: Ján Sučan 
  Sponsored by: Google LLC (Google Summer of Code 2019)
  MFC after:Never
  Differential Revision:https://reviews.freebsd.org/D21377

Added:
  head/sbin/ping/main.c   (contents, props changed)
  head/sbin/ping/main.h   (contents, props changed)
  head/sbin/ping/ping.h   (contents, props changed)
  head/sbin/ping/ping6.c
 - copied, changed from r368010, head/sbin/ping6/ping6.c
  head/sbin/ping/ping6.h   (contents, props changed)
  head/sbin/ping/tests/ping_6_c1_s8_t1.out
 - copied unchanged from r368010, head/sbin/ping6/tests/ping6_c1_s8_t1.out
Deleted:
  head/sbin/ping6/Makefile
  head/sbin/ping6/Makefile.depend
  head/sbin/ping6/ping6.8
  head/sbin/ping6/ping6.c
  head/sbin/ping6/tests/Makefile
  head/sbin/ping6/tests/ping6_c1_s8_t1.out
  head/sbin/ping6/tests/ping6_test.sh
Modified:
  head/ObsoleteFiles.inc
  head/UPDATING
  head/etc/mtree/BSD.tests.dist
  head/rescue/rescue/Makefile
  head/sbin/Makefile
  head/sbin/ping/Makefile
  head/sbin/ping/ping.8
  head/sbin/ping/ping.c
  head/sbin/ping/tests/Makefile
  head/sbin/ping/tests/ping_test.sh
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Thu Nov 26 02:14:52 2020(r368044)
+++ head/ObsoleteFiles.inc  Thu Nov 26 04:29:30 2020(r368045)
@@ -36,6 +36,16 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20201124: ping6(8) was merged into ping(8)
+OLD_FILES+=sbin/ping6
+OLD_FILES+=rescue/ping6
+OLD_FILES+=usr/lib/debug/sbin/ping6.debug
+OLD_FILES+=usr/share/man/man8/ping6.8.gz
+OLD_FILES+=usr/tests/sbin/ping6/Kyuafile
+OLD_FILES+=usr/tests/sbin/ping6/ping6_c1_s8_t1.out
+OLD_FILES+=usr/tests/sbin/ping6/ping6_test
+OLD_DIRS+=usr/tests/sbin/ping6
+
 # 20201025: Remove cal data files
 OLD_FILES+=usr/share/calendar/calendar.all
 OLD_FILES+=usr/share/calendar/calendar.australia

Modified: head/UPDATING
==
--- head/UPDATING   Thu Nov 26 02:14:52 2020(r368044)
+++ head/UPDATING   Thu Nov 26 04:29:30 2020(r368045)
@@ -26,6 +26,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
world, or to merely disable the most expensive debugging functionality
at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20201124:
+   ping6 has been merged into ping.  It can now be called as "ping -6".
+   See ping(8) for details.
+
 20201108:
Default value of net.add_addr_allfibs has been changed to 0.
If you have multi-fib configuration and rely on existence of all

Modified: head/etc/mtree/BSD.tests.dist
==
--- head/etc/mtree/BSD.tests.dist   Thu Nov 26 02:14:52 2020
(r368044)
+++ head/etc/mtree/BSD.tests.dist   Thu Nov 26 04:29:30 2020
(r368045)
@@ -448,8 +448,6 @@
 ..
 ping
 ..
-ping6
-..
 route
 ..
 ..

Modified: head/rescue/rescue/Makefile
==
--- head/rescue/rescue/Makefile Thu Nov 26 02:14:52 2020(r368044)
+++ head/rescue/rescue/Makefile Thu Nov 26 04:29:30 2020(r368045)
@@ -103,7 +103,6 @@ CRUNCH_PROGS_sbin+= ccdconfig
 .endif
 
 .if ${MK_INET6_SUPPORT} != "no"
-CRUNCH_PROGS_sbin+= ping6
 CRUNCH_PROGS_sbin+= rtsol
 .endif
 

Modified: head/sbin/Makefile
==
--- head/sbin/Makefile  Thu Nov 26 02:14:52 2020(r368044)
+++ head/sbin/Makefile  Thu Nov 26 04:29:30 2020(r368045)
@@ -73,7 +73,6 @@ SUBDIR.${MK_CCD}+=ccdconfig
 SUBDIR.${MK_CXX}+= devd
 SUBDIR.${MK_HAST}+=hastctl
 SUBDIR.${MK_HAST}+=hastd
-SUBDIR.${MK_INET6}+=   ping6
 SUBDIR.${MK_INET6}+=   rtsol
 SUBDIR.${MK_IPFILTER}+=ipf
 SUBDIR.${MK_IPFW}+=ipfw

Modified: head/sbin/ping/Makefile
==
--- head/sbin/ping/Makefile Thu Nov 26 02:14:52 2020(r368044)
+++ head/sbin/ping/Makefile Thu Nov 26 04:29:30 2020(r368045)
@@ -5,11 +5,17 @@
 
 PACKAGE=runtime
 PROG=  ping
-SRCS=  ping.c utils.c
+SRCS=  main.c ping.c utils.c
 MAN=   ping.8
 BINOWN=root
 BINMODE=4555
 LIBADD=m
+
+.if ${MK_INET6_SUPPORT} != "no"
+CFLAGS+= -DINET6 -DKAME_SCOPEID
+SRCS+= ping6.c
+LIBADD+= md
+.endif
 
 .if ${MK_DYNAMICROOT} == "no"
 .warning ${PROG} built without libcasper support

Added: head/sbin/ping/main.c