From nobody Tue Jan 2 23:16:36 2024 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T4TJ76pPyz565l2 for ; Tue, 2 Jan 2024 23:16:39 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4T4TJ769Mkz3TkW for ; Tue, 2 Jan 2024 23:16:39 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTPS id KlnxrReM98jpTKnzzrkRt8; Tue, 02 Jan 2024 23:16:39 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id KnzxroAOvnCF0KnzyrzKtY; Tue, 02 Jan 2024 23:16:39 +0000 X-Authority-Analysis: v=2.4 cv=MPFzJeVl c=1 sm=1 tr=0 ts=65949957 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=dEuoMetlWLkA:10 a=XldT38RWNwACPDQzwzUA:9 a=R8vwMfuDAAAA:8 a=OqWOwpgv5ggFgBU2SnsA:9 a=CjuIK1q_8ugA:10 a=mDV3o1hIAAAA:8 a=UZ1dF0cVKI0oLvgvNl8A:9 a=De_Ol2h6w80A:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=ics_IjAVWSmO8OVX31YA:9 a=BOg4e644cxQA:10 a=EiJSw4IFYIBf4ttFM9wd:22 a=_FVE-zBwftR9WsbkzFJk:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id DF795136; Tue, 2 Jan 2024 15:16:36 -0800 (PST) Received: by slippy.cwsent.com (Postfix, from userid 1000) id CE0857A; Tue, 2 Jan 2024 15:16:36 -0800 (PST) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Jonathan Chen cc: freebsd-stable@freebsd.org, David Wolfskill , Cy Schubert Subject: Re: sysutils/screen compilation oddities on stable-14 In-reply-to: <99fe4b1a-d0f7-421a-8835-394816832506@chen.org.nz> References: <3611bca4-5157-4d7e-abb6-16a34bac8d99@chen.org.nz> <99fe4b1a-d0f7-421a-8835-394816832506@chen.org.nz> Comments: In-reply-to Jonathan Chen message dated "Wed, 03 Jan 2024 11:56:58 +1300." List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_1704237382_35790" Date: Tue, 02 Jan 2024 15:16:36 -0800 Message-Id: <20240102231636.CE0857A@slippy.cwsent.com> X-CMAE-Envelope: MS4xfPQHNnsGO44zsXk+2J/NoJU4E2hrn2pv4Y9JLDopCGkfdZCvqdmcN33kmZc21snzhf28IMzs2bNP7ptOMjwdVvWtCiR0OZ6iBh5hqo3FayAqCq9cvaF/ xJoRXqVcMyF2g8SctKqoE8M5Apl23SiKxRY0c7s7LXyRIWmnixN90AXbuq6MaXtKM2Pim26w555KPKGdP5WO1xxN6hBvdGpq9IZy7w/iM6oior7EBMFI0Ih9 IgWMg1rpkXDnTZbt0pYnWyr12atFx4YKvE1FZcsF/nY= X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4T4TJ769Mkz3TkW This is a multipart MIME message. --==_Exmh_1704237382_35790 Content-Type: text/plain; charset=us-ascii In message <99fe4b1a-d0f7-421a-8835-394816832506@chen.org.nz>, Jonathan Chen wr ites: > On 1/01/24 19:06, Jonathan Chen wrote: > > Hi, > > > > I'm running a somewhat recent stable-14/amd64 (refreshed 27-Dec-2023), > > and I wonder if someone can explain what is happening... > > > > I've got a dev-host which I use as a repo-builder. I have discovered > > that if I have linux_enable="YES" on the repo-builder, the resultant > > executable from the sysutils/screen package produced will only behave as > > expected on other hosts that also have linux_enable="YES". On hosts > > where linux_enable is *not* defined (ie linux_enable="NO"), `screen' > > will start up and then immediatly quit. There are no core-dumps, or any > > other noticeable error-messages. > > > > If I set linux_enable="NO" on the repo-builder, the executable from the > > sysutils/screen package produced will work as expected on _all_ hosts, > > ie linux_enable=YES|NO. > > After an interesting inspection with ktrace and a look-thru' of > rc.d/linux, I've managed track the cause of this to pty.ko. This module > is loaded with linux_enable=YES, and interferes with the screen package > build. With pty.ko loaded, the screen executable generated will expect > old style pseudo-terminal names; which is not what is available on a > standard STABLE-14 host. > > When pty.ko is _not_ loaded, the screen executable generated will work > on hosts with linux_enable=YES|NO. > > I don't know whether the FreeBSD package builders will be affected, but > this factoid will be useful for the archives. > > Cheers. > -- > Jonathan Chen Can you give the attached patch a try? --==_Exmh_1704237382_35790 Content-Type: text/plain ; name="screen.diff"; charset=us-ascii Content-Description: screen.diff diff --git a/sysutils/screen/Makefile b/sysutils/screen/Makefile index 0ca99d2f6c9a..fe7f443fb75e 100644 --- a/sysutils/screen/Makefile +++ b/sysutils/screen/Makefile @@ -1,5 +1,6 @@ PORTNAME= screen PORTVERSION= 4.9.1 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= GNU \ ftp://ftp.gnu.org/gnu/screen/ \ diff --git a/sysutils/screen/files/patch-configure.ac b/sysutils/screen/files/patch-configure.ac index 77608dbebb05..9ca352d08b0a 100644 --- a/sysutils/screen/files/patch-configure.ac +++ b/sysutils/screen/files/patch-configure.ac @@ -1,5 +1,5 @@ --- configure.ac.orig 2023-08-15 17:29:26.000000000 -0700 -+++ configure.ac 2023-08-19 07:32:42.246552000 -0700 ++++ configure.ac 2024-01-02 15:13:06.080297000 -0800 @@ -669,7 +669,7 @@ tgetent((char *)0, (char *)0); ],, @@ -9,7 +9,40 @@ AC_CHECKING(libcurses) AC_TRY_LINK([ #include -@@ -900,11 +900,11 @@ +@@ -777,32 +777,6 @@ + [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])]) + fi + +-if test "$cross_compiling" = no ; then +-AC_CHECKING(for ptyranges) +-if test -d /dev/ptym ; then +-pdir='/dev/ptym' +-else +-pdir='/dev' +-fi +-dnl SCO uses ptyp%d +-AC_EGREP_CPP(YES_IS_DEFINED, +-[#ifdef M_UNIX +- YES_IS_DEFINED; +-#endif +-], ptys=`echo /dev/ptyp??`, ptys=`echo $pdir/pty??`) +-dnl if test -c /dev/ptyp19; then +-dnl ptys=`echo /dev/ptyp??` +-dnl else +-dnl ptys=`echo $pdir/pty??` +-dnl fi +-if test "$ptys" != "$pdir/pty??" ; then +-p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'` +-p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'` +-AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0") +-AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1") +-fi +-fi +- + dnl **** pty mode/group handling **** + dnl + dnl support provided by Luke Mewburn , 931222 +@@ -900,11 +874,11 @@ dnl dnl **** utmp handling **** dnl @@ -23,7 +56,7 @@ #include #define utmp utmpx #else -@@ -917,11 +917,11 @@ +@@ -917,11 +891,11 @@ [int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT), olibs="$LIBS" LIBS="$LIBS -lgen" @@ -37,7 +70,7 @@ #include #define utmp utmpx #else -@@ -931,13 +931,13 @@ +@@ -931,13 +905,13 @@ #define pututline _pututline #endif ], --==_Exmh_1704237382_35790 Content-Type: text/plain; charset=us-ascii Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 --==_Exmh_1704237382_35790--