dragonfly.git
3 years agodrm: restore pre-Linux 4.10 print functions
François Tigeot [Wed, 15 Jul 2020 09:23:35 +0000 (11:23 +0200)]
drm: restore pre-Linux 4.10 print functions

Newer versions tend to print garbage

3 years agodrm: Update base driver to Linux 4.10.17
François Tigeot [Mon, 13 Jul 2020 21:50:01 +0000 (23:50 +0200)]
drm: Update base driver to Linux 4.10.17

Thanks to Matthew Dillon <dillon@apollo.backplane.com>
for some VM fixes.

3 years agodrm/linux: Do not sleep when not required in schedule_timeout()
François Tigeot [Mon, 13 Jul 2020 05:57:03 +0000 (07:57 +0200)]
drm/linux: Do not sleep when not required in schedule_timeout()

3 years agotftp(1): Fix building with -fno-common
Krzysztof Piecuch [Sat, 11 Jul 2020 17:40:22 +0000 (17:40 +0000)]
tftp(1): Fix building with -fno-common

-fno-common will be default in future compilers (GCC 10, for example).

3 years agofsck(8), fsdb(8): Fix building with -fno-common
Krzysztof Piecuch [Fri, 10 Jul 2020 22:58:31 +0000 (22:58 +0000)]
fsck(8), fsdb(8): Fix building with -fno-common

-fno-common will be default in future compilers (GCC 10, for example).

3 years agodrm/linux: break from wait_event_xxx() loops sooner
François Tigeot [Sun, 12 Jul 2020 07:57:59 +0000 (09:57 +0200)]
drm/linux: break from wait_event_xxx() loops sooner

3 years agodrm/linux: Fix lost wakeup event issues with wait_event_xxx() routines
François Tigeot [Sun, 12 Jul 2020 07:52:15 +0000 (09:52 +0200)]
drm/linux: Fix lost wakeup event issues with wait_event_xxx() routines

Submitted-by: Matthew Dillon <dillon@apollo.backplane.com>
3 years agodrm/linux: Implement module_param() directives
François Tigeot [Sun, 12 Jul 2020 07:30:37 +0000 (09:30 +0200)]
drm/linux: Implement module_param() directives

* Properly define KBUILD_MODNAME where required

* Rewrite linux/moduleparam.h, Automatically generate suitable
  TUNABLE_INT() directives

3 years agodrm/linux: Import the radix-tree code from FreeBSD
François Tigeot [Sun, 12 Jul 2020 05:20:52 +0000 (07:20 +0200)]
drm/linux: Import the radix-tree code from FreeBSD

3 years agolibexec/dma: split body of mails not respecting RFC5322
Daniel Fojt [Sat, 11 Jul 2020 17:43:00 +0000 (19:43 +0200)]
libexec/dma: split body of mails not respecting RFC5322

When receiving mails with body not respecting RFC5322 [1] (may happen
with automatically generated mails, for example from cron(8)), try to
split by words finding the last space before 1000's character. If this
fails, then simply refuse to further receive and process such input.

Taken from: FreeBSD (revision 326641)
Discussed with: Sascha Wildner

[1] https://tools.ietf.org/html/rfc5322#section-2.1.1

3 years agodrm/linux: Fix an unlock without lock issue in dma_fence_default_wait()
François Tigeot [Sat, 11 Jul 2020 10:54:04 +0000 (12:54 +0200)]
drm/linux: Fix an unlock without lock issue in dma_fence_default_wait()

3 years agodrm/linux: fix races in the ww mutex code that can cause lockups
François Tigeot [Sat, 11 Jul 2020 09:58:18 +0000 (11:58 +0200)]
drm/linux: fix races in the ww mutex code that can cause lockups

Submitted-by: Matthew Dillon <dillon@apollo.backplane.com>
3 years agowsp(4): Clean up the Makefile.
Sascha Wildner [Fri, 10 Jul 2020 20:19:05 +0000 (22:19 +0200)]
wsp(4): Clean up the Makefile.

3 years agodump(8), restore(8): Fix building with -fno-common
Krzysztof Piecuch [Thu, 9 Jul 2020 21:23:18 +0000 (21:23 +0000)]
dump(8), restore(8): Fix building with -fno-common

-fno-common will be default in future compilers (GCC 10, for example).

taken-from: freebsd/freebsd@1e06b254773895e61b246dccbf418fd5c444d93a

3 years agolibexec/dma: upgrade from 0.9+ to 0.13+
Daniel Fojt [Fri, 10 Jul 2020 09:04:55 +0000 (11:04 +0200)]
libexec/dma: upgrade from 0.9+ to 0.13+

Summary of changes:

- use proper sysexits(3) codes
- handle getaddrinfo() failures for SMARTHOSTS gracefully
- improve authentication
- use space instead of tab in "From " separator
- improve logging
- refactor dma-mbox-create to use a /var/mail directory fd
- don't limit TLS client to TLSv1
- make MASQUERADE config setting override -f
- add support for RFC976 From_ lines
- add option to verify server certificate fingerprint
- fix RCPT TO to be compliant with RFC5321
- rename SECURETRANS option to SECURETRANSFER

For a complete commit history see:
https://github.com/corecode/dma/commits/master

3 years agoBring in FreeBSD's wsp(4), for Wellspring touchpads on Apple laptops.
Sascha Wildner [Thu, 9 Jul 2020 18:57:39 +0000 (20:57 +0200)]
Bring in FreeBSD's wsp(4), for Wellspring touchpads on Apple laptops.

This commit also removes ums(4) from the default kernel config file,
because it would otherwise claim this device. It is safe to remove,
and in fact FreeBSD also doesn't have it in their GENERIC, because
devd(8) will properly take care of loading the appropriate modules
for both ums(4) and wsp(4) and starting a moused(8).

Taken-from: FreeBSD
Tested-by: Patrick McDonough <~patrick/dfly@awk.is>
3 years agoUpgrade liblzma and xz(1). 2/2
Daniel Fojt [Thu, 9 Jul 2020 07:59:27 +0000 (09:59 +0200)]
Upgrade liblzma and xz(1). 2/2

Update README.{DELETED,DRAGONFLY}.

3 years agoUpgrade liblzma and xz(1). 1/2
Daniel Fojt [Thu, 9 Jul 2020 07:58:27 +0000 (09:58 +0200)]
Upgrade liblzma and xz(1). 1/2

Merge branch 'vendor/XZ' into master.

3 years agovendor/xz: upgrade from 5.2.4 to 5.2.5
Daniel Fojt [Wed, 8 Jul 2020 14:11:32 +0000 (16:11 +0200)]
vendor/xz: upgrade from 5.2.4 to 5.2.5

liblzma:
  - fixed several C99/C11 conformance bugs
  - added a very minor encoder speed optimization

xz:
  - fixed a crash in "xz -dcfv not_an_xz_file"
  - fixes for --flush-timeout

For details see NEWS.

3 years agojail.8: Fix display issue.
Sascha Wildner [Tue, 7 Jul 2020 08:22:31 +0000 (10:22 +0200)]
jail.8: Fix display issue.

The single quote at the start of a line caused mandoc(1) to ignore this
line completely. Not sure if this is correct behavior. Anyway, marking
up is a better choice.

Reported-by: Peeter Must
3 years agosbin/newfs_msdos: Add getchunksize()
Tomohiro Kusumi [Sun, 5 Jul 2020 04:33:29 +0000 (13:33 +0900)]
sbin/newfs_msdos: Add getchunksize()

from freebsd/freebsd@56d12eedec13c8b048eb729fe39078c8fb226b83

3 years agosbin/newfs_msdos: Gather writes to larger chunks (MAXPHYS)
Tomohiro Kusumi [Sun, 5 Jul 2020 02:40:53 +0000 (11:40 +0900)]
sbin/newfs_msdos: Gather writes to larger chunks (MAXPHYS)

from freebsd/freebsd@12cee841c6321be3959d19b54910d3afc750f096

3 years agosys/vfs/msdosfs: Implement VFS_STATVFS()
Tomohiro Kusumi [Sat, 4 Jul 2020 15:14:25 +0000 (00:14 +0900)]
sys/vfs/msdosfs: Implement VFS_STATVFS()

3 years agotest/test: oh well
Antonio Huete Jimenez [Sat, 4 Jul 2020 01:30:52 +0000 (03:30 +0200)]
test/test: oh well

3 years agotest/test: third?
Antonio Huete Jimenez [Sat, 4 Jul 2020 01:29:13 +0000 (03:29 +0200)]
test/test: third?

3 years agotest/test: second try
Antonio Huete Jimenez [Sat, 4 Jul 2020 01:26:11 +0000 (03:26 +0200)]
test/test: second try

3 years agotest/test: tinyurl y u no workie?
Antonio Huete Jimenez [Sat, 4 Jul 2020 01:09:40 +0000 (03:09 +0200)]
test/test: tinyurl y u no workie?

3 years ago<sys/cdefs.h>: Move various defines to <sys/systm.h> where they belong.
Sascha Wildner [Fri, 3 Jul 2020 23:20:35 +0000 (01:20 +0200)]
<sys/cdefs.h>: Move various defines to <sys/systm.h> where they belong.

Namely, __exclusive_cache_line, __read_frequently and __read_mostly.

While here, fix some whitespace.

No functional changes.

3 years agolibc/strxfrm: Remove an unneeded declaration.
Sascha Wildner [Fri, 3 Jul 2020 23:22:46 +0000 (01:22 +0200)]
libc/strxfrm: Remove an unneeded declaration.

The prototype comes in by including <string.h>.

3 years agosystimer.9: Fix for recent systimer work.
Sascha Wildner [Fri, 3 Jul 2020 13:53:27 +0000 (15:53 +0200)]
systimer.9: Fix for recent systimer work.

3 years agoefivar.3: Fix efi_set_variable() prototype.
Sascha Wildner [Fri, 3 Jul 2020 13:53:14 +0000 (15:53 +0200)]
efivar.3: Fix efi_set_variable() prototype.

3 years agoMerge branch vendor/AWK into master.
Daniel Fojt [Fri, 3 Jul 2020 08:23:05 +0000 (10:23 +0200)]
Merge branch vendor/AWK into master.

3 years agovendor/awk: upgrade from 20200612 to 20200702
Daniel Fojt [Fri, 3 Jul 2020 08:16:13 +0000 (10:16 +0200)]
vendor/awk: upgrade from 20200612 to 20200702

Bugfixes and maintenance:

- rename dprintf to DPRINTF and use C99 cpp variadic arguments
- fixed backslash not matching against [[:punct:]] (and other
  similar character classes)
- fixed concatenation regression
- fixed regression with changed SUBSEP in subscript

For details, see FIXES, or commit history at
https://github.com/onetrueawk/awk/commits/master

3 years agotun/tap: Don't repeat ifnet_attach_event and IFAN_ARRAIVAL
Aaron LI [Sun, 28 Jun 2020 15:20:53 +0000 (23:20 +0800)]
tun/tap: Don't repeat ifnet_attach_event and IFAN_ARRAIVAL

* The if_attach() called in tuncreate() already invokes
  'ifnet_attach_event' and announces IFAN_ARRAIVAL;
* The ether_ifattach() called in tapcreate() invokes if_attach() and
  thus would also do the above.

3 years agotun/tap: Use make_only_dev() for the autoclone device
Aaron LI [Sun, 28 Jun 2020 15:06:33 +0000 (23:06 +0800)]
tun/tap: Use make_only_dev() for the autoclone device

It's recommended and more correct to use make_only_dev() for the
autoclone device, because the later open action will call
devfs_spec_open() to create the device node in '/dev'.  See also the
make_autoclone_dev(9) man page.

Because the device created by make_only_dev() doesn't appear in '/dev',
devfs_find_device_by_name() cannot find it.  Therefore, we need to pass
the cdev_t returned by make_only_dev() to if_clone_create() so that the
{tun,tap}_clone_create() can get the device to create the tun/tap
interface.

Reviewed-by: dillon
3 years agoif_clone: Extend if_clone_create() by an extra parameter
Aaron LI [Thu, 2 Jul 2020 14:47:27 +0000 (22:47 +0800)]
if_clone: Extend if_clone_create() by an extra parameter

Currently, if_clone_create() accepts one caddr_t parameter that is
passed with the ifreq->ifr_data for the SIOCIFCREATE2 ioctl.

Extend this function by another caddr_t parameter so that callers could
pass extra data to the ifc->ifc_create() handler and won't conflict with
the SIOCIFCREATE2 ioctl calls.  This extension will be used by tun(4)
and tap(4) in a following commit.

Suggested-by: dillon
Reviewed-by: dillon
3 years agokernel/rtsock: Add a little whitespace.
Sascha Wildner [Thu, 2 Jul 2020 17:32:23 +0000 (19:32 +0200)]
kernel/rtsock: Add a little whitespace.

3 years agodhcpcd: Update README.DRAGONFLY
Roy Marples [Thu, 2 Jul 2020 14:12:08 +0000 (15:12 +0100)]
dhcpcd: Update README.DRAGONFLY

3 years agoMerge branch 'vendor/DHCPCD'
Roy Marples [Thu, 2 Jul 2020 14:10:15 +0000 (15:10 +0100)]
Merge branch 'vendor/DHCPCD'

3 years agodhcpcd: Update to version 9.1.3 with the following changes:
Roy Marples [Thu, 2 Jul 2020 14:08:00 +0000 (15:08 +0100)]
dhcpcd: Update to version 9.1.3 with the following changes:

 * inet6: Add support for reporting Mobile IPv6 RA's
 * inet6: Report RA Proxy flag if set
 * privsep: Don't handle any signals meant for the main process
 * eloop: Try and survive a signal storm
 * dhcpcd: Add an option to poll the interface carrier state
 * script: Make visible some link level parameters to lease dumping
 * inet6: Don't regen temp addresses we didn't add
 * privsep: Don't limit file writes if logging to a file
 * DHCP6: Fix lease timings with nodelay option

3 years agoroute: Ensure sockaddrs have valid lengths for RO_MISSFILTER.
Roy Marples [Thu, 2 Jul 2020 12:40:41 +0000 (13:40 +0100)]
route: Ensure sockaddrs have valid lengths for RO_MISSFILTER.

Taken from NetBSD

3 years agosystat(1): Fix building with -fno-common.
Sascha Wildner [Tue, 30 Jun 2020 21:11:15 +0000 (23:11 +0200)]
systat(1): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years ago<sys/sockio.h>: Sort SIOC[SG]DRVSPEC better.
Sascha Wildner [Tue, 30 Jun 2020 18:03:30 +0000 (20:03 +0200)]
<sys/sockio.h>: Sort SIOC[SG]DRVSPEC better.

3 years agomake_autoclone_dev.9: Improve some description and markups
Aaron LI [Tue, 30 Jun 2020 15:53:55 +0000 (23:53 +0800)]
make_autoclone_dev.9: Improve some description and markups

3 years ago<sys/cdefs.h>: FWIW, add __unreachable from FreeBSD.
Sascha Wildner [Tue, 30 Jun 2020 12:31:23 +0000 (14:31 +0200)]
<sys/cdefs.h>: FWIW, add __unreachable from FreeBSD.

3 years agoRemove bsd.doc.mk via 'make upgrade'.
Sascha Wildner [Sun, 28 Jun 2020 21:06:17 +0000 (23:06 +0200)]
Remove bsd.doc.mk via 'make upgrade'.

3 years agoindent(1): fix building with -fno-common
Krzysztof Piecuch [Sun, 28 Jun 2020 10:35:29 +0000 (10:35 +0000)]
indent(1): fix building with -fno-common

Taken-from: freebsd/freebsd@e08f7da38459b29b19fd5766eb68864e203a1c93

-fno-common will be default in future compilers (GCC 10, for example).

3 years agosysvipcd(8): Fix building with -fno-common.
Sascha Wildner [Sun, 28 Jun 2020 09:23:38 +0000 (11:23 +0200)]
sysvipcd(8): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agopfctl(8): Fix building with -fno-common.
Sascha Wildner [Sun, 28 Jun 2020 09:23:14 +0000 (11:23 +0200)]
pfctl(8): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agomfiutil(8): Fix building with -fno-common.
Sascha Wildner [Sun, 28 Jun 2020 09:22:42 +0000 (11:22 +0200)]
mfiutil(8): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

This removes some redundant code.

Taken-from: FreeBSD

3 years agoinstaller(8): Fix building with -fno-common.
Sascha Wildner [Sun, 28 Jun 2020 09:22:04 +0000 (11:22 +0200)]
installer(8): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agotruss(1): Fix building with -fno-common.
Sascha Wildner [Sun, 28 Jun 2020 09:21:26 +0000 (11:21 +0200)]
truss(1): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agotop(1): Fix building with -fno-common.
Sascha Wildner [Sun, 28 Jun 2020 09:20:57 +0000 (11:20 +0200)]
top(1): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agoyp*(8): Fix building with -fno-common.
Sascha Wildner [Sun, 28 Jun 2020 09:20:19 +0000 (11:20 +0200)]
yp*(8): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agoetc/devd: recognize wireless network adapters
Daniel Fojt [Sun, 28 Jun 2020 07:10:56 +0000 (09:10 +0200)]
etc/devd: recognize wireless network adapters

Extend default devd(8) configuration to recognize wireless network
adapters, and automatically create child wlanX interfaces on attach.
Interfaces are created either according to rc.conf(5) or, in case
particular wireless device is not configured there, first unused
wlan is created for it.

Note: newly created wlan interface is not automatically brought up
and connected to any network. If such behaviour is desired, both
dhcpcd(8) and wpa_supplicant(8) (in interface matching mode) have to
be running (dhcpcd_enable and wpa_supplicant_enable in rc.conf(5)).

Discussed with: Sascha Wildner

3 years agoetc/devd: revise default devd.conf(5)
Daniel Fojt [Sun, 28 Jun 2020 07:05:29 +0000 (09:05 +0200)]
etc/devd: revise default devd.conf(5)

Revise $wifi-driver-regex and drop all drivers not supported on DragonFly.

Suggested by: Sascha Wildner

3 years agoRevert "libtelnet/telnetd(8): Fix building with -fno-common."
Sascha Wildner [Sat, 27 Jun 2020 21:30:41 +0000 (23:30 +0200)]
Revert "libtelnet/telnetd(8): Fix building with -fno-common."

This reverts commit e311a593a0939bb6b4c1f0de9ff58675c7c1403e.

Needs further work, because it broke building telnet(8).

3 years agolocate(1): Fix building with -fno-common.
Sascha Wildner [Sat, 27 Jun 2020 20:55:48 +0000 (22:55 +0200)]
locate(1): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agoiscontrol(8): Fix building with -fno-common.
Sascha Wildner [Sat, 27 Jun 2020 20:55:18 +0000 (22:55 +0200)]
iscontrol(8): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years ago<efivar-dp.h>: Include <sys/types.h> to be self sufficient.
Sascha Wildner [Sat, 27 Jun 2020 19:06:54 +0000 (21:06 +0200)]
<efivar-dp.h>: Include <sys/types.h> to be self sufficient.

3 years agomake_autoclone_dev.9: Several minor improvements
Aaron LI [Sat, 27 Jun 2020 13:30:28 +0000 (21:30 +0800)]
make_autoclone_dev.9: Several minor improvements

* Remove the mention of private function 'devfs_clone_bitmap_fff()'.
* Adjust the wording about the clone handler.
* Add 'SEE ALSO' section to mention 'make_dev()', 'make_only_dev()',
  etc.

3 years agomake_autoclone_dev.9: Better describe devfs_clone_bitmap_get()
Aaron LI [Sat, 27 Jun 2020 13:28:22 +0000 (21:28 +0800)]
make_autoclone_dev.9: Better describe devfs_clone_bitmap_get()

* Describe the 'limit' argument.
* Describe the return value.
* Adjust the description order of this function to align with 'SYNOPSIS'
  section.

3 years agomake_dev.9: Describe a bit more about make_only_dev()
Aaron LI [Sat, 27 Jun 2020 13:23:33 +0000 (21:23 +0800)]
make_dev.9: Describe a bit more about make_only_dev()

* Describe a bit more about the usage of make_only_dev(), mentioning
  make_autoclone_dev(),  also improve a sensence about this function.
* Fix a missing function markup to 'make_dev()'.
* Add 'SEE ALSO' section to mention devfs(5) and make_autoclone_dev(9).

3 years agoif_tap: Remove a debug message
Aaron LI [Sat, 27 Jun 2020 13:21:53 +0000 (21:21 +0800)]
if_tap: Remove a debug message

3 years agotun/tap: Use if_clone framework to clone from autoclone device
Aaron LI [Sat, 27 Jun 2020 13:11:50 +0000 (21:11 +0800)]
tun/tap: Use if_clone framework to clone from autoclone device

Before this change, the clone methods from autoclone device and if_clone
is quite different, so the allocated device unit numbers are not synced
between them, and the default interface group is not added for the
interfaces created via the autoclone device.

For example: tinc/openvpn will open '/dev/tun' to clone a device
'/dev/tun0' and an interface 'tun0', but the 'tun0' interface doesn't
own the 'tun' default group.  And then, 'ifconfig tun create' will fail
with 'SIOCIFCREATE2: File exists'.

Fix the above conflicts/inconsistencies by using the same if_clone logic
for device cloning from the autoclone device.  Now the two clone methods
are consistent and can be mix used.

Bug: https://bugs.dragonflybsd.org/issues/3230

3 years agotun/tap: Return EEXIST in clone creation if softc found
Aaron LI [Sat, 27 Jun 2020 12:05:33 +0000 (20:05 +0800)]
tun/tap: Return EEXIST in clone creation if softc found

With the old logic, an existing softc (e.g., created by cloning via
autoclone device) may be used and then be modified later, which should
be better avoided.

3 years agoif_clone: Fix a missing allocated unit free upon error
Aaron LI [Sat, 27 Jun 2020 11:36:11 +0000 (19:36 +0800)]
if_clone: Fix a missing allocated unit free upon error

3 years agotun/tap: Fix errno NODEV to NOENT in clone creation
Aaron LI [Sat, 27 Jun 2020 11:23:00 +0000 (19:23 +0800)]
tun/tap: Fix errno NODEV to NOENT in clone creation

I was thinking 'NODEV' means 'no such device' but it actually means
'operation not supported by device'...  So change this errno to 'NOENT'.

While there, adjust the code a bit in if_tap.c to align with if_tun.c.

3 years agotun/tap: Do not flag cloned interface as manually made
Aaron LI [Sat, 27 Jun 2020 03:43:00 +0000 (11:43 +0800)]
tun/tap: Do not flag cloned interface as manually made

Similar to the devices cloned via the autocloner device (i.e., /dev/tun,
/dev/tap), don't flag devices cloned via interface cloning as manually
made.  Only explicitly opened devices are flagged as manually made.

3 years agovknetd(8): Minor style improvements
Aaron LI [Thu, 30 Aug 2018 13:08:13 +0000 (21:08 +0800)]
vknetd(8): Minor style improvements

3 years agolibthread_xu: Fix building with -fno-common.
Sascha Wildner [Sat, 27 Jun 2020 13:30:42 +0000 (15:30 +0200)]
libthread_xu: Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agocamcontrol(8): Fix building with -fno-common.
Sascha Wildner [Sat, 27 Jun 2020 13:29:23 +0000 (15:29 +0200)]
camcontrol(8): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agortld(1): Fix building with -fno-common.
Sascha Wildner [Sat, 27 Jun 2020 13:29:05 +0000 (15:29 +0200)]
rtld(1): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agolibtelnet/telnetd(8): Fix building with -fno-common.
Sascha Wildner [Sat, 27 Jun 2020 13:27:50 +0000 (15:27 +0200)]
libtelnet/telnetd(8): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agocsh(1): Fix building with -fno-common.
Sascha Wildner [Sat, 27 Jun 2020 13:27:17 +0000 (15:27 +0200)]
csh(1): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agosh(1): Fix building with -fno-common.
Sascha Wildner [Sat, 27 Jun 2020 13:26:56 +0000 (15:26 +0200)]
sh(1): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agopax(1): Fix building with -fno-common.
Sascha Wildner [Sat, 27 Jun 2020 13:26:43 +0000 (15:26 +0200)]
pax(1): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agolibc: Fix building with -fno-common.
Sascha Wildner [Sat, 27 Jun 2020 13:25:08 +0000 (15:25 +0200)]
libc: Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agoconfig(8): Fix building with -fno-common.
Sascha Wildner [Sat, 27 Jun 2020 13:20:18 +0000 (15:20 +0200)]
config(8): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agomake(1): Fix building with -fno-common.
Sascha Wildner [Sat, 27 Jun 2020 13:19:19 +0000 (15:19 +0200)]
make(1): Fix building with -fno-common.

-fno-common will be default in future compilers (GCC 10, for example).

3 years agoSync various games with NetBSD, in order to fix building with -fno-common.
Sascha Wildner [Sat, 27 Jun 2020 11:57:03 +0000 (13:57 +0200)]
Sync various games with NetBSD, in order to fix building with -fno-common.

Namely, adventure(6), backgammon(6), battlestar(6), hack(6) and trek(6).

-fno-common will be default in future compilers (GCC 10, for example).

3 years agoshare/doc: Remove documents that we haven't been installing for ages.
Sascha Wildner [Sat, 27 Jun 2020 10:53:05 +0000 (12:53 +0200)]
share/doc: Remove documents that we haven't been installing for ages.

While all of those are old and some of them are quite outdated, some
others are actually still useful and have information that is not
contained in any manual page (such as information on the internals
of config(8), for example). But since we haven't been installing them
since 15 years now (see ce233c472eb2cc66b348daa45965ffeb85ad7fe1) and
they are archived elsewhere and easily findable on the web, remove
them from our tree.

Also, they would need groff in base to build, which is no longer the
case in DragonFly since 1419a4e1759b9901ee3a1d147d0f7bee0394d6f3.

See for example https://docs.freebsd.org/44doc/ for FreeBSD's
archive.

3 years agoUpgrade libarchive, bsdcat(1), bsdcpio(1) and bsdtar(1). 2/2
Daniel Fojt [Sat, 27 Jun 2020 10:21:08 +0000 (12:21 +0200)]
Upgrade libarchive, bsdcat(1), bsdcpio(1) and bsdtar(1). 2/2

- update README.DRAGONFLY
- extend Symbol.map and Versions.def
- adapt Makefile
- regenerate config.h

3 years agoUpgrade libarchive, bsdcat(1), bsdcpio(1) and bsdtar(1). 1/2
Daniel Fojt [Sat, 27 Jun 2020 10:19:57 +0000 (12:19 +0200)]
Upgrade libarchive, bsdcat(1), bsdcpio(1) and bsdtar(1). 1/2

Merge branch vendor/LIBARCHIVE into master.

3 years agovendor/libarchive: upgrade from 3.3.3 to 3.4.3
Daniel Fojt [Sat, 27 Jun 2020 10:18:46 +0000 (12:18 +0200)]
vendor/libarchive: upgrade from 3.3.3 to 3.4.3

Fixes CVE-2019-18408.

New features:
- support for pzstd compressed files
- support for RHT.security.selinux tar extended attribute
- atomic file extraction support (bsdtar -x --safe-writes)
- unicode filename support for reading lha/lzh archives
- new pax write option "xattrhdr"
- read support for RAR 5.0 archives
- read support for ZIPX archives with xz, lzma, ppmd8 and bzip2
  compression
- support for non-recursive list and extract
- new tar option: --exclude-vcs
- 64-bit ar format support

Bugfixes:
- use-after-free in a certain ARCHIVE_FAILED situation
- various zstd fixes and improvements
- child process handling fixes
- compression buffer fix in XAR writer
- fix for uname and gname longer than 32 characters in PAX writer
- fix segfault when archiving hard links in ISO9660 and XAR writers
- fix support for extracting 7z archive entries with Delta filter
- security fixes and optimizations to write filter logic
- security fix related to use of readlink(2)
- sparse file handling fixes
- fix reading Android APK archives
- fix problems related to unreadable directories
- patches from OpenBSD to libarchive_fe/passphrase.c
- support extracting ACLs with in-entry comments
- support extracting extattrs as non-root on non-user-writable files
- various resource leak, use-after-free and crash fixes

For details, see release notes or commit history on github:
https://github.com/libarchive/libarchive/wiki/ReleaseNotes

3 years agoFix various typos: a -> an
Sascha Wildner [Sat, 27 Jun 2020 09:40:58 +0000 (11:40 +0200)]
Fix various typos: a -> an

3 years agoshare/mk/bsd.README: Add some info about bsd.host{libs,prog}.mk.
Sascha Wildner [Sat, 27 Jun 2020 09:11:33 +0000 (11:11 +0200)]
share/mk/bsd.README: Add some info about bsd.host{libs,prog}.mk.

3 years agoshare/mk/bsd.README: Remove reference to pmake documentation.
Sascha Wildner [Sat, 27 Jun 2020 09:06:05 +0000 (11:06 +0200)]
share/mk/bsd.README: Remove reference to pmake documentation.

We've since switched to bmake.

3 years agotraceroute.8: Mention ping6(8) and traceroute6(8)
Aaron LI [Fri, 26 Jun 2020 14:45:21 +0000 (22:45 +0800)]
traceroute.8: Mention ping6(8) and traceroute6(8)

3 years agoping.8: Mention ping6(8) and traceroute6(8)
Aaron LI [Fri, 26 Jun 2020 14:43:28 +0000 (22:43 +0800)]
ping.8: Mention ping6(8) and traceroute6(8)

3 years agoipfw3: Fix several comments and error messages
Aaron LI [Thu, 14 Feb 2019 07:28:02 +0000 (15:28 +0800)]
ipfw3: Fix several comments and error messages

3 years agoifconfig(8): Support to filter output by interface groups
Aaron LI [Fri, 26 Jun 2020 14:34:43 +0000 (22:34 +0800)]
ifconfig(8): Support to filter output by interface groups

Add options '-g <match_group>' and '-G <no_group>' to select and
unselect interfaces by groups in the output of 'ifconfig -a', just
like the existing '-d' and '-u' options to select only interfaces
that are down or up, respectively.  Note that '-g' and '-G' options
can be used at the same time to apply both conditions and their
arguments may contain shell patterns.

Examples:
* To exclude loopback from the list:
      ifconfig -a -G lo
* To list interfaces whose group names begin with 't':
      ifconfig -a -g 't*'

Obtained from FreeBSD (revision 361790; review D25029)

3 years agoifconfig.8: Update to show '-d' and '-u' is mutually exclusive
Aaron LI [Fri, 26 Jun 2020 14:21:56 +0000 (22:21 +0800)]
ifconfig.8: Update to show '-d' and '-u' is mutually exclusive

3 years agoifconfig(8): Speed up non-status operations to a single interface
Aaron LI [Fri, 26 Jun 2020 13:38:11 +0000 (21:38 +0800)]
ifconfig(8): Speed up non-status operations to a single interface

When performing a non-status operation on a single interface (e.g., set
address or flags), it is not necessary for ifconfig(8) to build a list
of all addresses in the system, sort them, and then iterate through them
to look for the single interface of interest.

Obtained from FreeBSD (revision 343535; review D18919)

3 years agoifconfig(8): Group addresses of each interface by family
Aaron LI [Fri, 26 Jun 2020 12:56:17 +0000 (20:56 +0800)]
ifconfig(8): Group addresses of each interface by family

Group the list of addresses associated with an interface by the address
family.  A stable sorting algorithm is employed here to preserve the
order of addresses inside a single group of each interface.

Obtained from FreeBSD (revisions 278080 and 278107).

3 years agoifconfig(8): Use getifaddrs(3) from libc
Aaron LI [Fri, 26 Jun 2020 09:59:53 +0000 (17:59 +0800)]
ifconfig(8): Use getifaddrs(3) from libc

Use libc's getifaddrs(3) instead of implementing its own version.

Obtained from FreeBSD (revisions 166956 and 199770); with minor
adjustments.

While there, also adjust some styles.

3 years agoifconfig(8): Use correct interface name when setting flags
Aaron LI [Fri, 26 Jun 2020 07:53:07 +0000 (15:53 +0800)]
ifconfig(8): Use correct interface name when setting flags

Obtained from FreeBSD (revision 187253).

With this change, the comment to setifflags() is now obsolete, so remove
it.  While there, improve styles a bit.

3 years agoifconfig(8): Add '-f' option to print in more formats
Aaron LI [Fri, 26 Jun 2020 06:02:58 +0000 (14:02 +0800)]
ifconfig(8): Add '-f' option to print in more formats

* Add the '-f' option to control the output formats of addresses,
  inet (IPv4) subnet masks, inet6 (IPv6) prefix length, Ethernet (MAC)
  address.  The following output formats are supported:

  - address: numeric (default), host, FQDN
  - inet (IPv4) subnet masks: CIDR, dotted-quad, and traditional hex
    output (default)
  - inet6 (IPv6) prefix length: CIDR, traditional integer format
    (default)
  - ether (MAC address): colon-separated (default), dash-separated

* The 'IFCONFIG_FORMAT' environment variable has the same usage as the
  '-f' option and can be overrided by the latter.

* Some minor cleanups.

Obtained from FreeBSD (revisions 301059 and 301185; review D2856), but
with my own minor modifications.

3 years agoifconfig(8): Print more WPS attributes in verbose "list scan" output
Aaron LI [Tue, 5 May 2020 02:58:20 +0000 (10:58 +0800)]
ifconfig(8): Print more WPS attributes in verbose "list scan" output

* Move WPS-related defines to a dedicated file
  <netproto/802_11/ieee80211_wps.h>
* Add handlers for more WPS attributes

Obtained-from: FreeBSD (revision 343204)

3 years agoifconfig(8): Eliminate trailing whitespace on inet6 and group lines
Aaron LI [Sun, 12 Apr 2020 13:53:32 +0000 (21:53 +0800)]
ifconfig(8): Eliminate trailing whitespace on inet6 and group lines

Obtained from FreeBSD:
https://github.com/freebsd/freebsd/commit/edcbc8f7441a32ec27fb2e57542bf291cb01029e
https://reviews.freebsd.org/D19004