From nobody Tue May 05 01:21:34 2026 X-Original-To: dev-commits-src-all@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 4g8ghZ2Sb4z6ctqN for ; Tue, 05 May 2026 01:21:34 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g8ghZ1J0Nz4Cch for ; Tue, 05 May 2026 01:21:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777944094; 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=8//T+VaHqhczEYMX6uVuENe8UBEUqvLztIoGlFF3vY4=; b=smpLt6tyxjR+WRKmR0uXV+jsxW8A7z2dvhS//sR5RojJ7MlvX6bsGmtGnihfzaZ4IatOam 3icmwCV7ZgtPUJ8yYdnB8aXX4JPId3DB6a8N5V3Q8Gc1YoiCQBh04fX6aQz8LvP0D+1qg6 p61/8aWYHbxQV+NwzYEKc3GRbdubAaB20Yj+OrH9oIOV6OVUDYFYmikHEU5i61lMBJi1RO e5PdUrgVV9G8qRX8ru+tWwNzePglL9gIPqFS65zi4VqabWLg9A4X7XPEa+2jwl1LADVO4N vnG24nK41lbrW7sXH09A3sfZEOn2ejv7jfMGHnHqHdAtAWtvigVvYhwd8Cw87A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777944094; a=rsa-sha256; cv=none; b=rgvigQLZvIs2jut8yXb+pyfFuIeZdXboCapVXQPUSHFLNiu+KXh5fzR65QSbMNx13NjAbo jk/VcmW9qN3bmXfHgbMbZuvvdjOffuIHj/0gUlgsEG7YKUTYlUYP4/Hc4U5GXUl8645XqL Zv2hmHIevbaewhdNVko0UWdxvg+u6o0OBj7Jc2iFelwsf/65zwqZoW0m0ysH9xrMz9laUV Bd8DC3IU7TWg/2Y2XsQzVFhJoNOZx6fY1qVejx6bBOvcZ49sCcczuYAsDAybyE6mYbUuzJ dDWK3X8wAPQSXpSM9TOKJvqjFsjwFodGX6vm5u4DiajM5D3i6bE6+y3PYQfAeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777944094; 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=8//T+VaHqhczEYMX6uVuENe8UBEUqvLztIoGlFF3vY4=; b=uxSwXUPRjU2HbJNef7YcAB7eu7nUZedug05YApRP2wTDP0o3erI+m2AlFyR5xakcNS4pY9 qUYEB5LdRCrORYCIy9si3BWI2FmI7gaQIsGeDWf7DFy4ylNneSPnVDN1zFp/23pNThQWcV elmhQOmUmgC0nIXdBchI42lC8GrjUySsFnXm2WTc/TBHQSxfLZToyvUrn6qwaFirTkaycX 6VPw2LyqH5tI9M45PSiewFVX9u1+ZS1Ue9ouLz5Da+7ylw0oRmG0lZkJ6BSvPiexr2DvGL +WRFA/0MW8lefbhtyxz5c9CB3UHiBFTCjpj/eYuwce+I5PDQBCPOtP8NHLEoGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g8ghZ0hdzzlwD for ; Tue, 05 May 2026 01:21:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ca3e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 05 May 2026 01:21:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 8e8d87856241 - main - packages: Make create-sets.sh more robust during release List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e8d87856241f69c277dc5fab48c5c66312475d6 Auto-Submitted: auto-generated Date: Tue, 05 May 2026 01:21:34 +0000 Message-Id: <69f9461e.3ca3e.480fc28@gitrepo.freebsd.org> The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=8e8d87856241f69c277dc5fab48c5c66312475d6 commit 8e8d87856241f69c277dc5fab48c5c66312475d6 Author: Lexi Winter AuthorDate: 2026-05-05 00:31:20 +0000 Commit: Lexi Winter CommitDate: 2026-05-05 00:32:34 +0000 packages: Make create-sets.sh more robust during release Commit d1c176fedfc9 made create-sets.sh exit when it encounters an error, instead of creating an empty repository. However, this turns out to cause some issues: 1. A package not having any sets is considered an error, but during the release build, we stuff a 'pkg' package into the repository which doesn't have any sets, which causes a failure. Avoid this by simply ignoring the pkg package. 2. No error was printed in this case, which made the problem hard to diagnose. Add an explicit error message. 3. A similar problem occurred running on a repository which already contained sets, which is not usually done during the build, but is not necessarly an inappropriate thing to do. Fix this one by ignoring set packages when looking for sets. While here, fix another issue that might cause packages to be wrongly skipped if the path to the repository contains a '-' character, since we didn't strip the path before testing the package name. PR: 294966 Fixes: d1c176fedfc9 ("packages: Make create-sets.sh more robust") MFC after: 2 weeks Reported by: Alastair Hogge Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D56792 --- release/packages/create-sets.sh | 52 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/release/packages/create-sets.sh b/release/packages/create-sets.sh index 3dfd8f1a3388..88d4020d8413 100755 --- a/release/packages/create-sets.sh +++ b/release/packages/create-sets.sh @@ -35,17 +35,61 @@ repodir="$1"; shift # generate-set-ucl.lua. UCL_VARS="$@" +# Extract PKG_NAME_PREFIX so we can use it later. +PKG_NAME_PREFIX="" +set -- $UCL_VARS +while [ -n "$1" ]; do + case "$1" in + PKG_NAME_PREFIX) + shift + PKG_NAME_PREFIX="$1" + break;; + *) + shift; shift;; + esac +done +if [ -z "$PKG_NAME_PREFIX" ]; then + printf >&2 '%s: PKG_NAME_PREFIX must be specified\n' "$0" + exit 1 +fi + # Nothing is explicitly added to set-base, so it wouldn't get built unless # we list it here. SETS="base base-dbg base-jail base-jail-dbg" for pkg in "$repodir"/*.pkg; do - # If the package name doesn't containing a '-', then it's - # probably data.pkg or packagesite.pkg, which are not real - # packages. - { echo "$pkg" | grep -q '-'; } || continue + # Check if we should process this package. + case "${pkg##*/}" in + # When building release, we add a 'pkg' package to the repository, + # but this isn't a base package and doesn't have a set. To avoid + # this causing an error, skip it. + pkg-*) continue;; + + # Any existing set packages may also have no sets (and even if they + # do, they shouldn't be included here). + ${PKG_NAME_PREFIX}-set-*) + continue;; + + # If the package name contains a '-', process it. All "real" + # packages contain a '-', because the package filename format + # is -.pkg, so this skips files which aren't + # really packages, like data.pkg or packagesite.pkg. + # + *-*) ;; + *) continue;; + esac + + # Print a useful error message instead of failing silently if + # grep doesn't find any sets here. + set +e _tmp="$(${PKG_CMD} query -F "$pkg" '%At %n %Av' | grep '^set ')" + if [ -z "$_tmp" ]; then + printf >&2 '%s: package has no sets: %s\n' "$0" "$pkg" + exit 1 + fi + set -e + set -- $_tmp pkgname="$2" sets="$(echo "$3" | tr , ' ')"