From owner-freebsd-ports Sun Mar 18 8: 7:19 2001 Delivered-To: freebsd-ports@freebsd.org Received: from mail.mayn.de (mail.mayn.de [194.145.150.13]) by hub.freebsd.org (Postfix) with ESMTP id D6BD937B718 for ; Sun, 18 Mar 2001 08:07:11 -0800 (PST) (envelope-from treif@mayn.de) Received: from mayn.de (comppp-026.wuerzburg.dialin.mayn.de [194.145.151.90]) by mail.mayn.de (Postfix) with ESMTP id 4C1A91433 for ; Sun, 18 Mar 2001 17:07:08 +0100 (CET) Message-ID: <3AB4C71B.49566EE6@mayn.de> Date: Sun, 18 Mar 2001 15:32:59 +0100 From: Tobias Reifenberger X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: ports@freebsd.org Subject: Problems upgrading wmpinboard Content-Type: multipart/mixed; boundary="------------C6747D82A2DA23A5BCC436E1" Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org This is a multi-part message in MIME format. --------------C6747D82A2DA23A5BCC436E1 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi I updated the port of wmpinboard to version 1.0. But the program dies every time 'getenv()' is used. Can someone verify this or are just all my Systems broken? (Tested with 4.2-STABLE, 4.3-BETA and both versions of X [3.3.6, 4.0.2]) FreeBSD 4.2-STABLE #0: Sat Feb 17 16:51:36 CET 2001 Core was generated by `wmpinboard'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/local/lib/libgnugetopt.so.1...done. Reading symbols from /usr/X11R6/lib/libX11.so.6...done. Reading symbols from /usr/X11R6/lib/libXext.so.6...done. Reading symbols from /usr/X11R6/lib/libXpm.so.4...done. Reading symbols from /usr/lib/libc.so.4...done. Reading symbols from /usr/X11R6/lib/libXThrStub.so.6...done. Reading symbols from /usr/libexec/ld-elf.so.1...done. #0 0x2820fe51 in getenv () from /usr/lib/libc.so.4 (gdb) bt #0 0x2820fe51 in getenv () from /usr/lib/libc.so.4 #1 0x804df4a in notes_io (save=0) at wmpinboard.c:181 #2 0x80507a8 in parse_argv (argc=1, argv=0xbfbffa68) at wmpinboard.c:1004 #3 0x8055ea2 in main (argc=1, argv=0xbfbffa68) at wmpinboard.c:2121 [wmpinboard.c] 180: bzero(s, sizeof(s)); 181: strncpy(s, getenv("HOME"), sizeof(s)); And if I change line 181 to 'strncpy(s, "/root", sizeof(s));' I get this... (gdb) bt #0 0x2820fe51 in getenv () from /usr/lib/libc.so.4 #1 0x280a69f6 in XOpenDisplay () from /usr/X11R6/lib/libX11.so.6 #2 0x804f332 in init () at wmpinboard.c:531 #3 0x8055e9a in main (argc=1, argv=0xbfbffa68) at wmpinboard.c:2122 Any Ideas? BTW: A simple C program only linked with libc doesn't core. bye -- Tobias Reifenberger -- treif@mayn.de -- DG1NGT GEE e* dpu s:- a-- C+++ UB+++ L- W+ N+ w--- Y+ tv+ b++ D++ h++ r--- --------------C6747D82A2DA23A5BCC436E1 Content-Type: text/plain; charset=us-ascii; name="port_wmpinboard.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="port_wmpinboard.diff" diff -u -rN wmpinboard.old/Makefile wmpinboard/Makefile --- wmpinboard.old/Makefile Thu Mar 15 00:19:38 2001 +++ wmpinboard/Makefile Thu Mar 15 02:32:32 2001 @@ -6,22 +6,24 @@ # PORTNAME= wmpinboard -PORTVERSION= 0.10 +PORTVERSION= 1.0 CATEGORIES= deskutils afterstep windowmaker + MASTER_SITES= http://www.tu-ilmenau.de/~gomar/stuff/wmpinboard/ \ http://soupnazi.org/FreeBSD/ports/distfiles/ MAINTAINER= jim@FreeBSD.org -WRKSRC= ${WRKDIR}/wmpinboard.app +LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt USE_BZIP2= yes -USE_IMAKE= yes +GNU_CONFIGURE= yes +USE_X_PREFIX= yes USE_XPM= yes MAN1= wmpinboard.1 -post-extract: - (cd ${WRKSRC}; ${CP} -p wmpinboard.1 wmpinboard.man) +CONFIGURE_ENV= "CFLAGS=${CFLAGS} -I${LOCALBASE}/include" \ + "LDFLAGS=-L${LOCALBASE}/lib -lgnugetopt" .include diff -u -rN wmpinboard.old/distinfo wmpinboard/distinfo --- wmpinboard.old/distinfo Thu Mar 15 00:19:38 2001 +++ wmpinboard/distinfo Thu Mar 15 00:20:52 2001 @@ -1 +1 @@ -MD5 (wmpinboard-0.10.tar.bz2) = 3517fe843867ae8c3c925e1328b22f4a +MD5 (wmpinboard-1.0.tar.bz2) = 5a270397f7765b3416abae43d020a0c9 diff -u -rN wmpinboard.old/files/patch-ac wmpinboard/files/patch-ac --- wmpinboard.old/files/patch-ac Thu Mar 15 00:19:38 2001 +++ wmpinboard/files/patch-ac Thu Jan 1 01:00:00 1970 @@ -1,16 +0,0 @@ ---- Imakefile.orig Sat Oct 23 19:49:37 1999 -+++ Imakefile Wed Nov 1 09:24:28 2000 -@@ -36,9 +36,9 @@ - all:: - @test -e ./ReleaseNotes && cat ReleaseNotes || true - --install:: -- $(INSTALL) -m 0644 wmpinboard.1 $(DESTDIR)/man/man1 -+#install:: -+# $(INSTALL) -m 0644 wmpinboard.1 $(DESTDIR)/man/man1 - --DESTDIR = /usr/local --BINDIR = /bin -+#DESTDIR = /usr/local -+#BINDIR = /bin - diff -u -rN wmpinboard.old/files/patch-configure wmpinboard/files/patch-configure --- wmpinboard.old/files/patch-configure Thu Jan 1 01:00:00 1970 +++ wmpinboard/files/patch-configure Thu Mar 15 01:48:37 2001 @@ -0,0 +1,11 @@ +--- configure.orig Thu Mar 15 01:47:49 2001 ++++ configure Thu Mar 15 01:48:14 2001 +@@ -1038,7 +1038,7 @@ + CFLAGS="$CFLAGS -D_BSD_SOURCE -D_POSIX_SOURCE=199506L" + + if test x$GCC = xyes; then +- CFLAGS="$CFLAGS -Wall -ansi -pedantic" ++ CFLAGS="$CFLAGS -Wall -ansi" + fi + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 diff -u -rN wmpinboard.old/files/patch-src-misc.c wmpinboard/files/patch-src-misc.c --- wmpinboard.old/files/patch-src-misc.c Thu Jan 1 01:00:00 1970 +++ wmpinboard/files/patch-src-misc.c Thu Mar 15 01:32:28 2001 @@ -0,0 +1,10 @@ +--- src/misc.c.orig Thu Mar 15 00:36:03 2001 ++++ src/misc.c Thu Mar 15 00:39:27 2001 +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + #include + + #include "wmpinboard.h" diff -u -rN wmpinboard.old/files/patch-src-wmpinboard.c wmpinboard/files/patch-src-wmpinboard.c --- wmpinboard.old/files/patch-src-wmpinboard.c Thu Jan 1 01:00:00 1970 +++ wmpinboard/files/patch-src-wmpinboard.c Thu Mar 15 01:41:37 2001 @@ -0,0 +1,21 @@ +--- src/wmpinboard.c.orig Thu Apr 13 13:01:17 2000 ++++ src/wmpinboard.c Thu Mar 15 01:36:18 2001 +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -176,8 +177,9 @@ + + s_block(); + +- s[sizeof(s)-1] = '\0'; ++ bzero(s, sizeof(s)); + strncpy(s, getenv("HOME"), sizeof(s)); ++ + if (sizeof(s)-strlen(s)-1 < strlen(rc_file_name)+strlen(ext)) + die("Buffer too small in notes_io()."); + strcat(s, rc_file_name); diff -u -rN wmpinboard.old/files/patch-src-xmisc.c wmpinboard/files/patch-src-xmisc.c --- wmpinboard.old/files/patch-src-xmisc.c Thu Jan 1 01:00:00 1970 +++ wmpinboard/files/patch-src-xmisc.c Thu Mar 15 01:33:18 2001 @@ -0,0 +1,10 @@ +--- src/xmisc.c.orig Thu Mar 15 00:41:43 2001 ++++ src/xmisc.c Thu Mar 15 00:42:34 2001 +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + #include + + #include --------------C6747D82A2DA23A5BCC436E1-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message