镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Fix Node.js LTS source code release #33762

Description

Activity

  1. richardlau commented on Jun 5, 2020

    @richardlau
    Member

    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.):

    node/Makefile

    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.

  2. ma11hew28 commented on Jun 5, 2020

    @ma11hew28
    ContributorAuthor

    Oh, OK. Thank you, @richardlau. Well, I don't think you should strip out tools/node_modules because when running make doc I got this error: Cannot find module 'tools/doc/../node_modules/eslint/node_modules/js-yaml' required by tools/doc/common.js.

  3. added
    buildIssues and PRs related to Node.js builds or CI infrastructure.
    on Jun 11, 2020
  4. bnoordhuis commented on Jun 11, 2020

    @bnoordhuis
    Member

    Size is indeed the reason. Including tools/node_modules bloats the tarball by about 2 MB.

    I'm unsure what to do here. It's unfortunate that make doc doesn'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?

  5. ma11hew28 commented on Jun 11, 2020

    @ma11hew28
    ContributorAuthor

    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.

  6. tristanls commented on Jun 21, 2020

    @tristanls
    Contributor

    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-doc to work (which is triggered by make test, I'm coming here from #34005):

    sha256sum: WARNING: 1 of 1 computed checksums did NOT match
    

    It seems that I can be sure I have non-tampered source code, or run tests, but not both? Should I be doing something other than make test after compilation?
    edit: Looks like the command to run is make test-only (instead of make test). Although, that results in 2 failures in my setup for v14.4.0. I'll make a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to Node.js builds or CI infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions