{"action":"opened","number":1226,"pull_request":{"url":"https://api.github.com/repos/rbenv/ruby-build/pulls/1226","id":209796790,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5Nzk2Nzkw","html_url":"https://github.com/rbenv/ruby-build/pull/1226","diff_url":"https://github.com/rbenv/ruby-build/pull/1226.diff","patch_url":"https://github.com/rbenv/ruby-build/pull/1226.patch","issue_url":"https://api.github.com/repos/rbenv/ruby-build/issues/1226","number":1226,"state":"open","locked":false,"title":"More portable rename after tarball extraction","user":{"login":"eregon","id":168854,"node_id":"MDQ6VXNlcjE2ODg1NA==","avatar_url":"https://avatars2.githubusercontent.com/u/168854?v=4","gravatar_id":"","url":"https://api.github.com/users/eregon","html_url":"https://github.com/eregon","followers_url":"https://api.github.com/users/eregon/followers","following_url":"https://api.github.com/users/eregon/following{/other_user}","gists_url":"https://api.github.com/users/eregon/gists{/gist_id}","starred_url":"https://api.github.com/users/eregon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eregon/subscriptions","organizations_url":"https://api.github.com/users/eregon/orgs","repos_url":"https://api.github.com/users/eregon/repos","events_url":"https://api.github.com/users/eregon/events{/privacy}","received_events_url":"https://api.github.com/users/eregon/received_events","type":"User","site_admin":false},"body":"This should solve https://github.com/rbenv/ruby-build/commit/d155b41e#commitcomment-30215955.\r\n\r\nRenaming is needed for TruffleRuby, so just reverting the commit is not enough.\r\nSpecifically, https://github.com/oracle/truffleruby/releases/download/vm-1.0.0-rc5/truffleruby-1.0.0-rc5-linux-amd64.tar.gz contains a toplevel directory `truffleruby-1.0.0-rc5-linux-amd64` which is not the same as `$package_name` which is `truffleruby-1.0.0-rc5`\r\n\r\nSo in this PR, I rename the extracted directory if it is not the same as `$package_name`\r\n* make_package() assumes the archive was extracted to $package_name.\r\n* fetch_tarball() does not check the name of the toplevel directory in\r\n  the archive, so rename after if it's not exactly \"$package_name\".\r\n\r\n@mislav @xaque208 Please review this PR.","created_at":"2018-08-21T11:40:37Z","updated_at":"2018-08-21T11:40:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rbenv/ruby-build/pulls/1226/commits","review_comments_url":"https://api.github.com/repos/rbenv/ruby-build/pulls/1226/comments","review_comment_url":"https://api.github.com/repos/rbenv/ruby-build/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rbenv/ruby-build/issues/1226/comments","statuses_url":"https://api.github.com/repos/rbenv/ruby-build/statuses/4267b4e6a2968df270ba8bd631ae618b78ba1533","head":{"label":"eregon:more-portable-rename-after-extract","ref":"more-portable-rename-after-extract","sha":"4267b4e6a2968df270ba8bd631ae618b78ba1533","user":{"login":"eregon","id":168854,"node_id":"MDQ6VXNlcjE2ODg1NA==","avatar_url":"https://avatars2.githubusercontent.com/u/168854?v=4","gravatar_id":"","url":"https://api.github.com/users/eregon","html_url":"https://github.com/eregon","followers_url":"https://api.github.com/users/eregon/followers","following_url":"https://api.github.com/users/eregon/following{/other_user}","gists_url":"https://api.github.com/users/eregon/gists{/gist_id}","starred_url":"https://api.github.com/users/eregon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eregon/subscriptions","organizations_url":"https://api.github.com/users/eregon/orgs","repos_url":"https://api.github.com/users/eregon/repos","events_url":"https://api.github.com/users/eregon/events{/privacy}","received_events_url":"https://api.github.com/users/eregon/received_events","type":"User","site_admin":false},"repo":{"id":137506756,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc1MDY3NTY=","name":"ruby-build","full_name":"eregon/ruby-build","owner":{"login":"eregon","id":168854,"node_id":"MDQ6VXNlcjE2ODg1NA==","avatar_url":"https://avatars2.githubusercontent.com/u/168854?v=4","gravatar_id":"","url":"https://api.github.com/users/eregon","html_url":"https://github.com/eregon","followers_url":"https://api.github.com/users/eregon/followers","following_url":"https://api.github.com/users/eregon/following{/other_user}","gists_url":"https://api.github.com/users/eregon/gists{/gist_id}","starred_url":"https://api.github.com/users/eregon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eregon/subscriptions","organizations_url":"https://api.github.com/users/eregon/orgs","repos_url":"https://api.github.com/users/eregon/repos","events_url":"https://api.github.com/users/eregon/events{/privacy}","received_events_url":"https://api.github.com/users/eregon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eregon/ruby-build","description":"Compile and install Ruby","fork":true,"url":"https://api.github.com/repos/eregon/ruby-build","forks_url":"https://api.github.com/repos/eregon/ruby-build/forks","keys_url":"https://api.github.com/repos/eregon/ruby-build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eregon/ruby-build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eregon/ruby-build/teams","hooks_url":"https://api.github.com/repos/eregon/ruby-build/hooks","issue_events_url":"https://api.github.com/repos/eregon/ruby-build/issues/events{/number}","events_url":"https://api.github.com/repos/eregon/ruby-build/events","assignees_url":"https://api.github.com/repos/eregon/ruby-build/assignees{/user}","branches_url":"https://api.github.com/repos/eregon/ruby-build/branches{/branch}","tags_url":"https://api.github.com/repos/eregon/ruby-build/tags","blobs_url":"https://api.github.com/repos/eregon/ruby-build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eregon/ruby-build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eregon/ruby-build/git/refs{/sha}","trees_url":"https://api.github.com/repos/eregon/ruby-build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eregon/ruby-build/statuses/{sha}","languages_url":"https://api.github.com/repos/eregon/ruby-build/languages","stargazers_url":"https://api.github.com/repos/eregon/ruby-build/stargazers","contributors_url":"https://api.github.com/repos/eregon/ruby-build/contributors","subscribers_url":"https://api.github.com/repos/eregon/ruby-build/subscribers","subscription_url":"https://api.github.com/repos/eregon/ruby-build/subscription","commits_url":"https://api.github.com/repos/eregon/ruby-build/commits{/sha}","git_commits_url":"https://api.github.com/repos/eregon/ruby-build/git/commits{/sha}","comments_url":"https://api.github.com/repos/eregon/ruby-build/comments{/number}","issue_comment_url":"https://api.github.com/repos/eregon/ruby-build/issues/comments{/number}","contents_url":"https://api.github.com/repos/eregon/ruby-build/contents/{+path}","compare_url":"https://api.github.com/repos/eregon/ruby-build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eregon/ruby-build/merges","archive_url":"https://api.github.com/repos/eregon/ruby-build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eregon/ruby-build/downloads","issues_url":"https://api.github.com/repos/eregon/ruby-build/issues{/number}","pulls_url":"https://api.github.com/repos/eregon/ruby-build/pulls{/number}","milestones_url":"https://api.github.com/repos/eregon/ruby-build/milestones{/number}","notifications_url":"https://api.github.com/repos/eregon/ruby-build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eregon/ruby-build/labels{/name}","releases_url":"https://api.github.com/repos/eregon/ruby-build/releases{/id}","deployments_url":"https://api.github.com/repos/eregon/ruby-build/deployments","created_at":"2018-06-15T15:56:54Z","updated_at":"2018-06-15T15:56:56Z","pushed_at":"2018-08-21T11:31:47Z","git_url":"git://github.com/eregon/ruby-build.git","ssh_url":"git@github.com:eregon/ruby-build.git","clone_url":"https://github.com/eregon/ruby-build.git","svn_url":"https://github.com/eregon/ruby-build","homepage":"","size":1912,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rbenv:master","ref":"master","sha":"4024eb561172759c3358c515f508e2d66c7662ea","user":{"login":"rbenv","id":10675212,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjc1MjEy","avatar_url":"https://avatars1.githubusercontent.com/u/10675212?v=4","gravatar_id":"","url":"https://api.github.com/users/rbenv","html_url":"https://github.com/rbenv","followers_url":"https://api.github.com/users/rbenv/followers","following_url":"https://api.github.com/users/rbenv/following{/other_user}","gists_url":"https://api.github.com/users/rbenv/gists{/gist_id}","starred_url":"https://api.github.com/users/rbenv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbenv/subscriptions","organizations_url":"https://api.github.com/users/rbenv/orgs","repos_url":"https://api.github.com/users/rbenv/repos","events_url":"https://api.github.com/users/rbenv/events{/privacy}","received_events_url":"https://api.github.com/users/rbenv/received_events","type":"Organization","site_admin":false},"repo":{"id":2142701,"node_id":"MDEwOlJlcG9zaXRvcnkyMTQyNzAx","name":"ruby-build","full_name":"rbenv/ruby-build","owner":{"login":"rbenv","id":10675212,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjc1MjEy","avatar_url":"https://avatars1.githubusercontent.com/u/10675212?v=4","gravatar_id":"","url":"https://api.github.com/users/rbenv","html_url":"https://github.com/rbenv","followers_url":"https://api.github.com/users/rbenv/followers","following_url":"https://api.github.com/users/rbenv/following{/other_user}","gists_url":"https://api.github.com/users/rbenv/gists{/gist_id}","starred_url":"https://api.github.com/users/rbenv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbenv/subscriptions","organizations_url":"https://api.github.com/users/rbenv/orgs","repos_url":"https://api.github.com/users/rbenv/repos","events_url":"https://api.github.com/users/rbenv/events{/privacy}","received_events_url":"https://api.github.com/users/rbenv/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rbenv/ruby-build","description":"Compile and install Ruby","fork":false,"url":"https://api.github.com/repos/rbenv/ruby-build","forks_url":"https://api.github.com/repos/rbenv/ruby-build/forks","keys_url":"https://api.github.com/repos/rbenv/ruby-build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rbenv/ruby-build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rbenv/ruby-build/teams","hooks_url":"https://api.github.com/repos/rbenv/ruby-build/hooks","issue_events_url":"https://api.github.com/repos/rbenv/ruby-build/issues/events{/number}","events_url":"https://api.github.com/repos/rbenv/ruby-build/events","assignees_url":"https://api.github.com/repos/rbenv/ruby-build/assignees{/user}","branches_url":"https://api.github.com/repos/rbenv/ruby-build/branches{/branch}","tags_url":"https://api.github.com/repos/rbenv/ruby-build/tags","blobs_url":"https://api.github.com/repos/rbenv/ruby-build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rbenv/ruby-build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rbenv/ruby-build/git/refs{/sha}","trees_url":"https://api.github.com/repos/rbenv/ruby-build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rbenv/ruby-build/statuses/{sha}","languages_url":"https://api.github.com/repos/rbenv/ruby-build/languages","stargazers_url":"https://api.github.com/repos/rbenv/ruby-build/stargazers","contributors_url":"https://api.github.com/repos/rbenv/ruby-build/contributors","subscribers_url":"https://api.github.com/repos/rbenv/ruby-build/subscribers","subscription_url":"https://api.github.com/repos/rbenv/ruby-build/subscription","commits_url":"https://api.github.com/repos/rbenv/ruby-build/commits{/sha}","git_commits_url":"https://api.github.com/repos/rbenv/ruby-build/git/commits{/sha}","comments_url":"https://api.github.com/repos/rbenv/ruby-build/comments{/number}","issue_comment_url":"https://api.github.com/repos/rbenv/ruby-build/issues/comments{/number}","contents_url":"https://api.github.com/repos/rbenv/ruby-build/contents/{+path}","compare_url":"https://api.github.com/repos/rbenv/ruby-build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rbenv/ruby-build/merges","archive_url":"https://api.github.com/repos/rbenv/ruby-build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rbenv/ruby-build/downloads","issues_url":"https://api.github.com/repos/rbenv/ruby-build/issues{/number}","pulls_url":"https://api.github.com/repos/rbenv/ruby-build/pulls{/number}","milestones_url":"https://api.github.com/repos/rbenv/ruby-build/milestones{/number}","notifications_url":"https://api.github.com/repos/rbenv/ruby-build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rbenv/ruby-build/labels{/name}","releases_url":"https://api.github.com/repos/rbenv/ruby-build/releases{/id}","deployments_url":"https://api.github.com/repos/rbenv/ruby-build/deployments","created_at":"2011-08-02T13:47:29Z","updated_at":"2018-08-21T09:23:36Z","pushed_at":"2018-08-17T10:14:38Z","git_url":"git://github.com/rbenv/ruby-build.git","ssh_url":"git@github.com:rbenv/ruby-build.git","clone_url":"https://github.com/rbenv/ruby-build.git","svn_url":"https://github.com/rbenv/ruby-build","homepage":"","size":1955,"stargazers_count":2951,"watchers_count":2951,"language":"Shell","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":584,"mirror_url":null,"archived":false,"open_issues_count":67,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":584,"open_issues":67,"watchers":2951,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rbenv/ruby-build/pulls/1226"},"html":{"href":"https://github.com/rbenv/ruby-build/pull/1226"},"issue":{"href":"https://api.github.com/repos/rbenv/ruby-build/issues/1226"},"comments":{"href":"https://api.github.com/repos/rbenv/ruby-build/issues/1226/comments"},"review_comments":{"href":"https://api.github.com/repos/rbenv/ruby-build/pulls/1226/comments"},"review_comment":{"href":"https://api.github.com/repos/rbenv/ruby-build/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rbenv/ruby-build/pulls/1226/commits"},"statuses":{"href":"https://api.github.com/repos/rbenv/ruby-build/statuses/4267b4e6a2968df270ba8bd631ae618b78ba1533"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":15,"deletions":3,"changed_files":1}}
{"actor":{"display_login":"eregon"}}