Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle mismatch between a dbgsym package's extension and buildinfo record #505

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

cfm
Copy link
Member

@cfm cfm commented Dec 10, 2024

Fixes #504 by matching on both Ubuntu-style .ddeb and Debian-style .deb extensions for dbgsym packages, but always use the latter for lookup.

Incidentally adds an --against $REF argument and formats with ruff.

Testing

Something like:

$ cd ~/securedrop-builder
$ git fetch
$ git checkout 504-ubuntu-dbgsym
$ cd ~/build-logs
$ git pull
$ cd ~/securedrop-apt-test
$ git pull
$ ~/securedrop-builder/scripts/check-buildinfo --against HEAD~2 ~/build-logs/ | grep "dbgsym"
OK: got expected checksum 2d3d6e6e5d551dbe9aa59df2179b41a65a180d986bd5919df0a329a56c238c50 for securedrop-app-code-dbgsym_2.11.0~rc1+focal_amd64.deb
OK: got expected checksum af4ef1de1ed3d3572077cd4a7adf9f82e5cb878676714dba15f7e0517f5bc9e2 for securedrop-config-dbgsym_2.11.0~rc1+focal_amd64.deb

cfm added 3 commits December 10, 2024 11:54
…info record

Match on both Ubuntu-style ".ddeb" and Debian-style ".deb" extensions
for "dbgsym" packages, but always use the latter for lookup.
@cfm cfm force-pushed the 504-ubuntu-dbgsym branch from 7b882c6 to 5080a07 Compare December 10, 2024 19:55
@legoktm legoktm self-assigned this Dec 10, 2024
Copy link
Member

@legoktm legoktm left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

user@dev ~/g/f/securedrop-apt-test ((d209e548))> ../securedrop-builder/scripts/check-buildinfo --against HEAD~1 ../build-logs/
OK: got expected checksum 2d3d6e6e5d551dbe9aa59df2179b41a65a180d986bd5919df0a329a56c238c50 for securedrop-app-code-dbgsym_2.11.0~rc1+focal_amd64.deb
OK: got expected checksum 47ec148c14b6961a1d1116e9dfe9c68465fcdf7ab1ac95dd8db8e1a09302843f for securedrop-app-code_2.11.0~rc1+focal_amd64.deb
OK: got expected checksum af4ef1de1ed3d3572077cd4a7adf9f82e5cb878676714dba15f7e0517f5bc9e2 for securedrop-config-dbgsym_2.11.0~rc1+focal_amd64.deb
OK: got expected checksum ffc62dff1f312065b22ee0ff210de0e392ce00524c63a8c2576fbf9683177f1d for securedrop-config_2.11.0~rc1+focal_amd64.deb
OK: got expected checksum 47ca54328fa8914ef99fbd0530c1be401e4b432bac00c7d8d944815616b880c4 for securedrop-keyring_0.2.2+2.11.0~rc1+focal_all.deb
OK: got expected checksum cd2815ef3d7061870d07348e1f90e7b5a77546c0a9b2694dfdcb01daa488cb88 for securedrop-ossec-agent_3.6.0+2.11.0~rc1+focal_all.deb
OK: got expected checksum 1bd5e120fce9be39060cc751375ba8a3211d57a211f4a355709f065913eaa580 for securedrop-ossec-server_3.6.0+2.11.0~rc1+focal_all.deb

@legoktm legoktm added this pull request to the merge queue Dec 10, 2024
Merged via the queue into main with commit 0433b45 Dec 10, 2024
6 checks passed
@legoktm legoktm deleted the 504-ubuntu-dbgsym branch December 10, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

check-buildinfo fails to recognize Ubuntu-named debug symbols
2 participants