Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

netbox_4_2: init (#376100)

authored by

Sandro and committed by
GitHub
48ecb730 f9ead9c4

+16 -92
+7
doc/release-notes/rl-2505.section.md
··· 26 26 It should generally be replaced with `rustPlatform.fetchCargoVendor`, but `rustPlatform.importCargoLock` may also be appropriate in some circumstances. 27 27 `rustPlatform.buildRustPackage` users must set `useFetchCargoVendor` to `true` and regenerate the `cargoHash`. 28 28 29 + - NetBox was updated to `>= 4.2.0`. Have a look at the breaking changes 30 + of the [4.1 release](https://github.com/netbox-community/netbox/releases/tag/v4.1.0) 31 + and the [4.2 release](https://github.com/netbox-community/netbox/releases/tag/v4.2.0), 32 + make the required changes to your database, if needed, then upgrade by setting `services.netbox.package = pkgs.netbox_4_2;` in your configuration. 33 + 34 + - NetBox version 4.0.X available as `netbox_4_0` was removed. Please upgrade to `4.2`. 35 + 29 36 - Default ICU version updated from 74 to 76 30 37 31 38 <!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
+3 -1
nixos/modules/services/web-apps/netbox.nix
··· 102 102 package = lib.mkOption { 103 103 type = lib.types.package; 104 104 default = 105 - if lib.versionAtLeast config.system.stateVersion "24.11" then 105 + if lib.versionAtLeast config.system.stateVersion "25.05" then 106 + pkgs.netbox_4_2 107 + else if lib.versionAtLeast config.system.stateVersion "24.11" then 106 108 pkgs.netbox_4_1 107 109 else if lib.versionAtLeast config.system.stateVersion "24.05" then 108 110 pkgs.netbox_3_7
+1 -1
nixos/tests/all-tests.nix
··· 736 736 networking.networkmanager = handleTest ./networking/networkmanager.nix {}; 737 737 netbox_3_6 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_6; }; 738 738 netbox_3_7 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_7; }; 739 - netbox_4_0 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_4_0; }; 740 739 netbox_4_1 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_4_1; }; 740 + netbox_4_2 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_4_2; }; 741 741 netbox-upgrade = handleTest ./web-apps/netbox-upgrade.nix {}; 742 742 # TODO: put in networking.nix after the test becomes more complete 743 743 networkingProxy = handleTest ./networking-proxy.nix {};
pkgs/by-name/ne/netbox_4_0/custom-static-root.patch pkgs/by-name/ne/netbox_4_2/custom-static-root.patch
-81
pkgs/by-name/ne/netbox_4_0/django-5.1.patch
··· 1 - diff --git a/netbox/extras/forms/bulk_import.py b/netbox/extras/forms/bulk_import.py 2 - index f2cf0b721..a17b6712d 100644 3 - --- a/netbox/extras/forms/bulk_import.py 4 - +++ b/netbox/extras/forms/bulk_import.py 5 - @@ -194,7 +194,7 @@ class Meta: 6 - model = EventRule 7 - fields = ( 8 - 'name', 'description', 'enabled', 'conditions', 'object_types', 'type_create', 'type_update', 9 - - 'type_delete', 'type_job_start', 'type_job_end', 'action_type', 'action_object', 'comments', 'tags' 10 - + 'type_delete', 'type_job_start', 'type_job_end', 'action_type', 'comments', 'tags' 11 - ) 12 - 13 - def clean(self): 14 - diff --git a/netbox/extras/migrations/0002_squashed_0059.py b/netbox/extras/migrations/0002_squashed_0059.py 15 - index 98bed255a..a403a0e19 100644 16 - --- a/netbox/extras/migrations/0002_squashed_0059.py 17 - +++ b/netbox/extras/migrations/0002_squashed_0059.py 18 - @@ -131,10 +131,6 @@ class Migration(migrations.Migration): 19 - name='webhook', 20 - unique_together={('payload_url', 'type_create', 'type_update', 'type_delete')}, 21 - ), 22 - - migrations.AlterIndexTogether( 23 - - name='taggeditem', 24 - - index_together={('content_type', 'object_id')}, 25 - - ), 26 - migrations.AlterUniqueTogether( 27 - name='exporttemplate', 28 - unique_together={('content_type', 'name')}, 29 - diff --git a/netbox/extras/migrations/0087_squashed_0098.py b/netbox/extras/migrations/0087_squashed_0098.py 30 - index 55f276ecd..bbe7f79f5 100644 31 - --- a/netbox/extras/migrations/0087_squashed_0098.py 32 - +++ b/netbox/extras/migrations/0087_squashed_0098.py 33 - @@ -98,10 +98,9 @@ class Migration(migrations.Migration): 34 - name='object_types', 35 - field=models.ManyToManyField(blank=True, related_name='+', to='contenttypes.contenttype'), 36 - ), 37 - - migrations.RenameIndex( 38 - + migrations.AddIndex( 39 - model_name='taggeditem', 40 - - new_name='extras_tagg_content_717743_idx', 41 - - old_fields=('content_type', 'object_id'), 42 - + index=models.Index(fields=['content_type', 'object_id'], name='extras_tagg_content_717743_idx'), 43 - ), 44 - migrations.CreateModel( 45 - name='Bookmark', 46 - diff --git a/netbox/ipam/forms/model_forms.py b/netbox/ipam/forms/model_forms.py 47 - index f5e3bca30..4f96bac71 100644 48 - --- a/netbox/ipam/forms/model_forms.py 49 - +++ b/netbox/ipam/forms/model_forms.py 50 - @@ -588,7 +588,7 @@ class VLANGroupForm(NetBoxModelForm): 51 - class Meta: 52 - model = VLANGroup 53 - fields = [ 54 - - 'name', 'slug', 'description', 'min_vid', 'max_vid', 'scope_type', 'scope', 'tags', 55 - + 'name', 'slug', 'description', 'min_vid', 'max_vid', 'scope_type', 'tags', 56 - ] 57 - 58 - def __init__(self, *args, **kwargs): 59 - diff --git a/netbox/vpn/forms/model_forms.py b/netbox/vpn/forms/model_forms.py 60 - index a17ca9a5e..dee98afd3 100644 61 - --- a/netbox/vpn/forms/model_forms.py 62 - +++ b/netbox/vpn/forms/model_forms.py 63 - @@ -258,7 +258,7 @@ class TunnelTerminationForm(NetBoxModelForm): 64 - class Meta: 65 - model = TunnelTermination 66 - fields = [ 67 - - 'tunnel', 'role', 'termination', 'outside_ip', 'tags', 68 - + 'tunnel', 'role', 'outside_ip', 'tags', 69 - ] 70 - 71 - def __init__(self, *args, initial=None, **kwargs): 72 - diff --git a/requirements.txt b/requirements.txt 73 - index 09f23871c..57f167dae 100644 74 - --- a/requirements.txt 75 - +++ b/requirements.txt 76 - @@ -1,4 +1,4 @@ 77 - -Django==5.0.9 78 - +Django==5.1.2 79 - django-cors-headers==4.4.0 80 - django-debug-toolbar==4.4.6 81 - django-filter==24.2
+4 -8
pkgs/by-name/ne/netbox_4_0/package.nix pkgs/by-name/ne/netbox_4_2/package.nix
··· 14 14 in 15 15 py.pkgs.buildPythonApplication rec { 16 16 pname = "netbox"; 17 - version = "4.0.11"; 17 + version = "4.2.3"; 18 18 19 19 format = "other"; 20 20 ··· 22 22 owner = "netbox-community"; 23 23 repo = "netbox"; 24 24 tag = "v${version}"; 25 - hash = "sha256-0yEz7v5RL1+cqbGDyuyEsywFonJQfPdVIQdL0qLyc04="; 25 + hash = "sha256-vdH/R88Vtu+xRLjETK0h+E4WoYRoseP0r+wROi8nMcM="; 26 26 }; 27 27 28 28 patches = [ 29 29 ./custom-static-root.patch 30 - # From https://github.com/netbox-community/netbox/pull/17620 31 - ./django-5.1.patch 32 30 ]; 33 31 34 32 propagatedBuildInputs = ··· 111 109 pythonPath = py.pkgs.makePythonPath propagatedBuildInputs; 112 110 inherit (py.pkgs) gunicorn; 113 111 tests = { 114 - netbox = nixosTests.netbox_4_0; 112 + netbox = nixosTests.netbox_4_2; 113 + inherit (nixosTests) netbox-upgrade; 115 114 }; 116 115 }; 117 116 ··· 123 122 maintainers = with lib.maintainers; [ 124 123 minijackson 125 124 raitobezarius 126 - ]; 127 - knownVulnerabilities = [ 128 - "Netbox version ${version} is EOL; please upgrade by following the current release notes instructions." 129 125 ]; 130 126 }; 131 127 }
+1 -1
pkgs/top-level/all-packages.nix
··· 4258 4258 inherit (callPackage ../servers/web-apps/netbox { }) netbox_3_7; 4259 4259 4260 4260 # Not in aliases because it wouldn't get picked up by callPackage 4261 - netbox = netbox_4_1; 4261 + netbox = netbox_4_2; 4262 4262 4263 4263 netcat = libressl.nc.overrideAttrs (old: { 4264 4264 meta = old.meta // {