[Bug 864323] New: Conditional BuildRequires is not working on Fedora and RHEL.
https://bugzilla.novell.com/show_bug.cgi?id=864323 https://bugzilla.novell.com/show_bug.cgi?id=864323#c0 Summary: Conditional BuildRequires is not working on Fedora and RHEL. Classification: Internal Novell Products Product: openSUSE Build Service Version: 2.0 Platform: Other OS/Version: RHEL 6 Status: NEW Severity: Major Priority: P5 - None Component: build process AssignedTo: mls@suse.com ReportedBy: cnfourt@gmail.com QAContact: adrian@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0 By following http://en.opensuse.org/openSUSE:RPM_conditional_builds OBS seems not supporting conditional compiling on Fedora or RHEL. Will failed with error: ===== [ 103s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --define 'disturl obs://build.opensuse.org/home:cathay4t:libstoragemgmt-test/Fedora_18/eaba6890a5bcb1de3ec55b736752710b-libstoragemgmt' /home/abuild/rpmbuild/SOURCES/libstoragemgmt.spec [ 104s] error: Failed build dependencies: [ 104s] python-paramiko is needed by libstoragemgmt-0.1.0-13.1.i686 [ 114s] /.build/build: line 373: 288 Killed background_monitor_process ===== =========== OBS Failed SPEC ======= %bcond_without ibm_v7k %if 0%{?rhel} >= 7 %global with_ibm_v7k 0 %endif %if 0%{with_ibm_v7k} BuildRequires: python-paramiko %endif ================================== =========== OBS Pass SPEC ======== %if 0%{?fedora} || 0%{?rhel} <= 6 BuildRequires: python-paramiko %endif ================================== It seems the root cause is dependency check script of OBS does not run the macros in SPEC file. Please investigate. Thanks you in advance. Reproducible: Always Steps to Reproduce: 1. Try to create a project for fedora using conditional compiling using these lines in spec file. ==== %bcond_without ibm_v7k %if 0%{?rhel} >= 7 %global with_ibm_v7k 0 %endif %if 0%{with_ibm_v7k} BuildRequires: python-paramiko %endif ==== 2. osc commit -m'test' Actual Results: OBS failed to install packages defined by conditional BuildRequires. Expected Results: OBS install packages defined by conditional BuildRequires. Example project: https://build.opensuse.org/project/monitor/home:cathay4t:libstoragemgmt-test -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=864323 https://bugzilla.novell.com/show_bug.cgi?id=864323#c1 --- Comment #1 from Girs Ge <cnfourt@gmail.com> 2014-02-18 05:16:40 UTC --- Manually run "rpmbuild -ba xxx.spec" and "yum-builddep xxx.spec" works well. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=864323 https://bugzilla.novell.com/show_bug.cgi?id=864323#c2 --- Comment #2 from Michael Schröder <mls@suse.com> 2014-02-18 10:19:06 UTC --- The parser does not seem to support multiline macros. It'll probably work if you write: %{?_with_rest_api: %global with_rest_api 1 } %{?_without_rest_api: %global with_rest_api 0 } %{?_with_ibm_v7k: %global with_ibm_v7k 1 } %{?_without_ibm_v7k: %global with_ibm_v7k 0 } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=864323 https://bugzilla.novell.com/show_bug.cgi?id=864323#c3 Girs Ge <cnfourt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution| |WONTFIX --- Comment #3 from Girs Ge <cnfourt@gmail.com> 2014-08-03 03:23:01 UTC --- It works. Thank you for your advise. I am closing this bug. If you want to use this bug to fix multi-line macros parser issue, please reopen. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com