RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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
Target Upstream Version:
Embargoed:


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.