From nobody@FreeBSD.org  Sun Apr 12 19:22:10 2009
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 037EE1065675
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 12 Apr 2009 19:22:10 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id E48D58FC1E
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 12 Apr 2009 19:22:09 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n3CJM9Nq095416
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 12 Apr 2009 19:22:09 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n3CJM9Yp095415;
	Sun, 12 Apr 2009 19:22:09 GMT
	(envelope-from nobody)
Message-Id: <200904121922.n3CJM9Yp095415@www.freebsd.org>
Date: Sun, 12 Apr 2009 19:22:09 GMT
From: Alex Povolotsky <tarkhil@over.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ports/dirvish does not work with non-Bourne shells 
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         133667
>Category:       ports
>Synopsis:       ports/dirvish does not work with non-Bourne shells
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wxs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 12 19:30:01 UTC 2009
>Closed-Date:    Tue Apr 14 16:03:07 UTC 2009
>Last-Modified:  Tue Apr 14 16:20:04 UTC 2009
>Originator:     Alex Povolotsky
>Release:        6.2-RELEASE-p7
>Organization:
>Environment:
FreeBSD services-new.iile.ru 6.2-RELEASE-p7 FreeBSD 6.2-RELEASE-p7 #1: Tue Jun  3 17:08:02 MSD 2008     tarkhil@services-new.iile.ru:/usr/obj/usr/src/sys/SERVICES  i386

>Description:
When dirvish calls scripts on remote machines, it silently assumes that the only possible shell is Bourne, so environment variables are passed like 

VAR=value VAR2=value2

in case of C-shell, default for root in FreeBSD, it's wrong.
>How-To-Repeat:
Call any remote script from dirvish
>Fix:
Apply a trivial patch, prepending variables list with "env"



Patch attached with submission follows:

--- ./dirvish.pl.orig	Sun Apr 12 10:37:17 2009
+++ ./dirvish.pl	Sun Apr 12 10:37:40 2009
@@ -935,14 +935,14 @@
 #	if ($A{dir} =~ /^:/)
 	if ($A{dir} !~ /^:/)
 	{
-		$rcmd = sprintf ("%s 'cd %s; %s %s' >>%s",
+		$rcmd = sprintf ("%s 'cd %s; env %s %s' >>%s",
 			("$A{shell}" || "/bin/sh -c"),
 			$A{dir}, $A{env},
 			$cmd,
 			$A{log}
 		);
 	} else {
-		$rcmd = sprintf ("%s '%s %s' >>%s",
+		$rcmd = sprintf ("%s 'env %s %s' >>%s",
 			("$A{shell}" || "/bin/sh -c"),
 			$A{env},
 			$cmd,


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->wxs 
Responsible-Changed-By: wxs 
Responsible-Changed-When: Mon Apr 13 13:06:03 UTC 2009 
Responsible-Changed-Why:  
I'll take it. 

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

From: Wesley Shields <wxs@FreeBSD.org>
To: Alex Povolotsky <tarkhil@over.ru>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/133667: ports/dirvish does not work with non-Bourne
	shells
Date: Mon, 13 Apr 2009 09:18:47 -0400

 This port is currently unmaintained.  Would you like to maintain it?
 
 -- WXS
State-Changed-From-To: open->closed 
State-Changed-By: wxs 
State-Changed-When: Tue Apr 14 16:02:22 UTC 2009 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/133667: commit references a PR
Date: Tue, 14 Apr 2009 16:13:54 +0000 (UTC)

 wxs         2009-04-14 16:02:11 UTC
 
   FreeBSD ports repository
 
   Modified files:
     sysutils/dirvish     Makefile distinfo 
   Added files:
     sysutils/dirvish/files patch-dirvish.pl 
   Log:
   - Distfile was rereolled (only changes are to version strings)
   - Fix bug where only bourne shells are assumed [1]
   - Pass maintainer to submitter
   
   PR:             [1]: ports/133667
   Submitted by:   Alex Povolotsky <tarkhil@over.ru>
   Approved by:    portmgr (flz)
   
   Revision  Changes    Path
   1.7       +3 -1      ports/sysutils/dirvish/Makefile
   1.4       +3 -3      ports/sysutils/dirvish/distinfo
   1.1       +19 -0     ports/sysutils/dirvish/files/patch-dirvish.pl (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:
