Fix version parsing, validate debian package version - #1601
Conversation
0b4907f to
ad30f63
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
c86ce0b to
199dc34
Compare
|
When you are talking about "debian versions", you mean Debian revisions ( EDIT: Either there is no Debian revision in the version string, then hyphens are not allowed in |
|
@r4co0n yes, that's correct. You are saying the same thing I am. |
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>
199dc34 to
1730eef
Compare
|
Debian tests are failing due to upstream repos for bullseye: |
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