Talk:Node.js package guidelines

From ArchWiki
Jump to navigation Jump to search

Forum thread

Is there any nodejs developer/packager can help me to improve the Node.js package guidelines?

See this https://bbs.archlinux.org/viewtopic.php?id=253060

GFdevelop (talk) 16:48, 22 February 2020 (UTC)

Obsolete package() fixes?

 package() {
   npm install -g --user root --prefix "${pkgdir}/usr" "${srcdir}/${pkgname}-${pkgver}.tgz"
   
   # Non-deterministic race in npm gives 777 permissions to random directories.
   # See https://github.com/npm/cli/issues/1103 for details.
   find "${pkgdir}/usr" -type d -exec chmod 755 {} +
   
   # npm gives ownership of ALL FILES to build user
   # https://bugs.archlinux.org/task/63396
   chown -R root:root "${pkgdir}"
 }
  • npm 7.x is now in testing and fixes the first issue.
  • The second issue is closed since September 2019?

Aureooms (talk) 09:48, 17 February 2021 (UTC)

I tested by removing each of these fixes on my package. Looks like the "777 to directories" issue does not occur anymore, but "ownership to build user" issue still persists.
Ilango100 (talk) 08:05, 19 March 2021 (UTC)