)]}'
{"install_rally.sh":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"a9069a6beb8d330939e75eb200eed80760b82a16","unresolved":false,"context_lines":[{"line_number":451,"context_line":"    cp \"$SRCDIR\"/etc/rally/rally.conf.sample \"$ETCDIR\"/rally.conf"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    [ -d \"$DBDIR\" ] || mkdir -p \"$DBDIR\""},{"line_number":454,"context_line":"    sed \"s|#connection *\u003d.*|connection \u003d \\\"$DBCONNSTRING\\\"|\" \"$ETCDIR\"/rally.conf \u003e \"$ETCDIR\"/rally.conf.tmp"},{"line_number":455,"context_line":"    mv \"$ETCDIR\"/rally.conf.tmp \"$ETCDIR\"/rally.conf"},{"line_number":456,"context_line":"    rally-manage db recreate"},{"line_number":457,"context_line":"}"}],"source_content_type":"text/x-sh","patch_set":1,"id":"ba3cc151_7fd9b982","line":454,"updated":"2015-06-30 16:40:46.000000000","message":"This is an unsafe temp file. We shouldn\u0027t be overwriting (or blowing away) a rally.conf.tmp that someone has created, and this will fail if noclobber is set. Use a proper tempfile.","commit_id":"dc812510747467f24ac4bf034397845c845469e2"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"0de5c1c46dffe3a21ef324be6b6e4d8807050183","unresolved":false,"context_lines":[{"line_number":451,"context_line":"    cp \"$SRCDIR\"/etc/rally/rally.conf.sample \"$ETCDIR\"/rally.conf"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    [ -d \"$DBDIR\" ] || mkdir -p \"$DBDIR\""},{"line_number":454,"context_line":"    sed \"s|#connection *\u003d.*|connection \u003d \\\"$DBCONNSTRING\\\"|\" \"$ETCDIR\"/rally.conf \u003e \"$ETCDIR\"/rally.conf.tmp"},{"line_number":455,"context_line":"    mv \"$ETCDIR\"/rally.conf.tmp \"$ETCDIR\"/rally.conf"},{"line_number":456,"context_line":"    rally-manage db recreate"},{"line_number":457,"context_line":"}"}],"source_content_type":"text/x-sh","patch_set":1,"id":"ba3cc151_7019c0d6","line":454,"in_reply_to":"ba3cc151_2041bba9","updated":"2015-07-01 10:53:38.000000000","message":"Temp files should be created with mktemp; anything else is unsafe.","commit_id":"dc812510747467f24ac4bf034397845c845469e2"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"b5d2ce2abdf2ab0cdfe0f15485fc652b90c30f29","unresolved":false,"context_lines":[{"line_number":451,"context_line":"    cp \"$SRCDIR\"/etc/rally/rally.conf.sample \"$ETCDIR\"/rally.conf"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    [ -d \"$DBDIR\" ] || mkdir -p \"$DBDIR\""},{"line_number":454,"context_line":"    sed \"s|#connection *\u003d.*|connection \u003d \\\"$DBCONNSTRING\\\"|\" \"$ETCDIR\"/rally.conf \u003e \"$ETCDIR\"/rally.conf.tmp"},{"line_number":455,"context_line":"    mv \"$ETCDIR\"/rally.conf.tmp \"$ETCDIR\"/rally.conf"},{"line_number":456,"context_line":"    rally-manage db recreate"},{"line_number":457,"context_line":"}"}],"source_content_type":"text/x-sh","patch_set":1,"id":"ba3cc151_2041bba9","line":454,"in_reply_to":"ba3cc151_7fd9b982","updated":"2015-07-01 02:57:31.000000000","message":"It\u0027s a little overkill I think. \"sed -i ...\" replace config file we created at first.\n\nBut if we need a better tempfile, maybe rally.conf.bak.`date +\"%m-%d-%Y\"` is okay","commit_id":"dc812510747467f24ac4bf034397845c845469e2"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"93cb4acec54c486844274b2e4fd813b4caa939ef","unresolved":false,"context_lines":[{"line_number":451,"context_line":"    cp \"$SRCDIR\"/etc/rally/rally.conf.sample \"$ETCDIR\"/rally.conf"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    [ -d \"$DBDIR\" ] || mkdir -p \"$DBDIR\""},{"line_number":454,"context_line":"    local CONF_TMPDIR\u003d$(mktemp -dt)"},{"line_number":455,"context_line":"    sed \"s|#connection *\u003d.*|connection \u003d \\\"$DBCONNSTRING\\\"|\" \"$ETCDIR\"/rally.conf \u003e \"$CONF_TMPDIR\"/rally.conf"},{"line_number":456,"context_line":"    mv \"$CONF_TMPDIR\"/rally.conf \"$ETCDIR\"/rally.conf"},{"line_number":457,"context_line":"    rally-manage db recreate"}],"source_content_type":"text/x-sh","patch_set":2,"id":"ba3cc151_ce184b87","line":454,"updated":"2015-07-07 14:36:48.000000000","message":"mktemp -t is deprecated, and I believe has been removed in recent versions. Instead of creating a temporary directory, just create a temp file for this to keep it simple.","commit_id":"337e6e421ba1d40ee1adc3b8a42063892a68a483"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"93cb4acec54c486844274b2e4fd813b4caa939ef","unresolved":false,"context_lines":[{"line_number":453,"context_line":"    [ -d \"$DBDIR\" ] || mkdir -p \"$DBDIR\""},{"line_number":454,"context_line":"    local CONF_TMPDIR\u003d$(mktemp -dt)"},{"line_number":455,"context_line":"    sed \"s|#connection *\u003d.*|connection \u003d \\\"$DBCONNSTRING\\\"|\" \"$ETCDIR\"/rally.conf \u003e \"$CONF_TMPDIR\"/rally.conf"},{"line_number":456,"context_line":"    mv \"$CONF_TMPDIR\"/rally.conf \"$ETCDIR\"/rally.conf"},{"line_number":457,"context_line":"    rally-manage db recreate"},{"line_number":458,"context_line":"}"},{"line_number":459,"context_line":""}],"source_content_type":"text/x-sh","patch_set":2,"id":"ba3cc151_0e07131d","line":456,"updated":"2015-07-07 14:36:48.000000000","message":"You\u0027d need to clean up $CONF_TMPDIR here as well, but if you use a tempfile instead of a tempdir then \u0027mv\u0027 is the cleanup.","commit_id":"337e6e421ba1d40ee1adc3b8a42063892a68a483"},{"author":{"_account_id":7369,"name":"Sergey Skripnick","email":"sskripnick@mirantis.com","username":"redixin"},"change_message_id":"3c66ef3e4c1ed45caf959a879b156aebb46e7cef","unresolved":false,"context_lines":[{"line_number":451,"context_line":"    cp \"$SRCDIR\"/etc/rally/rally.conf.sample \"$ETCDIR\"/rally.conf"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    [ -d \"$DBDIR\" ] || mkdir -p \"$DBDIR\""},{"line_number":454,"context_line":"    local CONF_TMPFILE\u003d$(mktemp)"},{"line_number":455,"context_line":"    sed \"s|#connection *\u003d.*|connection \u003d \\\"$DBCONNSTRING\\\"|\" \"$ETCDIR\"/rally.conf \u003e \"$CONF_TMPFILE\""},{"line_number":456,"context_line":"    mv \"$CONF_TMPFILE\" \"$ETCDIR\"/rally.conf"},{"line_number":457,"context_line":"    rally-manage db recreate"}],"source_content_type":"text/x-sh","patch_set":3,"id":"5a2ca52d_0aee8722","line":454,"updated":"2015-10-13 11:42:16.000000000","message":"mktemp creates file readable only by owner, but system rally config file should be readable by all users.\n\nwe should either use \"cat $TMPFILE \u003e rally.conf\"\nor set proper permissons using chmod","commit_id":"68460ea3d1c50ad58c94be15899dad7670211bf4"},{"author":{"_account_id":16781,"name":"Albert White","email":"albert.white@oracle.com","username":"albertw"},"change_message_id":"bdaa8d837add59bcbd709c214d149f12b5596031","unresolved":false,"context_lines":[{"line_number":451,"context_line":"    cp \"$SRCDIR\"/etc/rally/rally.conf.sample \"$ETCDIR\"/rally.conf"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    [ -d \"$DBDIR\" ] || mkdir -p \"$DBDIR\""},{"line_number":454,"context_line":"    local CONF_TMPFILE\u003d$(mktemp)"},{"line_number":455,"context_line":"    sed \"s|#connection *\u003d.*|connection \u003d \\\"$DBCONNSTRING\\\"|\" \"$ETCDIR\"/rally.conf \u003e \"$CONF_TMPFILE\""},{"line_number":456,"context_line":"    mv \"$CONF_TMPFILE\" \"$ETCDIR\"/rally.conf"},{"line_number":457,"context_line":"    rally-manage db recreate"}],"source_content_type":"text/x-sh","patch_set":3,"id":"5a2ca52d_b848ff2e","line":454,"in_reply_to":"5a2ca52d_0aee8722","updated":"2015-10-13 16:15:40.000000000","message":"I\u0027m inclined to use the \"cat $TMPFILE \u003e rally.conf\" and leave the permissions to the users discretion via their umask. Unless anyone strongly feels that it should be 644?","commit_id":"68460ea3d1c50ad58c94be15899dad7670211bf4"},{"author":{"_account_id":7369,"name":"Sergey Skripnick","email":"sskripnick@mirantis.com","username":"redixin"},"change_message_id":"2f334ccface00fefd92f29ff0ba93da077198528","unresolved":false,"context_lines":[{"line_number":451,"context_line":"    cp \"$SRCDIR\"/etc/rally/rally.conf.sample \"$ETCDIR\"/rally.conf"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    [ -d \"$DBDIR\" ] || mkdir -p \"$DBDIR\""},{"line_number":454,"context_line":"    local CONF_TMPFILE\u003d$(mktemp)"},{"line_number":455,"context_line":"    sed \"s|#connection *\u003d.*|connection \u003d \\\"$DBCONNSTRING\\\"|\" \"$ETCDIR\"/rally.conf \u003e \"$CONF_TMPFILE\""},{"line_number":456,"context_line":"    mv \"$CONF_TMPFILE\" \"$ETCDIR\"/rally.conf"},{"line_number":457,"context_line":"    rally-manage db recreate"}],"source_content_type":"text/x-sh","patch_set":3,"id":"5a2ca52d_d9ee17ec","line":454,"in_reply_to":"5a2ca52d_b848ff2e","updated":"2015-10-13 19:33:48.000000000","message":"Using \"cat \u003e\" will keep original bahavior, so +1 for \"cat\"","commit_id":"68460ea3d1c50ad58c94be15899dad7670211bf4"}]}
