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

nodejs-symlink-deps doesn't handle @group/package 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?

      Try to package a NodeJS package that depends on @babel/runtime.

      What is the impact of this issue to you?

      We can't properly package our dependencies. We have submitted https://src.fedoraproject.org/rpms/nodejs-packaging/pull-request/17 but this isn't available in RHEL 9.

      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

      1. Create an RPM package that depends on @babel/runtime like https://github.com/theforeman/foreman-packaging/pull/12231
      2. Make sure it calls %nodejs_symlink_deps

      Expected results

      It properly symlinks the dependencies.

      Actual results

       /usr/lib/rpm/nodejs-symlink-deps /usr/lib/node_modules
      
      ERROR: the path for dependency "@babel/runtime" already exists
      
      This could mean that bundled modules are being installed.  Bundled libraries are
      forbidden in Fedora. For more information, see:
          <https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries>
      
      It is generally reccomended to remove the entire "node_modules" directory in
      %prep when it exists. For more information, see:
          <https://fedoraproject.org/wiki/Packaging:Node.js#Removing_bundled_modules>
      
      If you have obtained permission from the Fedora Packaging Committee to bundle
      libraries, please use `%nodejs_fixdep -r` in %prep to remove the dependency on
      the bundled module. This will prevent an unnecessary dependency on the system
      version of the module and eliminate this error.
      error: Bad exit status from /var/tmp/rpm-tmp.nn3mkP (%install)
      

              jstanek@redhat.com Jan Stanek
              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: