www-apps/netbox: Version bump to 3.0.2

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr
This commit is contained in:
Alarig Le Lay 2021-09-16 16:53:36 +02:00
parent fdd198c5de
commit 5f536a3643
Signed by: alarig
GPG Key ID: 7AFE62C6DF8BCDEC
5 changed files with 24 additions and 228 deletions

View File

@ -1,3 +1,2 @@
DIST netbox-2.11.12.tar.gz 7125072 BLAKE2B 4136748fed3b6559aecdf489f2f300f656c8b617fb62442fe94d2f08f58a21b493062e8d24e2ee94889e3e530f9f757adfe3eaef78ee4a240c7a1c584ad2bf5d SHA512 6c4c0ad99d6df9b8a97065e2f326ce46d666313c6eb93e72c163f32a1ed7450409ab528ceee97b8c12f9702d333dd51d8dd4402eddcfe338598d5bfd05d9a72f
DIST netbox-2.11.3.tar.gz 7102639 BLAKE2B cc4339c6ceb3446467b21959deb20995059e9852742e4049282a446035a68b23175a7d971587763cb43bdcef206f3918995705e9b2ec2ecebfd32615586b8d87 SHA512 7e12bc7731d8d3f0d4b3c622689b21ac7d50236bb071d8d60247d8810e6867689f8bda54f84c90a0d64631308517bf78f8f7bcf024495fdc6e9a7167eee94439
DIST netbox-2.11.4.tar.gz 7104191 BLAKE2B 169808bcf26b1d68e6cc4254815b6b44b7bf1da2649c748a405894c08bd32efba32c66676325ad936a7b3436de9c099e887c1350a918fbde3e360758e82134f3 SHA512 01099b2ba64de698e90b3eeef18fe38c698a910031a328f22bbd7dedaf0a2e3f56450e87a37e4fed1fb6478e5ffd5aec67f10a91987a6d66cda742995c6133a9
DIST netbox-3.0.2.tar.gz 4484771 BLAKE2B 37a586024d00fbc4df2c1efb3f425e825f346dfe5160120d9788fa548752209063d4ebd8fcb54b3ee1e773e15be4c6abcda013be94a80215434031e53e0a626f SHA512 c5aa787ba71878275d8d2cb32f17ef3f4d809c886e80bbc07810a34ad225f0ff744a88cf6a39b05d5ef871615b3b11aa0922ceffe30c2fd20bd99324a247f2d2

View File

@ -1,86 +0,0 @@
--- a/upgrade.sh 2021-05-27 14:20:37.745680148 +0200
+++ b/upgrade.sh 2021-05-27 14:21:53.256311952 +0200
@@ -3,59 +3,6 @@
# its most recent release.
cd "$(dirname "$0")"
-VIRTUALENV="$(pwd -P)/venv"
-
-# Remove the existing virtual environment (if any)
-if [ -d "$VIRTUALENV" ]; then
- COMMAND="rm -rf ${VIRTUALENV}"
- echo "Removing old virtual environment..."
- eval $COMMAND
-else
- WARN_MISSING_VENV=1
-fi
-
-# Create a new virtual environment
-COMMAND="/usr/bin/python3 -m venv ${VIRTUALENV}"
-echo "Creating a new virtual environment at ${VIRTUALENV}..."
-eval $COMMAND || {
- echo "--------------------------------------------------------------------"
- echo "ERROR: Failed to create the virtual environment. Check that you have"
- echo "the required system packages installed and the following path is"
- echo "writable: ${VIRTUALENV}"
- echo "--------------------------------------------------------------------"
- exit 1
-}
-
-# Activate the virtual environment
-source "${VIRTUALENV}/bin/activate"
-
-# Upgrade pip
-COMMAND="pip install --upgrade pip"
-echo "Updating pip ($COMMAND)..."
-eval $COMMAND || exit 1
-pip -V
-
-# Install necessary system packages
-COMMAND="pip install wheel"
-echo "Installing Python system packages ($COMMAND)..."
-eval $COMMAND || exit 1
-
-# Install required Python packages
-COMMAND="pip install -r requirements.txt"
-echo "Installing core dependencies ($COMMAND)..."
-eval $COMMAND || exit 1
-
-# Install optional packages (if any)
-if [ -s "local_requirements.txt" ]; then
- COMMAND="pip install -r local_requirements.txt"
- echo "Installing local dependencies ($COMMAND)..."
- eval $COMMAND || exit 1
-elif [ -f "local_requirements.txt" ]; then
- echo "Skipping local dependencies (local_requirements.txt is empty)"
-else
- echo "Skipping local dependencies (local_requirements.txt not found)"
-fi
-
# Apply any database migrations
COMMAND="python3 netbox/manage.py migrate"
echo "Applying database migrations ($COMMAND)..."
@@ -86,23 +33,5 @@
echo "Clearing cache data ($COMMAND)..."
eval $COMMAND || exit 1
-if [ -v WARN_MISSING_VENV ]; then
- echo "--------------------------------------------------------------------"
- echo "WARNING: No existing virtual environment was detected. A new one has"
- echo "been created. Update your systemd service files to reflect the new"
- echo "Python and gunicorn executables. (If this is a new installation,"
- echo "this warning can be ignored.)"
- echo ""
- echo "netbox.service ExecStart:"
- echo " ${VIRTUALENV}/bin/gunicorn"
- echo ""
- echo "netbox-rq.service ExecStart:"
- echo " ${VIRTUALENV}/bin/python"
- echo ""
- echo "After modifying these files, reload the systemctl daemon:"
- echo " > systemctl daemon-reload"
- echo "--------------------------------------------------------------------"
-fi
-
echo "Upgrade complete! Don't forget to restart the NetBox services:"
echo " > sudo systemctl restart netbox netbox-rq"

View File

@ -1,10 +1,11 @@
--- a/upgrade.sh 2021-05-08 16:28:49.168776455 +0200
+++ b/upgrade.sh 2021-05-08 16:29:26.172932950 +0200
@@ -3,58 +3,6 @@
# its most recent release.
--- a/upgrade.sh 2021-09-16 16:18:18.520099120 +0200
+++ b/upgrade.sh 2021-09-16 16:19:02.730460864 +0200
@@ -7,59 +7,6 @@
# Python 3.7 or later.
cd "$(dirname "$0")"
-VIRTUALENV="$(pwd -P)/venv"
-PYTHON="${PYTHON:-python3}"
-
-# Remove the existing virtual environment (if any)
-if [ -d "$VIRTUALENV" ]; then
@ -16,7 +17,7 @@
-fi
-
-# Create a new virtual environment
-COMMAND="/usr/bin/python3 -m venv ${VIRTUALENV}"
-COMMAND="${PYTHON} -m venv ${VIRTUALENV}"
-echo "Creating a new virtual environment at ${VIRTUALENV}..."
-eval $COMMAND || {
- echo "--------------------------------------------------------------------"
@ -57,5 +58,5 @@
- echo "Skipping local dependencies (local_requirements.txt not found)"
-fi
# Apply any database migrations
COMMAND="python3 netbox/manage.py migrate"
# Test schema migrations integrity
COMMAND="python3 netbox/manage.py showmigrations"

View File

@ -1,121 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7..9} )
inherit python-single-r1 readme.gentoo-r1
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}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="ldap"
REQUIRED_USE=${PYTHON_REQUIRED_USE}
RDEPEND="
acct-group/netbox
acct-user/netbox
${PYTHON_DEPS}
$(python_gen_cond_dep '
>=dev-python/django-3.2.2[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-cacheops-6.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-cors-headers-3.7.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-debug-toolbar-3.2.1[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-filter-2.4.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-mptt-0.12.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-pglocks-1.0.4[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-prometheus-2.1.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-rq-2.4.1[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-tables2-2.3.4[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-taggit-1.4.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-timezone-field-4.1.2[${PYTHON_MULTI_USEDEP}]
>=dev-python/djangorestframework-3.12.4[${PYTHON_MULTI_USEDEP}]
>=dev-python/drf-yasg-1.20.0[${PYTHON_MULTI_USEDEP},validation]
>=dev-python/jinja-2.11.3[${PYTHON_MULTI_USEDEP}]
>=dev-python/markdown-3.3.4[${PYTHON_MULTI_USEDEP}]
>=dev-python/netaddr-0.8.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/pillow-8.2.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/psycopg-2.8.6[${PYTHON_MULTI_USEDEP}]
>=dev-python/pycryptodome-3.10.1[${PYTHON_MULTI_USEDEP}]
>=dev-python/pyyaml-5.4.1[${PYTHON_MULTI_USEDEP}]
>=dev-python/svgwrite-1.4.1[${PYTHON_MULTI_USEDEP}]
>=dev-python/tablib-3.0.0[${PYTHON_MULTI_USEDEP}]
www-servers/gunicorn[${PYTHON_MULTI_USEDEP}]
ldap? ( >=dev-python/django-auth-ldap-1.7[${PYTHON_MULTI_USEDEP}] )
')"
DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${P}-no-pip.patch
)
DISABLE_AUTOFORMATTING=YES
DOC_CONTENTS="
netbox is installed on your system. However, there are some manual steps
you need to complete from the installation guide [1].
On Gentoo, the configuration files you need to edit are located in
/etc/netbox, not /opt/netbox as shown in the installation guide.
If this is a new installation, please follow the installation guide
other than this difference. Also, if you need ldap, set the appropriate
use flag when emerging netbox to install the dependency for it.
Once that is done, you should be able to add the netbox service to the
default runlevel and start it.
If you want to use webhooks, you should also add the netbox-rqworker
service to the default runlevel and start it.
If this is an upgrade, follow these instructions:
Stop the netbox service. If the netbox-rqworker service is running,
stop it as well.
Next, run the upgrade script as described in the upgrading guide[2].
Next, check for new configuration options and set them as appropriate
for your system.
Next, start the netbox service.
Finally, if you are using webhooks, start the netbox-rqworker service.
[1] https://netbox.readthedocs.io/en/stable/installation/
[2] https://netbox.readthedocs.io/en/stable/installation/upgrading/
"
src_install() {
dodir /opt
cp -a ../${P} "${ED}"/opt
dosym ${P} /opt/netbox
dosym ../../etc/netbox/gunicorn_config.py /opt/netbox/gunicorn_config.py
dosym ../../../../etc/netbox/configuration.py \
/opt/netbox/netbox/netbox/configuration.py
dodir /etc/netbox
insinto /etc/netbox
newins netbox/netbox/configuration.example.py configuration.py
doins "${FILESDIR}"/gunicorn_config.py
fowners -R netbox:netbox /etc/netbox /opt/${P}
fowners -h netbox:netbox /opt/netbox
fperms o= /etc/netbox/configuration.py /etc/netbox/gunicorn_config.py
newinitd "${FILESDIR}"/${PN}.initd ${PN}
newinitd "${FILESDIR}"/${PN}-rqworker.initd ${PN}-rqworker
keepdir /var/log/netbox
fowners -R netbox:netbox /var/log/netbox
readme.gentoo_create_doc
}
pkg_postinst() {
readme.gentoo_print_elog
local r
for r in $REPLACING_VERSIONS; do
if [[ $r = "2.5.10" ]]; then
ewarn "The home directory of the netbox user is now /var/lib/netbox"
ewarn "Please adjust your system."
fi
done
}

View File

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7..9} )
PYTHON_COMPAT=( python3_{8..9} )
inherit python-single-r1 readme.gentoo-r1
DESCRIPTION="IP address and data center infrastructure management tool"
@ -20,30 +20,33 @@ RDEPEND="
acct-user/netbox
${PYTHON_DEPS}
$(python_gen_cond_dep '
>=dev-python/django-3.2.3[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-cacheops-6.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-cors-headers-3.7.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-debug-toolbar-3.2.1[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-3.2.7[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-cors-headers-3.8.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-debug-toolbar-3.2.2[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-filter-2.4.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-mptt-0.12.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-graphiql-debug-toolbar-0.2.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-mptt-0.13.3[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-pglocks-1.0.4[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-prometheus-2.1.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-rq-2.4.1[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-tables2-2.4.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-taggit-1.4.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-timezone-field-4.1.2[${PYTHON_MULTI_USEDEP}]
>=dev-python/django-taggit-1.5.1[${PYTHON_MULTI_USEDEP}]
~dev-python/django-timezone-field-4.2.1[${PYTHON_MULTI_USEDEP}]
>=dev-python/djangorestframework-3.12.4[${PYTHON_MULTI_USEDEP}]
>=dev-python/drf-yasg-1.20.0[${PYTHON_MULTI_USEDEP},validation]
>=dev-python/graphene-django-2.15.0[${PYTHON_MULTI_USEDEP}]
>=www-servers/gunicorn-20.1.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/jinja-3.0.1[${PYTHON_MULTI_USEDEP}]
>=dev-python/markdown-3.3.4[${PYTHON_MULTI_USEDEP}]
>=dev-python/markdown-include-0.6.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/mkdocs-material-7.2.6[${PYTHON_MULTI_USEDEP}]
>=dev-python/netaddr-0.8.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/pillow-8.2.0[${PYTHON_MULTI_USEDEP}]
>=dev-python/psycopg-2.8.6[${PYTHON_MULTI_USEDEP}]
>=dev-python/pillow-8.3.2[${PYTHON_MULTI_USEDEP}]
>=dev-python/psycopg-2.9.1[${PYTHON_MULTI_USEDEP}]
>=dev-python/pycryptodome-3.10.1[${PYTHON_MULTI_USEDEP}]
>=dev-python/pyyaml-5.4.1[${PYTHON_MULTI_USEDEP}]
>=dev-python/svgwrite-1.4.1[${PYTHON_MULTI_USEDEP}]
>=dev-python/tablib-3.0.0[${PYTHON_MULTI_USEDEP}]
www-servers/gunicorn[${PYTHON_MULTI_USEDEP}]
ldap? ( >=dev-python/django-auth-ldap-1.7[${PYTHON_MULTI_USEDEP}] )
')"
DEPEND="${RDEPEND}"
@ -139,5 +142,5 @@ pkg_postinst() {
if [ -d "${LAST_BASE_DIRECTORY}/netbox/reports" ]; then
${NBCP} -pr "${LAST_BASE_DIRECTORY}/netbox/reports" /opt/netbox/netbox/
fi
cd /opt/netbox && su -l "${PN}" -s /bin/sh -c ./upgrade.sh
cd /opt/netbox && su -p -s /bin/sh -c ./upgrade.sh "${PN}"
}