maintainer-feedback requested: [Bug 285670] x11-wm/xfce4-session: bashism in xflock4 script in 4.20.2

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 26 Mar 2025 11:22:15 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-xfce (Nobody)
<xfce@FreeBSD.org> for maintainer-feedback:
Bug 285670: x11-wm/xfce4-session: bashism in xflock4 script in 4.20.2
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285670



--- Description ---
After updating the port to 4.20.2, attempts to lock the screen fail
with this error:

   /usr/local/bin/xflock4: arithmetic expression: expecting primary: "2**31 -
1"

I presume this is due to line#55 in xflock4 and the failure is
caused by the script being run with /bin/sh:

    1	#!/bin/sh
    2	#
   [...]
   49	# echo is used to strip blanks
   50	# $((2**31 - 1)) is MAXINT, which disables timeout: see
   51	# https://dbus.freedesktop.org/doc/api/html/group__DBusPendingCall.html
   52	ret=$(echo $(dbus-send --session \
   53			       --dest=org.xfce.SessionManager \
   54			       --print-reply=literal \
   55			       --reply-timeout=$((2**31 - 1)) \
   56			       --type=method_call \
   57			       /org/xfce/SessionManager \
   58			       org.xfce.Session.Manager.Lock))