aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2020-01-10 08:58:24 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2020-01-10 08:58:24 +0000
commit79e6f22c6a2feb425c176bbc005abcd93071e43c (patch)
tree078816dab3218961787e7b59c2bba5f2735e15be /testing
parent8b2b291592ad58471e3deb95516219181d5e1ea7 (diff)
unmaintained/netbox: move from testing
Diffstat (limited to 'testing')
-rw-r--r--testing/netbox/APKBUILD102
-rw-r--r--testing/netbox/gunicorn_config.py5
-rw-r--r--testing/netbox/netbox.initd21
-rw-r--r--testing/netbox/netbox.logrotated8
-rw-r--r--testing/netbox/netbox.nginx-sample20
-rwxr-xr-xtesting/netbox/netbox.post-upgrade8
-rwxr-xr-xtesting/netbox/netbox.pre-install4
-rw-r--r--testing/netbox/set-config-defaults.patch11
8 files changed, 0 insertions, 179 deletions
diff --git a/testing/netbox/APKBUILD b/testing/netbox/APKBUILD
deleted file mode 100644
index 6396c91b2ab..00000000000
--- a/testing/netbox/APKBUILD
+++ /dev/null
@@ -1,102 +0,0 @@
-# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
-# Maintainer:
-pkgname=netbox
-pkgver=2.5.3
-pkgrel=2
-pkgdesc="IP address management and data center infrastructure management tool"
-url="https://netbox.io"
-arch="" # Requires py3-pygfm==0.14 which requires py3-markdown<3.0, our py-markdown is 3.1.1
-license="Apache-2.0"
-depends="
- py3-django
- py3-django-cors-headers
- py3-django-debug-toolbar
- py3-django-filter
- py3-django-mptt
- py3-django-rest-swagger
- py3-django-tables2
- py3-django-taggit
- py3-django-timezone-field
- py3-drf-yasg
- py3-future
- py3-graphviz
- py3-gunicorn
- py3-inflection
- py3-markdown
- py3-natsort
- py3-netaddr
- py3-paramiko
- py3-pillow
- py3-psycopg2
- py3-pygfm
- py3-ruamel
- py3-xmltodict
- py3-django-rest-framework
- py3-django-taggit-serializer
- py3-napalm
- py3-ncclient
- py3-pycryptodome
-"
-install="$pkgname.pre-install $pkgname.post-upgrade"
-subpackages="$pkgname-doc $pkgname-openrc"
-options="!check" # no testsuite
-pkgusers="netbox"
-pkggroups="netbox"
-source="$pkgname-$pkgver.tar.gz::https://github.com/digitalocean/netbox/archive/v$pkgver.tar.gz
- gunicorn_config.py
- netbox.nginx-sample
- $pkgname.initd
- $pkgname.logrotated
- set-config-defaults.patch
- "
-builddir="$srcdir"/$pkgname-$pkgver
-
-build() {
- return 0
-}
-
-package() {
- cd "$builddir"
- local destdir=usr/share/webapps
- local conffile=etc/$pkgname/configuration.py
- mkdir -p "$pkgdir"/$destdir \
- "$pkgdir"/usr/share/doc \
- "$pkgdir"/etc/$pkgname
- mv $pkgname "$pkgdir"/$destdir
- mkdir -p "$pkgdir"/$destdir/$pkgname/static
- mv docs "$pkgdir"/usr/share/doc/$pkgname
- mv "$pkgdir"/$destdir/$pkgname/$pkgname/configuration.example.py \
- "$pkgdir"/$conffile
-
- # in order to install the static files we need a working config file
- # and temporarily set minimum settings in config file
- ln -s "$pkgdir"/$conffile \
- "$pkgdir"/$destdir/$pkgname/$pkgname/configuration.py
- sed -i "s/SECRET_KEY.*/SECRET_KEY = \'abcdefghk123456789\'/" \
- "$pkgdir"/$conffile
-
- # install static files
- python3 "$pkgdir"/$destdir/$pkgname/manage.py collectstatic --noinput --clear --link
- # let's move instead of linking static files originating from netbox
- local dir; for dir in "$pkgdir"/$destdir/$pkgname/project-static/*; do
- rm -rf "$pkgdir"/$destdir/$pkgname/static/$(basename $dir)
- mv $dir "$pkgdir"/$destdir/$pkgname/static
- done
-
- install -m644 "$srcdir"/gunicorn_config.py "$pkgdir"/$destdir/$pkgname
- install -D -m644 "$srcdir"/netbox.nginx-sample "$pkgdir"/etc/nginx/netbox.sample
- install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
- install -D -m644 "$srcdir"/$pkgname.logrotated "$pkgdir"/etc/logrotate.d/$pkgname
- install -d -m755 -o netbox -g netbox "$pkgdir"/var/lib/$pkgname/media
-
- # undo temp stuff
- ln -sf /$conffile "$pkgdir"/$destdir/$pkgname/$pkgname/configuration.py
- sed -i "s/SECRET_KEY.*/SECRET_KEY = \'\'/" "$pkgdir"/$conffile
-}
-
-sha512sums="f61adc8fd527481b837775e7023ecc83bc064d6c85d65e731d48c7969ae8ffbfe02be622d9fcda48daf0a237e71071d4f6725bca6d7def30ecb90c96407f1bd7 netbox-2.5.3.tar.gz
-09d8e40d98d113458ee602de85306ac1a24fbb0015fbc4bb77812dae05096cb7b9c50770f650fd2ac78a388f35d7752ce8021790e952234a39c8b3e73a4ea3db gunicorn_config.py
-b5c3dc0ad2ebaacf43dfa41880dc7d677a763a3fadf1ccd0a6a9ec744d1648ca72f6a55893d09fd843b399559e2411a98b0ded597669f18a34f305f5ccb57c06 netbox.nginx-sample
-d4467109d803f42f8d9b088951d6123b9088f0069a4db280c2ca5e5a57bf746d1faa70d0f542154149e60f21891876f7c15da360e07eec8c8a36f5aac65509d3 netbox.initd
-a87dd52264f5ea00dbb774e54332480615850aa0056e60e13963481e8390bee73ceb519873fa11d357a29911c4e34a30c4623f4c206f765af6e64f379314e5a8 netbox.logrotated
-6b9eb0dcf8d5a267c3c88b81468d1fd7a7971cc084370a44f1ea5b61b08a30e9339f838e97947a0c65f385ed69fc5122592eca0ee5ff6e00cf5ec0f2dbe4c59f set-config-defaults.patch"
diff --git a/testing/netbox/gunicorn_config.py b/testing/netbox/gunicorn_config.py
deleted file mode 100644
index 7de9b24a33b..00000000000
--- a/testing/netbox/gunicorn_config.py
+++ /dev/null
@@ -1,5 +0,0 @@
-command = '/usr/bin/gunicorn'
-pythonpath = '/usr/share/webapps/netbox'
-bind = '127.0.0.1:8001'
-workers = 3
-user = 'netbox'
diff --git a/testing/netbox/netbox.initd b/testing/netbox/netbox.initd
deleted file mode 100644
index 6b135dbb080..00000000000
--- a/testing/netbox/netbox.initd
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/sbin/openrc-run
-
-_port=8080
-_bind=0.0.0.0
-_basedir=/usr/share/webapps/netbox
-_logfile="/var/log/${RC_SVCNAME}"
-pidfile="/run/netbox/${RC_SVCNAME}.pid"
-command=/usr/bin/gunicorn
-command_args="--daemon \
- --pid $pidfile \
- --log-file $_logfile \
- --log-level info \
- -c $_basedir/gunicorn_config.py netbox.wsgi"
-command_user="netbox"
-command_group="netbox"
-
-start_pre() {
- checkpath --directory /run/${RC_SVCNAME} /var/log/${RC_SVCNAME} \
- --owner $command_user:$command_group --mode 755
-}
-
diff --git a/testing/netbox/netbox.logrotated b/testing/netbox/netbox.logrotated
deleted file mode 100644
index c3cc2651265..00000000000
--- a/testing/netbox/netbox.logrotated
+++ /dev/null
@@ -1,8 +0,0 @@
-/var/log/netbox/*.log {
- weekly
- rotate 4
- missingok
- notifempty
- sharedscripts
- copytruncate
-}
diff --git a/testing/netbox/netbox.nginx-sample b/testing/netbox/netbox.nginx-sample
deleted file mode 100644
index 37c2a943bac..00000000000
--- a/testing/netbox/netbox.nginx-sample
+++ /dev/null
@@ -1,20 +0,0 @@
-server {
- listen 80;
-
- server_name netbox.mydomain;
-
- client_max_body_size 25m;
-
- location /static/ {
- alias /usr/share/webapps/netbox/static/;
- }
-
- location / {
- proxy_pass http://127.0.0.1:8001;
- proxy_set_header X-Forwarded-Host $server_name;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-Proto $scheme;
- add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
- }
-}
-
diff --git a/testing/netbox/netbox.post-upgrade b/testing/netbox/netbox.post-upgrade
deleted file mode 100755
index bfc3a63f72e..00000000000
--- a/testing/netbox/netbox.post-upgrade
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-echo
-echo "* Please run:"
-echo "*"
-echo "* 'python3 /usr/share/webapps/netbox/manage.py migrate'"
-echo "*"
-echo "* in order to complete the upgrade."
-echo
diff --git a/testing/netbox/netbox.pre-install b/testing/netbox/netbox.pre-install
deleted file mode 100755
index 22b96ba8be3..00000000000
--- a/testing/netbox/netbox.pre-install
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-addgroup -S netbox 2>/dev/null
-adduser -S -h /var/log/netbox -s /sbin/nologin -G netbox -D netbox 2>/dev/null
-exit 0
diff --git a/testing/netbox/set-config-defaults.patch b/testing/netbox/set-config-defaults.patch
deleted file mode 100644
index 73b8b629b31..00000000000
--- a/testing/netbox/set-config-defaults.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/netbox/netbox/configuration.example.py
-+++ b/netbox/netbox/configuration.example.py
-@@ -98,7 +98,7 @@
-
- # The file path where uploaded media such as image attachments are stored. A trailing slash is not needed. Note that
- # the default value of this setting is derived from the installed location.
--# MEDIA_ROOT = '/opt/netbox/netbox/media'
-+MEDIA_ROOT = '/var/lib/netbox/media'
-
- # Credentials that NetBox will uses to authenticate to devices when connecting via NAPALM.
- NAPALM_USERNAME = ''