* [PATCH 1/3] smartmontools: update to 6.2
2014-04-10 2:54 [meta-oe][PATCH 0/3] Update smartmontools and add some fix Kai Kang
@ 2014-04-10 2:54 ` Kai Kang
2014-04-10 2:54 ` [PATCH 2/3] smartmontools: add init script Kai Kang
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Kai Kang @ 2014-04-10 2:54 UTC (permalink / raw)
To: Openembedded-devel
Update smartmontools for 6.1 to 6.2. Add description as well.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
.../{smartmontools_6.1.bb => smartmontools_6.2.bb} | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
rename meta-oe/recipes-extended/smartmontools/{smartmontools_6.1.bb => smartmontools_6.2.bb} (39%)
diff --git a/meta-oe/recipes-extended/smartmontools/smartmontools_6.1.bb b/meta-oe/recipes-extended/smartmontools/smartmontools_6.2.bb
similarity index 39%
rename from meta-oe/recipes-extended/smartmontools/smartmontools_6.1.bb
rename to meta-oe/recipes-extended/smartmontools/smartmontools_6.2.bb
index d38ae8a..83ff028 100644
--- a/meta-oe/recipes-extended/smartmontools/smartmontools_6.1.bb
+++ b/meta-oe/recipes-extended/smartmontools/smartmontools_6.2.bb
@@ -1,13 +1,21 @@
-SECTION = "console/utils"
SUMMARY = "Control and monitor storage systems using S.M.A.R.T"
+DESCRIPTION = \
+"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 (SMART) built \
+into most modern ATA and SCSI hard disks. In many cases, these \
+utilities will provide advanced warning of disk degradation and failure."
+
HOMEPAGE = "http://smartmontools.sourceforge.net/"
+SECTION = "console/utils"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRC_URI = "${SOURCEFORGE_MIRROR}/smartmontools/smartmontools-${PV}.tar.gz"
-SRC_URI[md5sum] = "83a3a681f8183ed858392d550ae1cca6"
-SRC_URI[sha256sum] = "a9003b8bccc82682f658ce76d70edb1842411e51dc56d4cd6b56618da1d9ce07"
+
+SRC_URI[md5sum] = "d44f84081a12cef79cd17f78044351fc"
+SRC_URI[sha256sum] = "486f660579bb0fb4f6b927ded7531cb1f99685c666397377761c5b04dd96065b"
inherit autotools
--
1.8.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/3] smartmontools: add init script
2014-04-10 2:54 [meta-oe][PATCH 0/3] Update smartmontools and add some fix Kai Kang
2014-04-10 2:54 ` [PATCH 1/3] smartmontools: update to 6.2 Kai Kang
@ 2014-04-10 2:54 ` Kai Kang
2014-04-10 2:54 ` [PATCH 3/3] smartmontools: add PACKAGECONFIG and runtime dependency Kai Kang
2014-04-20 9:11 ` [meta-oe][PATCH 0/3] Update smartmontools and add some fix Martin Jansa
3 siblings, 0 replies; 5+ messages in thread
From: Kai Kang @ 2014-04-10 2:54 UTC (permalink / raw)
To: Openembedded-devel
Add init script smartd for smartmontools. Thought smartmontools provides
init script itself, but it checks distribution version that is not usable
for oe.
So add an init script for smartmontools which removes distribution
version check.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
.../smartmontools/files/initd.smartd | 108 +++++++++++++++++++++
.../smartmontools/smartmontools_6.2.bb | 14 ++-
2 files changed, 120 insertions(+), 2 deletions(-)
create mode 100755 meta-oe/recipes-extended/smartmontools/files/initd.smartd
diff --git a/meta-oe/recipes-extended/smartmontools/files/initd.smartd b/meta-oe/recipes-extended/smartmontools/files/initd.smartd
new file mode 100755
index 0000000..29c27e4
--- /dev/null
+++ b/meta-oe/recipes-extended/smartmontools/files/initd.smartd
@@ -0,0 +1,108 @@
+#! /bin/sh
+
+# smartmontools init file for smartd
+# Copyright (C) 2002-8 Bruce Allen <smartmontools-support@lists.sourceforge.net>
+# $Id: smartd.initd.in 3360 2011-06-06 19:25:36Z chrfranke $
+
+# For RedHat and cousins:
+# chkconfig: - 60 60
+# description: Self Monitoring and Reporting Technology (SMART) Daemon
+# processname: smartd
+
+# For SuSE and cousins
+### BEGIN INIT INFO
+# Provides: smartd
+# Required-Start: $syslog $remote_fs
+# Should-Start: sendmail
+# Required-Stop: $syslog $remote_fs
+# Should-Stop: sendmail
+# Default-Start:
+# Default-Stop: 0 1 2 3 4 5 6
+# Short-Description: Monitors disk and tape health via S.M.A.R.T.
+# Description: Start S.M.A.R.T. disk and tape monitor.
+### END INIT INFO
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2, or (at your option) any later
+# version.
+# You should have received a copy of the GNU General Public License (for
+# example COPYING); if not, write to the Free Software Foundation, Inc., 675
+# Mass Ave, Cambridge, MA 02139, USA.
+# This code was originally developed as a Senior Thesis by Michael Cornwell
+# at the Concurrent Systems Laboratory (now part of the Storage Systems
+# Research Center), Jack Baskin School of Engineering, University of
+# California, Santa Cruz. http://ssrc.soe.ucsc.edu/.
+
+# Uncomment the line below to pass options to smartd on startup.
+# Note that distribution specific configuration files like
+# /etc/{default,sysconfig}/smartmontools might override these
+#smartd_opts="--interval=1800"
+
+SMARTD_BIN=/usr/sbin/smartd
+SMARTDPID=/var/run/smartd.pid
+[ -x $SMARTD_BIN ] || exit 0
+RET=0
+
+# source configuration file
+[ -r /etc/default/rcS ] && . /etc/default/rcS
+[ -r /etc/default/smartmontools ] && . /etc/default/smartmontools
+
+smartd_opts="--pidfile $SMARTDPID $smartd_opts"
+
+case "$1" in
+ start)
+ echo -n "Starting S.M.A.R.T. daemon: smartd"
+ if start-stop-daemon --start --quiet --pidfile $SMARTDPID \
+ --exec $SMARTD_BIN -- $smartd_opts; then
+ echo "."
+ else
+ echo " (failed)"
+ RET=1
+ fi
+ ;;
+ stop)
+ echo -n "Stopping S.M.A.R.T. daemon: smartd"
+ start-stop-daemon --stop --quiet --oknodo --pidfile $SMARTDPID
+ echo "."
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ force-reload)
+ $0 reload || $0 restart
+ ;;
+ reload)
+ echo -n "Reload S.M.A.R.T. daemon: smartd"
+ if start-stop-daemon --stop --quiet --signal 1 \
+ --pidfile $SMARTDPID; then
+ echo "."
+ else
+ echo " (failed)"
+ RET=1
+ fi
+ ;;
+ report)
+ echo -n "Checking SMART devices now"
+ if start-stop-daemon --stop --quiet --signal 10 \
+ --pidfile $SMARTDPID; then
+ echo "."
+ else
+ echo " (failed)"
+ RET=1
+ fi
+ ;;
+ status)
+ if pidof $SMARTD_BIN >/dev/null; then
+ echo "$SMARTD_BIN is running."
+ else
+ echo "$SMARTD_BIN is not running."
+ RET=1
+ fi
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|force-reload|reload|report|status}"
+ exit 1
+esac
+exit $RET
diff --git a/meta-oe/recipes-extended/smartmontools/smartmontools_6.2.bb b/meta-oe/recipes-extended/smartmontools/smartmontools_6.2.bb
index 83ff028..66fdb4d 100644
--- a/meta-oe/recipes-extended/smartmontools/smartmontools_6.2.bb
+++ b/meta-oe/recipes-extended/smartmontools/smartmontools_6.2.bb
@@ -12,10 +12,20 @@ SECTION = "console/utils"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRC_URI = "${SOURCEFORGE_MIRROR}/smartmontools/smartmontools-${PV}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/smartmontools/smartmontools-${PV}.tar.gz \
+ file://initd.smartd \
+ "
SRC_URI[md5sum] = "d44f84081a12cef79cd17f78044351fc"
SRC_URI[sha256sum] = "486f660579bb0fb4f6b927ded7531cb1f99685c666397377761c5b04dd96065b"
-inherit autotools
+inherit autotools update-rc.d
+do_install_append () {
+ #install the init.d/smartd
+ install -d ${D}${sysconfdir}/init.d
+ install -p -m 0755 ${WORKDIR}/initd.smartd ${D}${sysconfdir}/init.d/smartd
+}
+
+INITSCRIPT_NAME = "smartd"
+INITSCRIPT_PARAMS = "start 60 . stop 60 0 1 2 3 4 5 6 ."
--
1.8.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 3/3] smartmontools: add PACKAGECONFIG and runtime dependency
2014-04-10 2:54 [meta-oe][PATCH 0/3] Update smartmontools and add some fix Kai Kang
2014-04-10 2:54 ` [PATCH 1/3] smartmontools: update to 6.2 Kai Kang
2014-04-10 2:54 ` [PATCH 2/3] smartmontools: add init script Kai Kang
@ 2014-04-10 2:54 ` Kai Kang
2014-04-20 9:11 ` [meta-oe][PATCH 0/3] Update smartmontools and add some fix Martin Jansa
3 siblings, 0 replies; 5+ messages in thread
From: Kai Kang @ 2014-04-10 2:54 UTC (permalink / raw)
To: Openembedded-devel
Add PACKAGECONFIGs libcap-ng and selinux for smartmontools. And add
runtime dependency.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
meta-oe/recipes-extended/smartmontools/smartmontools_6.2.bb | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/meta-oe/recipes-extended/smartmontools/smartmontools_6.2.bb b/meta-oe/recipes-extended/smartmontools/smartmontools_6.2.bb
index 66fdb4d..9b9454c 100644
--- a/meta-oe/recipes-extended/smartmontools/smartmontools_6.2.bb
+++ b/meta-oe/recipes-extended/smartmontools/smartmontools_6.2.bb
@@ -16,6 +16,12 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/smartmontools/smartmontools-${PV}.tar.gz \
file://initd.smartd \
"
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'libcap-ng', 'libcap-ng', '', d)} \
+ ${@base_contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
+ "
+PACKAGECONFIG[libcap-ng] = "--with-libcap-ng=yes,--with-libcap-ng=no,libcap-ng"
+PACKAGECONFIG[selinux] = "--with-selinux=yes,--with-selinux=no,libselinux"
+
SRC_URI[md5sum] = "d44f84081a12cef79cd17f78044351fc"
SRC_URI[sha256sum] = "486f660579bb0fb4f6b927ded7531cb1f99685c666397377761c5b04dd96065b"
@@ -29,3 +35,5 @@ do_install_append () {
INITSCRIPT_NAME = "smartd"
INITSCRIPT_PARAMS = "start 60 . stop 60 0 1 2 3 4 5 6 ."
+
+RDEPENDS_${PN} += "mailx"
--
1.8.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [meta-oe][PATCH 0/3] Update smartmontools and add some fix
2014-04-10 2:54 [meta-oe][PATCH 0/3] Update smartmontools and add some fix Kai Kang
` (2 preceding siblings ...)
2014-04-10 2:54 ` [PATCH 3/3] smartmontools: add PACKAGECONFIG and runtime dependency Kai Kang
@ 2014-04-20 9:11 ` Martin Jansa
3 siblings, 0 replies; 5+ messages in thread
From: Martin Jansa @ 2014-04-20 9:11 UTC (permalink / raw)
To: openembedded-devel
[-- Attachment #1: Type: text/plain, Size: 922 bytes --]
On Thu, Apr 10, 2014 at 10:54:32AM +0800, Kai Kang wrote:
> Kai Kang (3):
> smartmontools: update to 6.2
> smartmontools: add init script
> smartmontools: add PACKAGECONFIG and runtime dependency
All 3 merged, thanks
>
> .../smartmontools/files/initd.smartd | 108 +++++++++++++++++++++
> .../{smartmontools_6.1.bb => smartmontools_6.2.bb} | 36 ++++++-
> 2 files changed, 139 insertions(+), 5 deletions(-)
> create mode 100755 meta-oe/recipes-extended/smartmontools/files/initd.smartd
> rename meta-oe/recipes-extended/smartmontools/{smartmontools_6.1.bb => smartmontools_6.2.bb} (19%)
>
> --
> 1.8.4
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread