About applications's version

There is a issue I would like to verify. Is the application’s version only in core/plan that I can use?
Because I want to use nginx-1.15.8, but in core/nginx I just found nginx-1.15.6, so I try to create the package of by myself.
But the log shows
nginx: Downloading ‘https://nginx.org/download/nginx-1.15.8.tar.gz’ to 'nginx-1.15.8.tar.gz’
2019-02-03 01:12:36 URL:https://nginx.org/download/nginx-1.15.8.tar.gz [1027862/1027862] -> “nginx-1.15.8.tar.gz” [1]
** nginx: Downloaded ‘nginx-1.15.8.tar.gz’**
** nginx: Verifying nginx-1.15.8.tar.gz**
** nginx: WARN: Checksum invalid for nginx-1.15.8.tar.gz:**
** nginx: WARN: Expected: a3d8c67c2035808c7c0d475fffe263db8c353b11521aa7ade468b780ed826cc6**
** nginx: WARN: Computed: a8bdafbca87eb99813ae4fcac1ad0875bf725ce19eb265d28268c309b2b40787**
** nginx: Exiting on error**
And when I modify the plan.sh, change the version from 1.15.8 to 1.15.6, it became succeed.So I’m confusing.

You’re on the right track for creating your own nginx 1.15.8 package. Since you’re updating the download URL by changing the version, you’ll also need to change the pkg_shasum used to verify the downloaded package integrity. The computed value in the error above (a8bdafbca87eb99813ae4fcac1ad0875bf725ce19eb265d28268c309b2b40787) is the value you should set it to.

You can also see the complete list of versions available for packages here: https://bldr.habitat.sh/#/pkgs/core/nginx. Habitat core plans often lag behind the latest released versions a little bit, but contributions to https://github.com/habitat-sh/core-plans/ are always welcome.

1 Like

Oh! Thank you! It is worked!
I have just seen the reference of pkg_shasum, it shows ’ If you do not have the checksum, you can easily generate it by downloading the source and using the sha256sum or gsha256sum tools’ , so I tried to find
a sha256sum tool.
I never mind that Habitat will generate it and you will tell me! Thank you so much!