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)
6.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Panu Matilainen
BaseOS QE Security Team
:
Depends On:
Blocks:
  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:
Environment:
Last Closed: 2012-03-20 02:46:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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):
rpm-build-4.8.0-19.el6.i686

How reproducible:
# test.spec
Name: test
Version: 1.0
Release: 1
Summary: test
Group: Test
License: Test
BuildRoot: /var/tmp/%{name}-%{version}-%{release}
%description
Test
%install
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run
%files
%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:
https://bugs.launchpad.net/rpm/+bug/633729
https://bugzilla.novell.com/show_bug.cgi?id=629048
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.