Merge pull request #282929 from minijackson/netbox-3.7.1

Netbox 3.7.1
This commit is contained in:
Ryan Lahfa 2024-01-22 20:52:54 +01:00 committed by GitHub
commit 32a6e224ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 53 additions and 28 deletions

View file

@ -143,6 +143,13 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
`CONFIG_FILE_NAME` includes `bpf_pinning`, `ematch_map`, `group`, `nl_protos`, `rt_dsfield`, `rt_protos`, `rt_realms`, `rt_scopes`, and `rt_tables`.
- `netbox` was updated to v3.7. `services.netbox.package` still defaults
to v3.6 if `stateVersion` is earlier than 24.05. Refer to upstream's breaking
changes [for
v3.7.0](https://github.com/netbox-community/netbox/releases/tag/v3.7.0) and
upgrade NetBox by changing `services.netbox.package`. Database migrations
will be run automatically.
- The executable file names for `firefox-devedition`, `firefox-beta`, `firefox-esr` now matches their package names, which is consistent with the `firefox-*-bin` packages. The desktop entries are also updated so that you can have multiple editions of firefox in your app launcher.
- switch-to-configuration does not directly call systemd-tmpfiles anymore.

View file

@ -75,13 +75,17 @@ in {
package = lib.mkOption {
type = lib.types.package;
default =
if lib.versionAtLeast config.system.stateVersion "23.11"
if lib.versionAtLeast config.system.stateVersion "24.05"
then pkgs.netbox_3_7
else if lib.versionAtLeast config.system.stateVersion "23.11"
then pkgs.netbox_3_6
else if lib.versionAtLeast config.system.stateVersion "23.05"
then pkgs.netbox_3_5
else pkgs.netbox_3_3;
defaultText = lib.literalExpression ''
if lib.versionAtLeast config.system.stateVersion "23.11"
if lib.versionAtLeast config.system.stateVersion "24.05"
then pkgs.netbox_3_7
else if lib.versionAtLeast config.system.stateVersion "23.11"
then pkgs.netbox_3_6
else if lib.versionAtLeast config.system.stateVersion "23.05"
then pkgs.netbox_3_5
@ -306,12 +310,13 @@ in {
${pkg}/bin/netbox trace_paths --no-input
${pkg}/bin/netbox collectstatic --no-input
${pkg}/bin/netbox remove_stale_contenttypes --no-input
# TODO: remove the condition when we remove netbox_3_3
${lib.optionalString
(lib.versionAtLeast cfg.package.version "3.5.0")
"${pkg}/bin/netbox reindex --lazy"}
${pkg}/bin/netbox reindex --lazy
${pkg}/bin/netbox clearsessions
${pkg}/bin/netbox clearcache
${lib.optionalString
# The clearcache command was removed in 3.7.0:
# https://github.com/netbox-community/netbox/issues/14458
(lib.versionOlder cfg.package.version "3.7.0")
"${pkg}/bin/netbox clearcache"}
echo "${cfg.package.version}" > "$versionFile"
'';

View file

@ -572,8 +572,8 @@ in {
netdata = handleTest ./netdata.nix {};
networking.networkd = handleTest ./networking.nix { networkd = true; };
networking.scripted = handleTest ./networking.nix { networkd = false; };
netbox_3_5 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_5; };
netbox_3_6 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_6; };
netbox_3_7 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_7; };
netbox-upgrade = handleTest ./web-apps/netbox-upgrade.nix {};
# TODO: put in networking.nix after the test becomes more complete
networkingProxy = handleTest ./networking-proxy.nix {};

View file

@ -1,6 +1,6 @@
import ../make-test-python.nix ({ lib, pkgs, ... }: let
oldNetbox = pkgs.netbox_3_5;
newNetbox = pkgs.netbox_3_6;
oldNetbox = pkgs.netbox_3_6;
newNetbox = pkgs.netbox_3_7;
in {
name = "netbox-upgrade";

View file

@ -3,23 +3,7 @@ let
generic = import ./generic.nix;
in
lib.fix (self: {
netbox = self.netbox_3_6;
netbox_3_5 = callPackage generic {
version = "3.5.9";
hash = "sha256-CJbcuCyTuihDXrObSGyJi2XF+zgWAwcJzjxtkX8pmKs=";
extraPatches = [
# Allow setting the STATIC_ROOT from within the configuration and setting a custom redis URL
./config.patch
];
tests = {
netbox = nixosTests.netbox_3_5;
inherit (nixosTests) netbox-upgrade;
};
maintainers = with lib.maintainers; [ minijackson n0emis raitobezarius ];
eol = true;
};
netbox = self.netbox_3_7;
netbox_3_6 = callPackage generic {
version = "3.6.9";
@ -33,6 +17,23 @@ lib.fix (self: {
inherit (nixosTests) netbox-upgrade;
};
maintainers = with lib.maintainers; [ minijackson n0emis raitobezarius ];
eol = true;
};
netbox_3_7 = callPackage generic {
version = "3.7.1";
hash = "sha256-hAwkrrjrV+XVIYe3C8f/342SPlllXUhiFuaAp+TLMUw=";
extraPatches = [
# Allow setting the STATIC_ROOT from within the configuration and setting a custom redis URL
./config.patch
./fix-doc-link.patch
];
tests = {
netbox = nixosTests.netbox_3_7;
inherit (nixosTests) netbox-upgrade;
};
maintainers = with lib.maintainers; [ minijackson n0emis raitobezarius ];
};
})

View file

@ -0,0 +1,10 @@
diff --git a/docs/plugins/development/data-backends.md b/docs/plugins/development/data-backends.md
index feffa5bed..8b7226a41 100644
--- a/docs/plugins/development/data-backends.md
+++ b/docs/plugins/development/data-backends.md
@@ -20,4 +20,4 @@ backends = [MyDataBackend]
!!! tip
The path to the list of search indexes can be modified by setting `data_backends` in the PluginConfig instance.
-::: core.data_backends.DataBackend
+::: netbox.data_backends.DataBackend

View file

@ -58,6 +58,7 @@
pillow
psycopg2
pyyaml
requests
sentry-sdk
social-auth-core
social-auth-app-django

View file

@ -683,6 +683,7 @@ mapAliases ({
net_snmp = throw "'net_snmp' has been renamed to/replaced by 'net-snmp'"; # Converted to throw 2023-09-10
netbox_3_3 = throw "netbox 3.3 series has been removed as it was EOL"; # Added 2023-09-02
netbox_3_5 = throw "netbox 3.5 series has been removed as it was EOL"; # Added 2024-01-22
nextcloud25 = throw ''
Nextcloud v25 has been removed from `nixpkgs` as the support for is dropped
by upstream in 2023-10. Please upgrade to at least Nextcloud v26 by declaring

View file

@ -11133,7 +11133,7 @@ with pkgs;
netbootxyz-efi = callPackage ../tools/misc/netbootxyz-efi { };
inherit (callPackage ../servers/web-apps/netbox { })
netbox netbox_3_5 netbox_3_6;
netbox netbox_3_6 netbox_3_7;
netbox2netshot = callPackage ../tools/admin/netbox2netshot { };