diff --git a/AUTHORS b/AUTHORS index d5188b3cbf..429c761add 100644 --- a/AUTHORS +++ b/AUTHORS @@ -354,3 +354,5 @@ Pavel Lang Peter Rybin Eugen Dueck Gil Pedersen +Tyler Neylon +Golo Roden diff --git a/ChangeLog b/ChangeLog index d7d86eb6a7..d2ea9ef033 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,7 +21,53 @@ * Fix #3521 Make process.env more like a regular Object (isaacs) -2012.08.02, Version 0.8.5 (Stable) +2012.08.15, Version 0.8.7 (Stable) + +* npm: Upgrade to 1.1.49 + +* website: download page (Golo Roden) + +* crypto: fix uninitialized memory access in openssl (Ben Noordhuis) + +* buffer, crypto: fix buffer decoding (Ben Noordhuis) + +* build: compile with -fno-tree-vrp when gcc >= 4.0 (Ben Noordhuis) + +* tls: handle multiple CN fields when verifying cert (Ben Noordhuis) + +* doc: remove unused util from child_process (Kyle Robinson Young) + +* build: rework -fvisibility=hidden detection (Ben Noordhuis) + +* windows: don't duplicate invalid stdio handles (Bert Belder) + +* windows: fix typos in process-stdio.c (Bert Belder) + + +2012.08.07, Version 0.8.6 (Stable), 0544a586ca6b6b900a42e164033dbf350765700a + +* npm: Upgrade to v1.1.48 + +* Add 'make binary' to build binary tarballs for all Unixes (Nathan Rajlich) + +* zlib: Emit 'close' on destroy(). (Dominic Tarr) + +* child_process: Fix stdout=null when stdio=['pipe'] (Tyler Neylon) + +* installer: prevent ETXTBSY errors (Ben Noordhuis) + +* installer: honor --without-npm, default install path (Ben Noordhuis) + +* net: make pause work with connecting sockets (Bert Belder) + +* installer: fix cross-compile installs (Ben Noordhuis) + +* net: fix .listen({fd:0}) (Ben Noordhuis) + +* windows: map WSANO_DATA to UV_ENOENT (Bert Belder) + + +2012.08.02, Version 0.8.5 (Stable), 9b86a4453f0c76f2707a75c0b2343aba33ec63bc * node: tag Encode and friends NODE_EXTERN (Ben Noordhuis) diff --git a/Makefile b/Makefile index 3d6a79a488..70cd0b3e70 100644 --- a/Makefile +++ b/Makefile @@ -114,7 +114,7 @@ apidoc_sources = $(wildcard doc/api/*.markdown) apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \ $(addprefix out/,$(apidoc_sources:.markdown=.json)) -apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets out/doc/about out/doc/community out/doc/logos out/doc/images +apidoc_dirs = out/doc out/doc/api/ out/doc/api/assets out/doc/about out/doc/community out/doc/download out/doc/logos out/doc/images apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*))) @@ -132,6 +132,7 @@ website_files = \ out/doc/pipe.css \ out/doc/about/index.html \ out/doc/community/index.html \ + out/doc/download/index.html \ out/doc/logos/index.html \ out/doc/changelog.html \ $(doc_images) @@ -192,8 +193,22 @@ docclean: -rm -rf out/doc VERSION=v$(shell $(PYTHON) tools/getnodeversion.py) +RELEASE=$(shell $(PYTHON) tools/getnodeisrelease.py) +PLATFORM=$(shell uname | tr '[:upper:]' '[:lower:]') +ifeq ($(findstring x86_64,$(shell uname -m)),x86_64) +DESTCPU ?= x64 +else +DESTCPU ?= ia32 +endif +ifeq ($(DESTCPU),x64) +ARCH=x64 +else +ARCH=x86 +endif TARNAME=node-$(VERSION) TARBALL=$(TARNAME).tar.gz +BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH) +BINARYTAR=$(BINARYNAME).tar.gz PKG=out/$(TARNAME).pkg packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker @@ -201,9 +216,31 @@ dist: doc $(TARBALL) $(PKG) PKGDIR=out/dist-osx +release-only: + @if [ "$(shell git status --porcelain | egrep -v '^\?\? ')" = "" ]; then \ + exit 0 ; \ + else \ + echo "" >&2 ; \ + echo "The git repository is not clean." >&2 ; \ + echo "Please commit changes before building release tarball." >&2 ; \ + echo "" >&2 ; \ + git status --porcelain | egrep -v '^\?\?' >&2 ; \ + echo "" >&2 ; \ + exit 1 ; \ + fi + @if [ "$(RELEASE)" = "1" ]; then \ + exit 0; \ + else \ + echo "" >&2 ; \ + echo "#NODE_VERSION_IS_RELEASE is set to $(RELEASE)." >&2 ; \ + echo "Did you remember to update src/node_version.cc?" >&2 ; \ + echo "" >&2 ; \ + exit 1 ; \ + fi + pkg: $(PKG) -$(PKG): +$(PKG): release-only rm -rf $(PKGDIR) rm -rf out/deps out/Release ./configure --prefix=$(PKGDIR)/32/usr/local --without-snapshot --dest-cpu=ia32 @@ -224,27 +261,7 @@ $(PKG): --out $(PKG) SIGN="$(SIGN)" PKG="$(PKG)" bash tools/osx-productsign.sh -$(TARBALL): node doc - @if [ "$(shell git status --porcelain | egrep -v '^\?\? ')" = "" ]; then \ - exit 0 ; \ - else \ - echo "" >&2 ; \ - echo "The git repository is not clean." >&2 ; \ - echo "Please commit changes before building release tarball." >&2 ; \ - echo "" >&2 ; \ - git status --porcelain | egrep -v '^\?\?' >&2 ; \ - echo "" >&2 ; \ - exit 1 ; \ - fi - @if [ $(shell ./node --version) = "$(VERSION)" ]; then \ - exit 0; \ - else \ - echo "" >&2 ; \ - echo "$(shell ./node --version) doesn't match $(VERSION)." >&2 ; \ - echo "Did you remember to update src/node_version.cc?" >&2 ; \ - echo "" >&2 ; \ - exit 1 ; \ - fi +$(TARBALL): release-only node doc git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf - mkdir -p $(TARNAME)/doc/api cp doc/node.1 $(TARNAME)/doc/node.1 @@ -256,6 +273,22 @@ $(TARBALL): node doc rm -rf $(TARNAME) gzip -f -9 $(TARNAME).tar +tar: $(TARBALL) + +$(BINARYTAR): release-only + rm -rf $(BINARYNAME) + rm -rf out/deps out/Release + ./configure --prefix=/ --without-snapshot --dest-cpu=$(DESTCPU) + $(MAKE) install DESTDIR=$(BINARYNAME) V=$(V) PORTABLE=1 + cp README.md $(BINARYNAME) + cp LICENSE $(BINARYNAME) + cp ChangeLog $(BINARYNAME) + tar -cf $(BINARYNAME).tar $(BINARYNAME) + rm -rf $(BINARYNAME) + gzip -f -9 $(BINARYNAME).tar + +binary: $(BINARYTAR) + dist-upload: $(TARBALL) $(PKG) ssh node@nodejs.org mkdir -p web/nodejs.org/dist/$(VERSION) scp $(TARBALL) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARBALL) @@ -280,4 +313,4 @@ cpplint: lint: jslint cpplint -.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all staticlib dynamiclib test test-all website-upload pkg blog blogclean +.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all staticlib dynamiclib test test-all website-upload pkg blog blogclean tar binary release-only diff --git a/common.gypi b/common.gypi index 3ceedc7741..d8cb5323af 100644 --- a/common.gypi +++ b/common.gypi @@ -7,6 +7,8 @@ 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds 'component%': 'static_library', # NB. these names match with what V8 expects 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way + 'gcc_version%': 'unknown', + 'clang%': 0, # Turn on optimizations that may trigger compiler bugs. # Use at your own risk. Do *NOT* report bugs if this option is enabled. @@ -53,7 +55,7 @@ 'cflags': [ '-O3', '-ffunction-sections', '-fdata-sections' ], 'ldflags': [ '-Wl,--gc-sections' ], }, { - 'cflags': [ '-O2', '-fno-strict-aliasing', '-fno-tree-vrp' ], + 'cflags': [ '-O2', '-fno-strict-aliasing' ], 'cflags!': [ '-O3', '-fstrict-aliasing' ], 'conditions': [ # Required by the dtrace post-processor. Unfortunately, @@ -64,6 +66,9 @@ }, { 'cflags!': [ '-ffunction-sections', '-fdata-sections' ], }], + ['clang==1 or gcc_version >= 40', { + 'cflags': [ '-fno-tree-vrp' ], + }], ], }], ['OS=="solaris"', { diff --git a/configure b/configure index 4535f44e50..22537d56d4 100755 --- a/configure +++ b/configure @@ -333,8 +333,13 @@ def configure_node(o): o['variables']['v8_use_arm_eabi_hardfloat'] = b(hard_float) o['variables']['armv7'] = 1 if is_arch_armv7() else 0 - # clang has always supported -fvisibility=hidden, right? cc_version, is_clang = compiler_version() + o['variables']['clang'] = 1 if is_clang else 0 + + if not is_clang and cc_version != 0: + o['variables']['gcc_version'] = 10 * cc_version[0] + cc_version[1] + + # clang has always supported -fvisibility=hidden, right? if not is_clang and cc_version < (4,0,0): o['variables']['visibility'] = '' diff --git a/deps/npm/.travis.yml b/deps/npm/.travis.yml index 698bc9abdf..a385519bd1 100644 --- a/deps/npm/.travis.yml +++ b/deps/npm/.travis.yml @@ -1,4 +1,4 @@ language: node_js before_install: "make &>out || cat out; rm out" node_js: - - 0.6 + - 0.8 diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 32f5abc053..57fdf6afa8 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -72,3 +72,6 @@ James Halliday Jeremy Cantrell Ribettes Don Park +Kei Son +Nicolas Morel +Mark Dube diff --git a/deps/npm/Makefile b/deps/npm/Makefile index 9c38f97675..8a856e9fa4 100644 --- a/deps/npm/Makefile +++ b/deps/npm/Makefile @@ -92,7 +92,7 @@ doc/cli/index.md: $(markdowns) scripts/index-build.js scripts/doc-build.sh packa node scripts/index-build.js > $@ node_modules/.bin/ronn: - node cli.js install https://github.com/isaacs/ronnjs/tarball/master + node cli.js install doc: man @@ -127,7 +127,7 @@ doc-publish: doc node@npmjs.org:/home/node/npm-www/static/ zip-publish: release - scp release/* izs.me:/var/www/izs.me/static/public/npm/ + scp release/* node@nodejs.org:dist/npm/ release: @bash scripts/release.sh diff --git a/deps/npm/README.md b/deps/npm/README.md index 1257f14716..0c138134e4 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -35,31 +35,18 @@ paths, etc.) then read on. ## Fancy Install (Unix) -To install npm with one command, do this: - - curl http://npmjs.org/install.sh | sh - -To skip the npm 0.x cleanup, do this: - - curl http://npmjs.org/install.sh | clean=no sh - -To say "yes" to the 0.x cleanup, but skip the prompt: - - curl http://npmjs.org/install.sh | clean=yes sh - -If you get permission errors, you'll need to **run** the script as root. -(Note, just putting `sudo` in front of the `curl` will **fetch** the script -as root.) +There's a pretty robust install script at +. You can download that and run it. ### Slightly Fancier You can set any npm configuration params with that script: - curl http://npmjs.org/install.sh | npm_config_prefix=/some/path sh +npm_config_prefix=/some/path sh install.sh Or, you can run it in uber-debuggery mode: - curl http://npmjs.org/install.sh | npm_debug=1 sh +npm_debug=1 sh install.sh ### Even Fancier @@ -83,21 +70,6 @@ git, and mess with it directly. No. -## Dev Install - -To install the latest **unstable** development version from git: - - git clone https://github.com/isaacs/npm.git - cd npm - sudo make install # (or: `node cli.js install -gf`) - -If you're sitting in the code folder reading this document in your -terminal, then you've already got the code. Just do: - - sudo make install - -and npm will install itself. - ## Permissions when Using npm to Install Other Stuff **tl;dr** @@ -163,6 +135,14 @@ you have chosen. If you would like to use npm programmatically, you can do that. It's not very well documented, but it *is* rather simple. +Most of the time, unless you actually want to do all the things that +npm does, you should try using one of npm's dependencies rather than +using npm itself, if possible. + +Eventually, npm will be just a thin cli wrapper around the modules +that it depends on, but for now, there are some things that you must +use npm itself to do. + var npm = require("npm") npm.load(myConfigObject, function (er) { if (er) return handlError(er) @@ -195,8 +175,7 @@ especially the [faq](http://npmjs.org/doc/faq.html). You can use the `npm help` command to read any of them. If you're a developer, and you want to use npm to publish your program, -you should -[read this](http://npmjs.org/doc/developers.html) +you should [read this](http://npmjs.org/doc/developers.html) ## Legal Stuff diff --git a/deps/npm/bin/npm-cli.js b/deps/npm/bin/npm-cli.js index a71985b37b..ef8873542b 100755 --- a/deps/npm/bin/npm-cli.js +++ b/deps/npm/bin/npm-cli.js @@ -22,10 +22,10 @@ log.info("it worked if it ends with", "ok") var fs = require("graceful-fs") , path = require("path") , npm = require("../lib/npm.js") - , ini = require("../lib/utils/ini.js") + , npmconf = require("npmconf") , errorHandler = require("../lib/utils/error-handler.js") - , configDefs = require("../lib/utils/config-defs.js") + , configDefs = npmconf.defs , shorthands = configDefs.shorthands , types = configDefs.types , nopt = require("nopt") @@ -50,10 +50,9 @@ if (conf.version) { } if (conf.versions) { - var v = process.versions - v.npm = npm.version - console.log(v) - return + npm.command = "version" + conf.usage = false + npm.argv = [] } log.info("using", "npm@%s", npm.version) diff --git a/deps/npm/doc/cli/json.md b/deps/npm/doc/cli/json.md index b6bf89ca37..46df441895 100644 --- a/deps/npm/doc/cli/json.md +++ b/deps/npm/doc/cli/json.md @@ -23,6 +23,11 @@ npm will default some values based on package contents. If there is a `wscript` file in the root of your package, npm will default the `preinstall` command to compile using node-waf. +* `"scripts":{"preinstall": "node-gyp rebuild"}` + + If there is a `binding.gyp` file in the root of your package, npm will + default the `preinstall` command to compile using node-gyp. + * `"contributors": [...]` If there is an `AUTHORS` file in the root of your package, npm will diff --git a/deps/npm/html/api/bin.html b/deps/npm/html/api/bin.html index 95d225ad71..d3650c2777 100644 --- a/deps/npm/html/api/bin.html +++ b/deps/npm/html/api/bin.html @@ -19,7 +19,7 @@

This function should not be used programmatically. Instead, just refer to the npm.bin member.

- + +

Node.js in the Industry

    @@ -77,81 +116,6 @@
-
- X - - - -
- - -

An example: Webserver

@@ -204,7 +168,7 @@ server.listen(1337, '127.0.0.1');