Bug 804910 - %defattr overrides %attr if directory default permission given
%defattr overrides %attr if directory default permission given
Status: CLOSED DUPLICATE of bug 730473
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rpm (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Panu Matilainen
BaseOS QE Security Team
Depends On:
  Show dependency treegraph
Reported: 2012-03-20 02:40 EDT by Iliya Peregoudov
Modified: 2012-03-20 02:46 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-03-20 02:46:12 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 Iliya Peregoudov 2012-03-20 02:40:11 EDT
%dir %attr erroneously inherit default directory permissions from %defattr.

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

How reproducible:
# test.spec
Name: test
Version: 1.0
Release: 1
Summary: test
Group: Test
License: Test
BuildRoot: /var/tmp/%{name}-%{version}-%{release}
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run
%defattr(644, root, root, 755)
%dir %attr(775, root, test) %{_localstatedir}/run

Steps to Reproduce:
1. rpmbuild -bb test.spec
Actual results:
$ rpm -qlvp test-1.0-1.i386.rpm
drwxr-xr-x    2 root    test                0 Mar 20 10:37 /var/run

Expected results (produced on RHEL 5.7 system):
$ rpm -qvlp test-1.0-1.i386.rpm
drwxrwxr-x    2 root    test                0 Mar 20 10:07 /var/run

Additional info:
Also reported in following bug trackers:
Comment 1 Panu Matilainen 2012-03-20 02:46:12 EDT

*** This bug has been marked as a duplicate of bug 730473 ***

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