From tijl@coosemans.org  Mon Apr  9 20:56:51 2012
Return-Path: <tijl@coosemans.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 15DFB1065674
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  9 Apr 2012 20:56:51 +0000 (UTC)
	(envelope-from tijl@coosemans.org)
Received: from mailrelay012.isp.belgacom.be (mailrelay012.isp.belgacom.be [195.238.6.179])
	by mx1.freebsd.org (Postfix) with ESMTP id 9875F8FC0A
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  9 Apr 2012 20:56:50 +0000 (UTC)
Received: from 211.90-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.90.211])
  by relay.skynet.be with ESMTP; 09 Apr 2012 22:55:29 +0200
Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1])
	by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id q39KtSuv012063
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 9 Apr 2012 22:55:29 +0200 (CEST)
	(envelope-from tijl@kalimero.tijl.coosemans.org)
Received: (from tijl@localhost)
	by kalimero.tijl.coosemans.org (8.14.5/8.14.5/Submit) id q39KtSDg012062;
	Mon, 9 Apr 2012 22:55:28 +0200 (CEST)
	(envelope-from tijl)
Message-Id: <201204092055.q39KtSDg012062@kalimero.tijl.coosemans.org>
Date: Mon, 9 Apr 2012 22:55:28 +0200 (CEST)
From: Tijl Coosemans <tijl@coosemans.org>
Reply-To: Tijl Coosemans <tijl@coosemans.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] sysutils/xfce4-utils: fix running/killing of gpg-agent
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         166803
>Category:       ports
>Synopsis:       [patch] sysutils/xfce4-utils: fix running/killing of gpg-agent
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    rene
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 09 21:00:32 UTC 2012
>Closed-Date:    Wed May 09 19:48:00 UTC 2012
>Last-Modified:  Wed May 09 19:48:00 UTC 2012
>Originator:     Tijl Coosemans
>Release:        FreeBSD 10.0-CURRENT i386
>Organization:
>Environment:
>Description:
Xfce xinitrc script runs gpg-agent when it is installed (security/gnupg),
but when the user uses csh as shell gpg-agent returns csh commands which
of course cannot be executed from an sh script like xinitrc.

The attached patch passes --sh to gpg-agent so it always returns sh
commands.
>How-To-Repeat:
Install security/gnupg and run startxfce4. You'll see errors about
setenv at startup and about kill at shutdown.
>Fix:
Patch to put in sysutils/xfce4-utils/files.

--- patch-scripts-xinitrc.in.in begins here ---
--- scripts/xinitrc.in.in.orig	2012-04-09 22:20:51.000000000 +0200
+++ scripts/xinitrc.in.in	2012-04-09 22:21:29.000000000 +0200
@@ -155,11 +155,11 @@
     case "$ssh_agent_type" in
         gpg-agent)
             if test -z "$SSH_AGENT_PID"; then
-                eval `gpg-agent --daemon --enable-ssh-support --write-env-file $XDG_CACHE_HOME/gpg-agent-info`
+                eval `gpg-agent --sh --daemon --enable-ssh-support --write-env-file $XDG_CACHE_HOME/gpg-agent-info`
                 ssh_agent_kill_cmd="kill -INT $SSH_AGENT_PID; rm -f $XDG_CACHE_HOME/gpg-agent-info"
             elif test -z "$GPG_AGENT_INFO"; then
                 echo "ssh-agent is already running; starting gpg-agent without ssh support"
-                eval `gpg-agent --daemon --write-env-file $XDG_CACHE_HOME/gpg-agent-info`
+                eval `gpg-agent --sh --daemon --write-env-file $XDG_CACHE_HOME/gpg-agent-info`
                 ssh_agent_kill_cmd="pkill -INT ^gpg-agent\$; rm -f $XDG_CACHE_HOME/gpg-agent-info"
             else
                 echo "gpg-agent is already running"
--- patch-scripts-xinitrc.in.in ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-xfce 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Apr 9 21:00:48 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: Rene Ladan <rene@freebsd.org>
To: bug-followup@FreeBSD.org, tijl@coosemans.org
Cc:  
Subject: Re: ports/166803: [patch] sysutils/xfce4-utils: fix running/killing
 of gpg-agent
Date: Mon, 07 May 2012 22:49:05 +0200

 I cannot find entries containing gpg, gnupg, or setenv in 
 /var/log/messages* (or maybe they got expunged). According to 
 gpg-agent(1), --sh forces the use of sh to format the output instead of 
 using the value of $SHELL, is this what you intend?

From: Tijl Coosemans <tijl@coosemans.org>
To: Rene Ladan <rene@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/166803: [patch] sysutils/xfce4-utils: fix running/killing
 of gpg-agent
Date: Mon, 07 May 2012 23:10:46 +0200

 On 07-05-2012 22:49, Rene Ladan wrote:
 > I cannot find entries containing gpg, gnupg, or setenv in
 > /var/log/messages* (or maybe they got expunged). According to
 > gpg-agent(1), --sh forces the use of sh to format the output instead of
 > using the value of $SHELL, is this what you intend?
 
 Yes, it's similar to the --sh-syntax flag of dbus-launch and the -s flag
 of ssh-agent, both of which the script already uses.
 
 FYI, I reported the problem upstream and they said 4.10 should be ok
 because it no longer uses a shell script:
 https://bugzilla.xfce.org/show_bug.cgi?id=8718
Responsible-Changed-From-To: freebsd-xfce->rene 
Responsible-Changed-By: rene 
Responsible-Changed-When: Wed May 9 19:39:22 UTC 2012 
Responsible-Changed-Why:  
Grab 

http://www.freebsd.org/cgi/query-pr.cgi?pr=166803 
State-Changed-From-To: open->closed 
State-Changed-By: rene 
State-Changed-When: Wed May 9 19:47:45 UTC 2012 
State-Changed-Why:  
Committed, thanks 

http://www.freebsd.org/cgi/query-pr.cgi?pr=166803 
>Unformatted:
