ping; still running without issues here On Mon, May 16, 2022 at 07:46:20AM -0500, Matthew Martin wrote: > zsh 5.9 was just announced[1]. I've been running the below for about > a day and the prior release candidate for about a week before that > without issues. > > This update is a bit larger than usual. I finally tracked down the > occasionally failing test in V08zpty. If you open a terminal to run make > test, open and then close a separate terminal, and then run the tests > without the below patch, tests that use zpty will hang because getpty > cannot open the corresponding /dev/tty. The below patch uses openpty(3) > instead which fixes the hang. The open and close a terminal is needed so > the next available /dev/pty,tty pair are owned by your user. > > I found this too close to the release to include in 5.9, but assuming it > looks good and there's no fallout, will work to get it upstreamed. > Since configure.ac is changed, need to run Util/preconfig to regenerate > the configure script. This should all go away next release. The other > test failure is known and because regexec(3) is not unicode aware. > > - Matthew Martin > > 1: https://www.zsh.org/mla/announce/msg00134.html >
diff --git Makefile Makefile index 376e8298c38..b6ee32c4dfc 100644 --- Makefile +++ Makefile @@ -1,6 +1,6 @@ COMMENT= Z shell, Bourne shell-compatible -V= 5.8.1 +V= 5.9 DISTNAME= zsh-$V CATEGORIES= shells @@ -21,7 +21,7 @@ WANTLIB= c curses iconv m pcre LIB_DEPENDS= converters/libiconv \ devel/pcre -CONFIGURE_STYLE=gnu +CONFIGURE_STYLE=autoconf CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" @@ -34,6 +34,8 @@ CONFIGURE_ARGS= --disable-zsh-mem \ --disable-gdbm \ --with-tcsetpgrp +AUTOCONF_VERSION= 2.71 + SUBST_VARS= V EXTFILES= Calendar/calendar_add Example/cat Example/zless \ @@ -43,6 +45,7 @@ EXTFILES= Calendar/calendar_add Example/cat Example/zless \ Misc/zed Misc/zkbd pre-configure: + cd ${WRKSRC} && ./Util/preconfig .for i in ${EXTFILES} sed -i -e "s,/bin/zsh,${TRUEPREFIX}/bin/zsh,g" \ ${WRKSRC}/Functions/${i} diff --git distinfo distinfo index 62b4cf054d1..c5db9957732 100644 --- distinfo +++ distinfo @@ -1,2 +1,2 @@ -SHA256 (zsh-5.8.1.tar.xz) = tpc1ILrOYAtHeSACabHl155fUFrElSBYwRrVu/DdmRk= -SIZE (zsh-5.8.1.tar.xz) = 3200540 +SHA256 (zsh-5.9.tar.xz) = m40ezt1bXoH78ZGOh2dSp92UjgXBoNuhCrhjhC1FrNU= +SIZE (zsh-5.9.tar.xz) = 3332400 diff --git patches/patch-Src_Modules_zpty_c patches/patch-Src_Modules_zpty_c new file mode 100644 index 00000000000..4e2b3a70377 --- /dev/null +++ patches/patch-Src_Modules_zpty_c @@ -0,0 +1,63 @@ +Index: Src/Modules/zpty.c +--- Src/Modules/zpty.c.orig ++++ Src/Modules/zpty.c +@@ -37,6 +37,15 @@ + #endif + #endif + ++#ifdef HAVE_OPENPTY ++#ifdef OPENPTY_REQUIRES_PTY ++#include <pty.h> ++#elif defined(OPENPTY_REQUIRES_UTIL) ++#include <termios.h> ++#include <util.h> ++#endif ++#endif ++ + /* The number of bytes we normally read when given no pattern and the + * upper bound on the number of bytes we read (even if we are give a + * pattern). */ +@@ -161,9 +170,27 @@ getptycmd(char *name) + return NULL; + } + +-/* posix_openpt() seems to have some problem on OpenBSD */ +-#if defined(USE_DEV_PTMX) && !defined(__OpenBSD__) ++#ifdef HAVE_OPENPTY + ++static int ++get_pty(int master, int *retfd) ++{ ++ static int mfd, sfd; ++ ++ if (master) { ++ if (openpty(&mfd, &sfd, NULL, NULL, NULL) == -1) { ++ return 1; ++ } ++ *retfd = mfd; ++ return 0; ++ } ++ ++ *retfd = sfd; ++ return 0; ++} ++ ++#elifdef USE_DEV_PTMX ++ + #ifdef HAVE_SYS_STROPTS_H + #include <sys/stropts.h> + #endif +@@ -261,12 +288,7 @@ get_pty(int master, int *retfd) + #elif defined(__FreeBSD__) || defined(__DragonFly__) + static char char1[] = "pqrsPQRS"; + static char char2[] = "0123456789abcdefghijklmnopqrstuv"; +-#elif defined(__OpenBSD__) +- static char char1[] = "pqrstuvwxyzPQRST"; +- static char char2[] = "0123456789" +- "abcdefghijklmnopqrstuvwxyz" +- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +-#else /* __FreeBSD__ || __DragonFly__ || __OpenBSD*/ ++#else /* __FreeBSD__ || __DragonFly__ */ + static char char1[] = "pqrstuvwxyzPQRST"; + static char char2[] = "0123456789abcdef"; + #endif diff --git patches/patch-configure_ac patches/patch-configure_ac new file mode 100644 index 00000000000..939be0046a2 --- /dev/null +++ patches/patch-configure_ac @@ -0,0 +1,41 @@ +Index: configure.ac +--- configure.ac.orig ++++ configure.ac +@@ -2401,6 +2401,37 @@ dnl --------------- + zsh_CHECK_SOCKLEN_T + + dnl --------------- ++dnl Check for openpty support ++dnl --------------- ++AH_TEMPLATE([HAVE_OPENPTY], ++ [Define to 1 if you have the `openpty' function.]) ++AH_TEMPLATE([OPENPTY_REQUIRES_PTY], ++ [Define to 1 if the `openpty' function requires pty.h.]) ++AH_TEMPLATE([OPENPTY_REQUIRES_UTIL], ++ [Define to 1 if the `openpty' function requires termios.h and util.h.]) ++AC_MSG_CHECKING([for openpty]) ++openpty=no ++AC_LINK_IFELSE([AC_LANG_SOURCE( ++[[#include<pty.h> ++int main () { int (*p)(int *, int *, char *, const struct termios *, const struct winsize *) = openpty; }]])], ++ [AC_DEFINE([HAVE_OPENPTY]) ++ AC_DEFINE([OPENPTY_REQUIRES_PTY]) ++ openpty=yes]) ++if test $openpty = no; then ++AC_LINK_IFELSE([AC_LANG_SOURCE( ++[[#include<termios.h> ++#include <util.h> ++int main () { int (*p)(int *, int *, char *, const struct termios *, const struct winsize *) = openpty; }]])], ++ [AC_DEFINE([HAVE_OPENPTY]) ++ AC_DEFINE([OPENPTY_REQUIRES_UTIL]) ++ openpty=yes]) ++fi ++AC_MSG_RESULT([$openpty]) ++if test $openpty = yes; then ++AC_SEARCH_LIBS(openpty, util) ++fi ++ ++dnl --------------- + dnl Check for pty multiplexer for use in pty module. + dnl We need to open it read/write, so make sure it is writeable. + dnl Yet another test which won't work when cross-compiling. diff --git pkg/PLIST pkg/PLIST index ee99afb6481..f34ec7ce64a 100644 --- pkg/PLIST +++ pkg/PLIST @@ -34,6 +34,7 @@ lib/zsh/${V}/zsh/param/ @so lib/zsh/${V}/zsh/system.so @so lib/zsh/${V}/zsh/termcap.so @so lib/zsh/${V}/zsh/terminfo.so +@so lib/zsh/${V}/zsh/watch.so @so lib/zsh/${V}/zsh/zftp.so @so lib/zsh/${V}/zsh/zle.so @so lib/zsh/${V}/zsh/zleparameter.so @@ -113,13 +114,18 @@ share/zsh/${V}/functions/Completion/BSD/_freebsd-update share/zsh/${V}/functions/Completion/BSD/_fstat share/zsh/${V}/functions/Completion/BSD/_fw_update share/zsh/${V}/functions/Completion/BSD/_gstat +share/zsh/${V}/functions/Completion/BSD/_ipfw share/zsh/${V}/functions/Completion/BSD/_jail share/zsh/${V}/functions/Completion/BSD/_jails share/zsh/${V}/functions/Completion/BSD/_jexec share/zsh/${V}/functions/Completion/BSD/_jls share/zsh/${V}/functions/Completion/BSD/_jot +share/zsh/${V}/functions/Completion/BSD/_kdump share/zsh/${V}/functions/Completion/BSD/_kld +share/zsh/${V}/functions/Completion/BSD/_ktrace +share/zsh/${V}/functions/Completion/BSD/_ktrace_points share/zsh/${V}/functions/Completion/BSD/_ldap +share/zsh/${V}/functions/Completion/BSD/_login_classes share/zsh/${V}/functions/Completion/BSD/_mixerctl share/zsh/${V}/functions/Completion/BSD/_nbsd_architectures share/zsh/${V}/functions/Completion/BSD/_obsd_architectures @@ -132,10 +138,17 @@ share/zsh/${V}/functions/Completion/BSD/_portsnap share/zsh/${V}/functions/Completion/BSD/_powerd share/zsh/${V}/functions/Completion/BSD/_procstat share/zsh/${V}/functions/Completion/BSD/_rcctl +share/zsh/${V}/functions/Completion/BSD/_routing_domains +share/zsh/${V}/functions/Completion/BSD/_routing_tables share/zsh/${V}/functions/Completion/BSD/_signify share/zsh/${V}/functions/Completion/BSD/_sockstat +share/zsh/${V}/functions/Completion/BSD/_sysclean +share/zsh/${V}/functions/Completion/BSD/_sysmerge +share/zsh/${V}/functions/Completion/BSD/_syspatch share/zsh/${V}/functions/Completion/BSD/_sysrc share/zsh/${V}/functions/Completion/BSD/_systat +share/zsh/${V}/functions/Completion/BSD/_sysupgrade +share/zsh/${V}/functions/Completion/BSD/_usbconfig share/zsh/${V}/functions/Completion/BSD/_vmctl share/zsh/${V}/functions/Completion/BSD/_watch-snoop share/zsh/${V}/functions/Completion/Base/ @@ -183,6 +196,7 @@ share/zsh/${V}/functions/Completion/Base/_next_label share/zsh/${V}/functions/Completion/Base/_next_tags share/zsh/${V}/functions/Completion/Base/_normal share/zsh/${V}/functions/Completion/Base/_nothing +share/zsh/${V}/functions/Completion/Base/_numbers share/zsh/${V}/functions/Completion/Base/_oldlist share/zsh/${V}/functions/Completion/Base/_pick_variant share/zsh/${V}/functions/Completion/Base/_prefix @@ -270,6 +284,7 @@ share/zsh/${V}/functions/Completion/Debian/_debdiff share/zsh/${V}/functions/Completion/Debian/_debfoster share/zsh/${V}/functions/Completion/Debian/_deborphan share/zsh/${V}/functions/Completion/Debian/_debsign +share/zsh/${V}/functions/Completion/Debian/_debsnap share/zsh/${V}/functions/Completion/Debian/_debuild share/zsh/${V}/functions/Completion/Debian/_dlocate share/zsh/${V}/functions/Completion/Debian/_dpatch-edit-patch @@ -279,6 +294,7 @@ share/zsh/${V}/functions/Completion/Debian/_dpkg-cross share/zsh/${V}/functions/Completion/Debian/_dpkg-repack share/zsh/${V}/functions/Completion/Debian/_dpkg_source share/zsh/${V}/functions/Completion/Debian/_dput +share/zsh/${V}/functions/Completion/Debian/_dscverify share/zsh/${V}/functions/Completion/Debian/_dupload share/zsh/${V}/functions/Completion/Debian/_git-buildpackage share/zsh/${V}/functions/Completion/Debian/_grep-excuses @@ -308,10 +324,13 @@ share/zsh/${V}/functions/Completion/Linux/_acpi share/zsh/${V}/functions/Completion/Linux/_acpitool share/zsh/${V}/functions/Completion/Linux/_alsa-utils share/zsh/${V}/functions/Completion/Linux/_analyseplugin +share/zsh/${V}/functions/Completion/Linux/_basenc share/zsh/${V}/functions/Completion/Linux/_brctl share/zsh/${V}/functions/Completion/Linux/_btrfs +share/zsh/${V}/functions/Completion/Linux/_capabilities share/zsh/${V}/functions/Completion/Linux/_chattr share/zsh/${V}/functions/Completion/Linux/_chcon +share/zsh/${V}/functions/Completion/Linux/_choom share/zsh/${V}/functions/Completion/Linux/_chrt share/zsh/${V}/functions/Completion/Linux/_cpupower share/zsh/${V}/functions/Completion/Linux/_cryptsetup @@ -334,14 +353,19 @@ share/zsh/${V}/functions/Completion/Linux/_kpartx share/zsh/${V}/functions/Completion/Linux/_losetup share/zsh/${V}/functions/Completion/Linux/_lsattr share/zsh/${V}/functions/Completion/Linux/_lsblk +share/zsh/${V}/functions/Completion/Linux/_lsns share/zsh/${V}/functions/Completion/Linux/_lsusb share/zsh/${V}/functions/Completion/Linux/_ltrace +share/zsh/${V}/functions/Completion/Linux/_mat +share/zsh/${V}/functions/Completion/Linux/_mat2 share/zsh/${V}/functions/Completion/Linux/_mdadm share/zsh/${V}/functions/Completion/Linux/_mii-tool share/zsh/${V}/functions/Completion/Linux/_modutils share/zsh/${V}/functions/Completion/Linux/_mondo share/zsh/${V}/functions/Completion/Linux/_networkmanager +share/zsh/${V}/functions/Completion/Linux/_nsenter share/zsh/${V}/functions/Completion/Linux/_opkg +share/zsh/${V}/functions/Completion/Linux/_perf share/zsh/${V}/functions/Completion/Linux/_pidof share/zsh/${V}/functions/Completion/Linux/_pkgtool share/zsh/${V}/functions/Completion/Linux/_pmap @@ -351,6 +375,7 @@ share/zsh/${V}/functions/Completion/Linux/_selinux_contexts share/zsh/${V}/functions/Completion/Linux/_selinux_roles share/zsh/${V}/functions/Completion/Linux/_selinux_types share/zsh/${V}/functions/Completion/Linux/_selinux_users +share/zsh/${V}/functions/Completion/Linux/_setpriv share/zsh/${V}/functions/Completion/Linux/_setsid share/zsh/${V}/functions/Completion/Linux/_slabtop share/zsh/${V}/functions/Completion/Linux/_ss @@ -362,6 +387,7 @@ share/zsh/${V}/functions/Completion/Linux/_tpb share/zsh/${V}/functions/Completion/Linux/_tracepath share/zsh/${V}/functions/Completion/Linux/_tune2fs share/zsh/${V}/functions/Completion/Linux/_uml +share/zsh/${V}/functions/Completion/Linux/_unshare share/zsh/${V}/functions/Completion/Linux/_valgrind share/zsh/${V}/functions/Completion/Linux/_vserver share/zsh/${V}/functions/Completion/Linux/_wakeup_capable_devices @@ -469,7 +495,9 @@ share/zsh/${V}/functions/Completion/Unix/_cpio share/zsh/${V}/functions/Completion/Unix/_cplay share/zsh/${V}/functions/Completion/Unix/_crontab share/zsh/${V}/functions/Completion/Unix/_cscope +share/zsh/${V}/functions/Completion/Unix/_csplit share/zsh/${V}/functions/Completion/Unix/_cssh +share/zsh/${V}/functions/Completion/Unix/_ctags share/zsh/${V}/functions/Completion/Unix/_ctags_tags share/zsh/${V}/functions/Completion/Unix/_curl share/zsh/${V}/functions/Completion/Unix/_cut @@ -501,6 +529,7 @@ share/zsh/${V}/functions/Completion/Unix/_doas share/zsh/${V}/functions/Completion/Unix/_domains share/zsh/${V}/functions/Completion/Unix/_dos2unix share/zsh/${V}/functions/Completion/Unix/_drill +share/zsh/${V}/functions/Completion/Unix/_dropbox share/zsh/${V}/functions/Completion/Unix/_dsh share/zsh/${V}/functions/Completion/Unix/_dtruss share/zsh/${V}/functions/Completion/Unix/_du @@ -606,6 +635,7 @@ share/zsh/${V}/functions/Completion/Unix/_locale share/zsh/${V}/functions/Completion/Unix/_localedef share/zsh/${V}/functions/Completion/Unix/_locales share/zsh/${V}/functions/Completion/Unix/_locate +share/zsh/${V}/functions/Completion/Unix/_logger share/zsh/${V}/functions/Completion/Unix/_look share/zsh/${V}/functions/Completion/Unix/_lp share/zsh/${V}/functions/Completion/Unix/_ls @@ -661,6 +691,7 @@ share/zsh/${V}/functions/Completion/Unix/_objdump share/zsh/${V}/functions/Completion/Unix/_object_files share/zsh/${V}/functions/Completion/Unix/_od share/zsh/${V}/functions/Completion/Unix/_openstack +share/zsh/${V}/functions/Completion/Unix/_opustools share/zsh/${V}/functions/Completion/Unix/_other_accounts share/zsh/${V}/functions/Completion/Unix/_pack share/zsh/${V}/functions/Completion/Unix/_pandoc @@ -677,12 +708,14 @@ share/zsh/${V}/functions/Completion/Unix/_perl share/zsh/${V}/functions/Completion/Unix/_perl_basepods share/zsh/${V}/functions/Completion/Unix/_perl_modules share/zsh/${V}/functions/Completion/Unix/_perldoc +share/zsh/${V}/functions/Completion/Unix/_pgids share/zsh/${V}/functions/Completion/Unix/_pgrep share/zsh/${V}/functions/Completion/Unix/_php share/zsh/${V}/functions/Completion/Unix/_picocom share/zsh/${V}/functions/Completion/Unix/_pids share/zsh/${V}/functions/Completion/Unix/_pine share/zsh/${V}/functions/Completion/Unix/_ping +share/zsh/${V}/functions/Completion/Unix/_pip share/zsh/${V}/functions/Completion/Unix/_pkg-config share/zsh/${V}/functions/Completion/Unix/_pkg_instance share/zsh/${V}/functions/Completion/Unix/_pkgadd @@ -693,6 +726,7 @@ share/zsh/${V}/functions/Completion/Unix/_ports share/zsh/${V}/functions/Completion/Unix/_postfix share/zsh/${V}/functions/Completion/Unix/_postgresql share/zsh/${V}/functions/Completion/Unix/_postscript +share/zsh/${V}/functions/Completion/Unix/_pr share/zsh/${V}/functions/Completion/Unix/_printenv share/zsh/${V}/functions/Completion/Unix/_printers share/zsh/${V}/functions/Completion/Unix/_process_names @@ -700,6 +734,7 @@ share/zsh/${V}/functions/Completion/Unix/_prove share/zsh/${V}/functions/Completion/Unix/_ps share/zsh/${V}/functions/Completion/Unix/_pspdf share/zsh/${V}/functions/Completion/Unix/_psutils +share/zsh/${V}/functions/Completion/Unix/_ptx share/zsh/${V}/functions/Completion/Unix/_pump share/zsh/${V}/functions/Completion/Unix/_pv share/zsh/${V}/functions/Completion/Unix/_pwgen @@ -803,6 +838,7 @@ share/zsh/${V}/functions/Completion/Unix/_tput share/zsh/${V}/functions/Completion/Unix/_tr share/zsh/${V}/functions/Completion/Unix/_transmission share/zsh/${V}/functions/Completion/Unix/_tree +share/zsh/${V}/functions/Completion/Unix/_truncate share/zsh/${V}/functions/Completion/Unix/_truss share/zsh/${V}/functions/Completion/Unix/_tty share/zsh/${V}/functions/Completion/Unix/_ttys @@ -821,7 +857,7 @@ share/zsh/${V}/functions/Completion/Unix/_user_admin share/zsh/${V}/functions/Completion/Unix/_user_at_host share/zsh/${V}/functions/Completion/Unix/_users share/zsh/${V}/functions/Completion/Unix/_users_on -share/zsh/${V}/functions/Completion/Unix/_vcsh +share/zsh/${V}/functions/Completion/Unix/_vi share/zsh/${V}/functions/Completion/Unix/_vim share/zsh/${V}/functions/Completion/Unix/_visudo share/zsh/${V}/functions/Completion/Unix/_vmstat @@ -850,10 +886,8 @@ share/zsh/${V}/functions/Completion/Unix/_zcat share/zsh/${V}/functions/Completion/Unix/_zdump share/zsh/${V}/functions/Completion/Unix/_zfs share/zsh/${V}/functions/Completion/Unix/_zfs_dataset -share/zsh/${V}/functions/Completion/Unix/_zfs_keysource_props share/zsh/${V}/functions/Completion/Unix/_zfs_pool share/zsh/${V}/functions/Completion/Unix/_zip -share/zsh/${V}/functions/Completion/Unix/_zpool share/zsh/${V}/functions/Completion/Unix/_zsh share/zsh/${V}/functions/Completion/X/ share/zsh/${V}/functions/Completion/X/_acroread @@ -907,6 +941,7 @@ share/zsh/${V}/functions/Completion/X/_xclip share/zsh/${V}/functions/Completion/X/_xdvi share/zsh/${V}/functions/Completion/X/_xfig share/zsh/${V}/functions/Completion/X/_xft_fonts +share/zsh/${V}/functions/Completion/X/_xinput share/zsh/${V}/functions/Completion/X/_xloadimage share/zsh/${V}/functions/Completion/X/_xmodmap share/zsh/${V}/functions/Completion/X/_xournal @@ -921,6 +956,7 @@ share/zsh/${V}/functions/Completion/X/_xv share/zsh/${V}/functions/Completion/X/_xwit share/zsh/${V}/functions/Completion/X/_zeal share/zsh/${V}/functions/Completion/Zsh/ +share/zsh/${V}/functions/Completion/Zsh/__arguments share/zsh/${V}/functions/Completion/Zsh/_add-zle-hook-widget share/zsh/${V}/functions/Completion/Zsh/_add-zsh-hook share/zsh/${V}/functions/Completion/Zsh/_alias @@ -1001,6 +1037,8 @@ share/zsh/${V}/functions/Completion/Zsh/_user_math_func share/zsh/${V}/functions/Completion/Zsh/_value share/zsh/${V}/functions/Completion/Zsh/_vared share/zsh/${V}/functions/Completion/Zsh/_vars +share/zsh/${V}/functions/Completion/Zsh/_vcs_info +share/zsh/${V}/functions/Completion/Zsh/_vcs_info_hooks share/zsh/${V}/functions/Completion/Zsh/_wait share/zsh/${V}/functions/Completion/Zsh/_which share/zsh/${V}/functions/Completion/Zsh/_widgets @@ -1056,6 +1094,7 @@ share/zsh/${V}/functions/Misc/promptnl share/zsh/${V}/functions/Misc/regexp-replace share/zsh/${V}/functions/Misc/relative share/zsh/${V}/functions/Misc/run-help +share/zsh/${V}/functions/Misc/run-help-btrfs share/zsh/${V}/functions/Misc/run-help-git share/zsh/${V}/functions/Misc/run-help-ip share/zsh/${V}/functions/Misc/run-help-openssl @@ -1157,7 +1196,10 @@ share/zsh/${V}/functions/VCS_Info/VCS_INFO_patch2subject share/zsh/${V}/functions/VCS_Info/VCS_INFO_quilt share/zsh/${V}/functions/VCS_Info/VCS_INFO_reposub share/zsh/${V}/functions/VCS_Info/VCS_INFO_set +share/zsh/${V}/functions/VCS_Info/VCS_INFO_set-branch-format share/zsh/${V}/functions/VCS_Info/VCS_INFO_set-patch-format +share/zsh/${V}/functions/VCS_Info/test-repo-git-rebase-apply +share/zsh/${V}/functions/VCS_Info/test-repo-git-rebase-merge share/zsh/${V}/functions/VCS_Info/vcs_info share/zsh/${V}/functions/VCS_Info/vcs_info_hookadd share/zsh/${V}/functions/VCS_Info/vcs_info_hookdel @@ -1306,7 +1348,6 @@ share/zsh/${V}/help/kill share/zsh/${V}/help/let share/zsh/${V}/help/limit share/zsh/${V}/help/local -share/zsh/${V}/help/log share/zsh/${V}/help/logout share/zsh/${V}/help/noglob share/zsh/${V}/help/popd