NetBSD Problem Report #55785

From mlelstv@gossam.localdomain  Wed Nov  4 12:27:58 2020
Return-Path: <mlelstv@gossam.localdomain>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id 399B61A9246
	for <>; Wed,  4 Nov 2020 12:27:58 +0000 (UTC)
Message-Id: <20201104122755.0938EB138@gossam.localdomain>
Date: Wed,  4 Nov 2020 13:27:55 +0100 (CET)
Subject: misc/screen build issues with openpty
X-Send-Pr-Version: 3.95

>Number:         55785
>Notify-List:    kim
>Category:       pkg
>Synopsis:       misc/screen build issues with openpty
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 04 12:30:00 +0000 2020
>Last-Modified:  Wed Nov 04 20:40:32 +0000 2020
>Originator:     Michael van Elst
>Release:        NetBSD 9.1_STABLE


System: NetBSD gossam 9.1_STABLE NetBSD 9.1_STABLE (GENERIC) #16: Tue Nov 3 18:38:22 CET 2020 mlelstv@gossam:/home/netbsd9/obj.amd64/home/netbsd9/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
misc/screen builds differently depending on functionality provided
by ptyfs.

The official package compiles to access /dev/ptmx directly to
acquire ptys.

A package built in a simple chroot compiles to use openpty() from
libutil.  In this case the upstream code isn't used but a patched
OpenPTY function provided by patch-aa. This version fails to work
with a mounted ptyfs since it validates the file name of the slave
device to start with the letter 't' so that it can synthesize the
master device name by replacing 't' with 'p'. None of this works
for ptyfs.
As a result screen exits with the message 'No more PTYs'.

patch-aa is ancient and predates ptyfs.

Build the package.

If /dev/ptmx exists and the symbols ptsname, grantpt and unlockpt
are found by the linker, these are used.

Otherwise openpty is used and our patch fails on validating the
result when ptyfs is in use.

1. Ignore ptyfs in build environment.

2. Either require ptyfs or use a function that gracefully handles
compat ptys and ptyfs. Upstream already includes a version of
OpenPTY that uses openpty which we override with patch-aa. It might
be sufficient to remove the patch.




NetBSD Home
NetBSD PR Database Search

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