NetBSD Problem Report #48266
From www@NetBSD.org Thu Oct 3 20:51:37 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id E8E6B70F66
for <gnats-bugs@gnats.NetBSD.org>; Thu, 3 Oct 2013 20:51:37 +0000 (UTC)
Message-Id: <20131003205136.6183A710DE@mollari.NetBSD.org>
Date: Thu, 3 Oct 2013 20:51:36 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@NetBSD.org
Subject: x11/xinit 'startx' broken on netbsd-5
X-Send-Pr-Version: www-1.0
>Number: 48266
>Category: pkg
>Synopsis: x11/xinit 'startx' broken on netbsd-5
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: joerg
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 03 20:55:00 +0000 2013
>Closed-Date: Mon Dec 21 00:40:19 +0000 2015
>Last-Modified: Mon Dec 21 00:40:19 +0000 2015
>Originator: John D. Baker
>Release: NetBSD/i386-5.2_STABLE, pkgsrc-2013Q3
>Organization:
>Environment:
NetBSD verthandi.technoskunk.fur 5.2_STABLE NetBSD 5.2_STABLE (VERTHANDI) #8: Thu Sep 19 06:07:07 CDT 2013 sysop@verthandi.technoskunk.fur:/d0/build/netbsd-5/obj/i386/sys/arch/i386/compile/VERTHANDI i386
>Description:
The 'startx' script generated with x11/xinit attempts to generate the
magic cookie using '/usr/bin/openssl rand -hex 16', but the openssl
utility in netbsd-5 doesn't support the "-hex" option, so trying to use
'startx' fails.
>How-To-Repeat:
Install modular Xorg on suitable netbsd-5 platform and attempt to start
graphical session via 'startx'.
>Fix:
Workaround: Patch installed 'startx' as follows:
--- /usr/pkg/bin/startx.orig 2013-09-19 11:19:45.000000000 -0500
+++ /usr/pkg/bin/startx 2013-10-03 15:02:00.000000000 -0500
@@ -125,7 +125,7 @@
;;
esac
authdisplay=${display:-:0}
- mcookie=`/usr/bin/openssl rand -hex 16`
+ mcookie=`/usr/bin/openssl rand 16 | hexdump -e \"%x\"`
if test x"$mcookie" = x; then
echo "Couldn't create cookie"
exit 1
Ideally, fix up logic in /x11/xinit ${WRKSRC}/configure to see if the
proposed "$MCOOKIE" works and fall back to something sensible if it
doesn't. Historical 'startx' (such as in native Xorg for netbsd-5)
grabbed bytes out of /dev/urandom and formatted them with 'hexdump'.
Suggested (tested only on NetBSD/i386-5.2_STABLE w/modular Xorg. It
is sufficient to trigger the fallback of 'dd'-ing from "/dev/urandom":
--- configure.orig 2013-09-08 11:37:39.000000000 -0500
+++ configure 2013-10-03 15:46:45.000000000 -0500
@@ -11231,7 +11231,7 @@
esac
fi
fi
-if test "x$MCOOKIE" != x ; then
+if test "x$MCOOKIE" != x && $MCOOKIE >/dev/null 2>&1 ; then
STARTX_COOKIE_FLAGS='-DHAS_COOKIE_MAKER -DMK_COOKIE="$(MCOOKIE)"'
{ $as_echo "$as_me:${as_lineno-$LINENO}: startx will depend on \"$MCOOKIE\" to generate xauth cookies" >&5
$as_echo "$as_me: startx will depend on \"$MCOOKIE\" to generate xauth cookies" >&6;}
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->joerg
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Fri, 04 Oct 2013 00:47:39 +0000
Responsible-Changed-Why:
Over to maintainer.
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/48266: x11/xinit 'startx' broken on netbsd-5
Date: Fri, 04 Oct 2013 09:53:19 +0900
For me, openssl from pkgsrc is installed, and configure pick up it,
then startx always succeed but silently depend on openssl package.
It is not a good situation.
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/48266 (x11/xinit 'startx' broken on netbsd-5)
Date: Fri, 18 Dec 2015 16:59:58 -0600 (CST)
As netbsd-5 is EOL, this PR is no-longer relevant and may be closed.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
State-Changed-From-To: open->closed
State-Changed-By: asau@NetBSD.org
State-Changed-When: Mon, 21 Dec 2015 00:40:19 +0000
State-Changed-Why:
Closed at the submitter's suggestion.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.