Skip to content

Fix version parsing, validate debian package version#1601

Open
jaymzh wants to merge 1 commit into
aptly-dev:masterfrom
jaymzh:debian-version
Open

Fix version parsing, validate debian package version#1601
jaymzh wants to merge 1 commit into
aptly-dev:masterfrom
jaymzh:debian-version

Conversation

@jaymzh

@jaymzh jaymzh commented Jul 6, 2026

Copy link
Copy Markdown

This patch is based on one originally by Aaron Foster
afoster@cloudflare.com, to prevent invalid versions.

However, applying it revealed an underlying issue in the Aptly version
parsing - the spec says the "debian version" is the part after the
last hyphen, not the first hyphen, and that caused packages that were
valid to fail validation, so I've fixed the parsing here, and updated
the tests.

Signed off with internal and external emails for clarity, but commit
is under personal email where we typically do open source contributions
from.

Signed-off-by: Phil Dibowitz pdibowitz@cloudflare.com
Signed-off-by: Phil Dibowitz pdibowitz@ipom.com

@jaymzh jaymzh force-pushed the debian-version branch 2 times, most recently from 0b4907f to ad30f63 Compare July 7, 2026 17:40
@jaymzh jaymzh changed the title Validate debian package version Fix version parsing, validate debian package version Jul 7, 2026
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.12%. Comparing base (f59b0d2) to head (199dc34).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1601      +/-   ##
==========================================
- Coverage   77.37%   77.12%   -0.26%     
==========================================
  Files         165      165              
  Lines       15747    15776      +29     
==========================================
- Hits        12185    12167      -18     
- Misses       2356     2407      +51     
+ Partials     1206     1202       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This patch is based on one originally by Aaron Foster
<afoster@cloudflare.com>, to prevent invalid versions.

However, applying it revealed an underlying issue in the Aptly version
parsing - the spec says the "debian version" is the part of the the
_last_ hyphen, not the first hyphen, and that caused packages that were
valid to fail validation, so I've fixed the parsing here, and updated
the tests.

Signed off with internal and external emails for clarity, but commit
is under personal email where we typically do open source contributions
from.

Signed-off-by: Phil Dibowitz <pdibowitz@cloudflare.com>
Signed-off-by: Phil Dibowitz <pdibowitz@ipom.com>
@neolynx neolynx requested a review from a team July 8, 2026 18:25
@neolynx neolynx added the needs review Ready for review & merge label Jul 8, 2026
@neolynx neolynx added this to the 1.6.4 milestone Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review Ready for review & merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants