-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat(datasource/deb): Support deb indices compression #35865
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
base: main
Are you sure you want to change the base?
feat(datasource/deb): Support deb indices compression #35865
Conversation
import * as lzma from 'lzma-native'; | ||
import unbzip2 from 'unbzip2-stream'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are they using any binary node modules we need to take care of for different architecture?
we build images for amd64 and arm64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to their documentation, they do not require additional binary node modules. While unbzip2-stream is fully in JavaScript, lzma-native "provides pre-built binaries for multiple Node.js versions and all major OS using node-pre-gyp".
Hi there, Please don't merge from Thanks, The Renovate team |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lockfile broken
Should be fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please do the refactor first in a separate PR? it would be much easier to review
@@ -347,108 +387,6 @@ describe('modules/datasource/deb/index', () => { | |||
}); | |||
}); | |||
}); | |||
|
|||
describe('downloadAndExtractPackage', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why removal of so many tests?
Changes
This MR introduces support for Debian index compression, as outlined in the Debian Wiki and discussed here.
The old behavior of the Debian datasource was:
Package.gz
file for package meta informationInRelease
file to compare checksum and abort if they do not matchThe new behavior:
InRelease
orRelease
file as it contains information about the package file including the compression algorithm available1.1 If release file is found, retrieve
Package
file with compression algorithms (orderxz
,bzip2
,gzip
, or uncompressed) and checksum of the package file1.2 If no release file is found, assume
Package.gz
file (like old behavior)Retrieving and parsing content from the package file remains the same.
Context
Recently published package files are often compressed using
xz
. Consequently, the Debian data source in Renovate is currently unable to resolve version information from these files. This limitation is discussed and illustrated in this reproduction repository.Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via:
Tested Output
Running renovate on the minimal reproduction repository
steffsas/renovate-reproduction-deb-xz
results in the following expected output. In this example, the tor package resides within bookworm-backports and its package file is compressed viaxz
.