#977792 nodejs: install bash-completion script

Package:
nodejs
Source:
nodejs
Description:
evented I/O for V8 javascript - runtime executable
Submitter:
Kevin Locke
Date:
2022-07-04 09:51:10 UTC
Severity:
wishlist
Tags:
#977792#5
Date:
2020-12-20 23:14:44 UTC
From:
To:
Dear Maintainer,

Node.js supports generating a programmable tab-completion script for
Bash by running `node --completion-bash`.[1]  It would be nice if the
nodejs package installed the script so that it would be used by Bash
whenever the bash-completion package is installed.  This could be done
by:

1. Generating debian/nodejs.bash-completion containing either:
  a. The output of `node --completion-bash` run during build.
  b. `eval "$(nodejs --completion-bash)"` to run node when loaded.
2. Installing debian/nodejs.bash-completion to
   /usr/share/bash-completion/completions/node and
   /usr/share/bash-completion/completions/nodejs, preferably using
   dh_bash-completion from the bash-completion package (which already in
   Build-Depends, although not currently used).

Thanks for considering,
Kevin

[1]: https://github.com/nodejs/node/pull/20713

#977792#10
Date:
2022-05-27 14:51:47 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
nodejs, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 977792@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jérémy Lal <kapouer@melix.org> (supplier of updated nodejs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Fri, 27 May 2022 15:48:16 +0200
Source: nodejs
Architecture: source
Version: 16.15.0+dfsg-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Javascript Maintainers <pkg-javascript-devel@alioth-lists.debian.net>
Changed-By: Jérémy Lal <kapouer@melix.org>
Closes: 977792 1011100 1011339
Changes:
 nodejs (16.15.0+dfsg-1) unstable; urgency=medium
 .
   * New upstream version 16.15.0+dfsg
   * Go back to +dfsg
   * dfsg-exclude undici (missing source for compiled wasm)
   * Will B-D undici <!pkg.nodejs.nobuiltin> when available
   * bash-completion from node --completion-bash (Closes: #977792)
   * Patches:
     + build/skip-crypto-engine-check no longer needed
     + test-diagnostic-dir-cpu-prof is flaky on riscv64
       (Closes: #1011100)
   * Update README.source
   * Fix undici source name
   * Update openssl.cnf to fix tests on mipsel (Closes: #1011339)
   * Improve doc-generator
Checksums-Sha1:
 6cd958b503c130b49f69191e9c80b5ec348dc983 3853 nodejs_16.15.0+dfsg-1.dsc
 0aa32481f8da93b1873708a0b6ccd98c7e9ee826 235472 nodejs_16.15.0+dfsg.orig-types-node.tar.xz
 b8858275579422d893ee3d2d2db009b8e3bafd52 21817552 nodejs_16.15.0+dfsg.orig.tar.xz
 b14ee715bdc6d4410b384dafd8b02a3cc77d9f04 159232 nodejs_16.15.0+dfsg-1.debian.tar.xz
 8a925529ceefa12ec6d2725c0d30de78f40c7ca5 10205 nodejs_16.15.0+dfsg-1_source.buildinfo
Checksums-Sha256:
 2f8573b0e8be14caa3d4513e9da0edc568cfb58324b72e8e93b31cea56f3d193 3853 nodejs_16.15.0+dfsg-1.dsc
 3079b87b3a151438b1cc2b6410e0402f691d8f66f54cf9cb80598e3bef9b8915 235472 nodejs_16.15.0+dfsg.orig-types-node.tar.xz
 37d50c9358998ad3aef3b80b31b7644fd7e1ce6dc0ebaaea679497df1c28c18b 21817552 nodejs_16.15.0+dfsg.orig.tar.xz
 2177aaf86af54a1e09310a55ef6ab90d6f92b5695f55b3e36607a525db550313 159232 nodejs_16.15.0+dfsg-1.debian.tar.xz
 2c9c703653366ea0bf44142dec9dffd73e96a2777a14d362a8636fc54b0b6e48 10205 nodejs_16.15.0+dfsg-1_source.buildinfo
Files:
 4bcfdc0b7f601056a0348f30559831bc 3853 javascript optional nodejs_16.15.0+dfsg-1.dsc
 1aa4e6286cddae4bbb4d0004f5b818cd 235472 javascript optional nodejs_16.15.0+dfsg.orig-types-node.tar.xz
 8eb7216f7c2cdf9c4c4600a145164212 21817552 javascript optional nodejs_16.15.0+dfsg.orig.tar.xz
 bfa7822c6e314d651f73bb2dfd634766 159232 javascript optional nodejs_16.15.0+dfsg-1.debian.tar.xz
 305879d02f3cf0007fd651cc4731a28a 10205 javascript optional nodejs_16.15.0+dfsg-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEEA8Tnq7iA9SQwbkgVZhHAXt0583QFAmKQ2OcSHGthcG91ZXJA
bWVsaXgub3JnAAoJEGYRwF7dOfN0H00P+wZ7PGO4EIvWcKiuEuEBpcJVPm9AtvK2
oYx6UjuUqmKUm86t3AHE2RU1/BfklXivbv3KHFwp561ECfFtse6MS4XEHqpQtuDG
utxqJHDpbGrr5NkD8tHJV8rpo+2khggkCBRP5sDECIJKqbPGD9MIAKlFWJVqhZ0j
ZuWN083/NkgNZNPVqPjcEDqo54x/0FDO/dInBSknJPvZ8kgLLsDHDG/3tm4NUBeR
xD06jaOYB+Et5TKKzuGIeUvtErM/5hLaTjqY5PMjDjkFl4kHV4MYJC8atLL3JXfX
iRP/cL7/R3yVeXD3jXrTXcuzndn9tjGuxyYR9JtOMIY4vGwzG54gB/nBY+xJ925+
PpED1/0FG/2Zgzl3ZviyuzT3PF8VuAh3QOtrIxzEYKyxce+z5zVKq7c+VcP0gIZ9
OJBSLeJxSJUSNq2VY6BwYFMH6zw62Vk7mrj5HLwiJuycoPnPQFJCbREMdSTqlLsJ
x4CI/jq9kwUL1tGNRFfdm/2JGTMAj/8Tg2r5GMwBr3H48UCuSb89TbuYBWSHrCWf
+RuBwRbZAq04xwhBtbMgLvHo0SapTvCJgkj+ujynMov/KV9F+ROQ5F+lMv5J93VO
zrks0++iG4fBhnxhkP74m/wd9hu45uLMd+ULjvgyDmBrPgxsLaLzCGE2XyHhmRTC
ajJsi+Z7GrLT
=cjOS
-----END PGP SIGNATURE-----

#977792#15
Date:
2022-05-29 17:25:47 UTC
From:
To:
Le dim. 29 mai 2022 à 19:18, Kevin Locke <kevin@kevinlocke.name> a écrit :

Well, exactly !
And thank you !
The next update will fix this.

Jérémy

#977792#20
Date:
2022-05-29 17:17:51 UTC
From:
To:
found 977792 16.15.0+dfsg-1
thanks

Thanks for working on this issue!  Unfortunately, it does not appear
to be fixed in 16.15.0+dfsg-1, as the
/usr/share/bash-completion/completions directory is empty in this
version:

    $ dget nodejs=16.15.0+dfsg-1
    $ dpkg -c nodejs_16.15.0+dfsg-1_amd64.deb | grep bash-completion
    drwxr-xr-x root/root         0 2022-05-27 07:48 ./usr/share/bash-completion/
    drwxr-xr-x root/root         0 2022-05-27 07:48 ./usr/share/bash-completion/completions/

The buildd log for amd64[1] includes:

    /bin/sh: 1: ./node: not found

in debian/rules override_dh_auto_build-arch on line 1443.  Which
appears be the source of the problem.  Apparently the error is not
fatal because it occurs in a variable substitution?  Was that
intentional?  Perhaps it could be fixed and made fatal with:
--- a/debian/rules +++ b/debian/rules @@ -257,7 +257,7 @@ endif override_dh_auto_build-arch: deps_build dh_auto_build - $(shell ./node --completion-bash > ./debian/nodejs.bash-completion) + ./out/Release/node --completion-bash > ./debian/nodejs.bash-completion override_dh_auto_build-indep: deps_links mkdir -p $(DEBIAN_DOC_DEPS) It may also be worth considering adding nodejs.links with content: /usr/share/bash-completion/completions/node /usr/share/bash-completion/completions/nodejs So that users will get completion for `node <tab>` in addition to `nodejs <tab>`. Thanks again, Kevin [1]: https://buildd.debian.org/status/fetch.php?pkg=nodejs&arch=amd64&ver=16.15.0%2Bdfsg-1&stamp=1653680475&raw=0
#977792#27
Date:
2022-06-13 08:35:26 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
nodejs, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 977792@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jérémy Lal <kapouer@melix.org> (supplier of updated nodejs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 13 Jun 2022 09:11:34 +0200
Source: nodejs
Architecture: source
Version: 16.15.1+dfsg-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Javascript Maintainers <pkg-javascript-devel@alioth-lists.debian.net>
Changed-By: Jérémy Lal <kapouer@melix.org>
Closes: 977792 1011101 1012670
Changes:
 nodejs (16.15.1+dfsg-1) unstable; urgency=medium
 .
   * New upstream version 16.15.1+dfsg
   * Fix completion generation, support "nodejs" cli
     Closes: #977792
   * Patch to fix mipsel crypto init error strings (Closes: #1011101)
   * Patch: more flaky riscv64 cpu tests (Closes: #1012670)
Checksums-Sha1:
 437c11ddd61c1a3346e0f3d595784969ed1c32bd 3853 nodejs_16.15.1+dfsg-1.dsc
 1771bd68477dd1af1ad944ce71406788463cbdc1 235544 nodejs_16.15.1+dfsg.orig-types-node.tar.xz
 cdbfbb786d45a6b717a84557b6a9c0026324dd72 21856440 nodejs_16.15.1+dfsg.orig.tar.xz
 23485ff790d342c0ae20fa95e2001ee6be50edd4 159552 nodejs_16.15.1+dfsg-1.debian.tar.xz
 3f5b948bc9677c3b605e48e40798b98c79e6446e 10176 nodejs_16.15.1+dfsg-1_source.buildinfo
Checksums-Sha256:
 e0aecef155ac99242ac66b5c9e2f422f9b66b8ab103b3ceee4bff87240d47885 3853 nodejs_16.15.1+dfsg-1.dsc
 1c1382942f9ca5e7fb4ec2c837a183d37674d023ab93da024808d254ac6c7f87 235544 nodejs_16.15.1+dfsg.orig-types-node.tar.xz
 348d462dbae6e9f5e71bae770df3b1748852d202ea73586b1b83ad9a4de5dfa7 21856440 nodejs_16.15.1+dfsg.orig.tar.xz
 4871b087b623c11cbb41c95bb5ac113b05bb9285f9f5e6bd6f5a13d0b08dd11e 159552 nodejs_16.15.1+dfsg-1.debian.tar.xz
 619958c1f1df7e1c5eb5ac004a4c08b4515f26b5c030f7a629bc521e0f428be8 10176 nodejs_16.15.1+dfsg-1_source.buildinfo
Files:
 70aeb3310bc8e243c31f535c99fc03dc 3853 javascript optional nodejs_16.15.1+dfsg-1.dsc
 f73ec0db4b00230ead76a997122a2400 235544 javascript optional nodejs_16.15.1+dfsg.orig-types-node.tar.xz
 cc24ab522a5f78edb3181ea3412abe78 21856440 javascript optional nodejs_16.15.1+dfsg.orig.tar.xz
 0c7acb654de6a725e286e94b3b6c3b65 159552 javascript optional nodejs_16.15.1+dfsg-1.debian.tar.xz
 4cc72b9222f081f05cc603297bf44cf2 10176 javascript optional nodejs_16.15.1+dfsg-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEEA8Tnq7iA9SQwbkgVZhHAXt0583QFAmKm64ASHGthcG91ZXJA
bWVsaXgub3JnAAoJEGYRwF7dOfN0IW0P/ijLtHF8FWWvYcWnbtptqe/jWvPszj4S
a6Dk5hAzGuTCDLF0buiC9QANsZIP6mIdKal1+s4KYmLLk0tcc70sHRMqoL8d9M7X
WGjb5eJwLewBWUaGKeGSdrrYXrLFiTQihfq+WOQ3ssRW0fPBcm9yYyJjJQjC41Ej
Wi6uVu6oVU5Ki+52bD3SPSBYeekhtyOg+BMkHnVsyQTh7uk8azpdB5sIMznLh9cM
Bpjq9HG6R7XrQbbHlR8xfua8XO2c+qcTK04bK1YAXrHaAM7S6tU69R7rLcdSKouR
C5HcnAxOw8Gf0dYB+LNMitvzKOW8zcmM4JAN25eAQ/92nZauDGDb1z340X5S6cNX
tWYLcDd9QPb/Ezg94dzu2TyvfpfW4lx+xJMgZ22RN5ssQxsmvOqF2Aj5f0J87kSI
1XvHyihsz8X7ZjBn71yQscUwhOC8yMoG5sYtnwpP2mTeDNe2AXECAs/5VrHOboju
Gaammv1IYb1yG4xGgugdL8bE6qb3y7IZdcmvrcISm8vPkpZz6iPKFC25A/o2T4So
YC7QsbWw6lY892vnR5AVlK5D9xxBjoTm6pXGSkh+7f0GVJ1vD/AuS/YiSFBIVIBW
6r+6ukHmOomDan0DGGrE4E1JiFS9WKMJSGgAf1OQW6xQyKawUcJ6JViwB2wpvtH9
6r1wpzDnoq0W
=Pp9+
-----END PGP SIGNATURE-----

#977792#32
Date:
2022-06-21 21:15:49 UTC
From:
To:
found 977792 16.15.1+dfsg-1
found 977792 18.3.0+dfsg-1
thanks

Thanks again for working on this issue and for such quick fixes!  I
must apologize for giving you bad advice.  The line I recommended for
nodejs.links was backward, which causes debhelper to overwrite the
bash-completion script named nodejs with a broken symlink pointing to
a nonexistent file named node.  My intent was to create a link named
node pointing to the bash-completion script named nodejs.  To do this,
the line in debian/nodejs.links should actually be:

/usr/share/bash-completion/completions/nodejs /usr/share/bash-completion/completions/node

My apologies,
Kevin

#977792#39
Date:
2022-06-28 08:15:31 UTC
From:
To:
Hello,

Bug #977792 in nodejs reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/js-team/nodejs/-/commit/0f01134aa2fd8f9574340bf8ac93687012b755dd

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/977792

#977792#46
Date:
2022-07-04 09:49:16 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
nodejs, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 977792@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jérémy Lal <kapouer@melix.org> (supplier of updated nodejs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 04 Jul 2022 11:37:13 +0200
Source: nodejs
Architecture: source
Version: 18.4.0+dfsg-2
Distribution: experimental
Urgency: medium
Maintainer: Debian Javascript Maintainers <pkg-javascript-devel@alioth-lists.debian.net>
Changed-By: Jérémy Lal <kapouer@melix.org>
Closes: 977792 1013968 1014214
Changes:
 nodejs (18.4.0+dfsg-2) experimental; urgency=medium
 .
   * Breaks libnode72 << 13 because of bullseye/security
     (Closes: #1013968)
   * Fix bash-completion link (Closes: #977792)
   * Patch: disable fetch until undici is accepted (Closes: #1014214)
Checksums-Sha1:
 36026a51f2a8baadc934a060c869bc545ce13c88 3845 nodejs_18.4.0+dfsg-2.dsc
 0b89dc3ea5d44f31e47fbcd3139e21f9a27918f3 156556 nodejs_18.4.0+dfsg-2.debian.tar.xz
 a0abf46436274a43443d55a7b04184dbefd63496 10245 nodejs_18.4.0+dfsg-2_source.buildinfo
Checksums-Sha256:
 b8fa74b74e1fbd9be925103e59e4e220958ef68f4370c7a1df5da1cbef15d8a0 3845 nodejs_18.4.0+dfsg-2.dsc
 ab61b1b8240e882b170c3d01a36b8d20773ba81a2f14f1e80b20eeb1089cd2bb 156556 nodejs_18.4.0+dfsg-2.debian.tar.xz
 84c71be614990c989206c940d13d71e3696676be5689ae68581b4d70e1a648b5 10245 nodejs_18.4.0+dfsg-2_source.buildinfo
Files:
 f53410ae4b2d084b4b2b44800f5c271c 3845 javascript optional nodejs_18.4.0+dfsg-2.dsc
 9336c41a300f8fcacf95359cca1a9a10 156556 javascript optional nodejs_18.4.0+dfsg-2.debian.tar.xz
 3c8af8ce545667c326af0a62326390fa 10245 javascript optional nodejs_18.4.0+dfsg-2_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEEA8Tnq7iA9SQwbkgVZhHAXt0583QFAmLCtPkSHGthcG91ZXJA
bWVsaXgub3JnAAoJEGYRwF7dOfN0MlkP/RxLdb8q5DAI5LTbTSuDPTnZW+jPJKXE
Ea6oPYq0cebtFYnVEFNIvO+za3EGCsuikJ917LCZDgMmnIezY4WZe7YmgqlVdz1+
v82mpm/frjPUr9oDyAjgXw45ZZmC9HfpzTzalyNb3bGTy0AsJRfD4eEKPLk4NwYj
wyPQmq2qgzUBGW73rxOOBRaIAH7AmevdlAjzl8fS1JDTcAfEYiiTR+y+GXgzocNv
x1S8PbGYIQ74hwh/6+BKsMAY6oE5a24wD47XeKqydDoc8vv3XgV91b8boSuSgm+n
KoELLvAboJNoh9W1A/4bPC556701xzeD9uxX5M4oXOVU74qZs50M/MgUCkETXYDF
IdnOd+zUXisrK5zqAGafgeINs4ytpB6q8CMmZzFsYt1/hA2kkcSipEbsx0IGk2lr
dBIDtHuqOW79GxEolI3aUDEXYzBvAn7Kx0X/Q0EAhWckJFvgOTOy61xEj2HejwHz
r1nPOtam8AxiiH2IxHBIiGFX8lVTZJ53zTG8HTBIJk9ja6gkNBx5bxh+2lM3isV2
gt7Qo4m0K5RX1PdIbNqQKGh8NBR98eXz5Ny47F8rqb9awjGe9cNLhBJArU4nXLCx
2Bz0cVCx4KgElLrEyWCHCfiaG5uz4LaYwvOxnIPmlC4KsjELlTdzD7SP/XdfWCh2
vXBeiIVTTmq8
=76aY
-----END PGP SIGNATURE-----