diff --git a/net-mgmt/netbox/Makefile b/net-mgmt/netbox/Makefile index a9b500eaab9a..b69a8ec44c47 100644 --- a/net-mgmt/netbox/Makefile +++ b/net-mgmt/netbox/Makefile @@ -1,94 +1,95 @@ PORTNAME= netbox DISTVERSIONPREFIX= v -DISTVERSION= 3.2.9 +DISTVERSION= 3.3.4 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 usally 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-dj40-django-rq # - www/py-dj40-django-filter # - www/py-dj40-django-tables2 # - www/py-dj40-djangorestframework (in conjunction with www/py-dj40-drf-yasg) # RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django40>=4.0.7<4.1:www/py-django40@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dj40-django-cors-headers>=3.13.0<4:www/py-dj40-django-cors-headers@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}dj40-django-debug-toolbar>=3.5.0<4:www/py-dj40-django-debug-toolbar@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj40-django-debug-toolbar>=3.6.0<4:www/py-dj40-django-debug-toolbar@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dj40-django-filter>=22.1<23:www/py-dj40-django-filter@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dj40-django-graphiql-debug-toolbar>=0.2.0<1:www/py-dj40-django-graphiql-debug-toolbar@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dj40-django-mptt>=0.13.4<0.14:www/py-dj40-django-mptt@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dj40-django-prometheus>=2.2.0<2.3:www/py-dj40-django-prometheus@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dj40-django-redis>=5.2.0<6:www/py-dj40-django-redis@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj40-django-rich>=1.4.0<2:www/py-dj40-django-rich@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dj40-django-rq>=2.5.1<2.6:devel/py-dj40-django-rq@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dj40-django-tables2>=2.4.1<2.5:www/py-dj40-django-tables2@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}dj40-django-taggit>=2.1.0<3:www/py-dj40-django-taggit@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj40-django-taggit>=3.0.0<4:www/py-dj40-django-taggit@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dj40-django-timezone-field>=5.0<6:www/py-dj40-django-timezone-field@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dj40-djangorestframework>=3.13.1<3.14.0:www/py-dj40-djangorestframework@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}dj40-drf-yasg>=1.20.0<1.22:www/py-dj40-drf-yasg@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj40-drf-yasg>=1.21.3<1.22:www/py-dj40-drf-yasg@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dj40-graphene-django>=2.15.0<3:devel/py-dj40-graphene-django@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}django-pglocks>=1.0.4<1.1:www/py-django-pglocks@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}bleach>=5.0.1<6:www/py-bleach@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}Jinja2>=3.0.1<4:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}markdown>=3.3.7<3.5:textproc/py-markdown@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}markdown-include>=0.6.0<1:textproc/py-markdown-include@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}markdown-include>=0.7.0<1:textproc/py-markdown-include@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}mkdocs-material>=8.2.11<9:textproc/py-mkdocs-material@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}mkdocstrings>=0.17.0<1:textproc/py-mkdocstrings@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}netaddr>=0.8.0<1:net/py-netaddr@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pillow>=9.1.1:graphics/py-pillow@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pillow>=9.2.0:graphics/py-pillow@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}psycopg2>=2.9.3<3:databases/py-psycopg2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sentry-sdk>=1.5.12<2:devel/py-sentry-sdk@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}social-auth-app-django>=5.0.0<6:www/py-social-auth-app-django@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}social-auth-core>=4.2.0<5:security/py-social-auth-core@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}social-auth-core>=4.3.0<5:security/py-social-auth-core@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}svgwrite>=1.4.3<2:graphics/py-svgwrite@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}tablib>=3.2.1<4:textproc/py-tablib@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}tzdata>=2022.1:devel/py-tzdata@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}tzdata>=2022.2:devel/py-tzdata@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}yaml>=5.4.1<7:devel/py-yaml@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}gunicorn>=20.1.0<21:www/py-gunicorn@${PY_FLAVOR} USES= cpe pgsql:10+ python:3.8+ CPE_VENDOR= netbox_project 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 do-install: cd ${WRKSRC}/netbox ; \ for src in $$( ${FIND} . ! -name '*.bak' ) ; 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 a376ac85be58..ffc0da4ea2d1 100644 --- a/net-mgmt/netbox/distinfo +++ b/net-mgmt/netbox/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1660761613 -SHA256 (netbox-community-netbox-v3.2.9_GH0.tar.gz) = 4d22ed99ea9244b4c167b268eda0af2951f832a0a7b4e653c1b72ea4be2bcb3b -SIZE (netbox-community-netbox-v3.2.9_GH0.tar.gz) = 4837923 +TIMESTAMP = 1663407064 +SHA256 (netbox-community-netbox-v3.3.4_GH0.tar.gz) = 88de5e90a7632572416bcd52327bd208b2a96f569cbd2987206bd9f5c841f8ab +SIZE (netbox-community-netbox-v3.3.4_GH0.tar.gz) = 5217432 diff --git a/net-mgmt/netbox/files/netboxrc.sample.in b/net-mgmt/netbox/files/netboxrc.sample.in index 2502f9c0b14e..7510729b0701 100644 --- a/net-mgmt/netbox/files/netboxrc.sample.in +++ b/net-mgmt/netbox/files/netboxrc.sample.in @@ -1,91 +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 "/usr/local/etc/${name}.conf}" # 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:-/${name}.conf} 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 + %%PYTHON_CMD%% manage.py collectstatic --no-input + %%PYTHON_CMD%% manage.py remove_stale_contenttypes --no-input + %%PYTHON_CMD%% manage.py clearsessions + %%PYTHON_CMD%% manage.py clearcache + 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/pkg-message.in b/net-mgmt/netbox/files/pkg-message.in index 9cff229b226b..490cbeb03501 100644 --- a/net-mgmt/netbox/files/pkg-message.in +++ b/net-mgmt/netbox/files/pkg-message.in @@ -1,334 +1,283 @@ [ { type: install message: <) for more info. ->>> Region.objects.rebuild() ->>> RackGroup.objects.rebuild() ->>> TenantGroup.objects.rebuild() -EOD -} -{ type: upgrade - maximum_version: 2.9.9 - message: <