From nobody Sat Jul 25 13:08:04 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 4h6lXN56MTz6lNbk for ; Sat, 25 Jul 2026 13:08:04 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h6lXN2bDtz3m5c for ; Sat, 25 Jul 2026 13:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784984884; 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=QBXUVvaXakIgGwOIa6rkMOwXV2rRyE1Q/YrYW8fs2MA=; b=aybtZsEqPy2Z5gwLoLJlSvSFbYERloRexeYiGy7G85xc0luzaaNGDjhLzgAp2DoTdh1L3c FsPfuXDyw9RDdfyrQeeXB2fsQHzfmorBuF5RjXD4TLYF1R3kb1CM8oRMn+RHsrdLD+Tc89 UMINIIZiYyoeFJo2yLn8lfC9vIvl2Xvad3RxtUyIHtLnTjar/W0lO/EqZBvxTAT2/sXRC4 qeMqIjc1wvxJzoD8Lq+IKAytA8Fssg2+DvEkIDJzyYZ5GJWFr0MeT3MMgfjmcuZx7AgqZW QILY4P8gp4neoAMtTxTLl10TvJN7uqzZsyNBqmRDMXan/wPbWQd9S+c1wDq/Dw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1784984884; a=rsa-sha256; cv=none; b=eAbrWNmU0S1dXQID1QswPIqXz3rLFBUZviCg3v1fyAjGPpIhpqVYN1S4hM5k4daU0gW9k9 1dy/p5xNGZ4ODgph+BwUAMoBwYVNl1b1MMw8mBm6mu2PTXFrpa1Wb0MZ3pQUKU8BAoYOht X48JxYy7R2apQm6wdbHhFly18RQdj3dVGRpFF/hggBzcpYBg1SUu7S17f4uzmaq57YennH EI+nMmOzaebpXq9JfChyaBQ8s2Ush1DvQXQkUN+DCcm/N94vPavROhM2lJF2yra5h/SawT XBN23JnQR/OgnEMYun1dJP0AfLg8jDBL6Jr5G/b4shznEM97OhPYtXCkZpD4GA== 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=1784984884; 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=QBXUVvaXakIgGwOIa6rkMOwXV2rRyE1Q/YrYW8fs2MA=; b=NN0DB7EVdk4o79NWvmrYDTEDR7ymvX2OsqamzLIYX2X6A8FBwQjsSOEK8z7/I6T3Tg0AOd X9SBxKqosFoHBUVQJHiDLkMAKBDuimni5WJAfIpKS/bY/gbrnKn21GUfhBFQBor5eC+QIA TV8EPBZ0kTv7+FA2Nkj+q2jjMNqrYEXOrKFwJngDPf0RRXEujAKZjHOKv9AH4nY04d6VyW vQFappXd/BAYBWHFVb9TwdXKCYNa1YrTYNImS9gssUVoZpF9ueSRy6DouzwePqpCwRVyOX EMzn7pwsJ9eGGOupLDH4g/zhpyhet2oWGOySDUb2fEWFC6H1in7D2iQybB/+ww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h6lXN1R2Nzdfm for ; Sat, 25 Jul 2026 13:08:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24074 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 25 Jul 2026 13:08:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Lexi Winter Subject: git: f948e6bda88c - stable/15 - 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/stable/15 X-Git-Reftype: branch X-Git-Commit: f948e6bda88c9f7c294e09528cc431f168c2b3b6 Auto-Submitted: auto-generated Date: Sat, 25 Jul 2026 13:08:04 +0000 Message-Id: <6a64b534.24074.5530e318@gitrepo.freebsd.org> The branch stable/15 has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=f948e6bda88c9f7c294e09528cc431f168c2b3b6 commit f948e6bda88c9f7c294e09528cc431f168c2b3b6 Author: Lexi Winter AuthorDate: 2026-05-05 00:31:20 +0000 Commit: Lexi Winter CommitDate: 2026-07-25 13:01:23 +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 (cherry picked from commit 8e8d87856241f69c277dc5fab48c5c66312475d6) --- 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 , ' ')"