Bug 1032452

Summary: scl-utils: Macro scl_files expands bad on 64 bit architecture if metapackage is noarch
Product: Red Hat Enterprise Linux 7 Reporter: Marcela Mašláňová <mmaslano>
Component: scl-utilsAssignee: Jan Zeleny <jzeleny>
Status: CLOSED CURRENTRELEASE QA Contact: Lukáš Zachar <lzachar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.0CC: bkabrda, drieden, jzeleny, mizdebsk, rcollet, rhenness
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: scl-utils-20130529-2.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1029516 Environment:
Last Closed: 2014-04-17 19:06:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1009921, 1029516, 1040860    
Bug Blocks: 1007875    

Description Marcela Mašláňová 2013-11-20 09:01:50 UTC
+++ This bug was initially created as a clone of Bug #1029516 +++

+++ This bug was initially created as a clone of Bug #1009921 +++

If you try to build a noarch metapackage on 64 bit machine, you'll end up with error like this:

RPM build errors:
    Installed (but unpackaged) file(s) found:
   /opt/rh/python27/root/lib64

This is caused by these lines in macros.scl:

%ifarch x86_64 ppc ppc64 sparc sparc64 s390 s390x
%{_scl_root}/%{_lib}
%endif

The problem is, that %ifarch conditionals seems not to expand in %files section. To reproduce this, just write a specfile with %files section like this:

%files
%ifarch <yourarch>
this_file_wont_be_searched_for
%endif

this_file_wont_be_searched_for doesn't exist in BUILDROOT, but RPM raises no error (so this could as well be RPM error, not scl-utils problem).

It'd seem that the same should happen to %{_scl_root}/usr/%{_lib}, which uses the same conditionals, but this is included because there are lots of other directories included inside it, which masks the error.