diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2016-03-30 04:52:11 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2016-03-30 04:52:11 +0800 |
commit | 65a33b722566ebb328303e9890f16cdab1a3dbef (patch) | |
tree | ce600e852eaed8787edc0ab6bd6e6c536376014a /sysutils | |
parent | 72763ce5929406b959209a3ce77408c2b3fc272b (diff) | |
download | freebsd-ports-gnome-65a33b722566ebb328303e9890f16cdab1a3dbef.tar.gz freebsd-ports-gnome-65a33b722566ebb328303e9890f16cdab1a3dbef.tar.zst freebsd-ports-gnome-65a33b722566ebb328303e9890f16cdab1a3dbef.zip |
- 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)
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/smartmontools/Makefile | 7 | ||||
-rw-r--r-- | sysutils/smartmontools/files/patch-update-smart-drivedb.in | 30 |
2 files changed, 34 insertions, 3 deletions
diff --git a/sysutils/smartmontools/Makefile b/sysutils/smartmontools/Makefile index 4954842dc7e1..3b6347a22897 100644 --- a/sysutils/smartmontools/Makefile +++ b/sysutils/smartmontools/Makefile @@ -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 diff --git a/sysutils/smartmontools/files/patch-update-smart-drivedb.in b/sysutils/smartmontools/files/patch-update-smart-drivedb.in new file mode 100644 index 000000000000..b3cfba9f2427 --- /dev/null +++ b/sysutils/smartmontools/files/patch-update-smart-drivedb.in @@ -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 |