-
-
Notifications
You must be signed in to change notification settings - Fork 378
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
Add support for zst compression #1050
Conversation
Thanks for this change! Could you drop support for 1.14 as with the new package some checks seem to fail |
Removed 1.14 from ci.yml. Let me know if anything else I should change. Looks like CI re-run needs to be approved as well. |
@mbearup Thanks for the changes, could you please add a unit test for this change? Something similar to https://github.com/aptly-dev/aptly/blob/master/deb/deb_test.go#L42 |
Like in #658 we can use http://ddebs.ubuntu.com/pool/universe/q/qtbase-opensource-src/libqt5concurrent5-dbgsym_5.15.2+dfsg-12_amd64.ddeb as test file for the new unit tests as it is zstd compressed This is the official Ubuntu 21.10 impish ddeb file listed in http://ddebs.ubuntu.com/dists/impish/universe/binary-amd64/Packages for the package edit: add information from
edit2: add proposal for new test function using mentioned ddeb file type DebSuite struct {
- debFile, debFile2, debFileWithXzControl, dscFile, dscFileNoSign string
+ debFile, debFile2, debFileWithXzControl, debFileWithZstdControl, dscFile, dscFileNoSign string
}
var _ = Suite(&DebSuite{})
func (s *DebSuite) SetUpSuite(c *C) {
_, _File, _, _ := runtime.Caller(0)
s.debFile = filepath.Join(filepath.Dir(_File), "../system/files/libboost-program-options-dev_1.49.0.1_i386.deb")
s.debFile2 = filepath.Join(filepath.Dir(_File), "../system/changes/hardlink_0.2.1_amd64.deb")
s.debFileWithXzControl = filepath.Join(filepath.Dir(_File), "../system/changes/libqt5concurrent5-dbgsym_5.9.1+dfsg-2+18.04+bionic+build4_amd64.ddeb")
+ s.debFileWithZstdControl = filepath.Join(filepath.Dir(_File), "../system/changes/libqt5concurrent5-dbgsym_5.15.2+dfsg-12_amd64.ddeb")
s.dscFile = filepath.Join(filepath.Dir(_File), "../system/files/pyspi_0.6.1-1.3.dsc")
s.dscFileNoSign = filepath.Join(filepath.Dir(_File), "../system/files/pyspi-0.6.1-1.3.stripped.dsc")
} func (s *DebSuite) TestGetControlFileFromDebWithZstdControl(c *C) {
// Has control.tar.zstd archive inside.
st, err := GetControlFileFromDeb(s.debFileWithZstdControl)
c.Check(err, IsNil)
c.Check(st["Version"], Equals, "5.15.2+dfsg-12")
c.Check(st["Package"], Equals, "libqt5concurrent5-dbgsym")
} |
created a commit NeroBurner@12b829d feel free to cherry-pick/squash-merge git remote add neroburner https://github.com/NeroBurner/aptly.git
git fetch neroburner zstd_compression
git cherry-pick neroburner/zstd_compression or I can open a PR as well, anything that helps :) |
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.
Thanks for the changes @mbearup and the original changes from @ahaswell
and for the test @NeroBurner.
Thanks all for getting this across the finish line! |
Fixes #
Requirements
All new code should be covered with tests, documentation should be updated. CI should pass.
Description of the Change
Adds support for zst compression. This is just a re-attempt at PR #1002 since that one seems to be stalled.
Checklist
AUTHORS