Bug 1062432 - rpmbuild: Requires depends on mode of source file, not installed file
Summary: rpmbuild: Requires depends on mode of source file, not installed file
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-06 22:38 UTC by Ed Santiago
Modified: 2014-02-07 09:54 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-02-07 09:54:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
mk-rpmbuild-test - short reproducer (bash script) demonstrating the issue (1.50 KB, text/plain)
2014-02-06 22:38 UTC, Ed Santiago
no flags Details

Description Ed Santiago 2014-02-06 22:38:12 UTC
Created attachment 860343 [details]
mk-rpmbuild-test - short reproducer (bash script) demonstrating the issue

rpmbuild autogenerates dependencies. This autogeneration behaves differently depending on the mode of source files. It looks like the dependency step is ignoring %attrs defined in the %files section. For a given bash script foo:

   chmod 644 foo
   %files
   %attr(0750,-,-) foo

...does not produce a Requires: /bin/bash. This is surprising, and caused some confusion across a package rebuild.

Reproducer (attached) is one short example demonstrating how a simple difference in a source tarball or git repo could produce surprisingly different results.

rpm-4.11.1-3.fc19 but also present in RHEL6.

Comment 1 Panu Matilainen 2014-02-07 09:54:08 UTC
This is actually intentional, been that way forever. The file permissions used to be the only way of controlling automatic dependency generation on per-file level, and changing that would just break existing intentional uses.


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