update netbox-4.3.6, added some new deps
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -20,6 +20,7 @@ DOCS="README.md"
|
||||
|
||||
RDEPEND=">=dev-python/graphql-core-3.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/typing-extensions-4.5.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-dateutil-2.7.0[${PYTHON_USEDEP}]"
|
||||
>=dev-python/python-dateutil-2.7.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/lia-web-0.2.1[${PYTHON_USEDEP}]"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
129
www-apps/netbox/netbox-4.3.6-r1.ebuild
Normal file
129
www-apps/netbox/netbox-4.3.6-r1.ebuild
Normal file
@@ -0,0 +1,129 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
WEBAPP_MANUAL_SLOT="yes"
|
||||
|
||||
inherit python-r1 webapp
|
||||
|
||||
DESCRIPTION="IP address and data center infrastructure management tool"
|
||||
HOMEPAGE="https://github.com/netbox-community/netbox"
|
||||
SRC_URI="https://github.com/netbox-community/${PN}/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm arm64 x86"
|
||||
IUSE="ldap vhosts"
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
RDEPEND="acct-user/netbox
|
||||
${PYTHON_DEPS}
|
||||
~dev-python/django-5.2.5[${PYTHON_USEDEP}]
|
||||
~dev-python/django-cors-headers-4.7.0[${PYTHON_USEDEP}]
|
||||
~dev-python/django-debug-toolbar-5.2.0[${PYTHON_USEDEP}]
|
||||
~dev-python/django-filter-25.1[${PYTHON_USEDEP}]
|
||||
~dev-python/django-htmx-1.23.2[${PYTHON_USEDEP}]
|
||||
~dev-python/django-graphiql-debug-toolbar-0.2.0[${PYTHON_USEDEP}]
|
||||
~dev-python/django-mptt-0.17.0[${PYTHON_USEDEP}]
|
||||
~dev-python/django-pglocks-1.0.4[${PYTHON_USEDEP}]
|
||||
~dev-python/django-prometheus-2.4.1[${PYTHON_USEDEP}]
|
||||
~dev-python/django-redis-6.0.0[${PYTHON_USEDEP}]
|
||||
~dev-python/django-rich-2.0.0[${PYTHON_USEDEP}]
|
||||
~dev-python/django-rq-3.1[${PYTHON_USEDEP}]
|
||||
~dev-python/django-storages-1.14.6[${PYTHON_USEDEP}]
|
||||
~dev-python/django-taggit-6.1.0[${PYTHON_USEDEP}]
|
||||
~dev-python/django-tables2-2.7.5[${PYTHON_USEDEP}]
|
||||
~dev-python/django-timezone-field-7.1[${PYTHON_USEDEP}]
|
||||
~dev-python/djangorestframework-3.16.1[${PYTHON_USEDEP}]
|
||||
~dev-python/drf-spectacular-0.28.0[${PYTHON_USEDEP}]
|
||||
~dev-python/drf-spectacular-sidecar-2025.8.1[${PYTHON_USEDEP}]
|
||||
~dev-python/feedparser-6.0.11[${PYTHON_USEDEP}]
|
||||
~www-servers/gunicorn-23.0.0[${PYTHON_USEDEP}]
|
||||
~dev-python/jinja2-3.1.6[${PYTHON_USEDEP}]
|
||||
~dev-python/markdown-3.8.2[${PYTHON_USEDEP}]
|
||||
~dev-python/mkdocs-material-9.6.16[${PYTHON_USEDEP}]
|
||||
~dev-python/mkdocstrings-0.30.0[${PYTHON_USEDEP}]
|
||||
~dev-python/netaddr-1.3.0[${PYTHON_USEDEP}]
|
||||
~dev-python/nh3-0.3.0[${PYTHON_USEDEP}]
|
||||
~dev-python/pillow-11.3.0[${PYTHON_USEDEP}]
|
||||
~dev-python/psycopg-3.2.9[${PYTHON_USEDEP}]
|
||||
~dev-python/pyyaml-6.0.2[${PYTHON_USEDEP}]
|
||||
~dev-python/requests-2.32.4[${PYTHON_USEDEP}]
|
||||
~dev-python/rq-2.4.1[${PYTHON_USEDEP}]
|
||||
~dev-python/social-auth-app-django-5.5.1[${PYTHON_USEDEP}]
|
||||
~dev-python/social-auth-core-4.7.0[${PYTHON_USEDEP}]
|
||||
~dev-python/strawberry-graphql-0.278.1[${PYTHON_USEDEP}]
|
||||
~dev-python/strawberry-graphql-django-0.65.1[${PYTHON_USEDEP}]
|
||||
~dev-python/svgwrite-1.4.3[${PYTHON_USEDEP}]
|
||||
~dev-python/tablib-3.8.0[${PYTHON_USEDEP}]
|
||||
~dev-python/tzdata-2025.2[${PYTHON_USEDEP}]
|
||||
ldap? ( dev-python/django-auth-ldap[${PYTHON_USEDEP}] )"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
DOCS=( {CHANGELOG,CONTRIBUTING,README}.md )
|
||||
|
||||
pkg_setup() {
|
||||
python_setup
|
||||
webapp_pkg_setup
|
||||
}
|
||||
|
||||
src_install() {
|
||||
webapp_src_preinst
|
||||
|
||||
insinto "${MY_HTDOCSDIR}"
|
||||
doins -r netbox/.
|
||||
|
||||
exeinto "${MY_HTDOCSDIR}"
|
||||
doexe netbox/generate_secret_key.py
|
||||
doexe netbox/manage.py
|
||||
|
||||
webapp_src_install
|
||||
|
||||
newinitd "${FILESDIR}"/netbox-rqworker.initd netbox-rqworker
|
||||
newconfd "${FILESDIR}"/netbox-rqworker.confd netbox-rqworker
|
||||
diropts -o netbox -g netbox -m 0700
|
||||
keepdir /var/log/netbox
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "You may need to add your web-server user to netbox group"
|
||||
elog "---"
|
||||
|
||||
webapp_pkg_postinst
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
einfo "Enter your vhost_root/vhost_htdocs. Default: localhost/htdocs"
|
||||
read -r answer
|
||||
[ -z "${answer}" ] && answer="localhost/htdocs"
|
||||
path="/var/www/${answer}/netbox"
|
||||
unset answer
|
||||
|
||||
if [ -f "${path}/netbox/configuration.py" ] ; then
|
||||
einfo "Applies database migrations from ${path} ?"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read -r answer
|
||||
if [[ "$answer" =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ "$answer" =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting migration."
|
||||
else
|
||||
echo "Answer not recognized" || die "echo failed"
|
||||
fi
|
||||
done
|
||||
# Apply database migrations
|
||||
"${path}"/manage.py migrate || die "migrations failed"
|
||||
fi
|
||||
|
||||
if [ ! -d "${path}/static" ] ; then
|
||||
# Collect static files
|
||||
"${path}"/manage.py collectstatic || die "collectstatic failed"
|
||||
fowners -R netbox:netbox "${path}"/static
|
||||
else
|
||||
einfo "Not managing static files since ${path}/static exists"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user