[opensuse-buildservice] Conditions in spec's BuildRequires section doesn't work correctly
Hi, My OBS version is 2.6.2, and I found that OBS looks like could not analyse spec correctly in below cases. Q1: This is part of sane-backends.spec in centos 7. On the top at spec, there is %if !0%{?fedora}%{?rhel} || 0%{?fedora} >= 18 || 0%{?rhel} >= 7 %global libusb1 1 %else %global libusb1 0 %endif and in BuildRequires section, there is %if %libusb1 BuildRequires: libusbx-devel %else BuildRequires: libusb-devel %endif When initialize compile enviroment, libusb-devel was installed, but in fact, libusbx-devel should be installed, I think this may becauase of my worker is suse 11.3. While start build, building was soon end with an error "Can't find BuildRequires libusbx-devel". Q2: %if 0%{?opensuse_bs} BuildRequires: glibc32 %else BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so %endif In my project conf, I added "%define opensuse_bs 1". But still, my package status is unresolvable, tips is "nothing provides /lib/libc.so.6, nothing provides /usr/lib/libc.so, nothing provides /lib64/libc.so.6, nothing provides /usr/lib64/libc.so" As workaround, what can I do for these two cases. Anyone can help? Thank you. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Freitag, 9. Oktober 2015, 23:18:50 CEST wrote Wanghui (John):
Hi,
My OBS version is 2.6.2, and I found that OBS looks like could not analyse spec correctly in below cases.
Q1:
This is part of sane-backends.spec in centos 7. On the top at spec, there is
%if !0%{?fedora}%{?rhel} || 0%{?fedora} >= 18 || 0%{?rhel} >= 7 %global libusb1 1 %else %global libusb1 0 %endif
and in BuildRequires section, there is
%if %libusb1 BuildRequires: libusbx-devel %else BuildRequires: libusb-devel %endif
When initialize compile enviroment, libusb-devel was installed, but in fact, libusbx-devel should be installed, I think this may becauase of my worker is suse 11.3. While start build, building was soon end with an error "Can't find BuildRequires libusbx-devel".
I can not reproduce this with current code, but there was a bugfix lately which might have fixed this (didn't tried with the old code). Can you update your build package and try again? (be sure to make a source change or execute a manual package check via bs_admin to see an effect). If it does not help, a good way to debug this is to use obs_admin --parse-build-desc $ANY.spec x86_64 /usr/lib/build/configs/$your_config and check what dependencies get detected.
Q2:
%if 0%{?opensuse_bs} BuildRequires: glibc32 %else BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so %endif
In my project conf, I added "%define opensuse_bs 1". But still, my package status is unresolvable, tips is "nothing provides /lib/libc.so.6, nothing provides /usr/lib/libc.so, nothing provides /lib64/libc.so.6, nothing provides /usr/lib64/libc.so"
As workaround, what can I do for these two cases. Anyone can help?
OBS does not build a database containing file provides by default for speed reasons. You need to define them yourself using FileProvides: directive: http://openbuildservice.org/help/manuals/obs-reference-guide/cha.obs.build_c... -- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (2)
-
Adrian Schröter
-
Wanghui (John)