paketo-buildpacks / jam

Apache License 2.0
12 stars 12 forks source link

Strip off preceding '.' from layer header names if present. #299

Closed robdimsdale closed 1 year ago

robdimsdale commented 1 year ago

Summary

This PR fixes a bug where jam create-stack would panic with a nil pointer on some images (e.g. VMware Photon OS). These images have file headers in the format ./etc/... rather than /etc/... so we have to strip off the preceding ..

Use Cases

Support more Operating Systems for stack creation.

Checklist

robdimsdale commented 1 year ago

I'm converting this back to draft while I add a unit test. Initially I didn't think it was possible but I found docker images for Photon OS at https://hub.docker.com/_/photon

robdimsdale commented 1 year ago

Ok I'm marking this ready for review again because I can't reproduce this behavior with OSS version of Photon OS - only a proprietary version of Photon, which we can't test against in the OSS.

I feel comfortable with this landing without a test, given that it is a small change and it is backwards-compatible with all existing images.

sophiewigmore commented 1 year ago

Yea considering its a backwards compatible change, I'm fine with proceeding without a test