diff --git a/www-apps/netbox/#netbox-4.2.1.ebuild# b/www-apps/netbox/#netbox-4.2.1.ebuild# new file mode 100644 index 0000000..a631646 --- /dev/null +++ b/www-apps/netbox/#netbox-4.2.1.ebuild# @@ -0,0 +1,128 @@ +# 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.1.4[${PYTHON_USEDEP}] + ~dev-python/django-cors-headers-4.6.0[${PYTHON_USEDEP}] + ~dev-python/django-debug-toolbar-4.4.6[${PYTHON_USEDEP}] + ~dev-python/django-filter-24.3[${PYTHON_USEDEP}] + ~dev-python/django-htmx-1.21.0[${PYTHON_USEDEP}] + ~dev-python/django-graphiql-debug-toolbar-0.2.0[${PYTHON_USEDEP}] + ~dev-python/django-mptt-0.16.0[${PYTHON_USEDEP}] + ~dev-python/django-pglocks-1.0.4[${PYTHON_USEDEP}] + ~dev-python/django-prometheus-2.3.1[${PYTHON_USEDEP}] + ~dev-python/django-redis-5.4.0[${PYTHON_USEDEP}] + ~dev-python/django-rich-1.13.0[${PYTHON_USEDEP}] + ~dev-python/django-rq-3.0.0[${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.0[${PYTHON_USEDEP}] + ~dev-python/djangorestframework-3.15.2[${PYTHON_USEDEP}] + ~dev-python/drf-spectacular-0.28.0[${PYTHON_USEDEP}] + ~dev-python/drf-spectacular-sidecar-2024.12.1[${PYTHON_USEDEP}] + ~dev-python/feedparser-6.0.11[${PYTHON_USEDEP}] + ~www-servers/gunicorn-23.0.0[${PYTHON_USEDEP}] + ~dev-python/jinja2-3.1.4[${PYTHON_USEDEP}] + ~dev-python/markdown-3.7[${PYTHON_USEDEP}] + ~dev-python/mkdocs-material-9.5.49[${PYTHON_USEDEP}] + ~dev-python/mkdocstrings-0.27.0[${PYTHON_USEDEP}] + ~dev-python/netaddr-1.3.0[${PYTHON_USEDEP}] + ~dev-python/nh3-0.2.20[${PYTHON_USEDEP}] + ~dev-python/pillow-11.1.0[${PYTHON_USEDEP}] + ~dev-python/psycopg-3.2.3[${PYTHON_USEDEP}] + ~dev-python/pyyaml-6.0.2[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + dev-python/rq[${PYTHON_USEDEP}] + dev-python/social-auth-app-django[${PYTHON_USEDEP}] + dev-python/social-auth-core[${PYTHON_USEDEP}] + dev-python/strawberry-graphql[${PYTHON_USEDEP}] + ~dev-python/strawberry-graphql-django-0.52.0[${PYTHON_USEDEP}] + ~dev-python/svgwrite-1.4.3[${PYTHON_USEDEP}] + ~dev-python/tablib-3.7.0[${PYTHON_USEDEP}] + ~dev-python/tzdata-2024.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 +} diff --git a/www-apps/netbox/Manifest b/www-apps/netbox/Manifest index a61bf5a..f6af98e 100644 --- a/www-apps/netbox/Manifest +++ b/www-apps/netbox/Manifest @@ -4,8 +4,11 @@ DIST netbox-4.0.6.gh.tar.gz 18377501 BLAKE2B 9947f9eeb195d83b0428b5f0a2c01e77d61 DIST netbox-4.0.7.gh.tar.gz 18385915 BLAKE2B 62ea6871ec61fdb42bdcebf821c46b26a53d13ea3b5e49294c6d5231686d30e74eb2de5acbc29927d8cc5e25ceaf5453fca50cbf2aa5d3c3e6f3dfcabab184df SHA512 e7fce63a8fb426d8072f048ee6cd4f6964c43d971b5dcc6695e0eeb78ef178b7e229cda87ecfca7179ff92625b28a792dc362f6789b9ac4990a89c91b8c981bc DIST netbox-4.1.10.gh.tar.gz 18109535 BLAKE2B 3782903c0dedffc99df7a67ad6b8b514169cbcf9057f504134fd1ce7c04920291b322a8d993ce3fab7cbff589539f8354042b078d87eff6ce8d4ee0dd125a086 SHA512 e89d1acc34fe187b0ec1578abdfe9fad4df1e6c5184b382731e488aa40dec04dfe976aac6124bcec47e842b86e0be2822973f02abac1148f2043775e9cdaae3b DIST netbox-4.2.0.gh.tar.gz 18193437 BLAKE2B 9b243e3c2cde73decad6da2e1985c546341b11046a7a8080cbf11997a2d335d0462a164115ccb92aeacd46c79cfdcc7a737f01943e8fe7e804f6b702ef75ceb9 SHA512 4bbf78a19b13cea96d9a036e6d4bd91c6fb2c3978396a80862b176ce1694270727dba7e8b748b1a556d95245faf4faab3d158d6717c7ea82231e887295535916 +DIST netbox-4.2.1.gh.tar.gz 18196921 BLAKE2B e26d8b8d2c6b42539700aa4a400d3d67c0ab0ba68298111466c412df1581bc58433c4c6d1f0a101eb2864a73f05ec86f48feea94d0bb5cdd3d5a0f36206b769d SHA512 c66ecca5acdf330fa4ec8e4576050751d856d96faecc3d9ed87142f7b4ae0543563b4d42fe728d3b1fbdf22afbdf63244de5d4b2b71126c13f3f41774ca45510 EBUILD netbox-4.0.6.ebuild 4127 BLAKE2B 36c052b0c68cb1f458e81c456988557fc7d6347816a7bc19d221982f106d8abeccb91e7d12a39cef5e4d562937adfb51602c7fd7d8409f060ef32d5f847a6870 SHA512 bb137e81fbea66ffca9f580636d02cf262d558559c9e46d377e800cfcfc94c3413dcb060f907469547b9194718e78843a8cbd452b5bb94549d868bc4b0244896 EBUILD netbox-4.0.7.ebuild 4124 BLAKE2B 52c11a10cc2c5bbcc6502abf48fe141854be50b2bcda2e161a1b5fa00babf33630cfe79f27f0ac306f4cd8054bbc9a947b64feba1575e69220e3968d3e33f4bd SHA512 67f3c0b41fe251f73fa74b1dc58d3481b578a64d8e5e2b400c453d9f30e74fc339c9c7cf418e3f734b41443d9fd5e43898cbf7545dbeaf110bf2c33f41e08dd0 EBUILD netbox-4.1.10.ebuild 4167 BLAKE2B c6096d69760444b5bed1db5f7932ad146a34a70ba5930893a22000ce4c8cef874359dffb418ac58b14fd460e7481923abaf8fa5884bfbed58da6444b61e0e713 SHA512 a8d6a65ee51a5dc9f7cc1b69d778e3de1deb8725b84fac3aa5366db1c0b8fb686fab9878eb57c579a0e8e8d4090a50dd7e5cdf1d443918af86c216308298cb60 EBUILD netbox-4.2.0.ebuild 4166 BLAKE2B a674bcccbc97e32e303a52cf0f018d731eb6c8ffa505a93f25748ea872653c1666c00f1ee1690752b966350949906f62b31a527a397d4dcee4f2e506f12820e3 SHA512 d209f9f28786f7a745dab04f47003092a1f9da75c3566e1dc63b2649ebdc1bf57ddb85a3a50b193c3723c56930bc3144da80591de796e3ac90cf1e8af1add4e7 +EBUILD netbox-4.2.1.ebuild 4166 BLAKE2B 621601dde6787f3c3b8ae2d4b4920accbff374edbc961a1e65e67f4ba108f83e8df6095cc5b9d91bd6f95f82102495931a95ed95726ac84950ae4b141eabf264 SHA512 cba0b12aa4f99c5883654b4a5701a20f43103baf72b1b6d02dc7cceea140811ed4eac8fe17323443c5bb581883c1a12f4424a4832be5691b614638d27782f1bc +MISC #netbox-4.2.1.ebuild# 4128 BLAKE2B 702c6864c618aa128644df80794e144cce0ebb5af12bf21d3c693bfcfcadb4fbd44374416113e8deba43fa45b74b9d1ad1b680a50595a1716546443fcfd73be7 SHA512 fa7f3a065922e1f566e55c0624a57430fc2866bfb02e469eed9eed11c6e85deaf6dd0176232f332da82da9925521b4abb1e42c6f359fbff96615f490407b2ec9 MISC metadata.xml 512 BLAKE2B 0e1aaf248033d7e5ed9c1a2d621687e23c790c906b096a28d4bf07b68816f8695f34c098acb349d8ae9a93d5d34fb35c96046982568a8f180ce2cbf0caa7d19a SHA512 a4634d9f88bcb8d7c35c7785c56e9031ff29dcb9ded7c11890a2474cf166b59decd90a79a5148ee5774de9cb6fb7eb23f09839c65a10b2747bead811bd8a1513 diff --git a/www-apps/netbox/netbox-4.2.1.ebuild b/www-apps/netbox/netbox-4.2.1.ebuild new file mode 100644 index 0000000..d6111dc --- /dev/null +++ b/www-apps/netbox/netbox-4.2.1.ebuild @@ -0,0 +1,128 @@ +# 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.1.4[${PYTHON_USEDEP}] + ~dev-python/django-cors-headers-4.6.0[${PYTHON_USEDEP}] + ~dev-python/django-debug-toolbar-4.4.6[${PYTHON_USEDEP}] + ~dev-python/django-filter-24.3[${PYTHON_USEDEP}] + ~dev-python/django-htmx-1.21.0[${PYTHON_USEDEP}] + ~dev-python/django-graphiql-debug-toolbar-0.2.0[${PYTHON_USEDEP}] + ~dev-python/django-mptt-0.16.0[${PYTHON_USEDEP}] + ~dev-python/django-pglocks-1.0.4[${PYTHON_USEDEP}] + ~dev-python/django-prometheus-2.3.1[${PYTHON_USEDEP}] + ~dev-python/django-redis-5.4.0[${PYTHON_USEDEP}] + ~dev-python/django-rich-1.13.0[${PYTHON_USEDEP}] + ~dev-python/django-rq-3.0.0[${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.0[${PYTHON_USEDEP}] + ~dev-python/djangorestframework-3.15.2[${PYTHON_USEDEP}] + ~dev-python/drf-spectacular-0.28.0[${PYTHON_USEDEP}] + ~dev-python/drf-spectacular-sidecar-2024.12.1[${PYTHON_USEDEP}] + ~dev-python/feedparser-6.0.11[${PYTHON_USEDEP}] + ~www-servers/gunicorn-23.0.0[${PYTHON_USEDEP}] + ~dev-python/jinja2-3.1.4[${PYTHON_USEDEP}] + ~dev-python/markdown-3.7[${PYTHON_USEDEP}] + ~dev-python/mkdocs-material-9.5.49[${PYTHON_USEDEP}] + ~dev-python/mkdocstrings-0.27.0[${PYTHON_USEDEP}] + ~dev-python/netaddr-1.3.0[${PYTHON_USEDEP}] + ~dev-python/nh3-0.2.20[${PYTHON_USEDEP}] + ~dev-python/pillow-11.1.0[${PYTHON_USEDEP}] + ~dev-python/psycopg-3.2.3[${PYTHON_USEDEP}] + ~dev-python/pyyaml-6.0.2[${PYTHON_USEDEP}] + ~dev-python/requests-2.32.3[${PYTHON_USEDEP}] + ~dev-python/rq-2.1.0[${PYTHON_USEDEP}] + ~dev-python/social-auth-app-django-5.4.2[${PYTHON_USEDEP}] + ~dev-python/social-auth-core-4.5.4[${PYTHON_USEDEP}] + ~dev-python/strawberry-graphql-0.256.1[${PYTHON_USEDEP}] + ~dev-python/strawberry-graphql-django-0.52.0[${PYTHON_USEDEP}] + ~dev-python/svgwrite-1.4.3[${PYTHON_USEDEP}] + ~dev-python/tablib-3.7.0[${PYTHON_USEDEP}] + ~dev-python/tzdata-2024.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 +}