nodejs icon indicating copy to clipboard operation
nodejs copied to clipboard

binary install / checksum attributes documented aren't correct

Open atrull opened this issue 8 years ago • 5 comments

Dear nodejs cookbook devs..

following your documented attributes (the defaults) it turns out you've got a more complex, non-valid documented setup.

if you follow it with the example it indicates:

node.default['nodejs']['binary']['checksum']['linux_x64'] = '656d8bff06cc5e108b83176f81de7e1eb16392ae0958ec4a7bca2a3a309333a1'

resulting in..

Option checksum's value {"linux_x64"=>"656d8bff06cc5e108b83176f81de7e1eb16392ae0958ec4a7bca2a3a309333a1", "linux_x86"=>"8fa2d952556c8b5aa37c077e2735c972c522510facaa4df76d4244be88f4dc0f", "linux_arm-pi"=>"52a0f6ed9c0be1ea5f79de6527c481c1b803edbea6413a4fdc65a45ad401565d"} does not match regular expression /^[a-zA-Z0-9]{64}$/

The only valid option for the url method is just node.default['nodejs']['binary']['checksum'] :-)

Not a killer bug or anything but would annoy someone less patient.

Cheers

Alex

atrull avatar Apr 05 '16 17:04 atrull

ran into this too today, the quick fix for me to install a binary from a specific url on centos change checksum to checksum["linux_#{arch}"]

ark archive_name do
  url nodejs_bin_url
  version node['nodejs']['version']
  checksum checksum["linux_#{arch}"]
  has_binaries binaries
  action :install
end

will debug more and send a pr later

rojomisin avatar May 18 '16 01:05 rojomisin

I read this as an example (you should check checksums against an authority and they would vary based off of OS/Version)

As an additional note, the version must be specific for the binary, you can't use typical rubygems version strings.

stephenreid avatar Aug 10 '16 17:08 stephenreid

Bump on this issue as I no longer directly use the cookbook, instead copied and commented out the checksum.

wesleung avatar Jan 28 '17 06:01 wesleung

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

github-actions[bot] avatar Sep 30 '20 00:09 github-actions[bot]

The checksum use needs a lot of work.

MarkGibbons avatar Oct 03 '20 19:10 MarkGibbons