From nobody Thu Sep 25 19:15:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cXk1q2YKXz68T8k; Thu, 25 Sep 2025 19:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cXk1q1SHMz41bG; Thu, 25 Sep 2025 19:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758827711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LlIBjju8wwwePabyul9Eayv4eZ4TKaqeKN58rOUG9h4=; b=irnBPzaIUphN4AbyVwnynpqeqXsCvyBaq+TGWt5GtTOPLNpiRqxRE4PNmu6uko1nNMhuEs 22Q2WFuqJtnIKz5QHDVL/Mzcrx+nzSAaBqT80xTxeH0re83jZVlGg0E71wejhzqaxLuwRY TlZEf2AQ2anpo6TuS7I9PudzYNLqxALkC2AiSLNq/9PnO1DRJKbppcE8PYzhYMlU+fEA6U wTLueuT/FTr7bceMNUSRxd1vb56WoNzGaK4rASEZTHkKhMGrIlFE8zSPBjTW8NotHFALaG XHnwkzovSajSvSR+NYftshPbP8oCim0Dpkum/IG0wiqah5m1aHbGjuQq+ILyjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1758827711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LlIBjju8wwwePabyul9Eayv4eZ4TKaqeKN58rOUG9h4=; b=qrUAWCu2awjZ5fmha6du4h2q4GTF3SryIQ2i+XFLa0W6AF40CDtAYTEB+4uRzSkd48FyQ3 KUTWVfRwr1njSMi5HJZYTB2rbCCteabYRxrVBB/C7XZZljXJlY9uFyCTx2xi2qhW4h5LLy 4EV5GdnBMZlOYQQD6cf8Czf5rKDIUwZWYCHAcLwzpLAnRHXCFLSO5X1yLGczfhF45kgB8e fzlUh8Cc0Ti+m5aRWkPVUj8OtwuB0zW8LizZKKRYyQV2h+93LGA2xbaT8eJW7CZgZ2ztQU qp5AH+lB3zV0SL8n835O3iWhQyhuaS3WWJ03pjepuG1KL8xsCHbR1o3nQiJeGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1758827711; a=rsa-sha256; cv=none; b=nlGNfazjxmaFGJHUsdgWhDYVQu8J8sC5J9cgOJAMB+AKjwPBLXJCwlcyJP5LfRf6XELEz0 Ij7ujwl3I2R02DGYgLj00DYl3LNjaklU0ErwvesiFlY+sdCkY4+2GeRKgOVcRSAiPrkXZ2 Hr3m8CAnNyASiSf01CGpKb24UJ9WZl8wVT2YjW5deUdqVsRBetth3QCM2vDmNm1PzZGEOM 4OSsHpZSnljOMyvx8ZQkW5EWkoRQILRjVIN+uobTp0Uk7f/p2V+wyzAQb/qHew1IV51I2A nk6ZBStSPtk0ofWdjvWPgWcDXoG8SvFUW9rTN+3RBPuWeFig2Nkhzts1QclTfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cXk1q0yGmzK8; Thu, 25 Sep 2025 19:15:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58PJFBD8040415; Thu, 25 Sep 2025 19:15:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58PJFBjB040412; Thu, 25 Sep 2025 19:15:11 GMT (envelope-from git) Date: Thu, 25 Sep 2025 19:15:11 GMT Message-Id: <202509251915.58PJFBjB040412@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 7e8fb7756c3e - main - build.7: Improve building pkgbase List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7e8fb7756c3ed89a2141b923e6da1b6fd96f509c Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=7e8fb7756c3ed89a2141b923e6da1b6fd96f509c commit 7e8fb7756c3ed89a2141b923e6da1b6fd96f509c Author: Alexander Ziaee AuthorDate: 2025-09-25 12:19:52 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-25 19:14:26 +0000 build.7: Improve building pkgbase The packages target was previously listed under kernel, move it to the general source make targets listing. Add the update-packages target as well. Adjust the release building targets with package in their names to clarify they are unrelated to pkgbase. Add the OBJROOT and REPODIR variables to ENVIRONMENT. MFC after: 3 days Reviewed by: ivy, markj (both previous versions) Suggestions by: des, emaste, ivy, kevans, markj Fixes: 1d26746cfd4a (Document the packages target) Fixes: 0ac8aa55da1c (Add incremental packages) Fixes: 26490d9b74f0 (allow update-packages for first) Differential Revision: https://reviews.freebsd.org/D50289 --- share/man/man7/build.7 | 75 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 24 deletions(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index bfe464d4448e..5e15a528246b 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 24, 2025 +.Dd September 25, 2025 .Dt BUILD 7 .Os .Sh NAME @@ -278,13 +278,31 @@ defaults to and .Sy TARGET_ARCH must be defined. +.It Cm packages +Create a +.Xr freebsd-base 7 +package repository containing packages that can be +used to install or upgrade the base system. +The repository is created in the object directory, under +.Pa ${REPODIR}/${PKG_ABI} +where +.Ev REPODIR +is the base directory where the repository will be created, and +.Va PKG_ABI +is the +.Xr pkg 7 +ABI for the build target, for example, +.Pa /usr/obj/${SRCDIR}/repo/FreeBSD:15:amd64 . .It Cm packageworld Archive the results of .Cm distributeworld , placing the results in .Va DISTDIR . -This target is used while building a release; see -.Xr release 7 . +This target is used while building a +.Xr release 7 +and is unrelated to building +.Xr freebsd-base 7 +packages. .It Cm installworld Install everything built by a preceding .Cm buildworld @@ -365,6 +383,14 @@ and .Va XDDIR defaults to .Pa ${TARGET_ARCH}-freebsd . +.It Cm update-packages +Create or update the +.Xr freebsd-base 7 +package repository for the base system. +If an old repository is being updated, +then packages whose contents have not changed since the previous version +will be copied into the new repository to avoid needless updating of the +version number. .It Cm xdev-build Builds for the .Cm xdev @@ -411,26 +437,16 @@ Install the kernel to the directory .Pa ${DISTDIR}/kernel/boot/kernel . This target is used while building a release; see .Xr release 7 . -.It Cm packages -Create a -.Xr pkg 7 -repository containing packages that can be used to create or upgrade an -installation of the base system. -The output repository is placed in the object directory, under -.Pa repo/${PKG_ABI} -where -.Va PKG_ABI -is the -.Xr pkg 7 -ABI for the build target, for example, -.Pa /usr/obj/${SRCDIR}/repo/FreeBSD:15:amd64 . .It Cm packagekernel Archive the results of .Cm distributekernel , placing the results in .Va DISTDIR . -This target is used while building a release; see -.Xr release 7 . +This target is used while building a +.Xr release 7 +and is unrelated to building +.Xr freebsd-base 7 +packages. .It Cm kernel Equivalent to .Cm buildkernel @@ -658,11 +674,15 @@ If set, this variable supplies a list of additional directories relative to the root of the source tree to build as part of the .Cm cross-tools target. +.It Va OBJROOT +The object directory root is defined as +.Pa ${OBJDIR}/${SRCDIR}/ . +See +.Pa share/mk/src.sys.obj.mk . .It Va PKG_FORMAT Specify a package compression format when building -.Pa src -into -.Cm packages . +.Xr freebsd-base 7 +packages. Default: .Ql tzst . Consider using @@ -680,9 +700,8 @@ and .Cm installkernel process. This is currently incompatible with building -.Pa src -into -.Cm packages . +.Xr freebsd-base 7 +packages. Each port must be specified as .Ar category Ns Li / Ns Ar port Ns Op Li @ Ns Ar flavor , e.g. @@ -711,6 +730,13 @@ Specify a file to override the default The src.conf file controls the components to build. See .Xr src.conf 5 +.It Va REPODIR +The root directory used to create the package repository for building +.Xr packges 7 . +Defaults to +.Pa ${OBJROOT}/repo/ . +This can also be set in +.Xr src-env.conf 5 . .It Va STRIPBIN Command to use at install time when stripping binaries. Be sure to add any additional tools required to run @@ -1108,6 +1134,7 @@ Study the examples above. .Xr src.conf 5 , .Xr arch 7 , .Xr development 7 , +.Xr freebsd-base 7 , .Xr pkg 7 , .Xr ports 7 , .Xr release 7 ,