shells/zsh: Update to 5.9
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 000..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 ++#elif defined(OPENPTY_REQUIRES_UTIL) ++#include ++#include ++#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 + #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 000..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
Re: shells/zsh: Update to 5.9
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 000..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 ++#elif defined(OPENPTY_REQUIRES_UTIL) ++#include ++#include ++#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 + #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 000..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 require
Re: shells/zsh: Update to 5.9
On 2022/05/25 21:53, Matthew Martin wrote: > ping; still running without issues here I didn't hear from maintainer so I have gone ahead and committed it. pea@, do you want to stay maintainer on zsh?
Re: shells/zsh: Update to 5.9
Hello, Sorry I forgot to answer. Yes please keep me as maintainer. Thanks Le 26 mai 2022 10:52:34 GMT+02:00, Stuart Henderson a écrit : >On 2022/05/25 21:53, Matthew Martin wrote: >> ping; still running without issues here > >I didn't hear from maintainer so I have gone ahead and committed it. > >pea@, do you want to stay maintainer on zsh? > -- Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.