Ensure that we populate /etc/fstab for all the ufs images. Tweak sizes
while I'm at it.
Note: This file could use a good refactoring... or maybe a rewrite in
python or lua.
Sponsored by: Netflix
Reviewed by: tsoome
Differential Revision: https://reviews.freebsd.org/D38317
Since e2eeea75eb ("Merge bmake-20201117") missing/sys/cdefs.h has
been present in bmake, and _GNU_SOURCE seems to have been defined by
config.h for much longer than that, possibly for the entire time OS
cross-build support has been in-tree, so these are obsolete. Moreover,
since 79e02149fc ("Fix dtrace tools bootstrap on non-FreeBSD after
OpenZFS import"), HAVE_STRLCAT and HAVE_STRLCPY have been defined by our
cross-build headers in order to placate DTrace tools (which is not the
right way to solve that problem, but motivates fixing this one). Commit
4fde40d9b5 ("Merge/update to bmake-20230126") changed the strlcpy.c in
bmake from including config.h directly to including make.h, which means
it includes string.h and thus sees these bogus definitions, causing it
to not define the strlcpy compat function on Linux even though it needs
to and thus failing to link. Thus, fix this whole mess by removing the
hack we no longer need.
Several important base system components are written in C++, and the
WITHOUT_CXX option produced a system that was not fully functional.
Just accept this, and remove the option to build without C++ support.
This reverts commit adc3c128c6.
Reviewed by: brooks, kevans, jhb (earlier)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33108
Older, supported FreeBSD versions lack bit_ntest() so hoist the boostrap
installation out of the OS!=FreeBSD case and always install it. A more
precise criteria is possible, but would add little value.
This fixes bootstrapping makefs as a build tool on 13.1.
Reviewed by: jrtc27, emaste
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D37951
In particular, don't allow the user to specify a file size that can't be
expressed as an int, since fsx's random-number generator only has a 32
bit range.
MFC after: 2 weeks
When retrieving the timestamp of the last commit using git-show(1), do
not pipe the output to head(1), otherwise the return value in $? will be
for head(1) and not git-show(1).
Approved by: bapt
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37742
In source_hwaddr(), the configured ifname is compared against all
interfaces. However, in main(), the string 'netmap:' is prepended to the
interface string if no explicit type is given. Therefore the ifname will
not match any system interface and the source MAC address is always
empty.
Check for the leading 'netmap:' string and skip past it to match against
system interfaces. Note that 'tap:' and 'pcap:' devices strip the type
string from the ifname in main() so no further work is needed.
MFC after: 7 days
Submitted by: Brian Poole <brian90013@gmail.com>
The pin-mode (ft, pd, pu for floating, pull-down, pull-up) is
specified after the intr-config (no, eb, ef, er) for each pin.
Tested on my Raspberry Pi 1B.
PR: 268504
Approved by: manu
MFC after: 1 week
Bring the DrvAPI convert script forward from the initial commit to
account for the last 8 years of changes to the KPIs.
Sponsored by: Juniper Networks, Inc.
Instead of providing no /usr/bin/objdump when LLVM_BINUTILS is false.
PR: 267854 [exp-run]
Reviewed by: dim
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37445
full-test.sh aims to be a test suite generator for the boot loader. It
tries to grab artifacts from the web and then constructs minimal boot
environments from that as well as writing qemu-system-* using scripts
that facilitates testing all the ways we can boot... At least all the
ways that we an boot that qemu can emulate.
This is very much a work in progress, and likely could use a good
cleanup at some point.
Sponsored by: Netflix
A small reduction in build infrastructure complexity; when we had both
Clang and GCC in the tree it was useful to have both built, and choose
one or the other to install as /usr/bin/cc. Now only Clang is in the
tree, and there is no point in building and installing base Clang but
not providing it as cc (and c++, cpp).
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37075
The pkgbase metalog tool is named metalog_reader.lua. (One may argue
that a better name could be chosen, but the README should match in any
case.)
Sponsored by: The FreeBSD Foundation
Remove support for booting off of firewire, and for having dcons via
firewire in the loader. Kernel support for these things is unchanged.
Discussed on arch@ and the current state is not working (and the build
was wrong to boot).
Sponsored by: Netflix
Discussed: https://lists.freebsd.org/archives/freebsd-arch/2022-November/000267.html
Reviewed by: kevans, melifaro, emaste
Differential Revision: https://reviews.freebsd.org/D37334
Duplicate METALOG file entries are more of a concern than duplicate
directories. The metalog check tool previously did not include the
entry type in the warnings, making it hard to find the ones of concern.
Sponsored by: The FreeBSD Foundation
Previously we stripped the '.' from the beginning of each METALOG entry
to determine the path to stat. This meant that we examined files on the
build host, not the staged files.
Instead, strip off the last part of the specified METALOG pathname to
find the stage root directory, and stat files relative to that.
Reviewed by: bapt
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37412
To support changes in filenames for programs (and not just libraries),
update clean_dep() to check .depend.foo.o files as well as
.depend.foo.pico files.
othermta (along with mta_start_script configuration entry in rc.conf)
was a mechanism used to be able to run another mta than sendmail(8) before
"rcng" time 20 years ago.
othermta has not been used since.
If a -m argument is given to update, it is passed through to arc diff
when updating each review. Note that if an empty message is specified
via -m, arc diff will update the review without adding a note.
If an -m argument is not given, then the user's editor is invoked by
arc to supply a message for each review matching the previous
behavior.
This can be used to simplify the process for updating a set of
reviews, e.g.:
git checkout foo
git rebase main
git arc update -m "Rebase" main..
This will rebase the 'foo' branch and update the reviews for all
commits on the branch without invoking the user's editor separately
for each review.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D37260
Fedora defines shell functions for some commands used by FreeBSD build
scripts. Unortunatelly it makes them behave incorrectly for our purposes.
For instance 'which which' returns something like:
which ()
{
( alias;
eval ${which_declare} ) | /usr/bin/which --tty-only --read-alias ...
}
instead of
/usr/bin/which
This patch unsets those functions to restore original/expected behavior
Reviewed by: emaste, imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D36900
Nanobsd included copies of ssh_config and sshd_config. The former is
identical to the one provided by the base system, and the latter is
identical except for PermitRootLogin, which is updated by nanobsd's
cust_allow_ssh_root anyhow. Remove nanobsd's copies and use the
existing base system ones.
Reported by: Jose Luis Duran <jlduran@gmail.com> in D34937
Reviewed by: Jose Luis Duran <jlduran@gmail.com>, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36933
This separates out the install media-specific environment (creating
bsdinstall_etc) from actually running the installer on a given console.
This will be used by a future change to start the installer on multiple
consoles.
Reviewed by: brooks, gjb
Differential Revision: https://reviews.freebsd.org/D36803
This helper binary will run a given command on every on console, as
defined by /etc/ttys (except for ttyv*, where only ttyv0 will be used).
If one of the command processes exits, the rest will be killed. This
will be used by a future change to start the installer on multiple
consoles.
Reviewed by: brooks, imp, gjb
Differential Revision: https://reviews.freebsd.org/D36804
Mostly remove from the SEE ALSO section, adding a mention of the port
where not removed. Elsewhere, remove as appropriate and change from .Xr
to .Nm where a mention of telnetd continues to make sense (or removing
it would require significant reworking of the surrounding text).
Reviewed by: imp, delphij, emaste
Differential Revision: https://reviews.freebsd.org/D36785
Support for telnet(d) was commented out some time ago. Remove now that
telnetd is gone.
Reviewed by: imp, delphij, emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D36782
The telnetd codebase is unmaintained and has a number of quality
issues. Telnet has been largely supplanted by ssh. If needed, a port is
available (net/freebsd-telnetd), but a more maintained implementation
should be prefered.
While the telnet client suffers from the same issues, it is deemed
to be of lower risk and is required to connect to legacy devices, so
it remains.
Reviewed by: emaste, imp
Differential Revision: https://reviews.freebsd.org/D36620
WITH_LLVM_BINUTILS links /usr/bin/objdump to llvm-objdump, and similarly
for the man page. Do not delete them in `make delete-old`.
PR: 266603
Sponsored by: The FreeBSD Foundation
Summary:
This knob can be used to make buildsystem prefer generic C implentations of
various functions, instead of machine-specific assembler ones.
Test Plan: `make buildworld` on amd64
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D36076
MFC after: 3 days
Currently make.py has a hack to add the cross-build headers to the
include search path when bootstrapping bmake on Linux (but not macOS).
This is a bit of an abuse of these headers, and e9ba1fd5ed was not
prepared for this, since sys/bitcount.h won't exist in that instance (it
gets copied into WORLDTMP during the legacy build). Work around this
until we can wean the bmake bootstrap off using these headers by not
including sys/bitcount.h when it doesn't exist.
Fixes: e9ba1fd5ed ("tools/build: Provide FreeBSD's bitstring API when cross-building")
flsll is needed for makefs's new ZFS support, and the others are added
for completeness.
Reviewed by: emaste, arichardson
Fixes: 240afd8c1f ("makefs: Add ZFS support")
Differential Revision: https://reviews.freebsd.org/D36134
This is needed for building makefs as a cross-tool since the ZFS code
uses these APIs.
Reviewed by: emaste
Fixes: 240afd8c1f ("makefs: Add ZFS support")
Differential Revision: https://reviews.freebsd.org/D36133
Rather than using 'git checkout' to move to the commit in question for
create and update, use the '--head' argument to 'arc diff'. This
avoids the need to alter the current checkout and the related bits to
save/restore HEAD in the current checkout.
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D36248
Move the mbr non-geli zfs cases to no-priv creation with makefs / mkimg.
Add comments about the weird thing we do for MBR + ZFS + Legacy. Add
comments about other architectures. Still need to think through how to
leverage a completed universe to do all the architectures...
Sponsored by: Netflix
Start to use makefs for ZFS. This covers the gpt nogeli variants. ZFS
MBR booting is tricky and complicated, so will need some additional
tweaks that makefs/mkimg isn't able to do at the moment. This means that
all gpt nogeli amd64 combinations can be built w/o root.
In addition, tweak the generated qemu.sh files to use stdio for the
console. We grep the output for SUCCESS and report each of the booting
types. Create a all.sh that will run these automatically. These all can
also run w/o root.
In the future, I'll add support for a make univers followed by this
script to create other architectures' tests and/or generate stand tests
for /usr/tests...
Sponsored by: Netflix
GELI images are created in a different manner than non-GELI
images. Update them to set the label of 'root' on the UFS partition and
use that in fstab. Drop comments about needing to do this, as well as
the 'dev' variable now that it's unused.
Sponsored by: Netflix
Minor changes to the non-geli UFS targets: migrate to using ufs labels
so we don't need to know the name of the device we booted off of. This
doesn't change the GELI test cass just yet since I've not tested them.
ZFS doesn't need these changes since we don't need to encode the device
for it.
Sponsored by: Netflix