pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/42494: wm/piewm uses unsupported -s option when calling m4, then dies when m4 errors out

>Number:         42494
>Category:       pkg
>Synopsis:       wm/piewm uses unsupported -s option when calling m4, then dies 
>when m4 errors out
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 21 22:05:01 +0000 2009
>Originator:     Philippe Crama
>Release:        5.0.1
Private person
NetBSD new-host 5.0.1 NetBSD 5.0.1 (GENERIC) #0: Thu Jul 30 01:39:11 UTC 2009

wm/piewm uses m4 to process the user initialization file.  The program
name is hardcoded (m4) and looked up in the current $PATH.  wm/piewm
passes the `-s' option to m4, however, in the stock m4 under NetBSD,
this option is unsupported and m4 reports it on stderr, doing nothing
else.  This prevents wm/piewm from processing the initialization file

The `-s' option to m4 isn't absolutely necessary, I edited the piewm
binary to replace the `-s' by `-g' (thus enabling some GNU m4 extensions)
and was able to successfully run piewm.

Build (or install the binary package) wm/piewm and try to setup
your own configuration file: notice that the configuration changes
don't affect piewm


Open the produced piewm binary in a text editor, search for -s close to
m4 and replace -s by -g

Simple fix:

Add patch-ae to the patches directory:
$NetBSD: patch-ae,v 1.1 2007/12/10 11:35:09 obache Exp $

--- parse.c.orig        2009-12-17 18:17:53.000000000 +0100
+++ parse.c
@@ -1376,7 +1376,7 @@
                dup2(fids[1], 1);       /* stdout = pipe to parent */
                /* get_defs("m4", dpy, display_name) */
                tmp_file = m4_defs(dpy, display_name);
-               execlp("m4", "m4", "-s", tmp_file, "-", NULL); 
+               execlp("m4", "m4", tmp_file, "-", NULL); 
                /* If we get here we are screwed... */
                perror("Can't execlp() m4");

Update distinfo (see diff below):
Index: distinfo
RCS file: /cvsroot/pkgsrc/wm/piewm/distinfo,v
retrieving revision 1.3
diff -u -r1.3 distinfo
--- distinfo    10 Dec 2007 11:35:08 -0000      1.3
+++ distinfo    21 Dec 2009 21:50:02 -0000
@@ -6,3 +6,4 @@
 SHA1 (patch-ab) = 38d8407cb4d40425db0cf998a08e75d4218cad41
 SHA1 (patch-ac) = 62b7491e7658db8ac0c00bf691ba4e0e270a7b70
 SHA1 (patch-ad) = 1a6e9c24771d5c3d339a2ecd7e92472be09bb6a4
+SHA1 (patch-ae) = 5bca5c2069a85b981e964a2cac89afea1f2a6972

then build as usual

More complicated fix:

(this is more than I can do) make an option to use devel/m4,
and include the -s option when devel/m4 is used (with the
appropriate prefix, ie gm4 instead of plain m4)

Home | Main Index | Thread Index | Old Index