{"action":"created","comment":{"url":"https://api.github.com/repos/chef/chef/pulls/comments/25703663","id":25703663,"diff_hunk":"@@ -1,14 +1,33 @@\n-bash -c '\n+sh -c '\n <%= \"export https_proxy=\\\"#{knife_config[:bootstrap_proxy]}\\\"\" if knife_config[:bootstrap_proxy] -%>\n \n-distro=`uname -s`\n+if test \"x$TMPDIR\" = \"x\"; then\n+  tmp=\"/tmp\"\n+else\n+  tmp=$TMPDIR\n+fi\n+\n+# secure-ish temp dir creation without having mktemp available (DDoS-able but not exploitable)\n+tmp_dir=\"$tmp/install.sh.$$\"\n+(umask 077 && mkdir $tmp_dir) || exit 1\n \n-if test \"x$distro\" = \"xSunOS\"; then\n-  if test -d \"/usr/sfw/bin\"; then\n-    PATH=/usr/sfw/bin:$PATH\n-    export PATH\n+# @param $1 the omnibus root directory\n+# @param $2 the requested version of omnibus package","path":"lib/chef/knife/bootstrap/templates/chef-full.erb","position":21,"original_position":21,"commit_id":"b395e5b221b3a08a902a3c7b4bc35528ad827a34","original_commit_id":"b395e5b221b3a08a902a3c7b4bc35528ad827a34","user":{"login":"lamont-granquist","id":454857,"avatar_url":"https://avatars.githubusercontent.com/u/454857?v=3","gravatar_id":"","url":"https://api.github.com/users/lamont-granquist","html_url":"https://github.com/lamont-granquist","followers_url":"https://api.github.com/users/lamont-granquist/followers","following_url":"https://api.github.com/users/lamont-granquist/following{/other_user}","gists_url":"https://api.github.com/users/lamont-granquist/gists{/gist_id}","starred_url":"https://api.github.com/users/lamont-granquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamont-granquist/subscriptions","organizations_url":"https://api.github.com/users/lamont-granquist/orgs","repos_url":"https://api.github.com/users/lamont-granquist/repos","events_url":"https://api.github.com/users/lamont-granquist/events{/privacy}","received_events_url":"https://api.github.com/users/lamont-granquist/received_events","type":"User","site_admin":false},"body":"Yeah, getting idempotency here is likely to be significantly more complicated that it first appears.  And IMO if you're running a knife bootstrap, you expect an install to happen.","created_at":"2015-03-03T16:49:58Z","updated_at":"2015-03-03T16:49:58Z","html_url":"https://github.com/chef/chef/pull/2877#discussion_r25703663","pull_request_url":"https://api.github.com/repos/chef/chef/pulls/2877","_links":{"self":{"href":"https://api.github.com/repos/chef/chef/pulls/comments/25703663"},"html":{"href":"https://github.com/chef/chef/pull/2877#discussion_r25703663"},"pull_request":{"href":"https://api.github.com/repos/chef/chef/pulls/2877"}}},"pull_request":{"url":"https://api.github.com/repos/chef/chef/pulls/2877","id":28871168,"html_url":"https://github.com/chef/chef/pull/2877","diff_url":"https://github.com/chef/chef/pull/2877.diff","patch_url":"https://github.com/chef/chef/pull/2877.patch","issue_url":"https://api.github.com/repos/chef/chef/issues/2877","number":2877,"state":"open","locked":false,"title":"Convert bootstrap to shell.","user":{"login":"juliandunn","id":841412,"avatar_url":"https://avatars.githubusercontent.com/u/841412?v=3","gravatar_id":"","url":"https://api.github.com/users/juliandunn","html_url":"https://github.com/juliandunn","followers_url":"https://api.github.com/users/juliandunn/followers","following_url":"https://api.github.com/users/juliandunn/following{/other_user}","gists_url":"https://api.github.com/users/juliandunn/gists{/gist_id}","starred_url":"https://api.github.com/users/juliandunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliandunn/subscriptions","organizations_url":"https://api.github.com/users/juliandunn/orgs","repos_url":"https://api.github.com/users/juliandunn/repos","events_url":"https://api.github.com/users/juliandunn/events{/privacy}","received_events_url":"https://api.github.com/users/juliandunn/received_events","type":"User","site_admin":false},"body":"This is fixes #2037, using logic cribbed from releng-chef-repo and such.\r\n\r\nI've tested it using FreeBSD 10 with `sudo` and `ca_root_nss` installed, no `bash`, and also on AIX 7.1 with only `sudo`, no bash. It seems to work fine. Also tested bootstrapping a CentOS 7 box to make sure I didn't break existing OSes and that was fine too.","created_at":"2015-02-07T22:16:19Z","updated_at":"2015-03-03T16:49:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bdc90cb84bd828aaa395ec2be4ce2780a5dbb16f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chef/chef/pulls/2877/commits","review_comments_url":"https://api.github.com/repos/chef/chef/pulls/2877/comments","review_comment_url":"https://api.github.com/repos/chef/chef/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chef/chef/issues/2877/comments","statuses_url":"https://api.github.com/repos/chef/chef/statuses/b395e5b221b3a08a902a3c7b4bc35528ad827a34","head":{"label":"juliandunn:convert-bootstrap-to-shell","ref":"convert-bootstrap-to-shell","sha":"b395e5b221b3a08a902a3c7b4bc35528ad827a34","user":{"login":"juliandunn","id":841412,"avatar_url":"https://avatars.githubusercontent.com/u/841412?v=3","gravatar_id":"","url":"https://api.github.com/users/juliandunn","html_url":"https://github.com/juliandunn","followers_url":"https://api.github.com/users/juliandunn/followers","following_url":"https://api.github.com/users/juliandunn/following{/other_user}","gists_url":"https://api.github.com/users/juliandunn/gists{/gist_id}","starred_url":"https://api.github.com/users/juliandunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliandunn/subscriptions","organizations_url":"https://api.github.com/users/juliandunn/orgs","repos_url":"https://api.github.com/users/juliandunn/repos","events_url":"https://api.github.com/users/juliandunn/events{/privacy}","received_events_url":"https://api.github.com/users/juliandunn/received_events","type":"User","site_admin":false},"repo":{"id":9184170,"name":"chef","full_name":"juliandunn/chef","owner":{"login":"juliandunn","id":841412,"avatar_url":"https://avatars.githubusercontent.com/u/841412?v=3","gravatar_id":"","url":"https://api.github.com/users/juliandunn","html_url":"https://github.com/juliandunn","followers_url":"https://api.github.com/users/juliandunn/followers","following_url":"https://api.github.com/users/juliandunn/following{/other_user}","gists_url":"https://api.github.com/users/juliandunn/gists{/gist_id}","starred_url":"https://api.github.com/users/juliandunn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliandunn/subscriptions","organizations_url":"https://api.github.com/users/juliandunn/orgs","repos_url":"https://api.github.com/users/juliandunn/repos","events_url":"https://api.github.com/users/juliandunn/events{/privacy}","received_events_url":"https://api.github.com/users/juliandunn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/juliandunn/chef","description":"A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.","fork":true,"url":"https://api.github.com/repos/juliandunn/chef","forks_url":"https://api.github.com/repos/juliandunn/chef/forks","keys_url":"https://api.github.com/repos/juliandunn/chef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juliandunn/chef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juliandunn/chef/teams","hooks_url":"https://api.github.com/repos/juliandunn/chef/hooks","issue_events_url":"https://api.github.com/repos/juliandunn/chef/issues/events{/number}","events_url":"https://api.github.com/repos/juliandunn/chef/events","assignees_url":"https://api.github.com/repos/juliandunn/chef/assignees{/user}","branches_url":"https://api.github.com/repos/juliandunn/chef/branches{/branch}","tags_url":"https://api.github.com/repos/juliandunn/chef/tags","blobs_url":"https://api.github.com/repos/juliandunn/chef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juliandunn/chef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juliandunn/chef/git/refs{/sha}","trees_url":"https://api.github.com/repos/juliandunn/chef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juliandunn/chef/statuses/{sha}","languages_url":"https://api.github.com/repos/juliandunn/chef/languages","stargazers_url":"https://api.github.com/repos/juliandunn/chef/stargazers","contributors_url":"https://api.github.com/repos/juliandunn/chef/contributors","subscribers_url":"https://api.github.com/repos/juliandunn/chef/subscribers","subscription_url":"https://api.github.com/repos/juliandunn/chef/subscription","commits_url":"https://api.github.com/repos/juliandunn/chef/commits{/sha}","git_commits_url":"https://api.github.com/repos/juliandunn/chef/git/commits{/sha}","comments_url":"https://api.github.com/repos/juliandunn/chef/comments{/number}","issue_comment_url":"https://api.github.com/repos/juliandunn/chef/issues/comments{/number}","contents_url":"https://api.github.com/repos/juliandunn/chef/contents/{+path}","compare_url":"https://api.github.com/repos/juliandunn/chef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juliandunn/chef/merges","archive_url":"https://api.github.com/repos/juliandunn/chef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juliandunn/chef/downloads","issues_url":"https://api.github.com/repos/juliandunn/chef/issues{/number}","pulls_url":"https://api.github.com/repos/juliandunn/chef/pulls{/number}","milestones_url":"https://api.github.com/repos/juliandunn/chef/milestones{/number}","notifications_url":"https://api.github.com/repos/juliandunn/chef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juliandunn/chef/labels{/name}","releases_url":"https://api.github.com/repos/juliandunn/chef/releases{/id}","created_at":"2013-04-03T01:22:17Z","updated_at":"2015-02-16T21:45:49Z","pushed_at":"2015-02-19T20:28:11Z","git_url":"git://github.com/juliandunn/chef.git","ssh_url":"git@github.com:juliandunn/chef.git","clone_url":"https://github.com/juliandunn/chef.git","svn_url":"https://github.com/juliandunn/chef","homepage":"http://www.opscode.com/chef/","size":77229,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"chef:master","ref":"master","sha":"caa1a68a9b28952cfe4b21ea78c745cb324192f6","user":{"login":"chef","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"repo":{"id":108278,"name":"chef","full_name":"chef/chef","owner":{"login":"chef","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chef/chef","description":"A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.","fork":false,"url":"https://api.github.com/repos/chef/chef","forks_url":"https://api.github.com/repos/chef/chef/forks","keys_url":"https://api.github.com/repos/chef/chef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chef/chef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chef/chef/teams","hooks_url":"https://api.github.com/repos/chef/chef/hooks","issue_events_url":"https://api.github.com/repos/chef/chef/issues/events{/number}","events_url":"https://api.github.com/repos/chef/chef/events","assignees_url":"https://api.github.com/repos/chef/chef/assignees{/user}","branches_url":"https://api.github.com/repos/chef/chef/branches{/branch}","tags_url":"https://api.github.com/repos/chef/chef/tags","blobs_url":"https://api.github.com/repos/chef/chef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chef/chef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chef/chef/git/refs{/sha}","trees_url":"https://api.github.com/repos/chef/chef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chef/chef/statuses/{sha}","languages_url":"https://api.github.com/repos/chef/chef/languages","stargazers_url":"https://api.github.com/repos/chef/chef/stargazers","contributors_url":"https://api.github.com/repos/chef/chef/contributors","subscribers_url":"https://api.github.com/repos/chef/chef/subscribers","subscription_url":"https://api.github.com/repos/chef/chef/subscription","commits_url":"https://api.github.com/repos/chef/chef/commits{/sha}","git_commits_url":"https://api.github.com/repos/chef/chef/git/commits{/sha}","comments_url":"https://api.github.com/repos/chef/chef/comments{/number}","issue_comment_url":"https://api.github.com/repos/chef/chef/issues/comments{/number}","contents_url":"https://api.github.com/repos/chef/chef/contents/{+path}","compare_url":"https://api.github.com/repos/chef/chef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chef/chef/merges","archive_url":"https://api.github.com/repos/chef/chef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chef/chef/downloads","issues_url":"https://api.github.com/repos/chef/chef/issues{/number}","pulls_url":"https://api.github.com/repos/chef/chef/pulls{/number}","milestones_url":"https://api.github.com/repos/chef/chef/milestones{/number}","notifications_url":"https://api.github.com/repos/chef/chef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chef/chef/labels{/name}","releases_url":"https://api.github.com/repos/chef/chef/releases{/id}","created_at":"2009-01-15T20:40:48Z","updated_at":"2015-03-03T01:30:01Z","pushed_at":"2015-03-03T07:24:49Z","git_url":"git://github.com/chef/chef.git","ssh_url":"git@github.com:chef/chef.git","clone_url":"https://github.com/chef/chef.git","svn_url":"https://github.com/chef/chef","homepage":"http://www.chef.io/chef/","size":161539,"stargazers_count":3397,"watchers_count":3397,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1372,"mirror_url":null,"open_issues_count":375,"forks":1372,"open_issues":375,"watchers":3397,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chef/chef/pulls/2877"},"html":{"href":"https://github.com/chef/chef/pull/2877"},"issue":{"href":"https://api.github.com/repos/chef/chef/issues/2877"},"comments":{"href":"https://api.github.com/repos/chef/chef/issues/2877/comments"},"review_comments":{"href":"https://api.github.com/repos/chef/chef/pulls/2877/comments"},"review_comment":{"href":"https://api.github.com/repos/chef/chef/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chef/chef/pulls/2877/commits"},"statuses":{"href":"https://api.github.com/repos/chef/chef/statuses/b395e5b221b3a08a902a3c7b4bc35528ad827a34"}}}}