Bug 515685 - %defattr(644,root,root,-) does not set default %attr owner and group
Summary: %defattr(644,root,root,-) does not set default %attr owner and group
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-05 11:33 UTC by Till Maas
Modified: 2009-08-06 12:22 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-08-06 12:22:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Till Maas 2009-08-05 11:33:30 UTC
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 11:37:57 UTC
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 18:48:54 UTC
I would suggest there is a comma missing before the last dash in the %defattr

Comment 3 Till Maas 2009-08-05 21:27:34 UTC
(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 12:22:04 UTC
Fixed upstream.


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