{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/beats/issues/1585","repository_url":"https://api.github.com/repos/elastic/beats","labels_url":"https://api.github.com/repos/elastic/beats/issues/1585/labels{/name}","comments_url":"https://api.github.com/repos/elastic/beats/issues/1585/comments","events_url":"https://api.github.com/repos/elastic/beats/issues/1585/events","html_url":"https://github.com/elastic/beats/pull/1585","id":153622556,"number":1585,"title":"Improve packer ","user":{"login":"cyrilleverrier","id":16701739,"avatar_url":"https://avatars.githubusercontent.com/u/16701739?v=3","gravatar_id":"","url":"https://api.github.com/users/cyrilleverrier","html_url":"https://github.com/cyrilleverrier","followers_url":"https://api.github.com/users/cyrilleverrier/followers","following_url":"https://api.github.com/users/cyrilleverrier/following{/other_user}","gists_url":"https://api.github.com/users/cyrilleverrier/gists{/gist_id}","starred_url":"https://api.github.com/users/cyrilleverrier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyrilleverrier/subscriptions","organizations_url":"https://api.github.com/users/cyrilleverrier/orgs","repos_url":"https://api.github.com/users/cyrilleverrier/repos","events_url":"https://api.github.com/users/cyrilleverrier/events{/privacy}","received_events_url":"https://api.github.com/users/cyrilleverrier/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/beats/labels/packaging","name":"packaging","color":"006b75"},{"url":"https://api.github.com/repos/elastic/beats/labels/review","name":"review","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-05-07T22:53:09Z","updated_at":"2016-05-17T11:51:51Z","closed_at":"2016-05-11T12:43:26Z","pull_request":{"url":"https://api.github.com/repos/elastic/beats/pulls/1585","html_url":"https://github.com/elastic/beats/pull/1585","diff_url":"https://github.com/elastic/beats/pull/1585.diff","patch_url":"https://github.com/elastic/beats/pull/1585.patch"},"body":"Improvements.\r\n\r\n1. install dependencies in the order given by `DEPS`\r\n2. select which targets to build through `TARGETS` environment variable. (code from https://github.com/karalabe/xgo)\r\n3. when building a dependency, `autogen.sh` is called when the file exists\r\n4. when building a dependency, honors the `STATIC` environment variable to produce a static or shared library\r\n\r\nExample:\r\nmyexample needs `libsodium`, `zeromq` and `czmq` shared libraries\r\n\r\n```\r\n\tdocker run --rm \\\r\n\t\t-v $(abspath build):/build \\\r\n\t\t-v $(abspath $(ES_BEATS)/dev-tools/packer/xgo-scripts):/scripts \\\r\n\t\t-v $(abspath ../..):/source \\\r\n\t\t-e PACK=myexample \\\r\n\t\t-e DEPS=https://download.libsodium.org/libsodium/releases/libsodium-1.0.9.tar.gz\\ http://download.zeromq.org/zeromq-4.1.4.tar.gz\\ https://github.com/zeromq/czmq/archive/v3.0.2.tar.gz  \\\r\n\t\t-e BEFORE_BUILD=before_build.sh \\\r\n\t\t-e SOURCE=/source \\\r\n\t\t-e TARGETS=\"linux/amd64\" \\\r\n\t\t-e BUILDID=${BUILDID} \\\r\n\t\ttudorg/beats-builder \\\r\n\t\tgithub.com/example/myexample\r\n\r\n```\r\n\r\n\r\n\r\nNote:\r\n1. `xgo-image-deb6/base/build.sh` and `xgo-image/base/build.sh` are identical\r\n2. `xgo-image-deb6/base/build_deps.sh` and `xgo-image/base/build_deps.sh` are identical\r\nsome cleaning can be done at a later stage"},"comment":{"url":"https://api.github.com/repos/elastic/beats/issues/comments/219695353","html_url":"https://github.com/elastic/beats/pull/1585#issuecomment-219695353","issue_url":"https://api.github.com/repos/elastic/beats/issues/1585","id":219695353,"user":{"login":"cyrilleverrier","id":16701739,"avatar_url":"https://avatars.githubusercontent.com/u/16701739?v=3","gravatar_id":"","url":"https://api.github.com/users/cyrilleverrier","html_url":"https://github.com/cyrilleverrier","followers_url":"https://api.github.com/users/cyrilleverrier/followers","following_url":"https://api.github.com/users/cyrilleverrier/following{/other_user}","gists_url":"https://api.github.com/users/cyrilleverrier/gists{/gist_id}","starred_url":"https://api.github.com/users/cyrilleverrier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyrilleverrier/subscriptions","organizations_url":"https://api.github.com/users/cyrilleverrier/orgs","repos_url":"https://api.github.com/users/cyrilleverrier/repos","events_url":"https://api.github.com/users/cyrilleverrier/events{/privacy}","received_events_url":"https://api.github.com/users/cyrilleverrier/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T11:51:51Z","updated_at":"2016-05-17T11:51:51Z","body":"@tsg :+1: works perfectly fine now. Thanks"}}