Commit Graph

5029 Commits

Author SHA1 Message Date
Ed Maste
aa8ae5fe17 git hooks: add "Fixes" trailer to commit message template
A number of projects use "Fixes: <hash>" to identify a commit that is
fixed by a given change.  Adopt that convention.

Differential Revision:	https://reviews.freebsd.org/D28693
2021-02-22 10:29:56 -05:00
John Baldwin
1bd9fc96d4 cryptocheck: Add Chacha20-Poly1305 AEAD coverage.
- Make openssl_gcm_encrypt generic to AEAD ciphers (aside from CCM)
  and use it for Chacha20-Poly1305.

- Use generic AEAD control constants instead of GCM/CCM specific names.

Reviewed by:	cem
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D27838
2021-02-18 09:26:32 -08:00
Mark Johnston
cd6114d1a6 git-arc: Preserve the commit author when staging commits
Reported by:	jhb
2021-02-18 11:00:09 -05:00
Mark Johnston
57ba8673d7 git-arc: Globally save and restore the git checkout head
This script uses -e, so it's prone to exiting in awkward places.  In
particular, if arc diff fails, the script just exits without restoring
the checkout.

Mitigate this for now by using a global variable to record the previous
checkout and use a trap handler to restore it in the face of errors.  A
better solution might be to use arc diff's --head parameter but that
will require more testing.

Reported by:	kevans
Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D28631
2021-02-18 11:00:09 -05:00
Alex Richardson
962a3814d4 Fix bootstrap tools build on macOS after 02af91c52e
After changing the namespace.h header we need to provide _err on macOS, too.
Previously we used the system libc err*/warn*, but that does not provide
_err/_warn (which is used by other bootstrapped files from libc).
To fix this problem bootstrap err.c on macOS as well.

Fixes:		02af91c52 (Fix crossbuild bootstrap tools build with Clang 12)
2021-02-17 16:35:14 +00:00
Alex Richardson
02af91c52e Fix crossbuild bootstrap tools build with Clang 12
Clang 12 no longer allows re-defining a weak symbol as non-weak. This
happed here because we compile err.c with _err defined to err. To fix
this, use the same approach as the libc namespace.h
2021-02-17 09:54:59 +00:00
Alex Richardson
88db1cc9f1 tools/build/make.py: drop workaround for cc --version not being parsed
Previously bsd.compiler.mk was not able to detect the compiler type for
Ubuntu's /usr/bin/cc unless we were invoking the /usr/bin/gcc symlink.
This problem has been fixed by 9c6954329a
so we can drop the workaround from make.py.

Reviewed By:	jrtc27
Differential Revision: https://reviews.freebsd.org/D28323
2021-02-13 13:54:25 +00:00
Kyle Evans
c975494ad7 build: turn off FMTREE by default to prepare for removal
nmtree is derived from fmtree, and has been the default mtree(8) since
6adfbbbf16, a little over a year after its introduction.

fmtree has not seen any substantial work since then, except for build
fixes and runtime issues that were diagnosed in nmtree and backported
because this was still in the tree.

Turn it off by default.

Reviewed by:	bdrewery, brooks, cy, emaste
Differential Revision:	https://reviews.freebsd.org/D28573
2021-02-12 23:16:06 -06:00
Daniel Ebdrup Jensen
5ae8b01832 git-arc(1): Fix nits pointed out in final review
Pointy hat to:	me
2021-02-12 23:39:00 +01:00
Daniel Ebdrup Jensen
30f78a063e git-arc(1): Add manual page
Add manual page based on the usage in the script with a few changes and
hook it up to the build.

Reviewed by:	0mp, markj
Differential Revision:	https://reviews.freebsd.org/D28519
2021-02-12 23:35:02 +01:00
Mark Johnston
62374dfa0f git-arc: Use a separate message file
Rather than putting revision metadata in .git/arc/create-message, create
a tmpfile and use that.  Otherwise arc diff always prompts about it and
in some cases complains because its standard input is piped.

Reported by:	imp
Differential Revision:	https://reviews.freebsd.org/D28614
2021-02-12 15:58:17 -05:00
Daniel Ebdrup Jensen
d242f782c2 prepare-commit-msg: Remove blank character
Approved by:	emaste@ (maintainer)
2021-02-08 20:18:39 +01:00
Mark Johnston
3279329b2d tools/git: Add git-arc
This is a handy script for creating and updating Differential revisions
from git commits.  It tries to avoid forcing the user to manage their
git tree in any particular way, but makes two major assumptions:
- there is a one-to-one mapping between git commits and Differential
  revisions,
- the title of a Differential revision is the same as the summary line
  of the corresponding commit.

A verbose description of the script's functionality is provided in its
usage message, which should probably be converted to a man page.

A description of workflows using git-arc is here:
https://lists.freebsd.org/pipermail/freebsd-hackers/2021-January/056979.html

There are some loose ends but this is functional enough to be useful.

Discussed with:	jhb
Differential Revision:	https://reviews.freebsd.org/D28334
2021-02-05 09:47:05 -05:00
Alex Richardson
43e083be81 tools/build/make.py: -DNO_CLEAN -> -DWITHOUT_CLEAN 2021-02-03 17:06:07 +00:00
Ed Maste
9d0f1092cf git hooks: add "Tested by" to commit message template
Reported by:	mjg
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2021-02-02 13:41:08 -05:00
Konstantin Belousov
ff975f15d8 WITH_OFED build option: fix
Userspace has OFED build enabled for quite some time, but kernel modules
were not. This is useless config because any userspace IB code requires
kernel support. So enable modules build by default.

Move WITH_OFED to WITHOUT_OFED since defaults are now enabled.

Reviewed by:	emaste, hselasky, kevans
MFC after:	3 days
Sponsored by:	NVidia Networking / Mellanox Technologies
Differential Revision:	https://reviews.freebsd.org/D28460
2021-02-02 18:44:52 +02:00
Alex Richardson
5cf6f1c4bc Remove the MK_LIBCPLUSPLUS option
This option has been equivalent to any form of C++ support since libstdc++
was removed. Therefore, replace all MK_LIBCPLUSPLUS uses with MK_CXX.

Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D27974
2021-02-01 09:32:07 +00:00
Kyle Evans
8eeeee38f4 tools: boot: use four jobs for building stand
Parallel builds of stand should be assumed both possible and safe as of
7012461c9b, so let's start using some jobs to speed up lualoader test
harness builds.
2021-01-31 10:11:41 -06:00
Ed Maste
6955737522 Remove unused GNUCXX option descriptions
Missed from 57f804675e

Reported by:	arhchardson in D27974
Sponsored by:	The FreeBSD Foundation
2021-01-30 12:47:33 -05:00
Kyle Evans
7587d9823a build: options: mention ports in the WITH_OPENLDAP description
There's a third party dependency on this option; currently,
net/openldap24-{,sasl-}client.  At least mention that an openldap from ports
is needed for this option.

PR:		252866
Reported-by:	Build Option Survey via Michael Dexter
MFC-after:	3 days
2021-01-30 10:41:52 -06:00
John Baldwin
aa906e2a49 OpenSSL: Support for kernel TLS offload (KTLS)
This merges upstream patches from OpenSSL's master branch to add
KTLS infrastructure for TLS 1.0-1.3 including both RX and TX
offload and SSL_sendfile support on both Linux and FreeBSD.

Note that TLS 1.3 only supports TX offload.

A new WITH/WITHOUT_OPENSSL_KTLS determines if OpenSSL is built with
KTLS support.  It defaults to enabled on amd64 and disabled on all
other architectures.

Reviewed by:	jkim (earlier version)
Approved by:	secteam
Obtained from:	OpenSSL (patches from master)
MFC after:	1 week
Relnotes:	yes
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D28273
2021-01-28 10:24:13 -08:00
Marius Strobl
84876bf702 build: remove NDIS option
ndis(4) has been removed in bfc99943b0.
2021-01-26 22:59:36 +01:00
Brooks Davis
bfc99943b0 ndis(4): remove as previous announced
nids(4) was a clever idea in the early 2000's when the market was
flooded with 10/100 NICs with Windows-only drivers, but that hasn't been
the case for ages and the driver has had no meaningful maintenance in
ages. It only supports Windows-XP era drivers.

Also remove:
 - ndis support from wpa_supplicant
 - ndiscvt(8)

Reviewed By:	emaste, bcr (manpages)
Differential Revision:	https://reviews.freebsd.org/D27609
2021-01-25 21:45:03 +00:00
Alexander Richardson
a8b20f4fab Create symlinks to host tools on non-FreeBSD hosts
This is unnecessary when cross-building from Linux/macOS.
Additionally, cp -p appears to be broken on macOS Big Sur
(https://openradar.appspot.com/8957219).

For some unknown reason this commit appears to fix
freezes when building on macOS Big Sur.
This also fixes building in docker with volume mounts
with ACLs, since setting the ACL with cp -p fails otherwise.

Obtained From:	CheriBSD
Tested By:	gnn (macOS Big Sur), Nathaniel Wesley Filardo (docker)
Reviewed By:	jrtc27, imp
Differential Revision: https://reviews.freebsd.org/D28267
2021-01-25 15:09:43 +00:00
Ed Maste
b23665f316 Remove Binutils from src.conf(5) option descriptions
All binutils remnants have been removed before FreeBSD 13.

PR:		252842
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2021-01-24 12:22:01 -05:00
Jessica Clarke
d6327ae8c1 Fix cross-build support for Ubuntu 16.04
Older glibc headers did some very nasty things that have since been
sanitised. We could also fix this by adding a linux/getopt.h wrapper
alongside the existing common/getopt.h that #undef's __need_getopt, but
that seems a little more hacky and complicated.

Reviewed by:	arichardson
2021-01-23 20:59:15 +00:00
Kyle Evans
123ae3045d build: remove LIBPTHREAD/LIBTHR build options
WITHOUT_LIBTHR has been broken for a little over five years now, since the
xz 5.2.0 update introduced a hard liblzma dependency on libthr, and building
a useful system without threading support is becoming increasingly more
difficult.

Additionally, in the five plus years that it's been broken more reverse
dependencies have cropped up in libzstd, libsqlite3, and libcrypto (among
others) that make it more and more difficult to reconcile the effort needed
to fix these options.

Remove the broken options.

PR:		252760
Reviewed by:	brooks, emaste, kib
Differential Revision:	https://reviews.freebsd.org/D28263
2021-01-22 12:33:27 -06:00
Alex Richardson
0348c8fcfa getopt: Fix conversion from string-literal to non-const char *
Define a non-const static char EMSG[] = "" to avoid having to add
__DECONST() to all uses of EMSG. Also make current_dash a const char *
to fix this warning.
2021-01-19 21:23:25 +00:00
Marius Strobl
145f01a3df kerneldoc: remove Doxyfile for cmx(4)
The latter has been removed in 0d3a424a89.
2021-01-16 23:53:13 +01:00
Dimitry Andric
7593c13e18 Add libclang_rt.profile-powerpc64le.a to (Optional)?ObsoleteFiles.inc
On little-endian PowerPC64, this prevented /usr/lib/clang/11.0.0 being
cleaned up completely after upgrading to clang 11.0.1.

Noticed by:	pkubaj
MFC after:	4 weeks
X-MFC-With:	r364284
2021-01-16 17:25:56 +01:00
Mariusz Zaborski
aefe30c543 cat: capsicumize it
Reviewed by:	markj, arichardson
Differential Revision:	https://reviews.freebsd.org/D28083
2021-01-15 21:23:42 +01:00
Kyle Evans
03774659d1 tools: git hooks: drop "submitted by" from commit template
With the switch to git, we should strive to properly attribute every
commit appropriately with the metadata that's provided to do so. In this
case, the submitter should be recorded via the author metadata.  Committing
an arbitrary patch, one can set it as such:

git commit --author="John Smith <smith@example.com>"

Reviewed-by:	emaste
Differential-Revision:	https://reviews.freebsd.org/D28069
2021-01-14 00:33:07 -06:00
Vincenzo Maffione
d7493759fb netmap: pkt-gen: fix offset hex formatting
PR:		252594
Reported by:	brpoole@vt.edu
MFC after:	3 days
2021-01-12 22:05:04 +00:00
Kyle Evans
14a16fd3e7 build: add WITHOUT_CLEAN workaround for 821aa63a09
The *w variants of ncurses directories went away, and the remaining names
build the widechar variants instead of non-widechar variants. As such, the
entire ncurses tree should be regenerated.

Key off of lib/ncurses/ncursesw being present and remove the whole ncurses
hierarchy if it is.

Reviewed by:	emaste (IRC)
2021-01-08 10:43:53 -06:00
Warner Losh
a21def4d56 pccard: Remove wi(4) driver
Remove wi(4). pccard is going away, and wi only supports PC Card
devices, though it has a minor amount of glue to also support
PCI cards. However, removing the one without removing the other
is hard, so the whole driver is being removed.

Relnotes: Yes
2021-01-07 20:41:06 -07:00
Alex Richardson
d146f83180 prepare-commit-msg: Avoid warning on macOS and shellcheck fixes
The macOS /bin/sh complains about using return outside of functions.
Replace `return 0` with `exit 0` to fix this. While editing this files
I've also fixed all the shellcheck warnings that were displayed by my IDE.

Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D28016
2021-01-07 14:00:32 +00:00
Alex Richardson
b500c184b6 Drop some unncessary stale code from Makefile.boot
No longer required after 0e1e341b48.
2021-01-07 10:55:21 +00:00
Alex Richardson
d037edf820 tools/build/make.py: Fix macOS build after a920b9817
If we set STRIPBIN, we also have to set XSTRIPBIN since we otherwise
use the host /usr/bin/strip during buildworld. However, this does not
work on macOS since /usr/bin/strip doesn't handle ELF binaries.
2021-01-07 10:55:21 +00:00
Alex Richardson
7fa2f2a62f Rename NO_WERROR -> MK_WERROR=no
As suggested in D27598. This also supports MK_WERROR.clang=no and
MK_WERROR.gcc=no to support the existing NO_WERROR.<compiler> uses.

Reviewed By:	brooks
Differential Revision: https://reviews.freebsd.org/D27601
2021-01-07 09:31:03 +00:00
Alex Richardson
7467c537a5 Fix warnings during bootstrap phase on macOS 2021-01-07 09:31:03 +00:00
Alex Richardson
4e64fb9f49 Fix warnings during bootstrap on Linux systems
Most warnings are currently off for the boostrap phase, but once D27598
lands they will be enabled again.
2021-01-07 09:30:50 +00:00
Alex Richardson
ed8455806e Fix all warnings emitted in make kernel-toolchain
With this change and D27598 make kernel-toolchain no longer emits any
warnings for me.

Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D27599
2021-01-07 09:26:22 +00:00
Vincenzo Maffione
163f4f1573 netmap: bridge: fix NS_MOREFRAG support
Support for NS_MOREFRAG is broken, as NS_MOREFRAG is copied from
the TX slot to the RX slot rather than the other way around.
Also, the NS_MOREFRAG must be copied also in case of packet
copy (no zerocopy).

Reported by:	rajesh1.kumar_amd.com
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D27980
2021-01-07 07:05:57 +00:00
Kristof Provost
c38e59ce1b pfctl: Fix NOCLEAN build
We've created a new pf_ruleset.c file for pfctl and no longer use the
kernel vrsion, but the build system doesn't handle this dependency
change correctly. Delete the dependency file if it contains the kernel
version of the file.

MFC after:	2 weeks
2021-01-06 22:07:46 +01:00
Baptiste Daroussin
821aa63a09 ncurses: only keep the version with widechar support
Only keep the widechar version of ncurses as libncursesw.so.9

Keep the old name to avoid breaking the ABI compatibility (the non
widechar version libncurses.so.9 is not binary compatible with
libncursesw.so.9) since all ports and base are already only linking
against the widechar version we can simply remove libncurses.so.9

Since the .9 version only lived in the dev branch and never ended in a
release, it is simply removed and not added to any binary compat
package.

Add symlinks to keep build time compatibility for anyone linking against
-lncurses
2021-01-05 14:01:32 +01:00
Dimitry Andric
eaeb601bd6 Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
release/11.x llvmorg-11.0.1-rc2-0-g43ff75f2c3f (aka 11.0.1 rc2).

MFC after:	4 weeks
X-MFC-With:	r364284
2021-01-03 13:54:24 +01:00
Ed Maste
b67e440755 Add comment explaining Git commit message hook
Suggested by:	jhb
2020-12-30 12:33:19 -05:00
Poul-Henning Kamp
07b0027f6c Handle ports FLAVOR better. (+minor polish) 2020-12-30 16:05:09 +00:00
Hiroki Sato
916806472a Fix generation of colldef source files for non-UTF-8 locales
- Files for colldef were generated by duplicating UTF-8 collation files
  for each language and included invalid characters in the non-UTF-8
  encodings.  localedef(1) does not allow those characters.
  cldr2def.pl now checks if the characters are valid based on charmap files.

  TODO: ja_JP.UTF-8 locale should not be generated solely from CLDR because
  it was standardized in a document "UI-OSF Application Platform Profile for
  Japanese Environment" which was incompatible with information in CLDR.
  Most of commercial Unix vendors adopt this pre-Unicode-era document
  as the reference even for UTF-8 locale.  Newer versions of Solaris have
  added a CLDR version as ja_JP.UTF-8@cldr, and IBM AIX has used
  JA_JP.UTF-8 for the UI-OSF specification and ja_JP.UTF-8 for CLDR.

  Note that this commit does not change generation of ja_JP.UTF-8.
  Changes related to this issue will be committed separately later.

- Generate POSIX charamap UTF-32 as a reference.  It was confusing that
  charmap.xml used Unicode names defined in UnicodeData.txt though POSIX
  charmap used slightly different names for the same code points.
  cldr2def.pl now uses UTF-32.cm as single information source for Unicode
  symbol names and code points.  Charset.xml is also updated to use them.

- Fix a bug in get_encodings() in cldr2def.pl which did not understand
  0x00+0x00 notation correctly in charmaps/ISCII-DEV.TXT.

- Do not regenerate posix/xx_Comm_C.UTF-8.src every time when doing
  "make build".

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D27809
2020-12-30 04:40:27 +09:00
Adrian Chadd
66585c3fe2 [wlanwatch] fix compiler warnings-as-errors on gcc-6.4 mips
* argc/argv are currently unused
* msglen is currently unused
* "default" is a const buffer, but char *cp isn't, so
  change default string to be a non-const global string variable
* Make 'cp' private to each context that's using it, which fixes
  a "variable shadows previous declaration" warning and makes it
  easier to track where it was being leaked between address family
  sections
2020-12-29 10:24:36 -08:00