Hello,
I noticed a problem with the OpenBSD port of lynx. There is a
little-known (probably because it's barely documented) (and
hilariously, one of the default keybindings ing is ^S :) feature of lynx
for copying/pasting to/from a clipboard. It can be used by setting the
following settings in lynx.cfg:
KEYMAP:<key>:PASTE_URL
KEYMAP:<key>:TO_CLIBOARD
and setting environment variables RL_CLCOPY_CMD and RL_PASTE_CMD to
appropriate commands (such as `xclip' an `xclip -o', or `tmux loadb -'
and `tmux showb').
However, presumably because lynx is pledged on OpenBSD, attempting to
actually use the feature aborts with the message
"Abort trap (core dump)", and then I have to type `reset'.
Initially I thought to fix it by disabling the definition of CAN_CUT_AND_PASTE
in WWW/Library/Implementation/HTUtils.h, but that gave me linker errors:
ld: error: undefined symbol: LYmsec_delay
>>> referenced by LYMainLoop.c
>>> LYMainLoop.o:(set_curdoc_link_by_mouse)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error 1 in src (makefile:111 'lynx')
*** Error 2 in /usr/ports/pobj/lynx-2.8.9rel1/lynx2.8.9rel.1 (makefile:206
'all')
*** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2961
'/usr/ports/pobj/lynx-2.8.9rel1/.build_done': @cd /usr/ports/pobj/lynx-2.8.9...)
*** Error 2 in /usr/ports/www/lynx
(/usr/ports/infrastructure/mk/bsd.port.mk:2601 'all': @lock=lynx-2.8.9rel1p0;
export _LOCKS_HELD=" lynx-...)
So, instead I disabled clipboard in src/LYMainLoop.c (see diff below),
and it seems to work now. Would like to see any other
thoughts/seggestions.
Also, I had a bit of trouble understanding how to generate diffs for new
files with cvs. Did I do it correctly?
$ cd /usr/ports/www/lynx
$ cvs add patches/patch-src_LYMainLoop_c
$ cvs diff -uNp
Alexander
Index: patches/patch-src_LYMainLoop_c
===================================================================
RCS file: patches/patch-src_LYMainLoop_c
diff -N patches/patch-src_LYMainLoop_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_LYMainLoop_c 30 May 2023 11:31:48 -0000
@@ -0,0 +1,12 @@
+--- src/LYMainLoop.c.orig Tue May 30 14:29:30 2023
++++ src/LYMainLoop.c Tue May 30 14:30:30 2023
+@@ -7212,7 +7212,8 @@
+ handle_LYK_DOWN_HALF(&old_c, real_c);
+ break;
+
+-#ifdef CAN_CUT_AND_PASTE
++/* Disabling clipboard interactions to avoid pledged calls to exec. */
++#if 0
+ case LYK_TO_CLIPBOARD: /* ^S */
+ {
+ char *s;