Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 2003 00:02:06 +0900 (JST)
From:      Hideyuki KURASHINA <rushani@FreeBSD.org>, Hideyuki KURASHINA <rushani@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        mharo@FreeBSD.org
Subject:   ports/58387: [PATCH] security/sudo: Utilize EXAMPLESDIR
Message-ID:  <20031023.000206.115643482.rushani@FreeBSD.org>
Resent-Message-ID: <200310221510.h9MFAJZx017664@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         58387
>Category:       ports
>Synopsis:       [PATCH] security/sudo: Utilize EXAMPLESDIR
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 22 08:10:19 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Hideyuki KURASHINA
>Release:        FreeBSD  5.1-RELEASE-p10 i386
>Organization:
>Environment:

	System: FreeBSD ***.*******.jp 5.1-RELEASE-p10 FreeBSD 5.1-RELEASE-p10 #1: Wed Oct 22 03:10:46 JST 2003
	
>Description:

	Utilize EXAMPLESDIR to improves layout; i.e.,

	  configuration file        -> ${PREFIX}/etc
	  sample configuration file -> ${PREFIX}/share/examples/${PORTNAME}

	This change helps if many configuration files and sample ones exist.

>How-To-Repeat:
	
>Fix:

	Apply following patch;

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/security/sudo/Makefile,v
retrieving revision 1.58
diff -u -r1.58 Makefile
--- Makefile	17 Jul 2003 04:49:47 -0000	1.58
+++ Makefile	22 Oct 2003 14:26:20 -0000
@@ -49,6 +49,7 @@
 	@${REINPLACE_CMD} -e 's|^|#|g' ${WRKSRC}/sample.sudoers
 
 post-install:
-	${INSTALL_DATA} ${WRKSRC}/sample.sudoers ${PREFIX}/etc/sudoers.sample
+	@${MKDIR} ${EXAMPLESDIR}
+	${INSTALL_DATA} ${WRKSRC}/sample.sudoers ${EXAMPLESDIR}/sudoers
 
 .include <bsd.port.post.mk>
Index: pkg-install
===================================================================
RCS file: /home/ncvs/ports/security/sudo/pkg-install,v
retrieving revision 1.2
diff -u -r1.2 pkg-install
--- pkg-install	21 Nov 2001 02:09:13 -0000	1.2
+++ pkg-install	22 Oct 2003 14:26:20 -0000
@@ -5,6 +5,6 @@
 if [ -e ${PKG_PREFIX}/etc/sudoers ]; then
   echo "Will not overwrite existing ${PKG_PREFIX}/etc/sudoers file."
 else
-  cp -p ${PKG_PREFIX}/etc/sudoers.sample ${PKG_PREFIX}/etc/sudoers
+  cp -p ${EXAMPLESDIR}/sudoers ${PKG_PREFIX}/etc/sudoers
   chmod 440 ${PKG_PREFIX}/etc/sudoers
 fi
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/security/sudo/pkg-plist,v
retrieving revision 1.7
diff -u -r1.7 pkg-plist
--- pkg-plist	18 Sep 2001 22:50:50 -0000	1.7
+++ pkg-plist	22 Oct 2003 14:26:20 -0000
@@ -1,4 +1,5 @@
-@unexec if cmp -s %D/etc/sudoers %D/etc/sudoers.sample; then rm -f %D/etc/sudoers; fi
+@unexec if cmp -s %D/etc/sudoers %%EXAMPLESDIR%%/sudoers; then rm -f %D/etc/sudoers; fi
 bin/sudo
-etc/sudoers.sample
 sbin/visudo
+%%EXAMPLESDIR%%/sudoers
+@dirrm %%EXAMPLESDIR%%
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031023.000206.115643482.rushani>