Bug 1218654 - rpmbuild: failure building a package for tumbleweed: Dependency tokens must begin with alpha-numeric...
Summary: rpmbuild: failure building a package for tumbleweed: Dependency tokens must b...
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Antonio Larrosa
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-09 16:01 UTC by Giacomo Comes
Modified: 2024-04-29 14:35 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Giacomo Comes 2024-01-09 16:01:29 UTC
while building a package on tumbleweed I got the following build failure.

[   34s] Processing files: gstreamer-plugins-icamerasrc-0.0+git20231222.20231222-lp155.2.1.x86_64
[   34s] Executing(%license): /usr/bin/bash -e /var/tmp/rpm-tmp.mUPA9E
[   34s] + umask 022
[   34s] + cd /home/abuild/rpmbuild/BUILD
[   34s] + cd icamerasrc-528a6f177732def4d5ebc17927220d8823bc8fdc
[   34s] + LICENSEDIR=/home/abuild/rpmbuild/BUILDROOT/gstreamer-plugins-icamerasrc-0.0+git20231222.20231222-lp155.2.1.x86_64/usr/share/licenses/gstreamer-plugins-icamerasrc
[   34s] + export LC_ALL=C
[   34s] + LC_ALL=C
[   34s] + export LICENSEDIR
[   34s] + /usr/bin/mkdir -p /home/abuild/rpmbuild/BUILDROOT/gstreamer-plugins-icamerasrc-0.0+git20231222.20231222-lp155.2.1.x86_64/usr/share/licenses/gstreamer-plugins-icamerasrc
[   34s] + cp -pr LICENSE /home/abuild/rpmbuild/BUILDROOT/gstreamer-plugins-icamerasrc-0.0+git20231222.20231222-lp155.2.1.x86_64/usr/share/licenses/gstreamer-plugins-icamerasrc
[   34s] + RPM_EC=0
[   34s] ++ jobs -p
[   34s] + exit 0
[   34s] grep: : No such file or directory
[   34s] grep: : No such file or directory
[   35s] error: Dependency tokens must begin with alpha-numeric, '_' or '/': [12-25 15:45:12.45] CamHAL[ERR] load_camera_hal_library, failed to open PCI device. error: (null)()(64bit)
[   35s] error: Dependency tokens must begin with alpha-numeric, '_' or '/': [12-25 15:45:12.45] CamHAL[ERR] get_number_of_cameras, function call is nullptr()(64bit)
[   35s] error: Dependency tokens must begin with alpha-numeric, '_' or '/': [12-25 15:45:12.45] CamHAL[ERR] get_number_of_cameras, function call is nullptr()(64bit)
[   35s] error: Dependency tokens must begin with alpha-numeric, '_' or '/': [12-25 15:45:12.45] CamHAL[ERR] get_number_of_cameras, function call is nullptr()(64bit)
[   35s] error: Dependency tokens must begin with alpha-numeric, '_' or '/': [12-25 15:45:12.45] CamHAL[ERR] get_number_of_cameras, function call is nullptr()(64bit)
[   35s] Provides: gstreamer-plugins-icamerasrc = 0.0+git20231222.20231222-lp155.2.1 gstreamer-plugins-icamerasrc(x86-64) = 0.0+git20231222.20231222-lp155.2.1 gstreamer1(element-icamerasrc)()(64bit) libgsticamerainterface-1.0.so.1()(64bit) libgsticamerasrc.so()(64bit)
[   35s] Requires(interp): /bin/sh /bin/sh
[   35s] Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
[   35s] Requires(post): /bin/sh
[   35s] Requires(postun): /bin/sh
[   35s] Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.33)(64bit) libc.so.6(GLIBC_2.38)(64bit) libc.so.6(GLIBC_2.4)(64bit) libdrm_intel.so.1()(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libgcc_s.so.1(GCC_3.3.1)(64bit) libglib-2.0.so.0()(64bit) libgobject-2.0.so.0()(64bit) libgstallocators-1.0.so.0()(64bit) libgsticamerainterface-1.0.so.1()(64bit) libgstreamer-1.0.so.0()(64bit) libgstvideo-1.0.so.0()(64bit) libhal_adaptor.so()(64bit) libm.so.6()(64bit) libm.so.6(GLIBC_2.2.5)(64bit) libstdc++.so.6()(64bit) libstdc++.so.6(CXXABI_1.3)(64bit) libstdc++.so.6(CXXABI_1.3.8)(64bit) libstdc++.so.6(GLIBCXX_3.4)(64bit) libstdc++.so.6(GLIBCXX_3.4.21)(64bit) libstdc++.so.6(GLIBCXX_3.4.29)(64bit) libstdc++.so.6(GLIBCXX_3.4.32)(64bit)
[   35s] 
[   35s] RPM build warnings:
[   35s]     Macro expanded in comment on line 31: %nil
[   35s] 
[   35s] 
[   35s] RPM build errors:
[   35s]     Dependency tokens must begin with alpha-numeric, '_' or '/': [12-25
[   35s]     Dependency tokens must begin with alpha-numeric, '_' or '/': [12-25
[   35s]     Dependency tokens must begin with alpha-numeric, '_' or '/': [12-25
[   35s]     Dependency tokens must begin with alpha-numeric, '_' or '/': [12-25
[   35s]     Dependency tokens must begin with alpha-numeric, '_' or '/': [12-25
[   35s] 
[   35s] virtual1 failed "build gstreamer-plugins-icamerasrc.spec" at Mon Dec 25

The same package builds fine on Leap 15.5.
What happens is the following:

The package has this requirement:
BuildRequires: gstreamer-devel
The presence of such package defines the macro:
  __gstreamer_provides
After the package is compiled successfully, rpmbuild extract
the provides information and for such purpose it executes the macro
__gstreamer_provides.
Such macro in turn runs the following command:
  LD_LIBRARY_PATH=/home/abuild/rpmbuild/BUILDROOT/gstreamer-plugins-icamerasrc-0.0+git20231222.20231222-lp155.2.1.x86_64/usr/lib64 gst-inspect-1.0 --print-plugin-auto-install-info --rpm /home/abuild/rpmbuild/BUILDROOT/gstreamer-plugins-icamerasrc-0.0+git20231222.20231222-lp155.2.1.x86_64/usr/lib64/gstreamer-1.0/libgsticamerasrc.so 2>/dev/null
and its output is:
  [12-26 01:24:00.969] CamHAL[ERR] load_camera_hal_library, failed to open PCI device. error: (null)
  [12-26 01:24:00.969] CamHAL[ERR] get_number_of_cameras, function call is nullptr
  [12-26 01:24:00.969] CamHAL[ERR] get_number_of_cameras, function call is nullptr
  [12-26 01:24:00.969] CamHAL[ERR] get_number_of_cameras, function call is nullptr
  [12-26 01:24:00.970] CamHAL[ERR] get_number_of_cameras, function call is nullptr
  gstreamer1(element-icamerasrc)
The relevant output is "gstreamer1(element-icamerasrc)" the rest is a error message generated by 
the library /usr/lib64/libhal_adaptor.so

In Leap 15.5 with rpm 4.14.3 installed, the presence of such error message 
does not cause the rpmbuild failure.
However in tubleweed with rpm 4.18.0 the presence of such error message
causes the failure of rpmbuild.

Right now, to overcome the issue when building for tumbleweed
I have to put in the spec file:
%if 0%{?suse_version} > 1500
%define __gstreamer_provides %nil
Provides:       gstreamer1(element-icamerasrc)()(64bit)
%endif

However this is not a solution for the problem, just a workaround.

The way I see it, there are three possible way to fix the issue:

1) fix the library /usr/lib64/libhal_adaptor.so so it does not generate
the bogus error message.

2) fix rpm to revert the regression introduced when it does
not ignore the error messages when looking for "provides"

3) this is something that can be managed by OBS so the
presence of such error message does not cause rpmbuild to fail.

Please let me know your thoughts. If 1 or 2 is the proper solution,
I can escalate the issue upstream. If 3 is the way to go, then 
let me know how I can I help.

For the record the package failing is:
https://build.opensuse.org/package/show/home:gcomes.obs:ipu6/gstreamer-plugins-icamerasrc
libhal_adaptor.so is build in the package:
https://build.opensuse.org/package/show/home:gcomes.obs:ipu6/ipu6-camera-hal
Comment 1 Michael Schröder 2024-04-29 14:35:26 UTC
That's not a bug in rpm, but the provider generator generating illegal output. In this case, it is probably the "gstreamer-provides" generator calling gst-inspect-1.0.

Reassigning to gstreamer maintainer.