Bug 1581325 - gstreamer1: /usr/lib/rpm/gstreamer1.prov fails
Summary: gstreamer1: /usr/lib/rpm/gstreamer1.prov fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gstreamer1
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1581343
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-22 14:07 UTC by Rex Dieter
Modified: 2018-05-31 12:51 UTC (History)
6 users (show)

Fixed In Version: gstreamer1-1.14.1-2.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-28 15:24:42 UTC
Type: Bug


Attachments (Terms of Use)

Description Rex Dieter 2018-05-22 14:07:46 UTC
Recently, seems that gstreamer1's
/usr/lib/rpm/gstreamer1.prov
fails to do it's job to include Provides() for gstreamer1 plugins

I'm investigating the cause

Comment 1 Rex Dieter 2018-05-22 14:16:12 UTC
This problem was highlighted with gstreamer1-plugins-good-1.14.1 in updates-testing.

Rebuilding f28 GA gstreamer1-plugins-good using GA gstreamer1-1.14.0-1.fc28.x86_64 also fails, which seems to show the problem is elsewhere.

Manually running 
gst-inspect-1.0 --print-plugin-auto-install-info --rpm <foo>
on individual installed plugins during build also works as expected

the plot thickens

Comment 2 Rex Dieter 2018-05-22 14:28:34 UTC
I think 'file' is to blame, gstreamer1.prov includes:
        xargs file -L 2>/dev/null | grep "ELF.*shared object" | cut -d: -f1 )


$ rpm -q file
file-5.32-3.fc28.x86_64
$ file -L /usr/lib64/gstreamer-1.0/libgstgtk.so
/usr/lib64/gstreamer-1.0/libgstgtk.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=36571638e503d65491eb210008f00ebc052d9ade, stripped


$ rpm -q file
file-5.33-2.fc28.x86_64
$ file -L /usr/lib64/gstreamer-1.0/libgstgtk.so
/usr/lib64/gstreamer-1.0/libgstgtk.so: ELF 64-bit LSB pie executable x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=36571638e503d65491eb210008f00ebc052d9ade, stripped

Note the output changed :-/

ELF 64-bit LSB shared object => ELF 64-bit LSB pie executable

Comment 3 Rex Dieter 2018-05-22 14:32:36 UTC
Filed "file" bug #1581343

Comment 4 Rex Dieter 2018-05-22 14:55:08 UTC
That said, I question whether such a strict check like the grep from comment #2 is required.  it's already already matching filenames that include "libgst" that ends in ".so"

Options include:
* relax solist check to *just* ELF
* relax solist check to include "pie executable" in addition to "shared object"
* wait for file to fix behavior change
* (some better idea)

Comment 5 Rex Dieter 2018-05-24 12:15:02 UTC
Another option:
* limit search of objects to consider to gst1 plugins dir, ie, output from `pkg-config gstreamer-1.0 --variable=pluginsdir`

For example, the status quo misses some plugins there that are not named of the form libgst*.so , on my f28 box, that includes:
/usr/lib64/gstreamer-1.0/libfsmsnconference.so
/usr/lib64/gstreamer-1.0/libfsrawconference.so
/usr/lib64/gstreamer-1.0/libfsrtpconference.so
/usr/lib64/gstreamer-1.0/libfsrtpxdata.so
/usr/lib64/gstreamer-1.0/libfsvideoanyrate.so

Comment 6 Rex Dieter 2018-05-24 12:22:15 UTC
One suggestion in the linked bug was to use readelf to search for a well-known symbol.  One possibility is gst_plugin_desc, but according to
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPlugin.html
"A plugin should export a symbol gst_plugin_desc ..."
note that not a MUST, so note sure we can rely on that one

Comment 7 Florian Weimer 2018-05-24 12:32:23 UTC
Is it possible to try to load all potential plug-ins at build time and generate Provides: for them only if they load successfully?

Comment 8 Wim Taymans 2018-05-24 14:07:08 UTC
(In reply to Rex Dieter from comment #6)
> One suggestion in the linked bug was to use readelf to search for a
> well-known symbol.  One possibility is gst_plugin_desc, but according to
> https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/
> GstPlugin.html
> "A plugin should export a symbol gst_plugin_desc ..."
> note that not a MUST, so note sure we can rely on that one

You can't rely on that symbol anymore, it changed to gst_plugin_{name}_desc where {name} is the plugin name derived from the .so filename.

I would just check for ELF. The list of all ELF .so files are then passed to gst-inspect-1.0 that will then try to open it, verify that it is a plugin with the right symbol and if all that works, generate a list of the plugins in the .so

Comment 9 Rex Dieter 2018-05-24 14:55:36 UTC
Thanks, I do have some unaddressed concerns though

* checking *all* ELF .so files may be slower (perhaps not significantly)

* Comment #5 , not all gstreamer plugins are named libgst*.so it seems

* Comment #5 , what about limiting search to well-known locations of gst plugins? (instead of anything matching libgst*.so)?

Comment 10 Wim Taymans 2018-05-24 15:28:00 UTC
> checking *all* ELF .so files may be slower (perhaps not significantly)

AFAICS the script only checks the plugins that were built by the package so the number of .so files that are not plugins but match libgst*.so are small.

> not all gstreamer plugins are named libgst*.so it seems

# rpm -qf /usr/lib64/gstreamer-1.0/libfsmsnconference.so
farstream02-0.2.7-7.fc28.x86_64

These are not plugins shipped by official gstreamer packages.

> what about limiting search to well-known locations of gst plugins? (instead of anything matching libgst*.so)?

All the plugins should also be in the /usr/lib64/gstreamer-1.0/ directory so I guess it could be added as an extra constraint.

Comment 11 Wim Taymans 2018-05-25 07:44:49 UTC
I think I understand now.. The gstreamer1.prov script is run for each rpm that is installed, not only the gstreamer ones. It should be fast and preferably only look in places where plugins can be. So my new proposal is:

1) only look in the plugin install dir (/usr/lib64/gstreamer-1.0/)
2) check all ELF files matching lib*.so

Comment 12 Fedora Update System 2018-05-26 17:37:11 UTC
gstreamer1-1.14.1-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-3fa0939e00

Comment 13 Fedora Update System 2018-05-26 17:37:33 UTC
gstreamer1-plugins-base-1.14.1-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-6a15f4c138

Comment 14 Fedora Update System 2018-05-26 17:38:12 UTC
gstreamer1-plugins-good-1.14.1-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-560c25093c

Comment 15 Fedora Update System 2018-05-26 17:38:37 UTC
gstreamer1-plugins-bad-free-1.14.1-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e2e3df868d

Comment 16 Fedora Update System 2018-05-26 17:38:57 UTC
gstreamer1-plugins-ugly-free-1.14.1-3.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e84487acad

Comment 17 Fedora Update System 2018-05-26 23:31:49 UTC
gstreamer1-1.14.1-2.fc28 has been pushed to the Fedora 28 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-2018-3fa0939e00

Comment 18 Fedora Update System 2018-05-26 23:31:54 UTC
gstreamer1-plugins-base-1.14.1-3.fc28 has been pushed to the Fedora 28 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-2018-6a15f4c138

Comment 19 Fedora Update System 2018-05-26 23:31:57 UTC
gstreamer1-plugins-good-1.14.1-3.fc28 has been pushed to the Fedora 28 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-2018-560c25093c

Comment 20 Fedora Update System 2018-05-26 23:32:00 UTC
gstreamer1-plugins-bad-free-1.14.1-3.fc28 has been pushed to the Fedora 28 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-2018-e2e3df868d

Comment 21 Fedora Update System 2018-05-26 23:32:05 UTC
gstreamer1-plugins-ugly-free-1.14.1-3.fc28 has been pushed to the Fedora 28 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-2018-e84487acad

Comment 22 Fedora Update System 2018-05-28 15:24:42 UTC
gstreamer1-1.14.1-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2018-05-28 15:24:47 UTC
gstreamer1-plugins-base-1.14.1-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2018-05-28 15:24:50 UTC
gstreamer1-plugins-good-1.14.1-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2018-05-28 15:24:55 UTC
gstreamer1-plugins-bad-free-1.14.1-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 26 Fedora Update System 2018-05-28 15:24:59 UTC
gstreamer1-plugins-ugly-free-1.14.1-3.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 27 Stefan Becker 2018-05-31 06:56:46 UTC
The non -free updates on rpmfusion are missing:

* http://koji.rpmfusion.org/koji/packageinfo?packageID=82
* http://koji.rpmfusion.org/koji/packageinfo?packageID=84

"dnf update" fails now e.g. with:

 Problem: package gstreamer1-plugins-ugly-1.14.0-1.fc28.x86_64 requires gstreamer1-plugins-ugly-free(x86-64) = 1.14.0, but none of the providers can be installed
  - cannot install both gstreamer1-plugins-ugly-free-1.14.1-3.fc28.x86_64 and gstreamer1-plugins-ugly-free-1.14.0-1.fc28.x86_64
  - cannot install both gstreamer1-plugins-ugly-free-1.14.0-1.fc28.x86_64 and gstreamer1-plugins-ugly-free-1.14.1-3.fc28.x86_64

Comment 28 Rex Dieter 2018-05-31 12:51:29 UTC
That's not a fedora issue, that's something for rpmfusion.

That said, I can help work on it there as time allows.


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