cloudfoundry / buildpack-packager

Buildpack Packager
Apache License 2.0
23 stars 31 forks source link

Use -x instead of --exclude to zip command to facilitate old versions #8

Closed jghiloni closed 8 years ago

jghiloni commented 8 years ago

My current client works in a controlled environment and due to security controls, it is very difficult to upgrade internal linux tools. Currently, buildpack-packager --cached commands fail on this machine due to the fact that their version of zip is so old (v2.31), it does not support the --exclude parameter. However, it does support -x, which newer versions support as well, with the same basic syntax. This PR switches --exclude to -x to facilitate older versions of zip.

cfdreddbot commented 8 years ago

Hey jghiloni!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you've already signed the CLA.

cf-gitbot commented 8 years ago

We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/107948062.

flavorjones commented 8 years ago

Wow, the things you find in the real world, huh? This seems reasonable, we'll schedule some time to look at it.

jghiloni commented 8 years ago

Right? The error that it gives too zip error: unrecognized option - is SUPER helpful too :)

jchesterpivotal commented 8 years ago

Maaaaaaan, I remember changing everything to the long-name forms because I hate single-character switches.

boo hiss legacy

jghiloni commented 8 years ago

We could go the route of the Java buildpack and use ruby zip tools and obviate this whole thing... :smile:

mavenraven commented 8 years ago

Hey @jghiloni, when I apply this patch, the intergration tests fail for buildpack-packager. Could you resubmit this with the tests passing please?

jghiloni commented 8 years ago

Updated to change * in -x args to \\*, as the man page for zip calls for. Confirmed all tests (run by executing bundle install && bundle exec rake) are passing. If that's insufficient, please let me know.

mavenraven commented 8 years ago

@jghiloni The change has been added. Good luck!