From nobody@FreeBSD.org  Mon Oct 24 02:21:45 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5E8CC1065675
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 24 Oct 2011 02:21:45 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 4E6CC8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 24 Oct 2011 02:21:45 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p9O2LirN066027
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 24 Oct 2011 02:21:44 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p9O2LiIs066026;
	Mon, 24 Oct 2011 02:21:44 GMT
	(envelope-from nobody)
Message-Id: <201110240221.p9O2LiIs066026@red.freebsd.org>
Date: Mon, 24 Oct 2011 02:21:44 GMT
From: Jan Mikkelsen <janm@transactionware.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: mail/dovecot2-antispam-plugin hangs fails when built without $HOME set and no ksh
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: dsh@bamus.cz

>Number:         161951
>Category:       ports
>Synopsis:       mail/dovecot2-antispam-plugin hangs fails when built without $HOME set and no ksh
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    scheidell
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 24 02:30:01 UTC 2011
>Closed-Date:    Sat Dec 03 18:27:12 UTC 2011
>Last-Modified:  Sat Dec  3 18:40:06 UTC 2011
>Originator:     Jan Mikkelsen
>Release:        8.2-p4
>Organization:
Transactionware
>Environment:
FreeBSD valhalla.transactionware.com 8.2-RELEASE-p4 FreeBSD 8.2-RELEASE-p4 #0: Fri Oct  7 18:19:51 EST 2011     root@valhalla.transactionware.com:/home/janm/p4/freebsd-image-std-2008.2/work/base-freebsd/home/janm/p4/freebsd-image-std-2008.2/FreeBSD/src/sys/GENERIC  amd64
>Description:
Building the mail/dovecot2-antispam-plugin port fails when ksh is not installed and $HOME is not set. Installing shells/pdksh makes the build hang rather than complete, so adding that as a build dependency does not help.

The cause is the txt2man script in the port that attempts to figure out whether it has a modern /bin/sh and feeds itself to ksh if it doesn't. FreeBSD has a modern /bin/sh and doesn't always have ksh, so the test can cause problems.

See attached patch for resolution.
>How-To-Repeat:
Attempt to build the port after clearing the environment. "sudo env - make package" in the port directory should be sufficient.

Build command that demonstrated  the problem was:

/usr/sbin/chroot /home/janm/p4/freebsd-image-std-2008.2/work/build-chroot \
 /usr/bin/env - \
 PATH=/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin \
 /bin/sh -cxe '
 cd /usr/ports/mail/dovecot2-antispam-plugin
 env NO_MTREE="true" make package WRKDIRPREFIX=/ports-work PKGFILE='/ports-packages/dovecot2-antispam-plugin-20101222.tbz' BATCH=yes NODEPENDS=yes PACKAGE_BUILDING=yes'
>Fix:
Put the following into mail/dovecot2-antispam-plugin/files/patch-txt2man 
*** doc/txt2man.orig	Fri Oct  7 17:45:27 2011
--- doc/txt2man	Fri Oct  7 17:45:35 2011
***************
*** 1,5 ****
  #!/bin/sh
- test "$HOME" = ~ || exec ksh $0 "$@"    # try ksh if sh too old (not yet POSIX)
  
  # Copyright (C) 2001, 2002, 2003 Marc Vertes
  
--- 1,4 ----


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Mon Oct 24 02:30:12 UTC 2011 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=161951 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: dsh@bamus.cz
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/161951: mail/dovecot2-antispam-plugin hangs fails when built without $HOME set and no ksh
Date: Mon, 24 Oct 2011 02:30:09 UT

 Maintainer of mail/dovecot2-antispam-plugin,
 
 Please note that PR ports/161951 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/161951
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
State-Changed-From-To: feedback->open  
State-Changed-By: scheidell 
State-Changed-When: Fri Dec 2 02:05:27 UTC 2011 
State-Changed-Why:  
I'll take it 


Responsible-Changed-From-To: freebsd-ports-bugs->scheidell  
Responsible-Changed-By: scheidell 
Responsible-Changed-When: Fri Dec 2 02:05:27 UTC 2011 
Responsible-Changed-Why:  
I'll take it 


http://www.freebsd.org/cgi/query-pr.cgi?pr=161951 
State-Changed-From-To: open->closed  
State-Changed-By: scheidell 
State-Changed-When: Sat Dec 3 18:24:29 UTC 2011 
State-Changed-Why:  
Added patch-for docs/txtman 

http://www.freebsd.org/cgi/query-pr.cgi?pr=161951 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/161951: commit references a PR
Date: Sat,  3 Dec 2011 18:31:25 +0000 (UTC)

 scheidell    2011-12-03 18:31:16 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail/dovecot2-antispam-plugin Makefile 
   Added files:
     mail/dovecot2-antispam-plugin/files patch-docs-txt2man 
   Log:
   - Patched txt2man because of an overly,unnessessary agressive test
   - without patch build would hang
   
   PR:             161951
   Submitted by:   janm@transactionware.com
   Approved by:    maintainer (timeout), gabor (mentor)
   Feature safe:   yes
   
   Revision  Changes    Path
   1.2       +3 -2      ports/mail/dovecot2-antispam-plugin/Makefile
   1.1       +10 -0     ports/mail/dovecot2-antispam-plugin/files/patch-docs-txt2man (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
