ports/71269: [MAINTAINER UPDATE] sysutils/est

Colin Percival cperciva at daemonology.net
Thu Sep 2 02:00:47 UTC 2004


>Number:         71269
>Category:       ports
>Synopsis:       [MAINTAINER UPDATE] sysutils/est
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 02 02:00:46 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Colin Percival
>Release:        FreeBSD 5.2.1-SECURITY i386
>Organization:
>Environment:
System: FreeBSD hexahedron.daemonology.net 5.2.1-SECURITY FreeBSD 5.2.1-SECURITY #0: Wed May 26 04:19:54 GMT 2004 root at builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386
>Description:

Update port to version 0.7.  This adds a sysctl "hw.est_verbose" which
controls whether frequency changes are logged, and converts the rc.d
script to use the rcNG framework.

Note that the module will now only load if 'est_enable="YES"' appears in
rc.conf, rc.conf.local, or rc.conf.d/est.

>How-To-Repeat:
>Fix:

--- est.diff begins here ---
Index: sysutils/est/Makefile
===================================================================
RCS file: /usr/cvsroot/ports/sysutils/est/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- sysutils/est/Makefile	27 Aug 2004 00:13:12 -0000	1.1
+++ sysutils/est/Makefile	1 Sep 2004 23:21:03 -0000
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	est
-PORTVERSION=	0.5
+PORTVERSION=	0.6
 CATEGORIES=	sysutils
 MASTER_SITES=	http://www.daemonology.net/freebsd-est/
 
@@ -17,6 +17,9 @@
 KMODDIR=	${PREFIX}/modules
 MAKE_ARGS=	KMODDIR="${KMODDIR}"
 
+USE_RC_SUBR=	yes
+RC_SCRIPTS_SUB=	PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+
 PLIST_FILES=	modules/est.ko			\
 		etc/rc.d/est.sh
 
@@ -27,13 +30,14 @@
 .endif
 
 post-extract:
-	@${SED} -e 's|@@PREFIX@@|${PREFIX}|' ${FILESDIR}/est.sh	\
-		> ${WRKDIR}/est.sh
+	${SED}	${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/}	\
+		${FILESDIR}/est.sh > ${WRKDIR}/est.sh
 
 pre-install:
 	${MKDIR} ${KMODDIR}
 
 post-install:
-	${INSTALL_SCRIPT} ${WRKDIR}/est.sh ${PREFIX}/etc/rc.d/
+	${INSTALL_SCRIPT} ${WRKDIR}/est.sh ${PREFIX}/etc/rc.d/est.sh
+	${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.post.mk>
Index: sysutils/est/distinfo
===================================================================
RCS file: /usr/cvsroot/ports/sysutils/est/distinfo,v
retrieving revision 1.1
diff -u -r1.1 distinfo
--- sysutils/est/distinfo	27 Aug 2004 00:13:12 -0000	1.1
+++ sysutils/est/distinfo	1 Sep 2004 23:19:08 -0000
@@ -1,2 +1,2 @@
-MD5 (est-0.5.tar.gz) = 9ae866be0144aa0c904279fc8683f650
-SIZE (est-0.5.tar.gz) = 3847
+MD5 (est-0.6.tar.gz) = 57cf42fa9d1bf213a25c70e3cf5a2e08
+SIZE (est-0.6.tar.gz) = 3891
Index: sysutils/est/pkg-message
===================================================================
RCS file: sysutils/est/pkg-message
diff -N sysutils/est/pkg-message
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sysutils/est/pkg-message	1 Sep 2004 23:19:08 -0000
@@ -0,0 +1,5 @@
+To load the Enhanced Speedstep kernel module at boot:
+	echo 'est_enable="YES"' >> /etc/rc.conf
+
+To log every change of CPU frequency:
+	echo 'est_verbose="YES"' >> /etc/rc.conf
Index: sysutils/est/files/est.sh
===================================================================
RCS file: /usr/cvsroot/ports/sysutils/est/files/est.sh,v
retrieving revision 1.1
diff -u -r1.1 est.sh
--- sysutils/est/files/est.sh	27 Aug 2004 00:13:12 -0000	1.1
+++ sysutils/est/files/est.sh	1 Sep 2004 23:19:14 -0000
@@ -1,20 +1,44 @@
 #!/bin/sh
+#
+# $FreeBSD$
+#
 
-kmoddir=@@PREFIX@@/modules
-kmod=est.ko
+# PROVIDE: est
+# REQUIRE: abi
+# BEFORE: securelevel
+# KEYWORD: FreeBSD
 
-case "$1" in
-start)
-	if [ -x $kmoddir/$kmod ]; then
-	    echo -n ' est'
-	    /sbin/kldload $kmoddir/$kmod
+# Define est_* variables in one of these files:
+#	/etc/rc.conf
+#	/etc/rc.conf.local
+#	/etc/rc.conf.d/est
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+est_enable="NO"
+est_verbose="NO"
+
+. %%RC_SUBR%%
+
+name="est"
+rcvar=`set_rcvar`
+
+start_cmd="est_start"
+stop_cmd="est_stop"
+
+load_rc_config $name
+
+kmoddir="%%PREFIX%%/modules"
+
+est_start () {
+	/sbin/kldload ${kmoddir}/est.ko
+	if checkyesno est_verbose; then
+		sysctl hw.est_verbose=1
 	fi
-	;;
-stop)
-	/sbin/kldunload $kmod && echo -n ' est'
-	;;
-*)
-	echo "Usage: `basename $0` {start|stop}" >&2
-	exit 64
-	;;
-esac
+}
+
+est_stop () {
+	/sbin/kldunload $name
+}
+
+run_rc_command "$1"
--- est.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list