diff --git a/net-mgmt/netbox/Makefile b/net-mgmt/netbox/Makefile index 00b89dccc539..90b01df0b0e5 100644 --- a/net-mgmt/netbox/Makefile +++ b/net-mgmt/netbox/Makefile @@ -1,119 +1,120 @@ PORTNAME= netbox DISTVERSIONPREFIX= v -DISTVERSION= 4.5.10 -PORTREVISION= 2 +DISTVERSION= 4.6.3 CATEGORIES= net-mgmt python MAINTAINER= kai@FreeBSD.org COMMENT= IP address management tool WWW= https://github.com/netbox-community/netbox LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE.txt # NetBox has fixed Python package dependencies listed in "requirements.txt" # which are not checked during build/runtime because they're usually installed # via devel/py-pip. # # As a rule, slight deviations are usually not a problem, but there are a few # Django packages that are known for regressions in conjunction with NetBox and # should therefore only be updated with caution. # -# - devel/py-django-rq -# - www/py-django-filter -# - www/py-django-tables2 -# - www/py-djangorestframework +# - devel/py-dj60-django-rq +# - www/py-dj60-django-filter +# - www/py-dj60-django-tables2 +# - www/py-dj60-djangorestframework # -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django52>=5.2.13<5.3:www/py-django52@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-cors-headers>=4.9.0<5:www/py-django-cors-headers@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-debug-toolbar>=6.2.0<7:www/py-django-debug-toolbar@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-filter>=25.2<26:www/py-django-filter@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-htmx>=1.27.0<2:www/py-django-htmx@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-mptt>=0.18.0<0.19:www/py-django-mptt@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-prometheus>=2.4.1<2.5:www/py-django-prometheus@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-redis>=6.0.0<7:www/py-django-redis@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-rich>=2.2.0<3:www/py-django-rich@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-rq>=4.1.0<4.2.0:devel/py-django-rq@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-storages>=1.14.6<2:www/py-django-storages@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-tables2>=2.8.0<2.9:www/py-django-tables2@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-taggit>=6.1.0<7:www/py-django-taggit@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}django-timezone-field>=7.2.1<8:www/py-django-timezone-field@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}djangorestframework>=3.16.1,1<3.17.0,1:www/py-djangorestframework@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}drf-spectacular>=0.29.0<1:www/py-drf-spectacular@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}drf-spectacular-sidecar>=2026.5.1:www/py-drf-spectacular-sidecar@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}social-auth-app-django>=5.9.0<6:www/py-social-auth-app-django@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}sorl-thumbnail>=13.0.0<14:graphics/py-sorl-thumbnail@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}strawberry-graphql>=0.315.3<1:devel/py-strawberry-graphql@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}strawberry-graphql-django>=0.84.0<1:www/py-strawberry-graphql-django@${PY_FLAVOR} \ +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django60>=6.0.6<6.1:www/py-django60@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-django-cors-headers>=4.9.0<5:www/py-dj60-django-cors-headers@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-django-debug-toolbar>=6.3.0<7:www/py-dj60-django-debug-toolbar@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-django-filter>=25.2<26:www/py-dj60-django-filter@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-django-htmx>=1.27.0<2:www/py-dj60-django-htmx@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-django-mptt>=0.18.0<0.19:www/py-dj60-django-mptt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-django-prometheus>=2.4.0<2.6:www/py-dj60-django-prometheus@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-django-redis>=7.0.0<8:www/py-dj60-django-redis@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-django-rich>=2.2.0<3:www/py-dj60-django-rich@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-django-rq>=4.1.0<4.2.0:devel/py-dj60-django-rq@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-django-storages>=1.14.6<2:www/py-dj60-django-storages@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-django-tables2>=2.8.0<2.9:www/py-dj60-django-tables2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-django-taggit>=6.1.0<7:www/py-dj60-django-taggit@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-django-timezone-field>=7.2.2<8:www/py-dj60-django-timezone-field@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-djangorestframework>=3.17.1<3.18.0:www/py-dj60-djangorestframework@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-drf-spectacular>=0.29.0<1:www/py-dj60-drf-spectacular@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-drf-spectacular-sidecar>=2026.6.1:www/py-dj60-drf-spectacular-sidecar@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-social-auth-app-django>=5.9.0<6:www/py-dj60-social-auth-app-django@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-sorl-thumbnail>=13.0.0<14:graphics/py-dj60-sorl-thumbnail@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-strawberry-graphql>=0.316.0<1:devel/py-dj60-strawberry-graphql@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj60-strawberry-graphql-django>=0.86.1<1:www/py-dj60-strawberry-graphql-django@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}django-pglocks>=1.0.4<1.1:www/py-django-pglocks@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}colorama>=0.4.6<1:devel/py-colorama@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}feedparser>=6.0.12<7:textproc/py-feedparser@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}Jinja2>=3.1.6<4:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}jsonschema>=4.26.0<5:devel/py-jsonschema@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}markdown>=3.10.2<4:textproc/py-markdown@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}mkdocs>=1.6.1<2:textproc/py-mkdocs@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}mkdocs-material>=9.7.6<10:textproc/py-mkdocs-material@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}mkdocstrings>=1.0.3<2:textproc/py-mkdocstrings@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}mkdocstrings-python>=2.0.3:textproc/py-mkdocstrings-python@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mkdocstrings>=1.0.4<2:textproc/py-mkdocstrings@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mkdocstrings-python>=2.0.4:textproc/py-mkdocstrings-python@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}netaddr>=1.3.0<2:net/py-netaddr@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}nh3>=0.3.5<1:www/py-nh3@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pillow>=11.3.0:graphics/py-pillow@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}psycopg>=3.2.13<4:databases/py-psycopg@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}psycopg-c>=3.2.13<4:databases/py-psycopg-c@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}psycopg-pool>=3.3.0<4:databases/py-psycopg-pool@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}requests>=2.33.1<3:www/py-requests@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}rq>=2.8.0<3:devel/py-rq@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}redis>=7.4.0<8:databases/py-redis@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}requests>=2.34.2<3:www/py-requests@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}rq>=2.9.1<3:devel/py-rq@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}social-auth-core>=4.8.5<5:security/py-social-auth-core@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}svgwrite>=1.4.3<2:graphics/py-svgwrite@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}tablib>=3.9.0<4:textproc/py-tablib@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}tzdata>=2026.2:devel/py-tzdata@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyyaml>=6.0.3<7:devel/py-pyyaml@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}gunicorn>=25.1.0<27:www/py-gunicorn@${PY_FLAVOR} + ${PYTHON_PKGNAMEPREFIX}gunicorn>=26.0.0:www/py-gunicorn@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}zensical>=0.0.45<1:textproc/py-zensical@${PY_FLAVOR} -USES= cpe pgsql:14+ python +USES= cpe pgsql:14+ python:3.12+ CPE_VENDOR= netbox USE_GITHUB= yes GH_ACCOUNT= netbox-community SUB_FILES= 850.netbox-housekeeping.sample netbox_rq.sample netboxrc.sample pkg-message SUB_LIST= DATADIR=${DATADIR} PYTHON_CMD=${PYTHON_CMD} PYTHON_VER=${PYTHON_VER} WWWOWN=${WWWOWN} NO_BUILD= yes NO_ARCH= yes OPTIONS_DEFINE= EXAMPLES OPTIONS_GROUP= BACKENDS OPTIONS_GROUP_BACKENDS= GIT LDAP S3 SENTRY GIT_DESC= Git backend support LDAP_DESC= LDAP backend support S3_DESC= Amazon S3 backend support SENTRY_DESC= Sentry monitoring support GIT_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dulwich>0:devel/py-dulwich@${PY_FLAVOR} -LDAP_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django-auth-ldap>0:www/py-django-auth-ldap +LDAP_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dj60-django-auth-ldap>0:www/py-dj60-django-auth-ldap S3_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}boto3>0:www/py-boto3@${PY_FLAVOR} SENTRY_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sentry-sdk>0:devel/py-sentry-sdk@${PY_FLAVOR} do-install: cd ${WRKSRC}/netbox ; \ for src in $$( ${FIND} . ! -name '*.bak' -a ! -name '*.orig' ) ; do \ dst=${STAGEDIR}${DATADIR}$${src#.} ; \ if ${TEST} -d "$$src" ; then \ ${MKDIR} "$$dst" ; \ else \ ${INSTALL_DATA} "$$src" "$$dst" ; \ fi \ done cd ${WRKSRC} && ${COPYTREE_SHARE} docs ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/mkdocs.yml ${STAGEDIR}${DATADIR} post-install-EXAMPLES-on: @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKDIR}/850.netbox-housekeeping.sample ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKDIR}/netbox_rq.sample ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKDIR}/netboxrc.sample ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/contrib/apache.conf ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/contrib/gunicorn.py ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/contrib/nginx.conf ${STAGEDIR}${EXAMPLESDIR} .include diff --git a/net-mgmt/netbox/distinfo b/net-mgmt/netbox/distinfo index 4be64282c136..2b88902fc40a 100644 --- a/net-mgmt/netbox/distinfo +++ b/net-mgmt/netbox/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1777959596 -SHA256 (netbox-community-netbox-v4.5.10_GH0.tar.gz) = c243ccea0364a417ca3e53e9e4a6447e283ed8f1cea107116a66d54a0e7141e2 -SIZE (netbox-community-netbox-v4.5.10_GH0.tar.gz) = 19315725 +TIMESTAMP = 1782290917 +SHA256 (netbox-community-netbox-v4.6.3_GH0.tar.gz) = b4505817b1d4e5e5c3f0c28f7e3066dabd93a73915af00299a0986eb7d9f7b19 +SIZE (netbox-community-netbox-v4.6.3_GH0.tar.gz) = 19799509 diff --git a/net-mgmt/netbox/files/netboxrc.sample.in b/net-mgmt/netbox/files/netboxrc.sample.in index 9cd8a29d5569..8eba8925cb5b 100644 --- a/net-mgmt/netbox/files/netboxrc.sample.in +++ b/net-mgmt/netbox/files/netboxrc.sample.in @@ -1,110 +1,110 @@ #!/bin/sh # This sample rc script eliminate the need to use sysutils/py-supervisor to # run NetBox as a system service. Only www/py-gunicorn is needed as a WSGI. # # Of course a working HTTP server like Apache/nginx is still required to make # use of the gunicorn WSGI. # # PROVIDE: netbox # REQUIRE: DAEMON # KEYWORD: shutdown # # Add the following line to /etc/rc.conf.local or /etc/rc.conf # to enable netbox: # # netbox_enable (bool): Set to NO by default. # Set it to YES to enable netbox. # netbox_use_config (bool): Set to NO by default. # If set, read the configuration parameter from file defined in # "netbox_config" instead using rc variables. # netbox_config (str): Default to "%%LOCALBASE%%/etc/${name}.conf.py}" # Config file for gunicorn's netbox config file # netbox_command (str): Default to "%%LOCALBASE%%/bin/gunicorn" # Path to gunicorn to run netbox # netbox_bind (str): Default to "localhost:8001" # Interface and port to bind to # netbox_workers (int): Default to "5" # Number of gunicorn workers # netbox_threads (int): Default to "3" # Number of worker threads per handling request # netbox_timeout (int): Default to "120" # Worker timeout for gunicorn # netbox_max_requests (int): Default to "5000" # Maximum number of requests a worker process will process before respawning # netbox_max_requests_jitter (int): Default to "500" # Maximum number jitter to add to "netbox_max_requests" # netbox_extra_args (str): Not set by default # Extra arguments that are passed to gunicorn # . /etc/rc.subr name="netbox" rcvar=netbox_enable netbox_path=%%DATADIR%% extra_commands="upgrade" load_rc_config $name start_precmd="netbox_precmd" upgrade_cmd="netbox_upgrade" command=${netbox_program:-%%LOCALBASE%%/bin/gunicorn} procname=${netbox_procname:-%%PYTHON_CMD%%} netbox_chdir=${netbox_path} pidfile=${netbox_pidfile:-/var/run/${name}/${name}.pid} netbox_user=${netbox_user:-%%WWWOWN%%} netbox_use_config=${netbox_use_config:-no} netbox_config=${netbox_config:-%%LOCALBASE%%/etc/${name}.conf.py} netbox_bind=${netbox_bind:-localhost:8001} netbox_workers=${netbox_workers:-5} netbox_threads=${netbox_threads:-3} netbox_timeout=${netbox_timeout:-120} netbox_max_requests=${netbox_max_requests:-5000} netbox_max_requests_jitter=${netbox_max_requests_jitter:-500} # Read settings from confguration file if set if checkyesno netbox_use_config && [ -f "${netbox_config}" ]; then command_args="${netbox_args} -D \ --log-syslog --log-syslog-prefix ${name} \ --log-syslog-to unix:///var/run/log#dgram \ --disable-redirect-access-to-syslog \ -p ${pidfile} --pythonpath ${netbox_path} \ -c ${netbox_config} \ netbox.wsgi" else command_args="${netbox_args} -D \ --log-syslog --log-syslog-prefix ${name} \ --log-syslog-to unix:///var/run/log#dgram \ --disable-redirect-access-to-syslog \ -p ${pidfile} --pythonpath ${netbox_path} \ -b ${netbox_bind} -w ${netbox_workers} --threads ${netbox_threads} -t ${netbox_timeout} \ --max-requests ${netbox_max_requests} --max-requests-jitter ${netbox_max_requests_jitter} \ ${netbox_extra_args} \ netbox.wsgi" fi netbox_precmd() { install -d -o ${netbox_user} `dirname ${pidfile}` } netbox_upgrade() { if [ -f ${pidfile} ]; then cd ${netbox_path} %%PYTHON_CMD%% manage.py migrate %%PYTHON_CMD%% manage.py trace_paths --no-input - %%LOCALBASE%%/bin/mkdocs build + %%LOCALBASE%%/bin/zensical build %%PYTHON_CMD%% manage.py collectstatic --no-input %%PYTHON_CMD%% manage.py remove_stale_contenttypes --no-input %%PYTHON_CMD%% manage.py reindex --lazy %%PYTHON_CMD%% manage.py clearsessions echo "Please restart NetBox and the WSGI environment." else echo "NetBox is not running!" fi } run_rc_command "$1" diff --git a/net-mgmt/netbox/files/patch-netbox_dcim_forms_bulk__import.py b/net-mgmt/netbox/files/patch-netbox_dcim_forms_bulk__import.py deleted file mode 100644 index 05ba711c69e3..000000000000 --- a/net-mgmt/netbox/files/patch-netbox_dcim_forms_bulk__import.py +++ /dev/null @@ -1,22 +0,0 @@ -Add Python 3.11 compatibility - ---- netbox/dcim/forms/bulk_import.py.orig 2026-04-17 13:34:58 UTC -+++ netbox/dcim/forms/bulk_import.py -@@ -1518,7 +1518,7 @@ class CableImportForm(PrimaryModelImportForm): - if data: - # Limit choices for side_a_device to the assigned side_a_site - if side_a_site := data.get('side_a_site'): -- side_a_parent_params = {f'site__{self.fields['side_a_site'].to_field_name}': side_a_site} -+ side_a_parent_params = {f'site__{self.fields["side_a_site"].to_field_name}': side_a_site} - self.fields['side_a_device'].queryset = self.fields['side_a_device'].queryset.filter( - **side_a_parent_params - ) -@@ -1528,7 +1528,7 @@ class CableImportForm(PrimaryModelImportForm): - - # Limit choices for side_b_device to the assigned side_b_site - if side_b_site := data.get('side_b_site'): -- side_b_parent_params = {f'site__{self.fields['side_b_site'].to_field_name}': side_b_site} -+ side_b_parent_params = {f'site__{self.fields["side_b_site"].to_field_name}': side_b_site} - self.fields['side_b_device'].queryset = self.fields['side_b_device'].queryset.filter( - **side_b_parent_params - ) diff --git a/net-mgmt/netbox/files/patch-netbox_netbox_settings.py b/net-mgmt/netbox/files/patch-netbox_netbox_settings.py deleted file mode 100644 index e6d0b3286751..000000000000 --- a/net-mgmt/netbox/files/patch-netbox_netbox_settings.py +++ /dev/null @@ -1,17 +0,0 @@ -Remove check for Python < 3.12 - ---- netbox/netbox/settings.py.orig 2026-03-03 21:01:30 UTC -+++ netbox/netbox/settings.py -@@ -33,12 +33,6 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abs - # Set the base directory two levels up - BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - --# Validate the Python version --if sys.version_info < (3, 12): # noqa: UP036 -- raise RuntimeError( -- f"NetBox requires Python 3.12 or later. (Currently installed: Python {platform.python_version()})" -- ) -- - # - # Configuration import - # diff --git a/net-mgmt/netbox/files/pkg-message.in b/net-mgmt/netbox/files/pkg-message.in index 2a61e4e19824..4dcba6acc363 100644 --- a/net-mgmt/netbox/files/pkg-message.in +++ b/net-mgmt/netbox/files/pkg-message.in @@ -1,388 +1,334 @@ [ { type: install message: < non-default GIT option * www/py-dj42-django-auth-ldap -> non-default LDAP option * www/py-boto3 -> non-default S3 option EOD } { type: upgrade maximum_version: 3.7.0 message: < non-default SENTRY option 3. Please note that the command "python%%PYTHON_VER%% manage.py clearcache" has been removed. The general update instructions in this pkg-message and the netbox sample rc script (available via the EXAMPLES option) have also been updated accordingly. EOD } { type: upgrade maximum_version: 4.0.5 message: <