Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Dec 2013 20:09:56 GMT
From:      Roman Bogorodskiy <novel@FreeBSD.org>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        Eric Blake <eblake@redhat.com>
Subject:   ports/184479: [ patch ] devel/autoconf-wrapper: fix lost stderr
Message-ID:  <201312032009.rB3K9urv094969@freefall.freebsd.org>
Resent-Message-ID: <201312032020.rB3KK0lW097785@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         184479
>Category:       ports
>Synopsis:       [ patch ] devel/autoconf-wrapper: fix lost stderr
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 03 20:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Roman Bogorodskiy
>Release:        FreeBSD 11.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD freefall.freebsd.org 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r258818: Sun Dec 1 23:20:44 UTC 2013 peter@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL amd64


	
>Description:
	Autoconf tools could be used with pipe. For example,
        fresh autopoint from gettext uses autom4te this way:

         http://git.savannah.gnu.org/cgit/gettext.git/commit/gettext-tools/misc/autopoint.in?id=eea2dddde35037d25b3f240ab95836b6adeaf517

        As the wrapper currently eats stdin, autopoint doesn't work. It
        causes problems bootstrapping projects, e.g. I got this error
        with libvirt:

       (22:54) novel@dev:~/code/libvirt[master] %> ./autogen.sh
	I am going to run ./configure with no arguments - if you wish
	to pass any to it, please specify them on the ./autogen.sh command line.
	running bootstrap...
	./bootstrap: Bootstrapping from checked-out libvirt sources...
	./bootstrap: consider installing git-merge-changelog from gnulib
	./bootstrap: getting gnulib files...
	./bootstrap: autopoint --force
	autopoint: *** Missing version: please specify in configure.ac through a line 'AM_GNU_GETTEXT_VERSION(x.yy.zz)' the gettext version the package is using
	autopoint: *** Stop.
	Failed to bootstrap, please investigate.
	(22:54) novel@dev:~/code/libvirt[master] %>

	Attached patch fixes problem for me.	 
>How-To-Repeat:
	
>Fix:

	

--- autoconf-wrapper-stdin-fix.diff begins here ---
Index: Makefile
===================================================================
--- Makefile	(revision 335590)
+++ Makefile	(working copy)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PORTNAME?=	autoconf-wrapper
-PORTVERSION=	20130530
+PORTVERSION=	20131203
 CATEGORIES=	devel
 MASTER_SITES=	# none
 DISTFILES=	# none
Index: files/autotools-wrapper.sh
===================================================================
--- files/autotools-wrapper.sh	(revision 335590)
+++ files/autotools-wrapper.sh	(working copy)
@@ -31,6 +31,8 @@
 bindir=%%PREFIX%%/bin
 tool=$(basename $0)
 
+exec 4<&0
+
 error() {
 	echo "$@" 1>&2
 	exit 1
@@ -85,5 +87,6 @@
 	    "(${bindir}/${tool}-${selected_version})" 1>&2
 fi
 
+exec 0<&4 4<&-
 exec ${bindir}/${tool}-${selected_version} "$@"
 }
--- autoconf-wrapper-stdin-fix.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312032009.rB3K9urv094969>