From owner-svn-ports-all@freebsd.org Mon Sep 30 14:55:05 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0819C12A1B3; Mon, 30 Sep 2019 14:55:05 +0000 (UTC) (envelope-from kai@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46hln503LGz4327; Mon, 30 Sep 2019 14:55:05 +0000 (UTC) (envelope-from kai@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D566E4535; Mon, 30 Sep 2019 14:55:04 +0000 (UTC) (envelope-from kai@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8UEt4k4081034; Mon, 30 Sep 2019 14:55:04 GMT (envelope-from kai@FreeBSD.org) Received: (from kai@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8UEt37O081028; Mon, 30 Sep 2019 14:55:03 GMT (envelope-from kai@FreeBSD.org) Message-Id: <201909301455.x8UEt37O081028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kai set sender to kai@FreeBSD.org using -f From: Kai Knoblich Date: Mon, 30 Sep 2019 14:55:03 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r513395 - in head: . net-mgmt/netbox net-mgmt/netbox/files X-SVN-Group: ports-head X-SVN-Commit-Author: kai X-SVN-Commit-Paths: in head: . net-mgmt/netbox net-mgmt/netbox/files X-SVN-Commit-Revision: 513395 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Sep 2019 14:55:05 -0000 Author: kai Date: Mon Sep 30 14:55:03 2019 New Revision: 513395 URL: https://svnweb.freebsd.org/changeset/ports/513395 Log: net-mgmt/netbox: Update to 2.6.5 * Introduce EXAMPLES option which installs a sample rc script to the example location. Using the script will eliminate the need for sysutils/py-supervisor for those who run NetBox as a system service. [1] If there's a lot of interest it can also be installed in near future as regular rc script. * Consolidate keywords in pkg-message to avoid accidental deletion of these. Notable changes since 2.5.13: * Improved performance via Caching through Redis * Support for Power Panels and Feeds * Introduction of view-only permissions * Ability to create custom links under the admin UI * Support for Prometheus metrics * Many other enhancements and bug fixes https://github.com/netbox-community/netbox/blob/v2.6.5/CHANGELOG.md Submitted by: Thomas Kurschel (via private email) [1] Added: head/net-mgmt/netbox/files/netboxrc.sample.in (contents, props changed) Modified: head/UPDATING head/net-mgmt/netbox/Makefile head/net-mgmt/netbox/distinfo head/net-mgmt/netbox/files/pkg-message.in head/net-mgmt/netbox/pkg-plist Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Sep 30 14:50:26 2019 (r513394) +++ head/UPDATING Mon Sep 30 14:55:03 2019 (r513395) @@ -5,6 +5,37 @@ they are unavoidable. You should get into the habit of checking this file for changes each time you update your ports collection, before attempting any port upgrades. +20190930: + AFFECTS: users of NetBox + AUTHOR: kai@FreeBSD.org + + Since the 2.6 release a running Redis server instance is required for + caching objects to run. Also the following settings like below need to be + added (or modified) in the existing configuration.py: + + REDIS = { + 'HOST': 'localhost', + 'PORT': 6397, + 'PASSWORD': '' + 'DATABASE': 0, + 'CACHE_DATABASE': 1, + 'DEFAULT_TIMEOUT': 300, + 'SSL': False, + } + + Note that if you were using these settings in a prior release with + webhooks, the DATABASE setting remains the same but an additional + CACHE_DATABASE settings has been added with a default value of 1 to + support the caching backend. + + The DATABASE setting will be renamed in a future release of NetBox to + better relay the meaning of the setting. It is highly recommended to keep + the webhook and cache databases separate. Using the same database number + for both may result in webhook processing data being lost during cache + flushing events. + + Please also check the pkg-message and the changelogs for further info. + 20190927: AFFECTS: users of emulators/qemu-devel AUTHOR: bofh@FreeBSD.org Modified: head/net-mgmt/netbox/Makefile ============================================================================== --- head/net-mgmt/netbox/Makefile Mon Sep 30 14:50:26 2019 (r513394) +++ head/net-mgmt/netbox/Makefile Mon Sep 30 14:55:03 2019 (r513395) @@ -2,8 +2,7 @@ PORTNAME= netbox DISTVERSIONPREFIX= v -DISTVERSION= 2.5.13 -PORTREVISION= 1 +DISTVERSION= 2.6.5 CATEGORIES= net-mgmt MAINTAINER= kai@FreeBSD.org @@ -12,36 +11,39 @@ COMMENT= IP address management tool LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE.txt -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django22>=2.2,<2.3:www/py-django22@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}dj22-django-cors-headers>=2.4.0:www/py-dj22-django-cors-headers@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}dj22-django-debug-toolbar>=1.11:www/py-dj22-django-debug-toolbar@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}dj22-django-filter>=2.0.0:www/py-dj22-django-filter@${PY_FLAVOR} \ +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django22>=2.2<2.3:www/py-django22@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj22-django-cacheops>=4.1:www/py-dj22-django-cacheops@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj22-django-cors-headers>=3.0.2:www/py-dj22-django-cors-headers@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj22-django-debug-toolbar>=2.0:www/py-dj22-django-debug-toolbar@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj22-django-filter>=2.1.0:www/py-dj22-django-filter@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dj22-django-mptt>=0.9.1:www/py-dj22-django-mptt@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}dj22-django-tables2>=2.0.3:www/py-dj22-django-tables2@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}dj22-django-taggit>=0.24.0:www/py-dj22-django-taggit@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj22-django-prometheus>=1.0.15:www/py-dj22-django-prometheus@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj22-django-rq>=2.1.0:devel/py-dj22-django-rq@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj22-django-tables2>=2.0.6:www/py-dj22-django-tables2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj22-django-taggit>=0:www/py-dj22-django-taggit@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dj22-django-taggit-serializer>=0.1.7:www/py-dj22-django-taggit-serializer@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dj22-django-timezone-field>=3.0:www/py-dj22-django-timezone-field@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}dj22-djangorestframework>=3.9.1:www/py-dj22-djangorestframework@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}dj22-drf-yasg>=1.14.0:www/py-dj22-drf-yasg@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj22-djangorestframework>=3.9.4:www/py-dj22-djangorestframework@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj22-drf-yasg>=1.16.0:www/py-dj22-drf-yasg@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}gfm>=0.1.4:textproc/py-gfm@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}graphviz>=0.10.1:graphics/py-graphviz@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}Jinja2>=2.10:devel/py-Jinja2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}Jinja2>=2.10.1:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}markdown>=2.6.11:textproc/py-markdown@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}netaddr>=0.7.19:net/py-netaddr@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pycryptodome>=3.7.2:security/py-pycryptodome@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pillow>=5.3.0:graphics/py-pillow@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}psycopg2>=2.7.6.1:databases/py-psycopg2@${PY_FLAVOR} + ${PYTHON_PKGNAMEPREFIX}pycryptodome>=3.8.2:security/py-pycryptodome@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pillow>=6.0.0:graphics/py-pillow@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}psycopg2>=2.8.3:databases/py-psycopg2@${PY_FLAVOR} USES= pgsql:9.4+ python:3.5+ USE_GITHUB= yes GH_ACCOUNT= digitalocean -SUB_FILES= pkg-message -SUB_LIST= DATADIR=${DATADIR} PYTHON_VER=${PYTHON_VER} +SUB_FILES= 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= DOCS +OPTIONS_DEFINE= DOCS EXAMPLES post-patch: @${REINPLACE_CMD} -e 's|==|>=|' ${WRKSRC}/requirements.txt @@ -68,5 +70,9 @@ post-install-DOCS-on: ${INSTALL_DATA} "$$src" "$$dst" ; \ fi \ done + +post-install-EXAMPLES-on: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKDIR}/netboxrc.sample ${STAGEDIR}${EXAMPLESDIR} .include Modified: head/net-mgmt/netbox/distinfo ============================================================================== --- head/net-mgmt/netbox/distinfo Mon Sep 30 14:50:26 2019 (r513394) +++ head/net-mgmt/netbox/distinfo Mon Sep 30 14:55:03 2019 (r513395) @@ -1,3 +1,3 @@ -TIMESTAMP = 1559512206 -SHA256 (digitalocean-netbox-v2.5.13_GH0.tar.gz) = 71b6d05d3c76985cff590c8d2cf70b1896928ed943c2a3818e0b88ddd9f2a6ae -SIZE (digitalocean-netbox-v2.5.13_GH0.tar.gz) = 2365536 +TIMESTAMP = 1569582543 +SHA256 (digitalocean-netbox-v2.6.5_GH0.tar.gz) = 8116e1be37a6a6188a7bfc6f2d842f500813d72ffcc9072ad5ac8a70198b9c8f +SIZE (digitalocean-netbox-v2.6.5_GH0.tar.gz) = 2408180 Added: head/net-mgmt/netbox/files/netboxrc.sample.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/netbox/files/netboxrc.sample.in Mon Sep 30 14:55:03 2019 (r513395) @@ -0,0 +1,62 @@ +#!/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_config (str): Default to "/usr/local/etc/${name}.conf}" +# Config file for gunicorn's netbox config file +# netbox_command (str): Default to "/usr/local/bin/gunicorn-3.6" +# Path to gunicorn to run netbox +# netbox_bind (str): Default to "localhost:8001" +# Interface and port to bind to +# netbox_workers (int): Default to "3" +# Number of gunicorn works +# netbox_timeout (int): Default to "120" +# Worker timeout for gunicorn +# + +. /etc/rc.subr + +name="netbox" +rcvar=netbox_enable +netbox_path=%%DATADIR%% + +load_rc_config $name + +start_precmd="netbox_precmd" +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_bind=${netbox_bind:-localhost:8001} +netbox_workers=${netbox_workers:-3} +netbox_timeout=${netbox_timeout:-120} + +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} -t ${netbox_timeout} \ + netbox.wsgi" + +netbox_precmd() +{ + install -d -o ${netbox_user} `dirname ${pidfile}` +} + +run_rc_command "$1" Modified: head/net-mgmt/netbox/files/pkg-message.in ============================================================================== --- head/net-mgmt/netbox/files/pkg-message.in Mon Sep 30 14:50:26 2019 (r513394) +++ head/net-mgmt/netbox/files/pkg-message.in Mon Sep 30 14:55:03 2019 (r513395) @@ -1,5 +1,5 @@ [ -{ +{ type: install message: <