Bug 253346 - New port: sysutils/wmscript: System monitoring dockapp for Window Maker
Summary: New port: sysutils/wmscript: System monitoring dockapp for Window Maker
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Rainer Hurling
URL: http://freshmeat.sourceforge.net/proj...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-08 13:32 UTC by Igor Pokrovsky
Modified: 2021-02-10 17:24 UTC (History)
1 user (show)

See Also:


Attachments
Diff file (8.05 KB, patch)
2021-02-08 13:32 UTC, Igor Pokrovsky
no flags Details | Diff
Diff file (9.82 KB, patch)
2021-02-09 17:46 UTC, Igor Pokrovsky
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Pokrovsky 2021-02-08 13:32:19 UTC
Created attachment 222263 [details]
Diff file

WMScript is a system monitoring dock app for Window Maker.
It allows you to specify a command and have the numeric result of that command
displayed in the dock app's window. You may specify up to 5 things to monitor
and the interval is configurable.
Comment 1 Rainer Hurling freebsd_committer freebsd_triage 2021-02-09 14:28:40 UTC
Hi Igor,

Thanks for the patch of this interesting port!

I tried to build it on Poudriere and got the following errors:


===>  Building for wmscript-1.0
gmake[1]: Entering directory '/wrkdirs/usr/ports/sysutils/wmscript/work/wmscript.app/wmscript'
cc -I/usr/local/include -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -O2 -c -Wall wmscript.c -o wmscript.o
wmscript.c:533:22: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
    fprintf (stderr, buff);
                     ^~~~
wmscript.c:533:22: note: treat the string as an argument to avoid this
    fprintf (stderr, buff);
                     ^
                     "%s", 
wmscript.c:543:22: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
    fprintf (stderr, buff);
                     ^~~~
wmscript.c:543:22: note: treat the string as an argument to avoid this
    fprintf (stderr, buff);
                     ^
                     "%s", 
2 warnings generated.
cc -I/usr/local/include -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -O2 -c -Wall ../wmgeneral/wmgeneral.c -o ../wmgeneral/wmgeneral.o
cc -I/usr/local/include -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -O2 -c -Wall ../wmgeneral/misc.c -o ../wmgeneral/misc.o
In file included from ../wmgeneral/misc.c:24:
../wmgeneral/list.h:43:27: warning: inline function 'list_cons' is not defined [-Wundefined-inline]
extern INLINE LinkedList* list_cons(void* head, LinkedList* tail);
                          ^
../wmgeneral/misc.c:122:13: note: used here
            list = list_cons(token, list);
                   ^
In file included from ../wmgeneral/misc.c:24:
../wmgeneral/list.h:45:19: warning: inline function 'list_length' is not defined [-Wundefined-inline]
extern INLINE int list_length(LinkedList* list);
                  ^
../wmgeneral/misc.c:126:13: note: used here
    count = list_length(list);
            ^
In file included from ../wmgeneral/misc.c:24:
../wmgeneral/list.h:49:20: warning: inline function 'list_remove_head' is not defined [-Wundefined-inline]
extern INLINE void list_remove_head(LinkedList** list);
                   ^
../wmgeneral/misc.c:131:2: note: used here
        list_remove_head(&list);
        ^
3 warnings generated.
cc -I/usr/local/include -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -O2 -c -Wall ../wmgeneral/list.c -o ../wmgeneral/list.o
cc -o wmscript wmscript.o ../wmgeneral/wmgeneral.o ../wmgeneral/misc.o ../wmgeneral/list.o -lXext -L/usr/local/lib -lXpm -lXext -lX11
ld: error: duplicate symbol: display
>>> defined at wmscript.c
>>>            wmscript.o:(display)
>>> defined at wmgeneral.c
>>>            ../wmgeneral/wmgeneral.o:(.bss+0x8)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [Makefile:15: wmscript] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/sysutils/wmscript/work/wmscript.app/wmscript'
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/wmscript
=>> Cleaning up wrkdir
===>  Cleaning for wmscript-1.0
build of sysutils/wmscript | wmscript-1.0 ended at Tue Feb  9 15:21:03 CET 2021
build time: 00:00:03
!!! build failure encountered !!!



Could you please have a look at it? Thanks in advance :)
Comment 2 Igor Pokrovsky 2021-02-09 17:46:19 UTC
Created attachment 222300 [details]
Diff file

Hi Rainer,

It is strange, I'm not getting such error on my -STABLE system. Hopefully I have fixed this problem. Please try the next patch.
Comment 3 Rainer Hurling freebsd_committer freebsd_triage 2021-02-09 18:17:53 UTC
Hi Igor,

Thanks for the quick fix. I can confirm, that it builds now within and outside of Poudriere :)


There are a few warnings, but they all seem harmless:

In file included from ../wmgeneral/misc.c:24:
../wmgeneral/list.h:43:27: warning: inline function 'list_cons' is not defined [-Wundefined-inline]
extern INLINE LinkedList* list_cons(void* head, LinkedList* tail);
                          ^
../wmgeneral/misc.c:122:13: note: used here
            list = list_cons(token, list);
                   ^
In file included from ../wmgeneral/misc.c:24:
../wmgeneral/list.h:45:19: warning: inline function 'list_length' is not defined [-Wundefined-inline]
extern INLINE int list_length(LinkedList* list);
                  ^
../wmgeneral/misc.c:126:13: note: used here
    count = list_length(list);
            ^
In file included from ../wmgeneral/misc.c:24:
../wmgeneral/list.h:49:20: warning: inline function 'list_remove_head' is not defined [-Wundefined-inline]
extern INLINE void list_remove_head(LinkedList** list);
                   ^
../wmgeneral/misc.c:131:2: note: used here
        list_remove_head(&list);
        ^
wmscript.c:533:22: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
    fprintf (stderr, buff);
                     ^~~~
wmscript.c:533:22: note: treat the string as an argument to avoid this
    fprintf (stderr, buff);
                     ^
                     "%s", 
wmscript.c:543:22: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
    fprintf (stderr, buff);
                     ^~~~
wmscript.c:543:22: note: treat the string as an argument to avoid this
    fprintf (stderr, buff);
                     ^
                     "%s", 
3 warnings generated.
2 warnings generated.



My next step is to prepare a review on Phabricator. Will report back ...
Comment 4 Rainer Hurling freebsd_committer freebsd_triage 2021-02-09 18:39:57 UTC
Just opend review D28558 on Phabricator, waiting on mentors approval now ;)
Comment 5 Igor Pokrovsky 2021-02-10 03:49:56 UTC
Hi Rainer,

I agree, they seem harmless. That's why I have not fixed them. 
Moreover, I afraid I will rewrite large part of the program once I will dig into it :) And I guess there is no reason to do so, since it just works.

Thank you!
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-02-10 17:05:10 UTC
A commit references this bug:

Author: rhurlin
Date: Wed Feb 10 17:04:20 UTC 2021
New revision: 564878
URL: https://svnweb.freebsd.org/changeset/ports/564878

Log:
  New port: sysutils/wmscript: System monitoring dockapp for Window Maker

  WMScript allows to specify a command and have the numeric result
  of that command displayed in the dock app's window. Up to 5 things
  to monitor, the interval is configurable.

  See http://freshmeat.sourceforge.net/projects/wmscript for details.

  PR:		253346
  Submitted by:	Igor Pokrovsky <ip@unixway.org> (maintainer)
  Approved by:	tcberner (mentor)
  Differential Revision:	https://reviews.freebsd.org/D28558

Changes:
  head/sysutils/Makefile
  head/sysutils/wmscript/
  head/sysutils/wmscript/Makefile
  head/sysutils/wmscript/distinfo
  head/sysutils/wmscript/files/
  head/sysutils/wmscript/files/patch-wmgeneral_list.h
  head/sysutils/wmscript/files/patch-wmgeneral_wmgeneral.c
  head/sysutils/wmscript/files/patch-wmgeneral_wmgeneral.h
  head/sysutils/wmscript/files/patch-wmscript_Makefile
  head/sysutils/wmscript/files/patch-wmscript_wmscript.c
  head/sysutils/wmscript/pkg-descr
  head/sysutils/wmscript/pkg-plist
Comment 7 Rainer Hurling freebsd_committer freebsd_triage 2021-02-10 17:07:36 UTC
Committed, thanks :)
Comment 8 Igor Pokrovsky 2021-02-10 17:24:24 UTC
Thanks, Rainer!