Pin caddy-custom's plugins at the versions of the 26.1.11 tag
xcaddy fetches www/caddy-custom's plugins while it builds, at their newest versions; caddy-l4 v0.1.3 (2026-11-09) needs caddy 2.11.7 and the ports tree has 2.11.4, so the port failed. config/make-<series>.conf, added to tools' make.conf by ports_make_conf, pins tools' plugin list at the versions of 2026-07-01, when 26.1.11 was tagged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
097d18f940
commit
f5fa1360bf
4 changed files with 41 additions and 4 deletions
|
|
@ -243,6 +243,15 @@ release/vm.sh pull-out 14.3 26.1 # -> /scratch/mono-opnsense/out/26.1
|
|||
removes every work directory (`rm -rf /usr/obj/usr/ports`) instead of
|
||||
cleaning. The build stops if tools' `ports.sh` no longer has the two
|
||||
cleans it replaces.
|
||||
- `config/make-<series>.conf` is added to tools' `make.conf`. Some ports
|
||||
still download code while they build, at its newest version, and
|
||||
upstream built them when the release was tagged. For 26.1 it pins
|
||||
`www/caddy-custom`'s plugins, which xcaddy fetches, at their versions
|
||||
of 2026-07-01. By 2026-11-22 the newest `caddy-l4` needed a newer Caddy
|
||||
than the ports tree's, and the port failed. For a new series, pin them
|
||||
at the release's tag date (`proxy.golang.org/<module>/@v/list` and
|
||||
`.info`; a module without tags takes the pseudo-version of its last
|
||||
commit before then).
|
||||
5. The ports fetch their distfiles as they build. Some no longer download as
|
||||
recorded in the ports tree's distinfo, chiefly patches GitHub generates
|
||||
on the fly (`github.com/<owner>/<repo>/commit/<hash>.patch`): GitHub
|
||||
|
|
|
|||
10
config/make-26.1.conf
Normal file
10
config/make-26.1.conf
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Added to tools' make.conf for the 26.1 ports builds (release/build.sh, ports_make_conf).
|
||||
#
|
||||
# xcaddy fetches www/caddy-custom's plugins while it builds, at their newest versions
|
||||
# unless a version is given. Upstream built 26.1.11 when it was tagged; by 2026-11-22
|
||||
# caddy-l4 v0.1.3 needed caddy 2.11.7, and the ports tree has 2.11.4. So tools' list,
|
||||
# pinned at the versions of 2026-07-01, when 26.1.11 was tagged (proxy.golang.org).
|
||||
CADDY_CUSTOM_PLUGINS= github.com/mholt/caddy-dynamicdns@v0.0.0-20251231002810-1af4f8876598 \
|
||||
github.com/mholt/caddy-l4@v0.1.1 \
|
||||
github.com/mholt/caddy-ratelimit@v0.1.0 \
|
||||
github.com/caddy-dns/cloudflare@v0.2.4
|
||||
|
|
@ -122,10 +122,12 @@ checkout_all()
|
|||
}
|
||||
|
||||
# ports_make_conf FILE: settings for the ports builds, added to tools' make.conf
|
||||
# (checkout resets it). lang/rust builds its own LLVM with a job per CPU; 24 jobs
|
||||
# outgrew the 12 GB VM (2026-11-20). One job per 768 MB of memory fits.
|
||||
# (checkout resets it): this repository's config/make-SERIES.conf, if there is one,
|
||||
# and a job limit for lang/rust, which builds its own LLVM with a job per CPU; 24
|
||||
# jobs outgrew the 12 GB VM (2026-11-20). One job per 768 MB of memory fits.
|
||||
ports_make_conf()
|
||||
{
|
||||
[ ! -f "${DEPS}/config/make-${SERIES}.conf" ] || cat "${DEPS}/config/make-${SERIES}.conf" >> "${1}"
|
||||
_jobs=$(($(sysctl -n hw.physmem) / 805306368))
|
||||
[ "${_jobs}" -ge 1 ] || _jobs=1
|
||||
printf 'lang_rust_VARS=\tMAKE_JOBS_NUMBER_LIMIT=%s\n' "${_jobs}" >> "${1}"
|
||||
|
|
|
|||
|
|
@ -1033,9 +1033,14 @@ class PortsMakeConfTest(unittest.TestCase):
|
|||
with open(self.conf, "w") as f:
|
||||
f.write("BATCH=\t\t\tyes\n")
|
||||
self.func = build_function("ports_make_conf")
|
||||
self.deps = os.path.join(self.tmp, "deps")
|
||||
os.makedirs(os.path.join(self.deps, "config"))
|
||||
with open(os.path.join(self.deps, "config", "make-26.1.conf"), "w") as f:
|
||||
f.write("# pins\nCADDY_CUSTOM_PLUGINS=\ta@v1 \\\n\t\t\tb@v2\n")
|
||||
|
||||
def appended(self, physmem):
|
||||
env = {"PATH": f"{self.fx.bin}:/usr/bin:/bin", "FAKE_LOG": self.fx.log, "FAKE_PHYSMEM": str(physmem)}
|
||||
def appended(self, physmem, series="26.1"):
|
||||
env = {"PATH": f"{self.fx.bin}:/usr/bin:/bin", "FAKE_LOG": self.fx.log, "FAKE_PHYSMEM": str(physmem),
|
||||
"DEPS": self.deps, "SERIES": series}
|
||||
r = subprocess.run(["sh", "-c", self.func + '\nports_make_conf "$1"', "sh", self.conf],
|
||||
env=env, capture_output=True, text=True)
|
||||
self.assertEqual(r.returncode, 0, r.stderr)
|
||||
|
|
@ -1051,6 +1056,17 @@ class PortsMakeConfTest(unittest.TestCase):
|
|||
def test_large_host(self):
|
||||
self.assertEqual(self.appended(64 << 30), "lang_rust_VARS=\tMAKE_JOBS_NUMBER_LIMIT=85")
|
||||
|
||||
def test_series_settings_first(self):
|
||||
self.appended(12851638272)
|
||||
with open(self.conf) as f:
|
||||
self.assertEqual(f.read(), "BATCH=\t\t\tyes\n# pins\nCADDY_CUSTOM_PLUGINS=\ta@v1 \\\n\t\t\tb@v2\n"
|
||||
"lang_rust_VARS=\tMAKE_JOBS_NUMBER_LIMIT=15\n")
|
||||
|
||||
def test_series_without_settings(self):
|
||||
self.appended(12851638272, series="26.7")
|
||||
with open(self.conf) as f:
|
||||
self.assertEqual(f.read(), "BATCH=\t\t\tyes\nlang_rust_VARS=\tMAKE_JOBS_NUMBER_LIMIT=15\n")
|
||||
|
||||
def test_at_least_one_job(self):
|
||||
self.assertEqual(self.appended(805306367), "lang_rust_VARS=\tMAKE_JOBS_NUMBER_LIMIT=1")
|
||||
self.assertEqual(self.appended(805306368), "lang_rust_VARS=\tMAKE_JOBS_NUMBER_LIMIT=1")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue