diff options
-rw-r--r-- | .drone.yml | 191 | ||||
-rw-r--r-- | .github/workflows/docker.yaml | 12 | ||||
-rw-r--r-- | CHANGELOG.md | 99 | ||||
-rw-r--r-- | Dockerfile.debian | 83 | ||||
-rw-r--r-- | Dockerfile.debug | 139 | ||||
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | docker-compose.yaml | 52 | ||||
-rw-r--r-- | gdb_commands | 2 | ||||
-rw-r--r-- | plugin_versions | 7 |
9 files changed, 93 insertions, 498 deletions
diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index b8de386..0000000 --- a/.drone.yml +++ /dev/null @@ -1,191 +0,0 @@ ---- -kind: pipeline -type: docker -name: alpine - -steps: - - name: docker - image: docker:dind - privileged: true - detach: true - command: [ "dockerd", "--host=tcp://0.0.0.0:2375" ] - - - name: test - image: ezkrg/buildx:latest - environment: - USER: - from_secret: DHU - PASSWORD: - from_secret: DHP - DOCKER_HOST: tcp://docker:2375 - commands: - - while ! docker info; do sleep 1; done - - docker buildx create --use --name docker --node docker --platform linux/amd64 --driver docker-container $DOCKER_HOST - - echo $PASSWORD | docker login --username $USER --password-stdin - - apk add --update --no-cache bash - - BUILD_ARGS=$(for BUILD_ARG in $(cat plugin_versions); do echo -n "--build-arg $BUILD_ARG "; done) - - docker buildx build --push --cache-from ezkrg/bitlbee-libpurple:cache --cache-to ezkrg/bitlbee-libpurple:cache --tag ezkrg/bitlbee-libpurple:test --platform linux/amd64 --build-arg ALPINE_VERSION=3.15 $BUILD_ARGS . - when: - event: - - push - - - name: latest - image: ezkrg/buildx:latest - environment: - USER: - from_secret: DHU - PASSWORD: - from_secret: DHP - DOCKER_HOST: tcp://docker:2375 - commands: - - while ! docker info; do sleep 1; done - - docker buildx create --use --name docker --node docker --platform linux/amd64 --driver docker-container $DOCKER_HOST - - echo $PASSWORD | docker login --username $USER --password-stdin - - apk add --update --no-cache bash - - BUILD_ARGS=$(for BUILD_ARG in $(cat plugin_versions); do echo -n "--build-arg $BUILD_ARG "; done) - - docker buildx build --push --cache-from ezkrg/bitlbee-libpurple:cache --cache-to ezkrg/bitlbee-libpurple:cache --tag ezkrg/bitlbee-libpurple:$DRONE_TAG --tag ezkrg/bitlbee-libpurple:latest --tag ezkrg/bitlbee-libpurple:alpine --platform linux/amd64 --build-arg ALPINE_VERSION=3.15 $BUILD_ARGS . - when: - event: - - tag - ---- -kind: pipeline -type: docker -name: alpine3.12 - -steps: - - name: docker - image: docker:dind - privileged: true - detach: true - command: [ "dockerd", "--host=tcp://0.0.0.0:2375" ] - - - name: test - image: ezkrg/buildx:latest - environment: - USER: - from_secret: DHU - PASSWORD: - from_secret: DHP - DOCKER_HOST: tcp://docker:2375 - commands: - - while ! docker info; do sleep 1; done - - docker buildx create --use --name docker --node docker --platform linux/amd64 --driver docker-container $DOCKER_HOST - - echo $PASSWORD | docker login --username $USER --password-stdin - - apk add --update --no-cache bash - - BUILD_ARGS=$(for BUILD_ARG in $(cat plugin_versions); do echo -n "--build-arg $BUILD_ARG "; done) - - docker buildx build --push --cache-from ezkrg/bitlbee-libpurple:alpine3.12-cache --cache-to ezkrg/bitlbee-libpurple:alpine3.12-cache --tag ezkrg/bitlbee-libpurple:alpine3.12-test --platform linux/amd64,linux/arm64,linux/armhf --build-arg ALPINE_VERSION=3.12 $BUILD_ARGS . - when: - event: - - push - - - name: latest - image: ezkrg/buildx:latest - environment: - USER: - from_secret: DHU - PASSWORD: - from_secret: DHP - DOCKER_HOST: tcp://docker:2375 - commands: - - while ! docker info; do sleep 1; done - - docker buildx create --use --name docker --node docker --platform linux/amd64 --driver docker-container $DOCKER_HOST - - echo $PASSWORD | docker login --username $USER --password-stdin - - apk add --update --no-cache bash - - BUILD_ARGS=$(for BUILD_ARG in $(cat plugin_versions); do echo -n "--build-arg $BUILD_ARG "; done) - - docker buildx build --push --cache-from ezkrg/bitlbee-libpurple:alpine3.12-cache --cache-to ezkrg/bitlbee-libpurple:alpine3.12-cache --tag ezkrg/bitlbee-libpurple:alpine3.12-$DRONE_TAG --tag ezkrg/bitlbee-libpurple:alpine3.12 --platform linux/amd64,linux/arm64,linux/armhf --build-arg ALPINE_VERSION=3.12 $BUILD_ARGS . - when: - event: - - tag - ---- -kind: pipeline -type: docker -name: debian - -steps: - - name: docker - image: docker:dind - privileged: true - detach: true - command: [ "dockerd", "--host=tcp://0.0.0.0:2375" ] - - - - name: test - image: ezkrg/buildx:latest - environment: - USER: - from_secret: DHU - PASSWORD: - from_secret: DHP - DOCKER_HOST: tcp://docker:2375 - 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 - - echo $PASSWORD | docker login --username $USER --password-stdin - - apk add --update --no-cache bash - - BUILD_ARGS=$(for BUILD_ARG in $(cat plugin_versions); do echo -n "--build-arg $BUILD_ARG "; done) - - docker buildx build --push --cache-from ezkrg/bitlbee-libpurple:debian-cache --cache-to ezkrg/bitlbee-libpurple:debian-cache --tag ezkrg/bitlbee-libpurple:debian-test --platform linux/amd64,linux/arm64,linux/armhf -f Dockerfile.debian $BUILD_ARGS . - when: - event: - - push - - - name: latest - image: ezkrg/buildx:latest - environment: - USER: - from_secret: DHU - PASSWORD: - from_secret: DHP - DOCKER_HOST: tcp://docker:2375 - 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 - - echo $PASSWORD | docker login --username $USER --password-stdin - - apk add --update --no-cache bash - - BUILD_ARGS=$(for BUILD_ARG in $(cat plugin_versions); do echo -n "--build-arg $BUILD_ARG "; done) - - docker buildx build --push --cache-from ezkrg/bitlbee-libpurple:debian-cache --cache-to ezkrg/bitlbee-libpurple:debian-cache --tag ezkrg/bitlbee-libpurple:debian-$DRONE_TAG --tag ezkrg/bitlbee-libpurple:debian --platform linux/amd64,linux/arm64,linux/armhf -f Dockerfile.debian $BUILD_ARGS . - when: - event: - - tag - ---- -kind: pipeline -type: docker -name: notification - -clone: - disable: true - -steps: - - name: telegram - image: appleboy/drone-telegram:1.3.10 - failure: ignore - settings: - token: - from_secret: TT - to: - from_secret: TID - message: | - *{{commit.author}} ({{commit.email}})* - *{{repo.namespace}}/{{repo.name}}* - [Pipeline #{{build.number}} has {{#success build.status}}passed{{else}}failed{{/success}} in {{since build.started}}]({{build.link}}) {{#success build.status}}✅{{else}}❌{{/success}} - *Branch:* [{{commit.branch}}](https://github.com/{{repo.namespace}}/{{repo.name}}/commits/{{commit.branch}}) *Commit:* [{{commit.message}}]({{commit.link}}) - -trigger: - status: - - success - - failure - -depends_on: - - alpine - - alpine3.12 - - debian - ---- -kind: signature -hmac: bbb9015868c7b2e451c5f3a0b8473ea3565a5000ffd3c5d4a9914f220628e4c2 - -... diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index c10133c..c39995f 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -39,9 +39,9 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} provenance: mode=max - # - name: Generate artifact attestation - # uses: actions/attest-build-provenance@v1 - # with: - # subject-name: index.docker.io/milla - # subject-digest: ${{ steps.push.outputs.digest }} - # push-to-registry: true + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v1 + with: + subject-name: index.docker.io/bitlbee_purple + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: true diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index f0c36c8..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,99 +0,0 @@ -# Changelog - -## 2022-04-08 14:37:31 -- use alpine 3.15 -- remove arm build from alpine3.15 based images -- update whatsapp to whatsmeow -- update telegram to tdlib -- update skypeweb -- update hangouts -- update slack -- update discord -- update rocket.chat -- update mastodon -- update matrix -- update signal -- new alpine3.12 tag for arm build -- other build process related changes - -## 2021-09-14 22:52:43 ([markrawls](https://github.com/markrawls)) -- build for ARM platforms - -## 2021-07-13 23:38:45 ([mooomooo](https://github.com/mooomooo)) -- add flag and deps to enable attachment handling for Signal plugin - -## 2021-06-11 19:23:13 -- update hangouts -- update slack -- update rocket.chat -- update olm and matrix -- update signal - -## 2021-05-14 17:05:39 -- add icyque - -## 2021-05-06 15:21:19 -- update facebook version to 1.2.2 -- update skypeweb to c4906b8 - -## 2020-11-04 03:16:34 ([heywoodlh](https://github.com/heywoodlh)) -- add signal - -## 2020-04-09 20:27:51 -- add otr - -## 2020-04-06 10:19:50 -- upgrade discord version from aa0bbf2 to 0.4.3 -- upgrade mastodon version from 83dee0b to v1.4.4 -- upgrade matrix version from 4494ba2 to 1d23385 - -## 2020-04-05 14:01:52 -- upgrade telegram version from b101bbb to 1.4.3 -- upgrade slack version from 8acc4eb to e6e5427 -- upgrade sipe version from upstream/1.23.3 to 1.25.0 -- change sipe clone url - -## 2019-11-25 18:13:41 ([revmischa](https://github.com/revmischa)) -- add matrix - -## 2019-11-25 13:39:21 ([revmischa](https://github.com/revmischa)) -- add mastodon - -## 2018-09-10 08:52:53 -- add rocket.chat plugin -- use alpine 3.8 - -## 2018-08-21 10:59:17 ([needo37](https://github.com/needo37)) -- add discord plugin -- run as bitlbee user - -## 2018-08-17 17:59:13 ([Waester](https://github.com/Waester)) -- add libsipe support - -## 2018-04-19 23:01:49 ([friek](https://github.com/friek)) -- updated README -- moved changelog to CHANGELOG.md - -## 2018-04-19 14:17:23 -- use alpine 3.7 -- add slack-libpurple - -## 2017-09-18 12:30:45 -- trigger rebuild related to https://github.com/bitlbee/bitlbee-facebook/issues/151 - -## 2017-07-30 20:52:55 -- adding purple-hangouts - -## 2017-07-29 18:14:51 -- using alpine 3.6 -- remove libpurple-ymsg -- adding telegram-purple - -## 2017-04-21 12:57:42 -- trigger rebuild - -## 2017-04-04 12:59:58 -- trigger rebuild cause of facebook fix - -## 2017-03-30 11:43:46 -- trigger rebuild cause of facebook fix
\ No newline at end of file diff --git a/Dockerfile.debian b/Dockerfile.debian index 8748866..a7332a5 100644 --- a/Dockerfile.debian +++ b/Dockerfile.debian @@ -83,30 +83,9 @@ RUN echo STEAM=${STEAM} > /tmp/status \ # --- -FROM bitlbee-build AS skypeweb-build - -ARG SKYPEWEB=0 -ARG SKYPEWEB_VERSION - -RUN echo SKYPEWEB=${SKYPEWEB} > /tmp/status \ - && if [ ${SKYPEWEB} -eq 1 ]; \ - then cd /tmp \ - && git clone -n https://github.com/EionRobb/skype4pidgin.git \ - && cd skype4pidgin \ - && git checkout ${SKYPEWEB_VERSION} \ - && cd skypeweb \ - && make -j$(nproc --ignore 2) \ - && make install \ - && strip /usr/lib/x86_64-linux-gnu/purple-2/libskypeweb.so; \ - else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ - && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libskypeweb.so; \ - fi - -# --- - FROM bitlbee-build AS telegram-build -ARG TELEGRAM=1 +ARG TELEGRAM=0 ARG TELEGRAM_VERSION=v0.4 RUN echo TELEGRAM=${TELEGRAM} > /tmp/status \ @@ -117,25 +96,6 @@ RUN echo TELEGRAM=${TELEGRAM} > /tmp/status \ && git clone https://github.com/BenWiederhake/tdlib-purple/ \ && cd tdlib-purple \ && ./build_and_install.sh \ - # && cd tdlib-purple \ - # && git checkout ${TELEGRAM_VERSION} \ - # && TDLIB_REQ_VERSION=$(grep -o "tdlib version.*" CMakeLists.txt| tail -1 | awk '{print $3}') \ - # && cd /tmp \ - # && git clone -n https://github.com/tdlib/td.git tdlib \ - # && cd tdlib \ - # && TDLIB_VERSION=$(git log --pretty=format:"%h%x09%s" | grep "Update version to ${TDLIB_REQ_VERSION}" | awk '{print $1}') \ - # && git checkout ${TDLIB_VERSION} \ - # && mkdir build \ - # && cd build \ - # && cmake -DCMAKE_BUILD_TYPE=Release .. \ - # && make -j$(nproc --ignore 2) \ - # && make install \ - # && cd /tmp/tdlib-purple \ - # && mkdir build \ - # && cd build \ - # && cmake -DTd_DIR=/usr/local/lib/cmake/Td -DNoLottie=True -DNoVoip=True .. \ - # && make -j$(nproc --ignore 2)\ - # && make install \ && strip /usr/lib/x86_64-linux-gnu/purple-2/libtelegram-tdlib.so; \ else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libtelegram-tdlib.so \ @@ -335,33 +295,6 @@ RUN echo MATRIX=${MATRIX} > /tmp/status \ # --- -# FROM bitlbee-build AS signald-build - -# ARG SIGNAL=0 -# ARG SIGNAL_VERSION=master - -# RUN echo SIGNAL=${SIGNAL} > /tmp/status \ -# && if [ ${SIGNAL} -eq 1 ]; \ -# then cd /tmp \ -# && apt-get update \ -# && apt-get install -y --no-install-recommends cmake \ -# && git clone -n https://github.com/hoehermann/purple-signald \ -# && cd purple-signald \ -# && git checkout ${SIGNAL_VERSION} \ -# && git submodule init \ -# && git submodule update \ -# && mkdir -p build \ -# && cd build \ -# && cmake .. \ -# && make -j$(nproc --ignore 2) \ -# && make install \ -# && strip /usr/lib/x86_64-linux-gnu/purple-2/libsignald.so; \ -# else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ -# && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libsignald.so; \ -# fi - -# --- - FROM bitlbee-build AS signal-presage ARG SIGNAL=1 @@ -452,7 +385,6 @@ RUN echo WHATSAPP=${WHATSAPP} > /tmp/status \ && cd build \ && cmake .. \ && cmake --build . \ - # && cmake -DCMAKE_Go_COMPILER=/usr/lib/go-1.22/bin/go -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON --build \ && make install/strip \ && strip /usr/lib/x86_64-linux-gnu/purple-2/libwhatsmeow.so; \ else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ @@ -524,9 +456,6 @@ COPY --from=slack-build /tmp/status /tmp/plugin/slack # COPY --from=sipe-build /tmp/status /tmp/plugin/sipe COPY --from=discord-build /usr/lib/x86_64-linux-gnu/purple-2/libdiscord.so /tmp/usr/lib/x86_64-linux-gnu/purple-2/libdiscord.so -# COPY --from=discord-build /usr/lib/bitlbee/discord.la /tmp/usr/lib/bitlbee/discord.la -# COPY --from=discord-build /usr/share/bitlbee/discord-help.txt /tmp/usr/share/bitlbee/discord-help.txt -# COPY --from=discord-build /tmp/status /tmp/plugin/discord COPY --from=rocketchat-build /usr/lib/x86_64-linux-gnu/purple-2/librocketchat.so /tmp/usr/lib/x86_64-linux-gnu/purple-2/librocketchat.so COPY --from=rocketchat-build /tmp/status /tmp/plugin/rocketchat @@ -536,15 +465,7 @@ COPY --from=mastodon-build /usr/lib/bitlbee/mastodon.la /tmp/usr/lib/bitlbee/mas COPY --from=mastodon-build /usr/share/bitlbee/mastodon-help.txt /tmp/usr/share/bitlbee/mastodon-help.txt COPY --from=mastodon-build /tmp/status /tmp/plugin/mastodon -# COPY --from=matrix-build /usr/lib/x86_64-linux-gnu/purple-2/libmatrix.so /tmp/usr/lib/x86_64-linux-gnu/purple-2/libmatrix.so -# COPY --from=matrix-build /tmp/status /tmp/plugin/matrix - -# COPY --from=signald-build /usr/lib/x86_64-linux-gnu/purple-2/libsignald.so /tmp/usr/lib/x86_64-linux-gnu/purple-2/libsignald.so -# COPY --from=signald-build /tmp/status /tmp/plugin/signald - -# COPY --from=signal-presage /usr/lib/x86_64-linux-gnu/purple-2/libpresage.so /tmp/usr/lib/bitlbee/libpresage.so COPY --from=signal-presage /usr/lib/x86_64-linux-gnu/purple-2/libpresage.so /tmp/usr/lib/x86_64-linux-gnu/purple-2/libpresage.so -# COPY --from=signal-presage /usr/lib/x86_64-linux-gnu/purple-2/libpurple_presage_backend.a /tmp/usr/lib/bitlbee/libpurple_presage_backend.a # COPY --from=icyque-build /usr/lib/x86_64-linux-gnu/purple-2/libicyque.so /tmp/usr/lib/x86_64-linux-gnu/purple-2/libicyque.so # COPY --from=icyque-build /tmp/status /tmp/plugin/icyque @@ -607,6 +528,4 @@ RUN groupadd -g 101 -r bitlbee \ && apt-get clean \ && rm /plugins -EXPOSE 6667 - # CMD [ "/usr/sbin/bitlbee", "-F", "-n", "-u", "bitlbee" ] diff --git a/Dockerfile.debug b/Dockerfile.debug index f0efd0e..8dbeb07 100644 --- a/Dockerfile.debug +++ b/Dockerfile.debug @@ -20,7 +20,6 @@ RUN apt-get update \ && make install-doc \ && make install-dev \ && make install-etc \ - && strip /usr/sbin/bitlbee \ && touch /nowhere # --- @@ -52,8 +51,7 @@ RUN echo FACEBOOK=${FACEBOOK} > /tmp/status \ && git checkout ${FACEBOOK_VERSION} \ && ./autogen.sh \ && make -j$(nproc --ignore 2) \ - && make install \ - && strip /usr/lib/bitlbee/facebook.so; \ + && make install; \ else mkdir -p /usr/lib/bitlbee \ && ln -sf /nowhere /usr/lib/bitlbee/facebook.so \ && ln -sf /nowhere /usr/lib/bitlbee/facebook.la; \ @@ -74,8 +72,7 @@ RUN echo STEAM=${STEAM} > /tmp/status \ && git checkout ${STEAM_VERSION} \ && ./autogen.sh \ && make -j$(nproc --ignore 2) \ - && make install \ - && strip /usr/lib/bitlbee/steam.so; \ + && make install; \ else mkdir -p /usr/lib/bitlbee \ && ln -sf /nowhere /usr/lib/bitlbee/steam.so \ && ln -sf /nowhere /usr/lib/bitlbee/steam.la; \ @@ -96,8 +93,7 @@ RUN echo SKYPEWEB=${SKYPEWEB} > /tmp/status \ && git checkout ${SKYPEWEB_VERSION} \ && cd skypeweb \ && make -j$(nproc --ignore 2) \ - && make install \ - && strip /usr/lib/x86_64-linux-gnu/purple-2/libskypeweb.so; \ + && make install; \ else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libskypeweb.so; \ fi @@ -106,7 +102,7 @@ RUN echo SKYPEWEB=${SKYPEWEB} > /tmp/status \ FROM bitlbee-build AS telegram-build -ARG TELEGRAM=1 +ARG TELEGRAM=0 ARG TELEGRAM_VERSION=v0.4 RUN echo TELEGRAM=${TELEGRAM} > /tmp/status \ @@ -116,27 +112,7 @@ RUN echo TELEGRAM=${TELEGRAM} > /tmp/status \ && apt-get install -y --no-install-recommends cmake gperf libwebp-dev libpng-dev sudo \ && git clone https://github.com/BenWiederhake/tdlib-purple/ \ && cd tdlib-purple \ - && ./build_and_install.sh \ - # && cd tdlib-purple \ - # && git checkout ${TELEGRAM_VERSION} \ - # && TDLIB_REQ_VERSION=$(grep -o "tdlib version.*" CMakeLists.txt| tail -1 | awk '{print $3}') \ - # && cd /tmp \ - # && git clone -n https://github.com/tdlib/td.git tdlib \ - # && cd tdlib \ - # && TDLIB_VERSION=$(git log --pretty=format:"%h%x09%s" | grep "Update version to ${TDLIB_REQ_VERSION}" | awk '{print $1}') \ - # && git checkout ${TDLIB_VERSION} \ - # && mkdir build \ - # && cd build \ - # && cmake -DCMAKE_BUILD_TYPE=Release .. \ - # && make -j$(nproc --ignore 2) \ - # && make install \ - # && cd /tmp/tdlib-purple \ - # && mkdir build \ - # && cd build \ - # && cmake -DTd_DIR=/usr/local/lib/cmake/Td -DNoLottie=True -DNoVoip=True .. \ - # && make -j$(nproc --ignore 2)\ - # && make install \ - && strip /usr/lib/x86_64-linux-gnu/purple-2/libtelegram-tdlib.so; \ + && ./build_and_install.sh; \ else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libtelegram-tdlib.so \ && ln -sf /nowhere /usr/local/share/metainfo/tdlib-purple.metainfo.xml \ @@ -147,7 +123,7 @@ RUN echo TELEGRAM=${TELEGRAM} > /tmp/status \ FROM bitlbee-build AS purple-teams-build -ARG PURPLETEAMS=1 +ARG PURPLETEAMS=0 ARG PURPLETEAMS_VERSION= RUN echo PURPLETEAMS=${PURPLETEAMS} > /tmp/status \ @@ -158,9 +134,7 @@ RUN echo PURPLETEAMS=${PURPLETEAMS} > /tmp/status \ && cd purple-teams \ && git checkout ${PURPLETEAMS_VERSION} \ && make -j$(nproc --ignore 2) \ - && make install \ - && strip /usr/lib/x86_64-linux-gnu/purple-2/libteams.so \ - && strip /usr/lib/x86_64-linux-gnu/purple-2/libteams-personal.so; \ + && make install; \ else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libteams.so \ && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libteams-personal.so; \ @@ -170,7 +144,7 @@ RUN echo PURPLETEAMS=${PURPLETEAMS} > /tmp/status \ FROM bitlbee-build AS hangouts-build -ARG HANGOUTS=1 +ARG HANGOUTS=0 ARG HANGOUTS_VERSION RUN echo HANGOUTS=${HANGOUTS} > /tmp/status \ @@ -182,8 +156,7 @@ RUN echo HANGOUTS=${HANGOUTS} > /tmp/status \ && cd purple-hangouts \ && git checkout ${HANGOUTS_VERSION} \ && make -j$(nproc --ignore 2) \ - && make install \ - && strip /usr/lib/x86_64-linux-gnu/purple-2/libhangouts.so; \ + && make install; \ else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libhangouts.so; \ fi @@ -192,7 +165,7 @@ RUN echo HANGOUTS=${HANGOUTS} > /tmp/status \ FROM bitlbee-build AS slack-build -ARG SLACK=1 +ARG SLACK=0 ARG SLACK_VERSION SHELL [ "/bin/bash", "-c" ] @@ -206,8 +179,7 @@ RUN echo SLACK=${SLACK} > /tmp/status \ && git checkout 162 \ && make -j$(nproc --ignore 2) \ && install -d /usr/share/pixmaps/pidgin/protocols/{16,22,48} \ - && make install \ - && strip /usr/lib/x86_64-linux-gnu/purple-2/libslack.so; \ + && make install; \ else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libslack.so; \ fi @@ -230,8 +202,7 @@ RUN echo SIPE=${SIPE} > /tmp/status \ && ./autogen.sh \ && ./configure --prefix=/usr \ && make -j$(nproc --ignore 2) \ - && make install \ - && strip /usr/lib/x86_64-linux-gnu/purple-2/libsipe.so; \ + && make install; \ else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libsipe.so \ && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libsipe.la \ @@ -254,8 +225,7 @@ RUN echo DISCORD=${DISCORD} > /tmp/status \ && cd purple-discord \ && git checkout ${DISCORD_VERSION} \ && make -j$(nproc --ignore 2) \ - && cp /tmp/purple-discord/libdiscord.so /usr/lib/x86_64-linux-gnu/purple-2/libdiscord.so \ - && strip /usr/lib/x86_64-linux-gnu/purple-2/libdiscord.so; \ + && cp /tmp/purple-discord/libdiscord.so /usr/lib/x86_64-linux-gnu/purple-2/libdiscord.so; \ else mkdir -p /usr/lib/bitlbee \ && ln -sf /nowhere /usr/lib/bitlbee/libdiscord.so; \ fi @@ -264,7 +234,7 @@ RUN echo DISCORD=${DISCORD} > /tmp/status \ FROM bitlbee-build AS rocketchat-build -ARG ROCKETCHAT=1 +ARG ROCKETCHAT=0 ARG ROCKETCHAT_VERSION RUN echo ROCKETCHAT=${ROCKETCHAT} > /tmp/status \ @@ -276,8 +246,7 @@ RUN echo ROCKETCHAT=${ROCKETCHAT} > /tmp/status \ && cd purple-rocketchat \ && git checkout ${ROCKETCHAT_VERSION} \ && make -j$(nproc --ignore 2) \ - && make install \ - && strip /usr/lib/x86_64-linux-gnu/purple-2/librocketchat.so; \ + && make install; \ else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/librocketchat.so; \ fi @@ -286,7 +255,7 @@ RUN echo ROCKETCHAT=${ROCKETCHAT} > /tmp/status \ FROM bitlbee-build AS mastodon-build -ARG MASTODON=1 +ARG MASTODON=0 ARG MASTODON_VERSION RUN echo MASTODON=${MASTODON} > /tmp/status \ @@ -298,8 +267,7 @@ RUN echo MASTODON=${MASTODON} > /tmp/status \ && sh ./autogen.sh \ && ./configure \ && make -j$(nproc --ignore 2) \ - && make install \ - && strip /usr/lib/bitlbee/mastodon.so; \ + && make install; \ else mkdir -p /usr/lib/bitlbee \ && ln -sf /nowhere /usr/lib/bitlbee/mastodon.so \ && ln -sf /nowhere /usr/lib/bitlbee/mastodon.la \ @@ -327,44 +295,16 @@ RUN echo MATRIX=${MATRIX} > /tmp/status \ && git checkout ${MATRIX_VERSION} \ && if [ $(uname -m) == "armv7l" ]; then patch < ../matrix-e2e.c.patch; fi \ && make -j$(nproc --ignore 2) \ - && make install \ - && strip /usr/lib/x86_64-linux-gnu/purple-2/libmatrix.so; \ + && make install; \ else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libmatrix.so; \ fi # --- -# FROM bitlbee-build AS signald-build - -# ARG SIGNAL=0 -# ARG SIGNAL_VERSION=master - -# RUN echo SIGNAL=${SIGNAL} > /tmp/status \ -# && if [ ${SIGNAL} -eq 1 ]; \ -# then cd /tmp \ -# && apt-get update \ -# && apt-get install -y --no-install-recommends cmake \ -# && git clone -n https://github.com/hoehermann/purple-signald \ -# && cd purple-signald \ -# && git checkout ${SIGNAL_VERSION} \ -# && git submodule init \ -# && git submodule update \ -# && mkdir -p build \ -# && cd build \ -# && cmake .. \ -# && make -j$(nproc --ignore 2) \ -# && make install \ -# && strip /usr/lib/x86_64-linux-gnu/purple-2/libsignald.so; \ -# else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ -# && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libsignald.so; \ -# fi - -# --- - FROM bitlbee-build AS signal-presage -ARG SIGNAL=1 +ARG SIGNAL=0 ARG SIGNAL_VERSION=master RUN echo SIGNAL=${SIGNAL} > /tmp/status \ @@ -378,8 +318,7 @@ RUN echo SIGNAL=${SIGNAL} > /tmp/status \ && cd purple-presage/build \ && cmake .. \ && cmake --build . \ - && cmake --install . \ - && strip /usr/lib/x86_64-linux-gnu/purple-2/libpresage.so; \ + && cmake --install .; \ else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libpresage.so; \ fi @@ -400,8 +339,7 @@ RUN echo MATTERMOST=${MATTERMOST} > /tmp/status \ && cd purple-mattermost \ && git checkout ${MATTERMOST_VERSION} \ && make -j$(nproc --ignore 2) \ - && make install \ - && strip /usr/lib/x86_64-linux-gnu/purple-2/libmattermost.so; \ + && make install; \ else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libmattermost.so; \ fi @@ -420,8 +358,7 @@ RUN echo ICYQUE=${ICYQUE} > /tmp/status \ && cd icyque \ && git checkout ${ICYQUE_VERSION} \ && make -j$(nproc --ignore 2) \ - && make install \ - && strip /usr/lib/x86_64-linux-gnu/purple-2/libicyque.so; \ + && make install; \ else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libicyque.so; \ fi @@ -430,7 +367,7 @@ RUN echo ICYQUE=${ICYQUE} > /tmp/status \ FROM bitlbee-build AS whatsapp-build -ARG WHATSAPP=1 +ARG WHATSAPP=0 ARG WHATSAPP_VERSION=v1.15.0 RUN echo WHATSAPP=${WHATSAPP} > /tmp/status \ @@ -452,9 +389,7 @@ RUN echo WHATSAPP=${WHATSAPP} > /tmp/status \ && cd build \ && cmake .. \ && cmake --build . \ - # && cmake -DCMAKE_Go_COMPILER=/usr/lib/go-1.22/bin/go -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON --build \ - && make install/strip \ - && strip /usr/lib/x86_64-linux-gnu/purple-2/libwhatsmeow.so; \ + && make install/strip; \ else mkdir -p /usr/lib/x86_64-linux-gnu/purple-2 \ && ln -sf /nowhere /usr/lib/x86_64-linux-gnu/purple-2/libwhatsmeow.so; \ fi @@ -507,10 +442,10 @@ COPY --from=otr-install /tmp/status /tmp/plugin/otr COPY --from=skypeweb-build /usr/lib/x86_64-linux-gnu/purple-2/libskypeweb.so /tmp/usr/lib/x86_64-linux-gnu/purple-2/libskypeweb.so COPY --from=skypeweb-build /tmp/status /tmp/plugin/skypeweb -COPY --from=telegram-build /usr/lib/x86_64-linux-gnu/purple-2/libtelegram-tdlib.so /tmp/usr/lib/x86_64-linux-gnu/purple-2/libtelegram-tdlib.so -COPY --from=telegram-build /usr/local/share/metainfo/tdlib-purple.metainfo.xml /tmp/usr/local/share/metainfo/tdlib-purple.metainfo.xml -COPY --from=telegram-build /usr/local/share/locale /tmp/usr/local/share/locale -COPY --from=telegram-build /tmp/status /tmp/plugin/telegram +# COPY --from=telegram-build /usr/lib/x86_64-linux-gnu/purple-2/libtelegram-tdlib.so /tmp/usr/lib/x86_64-linux-gnu/purple-2/libtelegram-tdlib.so +# COPY --from=telegram-build /usr/local/share/metainfo/tdlib-purple.metainfo.xml /tmp/usr/local/share/metainfo/tdlib-purple.metainfo.xml +# COPY --from=telegram-build /usr/local/share/locale /tmp/usr/local/share/locale +# COPY --from=telegram-build /tmp/status /tmp/plugin/telegram COPY --from=hangouts-build /usr/lib/x86_64-linux-gnu/purple-2/libhangouts.so /tmp/usr/lib/x86_64-linux-gnu/purple-2/libhangouts.so COPY --from=hangouts-build /tmp/status /tmp/plugin/hangouts @@ -585,23 +520,7 @@ RUN groupadd -g 101 -r bitlbee \ && groupadd -g 102 -r signald \ && usermod -aG signald bitlbee \ && source /plugins \ - && if [ ${OTR} -eq 1 ]; then PKGS="${PKGS} libotr5"; fi \ - && if [ ${FACEBOOK} -eq 1 ] || [ ${SKYPEWEB} -eq 1 ] || [ ${HANGOUTS} -eq 1 ] \ - || [ ${ROCKETCHAT} -eq 1 ] || [ ${MATRIX} -eq 1 ] || [ ${SIGNAL} -eq 1 ] \ - || [ ${ICYQUE} -eq 1 ]; then PKGS="${PKGS} libjson-glib-1.0-0"; fi \ - && if [ ${STEAM} -eq 1 ] || [ ${TELEGRAM} -eq 1 ] || [ ${MATRIX} -eq 1 ]; then PKGS="${PKGS} libgcrypt20"; fi \ - && if [ ${TELEGRAM} -eq 1 ]; then PKGS="${PKGS} zlib1g libwebp7 libpng16-16 libstdc++6"; fi \ - && if [ ${HANGOUTS} -eq 1 ] || [ ${SIGNAL} -eq 1 ]; then PKGS="${PKGS} libprotobuf-c1"; fi \ - && if [ ${SIGNAL} -eq 1 || [ ${DISCORD} -eq 1 ] ]; then PKGS="${PKGS} libqrencode4"; fi \ - && if [ ${DISCORD} -eq 1 ]; then PKGS="%{PKGS} libnss3"; fi \ - && if [ ${WHATSAPP} -eq 1 ]; then PKGS="${PKGS} libopusfile-dev libgdk-pixbuf2.0-dev"; fi \ - && if [ ${SIPE} -eq 1 ]; then PKGS="${PKGS} libxml2"; fi \ - && if [ ${ROCKETCHAT} -eq 1 ]; then PKGS="${PKGS} libmarkdown2"; fi \ - && if [ ${MATRIX} -eq 1 ]; then PKGS="${PKGS} libsqlite3-0 libhttp-parser2.9 libolm2"; fi \ - && if [ ${WHATSAPP} -eq 1 ]; then PKGS="${PKGS} libgdk-pixbuf2.0-dev libopusfile-dev"; fi \ - && if [ ${PURPLETEAMS} -eq 1 ]; then PKGS="${PKGS} libjson-glib-1.0-0"; fi \ - && if [ ${LURCH} -eq 1 ]; then PKGS="${PKGS} libxml2 libmxml1 libsqlite3-0 libgcrypt20"; fi \ - && PKGS="${PKGS} vim libqrencode4 gdb" \ + && PKGS="${PKGS} libotr5 libjson-glib-1.0-0 libgcrypt20 zlib1g libwebp7 libpng16-16 libstdc++6 libprotobuf-c1 libqrencode4 libnss3 libopusfile-dev libgdk-pixbuf2.0-dev libxml2 libmarkdown2 libsqlite3-0 libhttp-parser2.9 libolm2 libmxml1 vim gdb" \ && apt-get update \ && apt-get install -y --no-install-recommends ${PKGS} \ && apt-get clean \ @@ -6,7 +6,7 @@ This repo is a [fork](https://github.com/ezkrg/docker-bitlbee-libpurple) The images are built and pushed to [dockerhub](https://hub.docker.com/r/terminaldweller/bitlbee_purple) automatically via github workflows. -This docker image includes bitlbee-libpurple with a bunch of useful plugins: +Included plugins: - telegram via [tdlib-purple](https://github.com/BenWiederhake/tdlib-purple/) - hangouts via [purple-hangouts](https://bitbucket.org/EionRobb/purple-hangouts) @@ -22,9 +22,9 @@ This docker image includes bitlbee-libpurple with a bunch of useful plugins: - [steam](https://github.com/jgeboski/bitlbee-steam) - [sipe](https://github.com/tieto/sipe) -for mattermost, use [matterircd](https://github.com/42wim/matterircd) +for mattermost, use [matterircd](https://github.com/42wim/matterircd). -for matrix, use [matrix2051](https://github.com/progval/matrix2051) +for matrix, use [matrix2051](https://github.com/progval/matrix2051). ## Building and Running diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..8dd9e25 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,52 @@ +# DO NOT RUN THIS FOR ANYTHING OTHER THAN DEBUGGING. SERIOUSLY. +# https://wiki.bitlbee.org/DebuggingCrashes +services: + bb_dbg: + image: bb_dbg + build: + context: . + dockerfile: ./Dockerfile.debug + deploy: + resources: + limits: + memory: 1024M + logging: + driver: "json-file" + options: + max-size: "100m" + networks: + - bb_dbg_net + privileged: true + environment: + - BITLBEE_DEBUG=1 + ports: + - "127.0.0.1:9667:6667" + - "172.17.0.1:9667:6667" + command: + [ + "gdb", + "-ex", + "'handle SIGPIPE nostop noprint pass'", + "-ex", + "run", + "-ex", + "bt", + "--args", + "/usr/sbin/bitlbee", + "-Dnv", + "-d", + "/var/lib/bitlbee", + ] + volumes: + - bb_dbg_userdata:/var/lib/bitlbee + - ./gdb_commands:/gdb_commands + - /etc/ssl/certs:/etc/ssl/certs + cap_add: + - ALL + dns: + - 1.1.1.1 + - 8.8.8.8 +networks: + bb_dbg_net: +volumes: + bb_dbg_userdata: diff --git a/gdb_commands b/gdb_commands new file mode 100644 index 0000000..c2d4647 --- /dev/null +++ b/gdb_commands @@ -0,0 +1,2 @@ + +#set follow-fork-mode parent diff --git a/plugin_versions b/plugin_versions index f704a84..0d77561 100644 --- a/plugin_versions +++ b/plugin_versions @@ -1,15 +1,8 @@ -BITLBEE_VERSION=3.6 -DISCORD_VERSION=607f988 FACEBOOK_VERSION=v1.2.2 HANGOUTS_VERSION=55b9f01 ICYQUE_VERSION=4fc08a0 MASTODON_VERSION=v1.4.5 -MATRIX_VERSION=034ebf8 ROCKETCHAT_VERSION=484e5bf -SIGNAL_VERSION=v0.12.0 SIPE_VERSION=3db5111 -SKYPEWEB_VERSION=8b29d7b SLACK_VERSION=3433ac5 STEAM_VERSION=a6444d2 -TELEGRAM_VERSION=v0.8.1 -WHATSAPP_VERSION=v1.2.0 |