{"action":"created","issue":{"url":"https://api.github.com/repos/Hexxeh/rpi-update/issues/270","repository_url":"https://api.github.com/repos/Hexxeh/rpi-update","labels_url":"https://api.github.com/repos/Hexxeh/rpi-update/issues/270/labels{/name}","comments_url":"https://api.github.com/repos/Hexxeh/rpi-update/issues/270/comments","events_url":"https://api.github.com/repos/Hexxeh/rpi-update/issues/270/events","html_url":"https://github.com/Hexxeh/rpi-update/issues/270","id":387848958,"node_id":"MDU6SXNzdWUzODc4NDg5NTg=","number":270,"title":"downloading firmware fails due to ignored redirect","user":{"login":"BMicraft","id":12884838,"node_id":"MDQ6VXNlcjEyODg0ODM4","avatar_url":"https://avatars0.githubusercontent.com/u/12884838?v=4","gravatar_id":"","url":"https://api.github.com/users/BMicraft","html_url":"https://github.com/BMicraft","followers_url":"https://api.github.com/users/BMicraft/followers","following_url":"https://api.github.com/users/BMicraft/following{/other_user}","gists_url":"https://api.github.com/users/BMicraft/gists{/gist_id}","starred_url":"https://api.github.com/users/BMicraft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BMicraft/subscriptions","organizations_url":"https://api.github.com/users/BMicraft/orgs","repos_url":"https://api.github.com/users/BMicraft/repos","events_url":"https://api.github.com/users/BMicraft/events{/privacy}","received_events_url":"https://api.github.com/users/BMicraft/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-05T16:50:40Z","updated_at":"2018-12-05T16:58:02Z","closed_at":null,"author_association":"NONE","body":"Running `rpi-update` on my up to date raspberry pi zero fails at un-gzipping the downloaded firmware. \r\n```\r\n *** Downloading specific firmware revision (this will take a few minutes)\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100   168    0   168    0     0    188      0 --:--:-- --:--:-- --:--:--   188\r\n\r\ngzip: stdin: not in gzip format\r\ntar: Child returned status 1\r\ntar: Error is not recoverable: exiting now\r\n```\r\nWhen investigationg I added `set -o xtrace` in '/usr/bin/rpi-update' and ran it with updates disabled.\r\nThe offending line seems to be `eval curl -w \"\" -L https://github.com/Hexxeh/rpi-firmware/tarball/eefe4b161f5e9730183c8dc1605e14c85b15cf51`.\r\nAfter eval that line get executed as `curl -w -L https://github.com/Hexxeh/rpi-firmware/tarball` and the empty format string for `-w` gets left out. That makes `-L` the new format string and therefore gets ignored and curl does not follow the redirect\r\n```\r\n# curl -w -L https://github.com/Hexxeh/rpi-firmware/tarball/eefe4b161f5e9730183c8dc1605e14c85b15cf51\r\n<html><body>You are being <a href=\"https://codeload.github.com/Hexxeh/rpi-firmware/legacy.tar.gz/eefe4b161f5e9730183c8dc1605e14c85b15cf51\">redirected</a>.</body></html>-L\r\n```\r\n\r\nA solution to that problem could be to wrap the empty quotes with another pair of single quotes\r\n```\r\neval curl -w '\"\"' -L ${GITHUB_AUTH_PARAM} \"${REPO_URI}/tarball/${FW_REV}\" | tar xzf - -C \"${FW_REPOLOCAL}\" --strip-components=1\r\n```\r\nBy doing that the update worked flawlessly"},"comment":{"url":"https://api.github.com/repos/Hexxeh/rpi-update/issues/comments/444560263","html_url":"https://github.com/Hexxeh/rpi-update/issues/270#issuecomment-444560263","issue_url":"https://api.github.com/repos/Hexxeh/rpi-update/issues/270","id":444560263,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDU2MDI2Mw==","user":{"login":"BMicraft","id":12884838,"node_id":"MDQ6VXNlcjEyODg0ODM4","avatar_url":"https://avatars0.githubusercontent.com/u/12884838?v=4","gravatar_id":"","url":"https://api.github.com/users/BMicraft","html_url":"https://github.com/BMicraft","followers_url":"https://api.github.com/users/BMicraft/followers","following_url":"https://api.github.com/users/BMicraft/following{/other_user}","gists_url":"https://api.github.com/users/BMicraft/gists{/gist_id}","starred_url":"https://api.github.com/users/BMicraft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BMicraft/subscriptions","organizations_url":"https://api.github.com/users/BMicraft/orgs","repos_url":"https://api.github.com/users/BMicraft/repos","events_url":"https://api.github.com/users/BMicraft/events{/privacy}","received_events_url":"https://api.github.com/users/BMicraft/received_events","type":"User","site_admin":false},"created_at":"2018-12-05T16:58:02Z","updated_at":"2018-12-05T16:58:02Z","author_association":"NONE","body":"Wow, that was fast.\r\nI am new to github but I think just sent a pull request doing that, which that won't be necessary now. "}}
{"actor":{"display_login":"BMicraft"}}