From nobody@FreeBSD.org  Wed Jan 13 03:40:14 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 7F95A1065672
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 13 Jan 2010 03:40:14 +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 548D08FC14
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 13 Jan 2010 03:40:14 +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 o0D3eEsP037845
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 13 Jan 2010 03:40:14 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o0D3eEUe037844;
	Wed, 13 Jan 2010 03:40:14 GMT
	(envelope-from nobody)
Message-Id: <201001130340.o0D3eEUe037844@www.freebsd.org>
Date: Wed, 13 Jan 2010 03:40:14 GMT
From: Rob Farmer <rfarmer@predatorlabs.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] shells/scponly Fix rc.d script, fix build with new gcc, take maintainership
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         142764
>Category:       ports
>Synopsis:       [PATCH] shells/scponly Fix rc.d script, fix build with new gcc, take maintainership
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pgollucci
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 13 03:50:01 UTC 2010
>Closed-Date:    Fri Jan 15 02:44:14 UTC 2010
>Last-Modified:  Fri Jan 15 02:50:03 UTC 2010
>Originator:     Rob Farmer
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD amethyst.predatorlabs.net 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r202069: Mon Jan 11 00:32:29 PST 2010     rfarmer@amethyst.predatorlabs.net:/usr/obj/usr/src/sys/AMETHYST  i386
>Description:
* Fix rc.d script for chroot functionality (thanks to Doug Barton for help with this)
* Switch an empty #elif to #else to please GCC 4.4
* Take maintainership
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN scponly.old/Makefile scponly/Makefile
--- scponly.old/Makefile	2010-01-05 21:00:50.000000000 -0800
+++ scponly/Makefile	2010-01-05 21:02:46.000000000 -0800
@@ -71,13 +71,14 @@
 
 PORTNAME=	scponly
 PORTVERSION=	4.8
+PORTREVISION=	1
 CATEGORIES=	shells security
 MASTER_SITES=	http://www.sublimation.org/scponly/ \
 		SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
 
 EXTRACT_SUFX=	.tgz
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	rfarmer@predatorlabs.net
 COMMENT=	A tiny shell that only permits scp and sftp
 
 MAN8=		scponly.8
diff -ruN scponly.old/files/patch-helper.c scponly/files/patch-helper.c
--- scponly.old/files/patch-helper.c	1969-12-31 16:00:00.000000000 -0800
+++ scponly/files/patch-helper.c	2010-01-05 21:06:49.000000000 -0800
@@ -0,0 +1,11 @@
+--- helper.c.orig	2010-01-05 21:06:05.000000000 -0800
++++ helper.c	2010-01-05 21:06:18.000000000 -0800
+@@ -230,7 +230,7 @@
+ 						return 1;
+ 					}
+ 				}
+-#elif
++#else
+ 				/*
+ 				 * make sure that processing doesn't continue if we can't validate a rsync check
+ 				 * and if the getopt flag is set.
diff -ruN scponly.old/files/scponlyc.in scponly/files/scponlyc.in
--- scponly.old/files/scponlyc.in	2010-01-05 21:00:50.000000000 -0800
+++ scponly/files/scponlyc.in	2010-01-06 00:15:53.000000000 -0800
@@ -33,12 +33,15 @@
 	# devfs created. If ~/dev exists, it will be deleted.
 
 	eval DEV="~$1/dev"
-	while /sbin/umount "${DEV}" 2>/dev/null; do :; done
-	/bin/rm -rf "${DEV}"
+	if /sbin/mount | grep "${DEV}" >/dev/null 2>&1; then
+		/sbin/umount "${DEV}" 2>/dev/null
+	fi
+	/bin/rmdir "${DEV}" || err 1 "Unable to remove $DEV"
 	/bin/mkdir -p "${DEV}"
-	if /sbin/mount -t devfs dev "${DEV}"; then
-		/sbin/devfs -m "${DEV}" rule -s 1 applyset && \
-		/sbin/devfs -m "${DEV}" rule -s 2 applyset || \
+	devfs_domount "${DEV}"
+	if devfs_init_rulesets; then
+		devfs_apply_ruleset "devfsrules_hide_all" "${DEV}" && \
+		devfs_apply_ruleset "devfsrules_unhide_basic" "${DEV}" || \
 		/sbin/umount "${DEV}" 2>/dev/null
 	fi
 }


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->pgollucci 
Responsible-Changed-By: pgollucci 
Responsible-Changed-When: Wed Jan 13 04:38:25 UTC 2010 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=142764 
State-Changed-From-To: open->closed 
State-Changed-By: pgollucci 
State-Changed-When: Fri Jan 15 02:44:13 UTC 2010 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/142764: commit references a PR
Date: Fri, 15 Jan 2010 02:44:14 +0000 (UTC)

 pgollucci    2010-01-15 02:44:01 UTC
 
   FreeBSD ports repository
 
   Modified files:
     shells/scponly       Makefile 
     shells/scponly/files scponlyc.in 
   Added files:
     shells/scponly/files patch-helper.c 
   Log:
   - Fix rc.d script for chroot functionality (thanks to Doug Barton for help with this)
   - Switch an empty #elif to #else to please GCC 4.4
   - Submitter is now MAINTAINER
   
   PR:             ports/142764
   Submitted by:   Rob Farmer <rfarmer@predatorlabs.net>
   
   Revision  Changes    Path
   1.33      +2 -1      ports/shells/scponly/Makefile
   1.3       +11 -0     ports/shells/scponly/files/patch-helper.c (new)
   1.3       +9 -6      ports/shells/scponly/files/scponlyc.in
 _______________________________________________
 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:
