Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1297557 - rpmdeps is recursively called infinitely when using external dependency generator
Summary: rpmdeps is recursively called infinitely when using external dependency gener...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-11 20:53 UTC by Helmut Schlattl
Modified: 2016-02-01 02:20 UTC (History)
6 users (show)

Fixed In Version: rpm-4.13.0-0.rc1.10.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-01 02:20:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Helmut Schlattl 2016-01-11 20:53:03 UTC
Description of problem:
When using the external dependency generator (%_use_internal_dependency_generator 0), then rpmdeps is stuck in a infinite recursive loop.

Version-Release number of selected component (if applicable):
rpm-4.13.0-0.rc1.7.fc23

How reproducible:
Always

Steps to Reproduce:
1. Set %_use_internal_dependency_generator 0 in .rpmmacros.
2. perform rpmbuild on any package, e.g., rpmbuild --rebuild 
3.

Actual results:
The build process stops with
Finding  Provides: /usr/lib/rpm/find-provides
/usr/lib/rpm/find-provides: fork: retry: No child processes
/usr/lib/rpm/find-provides: fork: retry: No child processes
/usr/lib/rpm/find-provides: fork: retry: No child processes
/usr/lib/rpm/find-provides: fork: retry: No child processes
/usr/lib/rpm/find-provides: fork: Resource temporarily unavailable
error: /usr/lib/rpm/find-provides failed: fe00
error: Failed to find Provides:
error: /usr/lib/rpm/find-provides failed: 100

The last two messages are repeated very often, then:

Provides: zlib = 1.2.8-9.1.fc23 zlib(x86-64) = 1.2.8-9.1.fc23
Requires(interp): /sbin/ldconfig /sbin/ldconfig
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig


RPM build errors:
    bogus date in %changelog: Tue Feb 21 2007 Adam Tkac <atkac redhat com> - 1.2.3-8
    /usr/lib/rpm/find-provides failed: 100
    Failed to find Provides:



Expected results:
Clear build

Additional info:
The external dependency generator is defined in the macro '__find_provides', which per default is '/usr/lib/rpm/find-provides'. /usr/lib/rpm/find-provides is a script calling /usr/lib/rpm/rpmdeps. 

The routine "rpmfcApplyExternal" in build/rpmfc.c (part of rpmdeps) is parsing depMsgs, causing the macro '__find_provides' to be expanded and executed, i.e., starting again rpmdeps and so on.

Comment 2 Panu Matilainen 2016-01-18 08:16:50 UTC
(In reply to Helmut Schlattl from comment #0)
> Description of problem:
> When using the external dependency generator
> (%_use_internal_dependency_generator 0), then rpmdeps is stuck in a infinite
> recursive loop.
> 
> Version-Release number of selected component (if applicable):
> rpm-4.13.0-0.rc1.7.fc23
> 
> How reproducible:
> Always
> 
> Steps to Reproduce:
> 1. Set %_use_internal_dependency_generator 0 in .rpmmacros.

You really, really should not be doing that.

The old external dependency generator exists only for backwards compatibility with specs from older distros that rely on external depgen specifics (eg for filtering and custom deps). It should not be used for new packages, and certainly not as a global default.

Perhaps a deprecation warning should finally be added to external depgen usage.

Comment 3 Helmut Schlattl 2016-01-18 18:32:18 UTC
(In reply to Ľuboš Kardoš from comment #1)
> Fixed upstream:
> 
> https://github.com/rpm-software-management/rpm/commit/
> 33158b3b009e830036d05c138a6b308c1574effe

Thanks a lot. Sometimes it's easier than anticipated.

Comment 4 Helmut Schlattl 2016-01-18 18:42:49 UTC
(In reply to Panu Matilainen from comment #2)

> > Steps to Reproduce:
> > 1. Set %_use_internal_dependency_generator 0 in .rpmmacros.
> 
> You really, really should not be doing that.
> 
> The old external dependency generator exists only for backwards
> compatibility with specs from older distros that rely on external depgen
> specifics (eg for filtering and custom deps). It should not be used for new
> packages, and certainly not as a global default.
> 
> Perhaps a deprecation warning should finally be added to external depgen
> usage.

It's a pity, if this option would be discarded, just because it is not required for the standard distro.

I a trying to set up a cross compile toolchain using rpm, and for this I found the external dependency generator convenient, since the script can be modified, e.g., to add the target architecture to the dependencies found by rpmdeps.

Comment 5 Panu Matilainen 2016-01-19 07:10:07 UTC
The internal generator is fully customizable too these days (see http://rpm.org/wiki/PackagerDocs/DependencyGenerator) and that's what eg the mingw cross-compilation environment in Fedora uses for its dependendencies. Just FWIW.

Comment 6 Fedora Update System 2016-01-29 16:43:08 UTC
rpm-4.13.0-0.rc1.10.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8caca0b06d

Comment 7 Fedora Update System 2016-01-30 19:55:29 UTC
rpm-4.13.0-0.rc1.10.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8caca0b06d

Comment 8 Fedora Update System 2016-02-01 02:20:44 UTC
rpm-4.13.0-0.rc1.10.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


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