Bug 276535 - devel/p5-IO-Tty 1.18 is broken
Summary: devel/p5-IO-Tty 1.18 is broken
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-perl (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-22 21:19 UTC by Joe Marcus Clarke
Modified: 2024-05-06 20:45 UTC (History)
4 users (show)

See Also:
mat: maintainer-feedback+


Attachments
Remove no-longer-needed patch to fix runtime (885 bytes, patch)
2024-04-15 18:51 UTC, Joe Marcus Clarke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Marcus Clarke freebsd_committer freebsd_triage 2024-01-22 21:19:30 UTC
While p5-IO-Tty builds, none of the underlying TTY functions are detected (look at the configure output), and thus the resulting module does nothing.  Reverting to 1.17 restores functionality.

Output of configure for 1.18:

Now let's see what we can find out about your system
(logfiles of failing tests are available in the conf/ dir)...
Looking for _getpty()...... not found.
Looking for getpt()........ not found.
Looking for grantpt()...... not found.
Looking for openpty()...... not found.
Looking for posix_openpt(). not found.
Looking for ptsname()...... not found.
Looking for ptsname_r().... not found.
Looking for sigaction().... not found.
Looking for strlcpy()...... not found.
Looking for ttyname()...... not found.
Looking for unlockpt()..... not found.
Looking for libutil.h...... FOUND.
Looking for pty.h.......... not found.
Looking for sys/pty.h...... not found.
Looking for sys/ptyio.h.... not found.
Looking for sys/stropts.h.. not found.
Looking for termio.h....... not found.
Looking for termios.h...... FOUND.
Looking for util.h......... not found.

Output of configure for 1.17:

Now let's see what we can find out about your system
(logfiles of failing tests are available in the conf/ dir)...
Looking for _getpty()...... not found.
Looking for getpt()........ not found.
Looking for grantpt()...... FOUND.
Looking for openpty()...... FOUND.
Looking for posix_openpt(). FOUND.
Looking for ptsname()...... FOUND.
Looking for ptsname_r().... FOUND.
Looking for sigaction().... FOUND.
Looking for strlcpy()...... FOUND.
Looking for ttyname()...... FOUND.
Looking for unlockpt()..... FOUND.
Looking for libutil.h...... FOUND.
Looking for pty.h.......... not found.
Looking for sys/pty.h...... not found.
Looking for sys/ptyio.h.... not found.
Looking for sys/stropts.h.. not found.
Looking for termio.h....... not found.
Looking for termios.h...... FOUND.
Looking for util.h......... not found.
Comment 1 Tomohiro Hosaka 2024-03-27 15:03:05 UTC
Hello.

I just updated from FreeBSD 12.4 with 2023Q4 to 13.3 with 2024Q1.
I encountered a problem with IO::Pty which I use in my own scripts.

My conclusion is that the patch in files/ is not needed for the current main branch.

The following may be relevant
https://github.com/cpan-authors/IO-Tty/issues/38

# cd /usr/ports/devel/p5-IO-Tty
# git log -1 .
commit 8d9c159ef7a9f70e2c1930d13f776cd4074b398f
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
Date:   Wed Feb 21 23:01:01 2024 +0800

    devel/p5-IO-Tty: Update to 1.20

    Changes:        https://metacpan.org/dist/IO-Tty/changes
# make test
===>  License ART10 GPLv1+ accepted by the user
===>   p5-IO-Tty-1.20 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by p5-IO-Tty-1.20 for building
===>  Extracting for p5-IO-Tty-1.20
=> SHA256 Checksum OK for IO-Tty-1.20.tar.gz.
===>  Patching for p5-IO-Tty-1.20
===>  Applying FreeBSD patches for p5-IO-Tty-1.20 from /usr/ports/devel/p5-IO-Tty/files
===>   p5-IO-Tty-1.20 depends on package: perl5>=5.36<5.37 - found
===>  Configuring for p5-IO-Tty-1.20
Now let's see what we can find out about your system
(logfiles of failing tests are available in the conf/ dir)...
Looking for _getpty()...... not found.
Looking for getpt()........ not found.
Looking for grantpt()...... not found.
Looking for openpty()...... not found.
Looking for posix_openpt(). not found.
Looking for ptsname()...... not found.
Looking for ptsname_r().... not found.
Looking for sigaction().... not found.
Looking for strlcpy()...... not found.
Looking for ttyname()...... not found.
Looking for unlockpt()..... not found.
Looking for libutil.h...... FOUND.
Looking for pty.h.......... not found.
Looking for sys/pty.h...... not found.
Looking for sys/ptyio.h.... not found.
Looking for sys/stropts.h.. not found.
Looking for termio.h....... not found.
Looking for termios.h...... FOUND.
Looking for util.h......... not found.
Checking which symbols compile OK...

# make clean
# ===>  Cleaning for p5-IO-Tty-1.20
# rm -rf files
# make test
===>  License ART10 GPLv1+ accepted by the user
===>   p5-IO-Tty-1.20 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by p5-IO-Tty-1.20 for building
===>  Extracting for p5-IO-Tty-1.20
=> SHA256 Checksum OK for IO-Tty-1.20.tar.gz.
===>  Patching for p5-IO-Tty-1.20
===>   p5-IO-Tty-1.20 depends on package: perl5>=5.36<5.37 - found
===>  Configuring for p5-IO-Tty-1.20
Now let's see what we can find out about your system
(logfiles of failing tests are available in the conf/ dir)...
Looking for _getpty()...... not found.
Looking for getpt()........ not found.
Looking for grantpt()...... FOUND.
Looking for openpty()...... FOUND.
Looking for posix_openpt(). FOUND.
Looking for ptsname()...... FOUND.
Looking for ptsname_r().... FOUND.
Looking for sigaction().... FOUND.
Looking for strlcpy()...... FOUND.
Looking for ttyname()...... FOUND.
Looking for unlockpt()..... FOUND.
Looking for libutil.h...... FOUND.
Looking for pty.h.......... not found.
Looking for sys/pty.h...... not found.
Looking for sys/ptyio.h.... not found.
Looking for sys/stropts.h.. not found.
Looking for termio.h....... not found.
Looking for termios.h...... FOUND.
Looking for util.h......... not found.
Checking which symbols compile OK...


With this fix my scripts work fine as before.
Comment 2 Dave Hayes 2024-04-01 03:45:19 UTC
I'm going to echo this result but for 13.2-STABLE. I just upgraded to 2024Q1 (ish) with p5-IO-Tty 1.20. The following happens:

> perl -MIO::Pty -e '$x = IO::Pty->new;'
Cannot open a pty at -e line 1.

This breaks things of course. The suggested fix above works, removing the "files" directory makes things work again.
Comment 3 Adam McDougall 2024-04-11 19:09:29 UTC
I ran into this issue too and deleting patch-Makefile.PL fixed it for me. Thanks
Comment 4 Joe Marcus Clarke freebsd_committer freebsd_triage 2024-04-15 18:51:58 UTC
Created attachment 249995 [details]
Remove no-longer-needed patch to fix runtime
Comment 5 Joe Marcus Clarke freebsd_committer freebsd_triage 2024-04-15 18:52:47 UTC
I've added a patch to start the maintainer timeout timer.  I want to get this fixed.
Comment 6 Mathieu Arnold freebsd_committer freebsd_triage 2024-04-16 05:33:30 UTC
Please go ahead
Comment 7 commit-hook freebsd_committer freebsd_triage 2024-04-16 12:44:13 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c026b7502717e2c04d0ada7ad49443a48eaa8587

commit c026b7502717e2c04d0ada7ad49443a48eaa8587
Author:     Joe Marcus Clarke <marcus@FreeBSD.org>
AuthorDate: 2024-04-16 12:41:29 +0000
Commit:     Joe Marcus Clarke <marcus@FreeBSD.org>
CommitDate: 2024-04-16 12:43:42 +0000

    devel/p5-IO-Tty: Remove a no-longer-needed patch

    This fixes runtime where no tty functions could be used.

    PR:             276535
    Approved by:    perl@ (mat)

 devel/p5-IO-Tty/Makefile                       |  1 +
 devel/p5-IO-Tty/files/patch-Makefile.PL (gone) | 11 -----------
 2 files changed, 1 insertion(+), 11 deletions(-)
Comment 8 Joe Marcus Clarke freebsd_committer freebsd_triage 2024-04-16 12:44:29 UTC
Committed!
Comment 9 Dan Langille freebsd_committer freebsd_triage 2024-04-26 17:25:37 UTC
Thank you.

I confirm this fixes the issue on head.

The problem persists on 2024Q2 for me.
Comment 10 Joe Marcus Clarke freebsd_committer freebsd_triage 2024-04-26 19:01:21 UTC
Yeah.  I asked mat@ if I can commit 1.20_1 to the quarterly branch.  No response yet.  I'll go ahead and do it next week if I don't hear back sooner.
Comment 11 Dan Langille freebsd_committer freebsd_triage 2024-04-26 19:36:31 UTC
(In reply to Joe Marcus Clarke from comment #10)
Sorry, to be clear: I patched the port on our local 2022Q2 - did not fix the issue. I will verify.
Comment 12 Dan Langille freebsd_committer freebsd_triage 2024-04-26 19:52:32 UTC
(In reply to Dan Langille from comment #11)
Yes, confirmed, it was patched locally on our 2024Q2:

2024-04-26T09:53:13-04:00 localhost pkg[78137]: p5-IO-Tty upgraded: 1.20 -> 1.20_1
Comment 13 Joe Marcus Clarke freebsd_committer freebsd_triage 2024-04-26 21:22:31 UTC
Hmmm, can you send me the `make` output from your quarterly branch build that still has the problem?  Also, make sure nothing crufty is in the `files` directory.
Comment 14 Dan Langille freebsd_committer freebsd_triage 2024-04-26 22:13:53 UTC
(In reply to Joe Marcus Clarke from comment #13)
mea culpa.  You said cruft. Exactly that. I will retest soon.
Comment 15 Dan Langille freebsd_committer freebsd_triage 2024-04-27 00:04:49 UTC
(In reply to Dan Langille from comment #14)

I did not correctly apply the patch which means my previous test on 224Q2 was invalid.

I redid the patch, correctly this time, without cruft in the files directory. Works fine on 2024Q2.

Thank you. Sorry about the noise.
Comment 16 commit-hook freebsd_committer freebsd_triage 2024-05-06 20:45:39 UTC
A commit in branch 2024Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=02f8c386e7d9629fcedcb7c57baff5fcda36668f

commit 02f8c386e7d9629fcedcb7c57baff5fcda36668f
Author:     Joe Marcus Clarke <marcus@FreeBSD.org>
AuthorDate: 2024-04-16 12:41:29 +0000
Commit:     Joe Marcus Clarke <marcus@FreeBSD.org>
CommitDate: 2024-05-06 20:44:26 +0000

    devel/p5-IO-Tty: Remove a no-longer-needed patch

    This fixes runtime where no tty functions could be used.

    PR:             276535
    Approved by:    perl@ two-week timeout

    (cherry picked from commit c026b7502717e2c04d0ada7ad49443a48eaa8587)

 devel/p5-IO-Tty/Makefile                       |  1 +
 devel/p5-IO-Tty/files/patch-Makefile.PL (gone) | 11 -----------
 2 files changed, 1 insertion(+), 11 deletions(-)