It was disabled by default in fe52b7f60e. We planned to (but did not)
remove the option before FreeBSD 14. Remove it now, for FreeBSD 15.
Relnotes: Yes
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31558
We can encounter many issues in the pkg-repo(8) process which would
currently leave us with no more 'latest' symlink in the repository. The
main problems with this are that we've now broken a subsequent
`update-packages` because we can't determine a PKG_VERSION_FROM, but
also we break configured clients that are still expecting to see *some*
repository.
Switch to just replacing the `latest` symlink entirely after we have
made it past the pkg-repo(8) step so that we only swap over when we have
a finished repository.
Reviewed by: bapt, emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D47303
libcrypt bundles the various hash functions it needs,
duplicating code that is also found in libmd.
Unbundle the hash functions and apply the same hack used
for libncursesw so static consumers link -lmd in addition
to -lcrypt.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D47062
The libkldelf library was originally a part of kldxref(8). It exposed
ELF parsing helpers specialized in parsing KLDs and the kernel
executable. The library can be used to read metadata such as linker_set,
mod_depend, mod_version and PNP match info, and raw data from the ELF.
To promote the reuse of the facilities the ELF parsing code is separated
from kldxref(8) into a new private library.
For now, libkldelf's source files will be compiled into kldxref(8)
directly if kldxref is built during bootstrapping phase. The reason is
linking kldxref(8) against the libkldelf static library has an unwanted
side effect which renders the linker sets inside the libkldelf
implementation empty if the static library is not build by ld -r all the
.o files into a single .o before producing the static library.
Sponsored by: Juniper Networks, Inc.
Reviewed by: markj
Suggested by: jrtc27, markj
Differential Revision: https://reviews.freebsd.org/D46719
Replace the regex trying to catch the branch name of the existing
repository which was too naive with simpler glob matching.
As a result the only case when we only use the new packages are:
moving from alpha to beta
moving from beta to rc
moving from rc to release
changing the major version number for the main git branch
PR: 281393
Differential Revision: D46874
The libkldelf library was originally a part of kldxref(8). It exposed
ELF parsing helpers specialized in parsing KLDs and the kernel
executable. The library can be used to read metadata such as linker_set,
mod_depend, mod_version and PNP match info, and raw data from the ELF.
To promote the reuse of the facilities the ELF parsing code is separated
from kldxref(8) into a new private library.
kldxref(8) is modified to link against the libkldelf library.
Sponsored by: Juniper Networks, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D46719
pkg(8) after 8991ebd7afb0 ("Fix #1566: Add pkg-create(8) -l,--level
to set compression level") accepts compression level when creating
packages with a compression format (e.g. txz, tzst).
When compression is used (PKG_FORMAT is not "tar"), use compression
level from PKG_LEVEL for pkg-create(8) to make use of 8991ebd7afb0.
PKG_LEVEL default is set to pkg default to keep current behavior,
see pkg(8) 31000cb40b30 ("tzst: by default compression at the 19 level).
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1420
Follow the path of what is done with bsnmp, build the modules along
with the main binary, this allows to build the modules at a moment
where all needed libraries are already built and available in the
linker path instead of having to declare all the libraries which a
flua module will be linked to in _prebuild_libs.
Discused with: markj
Reviewed by: markj, jrtc27, kevans, imp
Accepted by: kevans, imp
Differential Revision: https://reviews.freebsd.org/D46610
when running update-package, we try to keep as much as possible the old
packages to avoid wasting users bandwidth. the previous code was failing
at catching properly the "snap" extension and we lost incremental build.
With this new code we only stop checking we we have an old package with
the same checksum if we transition from:
- alpha to beta
- beta to rc
- rc to release
but we keep old packages when we transition from release to p1 or when
we stay on a given snapshot
PR: 281393
Reported by: Evgenii Khramtsov <throwaway_vthgwq4@protonmail.com>
now that the flua ucl module is built the lib directory, it is being
build at a moment where it cannot link yet to libucl, push libucl in
the _prebuild_libs to ensure it is present in a path to be linked
against at the time the lua ucl module is being built.
While here, remove libucl from boostrap as a dependence of flua as it is
not needed anymore now that flua ucl module is dynamically loadable.
For years we display the time in seconds how long it takes to
run `make buildworld' (see PR 224433). Now we will display the
time for "installworld" and "installkernel" as well.
e.g.:
--------------------------------------------------------------
>>> Installing everything completed on Sun Jul 7 16:11:37 UTC 2024
>>> Install world completed in 110 seconds, ncpu: 2, make -j2
--------------------------------------------------------------
This is an improved version of commit e5a0202f96
PR: 280187
Differential Revision: https://reviews.freebsd.org/D45912
Just remove the plist created by the respective rule. Otherwise the two
receipes can race with each other.
Fixes: d7d5c9efef ("pkgbase: Let source packages be built in parallel")
Reviewed by: bapt, emaste
Reported by: Mark Millard <marklmi@yahoo.com>
Differential Revision: https://reviews.freebsd.org/D46320
To build the packages target, we build src and src-sys packages
containing the source code from which the repo was built. These
packages take significantly longer than the others, presumably because
they contain many more files. Because both source packages are built
to satisfy the same target, they end up being built serially. Split
them into separate subtargets so that they can run in parallel. This
saves a couple of minutes on my build machine.
Reviewed by: manu, emaste
MFC after: 1 month
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D46288
Right now, to get the pkg ABI we either use PKG_ABI, derived from
newvers.sh, or use an ABI file from the staged world. This
inconsistency is confusing and can cause problems.
Switch to a single source of truth: use an ABI file from the worldstage
dir to get the ABI of pkgbase packages. In particular, we do not need
to know the ABI until staging is done. More specifically:
- use a shell command to define PKG_ABI,
- replace inline uses of ABI_FILE,
- run sign-packages in a subshell (this was already done for the
update-packages target) so that the staging targets are done before we
try to evaluate the ABI.
Reviewed by: manu
MFC after: 1 month
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D46287
For years we display the time in seconds how long it takes to
run `make buildworld' (see PR 224433). Now we will display the
time for "installworld" and "installkernel" as well.
e.g.:
--------------------------------------------------------------
>>> Installing everything completed on Sun Jul 7 16:11:37 UTC 2024
>>> Install world completed in 110 seconds, ncpu: 2, make -j2
--------------------------------------------------------------
PR: 280187
Approved by: imp
Differential Revision: https://reviews.freebsd.org/D45912
With it planned that armv7 will be the only 32-bit kernel when 15.0 is
released remove support for armv6.
Remove the top level build infrastructure. It was already removed from
universe, this just stops it from being built directly.
Reviewed by: mmel, emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45634
This case gets hit in make universe on Linux, since we will first run
make test-system-compiler to determine whether to use the system or
universe toolchain, during which time CC is the host's, GCC, and XCC
isn't set, so defaults to the same.
Fixes: 4c0dfd5959 ("arm: fail early on gcc builds")
Mark powerpc* and riscv broken.
Refactor and add a TRY_GCC_BROKEN option to build anyway. This
simplifies things for people trying to get gcc builds working
while letting other developers know that they aren't expected to work.
Reviewed by: jhb, emaste
Improves: 4c0dfd5959 arm: fail early on gcc builds
Differential Revision: https://reviews.freebsd.org/D45230
Since at least 2022 (see https://reviews.freebsd.org/D36754), it has
not been possible to build armv6/armv7 with gcc due to atomics macros
gcc doesn't like. Prevent developers doing due diligance from wasting
time and CPU cycles on this combination as it just fails to build in
libc.
Reviewed by: imp, andrew
Differential Revision: https://reviews.freebsd.org/D45193
Also set MACHINE and MACHINE_ARCH when reading config options from
src.opts.mk. This ensures any machine-dependent options are reported
correctly.
Reviewed by: emaste, imp
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D44838
This is made in order to be able to find add the post-install scripts
for the kernel, where PKGNAME varies for each KERNCONF but we don't want
to dynamically duplicated the kernel.ucl file.
At the same time we don't want the *-dbg* packages to actually include
those post-install scripts
Rework how ucl manifest are generated leveraging ucl features and flua
now the ucl generation is done via a lua script which uses libucl to
ingest the template and use variables as defined in its command line.
the template will include only if it exist a ucl file named after the
package name which will complement the template or overwrite what was
defined in the template if defined in this specific ucl file
this allows to overwrite license, but add script only to the packages
who actually needs them.
As a results the post install scripts are now only added to the right
package and not also added to the subpackages like -man or -dev
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44374
At runtime, when rtld loads libc it will also load libsys. For each
symbol that is present in both, the libsys one will override the libc
one. It continues to be the case that program need only link against
libc (usually implicitly). The linkage to libsys is automatic.
Reviewed by: kib, emaste, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/908
This reverts commit 9bbe06b004.
Before that dtbs where included in each kernel packages which prevents
us to install multiple kernels.
Fix mtree-to-plist.awk to only generate a dtb.plist when we create
the kernel one (because dtb are installed during make installkernel).
Sponsored by: Beckhoff Automation GmbH & Co. KG
Somehow this doesn't work iwth make packages due to some kind of a race.
The package is first created correctly but later in the process it is
overwritten by a badly created empty package.
Revert in the mean time so we can have working pkgbase on arm/arm64
This reverts commit a5afd7920d.
Before that dtbs where included in each kernel packages which prevents
us to install multiple kernels.
Differential Revision: https://reviews.freebsd.org/D43632
Reviewed by: bapt
Sponsored by: Beckhoff Automation GmbH & Co. KG
This adds two new rules named create-packages-kernel-repo and
create-packages-world-repo.
The goal of those rules is to create the {kernel,world} packages and
after that the repository.
It helps a lot for developing with pkgbase by adding the dev machine
repository created by those rules on top of the official pkgbase one.
Differential Revision: https://reviews.freebsd.org/D43623
Reviewed by: bapt, emaste
Sponsored by: Beckhoff Automation GmbH & Co. KG
ls -i dates back to 5th edition Unix and is more portable than the stat
command, though %% is a newer shellism, it works on any shell that
FreeBSD builds with.
Sponsored by: Netflix
This revision breaks Linux and MacOS cross builds because
TARGET_ENDIANNESS is not define during bootstrapping on these
platforms.
I think the correct approach would be to separate the new
fbsd_ossl_provider_load() and unload functions into their own
library (instead of libroken). This avoids the less desirable
option of including bsd.cpu.mk in secure/lib/Makefile.common,
which does build but could complicate future work.
Reported by: jrtc27
This reverts commit cb350ba7bf.
Weak crypto is provided by the openssl legacy provider which is
not load by default. Load the legacy providers as needed.
When the legacy provider is loaded into the default context the default
provider will no longer be automatically loaded. Without the default
provider the various kerberos applicaions and functions will abort().
PR: 272835
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D43009
Tested by: netchild, Joerg Pulz <Joerg.Pulz@frm2.tum.de>
This option can be used to specify a format to use in DTrace output.
The following formats are supported:
- json
- xml
- html
- none (default DTrace output)
This is implemented using libxo and integrated into libdtrace. Client
code only works with the following API:
- dtrace_oformat_setup(dtrace_hdl_t *) -- to be called when output is starting.
- dtrace_oformat_teardown(dtrace_hdl_t *) -- to be called when output is finished
- dtrace_oformat(dtrace_hdl_t *) -- check if oformat is enabled.
- dtrace_set_outfp(FILE *) -- sets the output file for oformat.
- Ensure that oformat is correctly checked in the drop handler and record
processing callbacks.
This commit also adds tests which check if the generated output is
valid (JSON, XML) and extends the dtrace(1) describing the structured output.
Reviewed by: markj
Discussed with: phil
MFC after: 2 months
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D41745
Now that kldxref is a generic cross tool and can be built on non-FreeBSD
we can bootstrap it during the build and thus remove the condition for
whether it exists. We also need to make sure to add it to the METALOG
for -DNO_ROOT builds.
Reviewed by: brooks, imp
Differential Revision: https://reviews.freebsd.org/D43051
Currently IMAKE_INSTALL, which includes -M METALOG, is enough for the
sub-makes to work, but using kldxref for -DNO_ROOT builds will require
manually adding linker.hints to the METALOG, and thus both METALOG
itself and DISTBASE need to be exposed directly to the sub-makes, so do
so.
Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D43050
The sha256 and sha512 binaries are used when building release images.
Bootstrapping them used to be gated on MK_BOOT, which wasn't quite right
but in practice worked, at least in our use cases downstream. Add back
bootstrapping sbin/md5 and its aliases for this purpose to fix building
release images on Linux and macOS.
Fixes: f213da893c ("Makefile.inc1: Remove beri straggler")
When generating source packages. Although submodules are not used by
FreeBSD itself they may be used by downstream projects. By default
for submodules `git ls-files` just emits the submodule directory name,
which resulted in:
pkg: pkg_checksum_hash_sha256_file(read failed): Is a directory
Passing --recurse-submodules lists all of the files in each submodule
(which is desired when submodules are in use), and has no effect when
submodules are not present.
Reviewed by: bapt, manu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42983
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-17-init-19304-gd0b54bb50e51, the
last commit before the upstream release/17.x branch was created.
PR: 273753
MFC after: 1 month
There's no need to use echo -n here. A single echo will do nicely.
This fixes the post-buildworld output on a macos build, where echo -n
is implemented like System V instead of BSD (so you get two lines
first one starting with -n).
Sponsored by: Netflix
Reviewed by: jrtc27, emaste
Differential Revision: https://reviews.freebsd.org/D42869
FreeBSD-src for all the sources but the kernel
FreeBSD-src-sys just for the kernel
MFC After: 3 days
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D42651
In 188fe88ec5 OSVERSION has been set
to OSRELDATE which is the RELDATE of the building OS while we wanted
to use SRCRELDATE which is the RELDATE of the target system