summaryrefslogtreecommitdiff
path: root/bootstrap/bootstrap
AgeCommit message (Collapse)AuthorFilesLines
2022-11-11bootstrap: Switch to native awk/sed on illumos.jperkin1-3/+34
2022-10-04bootstrap: Add mktools to special preserve handling.jperkin1-3/+9
2022-09-29Remove support for Bitrig.charlotte1-6/+1
2022-09-15bootstrap: Put back /usr/include hack on old OSX.jperkin1-1/+8
2022-09-12macOS: Support MACOSX_DEPLOYMENT_TARGET.jperkin1-1/+13
This allows the user to specify an exact SDK to use, and can be used to build packages for an older release of macOS than the host. The user should ideally set this via environment variable at bootstrap time, and pkgsrc will then encode that into mk.conf and use it for all builds. Tested on macOS 12.x building against an 11.3 SDK for both arm64 and x86_64.
2022-09-09bootstrap: Remove old -isystem hack on macOS.jperkin1-2/+1
This was introduced many years ago in PR#26143 to try and work around a misconfiguration in how Apple's GCC was built at the time. Newer compilers no longer look in /usr/local/include, and this workaround can now be harmful when trying to pick a specific SDK to build against.
2022-06-16Mention why we're doing PREFER_PKGSRC=yes on OpenBSD (at least for now)charlotte1-1/+2
Requested by nia@
2022-06-14bootstrap: Default to PREFER_PKGSRC=yes on OpenBSDnia1-1/+6
2022-04-06README.macOS: nbsed requires no user action, merge comment to bootstrap.schmonz1-2/+3
2022-04-03bootstrap: set CONFIG_SHELL when configuring initial libarchivetnn1-3/+3
Otherwise we might end up with defunct libtool.
2022-04-03bootstrap: OSF1: set shprog to /usr/bin/ksh for the early stufftnn1-2/+3
sh(1) is too broken to run mksh's Build.sh
2022-02-08p.spek@tyil.nl had specifically said to _single_-quote the output ofschmonz1-2/+2
extra_libarchive_depends(). Oops. Now that the problem has bitten me (on Manjaro ARM), I can attest that single-quoting fixes it. Sorry, tyil, and thanks again!
2021-12-28bootstrap: On SCO System V variants, we need either mksh or bash.nia1-1/+13
from Boyd Lynn Gerber.
2021-12-27extra_libarchive_depends() apparently hasn't given multiple values forschmonz1-2/+2
Libs.private before, but it does on Gentoo ("-lmd -lb2"), so failing to double-quote the output breaks bootstrap there. Adding the quotes causes no regressions bootstrapping macOS Monterey or Ubuntu 21.10. Problem report and solution from p.spek@tyil.nl.
2021-11-29bootstrap: Remove unused variable.jperkin1-3/+2
2021-11-12mk/bootstrap: Fix bits for SCO UnixWare 7.nia1-1/+2
Derived from a patch from Boyd Lynn Gerber.
2021-07-13Spaces to tabs (NFCI).schmonz1-3/+3
2021-07-10bootstrap: Add support for --machine-arch override.jperkin1-1/+11
This should not be used under normal circumstances, however on arm64 macOS it is currently impossible to execute native arm64 binaries inside a chroot, and so the chroot must run in x86_64 mode via Rosetta. This causes uname/arch/etc to all report that the system is x86, and so the only way to force MACHINE_ARCH to be set correctly to "aarch64" is using this argument.
2021-05-30Introduce a new SYSCONFBASE variable (defaults to /etc)khorben1-1/+12
This is part 1 to support additional platforms with the RC scripts provided in pkgsrc, in privileged as well as in unprivileged mode, including on NetBSD (with part 2 in pkgtools/rc.subr). This variable is meant to point to the configuration directory of the base system (as opposed to pkgsrc's own prefix) when it should be used by pkgsrc in special cases (e.g. installing RC scripts), or to point to the existing PKG_SYSCONFBASE directory otherwise (e.g. for any unprivileged bootstrap). This teaches pkgsrc where the RC scripts should be installed, and more importantly, where the local copy of rc.subr can be expected. Part 3 will progressively update each and every RC script to substitute this path as expected. No functional changes are intended in privileged mode without a bootstrap. The only variable affected by this change directly is RCD_SCRIPTS_DIR, which currently remains with the same default of /etc/rc.d, and can be overridden as before. When bootstrapping, SYSCONFBASE also remains with the existing default when no prefix is set or is "/usr/pkg" or "/usr"; it is set to $prefix/etc otherwise. It can be specified specifically with --sysconfbase if necessary. Existing installations or bootstraps are not affected, as this change needs setting SYSCONFBASE in the corresponding $sysconfdir/mk.conf to have an impact. Tested in privileged and unprivileged modes on NetBSD/amd64, and unprivileged mode on Darwin/amd64; submitted for review on tech-pkg@.
2021-04-28Don't reject dash as /bin/sh.maya1-14/+2
From a discussion with jperkin, who tested this on bulk builds, the remaining issues with non-BSD echo are in legacy wrappers. Keep the workaround to use bash on Debian GNU kFreeBSD because it still uses legacy wrappers and add a comment that that's why it's there. Now naive usage of bootstrap on many popular Linux distros doesn't require setting an environment variable.
2021-03-15bootstrap: Add MidnightBSD support to bootstrap shell scriptryoon1-1/+6
2021-02-15In the process of looking at PR#55952, we discovered something thatcjep1-1/+31
can catch users out with the two --prefer options. Make the parsing of these better by checking their argument exists and is not another command line option. Addresses PR#55952. Reviewed with jperkin@
2020-12-05bootstrap: Prefer native on Elbrus 2000js1-2/+5
A lot of patches for Elbrus 2000 have not been upstreamed, which results in important packages such as openssl failing to build, while the native one is quite up-to-date and working. Tested building devel/fossil with this, which results in a fully working binary.
2020-10-28Bootstrap: Fix bootstrap on FreeBSD 12.1, likely broken by an issue in lld.maya1-1/+6
It looks like lld doesn't want to statically link a libarchive without resolving all of the symbols, even if only a few symbols are used. In order to resolve all of the symbols, we need to also link with -lmd. One generic way to do so is inspect Libs.private in the pkgconfig file. While pkgsrc is likely not at fault here, having a dysfunctional bootstrap is bad. We should check again in the future to see if this can be removed. Actually fixes PR pkg/55400.
2020-10-07bootstrap: Fix numerical calculation on Big Sur.jperkin1-2/+3
2020-08-29Fix bootstrap on QNXjs1-1/+5
Tested with QNX 6.5.0SP1. Two things were needed: * bootstrap needs to export ACCEPT_INFERIOR_RM_PROGRAM=yes on QNX, because libarchive checks for "rm -f" (with no arguments) working in configure. It doesn't seem to actually use it during the build, so this works. * QNX.sys.mk sets LORDER to echo, but sets TSORT to tsort -q. This results in tsort complaining about having an uneven number of inputs, since of course there are no dependency pairs. Hence, if LORDER is overridden to echo, TSORT also needs to be overridden to cat. Interestingly, Linux.sys.mk also sets LORDER=echo and TSORT=tsort -q, so it's surprising this isn't broken as well?
2020-08-20bootstrap: Default to PREFER_PKGSRC=yes on Linuxbacon1-1/+25
Avoids problems caused by linking against aging enterprise Linux libraries or libraries from Linux package managers that undergo ABI changes outside pkgsrc control. Add --prefer-native flag to bootstrap script so all PREFER_* values can be set during bootstrap. This resolves issues where bootstrap links packages against native libraries and pkgsrc equivalents are installed afterward due to changes to PREFER_NATIVE after bootstrap. Automatically document danger of changing PREFER_PKGSRC or PREFER_NATIVE after boostrap in mk.conf
2020-08-14bootstrap: No need to find packagemaker any longer.jperkin1-13/+1
2020-08-14Retire --binary-macpkg option, which would generate a binary pkgsrcschmonz1-29/+1
bootstrap kit for macOS in the form of a double-clickable .pkg.
2020-07-21bootstrap: Fix machine_arch detection on Apple Silliconsjmulder1-1/+4
machine_arch was empty on Apple Sillicon. We could also use `uname -m` but that returns arm64 which is not accepted by mk/gnu-config/config.sub.
2020-07-15bootstrap: Switch OSF1 to mksh.jperkin1-2/+2
Tested by @astr0baby on Twitter on Tru64 5.1B, where bootstrap fails due to incomplete C99 support for libarchive on the host system, but after mksh has already been built successfully. That leaves only AIX now remaining on pdksh, so if anyone has an AIX system and is able to test a bootstrap run it would be appreciated.
2020-07-07bootstrap: Switch --full over to mksh.jperkin1-2/+2
2020-07-06boostrap: Enable mksh by default on macOS 10.11+.jperkin1-1/+10
El Capitan (10.11) introduced System Integrity Protection (SIP), and one of the side effects of this protection is that system shells (i.e. /bin/*sh) unset any variables that may affect the security of the system. This causes problems with packages that rely on e.g. LD_LIBRARY_PATH. Using a shell outside of the system paths allows us to work around this, at least for now. Tested in bulk builds on macOS Catalina, though with SIP disabled (as there is no way to run sandboxed builds with SIP enabled).
2020-07-06bootstrap: Switch SunOS to mksh.jperkin1-2/+2
Tested in a bulk build on SmartOS, and bootstrap tested on Solaris 9.
2020-07-06bootstrap: Enable support for building mksh.jperkin1-1/+23
Over time, and as they are tested, platforms will be migrated over to shells/mksh ($need_mksh) instead of shells/pdksh ($need_ksh) when a bootstrap shell is required. Once mksh is selected, it takes precedence over pdksh. Our shells/pdksh has been unmaintained for many years and has known issues, shells/mksh is expected to provide a portable, fast, and well maintained alternative.
2020-06-29bootstrap: Overhaul Darwin version selection.jperkin1-15/+16
With the upcoming Big Sur release we can't assume that the major version will always be 10. Creating a combined major and minor version number also allows us to simplify and future-proof some tests. Should be no functional change.
2020-06-29bootstrap: Set some default variables.jperkin1-75/+8
Saves having to duplicate them for every OS, and also removes some obsolete settings, should be no functional change.
2020-05-30bootstrap: Fix default target arch on SunOS.jperkin1-3/+5
Use the kernel architecture via isainfo -k to base our default on, as uname will always return the same result regardless. Ensures we default to 64-bit pkgsrc on amd64, as well as adding support for sparcv9.
2020-05-25bootstrap: Consolidate setting of CC if unset.jperkin1-7/+10
Should fix issue seen on IRIX where --compiler was specified but CC was not passed to bootstrap, resulting in "gcc" being picked as the default.
2020-05-06bootstrap: Use SH for bmake if specified.jperkin1-1/+5
Fixes issue seen bootstrapping on Solaris 9 when bash is available and being used for SH, bmake was still defaulting to /usr/xpg4/bin/sh which dumps core with some of the mk/check infrastructure. Note this is only for the bmake used during the initial bootstrap, the final bmake package will still use the defshell logic in its Makefile.
2020-04-29bootstrap: fix PR pkg/55217triaxx1-2/+2
Move sanitfy check for absolute path of $prefix at a place where we are sure it has been defined to avoid that a bootstrap can be built in a path containing symbolic link when --prefix is not specified and default $prefix is set.
2020-03-26bootstrap: Allow overriding EGREP/FGREP.nia1-1/+9
Makes bootstrapping on minimal Linux systems that don't include these binaries in a normal location less broken. from Michael Forney
2020-03-22bootstrap: create the binary packages before the summary messagerillig1-5/+5
It's strange to see the summary before all the actual work is done.
2020-03-22bootstrap: remove unused BOOTSTRAP_VERSION variablerillig1-3/+1
It had not been updated between 2006 and 2019, and there is no apparent benefit of having this version number.
2020-02-23bootstrap: use $* instead of $@ where appropriaterillig1-6/+6
This runs the echo command with fewer arguments (1 in most cases). The observable behavior is still the same, except for directory names containing spaces, which are not supported anyway.
2019-12-05Skip trying to make use of a 64bit ABI on Darwin as the system libraries onsevan1-7/+2
Tiger lack support and it doesn't work out too great on Leopard either, though it's much better than the former release.
2019-11-05boostrap: need_awk=yes for Arch Linuxtriaxx1-5/+6
Arch uses GNU Awk 5 that breaks some regexps.
2019-09-13bootstrap/bootstrap: prevent --wrkdir from being a symlinkrillig1-4/+3
Without this check, bootstrap will fail later when it builds bootstrap-mk-files in the usual pkgsrc way. There is an additional check in bsd.pkg.mk which then fails. Therefore, better fail fast to save some time.
2019-09-13bootstrap/bootstrap: fix word wrapping in symlink error messagerillig1-3/+3
When $2 is expanded, it is longer than 2 characters, which leaded to an ugly line break.
2019-07-21bootstrap/bootstrap: fix bootstrap on Solaris 10rillig1-3/+8
Fixes pkg/54349.