Bug 804910 - %defattr overrides %attr if directory default permission given
Summary: %defattr overrides %attr if directory default permission given
Keywords:
Status: CLOSED DUPLICATE of bug 730473
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rpm
Version: 6.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Panu Matilainen
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-20 06:40 UTC by Iliya Peregoudov
Modified: 2012-03-20 06:46 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-20 06:46:12 UTC


Attachments (Terms of Use)

Description Iliya Peregoudov 2012-03-20 06:40:11 UTC
%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 06:46:12 UTC

*** 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.