Package: dejagnu
Version: 1.4.4.cvs20060709-4
Tags: patch

dejagnu's debian/rules says this:
    DEB_MAKE_CHECK_TARGET = check < /dev/tty
However, that doesn't work in autopkgtest and in other similar
situations where no tty is available.  Package building should not
depend on a controlling terminal.

The attached patch makes this work properly.  I think (but am not
sure) that it will only work with a version of expect which has the
fix for #440818.

The resulting code is a bit of a kludge unfortunately.  It would be
nice if someone upstream who actually understood how all this is
supposed to work could be persuaded to look at it.  The easiest way to
reproduce the underlying problem is to run `runtest' from dejagnu with
stdin redirected from /dev/null.

Regards,
Ian.

diff -rU10 orig/dejagnu-1.4.4.cvs20060709/Makefile.in 
dejagnu-1.4.4.cvs20060709/Makefile.in
--- orig/dejagnu-1.4.4.cvs20060709/Makefile.in  2006-07-09 19:47:09.000000000 
+0100
+++ dejagnu-1.4.4.cvs20060709/Makefile.in       2007-09-04 15:50:55.000000000 
+0100
@@ -837,26 +837,27 @@
 
 GTAGS:
        here=`$(am__cd) $(top_builddir) && pwd` \
          && cd $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) $$here
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 check-DEJAGNU: site.exp
-       srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
+       set -e; srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \
        EXPECT=$(EXPECT); export EXPECT; \
        runtest=$(RUNTEST); \
+       rm -f silly-stdin-fifo; mkfifo -m600 silly-stdin-fifo; \
        if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
          l='$(DEJATOOL)'; for tool in $$l; do \
-           $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) 
$(RUNTESTFLAGS); \
+           $$runtest $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS) 
0<>silly-stdin-fifo; \
          done; \
        else echo "WARNING: could not find \`runtest'" 1>&2; :;\
        fi
 site.exp: Makefile
        @echo 'Making a new site.exp file...'
        @echo '## these variables are automatically generated by make ##' 
>site.tmp
        @echo '# Do not edit here.  If you wish to override these values' 
>>site.tmp
        @echo '# edit the last section' >>site.tmp
        @echo 'set srcdir $(srcdir)' >>site.tmp
        @echo "set objdir `pwd`" >>site.tmp
Only in dejagnu-1.4.4.cvs20060709: Makefile.in~
diff -rU10 orig/dejagnu-1.4.4.cvs20060709/debian/changelog 
dejagnu-1.4.4.cvs20060709/debian/changelog
--- orig/dejagnu-1.4.4.cvs20060709/debian/changelog     2007-09-04 
15:54:11.000000000 +0100
+++ dejagnu-1.4.4.cvs20060709/debian/changelog  2007-09-04 16:21:17.000000000 
+0100
@@ -1,10 +1,23 @@
+dejagnu (1.4.4.cvs20060709-4ubuntu1) gutsy; urgency=low
+
+  * Allow building with no /dev/tty (LP: #127192):
+    - Pass /dev/null instead of /dev/tty as stdin for make check.
+    - In Makefile.in's check-DEJAGNU target, create a fifo and use
+      that as the stdin for runtest.  NB we have to not pass it
+      via bash as bash seems to replace it with a copy of /dev/null
+      which doesn't work (which I think is itself a bug).
+    - Build-Depend on the version of expect which doesn't accidentally
+      close fd 1 and leave it unused.  (See Debian #440818.)
+
+ -- Ian Jackson <[EMAIL PROTECTED]>  Tue, 04 Sep 2007 16:13:11 +0100
+
 dejagnu (1.4.4.cvs20060709-4) unstable; urgency=low
 
   * Correct some documentation typos (Closes: #376261, #328953).
   * Include install-sh in the example (Closes: #144440).
   * Include xpass and xfail in dejagnu.h, from upstream (Closes: #268391).
   * Run make check during package build.
   * Fix all the problems that turned up during make check, including silly
     typos in the xpass and xfail support.
   * Set binary encoding for diff (Closes: #394984).
   * Update build dependencies for tetex-bin -> texlive.
Only in dejagnu-1.4.4.cvs20060709/debian: changelog~
diff -rU10 orig/dejagnu-1.4.4.cvs20060709/debian/control 
dejagnu-1.4.4.cvs20060709/debian/control
--- orig/dejagnu-1.4.4.cvs20060709/debian/control       2007-09-04 
15:54:11.000000000 +0100
+++ dejagnu-1.4.4.cvs20060709/debian/control    2007-09-04 16:09:34.000000000 
+0100
@@ -1,17 +1,17 @@
 Source: dejagnu
 Section: devel
 Priority: optional
 Maintainer: Daniel Jacobowitz <[EMAIL PROTECTED]>
 Standards-Version: 3.7.2
 Build-Depends: cdbs (>= 0.4.17), quilt (>= 0.30-1), debhelper (>= 5)
-Build-Depends-Indep: texinfo, jade, docbook-utils, docbook-xml, texlive-base, 
imagemagick, gs-common, transfig, expect
+Build-Depends-Indep: texinfo, jade, docbook-utils, docbook-xml, texlive-base, 
imagemagick, gs-common, transfig, expect (>= 5.43.0-8ubuntu1)
 
 Package: dejagnu
 Architecture: all
 Depends: expect
 Description: framework for running test suites on software tools
  DejaGnu is a framework for testing other programs.  Its purpose is to
  provide a single front end for all tests.
  .
  DejaGnu provides a layer of abstraction which allows you to write
  tests that are portable to any host or target where a program must
Only in dejagnu-1.4.4.cvs20060709/debian: control~
diff -rU10 orig/dejagnu-1.4.4.cvs20060709/debian/rules 
dejagnu-1.4.4.cvs20060709/debian/rules
--- orig/dejagnu-1.4.4.cvs20060709/debian/rules 2007-09-04 15:54:11.000000000 
+0100
+++ dejagnu-1.4.4.cvs20060709/debian/rules      2007-09-04 16:03:04.000000000 
+0100
@@ -13,21 +13,21 @@
 
 # Rather paranoid than sorry. Make the shell exit with an error if an
 # untested command fails.
 SHELL += -e
 
 DEB_MAKE_BUILD_TARGET = all html dejagnu.pdf dejagnu.rtf dejagnu.ps
 
 # Run tests.  If we do not force a TTY manually, pbuilder offers a pipe;
 # something provokes bash to close the pipe before starting expect, and
 # dejagnu blows up.
-DEB_MAKE_CHECK_TARGET = check < /dev/tty
+DEB_MAKE_CHECK_TARGET = check < /dev/null
 
 binary-install/dejagnu::
        install -d debian/dejagnu/etc/dejagnu
        install -m 644 debian/site.exp debian/dejagnu/etc/dejagnu/
 
        chmod -R a-x debian/dejagnu/usr/share/dejagnu
        chmod -R a+X debian/dejagnu/usr/share/dejagnu
        chmod a+x debian/dejagnu/usr/share/dejagnu/libexec/config.guess
 
        install -m 755 install-sh \
Only in dejagnu-1.4.4.cvs20060709/debian: rules~


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to