Bug 1476594 - rpm: Extracts dependencies from shbang lines in /usr/share/doc
rpm: Extracts dependencies from shbang lines in /usr/share/doc
Status: NEW
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
27
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-30 11:28 EDT by Florian Weimer
Modified: 2017-08-15 04:41 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Florian Weimer 2017-07-30 11:28:33 EDT
highlight-3.36-3.fc27 suddenly has a Requires: /bin/lua:

$ rpm -qp --requires
https://kojipkgs.fedoraproject.org//packages/highlight/3.39/1.fc27/x86_64/highlight-3.39-1.fc27.x86_64.rpm
/bin/lua
config(highlight) = 3.39-1.fc27
libc.so.6()(64bit)
…

I have verified that this comes from the
/usr/share/doc/highlight/examples/json/theme2json.lua file installed by
the package.  This file is now executable when installed; it used not to be.

The build happened with rpm-build 4.13.0.1-38.fc27.
Comment 1 Matthew Miller 2017-07-30 11:33:10 EDT
It does seem like it would be nice if examples in docs directories _just worked_. Is it crazy to suggest that RPM should not ignore docs, but instead add Recommends where there isn't already a Requires?
Comment 2 Igor Gnatenko 2017-07-30 11:34:50 EDT
(In reply to Matthew Miller from comment #1)
> It does seem like it would be nice if examples in docs directories _just
> worked_. Is it crazy to suggest that RPM should not ignore docs, but instead
> add Recommends where there isn't already a Requires?

Actually adding Recommends instead of Requires for %doc files sounds good to me.

If Florian or Panu like this idea, I'm willing to submit a patch.
Comment 3 Florian Festi 2017-07-30 11:47:47 EDT
Well, the Requires should go away if you remove the executable bit in the installroot. You can keep it executable in the package by setting attr if that's the desired result.
Comment 4 Igor Gnatenko 2017-07-30 15:24:12 EDT
(In reply to Florian Festi from comment #3)
> Well, the Requires should go away if you remove the executable bit in the
> installroot. You can keep it executable in the package by setting attr if
> that's the desired result.

The point of Matt's proposal is to *do* generation of such dependencies, but in forms of *Recommends* rather than Requirements for all files marked as %doc. From my POV it is nice suggestion even not trivial to implement though.
Comment 5 Jan Kurik 2017-08-15 04:41:08 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

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