From 8c519fc35c9fbac98535e4efa6ccd11cf1d80d27 Mon Sep 17 00:00:00 2001 From: ezkrg Date: Fri, 17 Sep 2021 14:00:24 +0200 Subject: arm build --- .drone.yml | 11 ++++++----- Dockerfile | 3 +++ matrix-e2e.c.patch | 20 ++++++++++++++++++++ 3 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 matrix-e2e.c.patch diff --git a/.drone.yml b/.drone.yml index bbfaae5..b6c169f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -20,10 +20,10 @@ steps: DOCKER_HOST: tcp://docker:2375 commands: - sleep 5 - - docker buildx create --use --name docker --node docker --platform linux/amd64 --driver docker-container $DOCKER_HOST + - docker run -it --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 - echo $PASSWORD | docker login --username $USER --password-stdin - - docker buildx build --load --cache-from ezkrg/cache:bitlbee-libpurple --cache-to ezkrg/cache:bitlbee-libpurple -t ezkrg/bitlbee-libpurple:test --platform linux/amd64 . - - docker push ezkrg/bitlbee-libpurple:test + - docker buildx build --push --cache-from ezkrg/cache:bitlbee-libpurple --cache-to ezkrg/cache:bitlbee-libpurple -t ezkrg/bitlbee-libpurple:dev --platform linux/amd64,linux/arm64,linux/armhf . - name: release image: docker:stable @@ -35,6 +35,7 @@ steps: DOCKER_HOST: tcp://docker:2375 commands: - echo $PASSWORD | docker login --username $USER --password-stdin + - docker pull ezkrg/bitlbee-libpurple:test - docker tag ezkrg/bitlbee-libpurple:test ezkrg/bitlbee-libpurple:$DRONE_TAG - docker push ezkrg/bitlbee-libpurple:$DRONE_TAG - docker tag ezkrg/bitlbee-libpurple:test ezkrg/bitlbee-libpurple:latest @@ -44,7 +45,7 @@ steps: - tag --- -kind: pipeline +kind: pipeline type: docker name: notification @@ -71,6 +72,6 @@ depends_on: --- kind: signature -hmac: 9c778c50b9cb687fe3e1614048c082db18c4fe6f531aba5c04f0ec950a2814d1 +hmac: 713b5ce1053fe1bd2320eaa28ca0df5784f806d69a730634eddf3c14d08697f7 ... diff --git a/Dockerfile b/Dockerfile index b98f21b..dcd9f1c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -267,6 +267,8 @@ ARG MATRIX=1 ARG OLM_VERSION=3.2.4 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 \ @@ -280,6 +282,7 @@ RUN echo MATRIX=${MATRIX} > /tmp/status \ && 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 new file mode 100644 index 0000000..570e289 --- /dev/null +++ b/matrix-e2e.c.patch @@ -0,0 +1,20 @@ +--- 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); -- cgit v1.2.3 From 0aebc7f8675b467769cd28f9ef6ffbac682e22ae Mon Sep 17 00:00:00 2001 From: ezkrg Date: Fri, 17 Sep 2021 14:03:17 +0200 Subject: not tty --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index b6c169f..8c0594d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -20,7 +20,7 @@ steps: DOCKER_HOST: tcp://docker:2375 commands: - sleep 5 - - docker run -it --rm --privileged tonistiigi/binfmt --install all + - 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 - echo $PASSWORD | docker login --username $USER --password-stdin - docker buildx build --push --cache-from ezkrg/cache:bitlbee-libpurple --cache-to ezkrg/cache:bitlbee-libpurple -t ezkrg/bitlbee-libpurple:dev --platform linux/amd64,linux/arm64,linux/armhf . @@ -72,6 +72,6 @@ depends_on: --- kind: signature -hmac: 713b5ce1053fe1bd2320eaa28ca0df5784f806d69a730634eddf3c14d08697f7 +hmac: 4e76538666908a947b0c3cabdc04513ad1d6f9f229826cdd403fe70307877e00 ... -- cgit v1.2.3 From 36f7b6c3517e779349c4c3ea9f95a6ebbd0e6bae Mon Sep 17 00:00:00 2001 From: ezkrg Date: Fri, 17 Sep 2021 14:09:00 +0200 Subject: build test tag --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8c0594d..ffe08cc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -23,7 +23,7 @@ steps: - 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 - echo $PASSWORD | docker login --username $USER --password-stdin - - docker buildx build --push --cache-from ezkrg/cache:bitlbee-libpurple --cache-to ezkrg/cache:bitlbee-libpurple -t ezkrg/bitlbee-libpurple:dev --platform linux/amd64,linux/arm64,linux/armhf . + - docker buildx build --push --cache-from ezkrg/cache:bitlbee-libpurple --cache-to ezkrg/cache:bitlbee-libpurple -t ezkrg/bitlbee-libpurple:test --platform linux/amd64,linux/arm64,linux/armhf . - name: release image: docker:stable @@ -72,6 +72,6 @@ depends_on: --- kind: signature -hmac: 4e76538666908a947b0c3cabdc04513ad1d6f9f229826cdd403fe70307877e00 +hmac: 4d16b8fe931c702b0383aaacf4b3dfb28c60b69577f65cd07981a9d1eedbb730 ... -- cgit v1.2.3