From nobody@FreeBSD.org  Wed Mar 24 16:16:33 2010
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 356DE1065676
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 24 Mar 2010 16:16:33 +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 247E68FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 24 Mar 2010 16:16:33 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o2OGGW0H092537
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 24 Mar 2010 16:16:32 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o2OGGW9b092536;
	Wed, 24 Mar 2010 16:16:32 GMT
	(envelope-from nobody)
Message-Id: <201003241616.o2OGGW9b092536@www.freebsd.org>
Date: Wed, 24 Mar 2010 16:16:32 GMT
From: Grzegorz Blach <magik@roorback.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: some of usefull tweaks for editors/jed
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         145006
>Category:       ports
>Synopsis:       some of usefull tweaks for editors/jed
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    garga
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 24 16:20:05 UTC 2010
>Closed-Date:    Tue Apr 06 12:43:12 UTC 2010
>Last-Modified:  Tue Apr  6 12:50:03 UTC 2010
>Originator:     Grzegorz Blach
>Release:        8-STABLE
>Organization:
>Environment:
FreeBSD silver.nine 8.0-STABLE FreeBSD 8.0-STABLE #0 r205348: Sat Mar 20 03:26:16 CET 2010     root@silver.nine:/usr/obj/usr/src/sys/SILVER  amd64

>Description:
I added two option for jed:

1) Respect permissions by Root - if disabled, this allow editing readonly files when jed is called by root

2) Look-up for hostname - if disabled, jed won't lookup for fqdn, which is used for creating lock files on nfs, but will freeze jed on startup for several second when dns server is not available.

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN jed.old/Makefile jed/Makefile
--- jed.old/Makefile	2009-12-21 15:53:01.000000000 +0100
+++ jed/Makefile	2010-03-24 17:05:58.278826086 +0100
@@ -7,7 +7,7 @@
 
 PORTNAME=	jed
 PORTVERSION=	0.99.19
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	editors
 MASTER_SITES=	ftp://space.mit.edu/pub/davis/jed/v${PORTVERSION:R}/ \
 		ftp://ftp.uni-stuttgart.de/pub/unix/misc/slang/jed/v${PORTVERSION:R}/ \
@@ -22,7 +22,9 @@
 
 CONFLICTS=	jed-devel-[0-9]*
 
-OPTIONS=	X11 "Build xjed (depends of X11)" on
+OPTIONS=	X11 "Build xjed (depends of X11)" on \
+		PERMS "Respect permissions by Root" on \
+		HOSTLOOKUP "Look-up for hostname" on
 
 USE_BZIP2=	yes
 DIST_SUBDIR=	jed
@@ -54,6 +56,11 @@
 PLIST_SUB+=	XJED=""
 .endif
 
+.if defined(WITHOUT_HOSTLOOKUP)
+HOSTNAME!=	hostname
+CFLAGS+=	-DJED_HOSTNAME=\\\"${HOSTNAME}\\\"
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e 's,(DEST_JED_ROOT)/doc,(DEST_DOC_DIR),g' \
 			  -e 's,\.\./info/\*,,' \
@@ -63,6 +70,9 @@
 	@${REINPLACE_CMD} -e '/MKINSDIR.*DEST_DOC_DIR/d' \
 		${WRKSRC}/src/Makefile.in
 .endif
+.if defined(WITHOUT_PERMS)
+	@${REINPLACE_CMD} 's|jed_file_is_readonly (file, 1)|jed_file_is_readonly (file, 0)|' ${WRKSRC}/src/file.c
+.endif
 
 post-configure:
 	@${REINPLACE_CMD} -e 's,\(.usr.bin.install\) *-c,\1 -s -m 555,' \


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->garga 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Mar 24 16:20:14 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=145006 
State-Changed-From-To: open->closed 
State-Changed-By: garga 
State-Changed-When: Tue Apr 6 12:43:11 UTC 2010 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/145006: commit references a PR
Date: Tue,  6 Apr 2010 12:43:03 +0000 (UTC)

 garga       2010-04-06 12:42:49 UTC
 
   FreeBSD ports repository
 
   Modified files:
     editors/jed          Makefile 
   Added files:
     editors/jed/files    extra-patch-src__userinfo.c 
   Log:
   Add 2 more OPTIONS to respect read-only files and don't try to host lookup
   
   PR:             ports/145006
   Submitted by:   Grzegorz Blach <magik@roorback.net>
   
   Revision  Changes    Path
   1.42      +16 -2     ports/editors/jed/Makefile
   1.1       +12 -0     ports/editors/jed/files/extra-patch-src__userinfo.c (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:
