forked from Lainports/freebsd-ports
net-mgmt/netbox: Update to 3.0.4
Changelog since 2.11.12: It contains many bugfixes/enhancements and the following new features: * Updated User Interface * GraphQL API * IP Ranges * Custom Model Validation * SVG Cable Traces * New Views for Models Previously Under the Admin UI * REST API Token Provisioning * New Housekeeping Command * Custom Queue Support for Plugins https://netbox.readthedocs.io/en/stable/release-notes/version-3.0/ MFH: No (feature release)
This commit is contained in:
parent
f99dd3e172
commit
0627700a0b
5 changed files with 372 additions and 1185 deletions
|
|
@ -1,6 +1,6 @@
|
|||
PORTNAME= netbox
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 2.11.12
|
||||
DISTVERSION= 3.0.4
|
||||
CATEGORIES= net-mgmt python
|
||||
|
||||
MAINTAINER= kai@FreeBSD.org
|
||||
|
|
@ -22,24 +22,25 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.txt
|
|||
# - www/py-dj32-django-tables2
|
||||
# - www/py-dj32-djangorestframework (in conjunction with www/py-dj32-drf-yasg)
|
||||
#
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django32>=3.2.6<3.3:www/py-django32@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-cacheops>=6.0<7.0:www/py-dj32-django-cacheops@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-cors-headers>=3.8.0<3.9:www/py-dj32-django-cors-headers@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-debug-toolbar>=3.2.1<4:www/py-dj32-django-debug-toolbar@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-filter>=2.4.0<2.5:www/py-dj32-django-filter@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-mptt>=0.13.1<0.14:www/py-dj32-django-mptt@${PY_FLAVOR} \
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django32>=3.2.7<3.3:www/py-django32@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-cors-headers>=3.9.0<4:www/py-dj32-django-cors-headers@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-debug-toolbar>=3.2.2<4:www/py-dj32-django-debug-toolbar@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-filter>=21.1<22:www/py-dj32-django-filter@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-graphiql-debug-toolbar>=0.2.0<1:www/py-dj32-django-graphiql-debug-toolbar@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-mptt>=0.13.4<0.14:www/py-dj32-django-mptt@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-prometheus>=2.1.0<2.2:www/py-dj32-django-prometheus@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-redis>=5.0.0<5.1:www/py-dj32-django-redis@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-rq>=2.4.1<2.5:devel/py-dj32-django-rq@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-tables2>=2.4.0<2.5:www/py-dj32-django-tables2@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-taggit>=1.5.1<2:www/py-dj32-django-taggit@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-django-timezone-field>=4.1.2<5:www/py-dj32-django-timezone-field@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-djangorestframework>=3.12.4<3.13.0:www/py-dj32-djangorestframework@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-drf-yasg>=1.20.0<1.21:www/py-dj32-drf-yasg@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj32-graphene-django>=2.15.0<3:devel/py-dj32-graphene-django@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}django-pglocks>=1.0.4<1.1:www/py-django-pglocks@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}Jinja2>=2.11.2<4:devel/py-Jinja2@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}Jinja2>=3.0.1<4:devel/py-Jinja2@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}markdown>=3.3.4<3.5:textproc/py-markdown@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}netaddr>=0.8.0<1:net/py-netaddr@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pycryptodome>=3.10.1<4:security/py-pycryptodome@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pillow>=8.2.0<9:graphics/py-pillow@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}psycopg2>=2.9.1<3:databases/py-psycopg2@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}svgwrite>=1.4.1<2:graphics/py-svgwrite@${PY_FLAVOR} \
|
||||
|
|
@ -52,7 +53,7 @@ CPE_VENDOR= netbox_project
|
|||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= netbox-community
|
||||
|
||||
SUB_FILES= netbox_rq.sample netboxrc.sample pkg-message
|
||||
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
|
||||
|
|
@ -84,6 +85,7 @@ post-install-DOCS-on:
|
|||
|
||||
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}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1629748683
|
||||
SHA256 (netbox-community-netbox-v2.11.12_GH0.tar.gz) = c51d8d386ead7523f7513b41d03500bf464fecc4129ccf1f74569a3e8d609684
|
||||
SIZE (netbox-community-netbox-v2.11.12_GH0.tar.gz) = 7125072
|
||||
TIMESTAMP = 1632927300
|
||||
SHA256 (netbox-community-netbox-v3.0.4_GH0.tar.gz) = 10273f484142e0607d5654c0fd1c62801390e8b78365674c8b552fce045edead
|
||||
SIZE (netbox-community-netbox-v3.0.4_GH0.tar.gz) = 4490751
|
||||
|
|
|
|||
32
net-mgmt/netbox/files/850.netbox-housekeeping.sample.in
Normal file
32
net-mgmt/netbox/files/850.netbox-housekeeping.sample.in
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/sh
|
||||
# This shell script invokes NetBox's housekeeping management command, which
|
||||
# intended to be run nightly.
|
||||
#
|
||||
# If you want to enable this script, copy it to %%PREFIX%%/etc/periodic/daily
|
||||
# and place the following into /etc/periodic.conf:
|
||||
#
|
||||
# daily_netbox_housekeeping_enable="YES"
|
||||
#
|
||||
# If NetBox has been installed into a nonstandard location, update the paths
|
||||
# below.
|
||||
command="%%PYTHON_CMD%%"
|
||||
netbox_root="%%DATADIR%%"
|
||||
|
||||
# If there is a global system configuration file, suck it in.
|
||||
#
|
||||
if [ -r /etc/defaults/periodic.conf ]; then
|
||||
. /etc/defaults/periodic.conf
|
||||
source_periodic_confs
|
||||
fi
|
||||
|
||||
rc=0
|
||||
|
||||
case "$daily_netbox_housekeeping_enable" in
|
||||
[Yy][Ee][Ss])
|
||||
echo ""
|
||||
echo "Running NetBox housekeeping:"
|
||||
$command "$netbox_root/manage.py" housekeeping
|
||||
rc=$?
|
||||
esac
|
||||
|
||||
exit $rc
|
||||
|
|
@ -18,8 +18,7 @@ database migrations will be executed.
|
|||
The following steps are required to finish the upgrade:
|
||||
|
||||
1. Run database migrations, trace any missing cable paths, collect static
|
||||
files, remove stale content files, delete any expired user sessions and
|
||||
clear all cached data:
|
||||
files, remove stale content files and delete any expired user sessions
|
||||
|
||||
# cd %%DATADIR%%
|
||||
# python%%PYTHON_VER%% manage.py migrate
|
||||
|
|
@ -27,7 +26,6 @@ The following steps are required to finish the upgrade:
|
|||
# python%%PYTHON_VER%% manage.py collectstatic --no-input
|
||||
# python%%PYTHON_VER%% manage.py remove_stale_contenttypes --no-input
|
||||
# python%%PYTHON_VER%% manage.py clearsessions
|
||||
# python%%PYTHON_VER%% manage.py invalidate all
|
||||
|
||||
2. Restart WSGI/httpd environment (supervisord/apache/nginx/etc.)
|
||||
EOD
|
||||
|
|
@ -244,4 +242,68 @@ Several changes to the REST API were made as well. Please check the changelogs
|
|||
for further details.
|
||||
EOD
|
||||
}
|
||||
{ type: upgrade
|
||||
maximum_version: 3.0.4
|
||||
message: <<EOD
|
||||
/!\ WARNING /!\
|
||||
|
||||
The NetBox 3.0 release contains major changes, so at least items 1.), 2.) and
|
||||
3.) must be checked before proceeding with the upgrade!
|
||||
|
||||
/!\ WARNING /!\
|
||||
|
||||
1. Please ensure that your local installation of net-mgmt/netbox is at
|
||||
the 2.11 release before attemping to upgrade to NetBox 3.0 or later.
|
||||
|
||||
2. Please also note that the previously deprecated secrets functionality has
|
||||
been removed with NetBox 3.0. This means, all of the secrets still remain
|
||||
in the database once upgraded, only the secrets functionality on the part of
|
||||
NetBox is no longer given.
|
||||
|
||||
In order to continue to be able to access the stored secrets as usual (and
|
||||
then possibly migrate them to another solution, e.g. security/vault), please
|
||||
install the security/py-netbox-secretstore port once NetBox has been
|
||||
upgraded to 3.x and follow its installation instructions how to enable the
|
||||
plugin.
|
||||
|
||||
3. If plugins are used, they should be temporarily deactivated to avoid
|
||||
disruptions during the upgrade process.
|
||||
|
||||
4. Following items should be checked as well:
|
||||
|
||||
* The default CSV export format for all objects now includes all available
|
||||
data from the object list. Additionally, the CSV headers now use human-
|
||||
friendly titles rather than raw field names. If backward compatibility
|
||||
with the old format is desired, export templates can be written to
|
||||
reproduce it.
|
||||
|
||||
* The "invalidate" management command (which clears cached database queries)
|
||||
is no longer needed and has been removed.
|
||||
|
||||
* Support for queryset caching configuration (caching_config) has been
|
||||
removed from the plugins API.
|
||||
|
||||
* The cacheops_* metrics have been removed from the Prometheus exporter.
|
||||
|
||||
* The "display_field" keyword argument has been removed from custom script
|
||||
"ObjectVar" and "MultiObjectVar" fields. These widgets will use the
|
||||
display value provided by the REST API.
|
||||
|
||||
* The deprecated "display_name" field has been removed from all REST API
|
||||
serializers. (API clients should reference the display field instead.)
|
||||
|
||||
* The redundant REST API endpoints for console, power, and interface
|
||||
connections have been removed. The same data can be retrieved by querying
|
||||
the respective model endpoints with the ?connected=True filter applied.
|
||||
|
||||
* Several changes to the REST API were made as well. Please check the
|
||||
changelogs for further details.
|
||||
|
||||
5. There's a new sample script for NetBox housekeeping tasks, which should run
|
||||
once a day. If the EXAMPLES option is enabled (which is the default) it can
|
||||
be found in the following directory:
|
||||
|
||||
%%EXAMPLESDIR%%/850.netbox-housekeeping.sample
|
||||
EOD
|
||||
}
|
||||
]
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue