Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Improve xz support in TarFileWriter #2229

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jbgosselin
Copy link
Contributor

@jbgosselin jbgosselin commented Mar 6, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

I'm using nix with home-manager, and my binaries doesn't live in a "conventional" folder.
It seems that the actual tooling succeeds to find xz_path but fails detect xzcat or when trying to directly use xz in a subprocess.
With xzcat in a non conventional folder but in PATH, the archive.py fails with xzcat not found.

What is the new behavior?

Since the path of xz is properly found in build_tar.py, provide the path for xz to archive.py and replace usage of xz and xzcat with the provided path.

Also added support for lzma in archive.py in a similar fashion than build_tar.py.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

I was wondering if this should be replaced with proper settings given to tarfile or directly using lzma python library.
I feel that it is not well supported in python2, but do we still support python2 ?

@jbgosselin jbgosselin changed the title Inject xz_path to TarFileWriter Improve xz support in TarFileWriter Mar 8, 2023
@github-actions
Copy link

github-actions bot commented Sep 5, 2023

This Pull Request has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days.
Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_docker!

@github-actions github-actions bot added the Can Close? Will close in 30 days unless there is a comment indicating why not label Sep 5, 2023
@jbgosselin
Copy link
Contributor Author

Not stale

@github-actions github-actions bot removed the Can Close? Will close in 30 days unless there is a comment indicating why not label Sep 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant