{"action":"created","issue":{"url":"https://api.github.com/repos/chef/chef/issues/4862","repository_url":"https://api.github.com/repos/chef/chef","labels_url":"https://api.github.com/repos/chef/chef/issues/4862/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef/issues/4862/comments","events_url":"https://api.github.com/repos/chef/chef/issues/4862/events","html_url":"https://github.com/chef/chef/issues/4862","id":150705769,"number":4862,"title":"knife cookbook site install broken on windows","user":{"login":"willoucom","id":4134696,"avatar_url":"https://avatars.githubusercontent.com/u/4134696?v=3","gravatar_id":"","url":"https://api.github.com/users/willoucom","html_url":"https://github.com/willoucom","followers_url":"https://api.github.com/users/willoucom/followers","following_url":"https://api.github.com/users/willoucom/following{/other_user}","gists_url":"https://api.github.com/users/willoucom/gists{/gist_id}","starred_url":"https://api.github.com/users/willoucom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willoucom/subscriptions","organizations_url":"https://api.github.com/users/willoucom/orgs","repos_url":"https://api.github.com/users/willoucom/repos","events_url":"https://api.github.com/users/willoucom/events{/privacy}","received_events_url":"https://api.github.com/users/willoucom/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chef/chef/labels/Windows","name":"Windows","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/chef/chef/milestones/13","html_url":"https://github.com/chef/chef/milestones/Accepted%20Minor","labels_url":"https://api.github.com/repos/chef/chef/milestones/13/labels","id":975715,"number":13,"title":"Accepted Minor","description":"Bucket to pull issues from for next minor","creator":{"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},"open_issues":306,"closed_issues":118,"state":"open","created_at":"2015-02-11T18:42:48Z","updated_at":"2016-06-15T17:21:49Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-04-24T22:17:34Z","updated_at":"2016-06-17T14:35:32Z","closed_at":"2016-05-10T17:17:00Z","body":"## Description\r\n\r\nOn windows, the command knife cookbook site install \"package\" return an error with tar\r\n\r\nThe error seems to occur because the tar.exe installed doesn't support the option --force-local\r\n\r\n## Chef Version\r\n\r\nIrrelevant, client-side issue\r\n\r\n## Platform Version\r\n\r\nWindows 10\r\nknife --version : Chef: 12.8.1\r\n\r\n## Replication Case\r\n\r\nDownload latest chef-dk for windows (chefdk-0.12.0-1-x86.msi), install it.\r\n\r\nRun : knife cookbook site install \"package\"\r\n\r\n## Client Output\r\n\r\n$ knife cookbook site install docker\r\n[snip]\r\nUncompressing docker version 2.6.8.\r\nERROR: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'\r\n---- Begin output of tar zxvf \"D:/Chef/chef-repo/cookbooks/docker.tar.gz\" --force-local ----\r\nSTDOUT:\r\nSTDERR: tar: Option --force-local is not supported\r\nUsage:\r\n  List:    tar -tf <archive-filename>\r\n  Extract: tar -xf <archive-filename>\r\n  Create:  tar -cf <archive-filename> [filenames...]\r\n  Help:    tar --help\r\n---- End output of tar zxvf \"D:/Chef/chef-repo/cookbooks/docker.tar.gz\" --force-local ----\r\nRan tar zxvf \"D:/Chef/chef-repo/cookbooks/docker.tar.gz\" --force-local returned 1\r\n\r\n## Quickfix and Workaround\r\n\r\nYou can bypass this error by commenting a single line in : \r\n/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.8.1-universal-mingw32/lib/chef/knife/cookbook_site_install.rb\r\n\r\nComment the line 147 : \r\n            extract_command << \" --force-local\"\r\n\r\nRetry the command : \r\nknife cookbook site install docker\r\n\r\nInstalling docker to D:/Chef/chef-repo/cookbooks\r\nChecking out the master branch.\r\nPristine copy branch (chef-vendor-docker) exists, switching to it.\r\nDownloading docker from Supermarket at version 2.6.8 to D:/Chef/chef-repo/cookbooks/docker.tar.gz\r\nCookbook saved: D:/Chef/chef-repo/cookbooks/docker.tar.gz\r\nRemoving pre-existing version.\r\nUncompressing docker version 2.6.8.\r\nRemoving downloaded tarball\r\n43 files updated, committing changes\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/chef/chef/issues/comments/226785782","html_url":"https://github.com/chef/chef/issues/4862#issuecomment-226785782","issue_url":"https://api.github.com/repos/chef/chef/issues/4862","id":226785782,"user":{"login":"smurawski","id":4006985,"avatar_url":"https://avatars.githubusercontent.com/u/4006985?v=3","gravatar_id":"","url":"https://api.github.com/users/smurawski","html_url":"https://github.com/smurawski","followers_url":"https://api.github.com/users/smurawski/followers","following_url":"https://api.github.com/users/smurawski/following{/other_user}","gists_url":"https://api.github.com/users/smurawski/gists{/gist_id}","starred_url":"https://api.github.com/users/smurawski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smurawski/subscriptions","organizations_url":"https://api.github.com/users/smurawski/orgs","repos_url":"https://api.github.com/users/smurawski/repos","events_url":"https://api.github.com/users/smurawski/events{/privacy}","received_events_url":"https://api.github.com/users/smurawski/received_events","type":"User","site_admin":false},"created_at":"2016-06-17T14:35:32Z","updated_at":"2016-06-17T14:35:32Z","body":"@EagleIJoe The PR added logic to check the version of tar.  ChefDK on Windows includes the bsdtar variant, which does not support --force-local, but someone may have the GNU Utils version on their path at a higher precedence than the tar with ChefDK.  The GNU Utils tar does support --force-local, so the logic checks if it is the GNU or bsd version."}}
{"actor":{"display_login":"smurawski"}}