From leeym@utopia.leeym.com  Thu May 20 02:46:48 2004
Return-Path: <leeym@utopia.leeym.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 00DA916A4CF
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 20 May 2004 02:46:44 -0700 (PDT)
Received: from utopia.leeym.com (utopia.leeym.com [211.21.137.52])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D640743D46
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 20 May 2004 02:46:42 -0700 (PDT)
	(envelope-from leeym@utopia.leeym.com)
Received: from localhost (localhost [127.0.0.1])
	by utopia.leeym.com (Postfix) with ESMTP id 5FEC03EB2AC
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 20 May 2004 17:46:34 +0800 (CST)
Received: from utopia.leeym.com ([127.0.0.1])
 by localhost (utopia.leeym.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id 60713-01 for <FreeBSD-gnats-submit@freebsd.org>;
 Thu, 20 May 2004 17:46:28 +0800 (CST)
Received: by utopia.leeym.com (Postfix, from userid 1000)
	id 4AFA43EB2AA; Thu, 20 May 2004 17:46:27 +0800 (CST)
Message-Id: <20040520094627.4AFA43EB2AA@utopia.leeym.com>
Date: Thu, 20 May 2004 17:46:27 +0800 (CST)
From: Yen-Ming Lee <leeym@utopia.leeym.com>
Reply-To: Yen-Ming Lee <leeym@utopia.leeym.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: fix port: secirity/sfs
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         66933
>Category:       ports
>Synopsis:       fix port: secirity/sfs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pav
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 20 02:50:27 PDT 2004
>Closed-Date:    Fri May 21 16:29:55 PDT 2004
>Last-Modified:  Fri May 21 16:29:55 PDT 2004
>Originator:     Yen-Ming Lee
>Release:        FreeBSD 5.2.1-RELEASE-p6 i386
>Organization:
>Environment:
System: FreeBSD utopia.leeym.com 5.2.1-RELEASE-p6 FreeBSD 5.2.1-RELEASE-p6 #94: Mon May 17 05:16:45 CST 2004 root@utopia.leeym.com:/usr/obj/usr/src/sys/UTOPIA i386


	
>Description:

- add files/patch-nfsclient and unbreak this port
- use UID/GID other than 71:71 which is registered by oracle already
- add USE_LIBTOOL and remove *.la in PLIST
- minor fixes in PLIST

>How-To-Repeat:
	
>Fix:

	

--- sfs.diff begins here ---
diff -ruN --exclude CVS /usr/ports/security/sfs/Makefile sfs/Makefile
--- /usr/ports/security/sfs/Makefile	Wed Feb  4 15:27:10 2004
+++ sfs/Makefile	Thu May 20 09:42:59 2004
@@ -20,7 +20,7 @@
 INFO=		sfs
 
 USE_GMAKE=	yes
-
+USE_LIBTOOL=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS+=--with-sfsuser=sfs \
 		--with-sfsgroup=sfs \
@@ -30,13 +30,9 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} >= 500113
-BROKEN=		"Does not compile on FreeBSD ${OSVERSION}"
-.endif
-
 .if ${OSVERSION} > 500000
 LIB_DEPENDS+=	gmp.6:${PORTSDIR}/math/libgmp4
-CONFIGURE_ARGS+=--with-gmp=${PREFIX}
+CONFIGURE_ARGS+=--with-gmp=${LOCALBASE}
 .else
 CONFIGURE_ARGS+=--with-gmp=/usr
 .endif
diff -ruN --exclude CVS /usr/ports/security/sfs/files/patch-nfsclient sfs/files/patch-nfsclient
--- /usr/ports/security/sfs/files/patch-nfsclient	Thu Jan  1 08:00:00 1970
+++ sfs/files/patch-nfsclient	Wed May 19 22:43:53 2004
@@ -0,0 +1,20 @@
+--- nfsconf.h.orig	Wed May 19 22:42:39 2004
++++ nfsconf.h	Wed May 19 22:43:24 2004
+@@ -33,6 +33,7 @@
+ # include <nfs/nfs.h>
+ #endif /* NEED_NFS_NFS_H */
+ #if NEED_NFSCLIENT_NFS_H
++# include <nfs/nfsproto.h>
+ # include <nfsclient/nfs.h>
+ #endif /* NEED_NFSCLIENT_NFS_H */
+ #if NEED_NFS_MOUNT_H
+--- configure.orig	Wed May 19 22:43:05 2004
++++ configure	Wed May 19 22:41:46 2004
+@@ -9661,6 +9661,7 @@
+ 	cat >conftest.$ac_ext <<_ACEOF
+ #line 9662 "configure"
+ #include "confdefs.h"
++#include <nfs/nfsproto.h>
+ #include <nfsclient/nfs.h>
+ 
+ _ACEOF
diff -ruN --exclude CVS /usr/ports/security/sfs/pkg-install sfs/pkg-install
--- /usr/ports/security/sfs/pkg-install	Thu Jan  2 18:02:06 2003
+++ sfs/pkg-install	Thu May 20 11:42:06 2004
@@ -8,8 +8,8 @@
 
 USER=sfs
 GROUP=sfs
-UID=71
-GID=71
+UID=171
+GID=171
 PW=/usr/sbin/pw
 
 SFSDIR=/var/spool/sfs
diff -ruN --exclude CVS /usr/ports/security/sfs/pkg-plist sfs/pkg-plist
--- /usr/ports/security/sfs/pkg-plist	Sun Oct  5 10:21:12 2003
+++ sfs/pkg-plist	Thu May 20 10:26:43 2004
@@ -11,6 +11,7 @@
 etc/rc.d/sfscd.sh.sample
 @unexec if [ -f %D/etc/rc.d/sfssd.sh ]; then cmp -s %D/etc/rc.d/sfssd.sh.sample %D/etc/rc.d/sfssd.sh && rm -f %D/etc/rc.d/sfssd.sh || echo "${PKG_PREFIX}/etc/rc.d/sfssd.sh is different than distribution sample, leaving for manual cleanup." | fmt; fi
 etc/rc.d/sfssd.sh.sample
+etc/sfs/sfs_host_key
 etc/sfs/sfsrwsd_config.sample
 include/sfs
 include/sfs.h
@@ -136,15 +137,10 @@
 lib/sfs-%%SFS_VERSION%%/aiod
 lib/sfs-%%SFS_VERSION%%/connect
 lib/sfs-%%SFS_VERSION%%/libarpc.a
-lib/sfs-%%SFS_VERSION%%/libarpc.la
 lib/sfs-%%SFS_VERSION%%/libasync.a
-lib/sfs-%%SFS_VERSION%%/libasync.la
 lib/sfs-%%SFS_VERSION%%/libsfscrypt.a
-lib/sfs-%%SFS_VERSION%%/libsfscrypt.la
 lib/sfs-%%SFS_VERSION%%/libsfsmisc.a
-lib/sfs-%%SFS_VERSION%%/libsfsmisc.la
 lib/sfs-%%SFS_VERSION%%/libsvc.a
-lib/sfs-%%SFS_VERSION%%/libsvc.la
 lib/sfs-%%SFS_VERSION%%/listen
 lib/sfs-%%SFS_VERSION%%/mallock.o
 lib/sfs-%%SFS_VERSION%%/moduled
@@ -158,9 +154,7 @@
 lib/sfs-%%SFS_VERSION%%/sfsrwcd
 lib/sfs-%%SFS_VERSION%%/sfsrwsd
 lib/sfs-%%SFS_VERSION%%/upgradedb.pl
-@group sfs
 lib/sfs-%%SFS_VERSION%%/suidconnect
-@group
 lib/sfs-%%SFS_VERSION%%/ttyd
 lib/sfs-%%SFS_VERSION%%/xfer
 @dirrm lib/sfs-%%SFS_VERSION%%
@@ -168,15 +162,16 @@
 sbin/sfscd
 sbin/sfssd
 sbin/vidb
-share/doc/sfs/WELCOME
-share/doc/sfs/README
-share/doc/sfs/README.packageblurb
-share/doc/sfs/README.0.7-upgrade
-@dirrm share/doc/sfs
+%%DOCSDIR%%/WELCOME
+%%DOCSDIR%%/README
+%%DOCSDIR%%/README.packageblurb
+%%DOCSDIR%%/README.0.7-upgrade
+@dirrm %%DOCSDIR%%
 share/sfs/agentrc
 share/sfs/sfs_config
 share/sfs/sfs_srp_parms
 share/sfs/sfsauthd_config
 share/sfs/sfscd_config
 share/sfs/sfssd_config
+@dirrm etc/sfs
 @dirrm share/sfs
--- sfs.diff ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: pav 
State-Changed-When: Fri May 21 15:43:56 PDT 2004 
State-Changed-Why:  
Asked maintainer for approval. 


Responsible-Changed-From-To: freebsd-ports-bugs->pav 
Responsible-Changed-By: pav 
Responsible-Changed-When: Fri May 21 15:43:56 PDT 2004 
Responsible-Changed-Why:  
Handle 

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

From: Pav Lucistnik <pav@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org, leeym@utopia.leeym.com,
	handler@grendel.net
Cc:  
Subject: Re: ports/66933: fix port: secirity/sfs
Date: Sat, 22 May 2004 00:43:53 +0200

 Dear maintainer of FreeBSD port security/sfs, please take a look at
 
 http://www.freebsd.org/cgi/query-pr.cgi?q=66933
 
 Do you approve this patch?
 
 -- 
 Pav Lucistnik <pav@oook.cz>
               <pav@FreeBSD.org>
 
 An arrow (+0,+0) {@f0} finds a mark. It dies.

From: Michael Handler <handler@grendel.net>
To: Pav Lucistnik <pav@FreeBSD.org>
Cc: freebsd-gnats-submit@FreeBSD.org, leeym@utopia.leeym.com
Subject: Re: ports/66933: fix port: secirity/sfs
Date: Fri, 21 May 2004 19:07:43 -0400

 > http://www.freebsd.org/cgi/query-pr.cgi?q=66933
 
 I have no problem with the LIBTOOL/remove *.la portion, or the
 PREFIX vs LOCALBASE fix, or the DOCSDIR portion.
 
 The nfsconf.h patch looks fine, but does it break compilation on
 4.*? I can test if the submitter hasn't, it just takes 30+ minutes
 to compile SFS on my 4.* machine.
 
 Re: the uid/gid change, I don't have any real objection, but is
 there a registry for these things I'm not aware of, so we can change
 the UID/GID once and not deal with it again? I looked around when
 I was writing the port, and I didn't find any.
 
 I reject the following portions of the plist patch:
 
 1) adding etc/sfs/sfs_host_key to the packing list. This file is
    unique per host and precious -- it shouldn't be packaged, and
    it certainly shouldn't be removed when the package is uninstalled,
    that would change the advertised SFS path. (Just like an ssh
    host key.) Correspondingly, the rmdir of etc/sfs is rejected as
    well; it'll always fail due to the existence of sfs_host_key.
 
    Note that pkg-deinstall attempts an rmdir of etc/sfs and prints
    a message suggesting that the administrator investigate the contents
    and remove the directory if they're done with SFS for good. (Rather
    than just temporarily removing the package to upgrade it.)
 
 2) The @group statements wrapping suidconnect are necessary
    to preserve the correct gid ownership of the file (it's setgid)
    when installing from a package tarball.
 
 Other than that, looks good, thanks for the work. I don't have a
 stable 5.* machine to test on right now, which is why I haven't
 fixed it.
 
 -- 
 michael handler
 washington, dc
State-Changed-From-To: feedback->closed 
State-Changed-By: pav 
State-Changed-When: Fri May 21 16:29:33 PDT 2004 
State-Changed-Why:  
Committed with respect to feedback stated by maintainer 

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