Date: Tue, 02 Jan 2024 15:16:36 -0800 From: Cy Schubert <Cy.Schubert@cschubert.com> To: Jonathan Chen <jonc@chen.org.nz> Cc: freebsd-stable@freebsd.org, David Wolfskill <david@catwhisker.org>, Cy Schubert <Cy.Schubert@cschubert.com> Subject: Re: sysutils/screen compilation oddities on stable-14 Message-ID: <20240102231636.CE0857A@slippy.cwsent.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jonc@chen.org.nz> 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 <curses.h> -@@ -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 <lm@rmit.edu.au>, 931222 +@@ -900,11 +874,11 @@ dnl dnl **** utmp handling **** dnl @@ -23,7 +56,7 @@ #include <utmpx.h> #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 <utmpx.h> #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 <Cy.Schubert@cschubert.com> FreeBSD UNIX: <cy@FreeBSD.org> Web: https://FreeBSD.org NTP: <cy@nwtime.org> Web: https://nwtime.org e^(i*pi)+1=0 --==_Exmh_1704237382_35790--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20240102231636.CE0857A>