Skip to content

gupnp-igd: 1.2.0 → 1.6.0; gupnp-igd: refactor; libnice: refactor and switch to gupnp-igd_1_6#395063

Merged
jtojnar merged 2 commits into
NixOS:libsoup-updatesfrom
nyabinary:gupnp-igd_1_6
Apr 15, 2025
Merged

gupnp-igd: 1.2.0 → 1.6.0; gupnp-igd: refactor; libnice: refactor and switch to gupnp-igd_1_6#395063
jtojnar merged 2 commits into
NixOS:libsoup-updatesfrom
nyabinary:gupnp-igd_1_6

Conversation

@nyabinary

@nyabinary nyabinary commented Apr 1, 2025

Copy link
Copy Markdown
Contributor

gupnp-igd: refactor and update to 1.6.0
libnice: refactor and add patch for gupnp-igd 1.6.0
Needed for #383092 and #265771

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@nyabinary

Copy link
Copy Markdown
Contributor Author

Assuming this works according to the README.md any gupnp-igd version above or equal to 0.1.2 works. I couldn't find a way to nix build the gupnp-igd_1_6 version in the new CLI (so had to do this it in a hacky way nix build --impure --expr 'with import <nixpkgs> { }; callPackage ./package.nix {}', also couldn't figure out how to build gupnp-igd_1_6 and libnice with gupnp-igd_1_6 at the same time so if anyone can teach me that would be appreciated. :3

@github-actions github-actions Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels Apr 1, 2025
@nyabinary nyabinary marked this pull request as draft April 1, 2025 03:30
@LordGrimmauld

Copy link
Copy Markdown
Contributor

@ofborg build gst_all_1.gst-plugins-bad

@LordGrimmauld

Copy link
Copy Markdown
Contributor

@nyabinary nyabinary changed the base branch from master to staging April 1, 2025 15:01
@nyabinary nyabinary marked this pull request as ready for review April 1, 2025 16:45
@nyabinary

Copy link
Copy Markdown
Contributor Author

you'll also have to target this PR against staging. See https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#rebasing-between-branches-ie-from-master-to-staging

done

@nyabinary nyabinary mentioned this pull request Apr 1, 2025
5 tasks
@github-actions github-actions Bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels Apr 1, 2025

@jtojnar jtojnar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Care needs to be taken. gupnp pulls in libsoup_2_4, while gupnp_1_6 pulls in libsoup_3 so this PR “changes allegiance” of libnice. If a package transitively depending on libnice still somehow pulls in libsoup_2, it will likely crash at runtime as symbols from libsoup_2 will clash with the ones from libsoup_3.

  • At least farstream depends on both libnice and gupnp-igd.
  • Telepathy stuff will almost certainly be broken as well, and there are some dependents in KDE, IIRC. Though Telepathy is basically unmaintained nowadays and can probably be removed.

Comment thread pkgs/by-name/li/libnice/package.nix Outdated
Comment thread pkgs/by-name/li/libnice/package.nix Outdated
@nyabinary nyabinary force-pushed the gupnp-igd_1_6 branch 2 times, most recently from 4c16494 to 43b64d9 Compare April 1, 2025 19:06
@LordGrimmauld

LordGrimmauld commented Apr 1, 2025

Copy link
Copy Markdown
Contributor

things pulling both libsoups after this PR: https://termbin.com/h8my
things pulling both libsoups before this PR: https://termbin.com/82av
generated with https://git.grimmauld.de/Grimmauld/nix-closure-thingy/src/branch/main/shared-deps.py

@LordGrimmauld

Copy link
Copy Markdown
Contributor

interestingly enough, significantly more things pull both libsoups before this PR!

@nyabinary

Copy link
Copy Markdown
Contributor Author

things pulling both libsoups after this PR: https://termbin.com/h8my things pulling both libsoups before this PR: https://termbin.com/82av generated with https://git.grimmauld.de/Grimmauld/nix-closure-thingy/src/branch/main/shared-deps.py

So it's a net positive then :P, this pr

@LordGrimmauld

Copy link
Copy Markdown
Contributor

image
After this PR, libsoup2 doesn't have any dependency that is a mass rebuild. This means fixing any potential breakage can happen in master and doesn't have the 2 week delay of staging cycles. I vote to go for it. Replacing libsoup2 has been a long project and this is the right direction.

@LordGrimmauld

LordGrimmauld commented Apr 2, 2025

Copy link
Copy Markdown
Contributor

https://termbin.com/dv8c
after #395311 was merged, only 360 packages with potentially overlapping libsoup_2_4 / libnice remain. Most of those go through webkitgtk -> wxGTK.

@nyabinary

Copy link
Copy Markdown
Contributor Author

@jtojnar Any next steps we can take?

@LordGrimmauld

Copy link
Copy Markdown
Contributor

I believe we shouldn't have to. AIUI the motivation was to keep the things not using libnice unaffected for now, but if we are globally getting rid of libsoup_2_4 wherever possible, that argument disappears

@nyabinary

Copy link
Copy Markdown
Contributor Author

Okay, so about this PR: why do we need to keep the old one around?

We don't :P

@nyabinary nyabinary changed the title gupnp-igd_1_6: init at 1.6.0; gupnp-igd: refactor; libnice: refactor and switch to gupnp-igd_1_6 gupnp-igd: 1.2.0 → 1.6.0; gupnp-igd: refactor; libnice: refactor and switch to gupnp-igd_1_6 Apr 13, 2025
@LordGrimmauld

Copy link
Copy Markdown
Contributor

@ofborg build farstream

@LordGrimmauld

Copy link
Copy Markdown
Contributor

Okay, so about this PR: why do we need to keep the old one around?

So turns out, farstream that depends on gupnp-igd too is pretty dead: https://gitlab.freedesktop.org/farstream/farstream/-/commits/master

This PR likely breaks farstream (checking via ofborg rn). There is three solutions: keep the old gupnp-igd for farstream, try to patch farstream, or drop farstream and dependents.

Comment thread pkgs/by-name/gu/gupnp-igd/package.nix Outdated
@alyssais

Copy link
Copy Markdown
Member

or drop farstream and dependents

I wonder how many of its dependents require it vs. having an optional dependency on it. Either way doesn't seem too widely used.

@LordGrimmauld

Copy link
Copy Markdown
Contributor

or drop farstream and dependents

I wonder how many of its dependents require it vs. having an optional dependency on it. Either way doesn't seem too widely used.

there is

  • telepathy (unmaintained, should be dropped)
  • pidgin, does use it on 2.14.14 version (stable from 2 months ago), there is a beta preview of 3.x (2.91.0, few days ago) that will likely break pidgin addons
  • gajim, has an upstream PR dropping the libnice/farstream dependencies (but the PR isn't exactly small, i don't feel confident cherrypicking that to nix)

There are no further dependents on farstream.

@alyssais

Copy link
Copy Markdown
Member

Both gajim and pidgim only use farstream conditionally, so can't we just drop that functionality?

@LordGrimmauld

Copy link
Copy Markdown
Contributor

Huh, if we can then sure!

@nyabinary

Copy link
Copy Markdown
Contributor Author

Can we get the ball rolling with this merged?

@LordGrimmauld LordGrimmauld requested a review from jtojnar April 13, 2025 20:23
@LordGrimmauld

Copy link
Copy Markdown
Contributor

I took the liberty of rebasing this to the libsoup-updates merge base for easier review - this way i get caches when building, and this is a better representative of what would happen on merge.

@grimmauld-bot

Copy link
Copy Markdown

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 395063 --package libnice --package farstream --package gst_all_1 --package gupnp-igd


aarch64-linux

✅ 37 packages built:
  • farstream
  • farstream.dev (farstream.dev.dev)
  • gst_all_1.gst-devtools
  • gst_all_1.gst-devtools.dev (gst_all_1.gst-devtools.dev.dev)
  • gst_all_1.gst-editing-services
  • gst_all_1.gst-editing-services.dev (gst_all_1.gst-editing-services.dev.dev)
  • gst_all_1.gst-libav
  • gst_all_1.gst-libav.dev (gst_all_1.gst-libav.dev.dev)
  • gst_all_1.gst-plugins-bad
  • gst_all_1.gst-plugins-bad.dev (gst_all_1.gst-plugins-bad.dev.dev)
  • gst_all_1.gst-plugins-base
  • gst_all_1.gst-plugins-base.debug (gst_all_1.gst-plugins-base.debug.debug, gst_all_1.gst-plugins-base.debug.dev)
  • gst_all_1.gst-plugins-base.dev (gst_all_1.gst-plugins-base.dev.debug, gst_all_1.gst-plugins-base.dev.dev)
  • gst_all_1.gst-plugins-good
  • gst_all_1.gst-plugins-good.dev (gst_all_1.gst-plugins-good.dev.dev)
  • gst_all_1.gst-plugins-rs
  • gst_all_1.gst-plugins-rs.dev (gst_all_1.gst-plugins-rs.dev.dev)
  • gst_all_1.gst-plugins-ugly
  • gst_all_1.gst-plugins-ugly.dev (gst_all_1.gst-plugins-ugly.dev.dev)
  • gst_all_1.gst-rtsp-server
  • gst_all_1.gst-rtsp-server.dev (gst_all_1.gst-rtsp-server.dev.dev)
  • gst_all_1.gst-vaapi
  • gst_all_1.gst-vaapi.dev (gst_all_1.gst-vaapi.dev.dev)
  • gst_all_1.gstreamer
  • gst_all_1.gstreamer.bin (gst_all_1.gstreamer.bin.bin, gst_all_1.gstreamer.bin.debug, gst_all_1.gstreamer.bin.dev)
  • gst_all_1.gstreamer.debug (gst_all_1.gstreamer.debug.bin, gst_all_1.gstreamer.debug.debug, gst_all_1.gstreamer.debug.dev)
  • gst_all_1.gstreamer.dev (gst_all_1.gstreamer.dev.bin, gst_all_1.gstreamer.dev.debug, gst_all_1.gstreamer.dev.dev)
  • gst_all_1.gstreamermm
  • gst_all_1.gstreamermm.dev (gst_all_1.gstreamermm.dev.dev)
  • gst_all_1.stdenv
  • gupnp-igd
  • gupnp-igd.dev (gupnp-igd.dev.dev, gupnp-igd.dev.devdoc)
  • gupnp-igd.devdoc (gupnp-igd.devdoc.dev, gupnp-igd.devdoc.devdoc)
  • libnice
  • libnice.bin (libnice.bin.bin, libnice.bin.dev, libnice.bin.devdoc)
  • libnice.dev (libnice.dev.bin, libnice.dev.dev, libnice.dev.devdoc)
  • libnice.devdoc (libnice.devdoc.bin, libnice.devdoc.dev, libnice.devdoc.devdoc)

@LordGrimmauld

Copy link
Copy Markdown
Contributor

Surprisingly enough, farstream does build against this version of gupnp-igd. While dropping farstream is still something we should do, this is less urgent than initially assumed.

@LordGrimmauld

Copy link
Copy Markdown
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 395063 --package farstream --package gupnp-igd --package libnice --package gst_all_1


x86_64-linux

✅ 40 packages built:
  • farstream
  • farstream.dev (farstream.dev.dev)
  • gst_all_1.gst-devtools
  • gst_all_1.gst-devtools.dev (gst_all_1.gst-devtools.dev.dev)
  • gst_all_1.gst-editing-services
  • gst_all_1.gst-editing-services.dev (gst_all_1.gst-editing-services.dev.dev)
  • gst_all_1.gst-libav
  • gst_all_1.gst-libav.dev (gst_all_1.gst-libav.dev.dev)
  • gst_all_1.gst-plugins-bad
  • gst_all_1.gst-plugins-bad.dev (gst_all_1.gst-plugins-bad.dev.dev)
  • gst_all_1.gst-plugins-base
  • gst_all_1.gst-plugins-base.debug (gst_all_1.gst-plugins-base.debug.debug, gst_all_1.gst-plugins-base.debug.dev)
  • gst_all_1.gst-plugins-base.dev (gst_all_1.gst-plugins-base.dev.debug, gst_all_1.gst-plugins-base.dev.dev)
  • gst_all_1.gst-plugins-good
  • gst_all_1.gst-plugins-good.dev (gst_all_1.gst-plugins-good.dev.dev)
  • gst_all_1.gst-plugins-rs
  • gst_all_1.gst-plugins-rs.dev (gst_all_1.gst-plugins-rs.dev.dev)
  • gst_all_1.gst-plugins-ugly
  • gst_all_1.gst-plugins-ugly.dev (gst_all_1.gst-plugins-ugly.dev.dev)
  • gst_all_1.gst-rtsp-server
  • gst_all_1.gst-rtsp-server.dev (gst_all_1.gst-rtsp-server.dev.dev)
  • gst_all_1.gst-vaapi
  • gst_all_1.gst-vaapi.dev (gst_all_1.gst-vaapi.dev.dev)
  • gst_all_1.gstreamer
  • gst_all_1.gstreamer.bin (gst_all_1.gstreamer.bin.bin, gst_all_1.gstreamer.bin.debug, gst_all_1.gstreamer.bin.dev)
  • gst_all_1.gstreamer.debug (gst_all_1.gstreamer.debug.bin, gst_all_1.gstreamer.debug.debug, gst_all_1.gstreamer.debug.dev)
  • gst_all_1.gstreamer.dev (gst_all_1.gstreamer.dev.bin, gst_all_1.gstreamer.dev.debug, gst_all_1.gstreamer.dev.dev)
  • gst_all_1.gstreamermm
  • gst_all_1.gstreamermm.dev (gst_all_1.gstreamermm.dev.dev)
  • gst_all_1.icamerasrc-ipu6
  • gst_all_1.icamerasrc-ipu6ep
  • gst_all_1.icamerasrc-ipu6epmtl
  • gst_all_1.stdenv
  • gupnp-igd
  • gupnp-igd.dev (gupnp-igd.dev.dev, gupnp-igd.dev.devdoc)
  • gupnp-igd.devdoc (gupnp-igd.devdoc.dev, gupnp-igd.devdoc.devdoc)
  • libnice
  • libnice.bin (libnice.bin.bin, libnice.bin.dev, libnice.bin.devdoc)
  • libnice.dev (libnice.dev.bin, libnice.dev.dev, libnice.dev.devdoc)
  • libnice.devdoc (libnice.devdoc.bin, libnice.devdoc.dev, libnice.devdoc.devdoc)

@LordGrimmauld LordGrimmauld left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved automatically following the successful run of nixpkgs-review.

@jtojnar

jtojnar commented Apr 15, 2025

Copy link
Copy Markdown
Member

The API has not really changed in gupnp-igd 1.6, it is just the switch to libsoup 3. So farstream itself will build when we switch both libnice and gupnp-igd to libsoup_3 at the same time. Only packages that use farstream and libsoup_2_4 (e.g. telepathy) will fail at runtime.

Could you please make a report of what depends on libsoup_2_4 and libsoup_3 in this libsoup-updates after this?

@LordGrimmauld

Copy link
Copy Markdown
Contributor

The API has not really changed in gupnp-igd 1.6, it is just the switch to libsoup 3. So farstream itself will build when we switch both libnice and gupnp-igd to libsoup_3 at the same time. Only packages that use farstream and libsoup_2_4 (e.g. telepathy) will fail at runtime.

Could you please make a report of what depends on libsoup_2_4 and libsoup_3 in this libsoup-updates after this?

Can do - now or after this is merged into libsoup-updates ?

@LordGrimmauld

Copy link
Copy Markdown
Contributor

Also: gajim detects conflicting libsoup at runtime and prints a warning in the log, disabling some features by itself. And it already does so on current master branch!

@jtojnar jtojnar merged commit 399845a into NixOS:libsoup-updates Apr 15, 2025
@nyabinary nyabinary deleted the gupnp-igd_1_6 branch April 17, 2025 15:50
@Eveeifyeve Eveeifyeve mentioned this pull request May 17, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants