From db34a0ae2bc382b0e09d1ae740e7d492cccd56d6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 27 Sep 2024 03:23:22 +0000 Subject: [PATCH 01/18] Update docker.io/postgres Docker tag to v17 --- docker-compose.test.yml | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 98a6c19a..e1f33729 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -39,7 +39,7 @@ services: interval: 15s postgres: - image: docker.io/postgres:16-alpine + image: docker.io/postgres:17-alpine env_file: env/postgres.env healthcheck: test: pg_isready -q -t 2 -d $$POSTGRES_DB -U $$POSTGRES_USER ## $$ because of docker-compose diff --git a/docker-compose.yml b/docker-compose.yml index a00825c7..1e27d91e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -46,7 +46,7 @@ services: # postgres postgres: - image: docker.io/postgres:16-alpine + image: docker.io/postgres:17-alpine healthcheck: test: pg_isready -q -t 2 -d $$POSTGRES_DB -U $$POSTGRES_USER start_period: 20s From d3ce916073415c62c9ef0a102895a0b394040082 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 12:47:04 +0000 Subject: [PATCH 02/18] Update dependency sentry-sdk to v2.16.0 --- requirements-container.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-container.txt b/requirements-container.txt index 6dfd1524..1ec98a44 100644 --- a/requirements-container.txt +++ b/requirements-container.txt @@ -2,4 +2,4 @@ django-auth-ldap==4.8.0 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.4 dulwich==0.22.1 python3-saml==1.16.0 --no-binary lxml,xmlsec -sentry-sdk[django]==2.14.0 +sentry-sdk[django]==2.16.0 From 5354b142cb08b89420d4c506239f275d30bf7680 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:41:06 +0000 Subject: [PATCH 03/18] Update dependency django-auth-ldap to v5 --- requirements-container.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-container.txt b/requirements-container.txt index 6dfd1524..5b5ef2de 100644 --- a/requirements-container.txt +++ b/requirements-container.txt @@ -1,4 +1,4 @@ -django-auth-ldap==4.8.0 +django-auth-ldap==5.0.0 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.4 dulwich==0.22.1 python3-saml==1.16.0 --no-binary lxml,xmlsec From bffdc6d82243d795e312490a1a94444e7ab612e0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 14:38:27 +0000 Subject: [PATCH 04/18] Update dependency dulwich to v0.22.3 --- requirements-container.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-container.txt b/requirements-container.txt index 31863974..4749227a 100644 --- a/requirements-container.txt +++ b/requirements-container.txt @@ -1,5 +1,5 @@ django-auth-ldap==5.0.0 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.4 -dulwich==0.22.1 +dulwich==0.22.3 python3-saml==1.16.0 --no-binary lxml,xmlsec sentry-sdk[django]==2.16.0 From cc6a35b6368bfc98673e7cef5f70112be9c63f62 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:18:36 +0000 Subject: [PATCH 05/18] Update dependency django-auth-ldap to v5.1.0 --- requirements-container.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-container.txt b/requirements-container.txt index 4749227a..6d93f181 100644 --- a/requirements-container.txt +++ b/requirements-container.txt @@ -1,4 +1,4 @@ -django-auth-ldap==5.0.0 +django-auth-ldap==5.1.0 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.4 dulwich==0.22.3 python3-saml==1.16.0 --no-binary lxml,xmlsec From 8453eab8ddb7ae4d2c8aa7d5878a51dadf9ff13c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:18:41 +0000 Subject: [PATCH 06/18] Update dependency sentry-sdk to v2.17.0 --- requirements-container.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-container.txt b/requirements-container.txt index 4749227a..10617185 100644 --- a/requirements-container.txt +++ b/requirements-container.txt @@ -2,4 +2,4 @@ django-auth-ldap==5.0.0 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.4 dulwich==0.22.3 python3-saml==1.16.0 --no-binary lxml,xmlsec -sentry-sdk[django]==2.16.0 +sentry-sdk[django]==2.17.0 From 8fcbc5c2943af5be5de2e54b9cc279cc62bfd288 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 13:38:59 +0000 Subject: [PATCH 07/18] Update dependency dulwich to v0.22.4 --- requirements-container.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-container.txt b/requirements-container.txt index 8e8664ec..d2b329d3 100644 --- a/requirements-container.txt +++ b/requirements-container.txt @@ -1,5 +1,5 @@ django-auth-ldap==5.1.0 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.4 -dulwich==0.22.3 +dulwich==0.22.4 python3-saml==1.16.0 --no-binary lxml,xmlsec sentry-sdk[django]==2.17.0 From 50721989bf3b0a980d8e3b3e75ca42b42fa1b3ea Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 17:39:16 +0000 Subject: [PATCH 08/18] Update dependency sentry-sdk to v2.18.0 --- requirements-container.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-container.txt b/requirements-container.txt index d2b329d3..d43bfd71 100644 --- a/requirements-container.txt +++ b/requirements-container.txt @@ -2,4 +2,4 @@ django-auth-ldap==5.1.0 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.4 dulwich==0.22.4 python3-saml==1.16.0 --no-binary lxml,xmlsec -sentry-sdk[django]==2.17.0 +sentry-sdk[django]==2.18.0 From afd18c6f395539b853a0c07fea8711a324f3b3b7 Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Tue, 5 Nov 2024 12:52:50 +0100 Subject: [PATCH 09/18] Fixes #1331: Added 'forwarded' section Unit config Simplifies the listener configuration by using a wildcard for the IP and adds a forwarded section that trusts all proxies on RFC1918 networks. --- docker/nginx-unit.json | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/docker/nginx-unit.json b/docker/nginx-unit.json index fc33a2c6..76415f5c 100644 --- a/docker/nginx-unit.json +++ b/docker/nginx-unit.json @@ -1,16 +1,20 @@ { "listeners": { - "0.0.0.0:8080": { - "pass": "routes/main" - }, - "[::]:8080": { - "pass": "routes/main" - }, - "0.0.0.0:8081": { - "pass": "routes/status" + "*:8080": { + "pass": "routes/main", + "forwarded": { + "client_ip": "X-Forwarded-For", + "protocol": "X-Forwarded-Proto", + "source": ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"] + } }, - "[::]:8081": { - "pass": "routes/status" + "*:8081": { + "pass": "routes/status", + "forwarded": { + "client_ip": "X-Forwarded-For", + "protocol": "X-Forwarded-Proto", + "source": ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"] + } } }, "routes": { From dcc8a624baec8b604ab0c4d2a0b8b4aa02657b2f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:51:46 +0000 Subject: [PATCH 10/18] Update dependency dulwich to v0.22.5 --- requirements-container.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-container.txt b/requirements-container.txt index d43bfd71..dc84e61d 100644 --- a/requirements-container.txt +++ b/requirements-container.txt @@ -1,5 +1,5 @@ django-auth-ldap==5.1.0 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.4 -dulwich==0.22.4 +dulwich==0.22.5 python3-saml==1.16.0 --no-binary lxml,xmlsec sentry-sdk[django]==2.18.0 From bf0cecc7fde9e59ee8ed4ca926ff1f444725f9d0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 01:40:01 +0000 Subject: [PATCH 11/18] Update dependency dulwich to v0.22.6 --- requirements-container.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-container.txt b/requirements-container.txt index dc84e61d..60146c5c 100644 --- a/requirements-container.txt +++ b/requirements-container.txt @@ -1,5 +1,5 @@ django-auth-ldap==5.1.0 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.4 -dulwich==0.22.5 +dulwich==0.22.6 python3-saml==1.16.0 --no-binary lxml,xmlsec sentry-sdk[django]==2.18.0 From d8ac6f828ce5562f0012d25089779b38e0fafd14 Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Tue, 19 Nov 2024 15:58:22 +0100 Subject: [PATCH 12/18] Removed LOGIN_REQUIRED --- test-configuration/test_config.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test-configuration/test_config.py b/test-configuration/test_config.py index 09bd5dcb..884defd4 100644 --- a/test-configuration/test_config.py +++ b/test-configuration/test_config.py @@ -4,4 +4,3 @@ } DEFAULT_PERMISSIONS = {} -LOGIN_REQUIRED = False From 404b4bcffe88c7fdf71e0b3e3cda283f71da31e7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 17:26:58 +0000 Subject: [PATCH 13/18] Update dependency sentry-sdk to v2.19.0 --- requirements-container.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-container.txt b/requirements-container.txt index 60146c5c..99b2ab55 100644 --- a/requirements-container.txt +++ b/requirements-container.txt @@ -2,4 +2,4 @@ django-auth-ldap==5.1.0 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.4 dulwich==0.22.6 python3-saml==1.16.0 --no-binary lxml,xmlsec -sentry-sdk[django]==2.18.0 +sentry-sdk[django]==2.19.0 From c416a054aeaac438f9935644280dc9c8327e4f77 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 17:56:35 +0000 Subject: [PATCH 14/18] Update dependency sentry-sdk to v2.19.1 --- requirements-container.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-container.txt b/requirements-container.txt index 99b2ab55..40b22b33 100644 --- a/requirements-container.txt +++ b/requirements-container.txt @@ -2,4 +2,4 @@ django-auth-ldap==5.1.0 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.4 dulwich==0.22.6 python3-saml==1.16.0 --no-binary lxml,xmlsec -sentry-sdk[django]==2.19.0 +sentry-sdk[django]==2.19.1 From 0c0c468386e3c0862202b384763f05fb6a61d5cb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 09:44:23 +0000 Subject: [PATCH 15/18] Update dependency sentry-sdk to v2.19.2 --- requirements-container.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-container.txt b/requirements-container.txt index 40b22b33..4c87e736 100644 --- a/requirements-container.txt +++ b/requirements-container.txt @@ -2,4 +2,4 @@ django-auth-ldap==5.1.0 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.4 dulwich==0.22.6 python3-saml==1.16.0 --no-binary lxml,xmlsec -sentry-sdk[django]==2.19.1 +sentry-sdk[django]==2.19.2 From 49d80c9109110fcb205ec0e0f3b8a72933de5c6c Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Wed, 18 Dec 2024 12:41:10 +0100 Subject: [PATCH 16/18] Make superlinter happy --- docker-compose.test.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docker-compose.test.yml b/docker-compose.test.yml index e1f33729..8e89790f 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -9,9 +9,9 @@ services: redis-cache: condition: service_healthy env_file: env/netbox.env - user: 'unit:root' + user: "unit:root" volumes: - - ./test-configuration/test_config.py:/etc/netbox/config/test_config.py:z,ro + - ./test-configuration/test_config.py:/etc/netbox/config/test_config.py:z,ro healthcheck: test: curl -f http://localhost:8080/login/ || exit 1 start_period: ${NETBOX_START_PERIOD-120s} @@ -20,9 +20,9 @@ services: netbox-worker: <<: *netbox command: - - /opt/netbox/venv/bin/python - - /opt/netbox/netbox/manage.py - - rqworker + - /opt/netbox/venv/bin/python + - /opt/netbox/netbox/manage.py + - rqworker healthcheck: test: ps -aux | grep -v grep | grep -q rqworker || exit 1 start_period: 40s @@ -31,7 +31,7 @@ services: netbox-housekeeping: <<: *netbox command: - - /opt/netbox/housekeeping.sh + - /opt/netbox/housekeeping.sh healthcheck: test: ps -aux | grep -v grep | grep -q housekeeping || exit 1 start_period: 40s @@ -51,12 +51,12 @@ services: redis: &redis image: docker.io/valkey/valkey:8.0-alpine command: - - sh - - -c # this is to evaluate the $REDIS_PASSWORD from the env - - valkey-server --save "" --appendonly no --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose + - sh + - -c # this is to evaluate the $REDIS_PASSWORD from the env + - valkey-server --save "" --appendonly no --requirepass $$REDIS_PASSWORD ## $$ because of docker-compose env_file: env/redis.env healthcheck: - test: "[ $$(valkey-cli --pass \"$${REDIS_PASSWORD}\" ping) = 'PONG' ]" + test: '[ $$(valkey-cli --pass "$${REDIS_PASSWORD}" ping) = ''PONG'' ]' start_period: 5s timeout: 3s interval: 1s From 878b3b6abb3e2e373a052ecbb9e80a9473e27105 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 18:26:11 +0000 Subject: [PATCH 17/18] Update dependency dulwich to v0.22.7 --- requirements-container.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-container.txt b/requirements-container.txt index 4c87e736..9641dd46 100644 --- a/requirements-container.txt +++ b/requirements-container.txt @@ -1,5 +1,5 @@ django-auth-ldap==5.1.0 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.14.4 -dulwich==0.22.6 +dulwich==0.22.7 python3-saml==1.16.0 --no-binary lxml,xmlsec sentry-sdk[django]==2.19.2 From 1a70f971c090e9af09205a9fc21b1bae8d5f8731 Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Sat, 4 Jan 2025 10:59:12 +0100 Subject: [PATCH 18/18] Prepare for Netbox 4.2 --- .github/workflows/push.yml | 2 +- .github/workflows/release.yml | 2 +- Dockerfile | 4 ++-- VERSION | 2 +- build.sh | 33 +++++++++++++-------------------- docker-compose.yml | 2 +- 6 files changed, 19 insertions(+), 26 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 41d4d40f..43a56c3e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -55,7 +55,7 @@ jobs: - ./build-latest.sh - PRERELEASE=true ./build-latest.sh - ./build.sh feature - - ./build.sh develop + - ./build.sh main os: - ubuntu-latest - self-hosted diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b90bf158..8f1656d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: - ./build-latest.sh - PRERELEASE=true ./build-latest.sh - ./build.sh feature - - ./build.sh develop + - ./build.sh main platform: - linux/amd64,linux/arm64 fail-fast: false diff --git a/Dockerfile b/Dockerfile index 1c17caa9..0611f720 100644 --- a/Dockerfile +++ b/Dockerfile @@ -71,8 +71,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get update -qq \ && apt-get install \ --yes -qq --no-install-recommends \ - unit=1.33.0-1~noble \ - unit-python3.12=1.33.0-1~noble \ + unit=1.34.0-1~noble \ + unit-python3.12=1.34.0-1~noble \ && rm -rf /var/lib/apt/lists/* COPY --from=builder /opt/netbox/venv /opt/netbox/venv diff --git a/VERSION b/VERSION index b5021469..fd2a0186 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.2 +3.1.0 diff --git a/build.sh b/build.sh index df85df7c..a7ac817a 100755 --- a/build.sh +++ b/build.sh @@ -39,9 +39,8 @@ SKIP_GIT If defined, git is not invoked and \${NETBOX_PATH} will not be alter TAG The version part of the image tag. ${_GREEN}Default:${_CLEAR} - When =master: latest - When =develop: snapshot - Else: same as + When =main: snapshot + Else: same as IMAGE_NAMES The names used for the image including the registry Used for tagging the image. @@ -104,24 +103,21 @@ GH_ACTION If defined, special 'echo' statements are enabled that set the ${_GREEN}Default:${_CLEAR} undefined CHECK_ONLY Only checks if the build is needed and sets the GH Action output. + ${_GREEN}Default:${_CLEAR} undefined ${_BOLD}Examples:${_CLEAR} -${0} master - This will fetch the latest 'master' branch, build a Docker Image and tag it - 'netboxcommunity/netbox:latest'. - -${0} develop - This will fetch the latest 'develop' branch, build a Docker Image and tag it +${0} main + This will fetch the latest 'main' branch, build a Docker Image and tag it 'netboxcommunity/netbox:snapshot'. -${0} v2.6.6 - This will fetch the 'v2.6.6' tag, build a Docker Image and tag it - 'netboxcommunity/netbox:v2.6.6' and 'netboxcommunity/netbox:v2.6'. +${0} v4.2.0 + This will fetch the 'v4.2.0' tag, build a Docker Image and tag it + 'netboxcommunity/netbox:v4.2.0' and 'netboxcommunity/netbox:v4.2'. -${0} develop-2.7 - This will fetch the 'develop-2.7' branch, build a Docker Image and tag it - 'netboxcommunity/netbox:develop-2.7'. +${0} feature + This will fetch the 'feature' branch, build a Docker Image and tag it + 'netboxcommunity/netbox:feature'. SRC_ORG=cimnine ${0} feature-x This will fetch the 'feature-x' branch from https://github.com/cimnine/netbox.git, @@ -259,10 +255,7 @@ DOCKER_REGISTRY="${DOCKER_REGISTRY-docker.io}" DOCKER_ORG="${DOCKER_ORG-netboxcommunity}" DOCKER_REPO="${DOCKER_REPO-netbox}" case "${NETBOX_BRANCH}" in -master) - TAG="${TAG-latest}" - ;; -develop) +main) TAG="${TAG-snapshot}" ;; *) @@ -278,7 +271,7 @@ TARGET_DOCKER_TAG_PROJECT="${TARGET_DOCKER_TAG}-${PROJECT_VERSION}" ### # composing the additional DOCKER_SHORT_TAG, -# i.e. "v2.6.1" becomes "v2.6", +# i.e. "v4.2.0" becomes "v4.2", # which is only relevant for version tags # Also let "latest" follow the highest version ### diff --git a/docker-compose.yml b/docker-compose.yml index 1e27d91e..c91c7b71 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: netbox: &netbox - image: docker.io/netboxcommunity/netbox:${VERSION-v4.1-3.0.2} + image: docker.io/netboxcommunity/netbox:${VERSION-v4.2-3.1.0} depends_on: - postgres - redis