* Ben Wong <b...@wongs.net>, 2017-12-22, 17:03:
Wait, that bug again? I fixed that a long time ago.
Indeed, you did. However, the critical part of the fix was regenerating
the configure script (and to lesser extent config.h.in) from source.
This was done at build time by adding:
DEB_AUTO_UPDATE_AUTOHEADER := 2.61
DEB_AUTO_UPDATE_AUTOCONF := 2.61
to debian/rules.
It turns out these two lines were removed without explanation in the
1.5c.debian.1-3.2 NMU.
(This is not the only problem with this upload. It failed to follow the
NMU guidelines (DevRef ยง5.11.1) in multiple ways:
* It changes source package format and patch system, whereas "fixing
cosmetic issues or changing the packaging style [...] in NMUs is
discouraged."
* The upload was without appropriate delay.
* NMU diff was not posted to the BTS.
Another undocumented change in the NMU is removal of the
fake_readline/Makefile hunk from the 01_pre_cdbs.diff patch. No idea
what's the consequence of that.)
It would be probably too invasive to add DEB_AUTO_UPDATE_* back in a
stable upload (especially now that unstable has an entirely different
fix for the bug), so I'd like to propose to regenerate autoconf stuff
once and stick the diff into 04_GNU_openpty.patch. See the attached
debdiff.
For the avoidance of doubt, I don't intend to do the actual upload. It
is YunQiang's job to fix the regression.
As a side note, some people noticed that just rebuilding the package
from source fixes the problem for them. This is because when openpty()
is not available (or, in our case, when it's not detected correctly),
the package falls back to getpt(), and that works. However, the
configure test for UNIX 98 pseudoterminal naming is broken:
if test -c /dev/ptmx && test -c /dev/pts/0
But /dev/pts/0 doesn't exist when nothing is using ptys at the moment;
indeed, evidently it didn't exist when this package was built on
buildds.
So regenerating autotools files is strictly required after all.
No-change rebuilds wouldn't be sufficient.
--
Jakub Wilk
diff -Nru zssh-1.5c.debian.1/debian/changelog zssh-1.5c.debian.1/debian/changelog
--- zssh-1.5c.debian.1/debian/changelog 2014-07-21 10:27:39.000000000 +0200
+++ zssh-1.5c.debian.1/debian/changelog 2019-04-11 21:31:11.000000000 +0200
@@ -1,3 +1,9 @@
+zssh (1.5c.debian.1-3.2+deb9u1) stretch; urgency=low
+
+ * Regenerate autoconf files from source (closes: #769366).
+
+ -- Jakub Wilk <jw...@jwilk.net> Thu, 11 Apr 2019 21:31:11 +0200
+
zssh (1.5c.debian.1-3.2) unstable; urgency=medium
* Non-maintainer upload.
diff -Nru zssh-1.5c.debian.1/debian/patches/04_GNU_openpty.patch zssh-1.5c.debian.1/debian/patches/04_GNU_openpty.patch
--- zssh-1.5c.debian.1/debian/patches/04_GNU_openpty.patch 2014-07-21 10:27:39.000000000 +0200
+++ zssh-1.5c.debian.1/debian/patches/04_GNU_openpty.patch 2019-04-11 21:31:11.000000000 +0200
@@ -40,3 +40,147 @@
void getmaster()
{
#ifdef DEBUG
+--- zssh-1.5c.debian.1.orig/configure
++++ zssh-1.5c.debian.1/configure
+@@ -1293,7 +1293,7 @@
+ fi
+
+ for ac_hdr in fcntl.h paths.h sys/ioctl.h sys/time.h termios.h unistd.h \
+- err.h sys/cdefs.h sys/param.h util.h stropts.h
++ err.h sys/cdefs.h sys/param.h util.h stropts.h pty.h
+ do
+ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+@@ -1827,7 +1827,7 @@
+
+
+
+-for ac_func in _getpty getpseudotty openpty grantpt unlockpt
++for ac_func in _getpty getpseudotty grantpt unlockpt
+ do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+ echo "configure:1834: checking for $ac_func" >&5
+@@ -1882,8 +1882,110 @@
+ fi
+ done
+
++for ac_func in openpty
++do
++echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++echo "configure:1889: checking for $ac_func" >&5
++if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++else
++ cat > conftest.$ac_ext <<EOF
++#line 1894 "configure"
++#include "confdefs.h"
++/* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++#include <assert.h>
++/* Override any gcc2 internal prototype to avoid an error. */
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char $ac_func();
++
++int main() {
++
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++choke me
++#else
++$ac_func();
++#endif
++
++; return 0; }
++EOF
++if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=no"
++fi
++rm -f conftest*
++fi
++
++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
++ cat >> confdefs.h <<EOF
++#define $ac_tr_func 1
++EOF
++
++else
++ echo "$ac_t""no" 1>&6
++echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
++echo "configure:1939: checking for openpty in -lutil" >&5
++ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
++if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++else
++ ac_save_LIBS="$LIBS"
++LIBS="-lutil $LIBS"
++cat > conftest.$ac_ext <<EOF
++#line 1947 "configure"
++#include "confdefs.h"
++/* Override any gcc2 internal prototype to avoid an error. */
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char openpty();
++
++int main() {
++openpty()
++; return 0; }
++EOF
++if { (eval echo configure:1958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=yes"
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=no"
++fi
++rm -f conftest*
++LIBS="$ac_save_LIBS"
++
++fi
++if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ cat >> confdefs.h <<\EOF
++#define HAVE_OPENPTY 1
++EOF
++
++ LIBS="$LIBS -lutil"
++
++else
++ echo "$ac_t""no" 1>&6
++fi
++
++fi
++done
++
++
++
+ echo $ac_n "checking for pseudo ttys""... $ac_c" 1>&6
+-echo "configure:1887: checking for pseudo ttys" >&5
++echo "configure:1989: checking for pseudo ttys" >&5
+ if test -c /dev/getpty && test $ac_cv_func_getpseudotty = yes
+ then
+ cat >> confdefs.h <<\EOF
+--- zssh-1.5c.debian.1.orig/config.h.in
++++ zssh-1.5c.debian.1/config.h.in
+@@ -79,6 +79,9 @@
+ /* Define if you have the <paths.h> header file. */
+ #undef HAVE_PATHS_H
+
++/* Define if you have the <pty.h> header file. */
++#undef HAVE_PTY_H
++
+ /* Define if you have the <readline/history.h> header file. */
+ #undef HAVE_READLINE_HISTORY_H
+