svn commit: r412136 - in head/sysutils/smartmontools: . files
Dmitry Marakasov
amdmi3 at FreeBSD.org
Tue Mar 29 20:52:12 UTC 2016
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 at gmail.com
Approved by: maintainer timeout (samm at 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 at 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
More information about the svn-ports-all
mailing list