nodesource / distributions

NodeSource Node.js Binary Distributions
https://nodesource.com
MIT License
13.53k stars 3.07k forks source link

Debian nodejs package should not contain development dotfiles #1580

Closed zerodeux closed 1 year ago

zerodeux commented 1 year ago

Describe your bug The 'nodejs' package from Nodesource contains many dotfiles which are :

Eg :

gemmyo-front1:~# apt-cache policy nodejs
nodejs:
  Installed: 12.22.12-deb-1nodesource1
  Candidate: 12.22.12-deb-1nodesource1
  Version table:
 *** 12.22.12-deb-1nodesource1 500
        500 https://deb.nodesource.com/node_12.x bullseye/main amd64 Packages
        100 /var/lib/dpkg/status

dpkg -L nodejs |grep '/\.'
/.
/usr/lib/node_modules/npm/.npmignore
/usr/lib/node_modules/npm/.mailmap
/usr/lib/node_modules/npm/.npmrc
/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/.npmignore
/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/node_modules/string_decoder/.travis.yml
/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/node_modules/readable-stream/.travis.yml
/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/node_modules/iferr/.npmignore
/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/.travis.yml
/usr/lib/node_modules/npm/node_modules/object.getownpropertydescriptors/.npmignore
/usr/lib/node_modules/npm/node_modules/object.getownpropertydescriptors/.editorconfig
/usr/lib/node_modules/npm/node_modules/object.getownpropertydescriptors/.jscs.json
/usr/lib/node_modules/npm/node_modules/object.getownpropertydescriptors/.travis.yml
/usr/lib/node_modules/npm/node_modules/jsonparse/.npmignore
/usr/lib/node_modules/npm/node_modules/mkdirp/node_modules/minimist/.travis.yml
/usr/lib/node_modules/npm/node_modules/builtins/.travis.yml
/usr/lib/node_modules/npm/node_modules/qrcode-terminal/.travis.yml
/usr/lib/node_modules/npm/node_modules/defaults/.npmignore
/usr/lib/node_modules/npm/node_modules/es-abstract/.editorconfig
/usr/lib/node_modules/npm/node_modules/es-abstract/.jscs.json
/usr/lib/node_modules/npm/node_modules/es-abstract/.nycrc
/usr/lib/node_modules/npm/node_modules/es-abstract/.travis.yml
/usr/lib/node_modules/npm/node_modules/util-promisify/.npmignore
/usr/lib/node_modules/npm/node_modules/util-promisify/.travis.yml
/usr/lib/node_modules/npm/node_modules/pump/.travis.yml
/usr/lib/node_modules/npm/node_modules/umask/.npmignore
/usr/lib/node_modules/npm/node_modules/archy/.travis.yml
/usr/lib/node_modules/npm/node_modules/socks/.prettierrc.yaml
/usr/lib/node_modules/npm/node_modules/socks/.travis.yml
/usr/lib/node_modules/npm/node_modules/getpass/.npmignore
/usr/lib/node_modules/npm/node_modules/getpass/.travis.yml
/usr/lib/node_modules/npm/node_modules/stream-iterate/.npmignore
/usr/lib/node_modules/npm/node_modules/stream-iterate/node_modules/string_decoder/.travis.yml
/usr/lib/node_modules/npm/node_modules/stream-iterate/node_modules/readable-stream/.travis.yml
/usr/lib/node_modules/npm/node_modules/stream-iterate/.travis.yml
/usr/lib/node_modules/npm/node_modules/flush-write-stream/node_modules/string_decoder/.travis.yml
/usr/lib/node_modules/npm/node_modules/flush-write-stream/node_modules/readable-stream/.travis.yml
/usr/lib/node_modules/npm/node_modules/flush-write-stream/.travis.yml
/usr/lib/node_modules/npm/node_modules/color-name/.npmignore
/usr/lib/node_modules/npm/node_modules/color-name/.eslintrc.json
/usr/lib/node_modules/npm/node_modules/validate-npm-package-name/.npmignore
/usr/lib/node_modules/npm/node_modules/validate-npm-package-name/.travis.yml
/usr/lib/node_modules/npm/node_modules/are-we-there-yet/node_modules/string_decoder/.travis.yml
/usr/lib/node_modules/npm/node_modules/are-we-there-yet/node_modules/readable-stream/.travis.yml
/usr/lib/node_modules/npm/node_modules/lazy-property/.npmignore
/usr/lib/node_modules/npm/node_modules/through2/.npmignore
/usr/lib/node_modules/npm/node_modules/through2/node_modules/string_decoder/.travis.yml
/usr/lib/node_modules/npm/node_modules/through2/node_modules/readable-stream/.travis.yml
/usr/lib/node_modules/npm/node_modules/unique-slug/.npmignore
/usr/lib/node_modules/npm/node_modules/unique-slug/.travis.yml
/usr/lib/node_modules/npm/node_modules/promise-retry/.npmignore
/usr/lib/node_modules/npm/node_modules/promise-retry/.editorconfig
/usr/lib/node_modules/npm/node_modules/promise-retry/node_modules/retry/.npmignore
/usr/lib/node_modules/npm/node_modules/promise-retry/.travis.yml
/usr/lib/node_modules/npm/node_modules/wcwidth/.npmignore
/usr/lib/node_modules/npm/node_modules/errno/.travis.yml
/usr/lib/node_modules/npm/node_modules/json-stringify-safe/.npmignore
/usr/lib/node_modules/npm/node_modules/has-symbols/.npmignore
/usr/lib/node_modules/npm/node_modules/has-symbols/.travis.yml
/usr/lib/node_modules/npm/node_modules/cyclist/.npmignore
/usr/lib/node_modules/npm/node_modules/https-proxy-agent/.eslintrc.js
/usr/lib/node_modules/npm/node_modules/https-proxy-agent/.editorconfig
/usr/lib/node_modules/npm/node_modules/aws4/.travis.yml
/usr/lib/node_modules/npm/node_modules/libnpmsearch/.travis.yml
/usr/lib/node_modules/npm/node_modules/is-regex/.npmignore
/usr/lib/node_modules/npm/node_modules/is-regex/.jscs.json
/usr/lib/node_modules/npm/node_modules/is-regex/.travis.yml
/usr/lib/node_modules/npm/node_modules/parallel-transform/.npmignore
/usr/lib/node_modules/npm/node_modules/parallel-transform/node_modules/string_decoder/.travis.yml
/usr/lib/node_modules/npm/node_modules/parallel-transform/node_modules/readable-stream/.travis.yml
/usr/lib/node_modules/npm/node_modules/balanced-match/.npmignore
/usr/lib/node_modules/npm/node_modules/err-code/.npmignore
/usr/lib/node_modules/npm/node_modules/err-code/.eslintrc.json
/usr/lib/node_modules/npm/node_modules/err-code/.editorconfig
/usr/lib/node_modules/npm/node_modules/err-code/.travis.yml
/usr/lib/node_modules/npm/node_modules/encoding/.npmignore
/usr/lib/node_modules/npm/node_modules/encoding/.travis.yml
/usr/lib/node_modules/npm/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml
/usr/lib/node_modules/npm/node_modules/socks-proxy-agent/.travis.yml
/usr/lib/node_modules/npm/node_modules/object-keys/.editorconfig
/usr/lib/node_modules/npm/node_modules/object-keys/.jscs.json
/usr/lib/node_modules/npm/node_modules/object-keys/.travis.yml
/usr/lib/node_modules/npm/node_modules/sorted-union-stream/.npmignore
/usr/lib/node_modules/npm/node_modules/sorted-union-stream/node_modules/string_decoder/.npmignore
/usr/lib/node_modules/npm/node_modules/sorted-union-stream/node_modules/readable-stream/.npmignore
/usr/lib/node_modules/npm/node_modules/sorted-union-stream/.travis.yml
/usr/lib/node_modules/npm/node_modules/gentle-fs/node_modules/iferr/.npmignore
/usr/lib/node_modules/npm/node_modules/delegates/.npmignore
/usr/lib/node_modules/npm/node_modules/node-gyp/.github
/usr/lib/node_modules/npm/node_modules/node-gyp/.github/workflows
/usr/lib/node_modules/npm/node_modules/node-gyp/.github/workflows/Python_tests.yml
/usr/lib/node_modules/npm/node_modules/node-gyp/.travis.yml
/usr/lib/node_modules/npm/node_modules/text-table/.travis.yml
/usr/lib/node_modules/npm/node_modules/libnpmpublish/.travis.yml
/usr/lib/node_modules/npm/node_modules/lockfile/.travis.yml
/usr/lib/node_modules/npm/node_modules/is-callable/.editorconfig
/usr/lib/node_modules/npm/node_modules/is-callable/.jscs.json
/usr/lib/node_modules/npm/node_modules/is-callable/.istanbul.yml
/usr/lib/node_modules/npm/node_modules/is-callable/.travis.yml
/usr/lib/node_modules/npm/node_modules/is-date-object/.npmignore
/usr/lib/node_modules/npm/node_modules/is-date-object/.jscs.json
/usr/lib/node_modules/npm/node_modules/is-date-object/.travis.yml
/usr/lib/node_modules/npm/node_modules/isexe/.npmignore
/usr/lib/node_modules/npm/node_modules/mute-stream/.travis.yml
/usr/lib/node_modules/npm/node_modules/libnpmorg/.travis.yml
/usr/lib/node_modules/npm/node_modules/prr/.npmignore
/usr/lib/node_modules/npm/node_modules/prr/.travis.yml
/usr/lib/node_modules/npm/node_modules/iconv-lite/.travis.yml
/usr/lib/node_modules/npm/node_modules/performance-now/.npmignore
/usr/lib/node_modules/npm/node_modules/performance-now/.tm_properties
/usr/lib/node_modules/npm/node_modules/performance-now/.travis.yml
/usr/lib/node_modules/npm/node_modules/libnpmteam/.travis.yml
/usr/lib/node_modules/npm/node_modules/ip/.npmignore
/usr/lib/node_modules/npm/node_modules/ip/.jscsrc
/usr/lib/node_modules/npm/node_modules/ip/.travis.yml
/usr/lib/node_modules/npm/node_modules/har-validator/node_modules/json-schema-traverse/spec/.eslintrc.yml
/usr/lib/node_modules/npm/node_modules/har-validator/node_modules/json-schema-traverse/.eslintrc.yml
/usr/lib/node_modules/npm/node_modules/har-validator/node_modules/json-schema-traverse/.travis.yml
/usr/lib/node_modules/npm/node_modules/har-validator/node_modules/ajv/scripts/.eslintrc.yml
/usr/lib/node_modules/npm/node_modules/har-validator/node_modules/ajv/.tonic_example.js
/usr/lib/node_modules/npm/node_modules/extend/.editorconfig
/usr/lib/node_modules/npm/node_modules/extend/.jscs.json
/usr/lib/node_modules/npm/node_modules/extend/.travis.yml
/usr/lib/node_modules/npm/node_modules/tweetnacl/.npmignore
/usr/lib/node_modules/npm/node_modules/sshpk/.npmignore
/usr/lib/node_modules/npm/node_modules/sshpk/.travis.yml
/usr/lib/node_modules/npm/node_modules/meant/.github
/usr/lib/node_modules/npm/node_modules/meant/.github/workflows
/usr/lib/node_modules/npm/node_modules/meant/.github/workflows/ci.yml
/usr/lib/node_modules/npm/node_modules/minimist/.travis.yml
/usr/lib/node_modules/npm/node_modules/fs-vacuum/.eslintrc
/usr/lib/node_modules/npm/node_modules/fs-vacuum/.npmignore
/usr/lib/node_modules/npm/node_modules/fs-vacuum/.travis.yml
/usr/lib/node_modules/npm/node_modules/http-signature/.npmignore
/usr/lib/node_modules/npm/node_modules/http-signature/.dir-locals.el
/usr/lib/node_modules/npm/node_modules/verror/.npmignore
/usr/lib/node_modules/npm/node_modules/xtend/.npmignore
/usr/lib/node_modules/npm/node_modules/duplexify/node_modules/string_decoder/.travis.yml
/usr/lib/node_modules/npm/node_modules/duplexify/node_modules/readable-stream/.travis.yml
/usr/lib/node_modules/npm/node_modules/duplexify/.travis.yml
/usr/lib/node_modules/npm/node_modules/agent-base/.travis.yml
/usr/lib/node_modules/npm/node_modules/clone/.npmignore
/usr/lib/node_modules/npm/node_modules/copy-concurrently/node_modules/iferr/.npmignore
/usr/lib/node_modules/npm/node_modules/libnpmaccess/.travis.yml
/usr/lib/node_modules/npm/node_modules/from2/node_modules/string_decoder/.travis.yml
/usr/lib/node_modules/npm/node_modules/from2/node_modules/readable-stream/.travis.yml
/usr/lib/node_modules/npm/node_modules/from2/.travis.yml
/usr/lib/node_modules/npm/node_modules/http-proxy-agent/.travis.yml
/usr/lib/node_modules/npm/node_modules/delayed-stream/.npmignore
/usr/lib/node_modules/npm/node_modules/qs/.eslintignore
/usr/lib/node_modules/npm/node_modules/qs/.editorconfig
/usr/lib/node_modules/npm/node_modules/extsprintf/.gitmodules
/usr/lib/node_modules/npm/node_modules/extsprintf/.npmignore
/usr/lib/node_modules/npm/node_modules/typedarray/.travis.yml
/usr/lib/node_modules/npm/node_modules/function-bind/.npmignore
/usr/lib/node_modules/npm/node_modules/function-bind/.editorconfig
/usr/lib/node_modules/npm/node_modules/function-bind/.jscs.json
/usr/lib/node_modules/npm/node_modules/function-bind/.travis.yml
/usr/lib/node_modules/npm/node_modules/pumpify/node_modules/pump/.travis.yml
/usr/lib/node_modules/npm/node_modules/pumpify/.travis.yml
/usr/lib/node_modules/npm/node_modules/retry/.npmignore
/usr/lib/node_modules/npm/node_modules/retry/.travis.yml
/usr/lib/node_modules/npm/node_modules/psl/.eslintignore
/usr/lib/node_modules/npm/node_modules/psl/.travis.yml
/usr/lib/node_modules/npm/node_modules/require-directory/.npmignore
/usr/lib/node_modules/npm/node_modules/require-directory/.travis.yml
/usr/lib/node_modules/npm/node_modules/npm-normalize-package-bin/.npmignore
/usr/lib/node_modules/npm/node_modules/npm-normalize-package-bin/.github
/usr/lib/node_modules/npm/node_modules/npm-normalize-package-bin/.github/settings.yml
/usr/lib/node_modules/npm/node_modules/read-installed/.npmignore
/usr/lib/node_modules/npm/node_modules/read-installed/.travis.yml
/usr/lib/node_modules/npm/node_modules/smart-buffer/.prettierrc.yaml
/usr/lib/node_modules/npm/node_modules/smart-buffer/.travis.yml
/usr/lib/node_modules/npm/node_modules/is-symbol/.nvmrc
/usr/lib/node_modules/npm/node_modules/is-symbol/.editorconfig
/usr/lib/node_modules/npm/node_modules/is-symbol/.jscs.json
/usr/lib/node_modules/npm/node_modules/is-symbol/.travis.yml
/usr/lib/node_modules/npm/node_modules/concat-stream/node_modules/string_decoder/.travis.yml
/usr/lib/node_modules/npm/node_modules/concat-stream/node_modules/readable-stream/.travis.yml
/usr/lib/node_modules/npm/node_modules/isarray/.npmignore
/usr/lib/node_modules/npm/node_modules/isarray/.travis.yml
/usr/lib/node_modules/npm/node_modules/stream-shift/.npmignore
/usr/lib/node_modules/npm/node_modules/stream-shift/.travis.yml
/usr/lib/node_modules/npm/node_modules/dezalgo/.travis.yml
/usr/lib/node_modules/npm/node_modules/JSONStream/.travis.yml
/usr/lib/node_modules/npm/node_modules/stream-each/.npmignore
/usr/lib/node_modules/npm/node_modules/stream-each/.travis.yml
/usr/lib/node_modules/npm/node_modules/promzard/.npmignore
/usr/lib/node_modules/npm/node_modules/concat-map/.travis.yml
/usr/lib/node_modules/npm/node_modules/es-to-primitive/.editorconfig
/usr/lib/node_modules/npm/node_modules/es-to-primitive/.jscs.json
/usr/lib/node_modules/npm/node_modules/es-to-primitive/.travis.yml
/usr/lib/node_modules/npm/node_modules/debug/.coveralls.yml
/usr/lib/node_modules/npm/node_modules/debug/.npmignore
/usr/lib/node_modules/npm/node_modules/debug/.travis.yml
/usr/lib/node_modules/npm/node_modules/fast-json-stable-stringify/.npmignore
/usr/lib/node_modules/npm/node_modules/fast-json-stable-stringify/.eslintrc.yml
/usr/lib/node_modules/npm/node_modules/fast-json-stable-stringify/.travis.yml
/usr/lib/node_modules/npm/node_modules/worker-farm/.editorconfig
/usr/lib/node_modules/npm/node_modules/worker-farm/.travis.yml
/usr/lib/node_modules/npm/node_modules/define-properties/.editorconfig
/usr/lib/node_modules/npm/node_modules/define-properties/.jscs.json
/usr/lib/node_modules/npm/node_modules/define-properties/.travis.yml
/usr/lib/node_modules/npm/node_modules/normalize-package-data/node_modules/resolve/.eslintignore
/usr/lib/node_modules/npm/node_modules/normalize-package-data/node_modules/resolve/.editorconfig
/usr/lib/node_modules/npm/node_modules/normalize-package-data/node_modules/resolve/.travis.yml
/usr/lib/node_modules/npm/node_modules/isstream/.npmignore
/usr/lib/node_modules/npm/node_modules/isstream/.travis.yml
/usr/lib/node_modules/npm/node_modules/jsbn/.npmignore
/usr/lib/node_modules/npm/node_modules/through/.travis.yml
/usr/lib/node_modules/npm/node_modules/registry-auth-token/.npmignore
/usr/lib/node_modules/npm/.licensee.json
/usr/lib/node_modules/npm/.travis.yml

Distribution Information:

Node Version:

Expected behavior The Debian 'nodejs' package could exclude un-needed (release-wise) files by properly using .gitignore and .npmignore hints.

AFAIK this would only leave this strange file I cannot really classify but looks omitable from a release :

/usr/lib/node_modules/npm/node_modules/har-validator/node_modules/ajv/.tonic_example.js
riosje commented 1 year ago

Hi @zerodeux hope you're doing well.

two things here

  1. Node12 has reached the EOL https://nodejs.dev/en/about/releases/
  2. We do not add or remove files from the nodejs binaries distributed by https://nodejs.org/, we just package the software as it comes to be distributed with deb and rpm distros.

But I think I can discuss this internally.

zerodeux commented 1 year ago

About point 1 : I checked with Node 20.x, the situation is better but I think there are still a few dotfiles left which could be un-released : (source: https://deb.nodesource.com/node_20.x/pool/main/n/nodejs/)

$ dpkg-deb -x ../nodejs_20.3.0-deb-1nodesource1_amd64.deb .
$ find . -path '*/.*'
./usr/lib/node_modules/npm/node_modules/qrcode-terminal/.travis.yml
./usr/lib/node_modules/npm/node_modules/node-gyp/.github
./usr/lib/node_modules/npm/node_modules/node-gyp/.github/workflows
./usr/lib/node_modules/npm/node_modules/node-gyp/.github/workflows/release-please.yml
./usr/lib/node_modules/npm/node_modules/node-gyp/.github/workflows/visual-studio.yml
./usr/lib/node_modules/npm/node_modules/node-gyp/.github/workflows/tests.yml
./usr/lib/node_modules/npm/node_modules/node-gyp/gyp/.flake8
./usr/lib/node_modules/npm/node_modules/node-gyp/gyp/.github
./usr/lib/node_modules/npm/node_modules/node-gyp/gyp/.github/workflows
./usr/lib/node_modules/npm/node_modules/node-gyp/gyp/.github/workflows/release-please.yml
./usr/lib/node_modules/npm/node_modules/node-gyp/gyp/.github/workflows/Python_tests.yml
./usr/lib/node_modules/npm/node_modules/node-gyp/gyp/.github/workflows/node-gyp.yml
./usr/lib/node_modules/npm/node_modules/node-gyp/gyp/.github/workflows/nodejs-windows.yml
./usr/lib/node_modules/npm/node_modules/events/.airtap.yml
./usr/lib/node_modules/npm/.npmrc
riosje commented 1 year ago

Please re-ope this issue in the node repo. We do not add or remove files from the nodejs binaries distributed by https://nodejs.org/, we just package the software as it comes to be distributed with deb and rpm distros. https://github.com/nodejs/node