NetBSD Problem Report #55086

From www@netbsd.org  Thu Mar 19 16:05:33 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 946B61A9213
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 19 Mar 2020 16:05:33 +0000 (UTC)
Message-Id: <20200319160532.C513A1A921A@mollari.NetBSD.org>
Date: Thu, 19 Mar 2020 16:05:32 +0000 (UTC)
From: joern.clausen@uni-bielefeld.de
Reply-To: joern.clausen@uni-bielefeld.de
To: gnats-bugs@NetBSD.org
Subject: compiling net/tigervnc on Solaris
X-Send-Pr-Version: www-1.0

>Number:         55086
>Category:       pkg
>Synopsis:       compiling net/tigervnc on Solaris
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    solaris-pkg-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 19 16:10:00 +0000 2020
>Closed-Date:    Mon Aug 09 08:48:49 +0000 2021
>Last-Modified:  Mon Aug 09 08:48:49 +0000 2021
>Originator:     Joern Clausen
>Release:        
>Organization:
Bielefeld University
>Environment:
>Description:
Building net/tigervnc on Solaris fails, because the dependency mcookie does not build. After removing this dependency, the package builds and at least vncserver is usable. I can't say if generated Xauth cookies are less safe now, though. Maybe mcookie can be included conditionally on all OSes except SunOS.

OTOH starting vncserver fails if xkeyboard-config is missing, so this should be added as a dependency to tigervnc.
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Fri, 20 Mar 2020 19:37:53 +0000
Responsible-Changed-Why:
Solaris issue.


From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/55086 CVS commit: pkgsrc/devel/libuuid
Date: Sat, 10 Jul 2021 23:11:22 +0000

 Module Name:	pkgsrc
 Committed By:	dholland
 Date:		Sat Jul 10 23:11:22 UTC 2021

 Modified Files:
 	pkgsrc/devel/libuuid: distinfo
 Added Files:
 	pkgsrc/devel/libuuid/patches: patch-lib_pager.c

 Log Message:
 devel/libuuid: fix illegal code affecting x11/mcookie.

 Might affect PR 55086.


 To generate a diff of this commit:
 cvs rdiff -u -r1.21 -r1.22 pkgsrc/devel/libuuid/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/devel/libuuid/patches/patch-lib_pager.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/55086: compiling net/tigervnc on Solaris
Date: Sat, 10 Jul 2021 23:19:11 +0000

 On Thu, Mar 19, 2020 at 04:10:00PM +0000, joern.clausen@uni-bielefeld.de wrote:
  > Building net/tigervnc on Solaris fails, because the dependency
  > mcookie does not build.

 I just fixed a problem with mcookie that quite likely would have
 failed the Solaris build, so you might be able to build it now.

 (this is probably not the solution you were looking for, but mcookie
 is relatively simple and if it still doesn't work probably easy to fix)

  > OTOH starting vncserver fails if xkeyboard-config is missing, so
  > this should be added as a dependency to tigervnc.

 Added.

 -- 
 David A. Holland
 dholland@netbsd.org

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/55086 CVS commit: pkgsrc/net/tigervnc
Date: Sat, 10 Jul 2021 23:19:37 +0000

 Module Name:	pkgsrc
 Committed By:	dholland
 Date:		Sat Jul 10 23:19:36 UTC 2021

 Modified Files:
 	pkgsrc/net/tigervnc: Makefile

 Log Message:
 net/tigervnc: depends on xkeyboard-config (PR 55086 from Joern Clausen)

 PKGREVISION -> 3


 To generate a diff of this commit:
 cvs rdiff -u -r1.40 -r1.41 pkgsrc/net/tigervnc/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: =?UTF-8?Q?Clausen=2c_J=c3=b6rn?= <joern.clausen@uni-bielefeld.de>
To: <gnats-bugs@netbsd.org>, <solaris-pkg-people@netbsd.org>,
	<gnats-admin@netbsd.org>, <pkgsrc-bugs@netbsd.org>,
	<dholland-pbugs@netbsd.org>
Cc: 
Subject: Re: pkg/55086: compiling net/tigervnc on Solaris
Date: Mon, 12 Jul 2021 08:08:33 +0200

 I just noticed that I never actually documented the original problem 
 with mcookie...


 Compiling devel/libuuid and x11/mcookie on Solaris now fails with

 $ bmake MAKE_JOBS=1
 => Bootstrap dependency digest>=20010302: found digest-20190127
 ===> Skipping vulnerability checks.
 WARNING: No /opt/pkg-hrz/20201118/pkgdb/pkg-vulnerabilities file found.
 WARNING: To fix run: `/opt/pkg-hrz/20201118/sbin/pkg_admin -K 
 /opt/pkg-hrz/20201118/pkgdb fetch-pkg-vulnerabilities'.
 ===> Building for libuuid-2.32.1
 /opt/pkg-hrz/20201118/bin/bmake  all-recursive
 Making all in po
    CC       lib/libuuid_la-randutils.lo
 In file included from lib/randutils.c:29:
 /usr/include/sys/random.h:81:12: error: conflicting types for 
 'random_get_bytes'
     81 | extern int random_get_bytes(uint8_t *dbuf, size_t dlen);
        |            ^~~~~~~~~~~~~~~~
 In file included from lib/randutils.c:19:
 ./include/randutils.h:14:13: note: previous declaration of 
 'random_get_bytes' was here
     14 | extern void random_get_bytes(void *buf, size_t nbytes);
        |             ^~~~~~~~~~~~~~~~
 *** [lib/libuuid_la-randutils.lo] Error code 1

 bmake[2]: stopped in 
 /opt/pkgsrc/pkg-hrz/pkgsrc/devel/libuuid/work.pkgsrc-sol11i86/util-linux-2.32.1
 1 error


 mcookie fails with the same error, but NB in its own code, i.e. 
 randutil.{ch} are copied verbatim from libuuid.

 randutil.c contains an unconditional implementation of

 void random_get_bytes(void *buf, size_t nbytes)

 that conflicts with Solaris'

 extern int random_get_bytes(uint8_t *dbuf, size_t dlen);

 as long as <sys/random.h> is included. When that header is commented 
 out, other definitions are missing and compilations fails as well. I 
 guess it would take some effort to make libuuid more portable...

 -- 
 Jörn Clausen
 BITS - Bielefelder IT-Servicezentrum
 https://www.uni-bielefeld.de/bits

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/55086: compiling net/tigervnc on Solaris
Date: Sat, 17 Jul 2021 08:25:48 +0000

 On Mon, Jul 12, 2021 at 06:10:01AM +0000, Clausen, J?rn wrote:
  >  randutil.c contains an unconditional implementation of
  >  
  >  void random_get_bytes(void *buf, size_t nbytes)
  >  
  >  that conflicts with Solaris'
  >  
  >  extern int random_get_bytes(uint8_t *dbuf, size_t dlen);
  >  
  >  as long as <sys/random.h> is included. When that header is commented 
  >  out, other definitions are missing and compilations fails as well. I 
  >  guess it would take some effort to make libuuid more portable...

 Is that random_get_bytes suitable for what the code wants? (That is,
 should I patch it so it uses the Solaris function, or to rename its
 own function to avoid the conflict?)

 -- 
 David A. Holland
 dholland@netbsd.org

From: =?UTF-8?Q?Clausen=2c_J=c3=b6rn?= <joern.clausen@uni-bielefeld.de>
To: <gnats-bugs@netbsd.org>, <solaris-pkg-people@netbsd.org>,
	<gnats-admin@netbsd.org>, <pkgsrc-bugs@netbsd.org>
Cc: 
Subject: Re: pkg/55086: compiling net/tigervnc on Solaris
Date: Tue, 20 Jul 2021 15:05:21 +0200

 I was not able to find any detailed information on Solaris' 
 random_get_bytes. At least on my machines there is no man-page, and I 
 found it only mentioned briefly here:

 https://blogs.oracle.com/solaris/post/solaris-random-number-generation

 -- 
 Jörn Clausen
 BITS - Bielefelder IT-Servicezentrum
 https://www.uni-bielefeld.de/bits

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/55086: compiling net/tigervnc on Solaris
Date: Sun, 25 Jul 2021 03:38:15 +0000

 On Tue, Jul 20, 2021 at 01:10:01PM +0000, Clausen, J?rn wrote:
  >  I was not able to find any detailed information on Solaris' 
  >  random_get_bytes. At least on my machines there is no man-page, and I 
  >  found it only mentioned briefly here:
  >  
  >  https://blogs.oracle.com/solaris/post/solaris-random-number-generation

 Sounds like it's probably better not to try to use it.

 -- 
 David A. Holland
 dholland@netbsd.org

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/55086 CVS commit: pkgsrc/devel/libuuid
Date: Sun, 25 Jul 2021 04:00:34 +0000

 Module Name:	pkgsrc
 Committed By:	dholland
 Date:		Sun Jul 25 04:00:34 UTC 2021

 Modified Files:
 	pkgsrc/devel/libuuid: distinfo
 	pkgsrc/devel/libuuid/patches: patch-lib_randutils.c
 	    patch-libuuid_src_gen__uuid.c
 Added Files:
 	pkgsrc/devel/libuuid/patches: patch-include_randutils.h
 	    patch-misc-utils_mcookie.c

 Log Message:
 In libuuid, rename random_get_bytes() to symbol name conflict on Solaris.

 Should fix the build of libuuid, libblkid, and mcookie. PR 55086.


 To generate a diff of this commit:
 cvs rdiff -u -r1.22 -r1.23 pkgsrc/devel/libuuid/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/devel/libuuid/patches/patch-include_randutils.h \
     pkgsrc/devel/libuuid/patches/patch-misc-utils_mcookie.c
 cvs rdiff -u -r1.5 -r1.6 pkgsrc/devel/libuuid/patches/patch-lib_randutils.c
 cvs rdiff -u -r1.1 -r1.2 \
     pkgsrc/devel/libuuid/patches/patch-libuuid_src_gen__uuid.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 07 Aug 2021 03:31:19 +0000
State-Changed-Why:
how's it look?


From: =?UTF-8?Q?Clausen=2c_J=c3=b6rn?= <joern.clausen@uni-bielefeld.de>
To: <gnats-bugs@netbsd.org>, <solaris-pkg-people@netbsd.org>,
	<pkgsrc-bugs@netbsd.org>, <gnats-admin@netbsd.org>, <dholland@netbsd.org>
Cc: 
Subject: Re: pkg/55086 (compiling net/tigervnc on Solaris)
Date: Mon, 9 Aug 2021 10:04:03 +0200

 Sorry for the delay! Both libuuid and mcookie now build fine, and 
 mcookie seem to generate reasonable looking hex strings.

 I haven't tested tigervnc yet, but I guess it will be okay, too. Feel 
 free to close this PR. When I manage to test tigervnc and the problem 
 with mcookie remains, I'll reopen it.

 Thanks for making libuuid more portable!! It's really appreciated :)

 -- 
 Jörn Clausen
 BITS - Bielefelder IT-Servicezentrum
 https://www.uni-bielefeld.de/bits

State-Changed-From-To: feedback->closed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Mon, 09 Aug 2021 08:48:49 +0000
State-Changed-Why:
submitter says this can be closed


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.