aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorezkrg <ezkrg@ezkrg.me>2022-04-04 11:04:56 +0000
committerezkrg <ezkrg@ezkrg.me>2022-04-04 11:04:56 +0000
commit32f786503b062cafe675af9ef88c6d08897b99ea (patch)
treeecbf05415c2d7ab18cded84ae6489105c4d7c789
parentupgrade base image 3.12 => 3.14 (diff)
downloaddocker-bitlbee-libpurple-32f786503b062cafe675af9ef88c6d08897b99ea.tar.gz
docker-bitlbee-libpurple-32f786503b062cafe675af9ef88c6d08897b99ea.zip
alpine arm build patching not sustainable
-rw-r--r--.drone.yml10
-rw-r--r--Dockerfile12
-rw-r--r--matrix-e2e.c.patch20
-rw-r--r--sipe-tls-tester.c.patch11
-rw-r--r--sipe-tls.c.patch20
5 files changed, 7 insertions, 66 deletions
diff --git a/.drone.yml b/.drone.yml
index 6091c9f..755a8b6 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -21,9 +21,9 @@ steps:
commands:
- while ! docker info; do sleep 1; done
- docker run --rm --privileged tonistiigi/binfmt --install all
- - docker buildx create --use --name docker --node docker --platform linux/amd64,linux/arm64,linux/armhf --driver docker-container $DOCKER_HOST
+ - docker buildx create --use --name docker --node docker --platform linux/amd64 --driver docker-container $DOCKER_HOST
- echo $PASSWORD | docker login --username $USER --password-stdin
- - docker buildx build --push --cache-from ezkrg/bitlbee-libpurple:cache --cache-to ezkrg/bitlbee-libpurple:cache -t ezkrg/bitlbee-libpurple:test --platform linux/amd64,linux/arm64,linux/armhf .
+ - docker buildx build --push --cache-from ezkrg/bitlbee-libpurple:cache --cache-to ezkrg/bitlbee-libpurple:cache -t ezkrg/bitlbee-libpurple:test --platform linux/amd64 .
when:
event:
- push
@@ -39,9 +39,9 @@ steps:
commands:
- while ! docker info; do sleep 1; done
- docker run --rm --privileged tonistiigi/binfmt --install all
- - docker buildx create --use --name docker --node docker --platform linux/amd64,linux/arm64,linux/armhf --driver docker-container $DOCKER_HOST
+ - docker buildx create --use --name docker --node docker --platform linux/amd64--driver docker-container $DOCKER_HOST
- echo $PASSWORD | docker login --username $USER --password-stdin
- - docker buildx build --push --cache-from ezkrg/bitlbee-libpurple:cache --cache-to ezkrg/bitlbee-libpurple:cache -t ezkrg/bitlbee-libpurple:$DRONE_TAG -t ezkrg/bitlbee-libpurple:latest --platform linux/amd64,linux/arm64,linux/armhf .
+ - docker buildx build --push --cache-from ezkrg/bitlbee-libpurple:cache --cache-to ezkrg/bitlbee-libpurple:cache -t ezkrg/bitlbee-libpurple:$DRONE_TAG -t ezkrg/bitlbee-libpurple:latest --platform linux/amd64 .
when:
event:
- tag
@@ -129,6 +129,6 @@ depends_on:
---
kind: signature
-hmac: e51bb8ccb6f602e0f02e6bd0e9dfd8456c4655c4bb299fc64a10c8b162294544
+hmac: d6be935aac30edc801babe2b7daae15dc913d2751da9f43696fbb8eece1a05d7
...
diff --git a/Dockerfile b/Dockerfile
index 350831f..2f025ff 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM alpine:3.14 as base-image
+FROM alpine:3.15 as base-image
FROM base-image as bitlbee-build
@@ -172,10 +172,7 @@ RUN echo SLACK=${SLACK} > /tmp/status \
FROM bitlbee-build as sipe-build
ARG SIPE=1
-ARG SIPE_VERSION=1.25.0
-
-COPY sipe-tls-tester.c.patch /tmp/sipe-tls-tester.c.patch
-COPY sipe-tls.c.patch /tmp/sipe-tls.c.patch
+ARG SIPE_VERSION=3db5111
RUN echo SIPE=${SIPE} > /tmp/status \
&& if [ ${SIPE} -eq 1 ]; \
@@ -183,8 +180,6 @@ RUN echo SIPE=${SIPE} > /tmp/status \
&& git clone -n https://repo.or.cz/siplcs.git \
&& cd siplcs \
&& git checkout ${SIPE_VERSION} \
- && patch -p0 < ../sipe-tls-tester.c.patch \
- && patch -p0 < ../sipe-tls.c.patch \
&& ./autogen.sh \
&& ./configure --prefix=/usr \
&& make \
@@ -271,15 +266,12 @@ FROM bitlbee-build as matrix-build
ARG MATRIX=1
ARG MATRIX_VERSION=88f9558
-COPY matrix-e2e.c.patch /tmp/matrix-e2e.c.patch
-
RUN echo MATRIX=${MATRIX} > /tmp/status \
&& if [ ${MATRIX} -eq 1 ]; \
then cd /tmp \
&& git clone -n https://github.com/matrix-org/purple-matrix \
&& cd purple-matrix \
&& git checkout ${MATRIX_VERSION} \
- && if [ $(uname -m) == "armv7l" ]; then patch < ../matrix-e2e.c.patch; fi \
&& make \
&& make install \
&& strip /usr/lib/purple-2/libmatrix.so; \
diff --git a/matrix-e2e.c.patch b/matrix-e2e.c.patch
deleted file mode 100644
index 570e289..0000000
--- a/matrix-e2e.c.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- matrix-e2e.c
-+++ matrix-e2e.c.new
-@@ -949,7 +949,7 @@
- to_create = (max_keys / 2) - count;
- need_to_send = TRUE;
- }
-- purple_debug_info("matrixprpl", "%s: %s: %ld\n",
-+ purple_debug_info("matrixprpl", "%s: %s: %lld\n",
- __func__, key_algo, count);
- }
- }
-@@ -1520,7 +1520,7 @@
- plaintext[pt_len] = '\0';
- handle_decrypted_olm(pc, conn, cevent_sender, sender_key, plaintext);
- } else {
-- purple_debug_info("matrixprpl", "%s: Type %zd olm\n", __func__, type);
-+ purple_debug_info("matrixprpl", "%s: Type %lld olm\n", __func__, type);
- }
- if (plaintext) {
- clear_mem(plaintext, max_plaintext_len);
diff --git a/sipe-tls-tester.c.patch b/sipe-tls-tester.c.patch
deleted file mode 100644
index f14344d..0000000
--- a/sipe-tls-tester.c.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/core/sipe-tls-tester.c
-+++ src/core/sipe-tls-tester.c.new
-@@ -155,7 +155,7 @@
- printf("received %d bytes from server\n", result);
- record = g_new0(struct record, 1);
- record->length = result;
-- record->msg = g_memdup(buffer, result);
-+ record->msg = g_memdup2(buffer, result);
- length += result;
- fragments = g_slist_append(fragments, record);
- }
diff --git a/sipe-tls.c.patch b/sipe-tls.c.patch
deleted file mode 100644
index 37c7c21..0000000
--- a/sipe-tls.c.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/core/sipe-tls.c
-+++ src/core/sipe-tls.c.new
-@@ -427,7 +427,7 @@
- gsize half = (secret_length + 1) / 2;
- gsize newseed_length = label_length + seed_length;
- /* secret: used as S1; secret2: last half of original secret (S2) */
-- guchar *secret2 = g_memdup(secret + secret_length - half, half);
-+ guchar *secret2 = g_memdup2(secret + secret_length - half, half);
- guchar *newseed = g_malloc(newseed_length);
- guchar *md5, *dest;
- guchar *sha1, *src;
-@@ -1525,7 +1525,7 @@
-
- /* found all the required fields */
- state->server_random.length = server_random->length;
-- state->server_random.buffer = g_memdup(server_random->data,
-+ state->server_random.buffer = g_memdup2(server_random->data,
- server_random->length);
- tls_calculate_secrets(state);
-