Package: xterm
Version: 210-3
Severity: important
Tags: patch fixed
Justification: fails to build from source

The debian/rules uses quilt(1) for batch management. Unfortunately
quilt by design always reads ~/.quiltrc which, makes the build process
not to work. User propbaly has defaults that are not suitable for the
build, like:

  QUILT_PATCHES="debian/quilt"

This causes target patch to fail:

    .PHONY: patch
    patch: $(STAMP_DIR)/patch
    $(STAMP_DIR)/patch: $(STAMP_DIR)/prepare
         .. push -a -v ...

The error log says "no series file" (due to QUILT_PATCHES pointing
elsewhere).

The fix is simple. Make quilt use debian/quiltrc so that it is not
dependent on the user's environment. Attached files in patch:

1. debian/quiltrc (new file)
2. debian/rules   (modified; fix included)

-----------------------------------------------------------------------
=== added file 'debian/quiltrc'
--- /dev/null   
+++ debian/quiltrc      
@@ -0,0 +1,1 @@
+QUILT_PATCHES="debian/patches"
\ No newline at end of file

=== modified file 'debian/rules'
--- debian/rules        
+++ debian/rules        
@@ -10,6 +10,10 @@
 
 # debhelper
 export DH_OPTIONS
+
+DEBQUILTRC = debian/quiltrc
+QUILTOPT   = --quiltrc $(DEBQUILTRC)
+QUILT     = quilt $(QUILTOPT)
 
 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
@@ -36,7 +40,8 @@
 
 STAMP_DIR:=stampdir
 
-DEBINSTALLTREE:=$(CURDIR)/debian/tmp
+DEBINSTALLTREE := $(CURDIR)/debian/tmp
+DEBRESIZE      := $(CURDIR)/debian/resize
 
 # Set up the $(STAMP_DIR) directory.
 .PHONY: stampdir
@@ -60,7 +65,7 @@
 patch: $(STAMP_DIR)/patch
 $(STAMP_DIR)/patch: $(STAMP_DIR)/prepare
        @echo -n "Applying patches... "
-       @if quilt push -a -v > $(STAMP_DIR)/log/patch 2>&1; then \
+       @if $(QUILT) push -a -v > $(STAMP_DIR)/log/patch 2>&1; then \
          echo "successful."; \
        else \
          echo "failed! (Check $(STAMP_DIR)/log/patch for details)"; \
@@ -74,7 +79,7 @@
 unpatch: 
        @if [ -e $(STAMP_DIR)/patches/applied-patches ]; then \
          echo -n "Unapplying patches... "; \
-         if quilt pop -a > $(STAMP_DIR)/log/unpatch 2>&1; then \
+         if $(QUILT) pop -a > $(STAMP_DIR)/log/unpatch 2>&1; then \
            echo " successful."; \
          else \
            echo " failed! (Check $(STAMP_DIR)/log/unpatch for details)"; \
@@ -116,7 +121,7 @@
        dh_installdirs
        # General installation
        $(MAKE) install mandir=/usr/share/man/man1 libdir=/etc manext=1x 
DESTDIR=$(DEBINSTALLTREE)
-       
+
        ## Install lxterm command and manual page.
        install -m 755 debian/local/lxterm $(DEBINSTALLTREE)/usr/bin
        install -m 755 debian/local/lxterm.1x 
$(DEBINSTALLTREE)/usr/share/man/man1
@@ -138,6 +143,15 @@
        # Lintian overrides.
        cp debian/xterm.overrides 
$(CURDIR)/debian/xterm/usr/share/lintian/overrides/xterm
 
+       #  Make resize separate package
+
+       install -d -m 755 $(DEBRESIZE)/usr/bin
+
+       (cd $(DEBINSTALLTREE) && \
+           tar -cf - $(find . -name "*resize*") | \
+           tar -C $(DEBRESIZE) -xf - )
+
+
 # Generate plain text XTerm FAQ from HTML.
 debian/local/xterm.faq.gz: debian/local/xterm.faq.html
        $(HTML2TEXT) $< >debian/local/xterm.faq
@@ -170,17 +184,17 @@
 patch-audit: prepare unpatch
        touch stampdir/log/patch; \
        FUZZY=no; \
-       while [ -n "`quilt next`" ]; do \
-         RESULT=`quilt push -v | tee -a stampdir/log/patch | grep ^Hunk | sed 
's/^Hunk.*\(succeeded\|FAILED\).*/\1/'`;\
+       while [ -n "`$(QUILT) next`" ]; do \
+         RESULT=`$(QUILT) push -v | tee -a stampdir/log/patch | grep ^Hunk | 
sed 's/^Hunk.*\(succeeded\|FAILED\).*/\1/'`;\
          case "$$RESULT" in \
            succeeded) \
-             echo "The patch is fuzzy: `quilt top`"; \
-                 echo "The patch is fuzzy: `quilt top`" > stampdir/log/`quilt 
top`; \
+             echo "The patch is fuzzy: `$(QUILT) top`"; \
+                 echo "The patch is fuzzy: `$(QUILT) top`" > 
stampdir/log/`$(QUILT) top`; \
              FUZZY=yes; \
            ;; \
            FAILED) \
-             echo "The patch is broken: `quilt next`"; \
-                 echo "The patch is fuzzy: `quilt next`" > stampdir/log/`quilt 
next`; \
+             echo "The patch is broken: `$(QUILT) next`"; \
+                 echo "The patch is fuzzy: `$(QUILT) next`" > 
stampdir/log/`$(QUILT) next`; \
              exit 1; \
            ;; \
          esac; \





-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.16-1-686
Locale: LANG=C, LC_CTYPE=C (charmap=ISO-8859-1) (ignored: LC_ALL set to en_US)

Versions of packages xterm depends on:
ii  libc6                         2.3.6-11   GNU C Library: Shared libraries
ii  libfontconfig1                2.3.2-5.1  generic font configuration library
ii  libice6                       1:1.0.0-3  X11 Inter-Client Exchange library
ii  libncurses5                   5.5-2      Shared libraries for terminal hand
ii  libsm6                        1:1.0.0-4  X11 Session Management library
ii  libx11-6                      2:1.0.0-6  X11 client-side library
ii  libxaw7                       1:1.0.1-5  X11 Athena Widget library
ii  libxext6                      1:1.0.0-4  X11 miscellaneous extension librar
ii  libxft2                       2.1.8.2-8  FreeType-based font drawing librar
ii  libxmu6                       1:1.0.1-3  X11 miscellaneous utility library
ii  libxt6                        1:1.0.0-5  X11 toolkit intrinsics library
ii  xbitmaps                      1.0.1-2    Base X bitmaps

Versions of packages xterm recommends:
ii  xutils                        1:7.0.0-3  X Window System utility programs

-- no debconf information


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

Reply via email to