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
Since the scripts and tools in this package are really Fedora
(and derivatives) specific, it doesn't really make a lot of
sense to maintain them in a separate upstream with tarball
releases.
This moves all the files into dist-git and builds the RPM from
there.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>