• imports/c10s/nodejs-packaging-2023.10-12.el10 70538358df

    Ghost released this 2025-10-31 12:51:30 +00:00 | -80 commits to c8-stream-14 since this release

    Node packages can have dependencies of the for "@group/package" instead of just "package".
    Calling symlink() (and thus os.symlink()) in such a case fails when there is no "@group" directory yet.

    + /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)
    

    The reported error is misleading - the path does not exist yet, but it also can't be created.
    os.symlink throws OSError in both cases.

    The patch prevents the issue by calling os.makedirs on the group-part of the dependency if there is one.

    Signed-off-by: Jan Staněk jstanek@redhat.com
    Resolves: RHEL-121583

    Downloads