Bug #27201
openForeman RPM Build failing on @novnc/novnc
Description
I am attempting to port Foreman 1.22 to the Mainframe (IBM Z s390x) and am having to rebuild a whole bunch of ruby and nodejs RPM packages. For the most part it is going ok but am running into an issue with the @novnc/novnc package.
Using "@" w/ NPM defines scope and the ability to have private registries. As far as RPM is concerned however the package name is "nodejs-novnc" making the dependency fail when running a "rpmbuild --rebuild foreman....."
I have downloaded, recompiled and installed the nodejs-novnc package provided via Foreman 1.22 Source found https://yum.theforeman.org/releases/1.22/el7/source/ : https://gist.github.com/bendermIBM/803dfc06282493c91f4ef59d17c98af4
After installing I try and find what provides it
⚡ root@ ~/rpmbuild/SPECS rpm -q --whatprovides "npm(@novnc/novnc)"
no package provides npm(@novnc/novnc)
but something does provide nodejs-novnc
⚡ root@ ~/rpmbuild/SPECS rpm -q --whatprovides "nodejs-novnc"
nodejs-novnc-1.0.0-1.fc30.noarch
And when trying to compile formean into an rpm:
rpmbuild -bb foreman.spec
error: Failed build dependencies:
npm(@novnc/novnc) >= 1.0.0 is needed by foreman-1.22.0-1.fc30.noarch
npm(@novnc/novnc) < 2.0.0 is needed by foreman-1.22.0-1.fc30.noarch
So is this @novnc package a special compiled version of novnc from foreman that isn't available via the source repository?
Updated by Ewoud Kohl van Wijngaarden almost 5 years ago
- Tracker changed from Support to Bug
- Project changed from Foreman to Packaging
- Category changed from Packaging to RPMs
- Triaged changed from No to Yes
This should be built from the nodejs-novnc package that's on the sources. There should be nothing special about this package, but there may also be a bug in the handling of slashes somewhere since that's not really native to RPMs. I suspect the Fedora 30 nodejs-packaging might be slightly different from EL7.
I can reproduce it on x86-64:
$ wget https://yum.theforeman.org/releases/1.22/el7/source/nodejs-novnc-1.0.0-1.el7.src.rpm $ mock -r fedora-30-x86_64 nodejs-novnc-1.0.0-1.el7.src.rpm # ... output $ rpm -qp --provides /var/lib/mock/fedora-30-x86_64/result/nodejs-novnc-1.0.0-1.fc30.noarch.rpm nodejs-novnc = 1.0.0-1.fc30
However, it should work:
ekohl@wisse .../mock/fedora-30-x86_64/root $ echo builddir/build/BUILD/package/package.json | usr/lib/rpm/nodejs.prov npm(@novnc/novnc) = 1.0.0
It looks like the attrs aren't being run on nested directories:
$ cat /usr/lib/rpm/fileattrs/nodejs.attr %__nodejs_provides %{_rpmconfigdir}/nodejs.prov %__nodejs_requires %{_rpmconfigdir}/nodejs.req %__nodejs_suggests %{_rpmconfigdir}/nodejs.req --optional %__nodejs_path ^/usr/lib(64)?/node_modules/[^/]+/package\\.json$
This is different compared to EL7:
# cat /usr/lib/rpm/fileattrs/nodejs.attr %__nodejs_provides %{_rpmconfigdir}/nodejs.prov %__nodejs_requires %{_rpmconfigdir}/nodejs.req %__nodejs_path ^/usr/lib.*/node_modules/.*/package\\.json$