{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/io.js/issues/1975","labels_url":"https://api.github.com/repos/nodejs/io.js/issues/1975/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/io.js/issues/1975/comments","events_url":"https://api.github.com/repos/nodejs/io.js/issues/1975/events","html_url":"https://github.com/nodejs/io.js/pull/1975","id":88166754,"number":1975,"title":"build: headers tarball target","user":{"login":"rvagg","id":495647,"avatar_url":"https://avatars.githubusercontent.com/u/495647?v=3","gravatar_id":"","url":"https://api.github.com/users/rvagg","html_url":"https://github.com/rvagg","followers_url":"https://api.github.com/users/rvagg/followers","following_url":"https://api.github.com/users/rvagg/following{/other_user}","gists_url":"https://api.github.com/users/rvagg/gists{/gist_id}","starred_url":"https://api.github.com/users/rvagg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvagg/subscriptions","organizations_url":"https://api.github.com/users/rvagg/orgs","repos_url":"https://api.github.com/users/rvagg/repos","events_url":"https://api.github.com/users/rvagg/events{/privacy}","received_events_url":"https://api.github.com/users/rvagg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/io.js/labels/build","name":"build","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-14T10:58:38Z","updated_at":"2015-06-14T22:47:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nodejs/io.js/pulls/1975","html_url":"https://github.com/nodejs/io.js/pull/1975","diff_url":"https://github.com/nodejs/io.js/pull/1975.diff","patch_url":"https://github.com/nodejs/io.js/pull/1975.patch"},"body":"For `make tar-headers` (plus the other options in #1938 for nightlies etc.). Makes a tarball with the headers as they are packaged in binary tarballs - which is different to the source tarball but is better for being used as an includes path for node-gyp et. al.\r\n\r\nWe will need to get node-gyp to download this file from release directories where it's available. The way I suggest we do that is via #493 which is my next task (YES, YES IT IS!); if node-gyp detects a `process.release.headers_url` (or whatever it ends up being) it knows to download from there and unpack to ~/.node-gyp/. Then we'd need to prepend `include/node` to the list of include directories in addon.gyp (https://github.com/TooTallNate/node-gyp/blob/56b7f9cff21b74421830cf2324545c8420f28e53/addon.gypi#L7-L11) so that it picks up this new directory format but still allows for the old format.\r\n\r\nIt's worth noting for anyone not aware of this fact but these includes are included in the binary downloads and have been from early 0.10 for all but Windows, so node-gyp shouldn't need to even download anything most of the time. Making node-gyp aware of platform headers is a separate task and should be done but we will always need to make headers available for download in case you're using an executable that hasn't been installed with headers for whatever reason.\r\n\r\n```\r\niojs-v2.3.1/\r\niojs-v2.3.1/include/\r\niojs-v2.3.1/include/node/\r\niojs-v2.3.1/include/node/android-ifaddrs.h\r\niojs-v2.3.1/include/node/ares.h\r\niojs-v2.3.1/include/node/ares_version.h\r\niojs-v2.3.1/include/node/common.gypi\r\niojs-v2.3.1/include/node/config.gypi\r\niojs-v2.3.1/include/node/libplatform/\r\niojs-v2.3.1/include/node/nameser.h\r\niojs-v2.3.1/include/node/node.h\r\niojs-v2.3.1/include/node/node_buffer.h\r\niojs-v2.3.1/include/node/node_internals.h\r\niojs-v2.3.1/include/node/node_object_wrap.h\r\niojs-v2.3.1/include/node/node_version.h\r\niojs-v2.3.1/include/node/openssl/\r\niojs-v2.3.1/include/node/pthread-fixes.h\r\niojs-v2.3.1/include/node/smalloc.h\r\niojs-v2.3.1/include/node/stdint-msvc2008.h\r\niojs-v2.3.1/include/node/tree.h\r\niojs-v2.3.1/include/node/uv-aix.h\r\niojs-v2.3.1/include/node/uv-bsd.h\r\niojs-v2.3.1/include/node/uv-darwin.h\r\niojs-v2.3.1/include/node/uv-errno.h\r\niojs-v2.3.1/include/node/uv-linux.h\r\niojs-v2.3.1/include/node/uv-sunos.h\r\niojs-v2.3.1/include/node/uv-threadpool.h\r\niojs-v2.3.1/include/node/uv-unix.h\r\niojs-v2.3.1/include/node/uv-version.h\r\niojs-v2.3.1/include/node/uv-win.h\r\niojs-v2.3.1/include/node/uv.h\r\niojs-v2.3.1/include/node/v8-debug.h\r\niojs-v2.3.1/include/node/v8-platform.h\r\niojs-v2.3.1/include/node/v8-profiler.h\r\niojs-v2.3.1/include/node/v8-testing.h\r\niojs-v2.3.1/include/node/v8-util.h\r\niojs-v2.3.1/include/node/v8-version.h\r\niojs-v2.3.1/include/node/v8.h\r\niojs-v2.3.1/include/node/v8config.h\r\niojs-v2.3.1/include/node/zconf.h\r\niojs-v2.3.1/include/node/zlib.h\r\niojs-v2.3.1/include/node/openssl/aes.h\r\niojs-v2.3.1/include/node/openssl/archs/\r\niojs-v2.3.1/include/node/openssl/asn1.h\r\niojs-v2.3.1/include/node/openssl/asn1_mac.h\r\niojs-v2.3.1/include/node/openssl/asn1t.h\r\niojs-v2.3.1/include/node/openssl/bio.h\r\niojs-v2.3.1/include/node/openssl/blowfish.h\r\niojs-v2.3.1/include/node/openssl/bn.h\r\niojs-v2.3.1/include/node/openssl/buffer.h\r\niojs-v2.3.1/include/node/openssl/camellia.h\r\niojs-v2.3.1/include/node/openssl/cast.h\r\niojs-v2.3.1/include/node/openssl/cmac.h\r\niojs-v2.3.1/include/node/openssl/cms.h\r\niojs-v2.3.1/include/node/openssl/comp.h\r\niojs-v2.3.1/include/node/openssl/conf.h\r\niojs-v2.3.1/include/node/openssl/conf_api.h\r\niojs-v2.3.1/include/node/openssl/crypto.h\r\niojs-v2.3.1/include/node/openssl/des.h\r\niojs-v2.3.1/include/node/openssl/des_old.h\r\niojs-v2.3.1/include/node/openssl/dh.h\r\niojs-v2.3.1/include/node/openssl/dsa.h\r\niojs-v2.3.1/include/node/openssl/dso.h\r\niojs-v2.3.1/include/node/openssl/dtls1.h\r\niojs-v2.3.1/include/node/openssl/e_os2.h\r\niojs-v2.3.1/include/node/openssl/ebcdic.h\r\niojs-v2.3.1/include/node/openssl/ec.h\r\niojs-v2.3.1/include/node/openssl/ecdh.h\r\niojs-v2.3.1/include/node/openssl/ecdsa.h\r\niojs-v2.3.1/include/node/openssl/engine.h\r\niojs-v2.3.1/include/node/openssl/err.h\r\niojs-v2.3.1/include/node/openssl/evp.h\r\niojs-v2.3.1/include/node/openssl/hmac.h\r\niojs-v2.3.1/include/node/openssl/idea.h\r\niojs-v2.3.1/include/node/openssl/krb5_asn.h\r\niojs-v2.3.1/include/node/openssl/kssl.h\r\niojs-v2.3.1/include/node/openssl/lhash.h\r\niojs-v2.3.1/include/node/openssl/md4.h\r\niojs-v2.3.1/include/node/openssl/md5.h\r\niojs-v2.3.1/include/node/openssl/mdc2.h\r\niojs-v2.3.1/include/node/openssl/modes.h\r\niojs-v2.3.1/include/node/openssl/obj_mac.h\r\niojs-v2.3.1/include/node/openssl/objects.h\r\niojs-v2.3.1/include/node/openssl/ocsp.h\r\niojs-v2.3.1/include/node/openssl/opensslconf.h\r\niojs-v2.3.1/include/node/openssl/opensslv.h\r\niojs-v2.3.1/include/node/openssl/ossl_typ.h\r\niojs-v2.3.1/include/node/openssl/pem.h\r\niojs-v2.3.1/include/node/openssl/pem2.h\r\niojs-v2.3.1/include/node/openssl/pkcs12.h\r\niojs-v2.3.1/include/node/openssl/pkcs7.h\r\niojs-v2.3.1/include/node/openssl/pqueue.h\r\niojs-v2.3.1/include/node/openssl/rand.h\r\niojs-v2.3.1/include/node/openssl/rc2.h\r\niojs-v2.3.1/include/node/openssl/rc4.h\r\niojs-v2.3.1/include/node/openssl/ripemd.h\r\niojs-v2.3.1/include/node/openssl/rsa.h\r\niojs-v2.3.1/include/node/openssl/safestack.h\r\niojs-v2.3.1/include/node/openssl/seed.h\r\niojs-v2.3.1/include/node/openssl/sha.h\r\niojs-v2.3.1/include/node/openssl/srp.h\r\niojs-v2.3.1/include/node/openssl/srtp.h\r\niojs-v2.3.1/include/node/openssl/ssl.h\r\niojs-v2.3.1/include/node/openssl/ssl2.h\r\niojs-v2.3.1/include/node/openssl/ssl23.h\r\niojs-v2.3.1/include/node/openssl/ssl3.h\r\niojs-v2.3.1/include/node/openssl/stack.h\r\niojs-v2.3.1/include/node/openssl/symhacks.h\r\niojs-v2.3.1/include/node/openssl/tls1.h\r\niojs-v2.3.1/include/node/openssl/ts.h\r\niojs-v2.3.1/include/node/openssl/txt_db.h\r\niojs-v2.3.1/include/node/openssl/ui.h\r\niojs-v2.3.1/include/node/openssl/ui_compat.h\r\niojs-v2.3.1/include/node/openssl/whrlpool.h\r\niojs-v2.3.1/include/node/openssl/x509.h\r\niojs-v2.3.1/include/node/openssl/x509_vfy.h\r\niojs-v2.3.1/include/node/openssl/x509v3.h\r\niojs-v2.3.1/include/node/openssl/archs/BSD-x86/\r\niojs-v2.3.1/include/node/openssl/archs/BSD-x86_64/\r\niojs-v2.3.1/include/node/openssl/archs/darwin-i386-cc/\r\niojs-v2.3.1/include/node/openssl/archs/darwin64-x86_64-cc/\r\niojs-v2.3.1/include/node/openssl/archs/linux-aarch64/\r\niojs-v2.3.1/include/node/openssl/archs/linux-armv4/\r\niojs-v2.3.1/include/node/openssl/archs/linux-elf/\r\niojs-v2.3.1/include/node/openssl/archs/linux-x32/\r\niojs-v2.3.1/include/node/openssl/archs/linux-x86_64/\r\niojs-v2.3.1/include/node/openssl/archs/solaris-x86-gcc/\r\niojs-v2.3.1/include/node/openssl/archs/solaris64-x86_64-gcc/\r\niojs-v2.3.1/include/node/openssl/archs/VC-WIN32/\r\niojs-v2.3.1/include/node/openssl/archs/VC-WIN64A/\r\niojs-v2.3.1/include/node/openssl/archs/VC-WIN64A/opensslconf.h\r\niojs-v2.3.1/include/node/openssl/archs/VC-WIN32/opensslconf.h\r\niojs-v2.3.1/include/node/openssl/archs/solaris64-x86_64-gcc/opensslconf.h\r\niojs-v2.3.1/include/node/openssl/archs/solaris-x86-gcc/opensslconf.h\r\niojs-v2.3.1/include/node/openssl/archs/linux-x86_64/opensslconf.h\r\niojs-v2.3.1/include/node/openssl/archs/linux-x32/opensslconf.h\r\niojs-v2.3.1/include/node/openssl/archs/linux-elf/opensslconf.h\r\niojs-v2.3.1/include/node/openssl/archs/linux-armv4/opensslconf.h\r\niojs-v2.3.1/include/node/openssl/archs/linux-aarch64/opensslconf.h\r\niojs-v2.3.1/include/node/openssl/archs/darwin64-x86_64-cc/opensslconf.h\r\niojs-v2.3.1/include/node/openssl/archs/darwin-i386-cc/opensslconf.h\r\niojs-v2.3.1/include/node/openssl/archs/BSD-x86_64/opensslconf.h\r\niojs-v2.3.1/include/node/openssl/archs/BSD-x86/opensslconf.h\r\niojs-v2.3.1/include/node/libplatform/libplatform.h\r\n```\r\n\r\n/R=@nodejs/build @TooTallNate "},"comment":{"url":"https://api.github.com/repos/nodejs/io.js/issues/comments/111881964","html_url":"https://github.com/nodejs/io.js/pull/1975#issuecomment-111881964","issue_url":"https://api.github.com/repos/nodejs/io.js/issues/1975","id":111881964,"user":{"login":"jbergstroem","id":176984,"avatar_url":"https://avatars.githubusercontent.com/u/176984?v=3","gravatar_id":"","url":"https://api.github.com/users/jbergstroem","html_url":"https://github.com/jbergstroem","followers_url":"https://api.github.com/users/jbergstroem/followers","following_url":"https://api.github.com/users/jbergstroem/following{/other_user}","gists_url":"https://api.github.com/users/jbergstroem/gists{/gist_id}","starred_url":"https://api.github.com/users/jbergstroem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbergstroem/subscriptions","organizations_url":"https://api.github.com/users/jbergstroem/orgs","repos_url":"https://api.github.com/users/jbergstroem/repos","events_url":"https://api.github.com/users/jbergstroem/events{/privacy}","received_events_url":"https://api.github.com/users/jbergstroem/received_events","type":"User","site_admin":false},"created_at":"2015-06-14T22:47:41Z","updated_at":"2015-06-14T22:47:41Z","body":"I like this.\r\n\r\nIf we're to use `--nodedir` from node-gyp we'll have to adapt a slightly different tarball structure. I'm happy to move that work into node-gyp instead, but backwards comparability might be a simpler path."}}