Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File provider checksum_valid? fails to verify file #115

Open
xeon22 opened this issue Jan 27, 2014 · 8 comments
Open

File provider checksum_valid? fails to verify file #115

xeon22 opened this issue Jan 27, 2014 · 8 comments
Milestone

Comments

@xeon22
Copy link

xeon22 commented Jan 27, 2014

The file provider when passed a nexus artifact location, will fail when attempting to verify the file if the nexus artifact co-ordinates contain a LATEST string for the version of the artifact.

@KAllan357
Copy link
Contributor

Can you explain a bit more? Are you saying that the artifact_file resource fails if you pass it something like...

artifact_file "/tmp/my-artifact.tgz" do
  location "com.test:my-artifact:tgz:LATEST"
  owner "me"
  group "foo"
  action :create
end

@xeon22
Copy link
Author

xeon22 commented Jan 29, 2014

Certainly. When the artifact_file resource downloads the location as specified above, it will resolve com.test:my-artifact:tgz:LATEST to say my-artifact-1.0-SNAPSHOT.tgz. When a call to checksum_valid? method is made, it is passed my-artifact.tgz. Thus it fails to find my-artifact.tgz to verify the checksum because my-artifact-1.0-SNAPSHOT.tgz is the file name is should be checking.

@KAllan357
Copy link
Contributor

Thanks, that makes sense. I will take a look at this.

@KAllan357 KAllan357 added this to the 2.0.0 milestone Feb 21, 2014
@BarthV
Copy link
Contributor

BarthV commented Mar 14, 2014

Same issue on my side ...
When we are using a specified artifact version, we can build path with expected filename and lwrp is able to verify checksum.

But if you're using an unpredictive way to define version (LATEST, ***-SNAPSHOT, ...) filename stays unkown and lwrp can't check file signature and breaks.

@KAllan357
Copy link
Contributor

There is definitely something left to be desired here on some particular edge cases (LATEST, SNAPSHOT). I've been thinking about ways to handle this, but haven't come up with a great fix yet.

@BarthV
Copy link
Contributor

BarthV commented Mar 15, 2014

I'm (trying) to work on this for a fix, but I got many file naming dependency problem (there is at least : real filename, destination filename, filename in chef/cache for SHA signature, metadata filename) ...

I think file lwrp should detect "rolling version" tags like *-SNAPSHOT and LATEST and switch his behavious based on this. But i'm not absolutely sure yet.

@BarthV
Copy link
Contributor

BarthV commented Mar 15, 2014

I suggested something to try to fix this problem

@BarthV
Copy link
Contributor

BarthV commented Apr 7, 2014

Please test latest master branch and see if current cookbook state fix your issue.

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

No branches or pull requests

3 participants