Bug 1401463

Summary: wireshark-devel lost all pkg-config dependencies
Product: [Fedora] Fedora Reporter: Daniel BerrangĂ© <berrange>
Component: wiresharkAssignee: Martin Sehnoutka <msehnout>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 25CC: crobinso, huzaifas, lemenkov, msehnout, nenolod, ngompa13, nmavrogi, phatina, rvokal
Target Milestone: ---Keywords: Reopened
Target Release: ---Flags: msehnout: needinfo-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: wireshark-2.2.6-2.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-29 06:01:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Daniel Berrangé 2016-12-05 11:02:54 UTC
Description of problem:
In Fedora 24 wireshark-devel shows the following deps:

$ rpm -q wireshark-devel
wireshark-devel-2.1.1-1.fc24.x86_64

$ rpm -q wireshark-devel --requires
/usr/bin/pkg-config
glib2-devel
glibc-devel
libwireshark.so.0()(64bit)
libwiretap.so.0()(64bit)
libwscodecs.so.0()(64bit)
libwsutil.so.0()(64bit)
pkgconfig(Qt)
pkgconfig(glib-2.0)
pkgconfig(gmodule-2.0)
pkgconfig(gthread-2.0)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
wireshark = 2.1.1-1.fc24


In Fedora 25/rawhide it shows

# rpm -q wireshark-devel
wireshark-devel-2.2.2-2.fc25.x86_64

# rpm -q wireshark-devel --requires
/usr/bin/pkg-config
glib2-devel
glibc-devel
libwireshark.so.8()(64bit)
libwiretap.so.6()(64bit)
libwscodecs.so.1()(64bit)
libwsutil.so.7()(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
wireshark = 2.2.2-2.fc25


Notice that all the pkg-config dependancies have gone. In particular this causes problems because qt4-devel never gets installed  and as a result pkg-config fails to find Qt


# pkg-config --cflags wireshark
Package Qt was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt.pc'
to the PKG_CONFIG_PATH environment variable
Package 'Qt', required by 'wireshark', not found


Version-Release number of selected component (if applicable):
wireshark-devel-2.2.2-2.fc25.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install wireshark in a minimal build-root
2. Run pkg-config --cflags wireshark
3.

Actual results:
Fails to find Qt library due to missing RPM deps

Expected results:
Reports cflags

Additional info:

Comment 1 Daniel Berrangé 2017-01-13 10:15:55 UTC
Any update on fixing this problem

Comment 2 Martin Sehnoutka 2017-03-09 08:02:05 UTC
Hi, I'm taking this bug and will update you soon.

Comment 3 Martin Sehnoutka 2017-04-07 14:13:37 UTC
This bug seems to be introduced by one of our patches:
http://pkgs.fedoraproject.org/cgit/rpms/wireshark.git/tree/wireshark-0006-Add-pkgconfig-entry.patch?h=f25

We should start using the upstream wireshark.pc file.

Comment 4 William Pitcock 2017-04-08 02:53:53 UTC
hello,

it is a little more involved than that.  while it is true that there is a deviation in the .pc file (which makes very little sense honestly), it is really showing a defect in the rpm dependency generator, which is caused by a design flaw in how pkg-config processes packages.  this bug can also be triggered by two split packages from the same source that have a dependency on each other (but pkg-config's dependency resolver will not see the other split package's .pc files, so it will silently fail and not output dependency data).

to provide correct behaviour for dependency generators, pkgconf 1.3.2 and later added an environment variable that can be used to limit the depth that the dependency resolver uses, allowing for the dependency resolver to only resolve top-level dependencies (the packages on the command line themselves) for consumers like the rpm dependency generator, which only wants to dump data from the .pc files.

with pkgconf 1.3.2 and the pull request at https://github.com/rpm-software-management/rpm/pull/192 the bug is fully resolved.

either way, the wireshark .pc file should probably be fixed as well, as there is no reason for wireshark to depend on Qt if it's not in build depends (if it were, the dependency generator would not fail in this way).

Comment 6 Cole Robinson 2017-05-10 21:47:48 UTC
Please also backport this to f24/f25

Comment 7 Neal Gompa 2017-05-19 15:26:32 UTC
This issue shouldn't affect Fedora 24, but it is definitely an issue in Fedora 25.

Comment 8 Fedora Update System 2017-05-26 13:14:23 UTC
wireshark-2.2.6-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f994c12a2d

Comment 9 Fedora Update System 2017-05-27 04:39:52 UTC
wireshark-2.2.6-2.fc25 has been pushed to the Fedora 25 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-2017-f994c12a2d

Comment 10 Fedora Update System 2017-05-29 06:01:16 UTC
wireshark-2.2.6-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.