Bug 190800 - rpm macro %{_sysconfdir} points to /usr/etc
rpm macro %{_sysconfdir} points to /usr/etc
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rpm (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Panu Matilainen
Depends On:
Blocks: 190430
  Show dependency treegraph
Reported: 2006-05-05 05:27 EDT by Bastien Nocera
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-19 14:44:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bastien Nocera 2006-05-05 05:27:22 EDT
+++ This bug was initially created as a clone of Bug #186411 +++

Description of problem:
rpmbuild macro %{_sysconfdir} points to /usr/etc because rpm looks for

Version-Release number of selected component (if applicable):

How reproducible:
always, try to rebuild a src rpm with this macro or:
# rpm --eval %{_sysconfdir}

Steps to Reproduce:
1. # rpm --eval %{_sysconfdir}
2. /usr/etc
Actual results:

Expected results:

Additional info:
The macro %{_sysconfdir} is defined in a couple of files under /usr/lib/rpm/
always with the filename macros
But here on the 64bit version it tries to open:
open("/usr/lib/rpm/ia32e-linux/macros", O_RDONLY) = -1 ENOENT (No such file or
so the wrong path /usr/etc from /usr/lib/rpm/macros is used.
I did an strace:
# grep macros strace_rpm
open("/usr/lib/rpm/macros", O_RDONLY)   = 3
read(3, "#/*! \\page config_macros Default"..., 8192) = 8192
open("/usr/lib/rpm/ia32e-linux/macros", O_RDONLY) = -1 ENOENT (No such file or
open("/etc/rpm/macros.jpackage", O_RDONLY) = 3
read(3, "#\n# RPM macros for Java applicat"..., 8192) = 6657
open("/etc/rpm/macros.prelink", O_RDONLY) = 3
open("/etc/rpm/macros.solve", O_RDONLY) = 3
open("/etc/rpm/macros.specspo", O_RDONLY) = 3
open("/etc/rpm/macros.up2date", O_RDONLY) = 3
open("/etc/rpm/macros", O_RDONLY)       = -1 ENOENT (No such file or directory)
open("/etc/rpm/ia32e-linux/macros", O_RDONLY) = -1 ENOENT (No such file or
stat("/root/.rpmmacros", 0x7fbfffe180)  = -1 ENOENT (No such file or directory)

-- Additional comment from n3npq@mac.com on 2006-03-23 15:33 EST --
The %{_sysconfdir} macro is overridden by per-platform macros
    -14: _sysconfdir        /etc

Edit /etc/rpm/platform, and change "ia32e" to "x86_64" is one fix.
    ln -s x86_64-linux /usr/lib/rpm/ia32e-linux

-- Additional comment from tr@bgs-ing.de on 2006-03-24 08:16 EST --
The symlink was what I thought of, too.
I did:
ln -s /usr/lib/rpm/x86_64-linux/ /usr/lib/rpm/ia32e-linux

and now it works:

# rpm --eval %{_sysconfdir}

Comment 2 Martin (calim) 2007-06-06 09:14:36 EDT
Same problem here.
Comment 3 RHEL Product and Program Management 2007-10-19 14:44:40 EDT
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
For more information of the RHEL errata support policy, please visit:
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.

Note You need to log in before you can comment on or make changes to this bug.