Skip to content

Conversation

@peakschris
Copy link
Contributor

@peakschris peakschris commented Aug 8, 2025

bsdtar in libarchive does not support reading an mtree file with CRLF endings

I have submitted libarchive/libarchive#2717 - but this may take some time to upstream. In the meantime have added a patch here which adds this CRLF support. This fixes bsdtar for usage in rules_oci.

One change:

  • CRLF endings are tolerated when reading mtree spec

@alexeagle
Copy link
Member

I think this repo isn't the best place to add the patch, as it's layered purely as a continuous delivery pipeline for the BCR module. Could we add the patch to BCR instead?
As another benefit, this way anyone building from source will have it functional on Windows as well.

And yes, I'd prefer to have the PR for the minimal patch to accept line endings, just to reduce our divergence from what might end up landing upstream.

@peakschris
Copy link
Contributor Author

@alexeagle sure - I've never submitted to BCR before - what's the process? Fork the repo and submit a PR as normal?

@alexeagle
Copy link
Member

Yup, similar to other PRs to that folder - bazelbuild/bazel-central-registry#4649 introduced the current "buggy" version; bazelbuild/bazel-central-registry#3225 is an example of updating the same version to fix a windows issue.

@peakschris
Copy link
Contributor Author

Copy link
Member

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with landing it here

@peakschris peakschris requested a review from alexeagle August 13, 2025 07:49
Copy link
Member

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! Let's make Windows work :)

@alexeagle alexeagle merged commit 2215f4d into aspect-build:main Aug 13, 2025
1 of 3 checks passed
@peakschris
Copy link
Contributor Author

Awesome! Could you push a new release to BCR?

@peakschris
Copy link
Contributor Author

@alexeagle fyi libarchive/libarchive#2717 is merged so we are just waiting for a new libarchive release now

@alexeagle
Copy link
Member

Thanks, eventually the release train will leave the station

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