bosh-agent
bosh-agent copied to clipboard
Add compression detection for BOSH release compilation
Summary
This PR adds compression detection for BOSH release compilation
Changes
- Updated bosh-utils dependency to latest version that removes the
-zflag during tar extraction - Updated Compressor interface calls to pass
CompressorOptionsparameter as required by the new interface - Fixed tar decompression commands to use
-xfinstead of-xzffor better compatibility - Updated agent code in
concrete_compiler.goandlogs_tar_provider.goto use the new interface - Modify compiler to preserve original compression format during compilation
- Update releasetarball compilation to detect and preserve tarball compression format
- Implement compression detection in concrete_compiler to preserve original package compression state
- Update release tarball compilation to detect and preserve compression format
- Maintain backward compatibility with existing compressed packages
This ensures that compiled packages maintain the same compression format as their source packages, improving compatibility and reducing unnecessary recompression.
Testing
- All existing functionality is preserved
- Tar extraction now works reliably across different environments
- Compression still works as expected with the
-zflag when appropriate - Tested with both compressed and non-compressed tars on the latest jammy stemcell by running
bosh-agent compile ...
This PR probably also needs to align with package spec based approach: https://github.com/cloudfoundry/bosh-cli/pull/696#issuecomment-3437670344
Thank you @mdzhigarov for this contribution!