Index: head/net-mgmt/netbox/Makefile =================================================================== --- head/net-mgmt/netbox/Makefile (revision 474283) +++ head/net-mgmt/netbox/Makefile (revision 474284) @@ -1,70 +1,73 @@ # $FreeBSD$ PORTNAME= netbox DISTVERSIONPREFIX= v -DISTVERSION= 2.3.3 +DISTVERSION= 2.3.5 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 + +post-patch: + @${REINPLACE_CMD} -e 's|==|>=|' ${WRKSRC}/requirements.txt 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 Index: head/net-mgmt/netbox/distinfo =================================================================== --- head/net-mgmt/netbox/distinfo (revision 474283) +++ head/net-mgmt/netbox/distinfo (revision 474284) @@ -1,3 +1,3 @@ -TIMESTAMP = 1526915921 -SHA256 (digitalocean-netbox-v2.3.3_GH0.tar.gz) = 7328ee8d9918f299f23fde170b2e47ff27d6e7073b9db2d69292c5f5e67012bd -SIZE (digitalocean-netbox-v2.3.3_GH0.tar.gz) = 2131052 +TIMESTAMP = 1531077319 +SHA256 (digitalocean-netbox-v2.3.5_GH0.tar.gz) = 4175be9242553bd1a904ee2a3d5a8a8d151910f042812a0483e7dd6a5262e069 +SIZE (digitalocean-netbox-v2.3.5_GH0.tar.gz) = 2130846 Index: head/net-mgmt/netbox/files/pkg-message.in =================================================================== --- head/net-mgmt/netbox/files/pkg-message.in (revision 474283) +++ head/net-mgmt/netbox/files/pkg-message.in (revision 474284) @@ -1,112 +1,131 @@ ================================================================================ +=================== + /// UPGRADING /// +=================== + +1. Run database migrations + +# python%%PYTHON_VER%% manage.py migrate + +2. Collect static files + +# python%%PYTHON_VER%% manage.py collectstatic --no-input + +3. Restart WSGI/httpd environment (apache/nginx/etc.) + + +==================== + /// INSTALLING /// +==================== + ================================== 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