As per summary. Waylock is a screenlocker for Wayland similar to swaylock but written in zig by river author. [1], [2]. References: [1]: https://github.com/ifreund/waylock [2]: https://github.com/ifreund/waylock/blob/master/PACKAGING.md Notice, that -Dcpu=baseline is essential for compiling binary that will run on outdated CPU's. This is also reflected in: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269206
Created attachment 239901 [details] v0 (apply via "git am") Does it actually work for you? Can you unlock the screen? Packaging is the easy part as one can use x11-wm/river + x11/swaylock as templates. Disclaimer: I'm not interested in Zig or waylock myself.
Created attachment 239902 [details] v0 (apply via "git am") Oops, forgot to add security/unix-selfauth-helper to dependencies.
Created attachment 239903 [details] v0 (apply via "git am") Oops, missed v0.6.1 which doesn't need patching for Zig 0.10.
thanks for adding. i tried building it, with latest patch ( attachment 293903 ). unfortunately, i am unable to unlock it. waylock just gives black screen, and typing password gives nothing. i will contact upstream about this.
the reason of such behavior is that waylock segfaulted. will investigate further.
to proceed with core dump investigation i was said to not strip debug symbols ( line with WITH_DEBUG in CONFIGURE_ARGS ), i can try this locally in port, but how exactly?
WITH_DEBUG is a ports-global feature, usually defined on command-line, its value can be anything (including empty). See /usr/ports/Mk/Features/debug.mk Try "make clean all deinstall install WITH_DEBUG= " (without quotes)
Installing waylock port/package is only necessary to get FreeBSD-specific PAM config (exactly same as in x11/swaylock) i.e., etc/pam.d/waylock + unix-selfauth-helper package. After that you can debug the regular way from a Git tree via "zig build && zig-out/bin/waylock", "git bisect ...", etc.
Created attachment 239955 [details] upstream patch attached patch from upstream resolved the issue. Notice, that soon after i tested the patch and confirmed it fixes, there will be new 0.6.2 tag, so it's best to wait for new sources. Thank you very much for port.
another suggestion was to use safe instead fast in -Drelease
https://github.com/ifreund/waylock/releases/tag/v0.6.2
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=16ce45fc2070b7333d7c4f7d0040c14426f37748 commit 16ce45fc2070b7333d7c4f7d0040c14426f37748 Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2023-02-06 19:04:21 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2023-02-06 19:25:58 +0000 x11/waylock: add new port Waylock is a small screenlocker for Wayland compositors implementing ext-session-lock-v1. The ext-session-lock-v1 protocol is significantly more robust than previous client-side Wayland screen locking approaches. Importantly, the screenlocker crashing does not cause the session to be unlocked. https://github.com/ifreund/waylock PR: 269320 Tested by: Oleh Vinichenko x11/Makefile | 1 + x11/waylock/Makefile (new) | 54 +++++++++++++++++++++++++++++ x11/waylock/distinfo (new) | 7 ++++ x11/waylock/files/patch-pam.d_waylock (new) | 11 ++++++ x11/waylock/pkg-descr (new) | 5 +++ 5 files changed, 78 insertions(+)
Thanks for the help (testing, debugging, contacting upstream). I've fixed a similar issue in ports e239314a86fd.
(In reply to Oleh Vinichenko from comment #10) Zig itself is built with -Drelease-fast according to https://github.com/ziglang/zig/commit/72800f176e70 -Drelease-fast also matches -DNDEBUG behavior in other ports (default at least in USES=cmake consumers). I'm trying to keep Zig bits consistent to facilitate refactoring into USES=zig.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=425effc683bc48fedc3d12b348c85977910ce2b0 commit 425effc683bc48fedc3d12b348c85977910ce2b0 Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2023-02-06 19:56:44 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2023-02-06 20:03:31 +0000 x11/waylock: disable bogus "make test" support All other lang/zig consumers have tests but not this one. $ zig build test error: Cannot run step 'test' because it does not exist PR: 269320 x11/waylock/Makefile | 3 --- 1 file changed, 3 deletions(-)