PSARC 2017/013 smartmontools - version 6.5
authorRich Burridge <rich.burridge@oracle.com>
Wed, 19 Apr 2017 14:10:37 -0700
changeset 7917 39eb760cd391
parent 7916 3bd9c0f784c7
child 7918 85d01b2eb34a
PSARC 2017/013 smartmontools - version 6.5 18324331 Include smartmontools in Solaris
components/smartmontools/Makefile
components/smartmontools/TESTING
components/smartmontools/files/exec_attr
components/smartmontools/files/prof_attr
components/smartmontools/patches/add-man-page-warning.patch
components/smartmontools/patches/normalize-man-pages.patch
components/smartmontools/smartmontools.p5m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/smartmontools/Makefile	Wed Apr 19 14:10:37 2017 -0700
@@ -0,0 +1,44 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+#
+BUILD_BITS= 64
+include ../../make-rules/shared-macros.mk
+
+COMPONENT_NAME=		smartmontools
+COMPONENT_VERSION=	6.5
+COMPONENT_PROJECT_URL=	https://www.smartmontools.org/
+COMPONENT_ARCHIVE_HASH=	\
+    sha256:89e8bb080130bc6ce148573ba5bb91bfe30236b64b1b5bbca26515d4b5c945bc
+COMPONENT_ARCHIVE_URL=	http://sourceforge.net/projects/$(COMPONENT_NAME)/files/$(COMPONENT_NAME)/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
+COMPONENT_ANITYA_ID=	4835
+
+TPNO=			33534
+
+TEST_TARGET=	$(NO_TESTS)
+include $(WS_MAKE_RULES)/common.mk
+
+# Run automake to pickup man page normalization changes.
+COMPONENT_PREP_ACTION = (cd $(@D) ; automake)
+
+CONFIGURE_OPTIONS +=	--sysconfdir=$(ETCDIR)
+
+REQUIRED_PACKAGES += system/library/c++-runtime
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/smartmontools/TESTING	Wed Apr 19 14:10:37 2017 -0700
@@ -0,0 +1,7 @@
+There is no test suite for smartctl.
+
+A simple test of the smartctl functionality can be done with something like:
+
+for d in /dev/rdsk/*s0; do
+    sudo /usr/sbin/smartctl $d -a
+done
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/smartmontools/files/exec_attr	Wed Apr 19 14:10:37 2017 -0700
@@ -0,0 +1,1 @@
+SMART Disk Management:solaris:cmd:RO::/usr/sbin/smartctl:euid=0;privs=file_dac_read,file_dac_write,sys_devices
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/smartmontools/files/prof_attr	Wed Apr 19 14:10:37 2017 -0700
@@ -0,0 +1,3 @@
+SMART Disk Info:::Inquiry, read device information
+SMART Disk Management:::Manage, modify disk status or data:\
+profiles=SMART Disk Info
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/smartmontools/patches/add-man-page-warning.patch	Wed Apr 19 14:10:37 2017 -0700
@@ -0,0 +1,19 @@
+As specified in the smartmontools PSARC case, add a warning message to the
+smartctl man page to make sure that users are aware of the consequences of
+using this utility.
+
+This change is not yet appropriate for upstream.
+
+--- smartmontools-6.5/smartctl.8.in.orig	2017-01-23 09:41:39.205216399 +0000
++++ smartmontools-6.5/smartctl.8.in	2017-01-23 09:42:15.210789851 +0000
[email protected]@ -2333,6 +2333,10 @@
+ \fBupdate-smart-drivedb\fP(8).
+ .\" %ENDIF ENABLE_UPDATE_SMART_DRIVEDB
+ 
++.SH WARNING
++The smartctl utility accesses the internals of your system and its
++incorrect usage may render your system inoperable.
++
+ .SH REFERENCES
+ Please see the following web site for more info:
+ \fBhttp://www.smartmontools.org/\fP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/smartmontools/patches/normalize-man-pages.patch	Wed Apr 19 14:10:37 2017 -0700
@@ -0,0 +1,63 @@
+Solaris man pages are now normalized, so no need to do anything special.
+
+These changes should be sent upstream.
+
+--- smartmontools-6.5/Makefile.am.orig	2017-01-12 07:39:27.376645290 +0000
++++ smartmontools-6.5/Makefile.am	2017-01-12 07:43:54.526791076 +0000
[email protected]@ -249,47 +249,6 @@
+ 
+ endif
+ 
+-if OS_SOLARIS
+-# This block is required because Solaris uses manual page section 1m
+-# for administrative command (linux/freebsd use section 8) and Solaris
+-# uses manual page section 4 for file formats (linux/freebsd use
+-# section 5).  Automake can deal cleanly with man page sections 1-8
+-# and n, but NOT with sections of the form 1m.
+-extra_MANS =      smartd.conf.4 \
+-                  smartctl.1m   \
+-                  smartd.1m
+-if ENABLE_UPDATE_SMART_DRIVEDB
+-extra_MANS += update-smart-drivedb.1m
+-endif
+-
+-all-local: $(extra_MANS)
+-install-man: $(extra_MANS)
+-	@$(NORMAL_INSTALL)
+-	$(MKDIR_P) '$(DESTDIR)$(mandir)/man4'
+-	$(MKDIR_P) '$(DESTDIR)$(mandir)/man1m'
+-	for i in $(extra_MANS); do \
+-	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+-	  else file=$$i; fi; \
+-	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+-	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+-	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+-	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+-	  echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(mandir)/man$$ext/$$inst'"; \
+-	  $(INSTALL_DATA) "$$file" "$(DESTDIR)$(mandir)/man$$ext/$$inst"; \
+-	done
+-uninstall-man:
+-	@$(NORMAL_UNINSTALL)
+-	for i in $(extra_MANS); do \
+-	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+-	  else file=$$i; fi; \
+-	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+-	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+-	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+-	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+-	  echo " rm -f '$(DESTDIR)$(mandir)/man$$ext/$$inst'"; \
+-	  rm -f "$(DESTDIR)$(mandir)/man$$ext/$$inst"; \
+-	done
+-else
+ # For systems that adopts traditional manner
+ 
+ man_MANS =        smartd.conf.5 \
[email protected]@ -300,8 +259,6 @@
+ man_MANS += update-smart-drivedb.8
+ endif
+ 
+-endif
+-
+ docsdir=$(docdir)
+ docs_DATA = \
+         AUTHORS \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/smartmontools/smartmontools.p5m	Wed Apr 19 14:10:37 2017 -0700
@@ -0,0 +1,45 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+#
+
+<transform file path=usr.*/man/.+ -> default mangler.man.stability volatile>
+set name=pkg.fmri \
+    value=pkg:/system/storage/[email protected]$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary value="S.M.A.R.T. Disk Inspection and Monitoring Tools"
+set name=pkg.description \
+    value="smartmontools contains the smartctl utility program to control/monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.) built into most modern ATA and SCSI disks. It is derived from smartsuite. Warning: The smartctl utility accesses the internals of your system and its incorrect usage may render your system inoperable."
+set name=com.oracle.info.description \
+    value="the S.M.A.R.T. Disk Inspection and Monitoring Tools"
+set name=com.oracle.info.tpno value=$(TPNO)
+set name=info.classification \
+    value="org.opensolaris.category.2008:System/Administration and Configuration"
+set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
+set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
+set name=org.opensolaris.arc-caseid value=PSARC/2017/013
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+file exec_attr path=etc/security/exec_attr.d/system:storage:smartmontools
+file prof_attr path=etc/security/prof_attr.d/system:storage:smartmontools
+file path=usr/sbin/smartctl
+file path=usr/share/man/man8/smartctl.8
+license COPYING license=GPLv2