Skip to content

Remove -z flag from validate_tgz in package_persister#2695

Merged
aramprice merged 1 commit intocloudfoundry:mainfrom
mdzhigarov:remove-z-flag-from-validate-tgz
Mar 18, 2026
Merged

Remove -z flag from validate_tgz in package_persister#2695
aramprice merged 1 commit intocloudfoundry:mainfrom
mdzhigarov:remove-z-flag-from-validate-tgz

Conversation

@mdzhigarov
Copy link
Contributor

@mdzhigarov mdzhigarov commented Mar 18, 2026

Summary

Follow-up to #2635 which removed the -z flag from tar extraction commands but missed:

  • The validate_tgz method in package_persister.rb (tar -tzftar -tf)
  • The corresponding 4 test expectations in package_persister_spec.rb

The -z flag forces gzip decompression, causing gzip: stdin: not in gzip format failures when processing non-gzip-compressed package archives (e.g. uncompressed tarballs). Modern tar auto-detects the compression format without needing the -z flag.

Changes

File Change
package_persister.rb tar -tzftar -tf in validate_tgz
package_persister_spec.rb Updated 4 mock expectations to match

Follow-up to PR cloudfoundry#2635 which removed the -z flag from tar extraction
commands but missed the validate_tgz method in package_persister.rb
and its corresponding test expectations.

The -z flag forces gzip decompression, causing failures when processing
non-gzip-compressed package archives. Modern tar auto-detects the
compression format without needing the -z flag.

Made-with: Cursor
@mdzhigarov
Copy link
Contributor Author

@rkoster @aramprice can you folks please merge this with priority? Thanks!

@aramprice
Copy link
Member

Hi @mdzhigarov - this looks small, happy to merge. Have you already done a deeper search in the codebase to see if there are any more lurking z flags?

@aramprice aramprice merged commit 9f90202 into cloudfoundry:main Mar 18, 2026
8 checks passed
@mdzhigarov
Copy link
Contributor Author

Hi @mdzhigarov - this looks small, happy to merge. Have you already done a deeper search in the codebase to see if there are any more lurking z flags?

Yes, ran a cursor agent to find other occurrences. Seems this is the only one... Not sure how I've missed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants