Bug 990717

Summary: %{_var} is not set to scl root
Product: [Fedora] Fedora Reporter: Omair Majid <omajid>
Component: scl-utilsAssignee: Jan Zeleny <jzeleny>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: bkabrda, jzeleny, sgehwolf
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-09 11:26:13 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:
Embargoed:

Description Omair Majid 2013-07-31 20:15:00 UTC
Description of problem:

The %{_var} macro generally expands to /var/
$ rpmbuild --showrc | grep _var
-14: _dbpath    %{_var}/lib/rpm
-14: _tmppath   %{_var}/tmp
-14: _var       /var

but macros.scl does not redefine it in terms of scl root:

$ grep _var /etc/rpm/macros.scl
(no output)

This casues scl-using rpms that use %{_var} to create/own/put files in /var instead of somehwere under /opt.

Comment 1 Jan Zeleny 2013-10-09 11:26:13 UTC
I'm pretty sure you are not supposed to use %_var. IIRC you should be using %_localstatedir and that one is defined correctly. Redefining %_var might actually cause some problems, as _dbpath and _tmppath depend on it.