Index: head/sysutils/smartmontools/Makefile =================================================================== --- head/sysutils/smartmontools/Makefile (revision 491710) +++ head/sysutils/smartmontools/Makefile (revision 491711) @@ -1,41 +1,41 @@ # Created by: Eduard Martinescu # $FreeBSD$ PORTNAME= smartmontools -PORTVERSION= 6.6 -PORTREVISION= 3 +PORTVERSION= 7.0 CATEGORIES= sysutils MASTER_SITES= SF MAINTAINER= samm@os2.kiev.ua 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 \ --enable-sample \ --with-nvme-devicescan=yes \ --with-initscriptdir=${PREFIX}/etc/rc.d SUB_FILES= pkg-message smart USE_RC_SUBR= smartd PORTDOCS= * post-patch: @${REINPLACE_CMD} -e 's| install-initdDATA| |' ${WRKSRC}/Makefile.in post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily ${INSTALL_SCRIPT} ${WRKDIR}/smart \ ${STAGEDIR}${PREFIX}/etc/periodic/daily .include Index: head/sysutils/smartmontools/distinfo =================================================================== --- head/sysutils/smartmontools/distinfo (revision 491710) +++ head/sysutils/smartmontools/distinfo (revision 491711) @@ -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 Index: head/sysutils/smartmontools/files/patch-freebsd__nvme__ioctl.h =================================================================== --- head/sysutils/smartmontools/files/patch-freebsd__nvme__ioctl.h (revision 491710) +++ head/sysutils/smartmontools/files/patch-freebsd__nvme__ioctl.h (nonexistent) @@ -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 - #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" Property changes on: head/sysutils/smartmontools/files/patch-freebsd__nvme__ioctl.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/smartmontools/files/patch-update-smart-drivedb.in =================================================================== --- head/sysutils/smartmontools/files/patch-update-smart-drivedb.in (revision 491710) +++ head/sysutils/smartmontools/files/patch-update-smart-drivedb.in (nonexistent) @@ -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" Property changes on: head/sysutils/smartmontools/files/patch-update-smart-drivedb.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/smartmontools/files/patch-configure =================================================================== --- head/sysutils/smartmontools/files/patch-configure (nonexistent) +++ head/sysutils/smartmontools/files/patch-configure (revision 491711) @@ -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 : Property changes on: head/sysutils/smartmontools/files/patch-configure ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/smartmontools/files/patch-os__freebsd.cpp =================================================================== --- head/sysutils/smartmontools/files/patch-os__freebsd.cpp (revision 491710) +++ head/sysutils/smartmontools/files/patch-os__freebsd.cpp (revision 491711) @@ -1,58 +1,53 @@ ---- 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 + #include +#include -+#include + #include #include #include - #include -@@ -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 + #endif + pt.cmd.opc = in.opcode; - pt.cmd.nsid = in.nsid; + pt.cmd.nsid = htole32(in.nsid); pt.buf = in.buffer; pt.len = in.size; - pt.cmd.cdw10 = in.cdw10; - pt.cmd.cdw11 = in.cdw11; - pt.cmd.cdw12 = in.cdw12; - pt.cmd.cdw13 = in.cdw13; - pt.cmd.cdw14 = in.cdw14; - pt.cmd.cdw15 = in.cdw15; + pt.cmd.cdw10 = htole32(in.cdw10); + pt.cmd.cdw11 = htole32(in.cdw11); + pt.cmd.cdw12 = htole32(in.cdw12); + pt.cmd.cdw13 = htole32(in.cdw13); + pt.cmd.cdw14 = htole32(in.cdw14); + pt.cmd.cdw15 = htole32(in.cdw15); 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;