)]}'
{"nodepool/scripts/configure_mirror.sh":[{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"298b179499931c6763394d978778791c06ce3154","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    fi"},{"line_number":157,"context_line":"    # Turn off checking of GPG signatures"},{"line_number":158,"context_line":"    echo \"$APT_CONF_UNAUTHENTICATED\" \u003e/tmp/99unauthenticated"},{"line_number":159,"context_line":"    sudo cp /tmp/99unauthenticated /etc/apt/apt.conf.d/"},{"line_number":160,"context_line":"    sudo chown root:root /etc/apt/apt.conf.d/99unauthenticated"},{"line_number":161,"context_line":"    sudo chmod 0644 /etc/apt/apt.conf.d/99unauthenticated"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-sh","patch_set":1,"id":"dada55a8_5a8138fa","line":159,"updated":"2016-07-21 19:18:57.000000000","message":"Whoops--thanks! Yes, I totally meant to use mv for all of these.","commit_id":"3d0861273723d3ce716690d4a5ed58245471676f"},{"author":{"_account_id":4162,"name":"Paul Belanger","email":"pabelanger@redhat.com","username":"pabelanger"},"change_message_id":"8a03b54b0f68ef52451a97909c8f72173e7c401e","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    fi"},{"line_number":157,"context_line":"    # Turn off checking of GPG signatures"},{"line_number":158,"context_line":"    echo \"$APT_CONF_UNAUTHENTICATED\" \u003e/tmp/99unauthenticated"},{"line_number":159,"context_line":"    sudo cp /tmp/99unauthenticated /etc/apt/apt.conf.d/"},{"line_number":160,"context_line":"    sudo chown root:root /etc/apt/apt.conf.d/99unauthenticated"},{"line_number":161,"context_line":"    sudo chmod 0644 /etc/apt/apt.conf.d/99unauthenticated"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-sh","patch_set":1,"id":"dada55a8_3f40b606","line":159,"updated":"2016-07-21 18:50:02.000000000","message":"use mv here to be consistent","commit_id":"3d0861273723d3ce716690d4a5ed58245471676f"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"8f898083ee1dbb6136811f475da28aa786ba01e0","unresolved":false,"context_lines":[{"line_number":131,"context_line":"# them."},{"line_number":132,"context_line":"if [ \"$LSBDISTID\" \u003d\u003d \"Ubuntu\" ] \u0026\u0026 [ \"$LSBDISTCODENAME\" !\u003d \u0027precise\u0027 ]; then"},{"line_number":133,"context_line":"    echo \"$UBUNTU_SOURCES_LIST\" \u003e/tmp/sources.list"},{"line_number":134,"context_line":"    sudo mv /tmp/sources.list /etc/apt/"},{"line_number":135,"context_line":"    sudo chown root:root /etc/apt/sources.list"},{"line_number":136,"context_line":"    sudo chmod 0644 /etc/apt/sources.list"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-sh","patch_set":3,"id":"dada55a8_4402bf70","line":134,"updated":"2016-07-22 19:50:09.000000000","message":"I think you are using a tmpfile and a mv here to avoid an apt-get update racing your putting the file down. I think that is fine but it shouldn\u0027t be necessary for the opt in files below.\n\nAlso local testing of mv shows that it attempts to preserve the perms of the source side. So if you are worried about the perms on source being too restrictive before the mv resulting in dest having too restrictive perms leading to the chmod below you might consider doing the chmod first.","commit_id":"0ba568d42e53c4526e5735ac5181c0d036d4998b"},{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"b3358401caf21571e7746fbc97f45df70345ed31","unresolved":false,"context_lines":[{"line_number":131,"context_line":"# them."},{"line_number":132,"context_line":"if [ \"$LSBDISTID\" \u003d\u003d \"Ubuntu\" ] \u0026\u0026 [ \"$LSBDISTCODENAME\" !\u003d \u0027precise\u0027 ]; then"},{"line_number":133,"context_line":"    echo \"$UBUNTU_SOURCES_LIST\" \u003e/tmp/sources.list"},{"line_number":134,"context_line":"    sudo mv /tmp/sources.list /etc/apt/"},{"line_number":135,"context_line":"    sudo chown root:root /etc/apt/sources.list"},{"line_number":136,"context_line":"    sudo chmod 0644 /etc/apt/sources.list"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-sh","patch_set":3,"id":"dada55a8_da331112","line":134,"updated":"2016-07-24 13:41:35.000000000","message":"Sure, can chmod first or even just set a sane umask up front. As for the reason for the mv, it\u0027s really just working around the fact that this script is run as not-root and we want to write these files somewhere only writable by root. If it\u0027s annoying, I could simply do something like:\n\n    sudo sh -c \"echo \u0027$UBUNTU_SOURCES_LIST\u0027 \u003e /etc/apt/sources.list\"\n\n...or go back to using sudo dd but on a pipe from echo. I could also alternatively make a write_as_root function to reduce some of the current repetition.","commit_id":"0ba568d42e53c4526e5735ac5181c0d036d4998b"},{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"b3358401caf21571e7746fbc97f45df70345ed31","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    # Ceph"},{"line_number":143,"context_line":"    echo \"$CEPH_SOURCES_LIST\" \u003e/tmp/ceph-deb-hammer.list"},{"line_number":144,"context_line":"    sudo mv /tmp/ceph-deb-hammer.list /etc/apt/sources.list.available.d/"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    # Ubuntu Cloud Archive"},{"line_number":147,"context_line":"    echo \"$UCA_SOURCES_LIST\" \u003e/tmp/ubuntu-cloud-archive.list"}],"source_content_type":"text/x-sh","patch_set":3,"id":"dada55a8_3a3b4ded","line":144,"updated":"2016-07-24 13:41:35.000000000","message":"That destination is only writable by root.","commit_id":"0ba568d42e53c4526e5735ac5181c0d036d4998b"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"8f898083ee1dbb6136811f475da28aa786ba01e0","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    # Ceph"},{"line_number":143,"context_line":"    echo \"$CEPH_SOURCES_LIST\" \u003e/tmp/ceph-deb-hammer.list"},{"line_number":144,"context_line":"    sudo mv /tmp/ceph-deb-hammer.list /etc/apt/sources.list.available.d/"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    # Ubuntu Cloud Archive"},{"line_number":147,"context_line":"    echo \"$UCA_SOURCES_LIST\" \u003e/tmp/ubuntu-cloud-archive.list"}],"source_content_type":"text/x-sh","patch_set":3,"id":"dada55a8_a4f73b8b","line":144,"updated":"2016-07-22 19:50:09.000000000","message":"This mv should not be necessary, just write straight to the destination file.","commit_id":"0ba568d42e53c4526e5735ac5181c0d036d4998b"},{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"b3358401caf21571e7746fbc97f45df70345ed31","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    # Ubuntu Cloud Archive"},{"line_number":147,"context_line":"    echo \"$UCA_SOURCES_LIST\" \u003e/tmp/ubuntu-cloud-archive.list"},{"line_number":148,"context_line":"    sudo mv /tmp/ubuntu-cloud-archive.list /etc/apt/sources.list.available.d/"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    sudo chown root:root /etc/apt/sources.list.available.d/*"},{"line_number":151,"context_line":"    sudo chmod 0644 /etc/apt/sources.list.available.d/*"}],"source_content_type":"text/x-sh","patch_set":3,"id":"dada55a8_1a3e49da","line":148,"updated":"2016-07-24 13:41:35.000000000","message":"Same as above.","commit_id":"0ba568d42e53c4526e5735ac5181c0d036d4998b"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"8f898083ee1dbb6136811f475da28aa786ba01e0","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    # Ubuntu Cloud Archive"},{"line_number":147,"context_line":"    echo \"$UCA_SOURCES_LIST\" \u003e/tmp/ubuntu-cloud-archive.list"},{"line_number":148,"context_line":"    sudo mv /tmp/ubuntu-cloud-archive.list /etc/apt/sources.list.available.d/"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    sudo chown root:root /etc/apt/sources.list.available.d/*"},{"line_number":151,"context_line":"    sudo chmod 0644 /etc/apt/sources.list.available.d/*"}],"source_content_type":"text/x-sh","patch_set":3,"id":"dada55a8_84f4b787","line":148,"updated":"2016-07-22 19:50:09.000000000","message":"This mv should not be necessary, just write straight to the destination file.","commit_id":"0ba568d42e53c4526e5735ac5181c0d036d4998b"}]}
