Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 674345

Summary: rpm-build makes %{_initrddir}/* components owned by resulting package
Product: Red Hat Enterprise Linux 6 Reporter: Petr Pisar <ppisar>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-02 07:13:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Pisar 2011-02-01 15:16:52 UTC
I have a spec file with

%files
%attr(0755,root,root) %{_initrddir}/quota_nld

resulting binary package built by rpm-build-4.8.0-12 owns not only %{_initrddir}/quota_nld file, but all components of %{_initrddir} except leading /etc too:

# rpm -q -l -p ~/rpmbuild/RPMS/x86_64/quota-3.17-11.el6.x86_64.rpm  |grep etc
/etc/quotagrpadmins
/etc/quotatab
/etc/rc.d                  ←
/etc/rc.d/init.d           ←
/etc/rc.d/init.d/quota_nld
/etc/sysconfig
/etc/sysconfig/quota_nld
/etc/warnquota.conf

Is is O.k.?

You can check it with latest quota package (https://brewweb.devel.redhat.com/buildinfo?buildID=155839).

Comment 2 Panu Matilainen 2011-02-02 07:13:28 UTC
Globs match directories too, this is what causes the package to own the directories too:
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/*

In other words, it's a packaging issue, not an rpm bug.

Comment 3 Petr Pisar 2011-02-02 09:17:07 UTC
I agree

%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/*

matches direct subdirectories under %{_sysconfdir}, however I have this code:

%attr(0755,root,root) %{_initrddir}/quota_nld

and resulting ownership is /etc/rc.d, /etc/rc.d/init.d, and /etc/rc.d/init.d/quota_nld. 

This is not what I expected, nor you described.

Comment 4 Petr Pisar 2011-02-02 09:21:16 UTC
I see, %{_sysconfdir} is /etc, thous it owns everything under /etc. Thanks for finding the packaging bug.