From owner-svn-ports-all@freebsd.org  Tue Mar 29 20:52:12 2016
Return-Path: <owner-svn-ports-all@freebsd.org>
Delivered-To: svn-ports-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA1C7AE2929;
 Tue, 29 Mar 2016 20:52:12 +0000 (UTC)
 (envelope-from amdmi3@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 9528C1C44;
 Tue, 29 Mar 2016 20:52:12 +0000 (UTC)
 (envelope-from amdmi3@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2TKqBst056431;
 Tue, 29 Mar 2016 20:52:11 GMT (envelope-from amdmi3@FreeBSD.org)
Received: (from amdmi3@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2TKqBxZ056429;
 Tue, 29 Mar 2016 20:52:11 GMT (envelope-from amdmi3@FreeBSD.org)
Message-Id: <201603292052.u2TKqBxZ056429@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: amdmi3 set sender to
 amdmi3@FreeBSD.org using -f
From: Dmitry Marakasov <amdmi3@FreeBSD.org>
Date: Tue, 29 Mar 2016 20:52:11 +0000 (UTC)
To: ports-committers@freebsd.org, svn-ports-all@freebsd.org,
 svn-ports-head@freebsd.org
Subject: svn commit: r412136 - in head/sysutils/smartmontools: . files
X-SVN-Group: ports-head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-ports-all@freebsd.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: SVN commit messages for the ports tree <svn-ports-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-ports-all>,
 <mailto:svn-ports-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-ports-all/>
List-Post: <mailto:svn-ports-all@freebsd.org>
List-Help: <mailto:svn-ports-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-ports-all>,
 <mailto:svn-ports-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 29 Mar 2016 20:52:12 -0000

Author: amdmi3
Date: Tue Mar 29 20:52:11 2016
New Revision: 412136
URL: https://svnweb.freebsd.org/changeset/ports/412136

Log:
  - Fix update-smart-drivedb when curl is installed
  
  update-smart-drivedb is an utility bundled with smartmontools which
  downloads fresh version of smartctl device database from the web.
  It is a shell script which tries to use different http file retrieving
  programs such as wget, curl, lynx, ftp and fetch. If curl is
  installed, it is usually used, however it does't handle HTTP redirect
  which database download url causes (arguments needed to handle it
  not specified?) and downloads redirection page HTML instead of
  actual database. No breakage occurs as the database is verified
  before being installed, so it's just not updated, with error:
  
  /usr/local/share/smartmontools/drivedb.h.error: rejected by /usr/local/sbin/smartctl, probably no longer compatible
  
  Patch update-smart-drivedb to only use fetch(1), which is always
  available on FreeBSD. The change provides consistent behavior, and
  fetch(1) handles redirects correctly out of box, so actual database
  is downloaded and successfully installed.
  
  - While here, fix LICENSE and silence mkdir
  
  PR:		207737
  Reported by:	everytrash@gmail.com
  Approved by:	maintainer timeout (samm@os2.kiev.ua, 3 weeks)

Added:
  head/sysutils/smartmontools/files/patch-update-smart-drivedb.in   (contents, props changed)
Modified:
  head/sysutils/smartmontools/Makefile

Modified: head/sysutils/smartmontools/Makefile
==============================================================================
--- head/sysutils/smartmontools/Makefile	Tue Mar 29 20:36:24 2016	(r412135)
+++ head/sysutils/smartmontools/Makefile	Tue Mar 29 20:52:11 2016	(r412136)
@@ -3,14 +3,15 @@
 
 PORTNAME=	smartmontools
 PORTVERSION=	6.4
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	sysutils
 MASTER_SITES=	SF
 
 MAINTAINER=	samm@os2.kiev.ua
 COMMENT=	S.M.A.R.T. disk monitoring tools
 
-LICENSE=	GPLv2
+LICENSE=	GPLv2+
+LICENSE_FILE=	${WRKSRC}/COPYING
 
 CONFLICTS=	smartmontools-devel-[0-9]*
 
@@ -32,7 +33,7 @@ post-patch:
 	@${REINPLACE_CMD} -e 's| install-initdDATA| |' ${WRKSRC}/Makefile.in
 
 post-install:
-	${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily
+	@${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily
 	${INSTALL_SCRIPT} ${WRKDIR}/smart \
 		${STAGEDIR}${PREFIX}/etc/periodic/daily
 

Added: head/sysutils/smartmontools/files/patch-update-smart-drivedb.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/smartmontools/files/patch-update-smart-drivedb.in	Tue Mar 29 20:52:11 2016	(r412136)
@@ -0,0 +1,30 @@
+--- update-smart-drivedb.in.orig	2014-12-06 20:12:50 UTC
++++ update-smart-drivedb.in
+@@ -69,26 +69,8 @@ EOF
+   *)  DEST="$1" ;;
+ esac
+ 
+-# Abort if 'which' is not available
+-which which >/dev/null || exit 1
+-
+ # Find download tool
+-DOWNLOAD=
+-for t in $os_dltools; do
+-  if which $t >/dev/null 2>/dev/null; then
+-    case $t in
+-      curl)  DOWNLOAD="curl ${q:+-s }"'-f -o "$DEST.new" "$SRC"' ;;
+-      lynx)  DOWNLOAD='lynx -source "$SRC" >"$DEST.new"' ;;
+-      wget)  DOWNLOAD="wget $q"'-O "$DEST.new" "$SRC"' ;;
+-      fetch) DOWNLOAD='fetch -o "$DEST.new" "$SRC"' ;; # FreeBSD
+-      ftp)   DOWNLOAD='ftp -o "$DEST.new" "$SRC"' ;; # OpenBSD
+-    esac
+-    break
+-  fi
+-done
+-if [ -z "$DOWNLOAD" ]; then
+-  echo "$0: found none of: $os_dltools" >&2; exit 1
+-fi
++DOWNLOAD='fetch -o "$DEST.new" "$SRC"'
+ 
+ # Try possible branch first, then trunk
+ for location in "branches/$BRANCH" "trunk"; do