Commit Graph

23 Commits

Author SHA1 Message Date
AJ ONeal
aec68692a1 fix(classify): fix ARM, ppc64el, winx64 detection; fix legacy universal2/solaris export
Classifier fixes:
- Remove Windows arm→arm64 auto-promotion; packages like caddy/fzf/goreleaser
  have genuine arm32 Windows builds (windows_armv6) that were wrongly promoted
- Add armel and gnueabihf as ARMv6 aliases (jq, caddy and others use these)
- Add winx64 to Windows OS pattern (MariaDB uses winx64 in filenames)
- Add ppc64el as ppc64le alias (Debian/Ubuntu naming, used by jq)
- Normalize armv6l → armv6 in normalizeGoArch (Go dist had armv6l filenames)
- Fix classifyGPGDist hardcoded "amd64" → buildmeta.ArchAMD64 ("x86_64")

Legacy export fixes:
- Map solaris/illumos → sunos globally (Node.js only knows "sunos")
- Expand universal2 → two entries (aarch64 + x86_64) so Hugo/cmake/gh/syncthing
  work on both Apple Silicon and Intel Mac in the legacy resolver
- Remove double-application of legacyFieldBackport (toLegacy no longer calls it)
2026-03-11 14:54:25 -06:00
AJ ONeal
b236c8ac6b ref: move legacy field backport from classifypkg to ExportLegacy; add .apk/.AppImage formats
- Remove LegacyBackport from classifypkg and webicached; canonical values
  now flow through storage untouched
- Add legacyFieldBackport() in storage/legacy.go, called only at export time
  (go: armv6→arm, ffmpeg windows: .gz/.empty→.exe)
- ExportLegacy now takes pkg name and returns LegacyDropStats (variants + formats dropped)
- fsstore.Commit logs dropped assets so filtering is visible
- Add FormatAPK (.apk) and FormatAppImage (.AppImage) to buildmeta and classify
  so those files are properly classified and then correctly dropped from legacy export
  rather than passing through as empty-format
2026-03-11 14:41:30 -06:00
AJ ONeal
31dc1f114b ref(classify): separate core classifier from legacy backport
Move legacy-specific field translations out of the core classifier into
LegacyBackport(), called by webicached before writing the JSON cache.

Core classifier now outputs canonical values:
- Go dist arm → armv6 (correct per GOARM default)
- ffmpeg Windows .gz → .gz (correct file extension)

LegacyBackport remaps for Node.js compat:
- Go dist armv6 → arm (production keeps raw API value)
- ffmpeg Windows .gz → exe (production releases.js override)

sass armv6→armv7 stays in classifier (Dart Sass genuinely targets ARMv7).
2026-03-11 13:58:59 -06:00
AJ ONeal
c4ebd55753 fix(classify): add package-specific overrides for sass, ffmpeg, go arm
- sass: bare arm → armv7 (Dart Sass targets ARMv7, not v6)
- ffmpeg: Windows .gz → ext exe (gzipped bare executables)
- go: keep bare arm as-is from Go dist API (matches production)

Reduces comparecache diffs from 6 packages to 3 (iterm2 channel edge
cases, postgres legacy ext, terraform alpha detection — all understood).
2026-03-11 13:52:06 -06:00
AJ ONeal
c4a91002f6 fix(classify): use Go API structured os/arch for golang releases
The golang dist API provides structured os/arch fields. Using these
instead of filename-based classification fixes:
- illumos/solaris kept distinct (not merged to sunos)
- arm arch correctly mapped per GOARCH convention
- buildmeta: add OSIllumos and OSSolaris constants
2026-03-11 13:42:34 -06:00
AJ ONeal
aa6df09188 fix(pg): filter to server assets; add field-level cache comparison
- pg/releases.conf: add asset_filter=postgres so pg only returns server
  assets (which include the client), matching production releases.js
- classifypkg: add "pg" to postgres version normalizer switch case
- comparecache: compare os/arch/libc/ext/channel fields on shared assets,
  distinguishing real disagreements (diff-*) from expected fill diffs
  where Go classifies at write time but Node.js leaves fields empty
2026-03-11 12:55:41 -06:00
AJ ONeal
a3685b840b fix: Windows gnu→none, install.sh 8-space padding
- Windows gnu (MinGW) builds are self-contained: classify as libc='none'
- Pad install.sh content to 8 spaces to match production template indent
- Use replaceMarkerLine for both bash and PS1 installer injection
2026-03-11 12:31:17 -06:00
AJ ONeal
47419b7eee fix(classifypkg): tag Rust static musl builds as libc='none'
Rust *-unknown-linux-musl builds are statically linked with zero
runtime libc dependency. Detect this pattern in classifyGitHub and
override libc from 'musl' to 'none'. Hard-musl packages (pwsh, bun,
node) use different filename patterns and keep libc='musl'.
2026-03-11 12:19:21 -06:00
AJ ONeal
bd3bd85e43 feat(installerconf): github_source packages include git_url for clone fallback
git_url is now a standalone field that can appear alongside any source
type. For githubsource packages, it adds a git clone entry per release
in addition to the tarball and zipball. Updated aliasman, duckdns.sh,
and serviceman configs.
2026-03-11 11:46:59 -06:00
AJ ONeal
0ae4d01d75 fix(classifypkg): separate github, githubsource, and gittag strategies
Three distinct fetch/classify strategies:
- github: binary assets only, no source entries
- githubsource: tarball + zipball from GitHub releases API
- gittag: git clone + tag enumeration (existing)

GitHub binary packages (caddy, jq, shellcheck, etc.) no longer get
spurious .git and source tarball entries for old releases that had
no binary uploads. Source-installable packages (aliasman, duckdns.sh,
serviceman) now use github_source in releases.conf.
2026-03-11 11:42:35 -06:00
AJ ONeal
d0801d0952 fix(classifypkg): handle gittag HEAD entries for legacy cache
Tagless repos (only HEAD, no real version tags): rewrite HEAD version
to Node.js-compatible format (v2023.10.10-18.42.21) with full UTC
datetime.

Repos with real tags + HEAD: tag HEAD entries with "head" variant so
ExportLegacy filters them out (they shouldn't appear in legacy cache).
2026-03-11 00:57:16 -06:00
AJ ONeal
695df60a9d fix(postgres): add legacy EnterpriseDB releases and appendLegacy pipeline step
Hardcode the old 10.12, 10.13, 11.8, 12.3 releases from EnterpriseDB
that predate the bnnanet/postgresql-releases GitHub repo. Both postgres
and psql now match the live cache exactly.
2026-03-11 00:43:18 -06:00
AJ ONeal
44721b9aa8 fix(postgres/psql): normalize REL_17_0 tag format to 17.0
Strip REL_ prefix and convert underscores to dots in a per-package
normalizer rather than config, matching the convention for watchexec.
2026-03-11 00:41:41 -06:00
AJ ONeal
ec30b34241 fix(gittag): use HEAD-{date} format for tagless repos
Avoids HEAD date-versions (2024.06.08) sorting ahead of real semver
tags (v1.2) since they measure different things.
2026-03-11 00:10:30 -06:00
AJ ONeal
f36e734539 fix: infer release channel from version string
GitHub's prerelease boolean is often not set for rc/beta/alpha/dev/pre
releases. Add channelFromVersion() to detect these from the version
string as a fallback. Applied to github, gitea, gittag, and hashicorp
classifiers. Hashicorp's inline checks replaced with the shared helper.

-pre maps to beta (prerelease), -preview stays preview.
2026-03-10 23:18:11 -06:00
AJ ONeal
f963b35e01 ref(watchexec): move cli- prefix stripping from config to code
The cli- prefix is a watchexec-specific monorepo artifact, not a generic
config concern. Move it to internal/releases/watchexec/versions.go
alongside other per-package normalizers (git, lf).
2026-03-10 23:11:14 -06:00
AJ ONeal
7e22ba01a0 fix: ffmpeg version prefix, .gz legacy format, iterm2 regex
- ffmpeg: add version_prefix = b to strip 'b' from tags (b6.0 → 6.0)
- legacy.go: add .gz to legacyFormats for bare gzipped binaries
- iterm2: broaden regex to handle preview/beta variants, skip empty
  versions

Match count: 75/106
2026-03-10 18:35:51 -06:00
AJ ONeal
2d01a1cf54 fix: jq version prefix, watchexec monorepo tag filter
- jq: add version_prefixes = jq- to strip jq- from version strings
- watchexec: add tag_prefix = cli- to filter monorepo tags correctly
- classifyGitHub: skip tags not matching tag_prefix in monorepos
- comparecache: add watchexec version normalization

Match count: 74/106
2026-03-10 18:33:26 -06:00
AJ ONeal
a4e9f875cd fix(go): pad versions to 3 parts, filter -arm6. oddity
Node.js pads Go versions like "1.10" to "1.10.0". Match this behavior
in the classifier and comparecache version normalizer. Also filter
-arm6. malformed arch and .src. source tarballs from comparison noise.

Match count: 73/106
2026-03-10 18:30:57 -06:00
AJ ONeal
13798de1b0 fix(lf): normalize rN version tags to 0.N.0
lf uses tags like "r21", "r33". Node.js converts these to "0.21.0".
Add version normalization in both classifier and comparecache.

Match count: 71/106
2026-03-10 18:28:13 -06:00
AJ ONeal
05abb1ffd2 fix(git): normalize .windows.N version suffix
Git for Windows uses tags like v2.53.0.windows.1. Node.js strips
".windows.1" and replaces ".windows.N" (N>1) with ".N".

Add NormalizeVersions to the git package and wire it into the classify
pipeline. Also add version normalization to comparecache so the
comparison uses canonical versions for both caches.

Remaining git diffs: data freshness (.windows.2 releases Go hasn't
fetched) and RC versions in Go that live doesn't have.
2026-03-10 18:26:41 -06:00
AJ ONeal
2ebecb644e feat(gitea): add gogit variant tagger
Tag assets with "-gogit-" in the filename as the "gogit" variant.
These use a pure-Go Git backend instead of the default C Git library.
2026-03-10 18:08:19 -06:00
AJ ONeal
86e3d8f969 ref: extract classification pipeline into internal/classifypkg
Move all source-specific classifiers, variant tagging, config filtering,
and readAllRaw out of cmd/webicached into internal/classifypkg. The new
Package() function runs the full classify pipeline: source dispatch →
tag variants → apply config.

webicached now only handles fetching raw data and writing to fsstore.
The classification logic is reusable by comparecache and future tools.
2026-03-10 18:06:02 -06:00