Commit Graph

1740 Commits

Author SHA1 Message Date
Bjoern A. Zeeb
298ee47e19 localedef: unbreak WITHOUT_LOCALES
After 0fa5403d49 ("pkgbase: move locales into their own package") we
need usr.bin/localedef as a bootstrap tool independent on where
WITHOUT_LOCALE was specified as we ALWAYS process C.UTF-8.

At the same time LOCALES= in the local Makefile is empty but
C.UTF-8 with WITHOUT_LOCALES. C.UTF-8 is excluded from FILES, and thus
after the replacement FILES= is set to only .LC_CTYPE which results in
a build failure not knowing how to build that. Tweak the substitution to
replace only non-empty words so that FILES remains harmlessly empty.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D31589
2021-08-19 12:38:17 -05:00
Bryan Drewery
4b7bf84248 bootstrap-tools: Don't copy host tools with make -n 2021-08-17 12:26:03 -07:00
Bryan Drewery
a3ddd7c92b _worldtmp: Fix some sub-makes not working with make -n 2021-08-17 12:06:40 -07:00
Alex Richardson
cc1345056b Add missing lex/yacc dependency for mkesdb/mkcsmapper bootstrap
This causes build failures on macOS where the build can end up invoking
an incompatible m4 binary.

Fxies:		2de949cf85 ("Remove mkcsmapper_static and mkesdb_static from build-tools")
2021-08-16 09:57:33 +01:00
Ed Maste
54247ce1f9 Makefile.inc1: Avoid hanging if pkg is not installed
For `pkg --version`, Redirect stdin from /dev/null to avoid waiting on
/usr/sbin/pkg's bootstrap prompt if the pkg package is not installed.
Also redirect stderr to /dev/null to discard the warning message in
this case.

Reported by:	mjg
Fixes:		4e224e4be7 ("pkgbase: accommodate pkg < 1.17")
Sponsored by:	The FreeBSD Foundation
2021-08-07 23:13:40 -04:00
Mitchell Horne
61ed578ee6 Prefer MK_SSP=no to SSP_CFLAGS=
It is more idiomatic. CFLAGS is only augmented with $SSP_CFLAGS when
$MK_SSP != "no".

Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D31401
2021-08-04 15:23:22 -03:00
Mitchell Horne
bcd2f41f7d mk: format some option lists
Alphabetize and give each option its own line, ahead of making another
change to these lists. This makes future diffs easier to read.

Reviewed by:	imp, emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D31399
2021-08-04 15:23:22 -03:00
Bryan Drewery
b60770fceb Fix native-xtools build
Fixes		https://github.com/freebsd/poudriere/issues/894
Fixes:		d0c737e18 ("Makefile: Fix MAKEOBJDIRPREFIX command-line")
X-MFC-With:	d0c737e18
2021-08-03 10:00:28 -07:00
Bryan Drewery
2482ea42fb Revert "Fix native-xtools build"
This reverts commit 36269b8231.

This had an unintended change included.
2021-08-03 10:00:28 -07:00
Bryan Drewery
36269b8231 Fix native-xtools build
Fixes		https://github.com/freebsd/poudriere/issues/894
Fixes:		d0c737e18 ("Makefile: Fix MAKEOBJDIRPREFIX command-line")
X-MFC-With:	d0c737e18
2021-08-03 08:22:14 -07:00
Alex Richardson
2de949cf85 Remove mkcsmapper_static and mkesdb_static from build-tools
Build them as part of the bootstrap-tools phase instead.

Reviewed by:	emaste (no objections)
Differential Revision: https://reviews.freebsd.org/D28181
2021-08-02 14:33:25 +01:00
Alex Richardson
7bc797e3f3 Add build system support for ASAN+UBSAN instrumentation
This adds two new options WITH_ASAN/WITH_UBSAN that can be set to
enable instrumentation of all binaries with AddressSanitizer and/or
UndefinedBehaviourSanitizer. This current patch is almost sufficient
to get a complete buildworld with sanitizer instrumentation but in
order to actually build and boot a system it depends on a few more
follow-up commits.

Reviewed By:	brooks, kib, markj
Differential Revision: https://reviews.freebsd.org/D31043
2021-08-02 14:33:24 +01:00
Wolfram Schneider
bbd16236e9 add the time(1) command to the list of install tools
Reported by:	dhw
Approved by:	dhw
Differential Revision:	https://reviews.freebsd.org/D31373
2021-08-01 13:25:00 +00:00
Wolfram Schneider
99feb137f5 `make buildworld' with time logging for each stage
PR:	 	257141
Reviewed by:	sjg,emaste
Approved by:	emaste
Differential Revision:	https://reviews.freebsd.org/D31154
2021-08-01 09:10:49 +00:00
Ed Maste
4dbac528db pkgbase: improve pkg --version parsing
In some cases `pkg --version` might produce unexpected or additional
output.  Use a regex /^[0-9.]+$/ to match only the line containing the
version number.

Reported by:	Michael Butler on freebsd-current@
Fixes:		4e224e4be7 ("pkgbase: accommodate pkg < 1.17")
Sponsored by:	The FreeBSD Foundation
2021-07-28 17:14:33 -04:00
Ed Maste
4e224e4be7 pkgbase: accommodate pkg < 1.17
6cafdee71d adapted the pkgbase build for 1.17, but broke Cirrus-CI's
use of PKG_FORMAT=tar (the quarterly package set still has pkg 1.16).
Because of this I disabled the pkgbase build and test in 2bfba2a04b.

Now, check `pkg --version` and use the old logic for < 1.17.

To be reverted once we no longer encounter pkg 1.16 in Cirrus-CI (i.e.,
via GCP cloud images) to avoid keeping this extra complexity around.

PR:		257422
Reviewed by:	manu
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31324
2021-07-27 14:50:06 -04:00
Emmanuel Vadot
6cafdee71d pkgbase: Track pkg 1.17
With pkg 1.17 the extention is always .pkg, packing_format is also now deprecated.
2021-07-22 10:19:02 +02:00
Alex Richardson
c5d1d88a35 Don't build lldb-tablegen if MK_LLDB=no
Split out from D31060.

Reviewed by:	emaste
2021-07-19 15:05:22 +01:00
John Baldwin
0333fad1b7 Remove svnlite.
Reviewed by:	bcr, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D30737
2021-06-11 14:56:41 -07:00
John Baldwin
e290182bcf Remove 'make update'.
In the CVS days this used be a wrapper around either CVS or CVSup and
used to support updating src, doc, and ports checkouts.  With the move
to subversion this only supported updating src and was itself a
wrapper around 'svn update'.  With Git, users are probably better off
using appropriate Git commands directly to update without needing an
explicit make target as a wrapper.

Reviewed by:	bcr, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D30736
2021-06-11 14:56:28 -07:00
Mitchell Horne
689c7e7975 libpmc: always generate libpmc_events.c
The jevents build tool will create an empty table if it doesn't find any
events, so we can remove the extra $MACHINE_CPUARCH checks.

Reviewed by:	gnn, ray, emaste
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D30531
2021-05-31 17:39:05 -03:00
Marcin Wojtas
c6081dea59 Add elfctl to toolchain.
Add elfctl program to toolchain to allow modifying ELF feature flags
during system build.

Submitted by: Dawid Gorecki <dgr@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D29552
2021-05-21 15:32:42 +02:00
Glen Barber
50179c5ec7 Makefile.inc1: unbreak bootstrap when kbdcontrol does not exist
Reviewed by:		arichardson
MFC after:		12 hours
MFC target:		stable/13, releng/13.0
Differential Review:	https://reviews.freebsd.org/D29200
Sponsored by:		Rubicon Communications, LLC ("Netgate")
2021-03-23 20:47:14 -04:00
Baptiste Daroussin
4a847a6ccd Revert "bootstrap: add tic to the bootstrap tools"
Since we don't build and install the terminfo db anymore this is not
needed

This reverts commit b6a51d39e3.
This reverts commit e5e4845959.
This reverts commit 0af562d7e1.
2021-03-18 16:05:20 +01:00
Alex Richardson
e5e4845959 Makefile.inc1 "Avoid duplicate script for target" warning
This happens if -DBOOTSTRAP_ALL_TOOLS or when building on non-FreeBSD.
2021-03-01 13:22:15 +00:00
Baptiste Daroussin
b6a51d39e3 bootstrap: fix a last edit typo
Reported by:	cy
2021-02-25 14:53:00 +01:00
Baptiste Daroussin
0af562d7e1 bootstrap: add tic to the bootstrap tools
tic is necessary early in the build to be able to build the terminfo
database later on.

Tested by:	manu, jbeich
2021-02-25 14:25:28 +01: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
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
Glen Barber
a53ce3fc49 Bump CURRENT to 14.0
This one goes to 14.

Approved by:	re (implicit)
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-01-21 19:10:07 -05:00
Kyle Evans
26490d9b74 pkgbase: allow update-packages for first-run of packaging
If ${REPODIR}/${PKG_ABI} does not exist when we begin real-update-packages,
skip the comparison with the non-existent previous repository and just
finish the repo off. This allows external scripts to just assume they can
run `update-packages` rather than figuring out if they'd previously run
`packages` for this Version/Arch combo.

PKG_VERSION_FROM_DIR was added so that we could perhaps detect the three
distinct cases:

1.) If the repo has not yet been created, PKG_VERSION_FROM_DIR will be
  empty.
2.) If the repo is in some intermediate state between created and fully
  initialized, PKG_VERSION_FROM_DIR may point to the ABI directory.
3.) If the repo is fully initialized, then PKG_VERSION_FROM_DIR points to
  the latest build to compare to.

Option #2 is explicitly unhandled at the moment, but this is no different
than it was before.

Reviewed-by:	manu
Differential-Revision:	https://reviews.freebsd.org/D28229
2021-01-20 21:58:30 -06:00
Emmanuel Vadot
613fe5321f pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases
The current postfix conversions are:

  CURRENT / STABLE / PRERELEASE, 12.x-CURRENT becomes 12.snapYYYYMMDDhhmmss
  ALPHAx -> .ax, so 11.3-ALPHA1 becomes 11.3.a1.YYYYMMDDhhmmss
  BETAx -> .bx, so 12.1-BETA2 becomes 12.1.b2.YYYYMMDDhhmmss
  RCx -> .rcx, so 13.0-RC3 becomes 13.0.rc3.YYYYMMDDhhmmss
  RELEASE -> (nothing), so 12.1-RELEASE becomes 12.1
  RELEASE-pX -> pX, so 12.1-RELEASE-p1 becomes 12.1p1

Note that for development branches we will start to drop the minor version
component entirely, which more closely matches how these branches are
physically named (stable/NN).

snap is a new prefix that was added to pkg in [0], which is simply a more
verbose version of the current ".s" used.

As noted, build timestamps are also added to ALPHA/BETA/RC versions.  This
is largely irrelevant for re@ snapshots because they will only produce one
set of snapshots for each alpha/beta/rc, but external folks may produce
multiple in that timeframe -- at least for alpha.  For them, it is
imperative that the builds have a differentiating characteristic like this
rather than multiple builds across multiple revisions being versioned
identically.

[0] https://github.com/freebsd/pkg/pull/1929

Reviewed by:	gjb, manu
Submitted by:	rene (original, original version)
Differential Revision:	https://reviews.freebsd.org/D28167
2021-01-18 22:26:22 -06:00
Kyle Evans
95ae95d413 pkgbase: limit PKG_VERSION_FROM calculation to real-update-packages
PKG_ABI is defined in some other targets that do not need to shell out and
calculate PKG_VERSION_FROM. Moreover, it produces extra errors when
bootstrapping an initial pkgbase repo, as the /latest link doesn't exist
yet.
2021-01-18 13:34:54 -06:00
Kyle Evans
da8cc827ae pkgbase: collapse -PRERELEASE into STABLE/CURRENT case for version suffix
-PRERELEASE exists as a given stable/X branch while the next minor version
release is in progress. From a functional standpoint, it should be treated
as -STABLE since it'll typically be a superset of what's included in the
concurrent releng branch.

Reviewed by:	gjb
Differential Revision:	https://reviews.freebsd.org/D28166
2021-01-17 14:08:13 -06:00
Kyle Evans
9af9e7c5cc pkgbase: default to installing all specified kernels
These only get staged off to the side, not installed into the system. Let's
change the default for packages/update-packages to be less surprising.

MFC after:	1 week
Reviewed by:	manu, meena <me igalic co>
Differential Revision:	https://reviews.freebsd.org/D28190
2021-01-17 14:05:33 -06:00
Emmanuel Vadot
03cab14ea3 Revert "pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases"
This reverts commit aef769614f.

While the package names are a bit prettier this confuse pkg about upgrading :
$ pkg version -t 13.0.s2021011313063 13.0.a1
>
$ pkg version -t 13.0.s2021011313063 13.0_ALPHA1
<

Note that the current scheme isn't good when bumping from ALPHA to BETA or
even BETA to RC:
$ pkg version -t 13.0_ALPHA1 13.0_BETA1
=
$ pkg version -t 13.0_BETA1 13.0_RC1
=

But more thoughts have to be put into this renaming.
2021-01-14 14:15:05 +01:00
Emmanuel Vadot
aef769614f pkgbase: differentiate package versions for ALPHA/BETA/PRERELEASE/RC phases
The current postfix conversions are:

    CURRENT / STABLE -> .sYYYYMMDDhhmmss
    ALPHAx -> .ax, so 11.3-ALPHA1 becomes 11.3.a1
    BETAx -> .bx, so 12.1-BETA2 becomes 12.1.b2
    RCx -> .rcx, so 13.0-RC3 becomes 13.0.rc3
    PRERELEASE -> .p, so 11.3-PRERELEASE becomes 11.3.p
    RELEASE -> (nothing), so 12.1-RELEASE becomes 12.1

Submitted by: rene (original version)
Differential Revision: https://reviews.freebsd.org/D20734
2021-01-14 14:00:04 +01:00
Bryan Drewery
44b8b2a00d Makefile.inc1: Avoid using release/Makefile for VERSION.
release/Makefile.inc1 has git executions that were being ran for each of
these lookups.  The results were not needed so just lookup what we want
directly instead.

Reviewed by:	gjb, rlibby, emaste (maybe)
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D27643
2021-01-08 14:33:35 -08: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
94ffff68c8 Stop passing MK_WARNS=no for bootstrap tools
I got annoyed by the number of warnings that the CheriBSD build was
emitting. It turns out that we are emitting lots of warnings during
bootstrap because bootstrap tools are built with the default compiler
flags and ignore the warnings flags that are set in bsd.sys.mk.

Looking at git blame, it appears that MK_WARNS=no has been passed since
rS112869, replacing the -DNO_WERROR option that was added in rS87775.

This commit changes MK_WARNS=no back to -DNO_WERROR. We need to pass
-DNO_WERROR, since the system compiler might have new warnings that we
don't know about yet, and we shouldn't fail the build in that case.

Reviewed By:	imp, brooks
Differential Revision: https://reviews.freebsd.org/D27598
2021-01-07 09:31:03 +00:00
Alex Richardson
0cace0bb0a Add mkimg to the list of bootstrap tools
Having this as part of the bootstrap tools is useful to build disk images
to boot in QEMU (especially when building on a Linux/macOS host where
mkimg is not available). We have been bootstrapping mkimg in CheriBSD for
a long time (using LOCAL_XTOOL_DIRS) but I believe this is also useful
upstream.

Reviewed By:	emaste, brooks
Differential Revision: https://reviews.freebsd.org/D27602
2021-01-07 09:26:21 +00:00
Toomas Soome
f1829643c4 vtfontcvt is part of bootstrap toolset and should always be built
Reported by: Peter Jeremy
2021-01-06 14:52:13 +02: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
Emmanuel Vadot
4401fa9bf1 pkgbase: rename PKGSIGNKEY to PKG_REPO_SIGNING_KEY
this way, it'll be automatically picked up by poudriere
That's quite handy when building pkgbase!

Submitted by:	Mina Galić <me@igalic.co>
Reviewed By: bapt, bcr (manpages)
Differential Revision: https://reviews.freebsd.org/D27690
2021-01-04 16:24:14 +01:00
Ed Maste
fe7dff1759 Remove additional GDB leftovers missed in r368667 2020-12-15 18:12:03 +00:00
Alex Richardson
f7ff7baaf6 crunchgen: fix NULL-deref bug introduced in r364647
While porting over the local changes from CheriBSD for upstreaming, I
accidentally committed a broken version of find_entry_point(): we have to
return NULL if the value is not found instead of a value with
ep->name == NULL, since the checks in main were changed to check ep instead
of ep->name for NULL.

This only matters if the crunched tool cannot be found using normal lookup
and one of the fallback paths is used, so it's unlikely to be triggered
in rescue. However, I noticed that one of our CheriBSD test scripts was
failing to run commands under `su` on minimal disk images where all
binaries are hardlinks to a `cheribsdbox` tool generated with crunchgen.

This also updates the bootstrapping check in Makefile.inc1 to bootstrap
crunchgen up to the next version bump.

Reviewed By:	kevans
Differential Revision: https://reviews.freebsd.org/D27474
2020-12-04 15:53:37 +00:00
Bryan Drewery
80cedb809f Add lists for customizing legacy and bootstrap-tools.
Reviewed by:	arichardson
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D27200
2020-11-20 20:11:59 +00:00
Alfredo Dal'Ava Junior
4ae78e70f7 [POWERPC64LE,POWEPCSPE] set default kernel config for powerpc64le and powerpcspe variants
Default KERNCONF for powerpc64le should be GENERIC64, and powerpcspe should
select MPC85XXSPE

Reviewed by:	bdragon,emaste
Sponsored by:	Eldorado Research Institute (eldorado.org.br)
Differential Revision:	https://reviews.freebsd.org/D27257
2020-11-20 18:42:01 +00:00
Alex Richardson
0e55bb7b24 Makefile.inc1: remove no-longer required variable
This variable is unsed since r364760 but I forgot to delete it in that commit.

Reported By:	bdrewery
2020-11-13 13:18:48 +00:00
John-Mark Gurney
8da6fc4d79 fix the docs, this was always wrong... In some cases, DISTDIR is set
automatically by tools via /etc/make.conf, so remind people (me) where
to find where it's set..

It would be nice for someone to document what DISTDIR is better than:
where the file for a distribution gets installed
2020-11-04 23:26:15 +00:00