Skip to content

Port to libsoup-3.0#133

Merged
lukefromdc merged 1 commit into
mate-desktop:masterfrom
sgn:libsoup-3.0
Jul 25, 2025
Merged

Port to libsoup-3.0#133
lukefromdc merged 1 commit into
mate-desktop:masterfrom
sgn:libsoup-3.0

Conversation

@sgn
Copy link
Copy Markdown
Contributor

@sgn sgn commented Mar 4, 2024

Fixes: #116

@sgn sgn force-pushed the libsoup-3.0 branch 3 times, most recently from b1fe9cb to 2263bc6 Compare March 5, 2024 07:21
Copy link
Copy Markdown
Member

@lukefromdc lukefromdc left a comment

Choose a reason for hiding this comment

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

This builds and runs, both the clock/calendar and panel weather applet work fine with it installed. That said at least on my machine I still have a lot of other things depending on the old version, but this is one less.

@lukefromdc lukefromdc requested a review from a team March 6, 2024 19:16
@lukefromdc
Copy link
Copy Markdown
Member

One possible issue here: we just released 1.28 and probably cannot change external dependencies like this within 1.28 and thus probably cannot do this without bumping version to 1.29

Comment thread libmateweather/weather.c
@bgermann
Copy link
Copy Markdown

bgermann commented Apr 4, 2025

Fixes #116

@nyabinary
Copy link
Copy Markdown

Also fixes NixOS stuff (were trying to phase out libsoup2)

Comment thread libmateweather/weather-metar.c Outdated
@lukefromdc
Copy link
Copy Markdown
Member

Is this for a 1.29 development release or are we planning to change external dependencies in the middle of a major version (1.28)?

@sgn
Copy link
Copy Markdown
Contributor Author

sgn commented Apr 23, 2025

Is this for a 1.29 development release or are we planning to change external dependencies in the middle of a major version (1.28)?

It's entirely upto Mate, as of it is, only Void and Nix uses this patch for libsoup-3.0, all other distro still uses libsoup-2.4 for libmateweather.

While we will have a crash if an application linked to both libsoup-2.4 and libsoup-3.0 (via middle-man libraries). I think it's very unlikely to have such application linked to libmateweather, because libmateweather (in my opinion) would be used exclusively by MATE desktop only, other applications (or libraries) would use libgweather instead.

Hence, while I would like to have this patch in as soon as possible, I think you can keep it for 1.29

@sgn
Copy link
Copy Markdown
Contributor Author

sgn commented Apr 23, 2025

Anyway, just want to remind that we still have a potential crash with libsoup-2.4 implementation.
#133 (comment)

Step to reproduce:

  • Enable weather applets (from mate-applets repository)
  • Switch to Location tab
  • Quickly find and switch multiple Location by Find textbox (e.g. type Paris, London, Ho Chi Minh).
  • It will crash

@LordGrimmauld
Copy link
Copy Markdown

While we will have a crash if an application linked to both libsoup-2.4 and libsoup-3.0 (via middle-man libraries). I think it's very unlikely to have such application linked to libmateweather, because libmateweather (in my opinion) would be used exclusively by MATE desktop only, other applications (or libraries) would use libgweather instead.

libsoup is a deep-rooted dependency, and on nix it makes its way into the closures via gstreamer. gst-plugins-bad has a dependency on libnice which in turn depends on gupnp and that depends on libsoup. It is technically thinkable an application using both gst and mateweather would crash. On nix we circumvent this problem by also patching libnice to work with gupnp 1.6 (not yet merged, but will happen soon:tm:).

Fedora has a similar patch to libnice since 2022: https://src.fedoraproject.org/rpms/libnice/blob/rawhide/f/libnice.spec#_147
This means anything that crashes with new libmateweather+old libnice in gst would have crashed before with old libmateweather and new libnice. Arguably the impact here should be minimal. That said, fedora is typically quite quick to patch things to use newer libraries.

@procule
Copy link
Copy Markdown

procule commented Apr 28, 2025

I said it here it was old (even older than my setup :-) ):
#131 (comment)

@lukefromdc
Copy link
Copy Markdown
Member

I basically don't know enough about this to properly evaluate it

@sgn
Copy link
Copy Markdown
Contributor Author

sgn commented Jun 27, 2025

I basically don't know enough about this to properly evaluate it

I would say, at the very least, you can merge it in for 1.29 first, and evaluate if it would be good for 1.28 later, which we can do the backport to 1.28.

@lukefromdc
Copy link
Copy Markdown
Member

Just bumped version in master to accomodate this

@lukefromdc
Copy link
Copy Markdown
Member

While we will have a crash if an application linked to both libsoup-2.4 and libsoup-3.0 (via middle-man libraries). I think it's very unlikely to have such application linked to libmateweather, because libmateweather (in my opinion) would be used exclusively by MATE desktop only, other applications (or libraries) would use libgweather instead.

libsoup is a deep-rooted dependency, and on nix it makes its way into the closures via gstreamer. gst-plugins-bad has a dependency on libnice which in turn depends on gupnp and that depends on libsoup. It is technically thinkable an application using both gst and mateweather would crash. On nix we circumvent this problem by also patching libnice to work with gupnp 1.6 (not yet merged, but will happen soon:tm:).

Fedora has a similar patch to libnice since 2022: https://src.fedoraproject.org/rpms/libnice/blob/rawhide/f/libnice.spec#_147 This means anything that crashes with new libmateweather+old libnice in gst would have crashed before with old libmateweather and new libnice. Arguably the impact here should be minimal. That said, fedora is typically quite quick to patch things to use newer libraries.

Is this something we need to do something about here or can this be merged after a rebase to catch the version bump?

Copy link
Copy Markdown
Member

@vkareh vkareh left a comment

Choose a reason for hiding this comment

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

I just tested this and it works perfectly fine with both the mateweather applet and the clock applet (the only components that use this lib, AFAIK). We should merge and backport as needed (assuming that's even necessary)

@vkareh
Copy link
Copy Markdown
Member

vkareh commented Jul 24, 2025

To be fair, we should eventually deprecate libmateweather in favor of libgweather, since pretty much all its functionality is duplicated. There's an initial attempt at this: mate-desktop/mate-panel#1075

That's for a separate discussion though. Updating to libsoup3 is legitimately a good thing.

@LordGrimmauld
Copy link
Copy Markdown

LordGrimmauld commented Jul 24, 2025

Fwiw i went and actually took a look at just how many CVEs are left in libsoup 2.x. Warning: It ain't pretty.
NixOS/nixpkgs#427813 (comment)

With this many CVEs, there isn't any real chance for NixOS to go back to libsoup 2.x, and i suspect various other distros might follow. Even debian started patching to libsoup3, see https://salsa.debian.org/debian-mate-team/libmateweather/-/blob/master/debian/patches/0001_libsoup3.patch?ref_type=heads.

@lukefromdc lukefromdc merged commit c1c54a1 into mate-desktop:master Jul 25, 2025
@lukefromdc
Copy link
Copy Markdown
Member

I have no problem with a cherrypick to 1.28, will distros have an issue with the dependency change?

ChaseKnowlden added a commit to ChaseKnowlden/gentoo that referenced this pull request Oct 9, 2025
The libsoup3 patch was made by sgn at mate-desktop/libmateweather#133

Closes: https://bugs.gentoo.org/963917
Signed-off-by: ChaseKnowlden <haroldknowlden@gmail.com>
ChaseKnowlden added a commit to ChaseKnowlden/gentoo that referenced this pull request Oct 10, 2025
The libsoup3 patch was made by sgn at mate-desktop/libmateweather#133

Closes: https://bugs.gentoo.org/963917
Signed-off-by: ChaseKnowlden <haroldknowlden@gmail.com>
gentoo-bot pushed a commit to gentoo/gentoo that referenced this pull request Oct 18, 2025
The libsoup3 patch was made by sgn at mate-desktop/libmateweather#133.

Closes: https://bugs.gentoo.org/963917
Signed-off-by: ChaseKnowlden <haroldknowlden@gmail.com>
Part-of: #44117
Closes: #44117
Signed-off-by: Sam James <sam@gentoo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port to libsoup 3

8 participants