ports/130505: Update sysutils/linux-megacli to 2.00.15

Ruben van Staveren ruben at verweg.com
Tue Jan 13 14:00:03 UTC 2009


>Number:         130505
>Category:       ports
>Synopsis:       Update sysutils/linux-megacli to 2.00.15
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 13 14:00:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Ruben van Staveren
>Release:        FreeBSD 7.1-STABLE i386
>Organization:
Verweg dot Com
>Environment:
System: FreeBSD helium.verweg.com 7.1-STABLE FreeBSD 7.1-STABLE #42: Sun Jan 11 17:08:03 CET 2009 root at helium.verweg.com:/usr/obj/usr/cvsup/7-stable/src/sys/HELIUM-SMP i386


	
>Description:

changes:

* This diff updates sysutils/linux-megacli to version 2.00.15 (tested on Dell 2950I Perc/5i)
* Reading the EULA to the letter, it is not allowed to have it build
  automatically, so put up some instructions on how to do download the distfile
* Add -NoLog to megacli usage in the periodic script in order to avoid build up
  of large MegaCLi.log files

>How-To-Repeat:
>Fix:

diff -Nur sysutils/linux-megacli.orig/Makefile sysutils/linux-megacli/Makefile
--- sysutils/linux-megacli.orig/Makefile	2009-01-13 14:45:54.000000000 +0100
+++ sysutils/linux-megacli/Makefile	2009-01-13 12:14:14.000000000 +0100
@@ -6,12 +6,11 @@
 #
 
 PORTNAME=	megacli
-PORTVERSION=	1.01.40
-PORTREVISION=	2
+PORTVERSION=	2.00.15
 CATEGORIES=	sysutils linux
-MASTER_SITES=	http://www.lsi.com/support/downloads/megaraid/miscellaneous/linux/
+MASTER_SITES=	#
 PKGNAMEPREFIX=	linux-
-DISTNAME=	${PORTVERSION}_Linux_Cli
+DISTNAME=	${PORTVERSION}_Linux_MegaCLI
 
 MAINTAINER=	ruben at verweg.com
 COMMENT=	LSI MegaRAID SAS controller management utility
@@ -19,21 +18,44 @@
 NO_WRKSUBDIR=	yes
 USE_ZIP=	yes
 RESTRICTED=	Redistribution prohibited, see: http://lsi.com/cm/License.do
+NO_PACKAGE= Redistribution prohibited, see: http://lsi.com/cm/License.do
+DOWNLOAD_URL=	http://www.lsi.com/cm/License.do?url=http://www.lsi.com/DistributionSystem/AssetDocument/support/downloads/megaraid/miscellaneous/linux/2.00.15_Linux_MegaCLI.zip&prodName=MegaRAID%%20SAS%%208708EM2&subType=Miscellaneous&locale=EN
 ONLY_FOR_ARCHS=	i386 amd64
 USE_LINUX=	yes
 SUB_FILES=	megacli.sh
 SUB_FILES+=	407.status-mfi-raid
 SUB_FILES+=	mfi_tty_log
 
-BROKEN=		Unfetchable
-
 # From bsd.linux.rpm.mk
 RPM2CPIO?=			${LOCALBASE}/bin/rpm2cpio
 EXTRACT_DEPENDS+=		${RPM2CPIO}:${PORTSDIR}/archivers/rpm
 
+.include <bsd.port.pre.mk>
+
+.if !defined(PACKAGE_BUILDING) && !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}) #{
+DISTFILE_INSTRUCTIONS=\n\
+${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}\n\
+Because of licensing restrictions, you must fetch the distribution\n\
+manually.\n\n
+.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX})#{
+DISTFILE_INSTRUCTIONS+=Please access\n\n\
+\ \ \ \ ${DOWNLOAD_URL}\n\n\
+with a web browser and \"Accept\" the End User License Agreement for\n\
+\"MegaCLI - Linux ${PORTVERSION}\".\n\n
+.endif#}
+DISTFILE_INSTRUCTIONS+=Please place the downloaded file(s) in ${DISTDIR}.\n\n
+.endif#}
+
+pre-fetch:
+.if defined(DISTFILE_INSTRUCTIONS)
+	@${PRINTF} "${DISTFILE_INSTRUCTIONS}"
+	@exit 1
+.endif
+
 post-extract:
 	cd ${WRKSRC} && \
-		${RPM2CPIO} MegaCli-${PORTVERSION}-0.i386.rpm | ${CPIO} -id --quiet
+		${UNZIP_CMD} MegaCliLin.zip && \
+		${RPM2CPIO} MegaCli-${PORTVERSION}-1.i386.rpm | ${CPIO} -id --quiet
 
 do-build:
 	@${BRANDELF} -t Linux ${WRKSRC}/opt/MegaRAID/MegaCli/MegaCli
@@ -53,8 +75,6 @@
 .endif
 	@${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.pre.mk>
-
 .if ${OSVERSION} < 602000
 IGNORE=			needs at least FreeBSD 6.2 and mfi_linux.ko
 .endif
diff -Nur sysutils/linux-megacli.orig/distinfo sysutils/linux-megacli/distinfo
--- sysutils/linux-megacli.orig/distinfo	2009-01-13 14:45:54.000000000 +0100
+++ sysutils/linux-megacli/distinfo	2009-01-13 12:08:06.000000000 +0100
@@ -1,3 +1,3 @@
-MD5 (1.01.40_Linux_Cli.zip) = 3907170d460f701222280f0829f4ab7c
-SHA256 (1.01.40_Linux_Cli.zip) = b3b4cdce85bdb14bebb88ad3ab3f072f22f27ca86a12a62308b40e5227157080
-SIZE (1.01.40_Linux_Cli.zip) = 1325516
+MD5 (2.00.15_Linux_MegaCLI.zip) = 5ae84202ffa13f6daa12619a49004d0d
+SHA256 (2.00.15_Linux_MegaCLI.zip) = 11d93efc59307ac3321c187d01b86511839ddb33ead8567783d877fff3f7284e
+SIZE (2.00.15_Linux_MegaCLI.zip) = 1373388
diff -Nur sysutils/linux-megacli.orig/files/407.status-mfi-raid.in sysutils/linux-megacli/files/407.status-mfi-raid.in
--- sysutils/linux-megacli.orig/files/407.status-mfi-raid.in	2009-01-13 14:45:54.000000000 +0100
+++ sysutils/linux-megacli/files/407.status-mfi-raid.in	2008-12-06 16:32:01.000000000 +0100
@@ -36,7 +36,7 @@
 	exit 1
 fi
 
-ADPCOUNT=$(${megacli} -adpCount | \
+ADPCOUNT=$(${megacli} -adpCount -NoLog | \
 	awk '/Controller Count:/ { gsub("\\.", ""); print $3 }')
 
 case ${ADPCOUNT} in
@@ -62,7 +62,7 @@
 	echo "------------------------------------------------------------------------"
 	echo "Physical Drive Information:"
 	echo "ENC SLO DEV SEQ MEC OEC PFC LPF STATE"
-	${megacli} -PDList -a${ctrl} | \
+	${megacli} -PDList -a${ctrl} -NoLog | \
 	awk '
 		BEGIN {
 			E=-1; S=-1; D=-1; s=-1; mec=-1; oec=-1; pfc=-1; lpfeqn=-1;
@@ -89,7 +89,7 @@
 	' | sort -n -k1 -k2 -k3
 	echo
 	echo "Virtual Drive Information:"
-	${megacli} -LDInfo -lall -a${ctrl} | \
+	${megacli} -LDInfo -lall -a${ctrl} -NoLog | \
 	awk '
 		BEGIN {
 			drvs=-1; vd=-1; state=""; name=""; s=-1; strs=-1;
@@ -130,7 +130,7 @@
 		}
 	'
 	# Print BBU Information, if we found something
-	${megacli} -AdpBbuCmd -a${ctrl} | \
+	${megacli} -AdpBbuCmd -a${ctrl} -NoLog | \
 	awk '
 		BEGIN {
 			type=""; temp=-1; isok="-"; rsoc=-1; asoc=-1;
@@ -158,12 +158,12 @@
 	# Give very long outputs.
 	case "$daily_status_mfi_raid_verbose" in
 	[Yy][Ee][Ss])
-		${megacli} -AdpAllInfo -a${ctrl}
-		${megacli} -EncInfo -a${ctrl}
-		${megacli} -PDList -a${ctrl}
-		${megacli} -LDGetNUm -a${ctrl}
-		${megacli} -LDInfo -Lall -a${ctrl}
-		${megacli} -AdpBbuCmd -GetBbuStatus -a${ctrl}
+		${megacli} -AdpAllInfo -a${ctrl} -NoLog
+		${megacli} -EncInfo -a${ctrl} -NoLog
+		${megacli} -PDList -a${ctrl} -NoLog
+		${megacli} -LDGetNUm -a${ctrl} -NoLog
+		${megacli} -LDInfo -Lall -a${ctrl} -NoLog
+		${megacli} -AdpBbuCmd -GetBbuStatus -a${ctrl} -NoLog
 		;;
 	    *)
 		;;
@@ -182,7 +182,7 @@
 	*)
 		;;
 	esac
-	${megacli} -AdpEventLog -GetEvents -f ${ctrl_log}.tmp -a${ctrl}
+	${megacli} -AdpEventLog -GetEvents -f ${ctrl_log}.tmp -a${ctrl} -NoLog
 	awk '
 		BEGIN {
 			inrecord=0;
@@ -213,7 +213,7 @@
 		;;
 	*)
 		# XXX we might consider clearing the logs here
-		# ${megacli} -AdpEventLog -Clear -a${ctrl}
+		# ${megacli} -AdpEventLog -Clear -a${ctrl} -NoLog
 		raid_rc=0
 		lines=`wc -l ${ctrl_log}.today | awk '{ print $1 }'`
 		if test $lines -gt 4; then
@@ -235,7 +235,7 @@
 			touch ${tty_log}.today
 		fi
 		mv -f ${tty_log}.today ${tty_log}.yesterday
-		${megacli} -FwTermLog Dsply -a${ctrl} > ${tty_log}.today
+		${megacli} -FwTermLog Dsply -a${ctrl} > ${tty_log}.today -NoLog
 		cmp -s ${tty_log}.yesterday ${tty_log}.today
 		tty_rc=$?
 		if test $tty_rc -ne 0; then


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list