-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Add Signal-CLI (not packaged for aarch64 debian) #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds Signal-CLI to the openclaw_assistant_dev Home Assistant add-on image by building it from source in a dedicated build stage and shipping the resulting distribution (plus a Java runtime) in the final image, with an arm64-specific libsignal native library patch.
Changes:
- Introduces a
signal-cli-builderstage that clones/buildsAsamK/signal-clivia Gradle. - Patches
libsignal-clientonarm64by injecting an externally-providedlibsignal_jni.sointo the jar. - Copies the built Signal-CLI distribution and Java runtime into the final add-on image and updates
PATH/JAVA_HOME.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
New build worked, this can merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| curl -fsSL "https://github.com/exquo/signal-libs-build/releases/download/libsignal_v${LIBSIGNAL_VERSION}/libsignal_jni.so-v${LIBSIGNAL_VERSION}-aarch64-unknown-linux-gnu.tar.gz" -o /tmp/libsignal.tar.gz && \ | ||
| tar -xzf /tmp/libsignal.tar.gz -C /tmp && \ | ||
| zip -uj build/install/signal-cli/lib/libsignal-client-${LIBSIGNAL_VERSION}.jar /tmp/libsignal_jni.so && \ | ||
| rm /tmp/libsignal.tar.gz /tmp/libsignal_jni.so; \ |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patching logic only handles TARGETARCH=arm64, but the add-on declares armv7 support in config.yaml. If the upstream libsignal-client jar only contains x86_64 natives (as noted in the comment above), the armv7 image will ship a signal-cli that cannot load its JNI library at runtime. Either add an armv7 native library path (if available) or explicitly fail/disable the signal-cli build/copy steps for armv7 to avoid producing a broken image for a listed architecture.
| rm /tmp/libsignal.tar.gz /tmp/libsignal_jni.so; \ | |
| rm /tmp/libsignal.tar.gz /tmp/libsignal_jni.so; \ | |
| elif [ "${TARGETARCH}" = "armv7" ] || [ "${TARGETARCH}" = "arm/v7" ]; then \ | |
| echo "ERROR: signal-cli JNI library is not available for TARGETARCH=${TARGETARCH} (armv7). Failing build to avoid producing a broken image." >&2; \ | |
| exit 1; \ | |
| else \ | |
| echo "No architecture-specific libsignal-client patching performed for TARGETARCH=${TARGETARCH}."; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patching logic only handles
TARGETARCH=arm64, but the add-on declaresarmv7support inconfig.yaml. If the upstreamlibsignal-clientjar only contains x86_64 natives (as noted in the comment above), thearmv7image will ship asignal-clithat cannot load its JNI library at runtime. Either add an armv7 native library path (if available) or explicitly fail/disable the signal-cli build/copy steps for armv7 to avoid producing a broken image for a listed architecture.
Hey copilot; go read this, then tell me why we should add your block of code!
|
@techartdev Copilot didn't read my comment in the previous round about armv7 support having been discontinued from Home Assistant OS more than 10 months ago... Can you talk to it? Or tell me how I can @ it, so it will stop suggesting changes for unsupported configs? 😅 |
Yeah, I know it is dropped but we have users who are still on it. Couple of people requested adding support of it. What I'm more worried about this is it will add bloat to the install. Java JRE is 150-200MB compressed. Signal-CLI + Gradle build artifacts are another 50-100MB. Then you have a slow build process, especially in low end devices. I cannot agree we have to push compilation of signal-cli directly into the image. Why isn't possible to use signal-cli-rest-api? (https://github.com/bbernhard/signal-cli-rest-api). I know it need to be a second addon but it's much better, as people who do not need Signal won't need to run all of this on their devices. Also git clone main + ad-hoc jar patching is tricky and could be risky. If we really decide to push it inside we need to define the deps clearly, pin an exact signal-cli version and not bad to verify the signatures on build. And if something breaks in this process in future it will fail the whole App/Add-On. |
|
Ok let's close this. If anyone asks, you can point them at my signal-cli-rest-api fork, it implements the 3 missing jsonrpc endpoints prevent the upstream one from working with openclaw. I couldn't get openclaw to receive messages w/ my fork even though it appeared to be 100% working in openclaw and when subscribed via a curl web socket. Before that I also tried modifying openclaw's signal implementation to support Normal/Native polling based message reception. That worked a single time out of the dozen or so times I ran and tested it, polling was also very slow vs the jsonrpc web socket. So I wouldn't recommend that approach. |
I tried a lot of different ways to get Signal-CLI to work without changing the image, all of them failed (the Signal messenger HA addon doesn't implement the correct API endpoints
/api/v1/{check,rpc,events})...This approach is the simplest and even then isn't that straight forward because libsignal isn't available for aarch64 by default.
This is how I got it going:
/config/signal-databecause the default location/root/.local/share/signal-cliwould not persisted across container upgradessignal-cli-wrapper:
cliPathto/config/signal-cli-wrapperso it uses our wrapper; then configure normally... turn on autostart, set openclaw account phone number, allowlist your real phone number, set dmPolicy to allowlist, etc....