Skip to content

mate.libmateweather: build against libsoup_3 - #398828

Merged
bobby285271 merged 2 commits into
NixOS:masterfrom
GrimmTheShrimp:mate_soup
Apr 19, 2025
Merged

bobby285271 merged 2 commits into
NixOS:masterfrom
GrimmTheShrimp:mate_soup

Conversation

@GrimmTheShrimp

@GrimmTheShrimp GrimmTheShrimp commented Apr 15, 2025 •

Copy link
Copy Markdown
Contributor

This applies mate-desktop/libmateweather#133 to build libmateweather against libsoup_3. The upstream PR has general approval, but was not merged: Upstream was concerned about potential packaging issues when changing external dependencies on a patch release and likely won't merge until mate 1.28 is EOL.

Part of #398783 and #360897.

The autoreconf is required because the patch changes the .ac file. The strict deps have to be dropped, but this should be fine.

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.

@GrimmTheShrimp
GrimmTheShrimp requested a review from jtojnar April 15, 2025 10:29
@github-actions github-actions Bot added the 6.topic: mate The MATE Desktop Environment label Apr 15, 2025
@GrimmTheShrimp
GrimmTheShrimp changed the base branch from master to libsoup-updates April 15, 2025 10:30
@github-actions github-actions Bot added 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Apr 15, 2025
@nix-owners
nix-owners Bot requested review from bobby285271 and romildo April 15, 2025 10:37
@grimmauld-bot

Copy link
Copy Markdown

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 398828


aarch64-linux

✅ 49 packages built:
  • blueberry
  • cinnamon-common
  • cinnamon-gsettings-overrides
  • cinnamon-screensaver
  • cinnamon-session
  • hypnotix
  • lightdm-slick-greeter
  • mate.libmateweather
  • mate.mate-applets
  • mate.mate-control-center
  • mate.mate-gsettings-overrides
  • mate.mate-indicator-applet
  • mate.mate-media
  • mate.mate-netbook
  • mate.mate-notification-daemon
  • mate.mate-panel
  • mate.mate-panel-with-applets
  • mate.mate-power-manager
  • mate.mate-screensaver
  • mate.mate-sensors-applet
  • mate.mate-session-manager
  • mate.mate-settings-daemon-wrapped
  • mate.mate-tweak
  • mate.mate-tweak.dist
  • mate.mate-utils
  • mate.mate-wayland-session
  • nemo
  • nemo-fileroller
  • nemo-preview
  • nemo-python
  • nemo-seahorse
  • nemo-with-extensions
  • nemo.dev
  • pix
  • python312Packages.python-xapp
  • python313Packages.python-xapp
  • sticky
  • themechanger
  • timeshift
  • timeshift-minimal
  • timeshift-unwrapped
  • warpinator
  • xapp
  • xapp.dev
  • xdg-desktop-portal-xapp
  • xed-editor
  • xmonad_log_applet_mate
  • xreader
  • xviewer

@GrimmTheShrimp

GrimmTheShrimp commented Apr 15, 2025 •

Copy link
Copy Markdown
Contributor Author

Also potentially problematic: the mate nixos test failed when i tried earlier, checking that one again.
I believe this was caused due to symbol collisions as i didn't have this PR based on the other commits in libsoup-updates at first.

@GrimmTheShrimp
GrimmTheShrimp force-pushed the mate_soup branch 2 times, most recently from 9cf9c5b to 5534368 Compare April 15, 2025 12:08
@GrimmTheShrimp

GrimmTheShrimp commented Apr 15, 2025 •

Copy link
Copy Markdown
Contributor Author

Huh, apparently github eval action doesn't like the libsoup-updates branch, but i don't think i was the one to break it?

@GrimmTheShrimp

This comment was marked as resolved.

@GrimmTheShrimp

This comment was marked as off-topic.

@GrimmTheShrimp

GrimmTheShrimp commented Apr 15, 2025 •

Copy link
Copy Markdown
Contributor Author

Ok no, i checked, it turns out the test is just super flaky because it relies on timing. Ugh. I did have it succeed once.

@bobby285271

bobby285271 commented Apr 15, 2025 •

Copy link
Copy Markdown
Member

nixosTests.mate{,-wayland} cannot really test functionality of this package.

I got a crash when testing this 🙃

@GrimmTheShrimp

Copy link
Copy Markdown
Contributor Author

Uh oh... I suppose i'll be drafting this until there is more info (either upstream or here)

@GrimmTheShrimp
GrimmTheShrimp marked this pull request as draft April 15, 2025 17:43
@GrimmTheShrimp

Copy link
Copy Markdown
Contributor Author

https://src.fedoraproject.org/rpms/libmateweather/blob/rawhide/f/libmateweather.spec
Fedora runs libsoup_3 mostly, yet their libmateweather runs on libsoup_2 and it seems to work fine - we might not actually have to bump this here. I need to do some more testing...

@GrimmTheShrimp

Copy link
Copy Markdown
Contributor Author

I have added the fix in the upstream PR, but i have yet to test correct functionality myself

@GrimmTheShrimp

Copy link
Copy Markdown
Contributor Author

I was testing this in a VM and the weather applet complains about not being able to find the location xml database file, both with this PR and nixos-unstable - what am i doing wrong?

@bobby285271

bobby285271 commented Apr 18, 2025 •

Copy link
Copy Markdown
Member

Yeah that will likely be a separate issue and a quick guess is we probably need GNOME/libxml2@ee1a43d for DTD content, if you are around you can try if system.replaceDependencies.replacements with #399595 helps (or I guess I will try that this weekend). Actually the DTD contents are used to generated the Location files, so they are used in build time and not runtime.

@GrimmTheShrimp

GrimmTheShrimp commented Apr 18, 2025 •

Copy link
Copy Markdown
Contributor Author

As far as i can tell its not a parser fail but instead the location isn't being picked up. I suspect datadir is not being set correctly. But i will try the XML thing too, after all that too is my PR XD

@bobby285271

Copy link
Copy Markdown
Member

The Locations files are searched via MATEWEATHER_XML_LOCATION_DIR, which is pkgdatadir. I did try patching libmateweather to print its value and I don't expect this incorrect, unfortunately I don't really use this applet and don't know when exactly this starts to break. I can only say it works in 2023 🙃

@GrimmTheShrimp

GrimmTheShrimp commented Apr 18, 2025 •

Copy link
Copy Markdown
Contributor Author

Hmm, neither replaceDeps nor an override to libxml2works, even when setting --datadir.
I am very confused.

@GrimmTheShrimp

Copy link
Copy Markdown
Contributor Author

@GrimmTheShrimp

Copy link
Copy Markdown
Contributor Author

I GOT IT! Trying to nail it down which of my many changes did it, but i can set a location:
image

@GrimmTheShrimp
GrimmTheShrimp force-pushed the mate_soup branch 2 times, most recently from 53b2a69 to 40c6d61 Compare April 18, 2025 14:18
@GrimmTheShrimp

Copy link
Copy Markdown
Contributor Author

Testing done:

  • built on x86_64-linux and aarch64-linux
  • nixpkgs-review on aarch64-linux
  • built a VM with this
  • tested the mate weather applet (works, see screenshots)
    image
    image

The problems with setting locations was fixed by disabling location compression. Fedora does this too, arch does not - but i suspect the arch lib is broken too, i didn't test that one.

No crashes and seems to work. I declare this ready, to the best of my abilities.

Test VM:
Built with nix-build '<nixpkgs/nixos>' -A vm -I nixpkgs=/home/grimmauld/coding/nixpkgs -I nixos-config=./configuration.nix

{
  pkgs,
  ...
}:

{
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  users.users.grimmauld = {
    isNormalUser = true;
    extraGroups = [ "wheel" ];
    initialPassword = "1234";
  };

  imports = [ <nixpkgs/nixos/modules/virtualisation/qemu-vm.nix> ];
  virtualisation.qemu.options = [
    "-device virtio-vga"
  ];
  virtualisation.graphics = true;
  services.xserver.enable = true;

  services.xserver.displayManager = {
    lightdm.enable = true;
    autoLogin = {
      enable = true;
      user = "grimmauld";
    };
  };

  services.xserver.desktopManager.mate = {
    enable = true;
    extraPanelApplets = with pkgs.mate; [ mate-applets ];
  };
  networking.hostName = "nixos-vm";
  time.timeZone = "Europe/Amsterdam";
  system.stateVersion = "24.11";
}

@GrimmTheShrimp
GrimmTheShrimp marked this pull request as ready for review April 18, 2025 14:24
@bobby285271

Copy link
Copy Markdown
Member

The problems with setting locations was fixed by disabling location compression.

Thanks for the pointer, so I guess the actual cause is we do not build libxml2 with legacy support: GNOME/libxml2@f7f1453.

Can we probably target this PR to master? (I want the second commit land faster)

@GrimmTheShrimp

Copy link
Copy Markdown
Contributor Author

We can, but i'll have to check whether the libsoup change doesn't cause accidential crashes because of symbol collision. This was targetted against libsoup-updates to not break that way. The manual VM test should catch that, but rn all my build machines are busy. Give me a bit.

@GrimmTheShrimp
GrimmTheShrimp changed the base branch from libsoup-updates to master April 18, 2025 15:40
@GrimmTheShrimp

Copy link
Copy Markdown
Contributor Author

Alright, i tested, this does not just crash outright, even without the other libsoup changes missing. So this is good to go into master.

@GrimmTheShrimp

Copy link
Copy Markdown
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 398828


x86_64-linux

✅ 49 packages built:
  • blueberry
  • cinnamon-common
  • cinnamon-gsettings-overrides
  • cinnamon-screensaver
  • cinnamon-session
  • hypnotix
  • lightdm-slick-greeter
  • mate.libmateweather
  • mate.mate-applets
  • mate.mate-control-center
  • mate.mate-gsettings-overrides
  • mate.mate-indicator-applet
  • mate.mate-media
  • mate.mate-netbook
  • mate.mate-notification-daemon
  • mate.mate-panel
  • mate.mate-panel-with-applets
  • mate.mate-power-manager
  • mate.mate-screensaver
  • mate.mate-sensors-applet
  • mate.mate-session-manager
  • mate.mate-settings-daemon-wrapped
  • mate.mate-tweak
  • mate.mate-tweak.dist
  • mate.mate-utils
  • mate.mate-wayland-session
  • nemo
  • nemo-fileroller
  • nemo-preview
  • nemo-python
  • nemo-seahorse
  • nemo-with-extensions
  • nemo.dev
  • pix
  • python312Packages.python-xapp
  • python313Packages.python-xapp
  • sticky
  • themechanger
  • timeshift
  • timeshift-minimal
  • timeshift-unwrapped
  • warpinator
  • xapp
  • xapp.dev
  • xdg-desktop-portal-xapp
  • xed-editor
  • xmonad_log_applet_mate
  • xreader
  • xviewer

@bobby285271

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: mate The MATE Desktop Environment 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants