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

sonarr: upgrade to dotnet 8 and 4.0.11.2680 -> 4.0.12.2823 #380045

Merged
merged 6 commits into from
Feb 8, 2025

Conversation

niklaskorz
Copy link
Contributor

@niklaskorz niklaskorz commented Feb 7, 2025

Fixes #360592

This applies the patches from Sonarr/Sonarr#7443, which was only merged into the sonarr v5 branch but happens to cleanly apply to v4 as well.
As fetchYarnDeps needs access to the lockfile inside the source, and the pull request happened to update yarn.lock, I had to introduce applyPatches to the src.
I also made sure the update script stays compatible by passing the patched source directory to prefetch-yarn-deps.

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.

@niklaskorz
Copy link
Contributor Author

niklaskorz commented Feb 7, 2025

Build seems to be failing on darwin, will investigate what's up with that.

Edit: Disabled the failing test NzbDrone.Common.Test.ServiceFactoryFixture.event_handlers_should_be_unique on darwin. It fails with

Access to the path /var/empty/Library/Application Support/Sonarr is denied

which unfortunately doesn't seem to be fixed by writableTmpDirAsHomeHook.

@niklaskorz
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 380045


x86_64-darwin

✅ 1 package built:
  • sonarr

aarch64-darwin

✅ 1 package built:
  • sonarr

@niklaskorz
Copy link
Contributor Author

Running fine so far on my Raspberry Pi 4:

grafik

Copy link
Member

@purcell purcell left a comment

Choose a reason for hiding this comment

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

Hah, nice, thanks — I spent a few minutes this morning trying to find an upstream PR that might have fixed things for dotnet 8, but in the end I worried that further libraries would need patching too.

Seems reasonable to disable that additional test on MacOS.

@purcell
Copy link
Member

purcell commented Feb 7, 2025

Would you consider adding yourself as a maintainer in this PR?

Copy link
Member

@tie tie left a comment

Choose a reason for hiding this comment

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

Didn’t test the PR on my Sonarr instance yet, but otherwise LGTM with some minor changes 👍

@niklaskorz niklaskorz force-pushed the sonarr-dotnet8 branch 2 times, most recently from fc525bc to 9ff93b6 Compare February 7, 2025 19:58
@kevincox
Copy link
Contributor

kevincox commented Feb 8, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 380045 --checkout commit


x86_64-linux

✅ 1 package built:
  • sonarr

@tie tie added the backport release-24.11 Backport PR automatically label Feb 8, 2025
@tie
Copy link
Member

tie commented Feb 8, 2025

Seems to be working fine on 24.11 stable branch using an overlay. Added backport tag.

diff --git a/flake.nix b/flake.nix
index 1cf1dcc..96ed00e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,6 +4,9 @@
   inputs = {
     nixpkgs.url = "nixpkgs/nixos-24.11";
 
+    nixpkgs-sonarr-dotnet8.url = "github:niklaskorz/nixpkgs/sonarr-dotnet8";
+    nixpkgs-sonarr-dotnet8.flake = false;
+
     flake-parts.url = "flake-parts";
     flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
 
diff --git a/nixpkgs.nix b/nixpkgs.nix
index e8cfa01..d70169d 100644
--- a/nixpkgs.nix
+++ b/nixpkgs.nix
@@ -13,6 +13,11 @@
           inputs.btrfs-rollback.overlays.default
           (import ./overlays/java-wrappers.nix)
           (import ./overlays/mcactivity.nix)
+          (final: _: {
+            sonarr = final.callPackage (
+              inputs.nixpkgs-sonarr-dotnet8.outPath + "/pkgs/by-name/so/sonarr/package.nix"
+            ) { };
+          })
         ];
 
         config.allowUnfreePredicate =
@@ -26,15 +31,6 @@
             };
           in
           pkg: builtins.hasAttr (lib.getName pkg) allowUnfree;
-
-        # Sonarr uses .NET 6 that is EOL.
-        # https://github.com/NixOS/nixpkgs/issues/360592
-        config.permittedInsecurePackages = [
-          "aspnetcore-runtime-6.0.36"
-          "aspnetcore-runtime-wrapped-6.0.36"
-          "dotnet-sdk-6.0.428"
-          "dotnet-sdk-wrapped-6.0.428"
-        ];
       };
 
       nixpkgsFun = newArgs: import inputs.nixpkgs (nixpkgsArgs // newArgs);

@tie
Copy link
Member

tie commented Feb 8, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 380045 --checkout commit


aarch64-linux

✅ 1 package built:
  • sonarr

@tie tie added 12.approvals: 3+ This PR was reviewed and approved by three or more reputable people 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package labels Feb 8, 2025
@kevincox
Copy link
Contributor

kevincox commented Feb 8, 2025

@niklaskorz anything blocking merge?

@niklaskorz
Copy link
Contributor Author

@niklaskorz anything blocking merge?

All good to go from my side

@kevincox kevincox merged commit 06f9bc9 into NixOS:master Feb 8, 2025
29 of 30 checks passed
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Feb 8, 2025

Backport failed for release-24.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-24.11
git worktree add -d .worktree/backport-380045-to-release-24.11 origin/release-24.11
cd .worktree/backport-380045-to-release-24.11
git switch --create backport-380045-to-release-24.11
git cherry-pick -x 8a73d99096c927dd9baae07f27c02b55c33e48fd 16e717892acca7f7782e46021e7c9af2c8d83464 5e864681f40ef505d1e238ba390dc39bfea6a49a 31382adf95f88502f0ceddd88dab56a98dbd887c e93c5752112cfba450faa683c8c73942fbccc008 e16a609fa71d4c8a5263e9d34f952b48b347fa69

@tie
Copy link
Member

tie commented Feb 8, 2025

Backport failed for release-24.11, because it was unable to cherry-pick the commit(s).

I can create backport tomorrow manually if nobody does that before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 12.approvals: 3+ This PR was reviewed and approved by three or more reputable people 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package backport release-24.11 Backport PR automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failure: sonarr
5 participants