sysutils/smartmontools: update to 7.0

PR:		234562
Submitted by:	samm@os2.kiev.ua (maintainer)
This commit is contained in:
Steve Wills 2019-01-31 12:37:45 +00:00
parent a4dfcb36cd
commit 0610134445
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=491711
6 changed files with 39 additions and 75 deletions

View File

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= smartmontools
PORTVERSION= 6.6
PORTREVISION= 3
PORTVERSION= 7.0
CATEGORIES= sysutils
MASTER_SITES= SF
@ -13,11 +12,12 @@ COMMENT= S.M.A.R.T. disk monitoring tools
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
USES= alias compiler:c++11-lib gmake shebangfix
CONFLICTS= smartmontools-devel-[0-9]*
OPTIONS_DEFINE= DOCS
USES= alias compiler:c++11-lib gmake shebangfix
SHEBANG_FILES= examplescripts/Example5
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-dependency-tracking \

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1509917610
SHA256 (smartmontools-6.6.tar.gz) = 51f43d0fb064fccaf823bbe68cf0d317d0895ff895aa353b3339a3b316a53054
SIZE (smartmontools-6.6.tar.gz) = 903847
TIMESTAMP = 1546416586
SHA256 (smartmontools-7.0.tar.gz) = e5e1ac2786bc87fdbd6f92d0ee751b799fbb3e1a09c0a6a379f9eb64b3e8f61c
SIZE (smartmontools-7.0.tar.gz) = 944925

View File

@ -0,0 +1,11 @@
--- configure.orig 2018-12-30 14:49:08 UTC
+++ configure
@@ -6891,7 +6891,7 @@ case "${host}" in
*-*-freebsd*|*-*-dragonfly*|*-*-kfreebsd*-gnu*)
os_deps='os_freebsd.o cciss.o dev_areca.o'
os_libs='-lcam -lsbuf'
- os_dltools='curl wget lynx fetch svn'
+ os_dltools='fetch curl wget lynx svn'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb20_dev_get_device_desc in -lusb" >&5
$as_echo_n "checking for libusb20_dev_get_device_desc in -lusb... " >&6; }
if ${ac_cv_lib_usb_libusb20_dev_get_device_desc+:} false; then :

View File

@ -1,13 +0,0 @@
--- freebsd_nvme_ioctl.h.orig 2017-09-20 10:34:38.000000000 -0700
+++ freebsd_nvme_ioctl.h 2018-02-22 23:04:32.250104000 -0800
@@ -148,8 +148,10 @@
#include <dev/nvme/nvme.h>
#endif
+#if __FreeBSD_version < 1200058
#define nvme_completion_is_error(cpl) \
((cpl)->status.sc != 0 || (cpl)->status.sct != 0)
+#endif
#define NVME_CTRLR_PREFIX "/dev/nvme"
#define NVME_NS_PREFIX "ns"

View File

@ -1,32 +1,19 @@
--- os_freebsd.cpp.orig 2017-04-24 09:34:16.000000000 -0700
+++ os_freebsd.cpp 2018-02-27 19:15:54.338861000 +0000
@@ -16,6 +16,8 @@
Index: os_freebsd.cpp
===================================================================
--- os_freebsd.cpp.orig 2018-12-05 18:30:46 UTC
+++ os_freebsd.cpp
@@ -9,6 +9,7 @@
*/
#include <stdio.h>
#include <sys/param.h>
+#include <sys/endian.h>
+#include <sys/param.h>
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
#include <fcntl.h>
@@ -484,7 +486,7 @@
}
nsid = 0xFFFFFFFF; // broadcast id
}
- else if (sscanf(dev, NVME_CTRLR_PREFIX"%d"NVME_NS_PREFIX"%d%c",
+ else if (sscanf(dev, NVME_CTRLR_PREFIX"%d" NVME_NS_PREFIX "%d%c",
&ctrlid, &nsid, &tmp) == 2)
{
if(ctrlid < 0 || nsid < 0) {
@@ -521,16 +523,20 @@
struct nvme_pt_command pt;
memset(&pt, 0, sizeof(pt));
+#if __FreeBSD_version >= 1200058 && __FreeBSD_version < 1200081
+ pt.cmd.opc_fuse = NVME_CMD_SET_OPC(in.opcode);
+#else
@@ -522,29 +523,29 @@ bool freebsd_nvme_device::nvme_pass_through(const nvme
pt.cmd.opc = in.opcode;
#endif
pt.cmd.opc = in.opcode;
+#endif
- pt.cmd.nsid = in.nsid;
+ pt.cmd.nsid = htole32(in.nsid);
pt.buf = in.buffer;
@ -46,13 +33,21 @@
pt.is_read = 1; // should we use in.direction()?
int status = ioctl(get_fd(), NVME_PASSTHROUGH_CMD, &pt);
@@ -538,6 +544,9 @@
if (status < 0)
return set_err(errno, "NVME_PASSTHROUGH_CMD: %s", strerror(errno));
-
+#if __FreeBSD_version >= 1200058
+ nvme_completion_swapbytes(&pt.cpl);
+#endif
out.result=pt.cpl.cdw0; // Command specific result (DW0)
cp_p = &pt.cpl;
out.result=cp_p->cdw0; // Command specific result (DW0)
if (nvme_completion_is_error(&pt.cpl))
if (nvme_completion_is_error(cp_p)) { /* ignore DNR and More bits */
- uint16_t nvme_status = ((cp_p->status.sct << 8) | cp_p->status.sc) & 0x3ff;
-
- return set_nvme_err(out, nvme_status);
+ return set_nvme_err(out, nvme_completion_is_error(&pt.cpl));
}
return true;

View File

@ -1,29 +0,0 @@
--- update-smart-drivedb.in.orig 2016-02-26 23:29:24.000000000 +0300
+++ update-smart-drivedb.in 2016-05-12 23:07:17.558810000 +0300
@@ -51,7 +51,8 @@
-s SMARTCTL Use SMARTCTL for syntax check ('-s -' to disable)
[default: $SMARTCTL]
-t TOOL Use TOOL for download: $os_dltools
- [default: first one found in PATH]
+ [default: fetch, which is always available
+ on FreeBSD.]
-u LOCATION Use URL of LOCATION for download:
sf (Sourceforge code browser via HTTPS)
svn (SVN repository via HTTPS) [default]
@@ -262,14 +263,8 @@
esac
if [ -z "$tool" ]; then
- # Find download tool in PATH
- for t in $os_dltools; do
- if inpath "$t"; then
- tool=$t
- break
- fi
- done
- test -n "$tool" || error "found none of: $os_dltools"
+ # Set to fetch by default
+ tool="fetch"
fi
test -n "$url" || selecturl "svn"