Skip to content

fix(veracrypt): take the version from the Linux h4, not the markup - #2065

Merged
philclifford merged 2 commits into
wimpysworld:mainfrom
bfs2021:fix/veracrypt-version-extraction
Oct 24, 2026
Merged

philclifford merged 2 commits into
wimpysworld:mainfrom
bfs2021:fix/veracrypt-version-extraction

Conversation

@bfs2021

@bfs2021 bfs2021 commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Problem

deb-get install veracrypt extracted </h3> as the version and built a 404ing Launchpad URL (.../trunk/</h3>/+download/...). The Downloads page now renders "Latest Stable Release" as a bare <h3>…</h3> heading, so the old \S+ grab — with \s* and -? all optional — matched the heading's closing tag instead of a version (#2064).

Fix

Both veracrypt and veracrypt-console anchor on the <h4>Linux… line that follows the heading (the macOS line above it carries a different, newer version and must not match) and require a leading digit:

VERSION_PUBLISHED=$(sed -En 's|.*<h4>Linux[^-]*-\s*([0-9][0-9.]*).*|\1|p' "${CACHE_FILE}" | head -n1)

Testing

Against the live page as of today: the old expression yields </h3>; the new one yields 1.26.29 (the Linux release the URL is built from). Verified by running both expressions over a fresh download of Downloads.html; bash -n passes on both files, and the PR's package CI will exercise the real flow.

Closes #2064

The Downloads page now renders 'Latest Stable Release' as a bare <h3>
heading, so the old \S+ grab made </h3> the version and the download
URL 404'd (wimpysworld#2064). Anchor on the <h4> Linux line below it and require a
leading digit; head -n1 in case another line ever matches.

Closes wimpysworld#2064
@GideonBear

Copy link
Copy Markdown
Contributor

See #2064 (comment), probably not a good idea if it's temporary.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Fixes VeraCrypt version extraction in both package scripts by anchoring on the Linux

line and requiring a leading digit, preventing HTML markup from building a 404 URL. The diff is focused, clearly corrects the reported bug, and changes no broader behavior.

Re-trigger cubic

Review noted the site may go back to the one-line form, so keep the
original Latest-Stable-Release extraction (now digit-anchored) and fall
back to the <h4> Linux line only when the first comes up empty. POSIX
character classes throughout, so no backslash escaping in the sed
programs.
@bfs2021

bfs2021 commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Reworked in 7e363aa per the concern that the bare-<h3> markup may be temporary: post-time extraction now tries the original single-line pattern first (tightened to require a leading digit, so </h3> can never match again) and falls back to the <h4> Linux line only when that comes up empty. If the site reverts to the one-line form, the first pattern picks it up unchanged. POSIX character classes ([[:space:]], [[:digit:]]) throughout, so nothing depends on escaping. Both extractions verified against a fresh download of the live page: pattern 1 empty, pattern 2 → 1.26.29.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 2 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Fixes VeraCrypt version extraction in both package scripts by requiring a leading digit and falling back to the Linux

line, preventing HTML markup from building a 404 Launchpad URL. Focused bug fix with no broader behavior change.

Re-trigger cubic

@philclifford
philclifford merged commit dd20e12 into wimpysworld:main Oct 24, 2026
5 checks passed
@philclifford

Copy link
Copy Markdown
Member

Thanks @bfs2021 and @GideonBear !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: veracrypt version extraction broken

3 participants