The smartmontools package contains two utility programs (smartctl and smartd)
to control and monitor storage systems using the Self-Monitoring, Analysis
and Reporting Technology System (S.M.A.R.T.) built into most modern SATA, NVMe
and SCSI hard disks. It is derived from the smartsuite package, and includes
support for ATA/ATAPI/SATA disks and SCSI disks and tape devices.
===> The following configuration options are available for smartmontools-7.5_3:
DOCS=on: Build and/or install documentation
===> Use 'make config' to modify these settings
sysutils/smartmontools: migrate to the libusb api
This should fix problems with CURRENT and aligned with an upstream
change. While here - also update pkg-message
PR: 297564
sysutils/smartmontools: Fix 16-CURRENT build
16-CURRENT added capsicum support to libusb in src commit 749318f2ae56.
Chase this change by adding a couple of #ifdefs to determine whether
building under 16-CURRENT or not.
Approved by: portmgr (implicit, fix it)
sysutils/smartmontools: Fix 3 issues
1. Start "smartd" service after "DAEMON" - smartd starts too early.
2. Exclude "mfid" device from automatic detection in daily "smart".
3. Add the ability to manually specify the "pass" device with parameters
in "periodic.conf" for processing in daily "smart", example:
daily_status_smart_devices="pass14,-dsat pass15,-dsat"
PR: 288538
Approved by: Oleksii Samorukov <samm@FreeBSD.org> (3 explicit, 1 and 2 timeout >
1 month)
Co-authored-by: Anton Saietskii <vsasjason@gmail.com>
sysutils/smartmontools: enable gpg check in configure
This is required to ensure that if gpg tool is installed database is
validated. Also added hint to pkg-install message about
security/gnupg port.
PR: 276180
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
sysutils/smartmontools: Update drivedb.h
Update drivedb.h to latest version upstream to add support for
common NAS and Enterprise HDDs
Approved by: port maintainer timeout (2+ weeks), tcberner (mentor)
Differential Revision: https://reviews.freebsd.org/D32568
sysutils/smartmontools: periodic should always alert about failing disks
Periodic scripts should return rc=1 for informational messages. For matters
that require urgent attention, then should return rc=3 (or greater). A
SMART imminent failure prediction requires urgent attention, so it should
return rc=3.
PR: 246785
Approved by: samm (maintainer timeout)
Sponsored by: Axcient
sysutils/smartmontools: support areca controllers and nvme
While here, ensure mail starts before smartd
PR: 240519
Submitted by: VVD <vvd@unislabs.com>
Approved by: samm@os2.kiev.ua (maintianer)
Bump PORTREVISION for ports depending on the canonical version of GCC
as defined in Mk/bsd.default-versions.mk which has moved from GCC 8.3
to GCC 9.1 under most circumstances now after revision 507371.
This includes ports
- with USE_GCC=yes or USE_GCC=any,
- with USES=fortran,
- using Mk/bsd.octave.mk which in turn features USES=fortran, and
- with USES=compiler specifying openmp, nestedfct, c11, c++0x, c++11-lang,
c++11-lib, c++14-lang, c++17-lang, or gcc-c++11-lib
plus, everything INDEX-11 shows with a dependency on lang/gcc9 now.
PR: 238330
Bump PORTREVISION for ports depending on the canonical version of GCC
defined via Mk/bsd.default-versions.mk which has moved from GCC 7.4 t
GCC 8.2 under most circumstances.
This includes ports
- with USE_GCC=yes or USE_GCC=any,
- with USES=fortran,
- using Mk/bsd.octave.mk which in turn features USES=fortran, and
- with USES=compiler specifying openmp, nestedfct, c11, c++0x, c++11-lang,
c++11-lib, c++14-lang, c++17-lang, or gcc-c++11-lib
plus, as a double check, everything INDEX-11 showed depending on lang/gcc7.
PR: 231590
sysutils/smartmontools: unbreak in 12-CURRENT
Between __FreeBSD_version 1200058 and 1200081 fields opc and fuse of
struct nvme_command (sys/dev/nvme/nvme.h) where merged under opc_fuse, but
in r338182 this change was undone and this port broke.
Update patch to fix it so it works regardless of the revision we check out.
PR: 230867
Submitted by: ohartmann@walstatt.org
Approved by: tcberner (mentor), maintainer (timeout, 2 weeks)
Differential Revision: https://reviews.freebsd.org/D16908
Bump PORTREVISION for ports depending on the canonical version of GCC
in the ports tree (via Mk/bsd.default-versions.mk and lang/gcc) which
has now moved from GCC 6 to GCC 7 by default.
This includes ports
- featuring USE_GCC=yes or USE_GCC=any,
- featuring USES=fortran,
- using Mk/bsd.octave.mk which in turn features USES=fortran, and those
- with USES=compiler specifying one of openmp, nestedfct, c11, c++0x,
c++11-lib, c++11-lang, c++14-lang, c++17-lang, or gcc-c++11-lib.
PR: 222542
Fix port builds for architectures which remain on gcc as the default compiler.
This will primarily help powerpc64.
For archs where clang is the default compiler, these changes will have no
effect, as the base compiler already has these capabilities (primarily, but
not exclusively, c++-11).
Tested for no-harm on amd64.
While here, pet portlint.
Approved by: portmgr (tier-2 blanket)
Display NVMe data properly on Big Endian hosts with sysutils/smartmontools
smartctl can now be used with NVMe drives on BE hosts.
Submitted by: Michal Stanek <mst@semihalf.com>
Reviewed by: cy
Obtained from: Semihalf
Sponsored by: IBM, QCM Technologies
Differential Revision: https://reviews.freebsd.org/D14543
Fix build under -CURRENT following Sr329824.
This commit does not address big endian support, which will be addressed
by a separate revision and commit. This commit (and revision) only
addresses build breakage due to Sr329824.
Approved by: imp, wma, kan, mst_semihalf.com (Michal Stanek)
Differential Revision: https://reviews.freebsd.org/D14483
Make smartmontools 6.6 compile with clang 6.0.0 and higher
Because clang 6.0.0 and higher default to -std=gnu++14, like gcc 6 and
higher, compiling smartmontools results in the following error:
os_freebsd.cpp:487:45: error: invalid suffix on literal; C++11 requires
a space between literal and identifier [-Wreserved-user-defined-literal]
else if (sscanf(dev, NVME_CTRLR_PREFIX"%d"NVME_NS_PREFIX"%d%c",
^
Fix this by adding spaces around the NVME_NS_PREFIX macro. This makes
the source C++14 compatible.
Approved by: samm@os2.kiev.ua (maintainer)
PR: 224826
MFH: 2018Q1
Add a patch to zero-initialise a variable that is passed to the kernel
where it could trigger assertions.
PR: 178032
Submitted by: op@hardenedbsd.org
Approved by: samm@os2.kiev.ua (maintainer)
Sponsored by: opBSD
sysutils/smartmontools
- Fix build for o/s releases > 1100110 and #include <dev/nvme/nvme.h> to
pickup the structures definitions used in os_freebsd.cpp.
- 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)
Add USES=alias to several ports
Alias is a new USES tool that allows DragonFly to masquerade as FreeBSD
by setting CFLAGS+= -D__FreeBSD__. For some ports, this fixes the build
without the need for additional patches.
Approved by: portmgr (bapt, blanket)
Improve the FreeBSD SCSI and SAS support in smartmontools:
- Remove unused private fields from some classes (found by Clang).
- In freebsd_scsi_device::scsi_pass_through:
* Make sure this function returns false on error instead of an error
code that gets converted to true.
* Put printing of the "Incoming data" debug info right after the
cam_send_ccb() call and before the error checking to make
debugging easier.
* When copying sense data make sure the fields in the CCB are
actually valid with CAM_AUTOSNS_VALID. Also make sure that the
size of the sense data doesn't overflow max_sense_len. This was
the real cause for the crash in ports/181836.
* Add some debug printing on the sense data.
Committed upstream as r3873.
PR: ports/181836, ports/185960, ports/186095
Tested by: many
- Fix a crash with some SCSI disks.
- Add DOCS option and use option helpers.
- USES=gmake.
- Staging.
- Remove CFLAGS left from old versions.
PR: ports/181836
Approved by: maintainer timeout (3 weeks)
This change has various simplifications/improvements for
the port. Most importantly, it's currently installing the rc.d
script from the source, rather than the fixed one in files/.
1. Remove 6.x compatibility hack
2. Use the PORTDOCS macro
3. Actually install the rc.d script in files/
4. Simplify pkg-plist
5. For the rc.d script:
a. Move it to the standard location, after LOGIN
b. Add KEYWORD nojail per the script in the distfiles
c. Put the standard arguments in their usual order/formats
d. Simplify the assignments of pidfile and required_files
e. Use command_args for required arguments, don't abuse _flags
f. The test for -p in smartd_flags should be a start_precmd,
we frown on running any code unconditionally.
Also, improve this check if -p is first.
g. Bring the reload and report options from the distfile version,
and simplify them.
PR: ports/165167
Submitted by: me
Approved by: Alex Samorukov <samm@os2.kiev.ua> (maintainer)
In the rc.d scripts, change assignments to rcvar to use the
literal name_enable wherever possible, and ${name}_enable
when it's not, to prepare for the demise of set_rcvar().
In cases where I had to hand-edit unusual instances also
modify formatting slightly to be more uniform (and in
some cases, correct). This includes adding some $FreeBSD$
tags, and most importantly moving rcvar= to right after
name= so it's clear that one is derived from the other.
Import 2 important fixes from upstream (SVN):
- Fix a crash with SCSI devices on FreeBSD9 [r3468]
- Fix weird bugs caused by LSI firmware with SATA devices
[r3466]
PR: ports/162276
Submitted by: Alex Samorukov <samm os2.kiev.ua> (maintainer)
Improve periodic script to display a short report when a disk attribute failed
in the past but is now back to normal.
PR: ports/158630
Submitted by: romain
Approved by: Alex Samorukov <samm@os2.kiev.ua> (maintainer)
Update to 5.39.
This version is long awaited and the important improvements related to
FreeBSD are:
- USB device type autodetection for some devices
http://sourceforge.net/apps/trac/smartmontools/wiki/Supported_USB-Devices
- Support for HighPoint RocketRAID controllers
- Support RAID controllers using /dev/pass devices
- Support CHECK_POWER_MODE and WRITE_LOG
- Fix CCISS file descriptor leak
- New device type detection algorithm on FreeBSD, not based on filename
- Support for the adaX (ATA on CAM bus) devices on FreeBSD 8.0 and higher
PR: ports/141371
Submitted by: Alex Samorukov <samm os2 kiev ua>
Approved by: marck (maintainer)
- Add a patch that makes shure the data buffers used to read smart
attributes and logs do not straddle page boundaries
PR: ports/138540
Submitted by: Brad Huntting <huntting AT glarp.com>
Approved by: tabthorpe, glarkin (mentors, implicit), marck (maintainer)
- Fix questionable correctness of autodetect procedure and switch to using
kern.disks in place of ls /dev/da*[0-9].
PR: ports/135213
Submitted by: Dmitry Morozovsky <marck@freebsd.org> (maintainer)
Update CONFIGURE_ARGS for how we pass CONFIGURE_TARGET to configure script.
Specifically, newer autoconf (> 2.13) has different semantic of the
configure target. In short, one should use --build=CONFIGURE_TARGET
instead of CONFIGURE_TARGET directly. Otherwise, you will get a warning
and the old semantic may be removed in later autoconf releases.
To workaround this issue, many ports hack the CONFIGURE_TARGET variable
so that it contains the ``--build='' prefix.
To solve this issue, under the fact that some ports still have
configure script generated by the old autoconf, we use runtime detection
in the do-configure target so that the proper argument can be used.
Changes to Mk/*:
- Add runtime detection magic in bsd.port.mk
(Only the first 15 lines of the commit message are shown above )
- Allow smartctl to interact with SCSI /dev/pass devices, thus enabling it to
work with RAID controllers that expose disks via these devices.
Submitted by: scottl
- Set --mandir and --infodir in CONFIGURE_ARGS if the configure script
supports them. This is determined by running ``configure --help'' in
do-configure target and set the shell variable _LATE_CONFIGURE_ARGS
which is then passed to CONFIGURE_ARGS.
- Remove --mandir and --infodir in ports' Makefile where applicable
Few ports use REINPLACE_CMD to achieve the same effect, remove them too.
- Correct some manual pages location from PREFIX/man to MANPREFIX/man
- Define INFO_PATH where necessary
- Document that .info files are installed in a subdirectory relative to
PREFIX/INFO_PATH and slightly change add-plist-info to use INFO_PATH and
subdirectory detection.
PR: ports/111470
Approved by: portmgr
Discussed with: stas (Mk/*), gerald (info related stuffs)
Tested by: pointyhat exp run
- Fix smartd to detect drives if the first drive has two-digit number (like
ad10)
- Recognize some new Western Digital Caviar SE drives
PR: ports/110806
Submitted by: marck