aboutsummaryrefslogtreecommitdiff
path: root/release/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* release: stop disabling sendmailBaptiste Daroussin2026-01-071-3/+0
| | | | | | | | | sendmail is already disabled by default everywhere since 14.0 MFC After: 1 week Approved by: emaste (re) Reviewed by: emaste (re) Differential Revision: https://reviews.freebsd.org/D54575
* release: Use make's `:H` rather than `/..`Ed Maste2026-01-051-2/+2
| | | | | | | | | In general we want to strip subdir components, rather than appending `..`s. Reviewed by: lwhsu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54373
* release: Add WITHOUT_QEMU to IMAKEColin Percival2025-11-071-1/+1
| | | | | | | | | | We have NO_ROOT here, so we need WITHOUT_QEMU to avoid problems. 15.0 candidate. Reviewed by: emaste, markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D53637
* release: Add pkg .conf to METALOG on dvdColin Percival2025-10-201-0/+2
| | | | | | | | | | | | We're correctly recording all of the packages in the dvd METALOG file, but if we don't record ./packages/repos/FreeBSD_install_cdrom.conf then users won't be able to install them very easily. Reviewed by: markj Reported by: Lars Tunkrans MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D53199
* release: Fix dependency orderingColin Percival2025-10-081-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'make release' command triggers some sub-builds, in particular 'real-release' (which builds install images) and 'vm-release' (which builds VM images). These both now depend on pkgbase-repo. Unfortunately for historical reasons 'make real-release' has used a recursive make instead of proper make dependencies; this results in the pkgbase-repo target being invoked twice since the recursive make does not have any awareness of the targets being run by the parent make command. Since the pkgbase-repo target starts by creating the pkgbase-repo directory, the second make command incorrectly assumes that target has already been built; this showed up in 15.0-ALPHA5 builds with pkgbase-repo.tar being empty as it was created after the pkgbase-repo directory was created by before that directory had been populated. Change real-release: make obj make ${RELEASE_TARGETS} to a single line real-release: obj .WAIT ${RELEASE_TARGETS} in order to handle dependency deduplication properly while keeping the intended behaviour that "obj" completes before ${RELEASE_TARGETS}. Diagnosed by: jrtc27, emaste Reviewed by: emaste MFC after: 1 day Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D52972
* release: Publish pkgbase-repo.tarColin Percival2025-10-041-1/+13
| | | | | | | | | | | | | This is a tarball containing the pkgbase repository for the release. Note: This is an uncompressed tarball, because all of its constituent .pkg files are already compressed; there's no point adding another layer of compression. Reviewed by: ivy MFC after: 1 minute Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D52899
* release: Respect NODISTSETSColin Percival2025-10-031-1/+6
| | | | | | | | | In addition to not putting distribution sets onto ISO images, if NODISTSETS is set then we should not build the distribution sets or put them onto the "FTP" site (aka download.freebsd.org). MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva
* release: Check for empty NODISTSETSColin Percival2025-10-031-4/+4
| | | | | | | | Treat an empty NODISTSETS the same as if it is not defined; this avoids problems if a script calls 'make release NODISTSETS=${NODISTSETS}'. MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva
* release: Consolidate pkgbase-repo dependencyEd Maste2025-10-031-3/+8
| | | | | | | | | Use the same approach for pkgbase-repo-dir as for the packagesystem dependency. Reviewed by: Isaac Freund <ifreund@freebsdfoundation.org> Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52884
* release: Fix NO_ROOT cross-building VM imagesEd Maste2025-10-031-7/+8
| | | | | | | | Pass PKG_ABI to virtual machine image builds. Reviewed by: cperciva Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52874
* release: Install pkg(8) from the release repo on bootonlyLexi Winter2025-10-021-3/+8
| | | | | | | | | | | | | | Although bootonly doesn't contain an offline package repository, we still want pkg installed so the user can use it to repair an existing system. Installing it from the release repository ensures it's always available without depending on pkg.freebsd.org. While here, fix a typo in PKGBASE_REPO_ARGS. MFC after: 3 seconds Reviewed by: cperciva Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52848
* pkgbase-stage: Use unique PKG_DBDIRColin Percival2025-09-271-3/+3
| | | | | | | | | | | | | | | | | | Prior to this commit, pkgbase-stage.lua used a hard-coded PKG_DBDIR "./pkgdb"; unfortunately this creates a race condition if we start building disc1.iso and dvd1.iso at the same time pkg: sqlite error while executing CREATE TABLE licenses [...] in file pkgdb.c:2330: table licenses already exists since pkg checks to see if the pkgdb is initialized and initializes it if not. Use separate pkgdb-disc1 and pkgdb-dvd directories. MFC after: 1 minute Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D52755
* release: create pkgbase VM and cloud imagesIsaac Freund2025-09-251-1/+2
| | | | | | | | | | | VM and cloud images are now built as packaged base systems by default, matching the default for installation media. Setting -DNOPKGBASE allows building as non-pkgbase systems. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51483
* release: create pkgbase repo config from MakefileIsaac Freund2025-09-251-7/+15
| | | | | | | | | This will allow the VM image build scripts to use the same repository config file for installing base system packages at build time. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51482
* release: Install pkg from the pkgbase repoLexi Winter2025-09-241-5/+19
| | | | | | | | | | | | | | | | If we're building pkgbase media, install the pkg package from the pkgbase repository we already created, not from pkg.freebsd.org. Aside from being more desirable, this also fixes make release for version/architecture combinations which are missing repository on pkg.f.o (which is nearly all of them at the time of writing). This doesn't yet work for bootonly, since we don't build the pkgbase repository there. For now, restore the old behaviour of attempting to install pkg from pkg.freebsd.org for bootonly. MFC after: 1 day Reviewed by: ifreund_freebsdfoundation.org, cperciva (previous version) Differential Revision: https://reviews.freebsd.org/D52637
* release: Fail the build if pkg can't be installedLexi Winter2025-09-241-3/+3
| | | | | | | | | | | | If we can't install pkg(8) on the media, instead of ignoring the error, fail the build. This avoids silently creating media which doesn't have pkg(8) on, and therefore can't be used for a pkgbase install. Installing pkg(8) can still be entirely disabled by setting NOPKG. MFC after: 1 day Reviewed by: ifreund_freebsdfoundation.org, cperciva Differential Revision: https://reviews.freebsd.org/D52635
* pkgbootstrap: Gate building from portsColin Percival2025-09-191-1/+2
| | | | | | | | | | | | | | | | | In release builds we want to build pkg from the ports tree for reasons mentioned in a previous commit; but non-release pkgbase builds may be just fine with installing pkg from pkg.freebsd.org. Gate it behind BOOTSTRAP_PKG_FROM_PORTS rather than building form ports any time we have a ports tree available. While I'm here, make the pkgbase-repo target in release/Makefile create the temporary directories we need for building. Reviewed by: ivy MFC after: 6 hours Sponsored by: https://www.patreon.com/cperciva Fixes: 2c06b824436d ("pkgbootstrap: Build pkg if PORTSDIR exists")
* pkgbase: Don't include pkg by defaultColin Percival2025-09-191-1/+2
| | | | | | | | | | | We need to put pkg into the pkgbase repository for release builds, but not for non-release pkgbase builds. Gate the contents of package-pkg behind INCLUDE_PKG_IN_PKGBASE_REPO=YES and set that when building releases. Reviewed by: ivy MFC after: 6 hours Sponsored by: https://www.patreon.com/cperciva
* release: Always dist sets on dvd1Colin Percival2025-09-181-2/+0
| | | | | | | | | | | In the !NOPKGBASE && !NODISTSETS case, we only want the pkgbase repo on disc1; but we want both packaging formats on dvd in order to allow for offline installs in both methods and also tools which ingest the dist sets from the dvd image. MFC after: 12 hours Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D52537
* release: Make PKGBASE the defaultColin Percival2025-09-181-6/+6
| | | | | | | | | | | Replace the PKGBASE option by a NOPKGBASE option. Check for both whether the option is defined and whether it is empty, since when running from release.sh we always define NOPKGBASE. MFC after: 12 hours Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D52536
* release: Pass ABI to running pkgbase-stage on dvdColin Percival2025-09-161-1/+1
| | | | | | | | I did this for disc1 but forgot to amend the dvd invocation. Fixes: 340e68fd7c0d ("release: Pass ABI to pkgbase-stage.lua") MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva
* release: CLEANDIRS += pkgdbColin Percival2025-09-141-1/+1
| | | | | | | This directory gets created by pkgbase-stage.lua. MFC after: 3 days Sponsored by: https://www.patreon.com/c/cperciva
* release: Pass ABI to pkgbase-stage.luaColin Percival2025-09-141-1/+1
| | | | | | | | | | | | We then pass ABI from pkgbase-stage.lua to pkg(8); without this, cross-building releases with PKGBASE enabled fails with pkg: wrong architecture: ... pkg: repository FreeBSD-base contains packages with wrong ABI: ... MFC after: 1 minute Discussed with: emaste, jrtc27 Sponsored by: https://www.patreon.com/c/cperciva
* release: make symlink creation for src.tgz more robustWolfram Schneider2025-07-221-2/+4
| | | | | | PR: 288256 Approved by: emaste Differential Revision: https://reviews.freebsd.org/D51335
* release: Install wireless firmware to bootonly mediaJoseph Mingrone2025-07-181-0/+1
| | | | | | | | | | | Also install wireless firmware packages to the bootonly ISO and the mini-memstick image so users can fetch installation files over a wireless connection. Reported by: Mark Philips <mark@freebsdfoundation.org> Reviewed by: bz, emaste, imp, releng (cperciva) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51348
* release: Sort loader.conf lines consistentlyEd Maste2025-07-161-1/+1
| | | | | | | | | loader_brand was in a different spot in the dvd image compared to the others. Reviewed by: jrm Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51342
* release: Fix dvdrom building dependencyKrzysztof Galazka2025-06-261-1/+1
| | | | | | | | | | | | | | While building legacy dist sets incorrect target 'dvd1' was used to set dependency on packagesystem. Because of that generated archives were incomplete and MANIFEST file was missing. Signed-off-by: Krzysztof Galazka <kgalazka@FreeBSD.org> Fixes: 3f494a4e5ce0 (release: Add NODISTSETS to skip legacy dist sets) Reviewed by: emaste Approved by: kbowling (mentor), erj (mentor) Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D51062
* lualoader: Add distinct brand for installerJoseph Mingrone2025-06-241-0/+3
| | | | | | | | Make it obvious to users that the system is booting into the installer. Reviewed by: kevans, manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51001
* release: Add NODISTSETS to skip legacy dist setsEd Maste2025-06-231-3/+16
| | | | | | | | | | `make -DPKGBASE -DNODISTSETS` can now be used to build an installer without any support for dist sets. Reviewed by: Isaac Freund <ifreund@freebsdfoundation.org> Event: Kitchener-Waterloo Hackathon 202506 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50919
* release: Refactor dist set logicEd Maste2025-06-171-19/+14
| | | | | | | | | | | | | | | | Add to the METALOG immediately following the operation itself to make the logic easier to follow. Fuse adjacent identical loops. Both of these are now possible as we no longer have separate paths for NO_ROOT builds. Move MANIFEST out of the loops for disc1 and dvd1 and copy it explicitly, so that all three MANIFEST operations are identical, and shared by pkgbase and legacy code paths for disc1 and dvd1. Reviewed by: jrm Event: Kitchener-Waterloo Hackathon 202506 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50383
* release: Move -DNO_ROOT and -DDB_FROM_SRC into ${IMAKE}Ed Maste2025-05-271-11/+9
| | | | | | | | | | | | All invocations specified -DNO_ROOT, so simplify by moving -DNO_ROOT directly into ${IMAKE}. Do the same for -DDB_FROM_SRC. Although it was not previously passed for all targets it is appropriate for all release artifact builds. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50356
* release: Add some comments and tidy dist set targetsEd Maste2025-05-261-6/+9
| | | | | Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50458
* release: Avoid pipe in tarball creationEd Maste2025-05-251-6/+5
| | | | | | | | | | | Previously errors from invoking tar for src.txz or ports.txz were eaten by the pipeline. If something fails in creating these tarballs we want the build to fail rather than producing subtly broken artifacts. Use ${TAR_XZ_CMD} to add -J to tar's commandline rather than | xz. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50459
* release: Add ${PKGBASE_REPO} dependency for dvdEd Maste2025-05-211-1/+1
| | | | | | | | | | A user may build only dvd1.iso, which would fail if the pkgbase-repo did not already exist. Builds using `make release` build disc1 before dvd1 so that case would work, but it must be possible to build only one artifact. Fixes: 62d18f8c4c10 ("release: Add -DPKGBASE option to include pkgbase packages") Sponsored by: The FreeBSD Foundation
* release: Add -DPKGBASE option to include pkgbase packagesIsaac Freund2025-05-201-2/+51
| | | | | | | | | | If this option is set, an offline repo of pkgbase packages corresponding to base.txz and kernel.txz will be included in the disc1 release media rather than the base.txz and kernel.txz tarballs. Reviewed by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50346
* release: Use pkg install -fIsaac Freund2025-05-141-1/+3
| | | | | | | | | | | | | | Without -f, pkg will not write to the METALOG file if the packages are already installed from a previous build, causing the packages to not be included in the final install media. Official builds start with a clean target directory and won't encounter an issue, but this change supports iteration in development of the release targets. Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50344
* release: Pass -DNO_ROOT to dvd1 installworld/installkernelEd Maste2025-05-131-1/+1
| | | | | | | Accidentally lost during a rebase. Fixes: 89cf4b85db40 ("release: Use NO_ROOT mode for dvd1.iso") Sponsored by: The FreeBSD Foundation
* release: Use NO_ROOT mode for dvd1.isoEd Maste2025-05-131-8/+2
| | | | | | | | All ISO/memstick images are now built without requiring root. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50269
* release: Exclude release/obj from the src tarballEd Maste2025-05-131-1/+2
| | | | | | | | | A user may run `make objlink` in release/ in order to have easy access to built release artifacts. We don't want this to appear in src.txz. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50262
* release: Pass -N to pkg-stage if NO_ROOT setEd Maste2025-05-121-5/+1
| | | | | | | PR: 283387 Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50268
* release: Use unprivileged mode for disc1 and memstickEd Maste2025-05-071-7/+3
| | | | | | | | | | | | | This same change was made for the bootonly and mini-memstick targets in commit cbba69fb5793. That uncovered some makefs bugs, which are now fixed. As there are no other known issues, extend this to disc1 and memstick images now. The change for the dvd image is waiting on PR 283387. Reviewed by: brooks, cperciva Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50179
* release: Always create METALOG for pkg installationEd Maste2025-05-051-1/+1
| | | | | | | | | | | | | | | | We always use METALOG / non-root mode for bootonly.iso, even if not specifically requested by the user (via setting NO_ROOT ). Thus, add `-o METALOG=METALOG` to PKG_ARGS unconditionally so that the METALOG will be available when building bootonly.iso. This might result in a spurious METALOG temporarily appearing on some other release artifacts. This will be addressed once all release targets migrate to non-root mode (currently blocked on PR 283387). PR: 286528 Reviewed by: bz, cperciva Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50159
* release: install pkg to install mediaIsaac Freund2025-04-251-0/+7
| | | | | | | | | | This is the most straightforward way to make installation of base system packages from install media possible. Bootstrapping pkg at install time does not work since the root filesystem of install media is immutable. Reviewed by: bz, cperciva, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49968
* release: Emit warning if NO_ROOT used with pkg-stageEd Maste2025-04-151-0/+3
| | | | | | | | | pkg-stage.sh (used by the disc1 build) does not currently support METALOG output for NO_ROOT builds. Emit a warning for this case. PR: 283387 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49785
* release: Use unprivileged mode for bootonly and mini-memstickEd Maste2025-03-071-7/+3
| | | | | | | | | | This in effect always builds these targets in NO_ROOT mode, removing one more instance where release artifact builds require a privileged user (root). These artifacts are now always built the same way. Reviewed by: brooks, Pat Maddox <pat@patmaddox.com> Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48121
* vmimage.subr: Redirect etcupdate log to stdoutColin Percival2025-01-301-1/+1
| | | | | | | | | | While we're here, send the etcupdate log from generating base.txz to stdout instead of /dev/null (see e972e408d19a) as well. Reviewed by: emaste, gordon, jrtc27 MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D48719
* release: Sort etcupdate entries for base metalogPat Maddox2024-12-161-2/+3
| | | | | | | | Supports reproducible builds. PR: 283214 Reviewed-by: emaste Signed-off-by: Pat Maddox <pat@patmaddox.com>
* release: Always use NO_ROOT for distribute* and package*Ed Maste2024-12-131-7/+5
| | | | | | | | | | | | | | | We used to have two different code paths for generating release media dist sets, one which expected to run as root, and one which did not. It was possible that the two different paths could generate different results. We can use the path that does not *require* root also when running as root, so use it always. We'll want to do eventually do the same for all release targets, but these ones are an easy place to start. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48041
* Clean pkg cache in release mediaMuhammad Moinur Rahman2024-12-101-0/+3
| | | | | | | | | | | | | | | Recently wifi-firmware-kmod-release pkgs were added in the release installation media, but unfortunately the pkgs were not cleaned up after the installation. These kept the stale pkgs in the /var/cache. The pkgs should be removed with pkg clean. PR: 283112 Reported by: yanhui.he@broadcom.com Reviewed by: cperciva, emaste Approved by: cperciva, emaste, re (implicit) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47942
* release: Don't break if firmware install failsColin Percival2024-11-211-2/+2
| | | | | | | | | On some platforms (e.g. powerpc) we don't have packages, so we can't install them onto the ISOs. Proceed with building the images anyway. Reported by: Weekly snapshot builds Fixes: 7e2996c1f5b4 ("release: install wireless firmware onto disc1 and dvd") MFC after: 1 minute