Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 356769 - app-arch/rpm-4.8.1-r1 has wrong _tmppath
Summary: app-arch/rpm-4.8.1-r1 has wrong _tmppath
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Stanislav Ochotnicky (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-27 23:51 UTC by Dan Callaghan
Modified: 2011-05-08 13:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
obligatory emerge --info (emerge-info.txt,13.25 KB, text/plain)
2011-02-27 23:54 UTC, Dan Callaghan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Callaghan 2011-02-27 23:51:15 UTC
rpmbuild fails with an error like this:

error: Unable to open temp file.

strace shows that it is trying to create /var/lib/tmp:

stat("/var", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/var/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/var/lib/tmp", 0x7fffb546eb80)    = -1 ENOENT (No such file or directory)
mkdir("/var/lib/tmp", 0755)             = -1 EACCES (Permission denied)

That's because the _tmppath macro in /usr/lib/rpm/macros is:

%_tmppath		%{_var}/tmp

which actually expands out to /var/lib/tmp because we pass --localstatedir=/var/lib to configure when building rpm. A saner value for that macro would be /var/tmp.
Comment 1 Dan Callaghan 2011-02-27 23:54:35 UTC
Created attachment 264123 [details]
obligatory emerge --info
Comment 2 Stanislav Ochotnicky (RETIRED) gentoo-dev 2011-05-08 13:27:54 UTC
Fixed in 4.8.1-r2 and 4.9.0. Thank you for reporting the bug