{"action":"created","issue":{"url":"https://api.github.com/repos/pyenv/pyenv/issues/902","repository_url":"https://api.github.com/repos/pyenv/pyenv","labels_url":"https://api.github.com/repos/pyenv/pyenv/issues/902/labels{/name}","comments_url":"https://api.github.com/repos/pyenv/pyenv/issues/902/comments","events_url":"https://api.github.com/repos/pyenv/pyenv/issues/902/events","html_url":"https://github.com/pyenv/pyenv/issues/902","id":225344036,"number":902,"title":"sha256sum in openwrt adds space at the end","user":{"login":"fernand0","id":2467,"avatar_url":"https://avatars2.githubusercontent.com/u/2467?v=4","gravatar_id":"","url":"https://api.github.com/users/fernand0","html_url":"https://github.com/fernand0","followers_url":"https://api.github.com/users/fernand0/followers","following_url":"https://api.github.com/users/fernand0/following{/other_user}","gists_url":"https://api.github.com/users/fernand0/gists{/gist_id}","starred_url":"https://api.github.com/users/fernand0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fernand0/subscriptions","organizations_url":"https://api.github.com/users/fernand0/orgs","repos_url":"https://api.github.com/users/fernand0/repos","events_url":"https://api.github.com/users/fernand0/events{/privacy}","received_events_url":"https://api.github.com/users/fernand0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-04-30T18:13:03Z","updated_at":"2017-09-04T20:45:56Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI suppose it is a problem in openwrt (I'm trying to use pyenv in an Onion Omega 2 machine) implementation but when trying pyenv install it stops because sha256sum returns the hash plus some space and a '-'. \r\n\r\nI've solved it modifying the file:\r\n     plugins/python-build/bin/python-build\r\nin such a way that the line that computes the checksum is:\r\n  local computed_checksum=`echo \"$($checksum_command < \"$filename\")\" | tr [A-Z] [a-z] | cut -d $' ' -f 1` \r\nThat is, I've added | cut -d $' ' -f in order to deal with these extra characters...\r\n\r\nI'm not sure about submitting a patch because I have not the adequate tools to test it now in other systems.\r\n\r\nBest regards and keep up the good work!"},"comment":{"url":"https://api.github.com/repos/pyenv/pyenv/issues/comments/327026183","html_url":"https://github.com/pyenv/pyenv/issues/902#issuecomment-327026183","issue_url":"https://api.github.com/repos/pyenv/pyenv/issues/902","id":327026183,"user":{"login":"Gr1N","id":1087619,"avatar_url":"https://avatars0.githubusercontent.com/u/1087619?v=4","gravatar_id":"","url":"https://api.github.com/users/Gr1N","html_url":"https://github.com/Gr1N","followers_url":"https://api.github.com/users/Gr1N/followers","following_url":"https://api.github.com/users/Gr1N/following{/other_user}","gists_url":"https://api.github.com/users/Gr1N/gists{/gist_id}","starred_url":"https://api.github.com/users/Gr1N/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gr1N/subscriptions","organizations_url":"https://api.github.com/users/Gr1N/orgs","repos_url":"https://api.github.com/users/Gr1N/repos","events_url":"https://api.github.com/users/Gr1N/events{/privacy}","received_events_url":"https://api.github.com/users/Gr1N/received_events","type":"User","site_admin":false},"created_at":"2017-09-04T20:45:56Z","updated_at":"2017-09-04T20:45:56Z","author_association":"NONE","body":"Here is a simple fix:\r\n```\r\ndiff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build\r\nindex 1037006..f48f8dd 100755\r\n--- a/plugins/python-build/bin/python-build\r\n+++ b/plugins/python-build/bin/python-build\r\n@@ -282,7 +282,7 @@ has_checksum_support() {\r\n verify_checksum() {\r\n   local checksum_command\r\n   local filename=\"$1\"\r\n-  local expected_checksum=\"$(echo \"$2\" | tr [A-Z] [a-z])\"\r\n+  local expected_checksum=\"$(echo \"$2\" | tr [A-Z] [a-z] | tr -d \" \")\"\r\n \r\n   # If the specified filename doesn't exist, return success\r\n   [ -e \"$filename\" ] || return 0\r\n@@ -304,7 +304,7 @@ verify_checksum() {\r\n   has_checksum_support \"$checksum_command\" || return 0\r\n \r\n   # If the computed checksum is empty, return failure\r\n-  local computed_checksum=`echo \"$($checksum_command < \"$filename\")\" | tr [A-Z] [a-z]`\r\n+  local computed_checksum=`echo \"$($checksum_command < \"$filename\")\" | tr [A-Z] [a-z] | tr -d \" \"`\r\n   [ -n \"$computed_checksum\" ] || return 1\r\n \r\n   if [ \"$expected_checksum\" != \"$computed_checksum\" ]; then\r\n\r\n```\r\nI can create PR if it looks good."}}
{"actor":{"display_login":"Gr1N"}}