Bug 515685 - %defattr(644,root,root,-) does not set default %attr owner and group
%defattr(644,root,root,-) does not set default %attr owner and group
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
10
All Linux
low Severity medium
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-05 07:33 EDT by Till Maas
Modified: 2009-08-06 08:22 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-08-06 08:22:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Till Maas 2009-08-05 07:33:30 EDT
Description of problem:
If i use %defattr(755,root,root-) and later %attr(644,-,-) foofile, the owner and group of foofile are not set to root.

Version-Release number of selected component (if applicable):
rpm-4.7.0-2.fc11
rpm-4.6.1-1.fc10

How reproducible:
always

Steps to Reproduce:
1. wget http://till.fedorapeople.org/tmp/attrtest.spec
2. rpmbuild -bb attrtest.spec
3. rpm -qp --qf "[%-8{fileusername} %-8{filegroupname} %{filenames}\n]" ~/rpmbuild/RPMS/noarch/attrtest-0-1.fc11.noarch.rpm | grep $USER
  
Actual results:
till     till     /attr

Expected results:
grep should not match / all contents should belong to root:root
Comment 1 Till Maas 2009-08-05 07:37:57 EDT
I expected the beheaviour because of this documentation:

http://www.rpm.org/max-rpm-snapshot/s1-rpm-specref-files-list-directives.html
| Attributes that do not need to be set by %attr may be replaced with a dash
[...]
|  The %defattr sets default %attr for RPM.
Comment 2 R P Herrold 2009-08-05 14:48:54 EDT
I would suggest there is a comma missing before the last dash in the %defattr
Comment 3 Till Maas 2009-08-05 17:27:34 EDT
(In reply to comment #2)
> I would suggest there is a comma missing before the last dash in the %defattr  

Thanks, but the spec does not have the typo.
Comment 4 Jindrich Novy 2009-08-06 08:22:04 EDT
Fixed upstream.

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