From owner-svn-ports-head@freebsd.org Sat May 26 18:06:31 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE4FDEF12F9; Sat, 26 May 2018 18:06:30 +0000 (UTC) (envelope-from miwi@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 88B687B4B3; Sat, 26 May 2018 18:06:30 +0000 (UTC) (envelope-from miwi@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 66B80134C1; Sat, 26 May 2018 18:06:30 +0000 (UTC) (envelope-from miwi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4QI6UCj025104; Sat, 26 May 2018 18:06:30 GMT (envelope-from miwi@FreeBSD.org) Received: (from miwi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4QI6TG7025097; Sat, 26 May 2018 18:06:29 GMT (envelope-from miwi@FreeBSD.org) Message-Id: <201805261806.w4QI6TG7025097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: miwi set sender to miwi@FreeBSD.org using -f From: Martin Wilke Date: Sat, 26 May 2018 18:06:29 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r470937 - in head/net-mgmt: . netbox netbox/files X-SVN-Group: ports-head X-SVN-Commit-Author: miwi X-SVN-Commit-Paths: in head/net-mgmt: . netbox netbox/files X-SVN-Commit-Revision: 470937 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 18:06:31 -0000 Author: miwi Date: Sat May 26 18:06:29 2018 New Revision: 470937 URL: https://svnweb.freebsd.org/changeset/ports/470937 Log: NetBox is an open source web application designed to help manage and document computer networks. Initially conceived by the network engineering team at DigitalOcean, NetBox was developed specifically to address the needs of network and infrastructure engineers. It encompasses the following aspects of network management: - IP address management (IPAM) - IP networks and addresses, VRFs, and VLANs - Equipment racks - Organized by group and site - Devices - Types of devices and where they are installed - Connections - Network, console, and power connections among devices - Virtualization - Virtual machines and clusters - Data circuits - Long-haul communications circuits and providers - Secrets - Encrypted storage of sensitive credentials WWW: https://github.com/digitalocean/netbox PR: 227416 Submitted by: freebsd_ports@k-worx.org Sponsored by: iXsystems Inc. Added: head/net-mgmt/netbox/ head/net-mgmt/netbox/Makefile (contents, props changed) head/net-mgmt/netbox/distinfo (contents, props changed) head/net-mgmt/netbox/files/ head/net-mgmt/netbox/files/pkg-message.in (contents, props changed) head/net-mgmt/netbox/pkg-descr (contents, props changed) head/net-mgmt/netbox/pkg-plist (contents, props changed) Modified: head/net-mgmt/Makefile Modified: head/net-mgmt/Makefile ============================================================================== --- head/net-mgmt/Makefile Sat May 26 17:49:49 2018 (r470936) +++ head/net-mgmt/Makefile Sat May 26 18:06:29 2018 (r470937) @@ -178,6 +178,7 @@ SUBDIR += nedi SUBDIR += nefu SUBDIR += net-snmp + SUBDIR += netbox SUBDIR += netdata SUBDIR += netdisco SUBDIR += netdisco-mibs Added: head/net-mgmt/netbox/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/netbox/Makefile Sat May 26 18:06:29 2018 (r470937) @@ -0,0 +1,70 @@ +# $FreeBSD$ + +PORTNAME= netbox +DISTVERSIONPREFIX= v +DISTVERSION= 2.3.3 +CATEGORIES= net-mgmt + +MAINTAINER= freebsd_ports@k-worx.org +COMMENT= IP address management tool + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django111>=1.11:www/py-django111@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}django-cors-headers>=2.1.0:www/py-django-cors-headers@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}django-debug-toolbar>=1.9.0:www/py-django-debug-toolbar@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}django-filter>=1.1.0:www/py-django-filter@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}django-mptt>=0.9.0:www/py-django-mptt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}django-tables2>=1.19.0:www/py-django-tables2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}django-timezone-field>=2.0:www/py-django-timezone-field@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}djangorestframework>=3.7.7:www/py-djangorestframework@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}drf-yasg>=1.4.4:www/py-drf-yasg@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}gfm>=0.1.3:textproc/py-gfm@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}graphviz>=0.8.2:graphics/py-graphviz@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}markdown>=2.6.11:textproc/py-markdown@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ncclient>=0.5.3:net-mgmt/py-ncclient@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}netaddr>=0.7.18:net/py-netaddr@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}paramiko>=2.4.0:security/py-paramiko@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pycryptodome>=3.4.11:security/py-pycryptodome@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pillow>=5.0.0:graphics/py-pillow@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}psycopg2>=2.7.4:databases/py-psycopg2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}natsort>=5.2.0:devel/py-natsort@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xmltodict>=0.11.0:devel/py-xmltodict@${PY_FLAVOR} + +USES= pgsql:9.4+ python:3.5+ +WANT_PGSQL= server +USE_GITHUB= yes +GH_ACCOUNT= digitalocean + +SUB_FILES= pkg-message +SUB_LIST= DATADIR=${DATADIR} PYTHON_VER=${PYTHON_VER} +NO_BUILD= yes +NO_ARCH= yes + +OPTIONS_DEFINE= DOCS + +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 + +post-install-DOCS-on: + cd ${WRKSRC}/docs ; \ + ${MKDIR} ${STAGEDIR}${DOCSDIR} ; \ + for src in $$( ${FIND} . ! -name '*.bak' ) ; do \ + dst=${STAGEDIR}${DOCSDIR}$${src#.} ; \ + if ${TEST} -d "$$src" ; then \ + ${MKDIR} "$$dst" ; \ + else \ + ${INSTALL_DATA} "$$src" "$$dst" ; \ + fi \ + done + +.include Added: head/net-mgmt/netbox/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/netbox/distinfo Sat May 26 18:06:29 2018 (r470937) @@ -0,0 +1,3 @@ +TIMESTAMP = 1526915921 +SHA256 (digitalocean-netbox-v2.3.3_GH0.tar.gz) = 7328ee8d9918f299f23fde170b2e47ff27d6e7073b9db2d69292c5f5e67012bd +SIZE (digitalocean-netbox-v2.3.3_GH0.tar.gz) = 2131052 Added: head/net-mgmt/netbox/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/netbox/files/pkg-message.in Sat May 26 18:06:29 2018 (r470937) @@ -0,0 +1,112 @@ +================================================================================ + +================================== + Create a new PostgreSQL database +================================== + +# su pgsql +$ psql postgres + +postgres=# CREATE DATABASE netbox; +CREATE DATABASE +postgres=# CREATE USER netbox WITH PASSWORD 'v3rYs3cR3t'; +CREATE ROLE +postgres=# GRANT ALL PRIVILEGES ON DATABASE netbox TO netbox; +GRANT +postgres=# \q + +================== + Configure Netbox +================== + +1. Move into the netbox directory create a new configuration from the shipped + example configuration + +# cd %%DATADIR%%/netbox/ +# cp configuration.example.py configuration.py + +2. Edit configuration.py with an editor of your choice. + +3. Configure the variables ALLOWED_HOSTS, DATABASE and SECRET_KEY with the + respective values: + +3a. ALLOWED_HOST variable +--- --------------------- + +ALLOWED_HOSTS = ['netbox.example.com', 'anotherhost.example.com' ] + +3b. DATABASE variable +--- ----------------- + +DATABASE = { + 'NAME': 'netbox', # Database name + 'USER': 'netbox', # PostgreSQL username + 'PASSWORD': 'v3rYs3cR3t', # PostgreSQL password + 'HOST': 'localhost', # Database server + 'PORT': '', # Database port (leave blank for default) +} + +3c. SECRET_KEY variable +--- ------------------- + +Generate a secret key and add the value to the SECRET_KEY variable. The +supplied script generate_secret_key.py can be used for this task. Of course you +can also generate your own key which must contain at least 50 alpha-numeric +characters then. + +# python%%PYTHON_VER%% %%DATADIR%%/generate_secret_key.py + +SECRET_KEY = 'dfIOdfa