There has been a few bugfixes in upstream shortly after the scrotwm
0.10.0 release. I have created a diff below to include these in the
OpenBSD port. I am really hoping that these fixes can get in before the
final lock, as they will prevent users from encountering these issues
right "out of the box" upon pkg_add'ing scrotwm on OpenBSD 5.1.
The fixes are:
1. Fixed memory and fd leaks when there are invalid options in the
scrotwm config file.
2. Fixed the key binding on the manpage for the search_win action (it
should be M-f instead of M-s. M-s is the key binding for another
action, screenshot_all).
3. Added the ws_prior key binding that was missing from the keyboard
mapping files (config files used for various regional keyboards).
4. The RUN_DEPENDS for dmenu has been changed to 4.4.1 (the current
version in the ports tree); thib@ and I encountered issues using
scrotwm with dmenu 4.2, and earlier versions are probably affected
too.
I could not get in touch with Gonzalo (maintainer) on time since this is
the weekend, but I have CC'ed him. However, he has seen an earlier
version of this diff and he is OK with fixes #2 and #4.
Thank you,
Lawrence
Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/scrotwm/Makefile,v
retrieving revision 1.34
diff -u -p -r1.34 Makefile
--- Makefile 14 Jan 2012 21:48:13 -0000 1.34
+++ Makefile 28 Jan 2012 04:03:32 -0000
@@ -5,6 +5,7 @@ COMMENT= small tiling window manager
SHARED_LIBS= swmhack 0.0
DISTNAME= scrotwm-0.10.0
+REVISION= 0
EXTRACT_SUFX= .tgz
CATEGORIES= x11
@@ -23,7 +24,7 @@ MASTER_SITES= http://opensource.conforma
NO_REGRESS= Yes
-RUN_DEPENDS= x11/dmenu>=3.9
+RUN_DEPENDS= x11/dmenu>=4.4.1
MAKE_FLAGS= BINDIR="${TRUEPREFIX}/bin" \
MANDIR="${TRUEPREFIX}/man/man" \
Index: patches/patch-scrotwm_1
===================================================================
RCS file: patches/patch-scrotwm_1
diff -N patches/patch-scrotwm_1
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-scrotwm_1 28 Jan 2012 04:03:32 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Manpage fix from upstream:
+https://opensource.conformal.com/viewgit/?a=commitdiff&p=scrotwm&h=b4f18a38d0b1cf8c0ee85e0366ab4caa4cc00560
+
+--- scrotwm.1.orig Wed Jan 11 13:42:57 2012
++++ scrotwm.1 Fri Jan 27 22:40:29 2012
+@@ -450,7 +450,7 @@ move_down
+ name_workspace
+ .It Cm M-/
+ search_workspace
+-.It Cm M-s
++.It Cm M-f
+ search_win
+ .El
+ .Pp
Index: patches/patch-scrotwm_c
===================================================================
RCS file: /cvs/ports/x11/scrotwm/patches/patch-scrotwm_c,v
retrieving revision 1.18
diff -u -p -r1.18 patch-scrotwm_c
--- patches/patch-scrotwm_c 14 Jan 2012 21:48:13 -0000 1.18
+++ patches/patch-scrotwm_c 28 Jan 2012 04:03:32 -0000
@@ -1,6 +1,10 @@
$OpenBSD: patch-scrotwm_c,v 1.18 2012/01/14 21:48:13 sthen Exp $
---- scrotwm.c.orig Sat Jan 14 14:15:42 2012
-+++ scrotwm.c Sat Jan 14 14:16:35 2012
+
+Includes memory and fd leak fixes from upstream:
+https://opensource.conformal.com/viewgit/?a=commitdiff&p=scrotwm&h=1bc1f62c7a0ed3edf41faf0cec49cfad2db794b0
+
+--- scrotwm.c.orig Fri Jan 27 22:39:54 2012
++++ scrotwm.c Fri Jan 27 22:48:10 2012
@@ -169,7 +169,7 @@ u_int32_t swm_debug = 0
#define SWM_CONF_KEYMAPPING (1)
@@ -10,3 +14,49 @@ $OpenBSD: patch-scrotwm_c,v 1.18 2012/01
#endif
char **start_argv;
+@@ -5399,7 +5399,7 @@ conf_load(char *filename, int keymapping)
+ if (wordlen == 0) {
+ warnx("%s: line %zd: no option found",
+ filename, lineno);
+- return (1);
++ goto out;
+ }
+ optind = -1;
+ for (i = 0; i< LENGTH(configopt); i++) {
+@@ -5413,12 +5413,12 @@ conf_load(char *filename, int keymapping)
+ if (optind == -1) {
+ warnx("%s: line %zd: unknown option %.*s",
+ filename, lineno, wordlen, cp);
+- return (1);
++ goto out;
+ }
+ if (keymapping&& strcmp(opt->optname, "bind")) {
+ warnx("%s: line %zd: invalid option %.*s",
+ filename, lineno, wordlen, cp);
+- return (1);
++ goto out;
+ }
+ cp += wordlen;
+ cp += strspn(cp, " \t\n"); /* eat whitespace */
+@@ -5431,7 +5431,7 @@ conf_load(char *filename, int keymapping)
+ if (wordlen == 0) {
+ warnx("%s: line %zd: syntax error",
+ filename, lineno);
+- return (1);
++ goto out;
+ }
+ asprintf(&optsub, "%.*s", wordlen, cp);
+ }
+@@ -5458,6 +5458,12 @@ conf_load(char *filename, int keymapping)
+ DNPRINTF(SWM_D_CONF, "conf_load end\n");
+
+ return (0);
++
++out:
++ free(line);
++ fclose(config);
++
++ return (1);
+ }
+
+ void
Index: patches/patch-scrotwm_cz_conf
===================================================================
RCS file: patches/patch-scrotwm_cz_conf
diff -N patches/patch-scrotwm_cz_conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-scrotwm_cz_conf 28 Jan 2012 04:03:32 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Add missing ws_prior key binding from upstream:
+https://opensource.conformal.com/viewgit/?a=commitdiff&p=scrotwm&h=f4da59ebb218d4ce2f7584c8156978461330c865
+
+--- scrotwm_cz.conf.orig Wed Jan 11 13:42:57 2012
++++ scrotwm_cz.conf Fri Jan 27 22:42:12 2012
+@@ -32,6 +32,7 @@ bind[ws_next] = MOD+Right
+ bind[ws_prev] = MOD+Left
+ bind[ws_next_all] = MOD+Up
+ bind[ws_prev_all] = MOD+Down
++bind[ws_prior] = MOD+a
+ bind[screen_next] = MOD+Shift+Right
+ bind[screen_prev] = MOD+Shift+Left
+ bind[mvws_1] = MOD+Shift+plus
Index: patches/patch-scrotwm_es_conf
===================================================================
RCS file: patches/patch-scrotwm_es_conf
diff -N patches/patch-scrotwm_es_conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-scrotwm_es_conf 28 Jan 2012 04:03:32 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Add missing ws_prior key binding from upstream:
+https://opensource.conformal.com/viewgit/?a=commitdiff&p=scrotwm&h=f4da59ebb218d4ce2f7584c8156978461330c865
+
+--- scrotwm_es.conf.orig Wed Jan 11 13:42:57 2012
++++ scrotwm_es.conf Fri Jan 27 22:43:11 2012
+@@ -32,6 +32,7 @@ bind[ws_next] = MOD+Right
+ bind[ws_prev] = MOD+Left
+ bind[ws_next_all] = MOD+Up
+ bind[ws_prev_all] = MOD+Down
++bind[ws_prior] = MOD+a
+ bind[screen_next] = MOD+Shift+Right
+ bind[screen_prev] = MOD+Shift+Left
+ bind[mvws_1] = MOD+Shift+1
Index: patches/patch-scrotwm_fr_ch_conf
===================================================================
RCS file: patches/patch-scrotwm_fr_ch_conf
diff -N patches/patch-scrotwm_fr_ch_conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-scrotwm_fr_ch_conf 28 Jan 2012 04:03:32 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Add missing ws_prior key binding from upstream:
+https://opensource.conformal.com/viewgit/?a=commitdiff&p=scrotwm&h=f4da59ebb218d4ce2f7584c8156978461330c865
+
+--- scrotwm_fr_ch.conf.orig Wed Jan 11 13:42:57 2012
++++ scrotwm_fr_ch.conf Fri Jan 27 22:43:26 2012
+@@ -32,6 +32,7 @@ bind[ws_next] = MOD+Right
+ bind[ws_prev] = MOD+Left
+ bind[ws_next_all] = MOD+Up
+ bind[ws_prev_all] = MOD+Down
++bind[ws_prior] = MOD+a
+ bind[screen_next] = MOD+Shift+Right
+ bind[screen_prev] = MOD+Shift+Left
+ bind[mvws_1] = MOD+Shift+1
Index: patches/patch-scrotwm_fr_conf
===================================================================
RCS file: patches/patch-scrotwm_fr_conf
diff -N patches/patch-scrotwm_fr_conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-scrotwm_fr_conf 28 Jan 2012 04:03:32 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Add missing ws_prior key binding from upstream:
+https://opensource.conformal.com/viewgit/?a=commitdiff&p=scrotwm&h=f4da59ebb218d4ce2f7584c8156978461330c865
+
+--- scrotwm_fr.conf.orig Wed Jan 11 13:42:57 2012
++++ scrotwm_fr.conf Fri Jan 27 22:43:18 2012
+@@ -32,6 +32,7 @@ bind[ws_next] = MOD+Right
+ bind[ws_prev] = MOD+Left
+ bind[ws_next_all] = MOD+Up
+ bind[ws_prev_all] = MOD+Down
++bind[ws_prior] = MOD+a
+ bind[screen_next] = MOD+Shift+Right
+ bind[screen_prev] = MOD+Shift+Left
+ bind[mvws_1] = MOD+Shift+ampersand
Index: patches/patch-scrotwm_se_conf
===================================================================
RCS file: patches/patch-scrotwm_se_conf
diff -N patches/patch-scrotwm_se_conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-scrotwm_se_conf 28 Jan 2012 04:03:32 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Add missing ws_prior key binding from upstream:
+https://opensource.conformal.com/viewgit/?a=commitdiff&p=scrotwm&h=f4da59ebb218d4ce2f7584c8156978461330c865
+
+--- scrotwm_se.conf.orig Wed Jan 11 13:42:57 2012
++++ scrotwm_se.conf Fri Jan 27 22:43:39 2012
+@@ -32,6 +32,7 @@ bind[ws_next] = MOD+Right
+ bind[ws_prev] = MOD+Left
+ bind[ws_next_all] = MOD+Up
+ bind[ws_prev_all] = MOD+Down
++bind[ws_prior] = MOD+a
+ bind[screen_next] = MOD+Shift+Right
+ bind[screen_prev] = MOD+Shift+Left
+ bind[mvws_1] = MOD+Shift+1
Index: patches/patch-scrotwm_us_conf
===================================================================
RCS file: patches/patch-scrotwm_us_conf
diff -N patches/patch-scrotwm_us_conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-scrotwm_us_conf 28 Jan 2012 04:03:32 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Add missing ws_prior key binding from upstream:
+https://opensource.conformal.com/viewgit/?a=commitdiff&p=scrotwm&h=f4da59ebb218d4ce2f7584c8156978461330c865
+
+--- scrotwm_us.conf.orig Wed Jan 11 13:42:57 2012
++++ scrotwm_us.conf Fri Jan 27 22:43:51 2012
+@@ -32,6 +32,7 @@ bind[ws_next] = MOD+Right
+ bind[ws_prev] = MOD+Left
+ bind[ws_next_all] = MOD+Up
+ bind[ws_prev_all] = MOD+Down
++bind[ws_prior] = MOD+a
+ bind[screen_next] = MOD+Shift+Right
+ bind[screen_prev] = MOD+Shift+Left
+ bind[mvws_1] = MOD+Shift+1