Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F40 cannot layer mozilla-openh264 #536

Closed
kanru opened this issue Mar 2, 2024 · 25 comments
Closed

F40 cannot layer mozilla-openh264 #536

kanru opened this issue Mar 2, 2024 · 25 comments
Labels
docs Related to the docs or needing docs f40 Related to Fedora 40 good first issue Good for newcomers upstream Issue reported, fixed or related to upstream projects

Comments

@kanru
Copy link

kanru commented Mar 2, 2024

Describe the bug

If mozilla-openh264 was previously layered it prevents rebasing to F40.
After removed mozilla-openh264 and rebased to F40, mozilla-openh264 cannot be layered again unless first removing noopenh264 from the base.

To Reproduce
Please describe the steps needed to reproduce the bug:

  1. Run rpm-ostree install mozilla-openh264
error: Could not depsolve transaction; 1 problem detected:
 Problem: package noopenh264-0.1.0~openh264_2.4.0-1.fc40.x86_64 from @System conflicts with openh264 provided by openh264-2.4.0-2.fc40.x86_64 from fedora-cisco-openh264
  - package openh264-2.4.0-2.fc40.x86_64 from fedora-cisco-openh264 obsoletes noopenh264 < 1:0 provided by noopenh264-0.1.0~openh264_2.4.0-1.fc40.x86_64 from @System
  - package mozilla-openh264-2.4.0-2.fc40.x86_64 from fedora-cisco-openh264 requires openh264(x86-64) = 2.4.0-2.fc40, but none of the providers can be installed
  - conflicting requests

Expected behavior
Both mozilla-openh264 and openh264 should be layered.

Screenshots
N/A

OS version:

State: idle
BootedDeployment:
● fedora:fedora/40/x86_64/silverblue
                  Version: 40.20240301.n.0 (2024-03-01T08:13:52Z)
               BaseCommit: 015c2ff0f7b415c438ce656e2d40ca81d6d3dc6c6b012b95bb4e6c05f46bdfd5
             GPGSignature: Valid signature by 115DF9AEF857853EE8445D0A0727707EA15B79CC
          LayeredPackages: btrbk fish gnome-boxes starship syncthing
            LocalPackages: ibus-chewing-2.0.0-2.fc39.x86_64

Additional context
N/A

@kanru kanru added the bug Something isn't working label Mar 2, 2024
@travier
Copy link
Member

travier commented Mar 2, 2024

You now need to remove the noopenh264 package when layering the openh264 one:

$ rpm-ostree override remove noopenh264 --install openh264 --install mozilla-openh264

@travier travier added f40 Related to Fedora 40 good first issue Good for newcomers docs Related to the docs or needing docs and removed bug Something isn't working labels Mar 2, 2024
@OptimoSupreme
Copy link

Isn't noopenh264 obsolete though? Why is it included in the first place?

@juhp
Copy link

juhp commented Apr 21, 2024

No it is a placeholder which is obsoleted by the real openh264 package in the cisco repo.

@juhp
Copy link

juhp commented Apr 21, 2024

This seems like a reasonable candidate for CommonBugs: maybe that requires a bugzilla or can we link to this issue?

@nanonyme
Copy link

nanonyme commented Apr 21, 2024

@OptimoSupreme noopenh264 provides OpenH264 API through stubs that can be built against. (eg by gstreamer plugin and ffmpeg) The idea is that you would then drop-in OpenH264 to provide the actual implementation.

@OptimoSupreme
Copy link

@nanonyme so I guess my question is when would you actually need the noopenh264 package? From what I found and what was said before, I needed to remove the package just to install openh264.

@nanonyme
Copy link

nanonyme commented Apr 21, 2024

It's needed as a dependency of the packages I mentioned before. They will load the API's with stubs and gracefully report OpenH264 is not supported and move on. There isn't really any other problem here than that depsolver refuses to remove the conflicting noopenh264 in favour of openh264 without manual action from user.

@juhp
Copy link

juhp commented Apr 22, 2024

I think this is a limitation of rpm-ostree? Though I can't find any existing issue reported there, which makes me wonder.
(The closest issue might be coreos/rpm-ostree#4533).
Perhaps it is because openh264 is from a different repo?
Or more likely rebases can't handle obsoletes perhaps?

@juhp
Copy link

juhp commented Apr 22, 2024

In fact it is not just rebase, even after upgrading #536 (comment) is still needed to overlay openh264

@juhp
Copy link

juhp commented Apr 22, 2024

I am still not clear how noopenh264 gets pulled into SB40 though?
In retrospect it seems better to have excluded it but I think it is too late for that for the GA iso at least.
I feel it still makes sense for updates though.

I started writing a rpm-ostree issue, but this is probably expected behavior, right?

@nanonyme
Copy link

My educated guess is it gets pulled in as dependency of gstreamer OpenH264 plugin or ffmpeg.

@nanonyme
Copy link

IMHO this is a missing feature, unclear where. Probably rpm-ostree.

@jlebon
Copy link
Member

jlebon commented Apr 22, 2024

It seems like it gets pulled as a weak dep of libavcodec-free (which gets pulled in by gstreamer1-plugin-libav).

We also ship libavcodec-free in f39 and libopenh264.so.7()(64bit) is also a weak dep there.

Anyway, opened https://pagure.io/workstation-ostree-config/pull-request/508 (and an f40 backport) which I think should fix this but I didn't test it yet.

@nanonyme
Copy link

Make sure to test trying to view OpenH264 content doesn't result in a crash afterwards but instead failure on missing codec.

@chrisawi
Copy link

At some point, libavcodec-free may start linking against noopenh264 in lieu of using a downstream dlopen patch. If that happens, it will no longer be optional, so excluding it from the image now may just be delaying the inevitable. I'm not certain what their plans are though.

From my perspective, rpm-ostree's behavior is correct; it shouldn't automatically override the base image for any reason. Maybe it would be possible to make openh264 work like libavcodec-freeworld where it's parallel-installable with noopenh264? I don't know if that's worth it just for atomic users, since ideally they wouldn't need to layer it in the first place, but that's pending on flatpak Firefox by default and availability of a Fedora openh264 extension.

@nanonyme
Copy link

The thing is, they both provide same soname libraries. Whatever the setup, it should be so that everything switched to loading OpenH264 library when present. With flatpak runtimes this is simple, the extension can just be mounted on top of noopenh264 like how it's done in freedesktop-sdk.

@rathann
Copy link

rathann commented Apr 23, 2024

The thing is, they both provide same soname libraries. Whatever the setup, it should be so that everything switched to loading OpenH264 library when present.

You can achieve that by making openh264 parallel installable putting libopenh264.so.7 in %{_libdir}/openh264/ and dropping an appropriate config into /etc/ld.so.conf.d.

@nanonyme
Copy link

That might actually even be safer than removal. Then if you have OpenH264 with different soname, video frameworks fallback to noopen264.

@travier
Copy link
Member

travier commented Apr 23, 2024

Make sure to send all of those suggestions to the noopenh264 maintainers (maybe via a bugzilla) otherwise they likely won't see it here.

@travier travier added the upstream Issue reported, fixed or related to upstream projects label Apr 23, 2024
@nanonyme
Copy link

nanonyme commented Apr 23, 2024

I think you mean OpenH264 package maintainers?

@travier
Copy link
Member

travier commented Apr 26, 2024

@nanonyme
Copy link

Yeah, this was expected. You can't just drop a package in the middle of dep chain without removing all reverse dependencies

@OptimoSupreme
Copy link

OptimoSupreme commented Apr 26, 2024

So now that this has been figured out, can I ask what the intended method is for adding openh264 functionality to Firefox on a baseline Silverblue is?

@travier
Copy link
Member

travier commented Apr 26, 2024

#536 (comment)

2aecfff4 added a commit to 2aecfff4/seiketsu that referenced this issue May 1, 2024
"You now need to remove the noopenh264 package when layering the openh264 one"

fedora-silverblue/issue-tracker#536
@travier
Copy link
Member

travier commented Jun 11, 2024

It looks like it's unlikely that we'll be able to remove this package from the images so I'll close this issue.

@travier travier closed this as not planned Won't fix, can't repro, duplicate, stale Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Related to the docs or needing docs f40 Related to Fedora 40 good first issue Good for newcomers upstream Issue reported, fixed or related to upstream projects
Projects
None yet
Development

No branches or pull requests

8 participants