From 54823b41e1cb78eadb4bb65242cff41f37478410 Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Tue, 31 Aug 2021 16:04:48 +0200 Subject: [PATCH 1/4] Workaround for build error in google-crc32c 1.1.3 --- requirements-container.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements-container.txt b/requirements-container.txt index cc48128..7896eb3 100644 --- a/requirements-container.txt +++ b/requirements-container.txt @@ -1,4 +1,5 @@ napalm==3.3.1 ruamel.yaml==0.17.16 django-auth-ldap==3.0.0 +google-crc32c==1.1.2 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.11.1 From a0a32b930e3ff1766e1e4798d79b7093ed8f88c2 Mon Sep 17 00:00:00 2001 From: Daniel Metzler Date: Fri, 3 Sep 2021 08:03:27 +0200 Subject: [PATCH 2/4] Fixed port issue with latest docker version. (#538) Co-authored-by: Tobias Genannt --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index e38aa0c..09d52a7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,7 +25,6 @@ services: - /opt/netbox/netbox/manage.py command: - rqworker - ports: [] # postgres postgres: From 9255afd06074a9b09b100d2a7733228ba1fde6a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ma=CC=88der?= Date: Fri, 3 Sep 2021 09:15:41 +0200 Subject: [PATCH 3/4] Improves google-cloud-storage performance And also fixes the build by providing a 'alpine version' of the google/crc32c library, which google-crc32c and google-cloud-storage and ultimately django-storages[google] depend on. --- Dockerfile | 22 +++++++++++++++++++++- requirements-container.txt | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c636a04..005d919 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,15 +6,18 @@ RUN apk add --no-cache \ build-base \ cargo \ ca-certificates \ + cmake \ cyrus-sasl-dev \ + git \ graphviz \ jpeg-dev \ libevent-dev \ libffi-dev \ - openssl-dev \ libxslt-dev \ + make \ musl-dev \ openldap-dev \ + openssl-dev \ postgresql-dev \ py3-pip \ python3-dev \ @@ -24,6 +27,20 @@ RUN apk add --no-cache \ setuptools \ wheel +# Build libcrc32c for google-crc32c python module +RUN git clone https://github.com/google/crc32c \ + && cd crc32c \ + && git submodule update --init --recursive \ + && mkdir build \ + && cd build \ + && cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCRC32C_BUILD_TESTS=no \ + -DCRC32C_BUILD_BENCHMARKS=no \ + -DBUILD_SHARED_LIBS=yes \ + .. \ + && make all install + ARG NETBOX_PATH COPY ${NETBOX_PATH}/requirements.txt requirements-container.txt / RUN /opt/netbox/venv/bin/pip install \ @@ -55,6 +72,9 @@ RUN apk add --no-cache \ WORKDIR /opt +COPY --from=builder /usr/local/lib/libcrc32c.* /usr/local/lib/ +COPY --from=builder /usr/local/include/crc32c /usr/local/include +COPY --from=builder /usr/local/lib/cmake/Crc32c /usr/local/lib/cmake/ COPY --from=builder /opt/netbox/venv /opt/netbox/venv ARG NETBOX_PATH diff --git a/requirements-container.txt b/requirements-container.txt index 7896eb3..e50d461 100644 --- a/requirements-container.txt +++ b/requirements-container.txt @@ -1,5 +1,5 @@ napalm==3.3.1 ruamel.yaml==0.17.16 django-auth-ldap==3.0.0 -google-crc32c==1.1.2 +google-crc32c==1.1.4 django-storages[azure,boto3,dropbox,google,libcloud,sftp]==1.11.1 From 7eeb2ea7e68465c91adf3dec59a004a13fa8363d Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Fri, 3 Sep 2021 10:21:16 +0200 Subject: [PATCH 4/4] Prepare version 1.3.1 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index f0bb29e..3a3cd8c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.0 +1.3.1