Repository navigation
Fix Node.js LTS source code release #33762
Description
Activity
They're not meant to be. I don't know the reason why but we strip out things before creating the source tarball (size? It was like this before I started on the project.):
Lines 1038 to 1074 in 2362378
$(TARBALL): release-only $(NODE_EXE) doc git checkout-index -a -f --prefix=$(TARNAME)/ mkdir -p $(TARNAME)/doc/api cp doc/node.1 $(TARNAME)/doc/node.1 cp -r out/doc/api/* $(TARNAME)/doc/api/ $(RM) -r $(TARNAME)/.editorconfig $(RM) -r $(TARNAME)/.git* $(RM) -r $(TARNAME)/.mailmap $(RM) -r $(TARNAME)/deps/openssl/openssl/demos $(RM) -r $(TARNAME)/deps/openssl/openssl/doc $(RM) -r $(TARNAME)/deps/openssl/openssl/test $(RM) -r $(TARNAME)/deps/uv/docs $(RM) -r $(TARNAME)/deps/uv/samples $(RM) -r $(TARNAME)/deps/uv/test $(RM) -r $(TARNAME)/deps/v8/samples $(RM) -r $(TARNAME)/deps/v8/tools/profviz $(RM) -r $(TARNAME)/deps/v8/tools/run-tests.py $(RM) -r $(TARNAME)/doc/images # too big $(RM) -r $(TARNAME)/test*.tap $(RM) -r $(TARNAME)/tools/cpplint.py $(RM) -r $(TARNAME)/tools/eslint-rules $(RM) -r $(TARNAME)/tools/license-builder.sh $(RM) -r $(TARNAME)/tools/node_modules $(RM) -r $(TARNAME)/tools/osx-* $(RM) -r $(TARNAME)/tools/osx-pkg.pmdoc find $(TARNAME)/deps/v8/test/* -type d ! -regex '.*/test/torque$$' | xargs $(RM) -r find $(TARNAME)/deps/v8/test -type f ! -regex '.*/test/torque/.*' | xargs $(RM) find $(TARNAME)/deps/zlib/contrib/* -type d ! -regex '.*/contrib/optimizations$$' | xargs $(RM) -r find $(TARNAME)/ -name ".eslint*" -maxdepth 2 | xargs $(RM) find $(TARNAME)/ -type l | xargs $(RM) # annoying on windows tar -cf $(TARNAME).tar $(TARNAME) $(RM) -r $(TARNAME) gzip -c -f -9 $(TARNAME).tar > $(TARNAME).tar.gz ifeq ($(XZ), 1) xz -c -f -$(XZ_COMPRESSION) $(TARNAME).tar > $(TARNAME).tar.xz endif $(RM) $(TARNAME).tar The https://github.com/nodejs/node/archive/... files are automatically created by GitHub and are snapshots of the repository at the tagged release.
Oh, OK. Thank you, @richardlau. Well, I don't think you should strip out
tools/node_modulesbecause when runningmake docI got this error:Cannot find module 'tools/doc/../node_modules/eslint/node_modules/js-yaml'required bytools/doc/common.js.- addedbuildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.
on Jun 11, 2020 Size is indeed the reason. Including
tools/node_modulesbloats the tarball by about 2 MB.I'm unsure what to do here. It's unfortunate that
make docdoesn't work. On the other hand, 99% of downloaders won't care.Perhaps we could add a separate documentation tarball, akin to the headers-only download? Or simply bite the bullet and include
tools/node_modules?OK, @bnoordhuis. Thank you. Whatever works. Note: After downloading the source code from https://github.com/nodejs/node/releases, I was able to
make doc.I think the nature of the problem is that (as far as I know) there are no published and signed SHASUMs for the distribution (like https://github.com/nodejs/node/archive/...) that contains all files required for
make -s test-docto work (which is triggered bymake test, I'm coming here from #34005):sha256sum: WARNING: 1 of 1 computed checksums did NOT matchIt seems that I can be sure I have non-tampered source code, or run tests, but not both? Should I be doing something other thanmake testafter compilation?
edit: Looks like the command to run ismake test-only(instead ofmake test). Although, that results in 2 failures in my setup forv14.4.0. I'll make a separate issue.
https://nodejs.org/dist/v12.18.0/node-v12.18.0.tar.gz is not the same as https://github.com/nodejs/node/archive/v12.18.0.tar.gz.