Subject: pkg/17763: misc/openoffice Makefile runs xdpyinfo which may hang
To: None <gnats-bugs@gnats.netbsd.org>
From: None <he@netbsd.org>
List: netbsd-bugs
Date: 07/30/2002 14:24:58
>Number:         17763
>Category:       pkg
>Synopsis:       misc/openoffice Makefile runs xdpyinfo under various targets
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 30 05:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Havard Eidnes
>Release:        NetBSD 1.6_BETA4
>Organization:
	
>Environment:
System: NetBSD oliven.uninett.no 1.6_BETA4 NetBSD 1.6_BETA4 (GENERIC) #3: Tue Jul  2 15:38:27 CEST 2002     anders@oliven.uninett.no:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
	As part of setting up the variables in the Makefile, make runs
	xdpyinfo, apparently to check if using X11 is OK:

.if ${DISPLAY}!=""
DISPLAY_OK!=${X11BASE}/bin/xdpyinfo >/dev/null 2>&1 && echo YES || echo NO
.endif

	However, when this is run on an su'ed ssh'ed account, this
	will cause the process to hang in select().  The reason is
	that even though DISPLAY is set, and X11 forwarding is done,
	the root user does not have the correct cookie.

	Why this causes xdpyinfo to hang instead of fail, I do not
	know.  It does cause ssh on the ssh client host to spit out

channel 5: non-open: istate 2 != open
channel 5: non-open: ostate 64 != open

>How-To-Repeat:
	Try to do e.g. "make clean" when ssh'ed and su'ed in
	misc/openoffice/, as stated above.

>Fix:
	It appears that misc/openoffice really does depend on a
	working X11 server for its build.  However, it is also
	apparent that the display checking code does not work as
	intended in all situations.

	My inclination as a short-term fix would be to drop
	misc/openoffice from the parent Makefile, so it does not get
	included in e.g. a full "make clean" of pkgsrc.
>Release-Note:
>Audit-Trail:
>Unformatted: