Date: Fri, 25 Jul 2025 15:34:05 GMT From: Ed Maste <emaste@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 00294d7b0a2e - main - bsdinstall: Guard against invalid branch/revision Message-ID: <202507251534.56PFY5PS085339@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=00294d7b0a2e3ae3e870333ef7c8ecbc9fa26da3 commit 00294d7b0a2e3ae3e870333ef7c8ecbc9fa26da3 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2025-07-25 14:56:22 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2025-07-25 15:33:56 +0000 bsdinstall: Guard against invalid branch/revision I somehow ended up with a tree where make -V BRANCH and make -V REVISION were broken, resulting in a FreeBSD-base.conf with a broken repo URL. Check for BRANCH == RELEASE explicitly and emit a warning if BRANCH does not match an expected case. Reviewed by: Isaac Freund <ifreund@freebsdfoundation.org> Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51528 --- usr.sbin/bsdinstall/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile index 75db149b814b..e5bb3197fa05 100644 --- a/usr.sbin/bsdinstall/Makefile +++ b/usr.sbin/bsdinstall/Makefile @@ -22,8 +22,11 @@ REVISION?= ${_REVISION} .if ${BRANCH} == CURRENT || ${BRANCH} == STABLE SUBURL= base_latest -.else +.elif ${BRANCH} == RELEASE SUBURL= base_release_${REVISION:C/[0-9]+\.//} +.else +.warning Invalid branch "${BRANCH}" +SUBURL= base_latest .endif FreeBSD-base.conf: FreeBSD-base.conf.in
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202507251534.56PFY5PS085339>