On Thu, May 21, 2020 at 11:58:37AM +0100, Stuart Henderson wrote:
> I've written a patch to add bsd-auth support back to slock 1.4 which
> I've been using for a while. Tidied the make variable handling a bit
> as well, no need to patch to use ?=, they can just be overridden with
> MAKE_FLAGS. OK?
I would prefer if this used the libc version of explicit_bzero instead
of the local copy. For this, set COMPATSRC to empty in compat.mk (why do
you add a COPTSFLAG=-Os via a patch?).
While the updated slock seems to work fine from the command line, it
doesn't lock at all if I use it from a i3 binding. I have been using
bindsym $mod+Mod1+l exec "slock"
in my ~/.i3/config for many years without issue, but this breaks with
this update. In my xsession-errors I see:
slock: unable to grab mouse pointer for screen 0
slock: unable to grab keyboard for screen 0
I haven't looked more closely into why this happens, but I would
appreciate a workaround for this so I can keep a binding for the lock.
Out of curiosity: what prompted this update?
>
> Index: Makefile
> ===
> RCS file: /cvs/ports/x11/slock/Makefile,v
> retrieving revision 1.17
> diff -u -p -r1.17 Makefile
> --- Makefile 12 Jul 2019 20:51:21 - 1.17
> +++ Makefile 21 May 2020 10:58:17 -
> @@ -2,9 +2,7 @@
>
> COMMENT= simple X screen locker
>
> -# slock-1.4 drops bsd-auth support; CVE-2016-6866 doesn't affect
> HAVE_BSD_AUTH
> -DISTNAME=slock-1.3
> -REVISION=1
> +DISTNAME=slock-1.4
>
> CATEGORIES= x11
>
> @@ -19,9 +17,11 @@ WANTLIB= X11 c Xext Xrandr
>
> MASTER_SITES=http://dl.suckless.org/tools/
>
> -MAKE_ENV=CC="${CC}" \
> - LDFLAGS="${LDFLAGS}"
> -FAKE_FLAGS= DESTDIR=""
> +MAKE_FLAGS= CC="${CC}" \
> + COPTFLAGS="${CFLAGS}" \
> + MANPREFIX=${PREFIX}/man \
> + X11INC=${X11BASE}/include \
> + X11LIB=${X11BASE}/lib
>
> NO_TEST= Yes
>
> Index: distinfo
> ===
> RCS file: /cvs/ports/x11/slock/distinfo,v
> retrieving revision 1.10
> diff -u -p -r1.10 distinfo
> --- distinfo 5 Mar 2016 19:17:01 - 1.10
> +++ distinfo 21 May 2020 10:58:17 -
> @@ -1,2 +1,2 @@
> -SHA256 (slock-1.3.tar.gz) = urSjrqQEaqD9A2HDZJt5uQylMbxd+uPEpsD+Q2FSvRg=
> -SIZE (slock-1.3.tar.gz) = 5943
> +SHA256 (slock-1.4.tar.gz) = tThJ28YBCamH16SbjaGXMFwpMH/XTBLcGK8NMEQ5Lmo=
> +SIZE (slock-1.4.tar.gz) = 6889
> Index: patches/patch-Makefile
> ===
> RCS file: /cvs/ports/x11/slock/patches/patch-Makefile,v
> retrieving revision 1.5
> diff -u -p -r1.5 patch-Makefile
> --- patches/patch-Makefile5 Mar 2016 19:17:01 - 1.5
> +++ patches/patch-Makefile21 May 2020 10:58:17 -
> @@ -1,6 +1,8 @@
> -$OpenBSD: patch-Makefile,v 1.5 2016/03/05 19:17:01 jung Exp $
> Makefile.origFri Feb 12 20:29:02 2016
> -+++ Makefile Fri Feb 26 21:06:04 2016
> +$OpenBSD$
> +
> +Index: Makefile
> +--- Makefile.orig
> Makefile
> @@ -15,8 +15,7 @@ options:
> @echo "CC = ${CC}"
>
> @@ -9,7 +11,7 @@ $OpenBSD: patch-Makefile,v 1.5 2016/03/0
> -@${CC} -c ${CFLAGS} $<
> +${CC} -c ${CFLAGS} $<
>
> - ${OBJ}: config.h config.mk
> + ${OBJ}: config.h config.mk arg.h util.h
>
> @@ -25,8 +24,7 @@ config.h:
> @cp config.def.h $@
> Index: patches/patch-config_def_h
> ===
> RCS file: patches/patch-config_def_h
> diff -N patches/patch-config_def_h
> --- patches/patch-config_def_h5 Mar 2016 19:17:01 - 1.2
> +++ /dev/null 1 Jan 1970 00:00:00 -
> @@ -1,11 +0,0 @@
> -$OpenBSD: patch-config_def_h,v 1.2 2016/03/05 19:17:01 jung Exp $
> config.def.h.origFri Feb 12 20:29:02 2016
> -+++ config.def.h Fri Feb 26 20:57:47 2016
> -@@ -1,6 +1,6 @@
> - static const char *colorname[NUMCOLS] = {
> - "black", /* after initialization */
> --"#005577", /* during input */
> -+"#404040", /* during input */
> - "#CC", /* failed/cleared the input */
> - };
> - static const Bool failonclear = True;
> Index: patches/patch-config_mk
> ===
> RCS file: /cvs/ports/x11/slock/patches/patch-config_mk,v
> retrieving revision 1.9
> diff -u -p -r1.9 patch-config_mk
> --- patches/patch-config_mk 13 Aug 2016 14:00:00 - 1.9
> +++ patches/patch-config_mk 21 May 2020 10:58:17 -
> @@ -1,44 +1,23 @@
> -$OpenBSD: patch-config_mk,v 1.9 2016/08/13 14:00:00 tb Exp $
> config.mk.orig Fri Feb 12 20:29:02 2016
> -+++ config.mkSat Aug 13 15:38:13 2016
> -@@ -4,28 +4,28 @@ VERSION = 1.3
> - # Customize below to fit your system
> -
> - #