一键导入
freebsd-update-packages
Update package versions in templates for FreeBSD
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Update package versions in templates for FreeBSD
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Update package versions in templates for Alpine Linux
Update Packer templates for FreeBSD release changes (BETA, RC, RELEASE)
Update Packer templates for Debian minor release changes (e.g., 13.4 → 13.5)
Create Packer templates for a new OpenBSD version based on an existing version
Update package versions in templates for OpenBSD
| name | freebsd-update-packages |
| description | Update package versions in templates for FreeBSD |
Detailed instructions for agent to follow when this skill is activated.
When instructed to update package versions in FreeBSD templates:
install.sh.pkrtpl.hcl. Use the matching
ABI string (for example, FreeBSD:14:amd64) and branch (quarterly
or latest) when constructing package repository URLs.amd64, i386, aarch64).packagesite.pkg once per ABI+branch combination, then
extract packagesite.yaml to
/tmp/pkgver/{ABI}/{branch}/packagesite.yaml. Reuse that file for
all subsequent pkgver.sh calls for the same ABI+branch combination
in the current session.packagesite.pkg files for other ABI
and/or branch combinations, keep a minimum interval of 10 minutes
between consecutive curl requests. Do not delay local reuse of an
already downloaded packagesite.yaml file..pkr.hcl files:
a) Variable-based (preferred): Look for variable blocks with
names like {package}_version (e.g., ca_root_nss_version,
doas_version) that are referenced in environment_vars using
${var.*} syntax.
b) Hardcoded in environment_vars: Look for direct package-version
strings in provisioner "shell" blocks' environment_vars (e.g.,
VIRTUALBOX_OSE_ADDITIONS=virtualbox-ose-additions-nox11-6.1.50.1500068_3).
c) Hybrid: Variables that store the full package-version string
(e.g., variable "doas" { default = "opendoas-6.8.2" })
used directly without string interpolation.
d) Note which variables store version-only strings vs. full package-
version strings, as this affects how to process pkgver.sh output.amd64, i386, aarch64), run
pkgver.sh with the matching local packagesite.yaml and process
the output:
a) For variable-based packages:
pkgver.sh output
(e.g., from CA_ROOT_NSS=ca_root_nss-3.124, extract 3.124)variable definition's default valueenvironment_vars references (${var.*}) unchanged
b) For hardcoded environment_vars:environment_vars
with the full output from pkgver.sh
c) For hybrid variables:pkgver.sh outputpkgver.sh outputs across all supported architectures
b) If a package version differs from amd64:
variable block exists for this package in the main
.pkr.hcl file (create one if needed by converting hardcoded
values to a variable first)vars-freebsd-{freebsd_version}-{architecture}.pkrvars.hclvariable_name = "version_value" (e.g.,
ca_root_nss_version = "3.124" or doas = "opendoas-6.8.2").pkr.hcl file for
package-version strings and replace them with versions returned by
pkgver.sh for the matching ABI and branch.pkgver.sh produces no output for a variable, do not update that
variable. Report the missing package name to the user and ask
whether the package was renamed or removed.pkgver.shThe @/.agents/skills/freebsd-update-packages/scripts/pkgver.sh script
scans all freebsd-*.pkr.hcl template files in the current directory
for environment variable patterns referencing packages, generates a
series of sed commands to extract version numbers from packagesite.yaml,
and prints version numbers of packages.
# FreeBSD (FreeBSD tar):
curl https://pkg.freebsd.org/FreeBSD:15:amd64/quarterly/packagesite.pkg |
tar -xf - -O packagesite.yaml | pkgver.sh
# Linux (GNU tar with zstd support):
curl https://pkg.freebsd.org/FreeBSD:15:amd64/quarterly/packagesite.pkg |
tar --zstd -xf - -O packagesite.yaml | pkgver.sh
# From a local file:
pkgver.sh /path/to/packagesite.yaml
In order to avoid requesting the same packagesite.pkg file many times,
download it once per ABI+branch combination and extract
packagesite.yaml to /tmp/pkgver/{ABI}/{branch}/packagesite.yaml.
Reuse this file for all package checks in the current session. When
downloading different ABI/branch combinations, keep a minimum interval
of 10 minutes between consecutive curl requests.
The script outputs lines in the format VARIABLE_NAME=package-version,
such as:
CA_ROOT_NSS=ca_root_nss-3.115_4
DOAS=opendoas-6.8.2
OPEN_VM_TOOLS=open-vm-tools-nox11-12.5.2,2
VIRTUALBOX_OSE_ADDITIONS=virtualbox-ose-additions-nox11-6.1.50.1500068_1
The following packages are commonly referenced in FreeBSD templates:
| Variable | Package Name |
|---|---|
CA_ROOT_NSS | ca_root_nss |
DOAS | opendoas or doas |
OPEN_VM_TOOLS | open-vm-tools-nox11 or open-vm-tools |
VIRTUALBOX_OSE_ADDITIONS | virtualbox-ose-additions-nox11 or virtualbox-ose-additions |
Note that some older templates (e.g., FreeBSD 12.x, 13.2, 13.3) use
hardcoded version strings directly in the template rather than variable
references. Update these inline values when pkgver.sh reports newer
versions for the matching ABI and branch.
pkgver.sh for each supported architecture (amd64, 'aarch64, and i386` if available) and compare outputs.vars-freebsd-{freebsd_version}-{architecture}.pkrvars.hcl.