Created attachment 247375 [details] git patch Current version of net-im/signal-cli does not work anymore (I think the upstream protocol changed in an incompatible way). signal-cli is tightly coupled with net-im/libsignal-client, so that needs updating too and I'm attaching a patch that treats both. They build as a ports and in poudriere. I was able to register a new account and send messages (which more or less sums up to my use case); however it doesn't seem to work as a drop in replacement of version 0.9.0 (currently in port tree), since it fails to read old account data. I removed the PowerPC patch as it does not apply anymore: I have no idea if it's still needed with some modifications (since I don't have any access to a PowerPC machine). I left the BROKEN line for aarch64, instead, though I have no idea if it's still the case. I'd appreciate If anyone would test this, so that it could be integrated (perhaps after polishing it a bit). Comments are also welcome in case I did something in a non orthodox way :) I might even accept maintainership, if nothing too big is missing. Last thing: I tested this only on 2023Q4 port tree. I guess it should work on main, but I'll test 2024Q1 ASAP. Credits goes also to the people in #267407, as my work is based on their patches for previous versions.
I tried the patch, and both libsignal-client and signal-cli compiled and installed from the ports tree. Now when I run them I get errors related to Linux shared libraries (ie: libm and libc). % JAVA_VERSION=21 signal-cli link -n scli | xargs -n 1 qrencode -t ANSI256 WARN Manager - Failed to call libsignal-client: /tmp/11580657058342573109libsignal_jni.so: Shared object "libc.so.6" not found, required by "11580657058342573109libsignal_jni.so" Missing required native library dependency: libsignal-client I have the Linux compatibility layer installed and working for other applications. % pkg info | grep linux drm-kmod-20220907_1 Metaport of DRM modules for the linuxkpi-based KMS components linux-c7-elfutils-libelf-0.176_2 ELF file handling library (CentOS 7.9.2009) linux-c7-elfutils-libs-0.176_2 ELF file handling libraries (CentOS 7.9.2009) linux_base-c7-7.9.2009_1 Base set of packages needed in Linux mode (Linux CentOS 7.9.2009) linuxlibertine-g-20120116_2 Linux Libertine G and Linux Biolinum G fonts % freebsd-version 13.2-RELEASE-p2
Looks related to needing a Linux JVM to use in the compat layer? https://forums.freebsd.org/threads/java-app-with-linux-compiled-library-dependency.70442/ Same issue here.
(In reply to russell.adams from comment #1) if you install from the ports tree, the build environment may cause some files to be included. Can you try to build in poudriere ?
(In reply to russell.adams from comment #1) AFAICT Linux compat is not needed at all: a simple "signal-cli link -n scli" works for me on a 13.2 machine where no linux package is installed and linux.ko is not loaded. Using "JAVA_VERSION=21" in front does not make any difference either. As Kurt suggested, however, I'm building in Poudriere and I currently have no other idea. Here: # ldd /usr/local/lib/libsignal_jni.so /usr/local/lib/libsignal_jni.so: libthr.so.3 => /lib/libthr.so.3 (0x19a03fc54000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x19a0428ec000) libc.so.7 => /lib/libc.so.7 (0x19a03dac6000) Could you please check what the above gives in your case?
(In reply to ml from comment #4) I have the same library list. % ldd /usr/local/lib/libsignal_jni.so /usr/local/lib/libsignal_jni.so: libthr.so.3 => /lib/libthr.so.3 (0x22f94bc1f000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x22f9500d3000) libc.so.7 => /lib/libc.so.7 (0x22f94ca3b000) I haven't setup a Poudreiere environment, I only had my ports tree to test against.
(In reply to russell.adams from comment #5) What's the output of pkg info | grep -iE "(jdk|jre)" ? You don't have another libsignal_jni.so somewhere in path? Your /tmp isn't mounted noexec, is it? Unfortunately I really have no other idea :(
Created attachment 248878 [details] Update libsignal-client to version 0.39.2 and signal-cli to 0.13.1 Version 0.32.1/0.12.5 do not work anymore; update again. Also offer to take maintainership.
testbuilds@work
(In reply to Kurt Jaeger from comment #8) poudriere complains: /!\ libsignal-client-0.39.2,1: Makefile errors /!\ CARGO_USE_GITHUB is unsupported, please use CARGO_CRATES (regenerate it with make cargo-crates)
(In reply to Kurt Jaeger from comment #9) I don't get such an error. What version of poudriere? Which target? I'm using poudriere 3.4.0 and can build for 14.0 and 13.2. I'm using 2024Q1 though, so is this possibly something related to main port branch? Also, I found this hack in a previous version of the port. I think I understand why it's there, but I'm not expert enough to solve it differently. I asked for help on questions@, but, so far, didn't get any answer.
(In reply to ml from comment #10) Building it without poudriere right now. Maybe this helps me to understand what goes wrong...
(In reply to Kurt Jaeger from comment #11) Well, it builds outside poudriere.
(In reply to Kurt Jaeger from comment #12) After moving from 2024Q1 to 2024Q2 I too cannot build anymore: the problem is the man pages relocation. I'm attaching an updated patch.
Created attachment 249924 [details] git patch