Bug 674345 - rpm-build makes %{_initrddir}/* components owned by resulting package
Summary: rpm-build makes %{_initrddir}/* components owned by resulting package
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rpm
Version: 6.1
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: 2011-02-01 15:16 UTC by Petr Pisar
Modified: 2011-03-15 13:55 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-02 07:13:28 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


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