Bug 276037 - Update net-im/signal-cli to 0.13.1 and net-im/libsignal-client to 0.39.2
Summary: Update net-im/signal-cli to 0.13.1 and net-im/libsignal-client to 0.39.2
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Rodrigo Osorio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-31 15:20 UTC by ml
Modified: 2024-04-12 07:51 UTC (History)
5 users (show)

See Also:


Attachments
git patch (99.89 KB, patch)
2023-12-31 15:20 UTC, ml
no flags Details | Diff
Update libsignal-client to version 0.39.2 and signal-cli to 0.13.1 (120.05 KB, patch)
2024-03-02 17:07 UTC, ml
no flags Details | Diff
git patch (119.13 KB, patch)
2024-04-12 07:51 UTC, ml
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ml 2023-12-31 15:20:10 UTC
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.
Comment 1 russell.adams 2024-01-16 17:46:16 UTC
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
Comment 2 russell.adams 2024-01-17 07:37:16 UTC
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.
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2024-01-17 13:28:31 UTC
(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 ?
Comment 4 ml 2024-01-17 18:04:19 UTC
(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?
Comment 5 russell.adams 2024-01-18 14:29:05 UTC
(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.
Comment 6 ml 2024-01-18 15:51:28 UTC
(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 :(
Comment 7 ml 2024-03-02 17:07:20 UTC
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.
Comment 8 Kurt Jaeger freebsd_committer freebsd_triage 2024-03-02 21:38:41 UTC
testbuilds@work
Comment 9 Kurt Jaeger freebsd_committer freebsd_triage 2024-03-03 07:47:06 UTC
(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)
Comment 10 ml 2024-03-03 10:57:18 UTC
(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.
Comment 11 Kurt Jaeger freebsd_committer freebsd_triage 2024-03-03 19:31:41 UTC
(In reply to ml from comment #10)
Building it without poudriere right now. Maybe this helps me to understand
what goes wrong...
Comment 12 Kurt Jaeger freebsd_committer freebsd_triage 2024-03-03 21:18:00 UTC
(In reply to Kurt Jaeger from comment #11)
Well, it builds outside poudriere.
Comment 13 ml 2024-04-12 07:51:12 UTC
(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.
Comment 14 ml 2024-04-12 07:51:40 UTC
Created attachment 249924 [details]
git patch