{"action":"created","comment":{"url":"https://api.github.com/repos/YugaByte/linuxbrew-build/pulls/comments/240407888","pull_request_review_id":183430002,"id":240407888,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDQwNzg4OA==","diff_hunk":"@@ -0,0 +1,135 @@\n+#!/usr/bin/env bash\n+set -euo pipefail\n+\n+ABS_PATH_LIMIT=85\n+export HOMEBREW_NO_AUTO_UPDATE=1\n+\n+[[ -x ./bin/brew ]] || (echo \"This script should be run inside Linuxbrew directory.\"; exit 1)\n+\n+cd $(realpath .)\n+BREW_HOME=\"$PWD\"\n+\n+LEN=${#BREW_HOME}\n+[[ $LEN -eq $ABS_PATH_LIMIT ]] || (echo \"Linuxbrew absolute path should be exactly $ABS_PATH_LIMIT \\\n+ bytes, but actual length is $LEN bytes: $BREW_HOME\"; exit 1)\n+\n+export HOMEBREW_ARCH=ivybridge\n+\n+openssl_formula=./Library/Taps/homebrew/homebrew-core/Formula/openssl.rb\n+openssl_orig=./Library/Taps/homebrew/homebrew-core/Formula/openssl.rb.orig\n+\n+if [[ ! -e \"$openssl_orig\" ]]; then\n+  ./bin/brew info openssl >/dev/null\n+  cp \"$openssl_formula\" \"$openssl_orig\"\n+fi\n+\n+cp \"$openssl_orig\" \"$openssl_formula\"\n+  cat <<EOF | patch -n $openssl_formula\n+4c4\n+< class Openssl < Formula\n+---\n+> class Openssl < Formula\n+40c40,41\n+<       :x86_64 => %w[linux-x86_64],\n+---\n+>       :x86_64 => %w[linux-x86_64\n+>                     -march=ivybridge -mno-avx -mno-bmi -mno-bmi2 -mno-fma -no-abm -no-movbe],\n+EOF\n+\n+./bin/brew install autoconf automake bzip2 flex gcc icu4c libtool libuuid maven ninja openssl \\\n+readline s3cmd\n+\n+if [[ ! -e VERSION_INFO ]]; then\n+  commit_id=$(git rev-parse HEAD)\n+  echo \"Linuxbrew commit ID: $commit_id\" >VERSION_INFO.tmp\n+  pushd $(pwd)\n+  cd Library/Taps/homebrew/homebrew-core\n+  commit_id=$(git rev-parse HEAD)\n+  popd\n+  echo \"homebrew-core commit ID: $commit_id\" >>VERSION_INFO.tmp\n+  mv VERSION_INFO.tmp VERSION_INFO\n+fi\n+\n+echo \"Updating symlinks ...\"\n+cat <<EOF >update_links.sh\n+#!/usr/bin/env bash\n+\n+set -euo pipefail\n+\n+BREW_HOME=\"\\${0%/*}\"\n+[[ -x \\$BREW_HOME/bin/brew ]] || \\\n+  (echo \"This script should be located inside Linuxbrew directory.\"; exit 1)\n+\n+find \\$BREW_HOME -type l | while read f\n+do\n+  target=\"\\$(readlink \"\\$f\")\"\n+  real_target=\"\\$(realpath \"\\$f\")\"\n+  if [[ \"\\$real_target\" != \"\\$BREW_HOME\"* && \"\\$real_target\" != \"\\$target\" ]]; then\n+    # We want to convert relative links pointing outside of Linuxbrew to absolute links.\n+    ln -sfT \"\\$real_target\" \"\\$f\"\n+  fi\n+done\n+EOF","path":"linuxbrew-build.sh","position":72,"original_position":72,"commit_id":"6fa4a18ca3a9e5a1fe53243d549773411655ff7e","original_commit_id":"6fa4a18ca3a9e5a1fe53243d549773411655ff7e","user":{"login":"mbautin","id":552936,"node_id":"MDQ6VXNlcjU1MjkzNg==","avatar_url":"https://avatars0.githubusercontent.com/u/552936?v=4","gravatar_id":"","url":"https://api.github.com/users/mbautin","html_url":"https://github.com/mbautin","followers_url":"https://api.github.com/users/mbautin/followers","following_url":"https://api.github.com/users/mbautin/following{/other_user}","gists_url":"https://api.github.com/users/mbautin/gists{/gist_id}","starred_url":"https://api.github.com/users/mbautin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbautin/subscriptions","organizations_url":"https://api.github.com/users/mbautin/orgs","repos_url":"https://api.github.com/users/mbautin/repos","events_url":"https://api.github.com/users/mbautin/events{/privacy}","received_events_url":"https://api.github.com/users/mbautin/received_events","type":"User","site_admin":false},"body":"Why do we need to generate a script on the fly? Why can't we do this as part of the parent script?\r\nAn embedded script with escaped characters is difficult to read.","created_at":"2018-12-10T22:34:50Z","updated_at":"2018-12-10T22:39:30Z","html_url":"https://github.com/YugaByte/linuxbrew-build/pull/1#discussion_r240407888","pull_request_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/YugaByte/linuxbrew-build/pulls/comments/240407888"},"html":{"href":"https://github.com/YugaByte/linuxbrew-build/pull/1#discussion_r240407888"},"pull_request":{"href":"https://api.github.com/repos/YugaByte/linuxbrew-build/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/YugaByte/linuxbrew-build/pulls/1","id":236913198,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2OTEzMTk4","html_url":"https://github.com/YugaByte/linuxbrew-build/pull/1","diff_url":"https://github.com/YugaByte/linuxbrew-build/pull/1.diff","patch_url":"https://github.com/YugaByte/linuxbrew-build/pull/1.patch","issue_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/issues/1","number":1,"state":"open","locked":false,"title":"ENG-4027: Scripts for preparation of Frozen Linuxbrew.","user":{"login":"ttyusupov","id":903044,"node_id":"MDQ6VXNlcjkwMzA0NA==","avatar_url":"https://avatars0.githubusercontent.com/u/903044?v=4","gravatar_id":"","url":"https://api.github.com/users/ttyusupov","html_url":"https://github.com/ttyusupov","followers_url":"https://api.github.com/users/ttyusupov/followers","following_url":"https://api.github.com/users/ttyusupov/following{/other_user}","gists_url":"https://api.github.com/users/ttyusupov/gists{/gist_id}","starred_url":"https://api.github.com/users/ttyusupov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ttyusupov/subscriptions","organizations_url":"https://api.github.com/users/ttyusupov/orgs","repos_url":"https://api.github.com/users/ttyusupov/repos","events_url":"https://api.github.com/users/ttyusupov/events{/privacy}","received_events_url":"https://api.github.com/users/ttyusupov/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-07T15:57:11Z","updated_at":"2018-12-10T22:39:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d77d47e98001d0c42ba453ee497698d25d667a79","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/pulls/1/commits","review_comments_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/pulls/1/comments","review_comment_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/pulls/comments{/number}","comments_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/issues/1/comments","statuses_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/statuses/6fa4a18ca3a9e5a1fe53243d549773411655ff7e","head":{"label":"YugaByte:freeze-linuxbrew","ref":"freeze-linuxbrew","sha":"6fa4a18ca3a9e5a1fe53243d549773411655ff7e","user":{"login":"YugaByte","id":17074854,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MDc0ODU0","avatar_url":"https://avatars3.githubusercontent.com/u/17074854?v=4","gravatar_id":"","url":"https://api.github.com/users/YugaByte","html_url":"https://github.com/YugaByte","followers_url":"https://api.github.com/users/YugaByte/followers","following_url":"https://api.github.com/users/YugaByte/following{/other_user}","gists_url":"https://api.github.com/users/YugaByte/gists{/gist_id}","starred_url":"https://api.github.com/users/YugaByte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YugaByte/subscriptions","organizations_url":"https://api.github.com/users/YugaByte/orgs","repos_url":"https://api.github.com/users/YugaByte/repos","events_url":"https://api.github.com/users/YugaByte/events{/privacy}","received_events_url":"https://api.github.com/users/YugaByte/received_events","type":"Organization","site_admin":false},"repo":{"id":153817499,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM4MTc0OTk=","name":"linuxbrew-build","full_name":"YugaByte/linuxbrew-build","private":false,"owner":{"login":"YugaByte","id":17074854,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MDc0ODU0","avatar_url":"https://avatars3.githubusercontent.com/u/17074854?v=4","gravatar_id":"","url":"https://api.github.com/users/YugaByte","html_url":"https://github.com/YugaByte","followers_url":"https://api.github.com/users/YugaByte/followers","following_url":"https://api.github.com/users/YugaByte/following{/other_user}","gists_url":"https://api.github.com/users/YugaByte/gists{/gist_id}","starred_url":"https://api.github.com/users/YugaByte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YugaByte/subscriptions","organizations_url":"https://api.github.com/users/YugaByte/orgs","repos_url":"https://api.github.com/users/YugaByte/repos","events_url":"https://api.github.com/users/YugaByte/events{/privacy}","received_events_url":"https://api.github.com/users/YugaByte/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/YugaByte/linuxbrew-build","description":"Scripts for building Linuxbrew for YugaByte and pre-packaged binary builds of Linuxbrew","fork":false,"url":"https://api.github.com/repos/YugaByte/linuxbrew-build","forks_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/forks","keys_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/teams","hooks_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/hooks","issue_events_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/issues/events{/number}","events_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/events","assignees_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/assignees{/user}","branches_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/branches{/branch}","tags_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/tags","blobs_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/git/refs{/sha}","trees_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/statuses/{sha}","languages_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/languages","stargazers_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/stargazers","contributors_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/contributors","subscribers_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/subscribers","subscription_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/subscription","commits_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/commits{/sha}","git_commits_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/git/commits{/sha}","comments_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/comments{/number}","issue_comment_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/issues/comments{/number}","contents_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/contents/{+path}","compare_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/merges","archive_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/downloads","issues_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/issues{/number}","pulls_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/pulls{/number}","milestones_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/milestones{/number}","notifications_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/labels{/name}","releases_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/releases{/id}","deployments_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/deployments","created_at":"2018-10-19T17:18:16Z","updated_at":"2018-11-26T17:21:19Z","pushed_at":"2018-12-07T15:57:12Z","git_url":"git://github.com/YugaByte/linuxbrew-build.git","ssh_url":"git@github.com:YugaByte/linuxbrew-build.git","clone_url":"https://github.com/YugaByte/linuxbrew-build.git","svn_url":"https://github.com/YugaByte/linuxbrew-build","homepage":null,"size":3,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"YugaByte:master","ref":"master","sha":"abb15ab709c7d958fda07c6db2fe25927969ab3c","user":{"login":"YugaByte","id":17074854,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MDc0ODU0","avatar_url":"https://avatars3.githubusercontent.com/u/17074854?v=4","gravatar_id":"","url":"https://api.github.com/users/YugaByte","html_url":"https://github.com/YugaByte","followers_url":"https://api.github.com/users/YugaByte/followers","following_url":"https://api.github.com/users/YugaByte/following{/other_user}","gists_url":"https://api.github.com/users/YugaByte/gists{/gist_id}","starred_url":"https://api.github.com/users/YugaByte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YugaByte/subscriptions","organizations_url":"https://api.github.com/users/YugaByte/orgs","repos_url":"https://api.github.com/users/YugaByte/repos","events_url":"https://api.github.com/users/YugaByte/events{/privacy}","received_events_url":"https://api.github.com/users/YugaByte/received_events","type":"Organization","site_admin":false},"repo":{"id":153817499,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM4MTc0OTk=","name":"linuxbrew-build","full_name":"YugaByte/linuxbrew-build","private":false,"owner":{"login":"YugaByte","id":17074854,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MDc0ODU0","avatar_url":"https://avatars3.githubusercontent.com/u/17074854?v=4","gravatar_id":"","url":"https://api.github.com/users/YugaByte","html_url":"https://github.com/YugaByte","followers_url":"https://api.github.com/users/YugaByte/followers","following_url":"https://api.github.com/users/YugaByte/following{/other_user}","gists_url":"https://api.github.com/users/YugaByte/gists{/gist_id}","starred_url":"https://api.github.com/users/YugaByte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YugaByte/subscriptions","organizations_url":"https://api.github.com/users/YugaByte/orgs","repos_url":"https://api.github.com/users/YugaByte/repos","events_url":"https://api.github.com/users/YugaByte/events{/privacy}","received_events_url":"https://api.github.com/users/YugaByte/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/YugaByte/linuxbrew-build","description":"Scripts for building Linuxbrew for YugaByte and pre-packaged binary builds of Linuxbrew","fork":false,"url":"https://api.github.com/repos/YugaByte/linuxbrew-build","forks_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/forks","keys_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/teams","hooks_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/hooks","issue_events_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/issues/events{/number}","events_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/events","assignees_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/assignees{/user}","branches_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/branches{/branch}","tags_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/tags","blobs_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/git/refs{/sha}","trees_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/statuses/{sha}","languages_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/languages","stargazers_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/stargazers","contributors_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/contributors","subscribers_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/subscribers","subscription_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/subscription","commits_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/commits{/sha}","git_commits_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/git/commits{/sha}","comments_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/comments{/number}","issue_comment_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/issues/comments{/number}","contents_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/contents/{+path}","compare_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/merges","archive_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/downloads","issues_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/issues{/number}","pulls_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/pulls{/number}","milestones_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/milestones{/number}","notifications_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/labels{/name}","releases_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/releases{/id}","deployments_url":"https://api.github.com/repos/YugaByte/linuxbrew-build/deployments","created_at":"2018-10-19T17:18:16Z","updated_at":"2018-11-26T17:21:19Z","pushed_at":"2018-12-07T15:57:12Z","git_url":"git://github.com/YugaByte/linuxbrew-build.git","ssh_url":"git@github.com:YugaByte/linuxbrew-build.git","clone_url":"https://github.com/YugaByte/linuxbrew-build.git","svn_url":"https://github.com/YugaByte/linuxbrew-build","homepage":null,"size":3,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/YugaByte/linuxbrew-build/pulls/1"},"html":{"href":"https://github.com/YugaByte/linuxbrew-build/pull/1"},"issue":{"href":"https://api.github.com/repos/YugaByte/linuxbrew-build/issues/1"},"comments":{"href":"https://api.github.com/repos/YugaByte/linuxbrew-build/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/YugaByte/linuxbrew-build/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/YugaByte/linuxbrew-build/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/YugaByte/linuxbrew-build/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/YugaByte/linuxbrew-build/statuses/6fa4a18ca3a9e5a1fe53243d549773411655ff7e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mbautin"}}