Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-120512

nodejs.req doesn't properly detect if a package has bundled dependencies

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.6
    • nodejs-packaging
    • None
    • None
    • None
    • rhel-pt-ruby-nodejs
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      Trying to package a NodeJS package with dependencies.

      What is the impact of this issue to you?

      Since it doesn't generate the proper dependencies I need to manually add the dependencies which is additional work. While I fixed it in Fedora via https://src.fedoraproject.org/rpms/nodejs-packaging/pull-request/16, this isn't available in RHEL where we package Satellite.

      Please provide the package NVR for which the bug is seen:

      All versions of nodejs-packaging show this. In particular, we're now using the NodeJS 22 DNF module on EL9. This is the CentOS Stream 9 NVR, but it's also in RHEL:

      nodejs-packaging-2021.06-4.module_el9+1242+04ec4b05

      How reproducible is this bug?:

      Always

      Steps to reproduce

      In https://src.fedoraproject.org/rpms/nodejs-packaging/pull-request/16 I wrote up my notes. So I packaged https://www.npmjs.com/package/history and ended up with the following directory structure:

      # tree /usr/lib/node_modules/history
      /usr/lib/node_modules/history
      |-- DOMUtils.js
      |-- LocationUtils.js
      |-- PathUtils.js
      |-- createBrowserHistory.js
      |-- createHashHistory.js
      |-- createMemoryHistory.js
      |-- createTransitionManager.js
      |-- es
      |   |-- DOMUtils.js
      |   |-- LocationUtils.js
      |   |-- PathUtils.js
      |   |-- createBrowserHistory.js
      |   |-- createHashHistory.js
      |   |-- createMemoryHistory.js
      |   |-- createTransitionManager.js
      |   `-- index.js
      |-- index.js
      |-- node_modules
      |   |-- invariant -> /usr/lib/node_modules/invariant
      |   |-- loose-envify -> /usr/lib/node_modules/loose-envify
      |   |-- resolve-pathname -> /usr/lib/node_modules/resolve-pathname
      |   |-- value-equal -> /usr/lib/node_modules/value-equal
      |   `-- warning -> /usr/lib/node_modules/warning
      |-- package.json
      `-- umd
          |-- history.js
          `-- history.min.js
      

      Then I ran the dependency generator:

      # echo /usr/lib/node_modules/history/package.json | /usr/lib/rpm/nodejs.req
      

      Expected results

      It doesn't generate any dependencies.

      Actual results

      It generates the dependencies.

              nodejs-maint nodejs-maint
              ekohlvan@redhat.com Ewoud Kohl van Wijngaarden
              nodejs-maint nodejs-maint
              rhel-nodejs-qe bot rhel-nodejs-qe bot
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: