summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2014-10-29 02:13:03 +0000
committerMichael Orlitzky <mjo@gentoo.org>2014-10-29 02:13:03 +0000
commit01394e35f32f6ad34d73b72e990434056976a5a0 (patch)
tree614e5c04f599edf73d65afaf2bea8755b421f2f4 /app-laptop
parentRemove old upgrade wording from README.gentoo. (diff)
downloadhistorical-01394e35f32f6ad34d73b72e990434056976a5a0.tar.gz
historical-01394e35f32f6ad34d73b72e990434056976a5a0.tar.bz2
historical-01394e35f32f6ad34d73b72e990434056976a5a0.zip
Add myself as co-maintainer and version bump.
Package-Manager: portage-2.2.8-r2/cvs/Linux x86_64 Manifest-Sign-Key: 0x6F48D3DA05C2DADB!
Diffstat (limited to 'app-laptop')
-rw-r--r--app-laptop/hdapsd/ChangeLog10
-rw-r--r--app-laptop/hdapsd/Manifest32
-rw-r--r--app-laptop/hdapsd/files/hdapsd.conf-2014102424
-rw-r--r--app-laptop/hdapsd/files/hdapsd.init-2014102476
-rw-r--r--app-laptop/hdapsd/hdapsd-20141024.ebuild73
-rw-r--r--app-laptop/hdapsd/metadata.xml24
6 files changed, 219 insertions, 20 deletions
diff --git a/app-laptop/hdapsd/ChangeLog b/app-laptop/hdapsd/ChangeLog
index 4a339b069c4e..7e6761a92099 100644
--- a/app-laptop/hdapsd/ChangeLog
+++ b/app-laptop/hdapsd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-laptop/hdapsd
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-laptop/hdapsd/ChangeLog,v 1.28 2013/06/26 14:09:22 ottxor Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/hdapsd/ChangeLog,v 1.29 2014/10/29 02:12:52 mjo Exp $
+
+*hdapsd-20141024 (29 Oct 2014)
+
+ 29 Oct 2014; Michael Orlitzky <mjo@gentoo.org> +files/hdapsd.conf-20141024,
+ +files/hdapsd.init-20141024, +hdapsd-20141024.ebuild, metadata.xml:
+ Add myself as co-maintainer and version bump.
26 Jun 2013; Christoph Junghans <ottxor@gentoo.org> -files/hdapsd.conf,
-files/hdapsd.init, -hdapsd-20090401.ebuild, files/hdapsd.init.3:
diff --git a/app-laptop/hdapsd/Manifest b/app-laptop/hdapsd/Manifest
index 40018c9d4344..9119865ef313 100644
--- a/app-laptop/hdapsd/Manifest
+++ b/app-laptop/hdapsd/Manifest
@@ -1,20 +1,32 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
+AUX hdapsd.conf-20141024 739 SHA256 dd37f05c2d2e76e9e12f7b5398a1b4a64b765ecf97c48320a7d278411e808e33 SHA512 e03c7f02af2789a784284f10eed10e10edb82e2ad16d3794299cc9622c00a047f30df7f7d553ef572e265815684d1e783932e0f3b219cca44f0e1f74dc045944 WHIRLPOOL fadc681435c884bbd56115989ce9ee461bd81c8f4aa6b77a607464ee48bf11389b6659401bccd509b1ce057cef28ff08a98b87b9b6a2ae70a746c4afc4ef0ec8
AUX hdapsd.conf.3 354 SHA256 e17455d2bf6ef75fcada30f7053c991e6f391a11c6a541d42e9b89061a88f139 SHA512 a56f2ea534296d8dac6b2952599121e31dd8623c025dfb0c687b0509c893f04b1a7ae5c890e24d78975b731bb12814e9cdd752704b180aee665be77ab856b46b WHIRLPOOL 5b9447594f14ebc642f60ac1a54de114166072297e7f01c633f03fe25bf6356bfb97d5c759783e92935cd9a26c5550e2da2572eb3fcfde9ef9a05bb8b38b3214
+AUX hdapsd.init-20141024 2176 SHA256 7a78680ea4db28bf3aed9d777550d2f08e3b1b6b29e91f44ee549b9d14b11615 SHA512 2b6826f27a5c0308d29dc993c0685feee1d21615ce7222a1fc8dbcc4451ef9ea7913c91068459ac25bbdce2d656ad3f2d51a57e6e9b3eb0db99deee262c21885 WHIRLPOOL 0e0ae497280d903e78d8dcb4df3e53f0ad632aa480bf0263386494cc8a48a007cf1e1d2bbebd1c5b49cc6d44641b0f209c02c773b931f7f67c9a73483888b1e4
AUX hdapsd.init.3 1865 SHA256 9c0354f543d33be6f5cd41d23f614785930cabd2d2862286b0c63647aa343a50 SHA512 f5a29a4002ee2eb6e2a0efea9ecee420df38fd0558ce13b457bbf71f998dae27608cc60cb1ea60a038fe20eedeae9bbc1a23fbc2be6a0d2896e533d4b674ec6e WHIRLPOOL 7beb342c29c99e1496cde691fbc8efc353cbd553b549332e256570252f7dbe99f3e9003ad9e92c2b6dc5ce0293cc97af8893ad61db4861756d991764fe856cf9
DIST hdapsd-20090401.tar.gz 95058 SHA256 32979d58de4c54a7cc5671e7e7b4f0b653b659104faa9610433f8bb5dd4cef7a SHA512 4984a6c636d3447051ca5629fec89f08eee3773750f9623b80d7c0d4af65dcf9868392f2e93f5d13ac329d311ec2ebcdddf3e438007d1f851a920137c6903c96 WHIRLPOOL 9c3822acb39ff1f10e47604725bf6e42546b95ba9db26ebd751b69c4162e3df4f33d177a2a0b7a764c5e0f2478f470595cda304221a0ec165b07ef183b6ea9be
+DIST hdapsd-20141024.tar.gz 128580 SHA256 4a9f7c4d6351bd31757f236ad832ceccf10280d32bcaf4c25d15dc4ecc84581f SHA512 2d956ce1e6691f41d0f39a4d29c244b5a7ed7ebed4c979a39131e311a4cea3374150cd4ca1da4033e483c3ea0da4e8ca01f20e599a65278dd0674e29a086c540 WHIRLPOOL ed1c536fde7e212e38af8ba54d8a712d70b550d647ec93aff05c866ee7e2e41a563adb73fd20e3e540c87c90089a41c60fe3ec8c8406785bc59446d7f0b94831
EBUILD hdapsd-20090401-r2.ebuild 1788 SHA256 1b64304372d0df9945b412a02a233b46c571eaa2983abea698064da166ecd28d SHA512 45e53acdae2072b79c874eb20d9ed4360a0de82ca3ee54d0b3f2e9e1490db866edb9c06b67180fcd7c33f42c21a486938a2922c63bb348d230e4c5a2deaf589a WHIRLPOOL c6f3ae420afc81e1c7cfe0a02bcfb2f22ff1e8dde736c59be170e30521a7fe6a2dbe7348490ca33b0925441eb873de2be26641e43f40fcd4520383858d4b7bb7
-MISC ChangeLog 3962 SHA256 432798cc41c9f2798b3615381070be0c5a6c26c808b053aadb97a77e2d25f134 SHA512 376ec819ab4f72b6be6601e63bc2df04bd73707cde50024e05cb5f73405d55004e19d0caa0e3a23a6eaa0e6d9419abf06bfbd7b5373cc5a1dd32a01e46ea66a6 WHIRLPOOL a3b072b601d7f1c25a03b7909683ab86ff9b1bf0255ae99e75646dad2eb5ea9f31233641077ca8c5d71b9e082e6f9acca4f2665689fb79ffb92463e9d59fd5cc
-MISC metadata.xml 415 SHA256 ba1392e5d32ca1999d3a820d9c3885dd55235e20d0181c9620d6d271c7a6a818 SHA512 a0880c36d3dbe949c5d7e926a565b95153a3ea501f548e32f6aa9be3df7752e8d47e256a98063335224fb84833e56961c8ecbe85f0a158cd03f1a6244a1444b7 WHIRLPOOL 2a939a76bc30f6fc6de2a11215cc4b42f465024fce7d44c8690fbf35d125f9b09362745ecfe4dbb4d456e35a771849ee0330d389c0e5dd2c271b96c2fb9c12d6
+EBUILD hdapsd-20141024.ebuild 2276 SHA256 def15e80269c17f1d3d2e9317eb7d28a2521fbc4cedc393386524ebaacffb849 SHA512 b2be0bfb9b30c300df6ffa29ae77f58557bcefe0d90e82c0e2c6a551bd87486207631795d76e591e9417b931a2d8de441cc83af72b5e90f4af5ab226159876eb WHIRLPOOL 39ee80a21b278c209a449319af7c7cc452d950aea5c261960debdfaa913c902ef5266a61036862330a27c1bc15eb5de14a9462832373235d75d9b333b166e6bd
+MISC ChangeLog 4188 SHA256 0fb7ce4fe52bb14462691bf692ae2eb53694a9abeedb4321bc23796409910117 SHA512 aeddfa853bda6c317631f6621dfb53c7dfeb7fc90feeae0e85b641c3602c5e003b7e894308500a5a28a5e6e1a52673c5301dca8e2e099a69b95c58c86854f625 WHIRLPOOL 1561c2f1f7bd23ade9dcbcc7d7460d6883b93cc095e8e2e399cffef457456bd0126a943bf0d5239de692b84ab5235f46c5dfb877f9c09878972fbfd67c2a3727
+MISC metadata.xml 511 SHA256 f061638c5177d00be9454f982cc5a2f0cc290b3c063aea6a6d8c13f2b04782d1 SHA512 b4c199ecc9dd21c4daf97bef54a30dbe8f053ec5a6770f06da0309c7fe4fae3a5234b02faf1f15d696ba27570fb5ee466c42cd21785ed54fdfbc4b0d6b135fc4 WHIRLPOOL dc0a6e901444715cb200fdcb6c539abb83e6b2855bdda011a201fef3e06c86f609bbc0aeb711203a4fe5cd6a515380d01933e1b2ce93987b65ab36252bf7e872
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.20 (GNU/Linux)
+Version: GnuPG v2.0
-iQEcBAEBCAAGBQJRyvYTAAoJEOeBhlrCAAWG18MIAKlzCyyqKiIyTXkINd8W2jEo
-Q8/FlBWx8EwYMxvPFlrWyQd9iyNQknNKHIKXmHfF10K1I4QzHUAPLyq6arBv+NRX
-jJChDZU/TJdB/VrIJCtqmiDZxXEbzYHCqlMpvAV4DILZIpZPFPBl2dOYMd/HnDH0
-rXwhxQDv3vsAzrHo16NAS8GO5Fvxv0j5oYzRZfKs1GHJB8ksrkIqaZONiCf1l8x8
-Pc84DUmgsZXCT+ji+JQOTElYmsqIDpG4RxOYUkXni/LqxEX13HzMr4+d4QJBzK4H
-no4P8C9v7AFOErUuaf9ZEVGkqNEZ/183fPBvVBFp+EVfSKWdJYTmbXvKRgKua6A=
-=FamE
+iQJ8BAEBCABmBQJUUE0lXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxNEU5RDcyRDdCMUFGREVGQzBCNDFDMUY2
+RjQ4RDNEQTA1QzJEQURCAAoJEG9I09oFwtrblkMP/0VjvqOsFPdaPwgf8dWq1lgP
+IpbCDfWMLeXdmEPR6pOGMe8cCVYBNrL/o1oAoPzl81thVXZM+HJkW0Kb97JarHJS
+DaAxN+rRVOvNIatT7IJ6y+O5yxAS/20EOw9aFEzjJtYoMLuGZBTvfJWfup4StC6c
+kH2t9fyY5TvuGpacuVIfCPcug+yboAIXXBMSD/8LcSEOxAiictk4KDKsW8/SQxVp
+XhdsmNMyjhde/94BJOpVQpqXWsFo5PkFyPujEpn+A48pvtjXkiHpWQKAR/aJh4on
+l3/t3Q8NqHFTSWMH4zYEXVwUr+oyR7rYkMcRrnelip/z8b6MV3+gnIIbBNUPwsng
+aq2YiH2oVGy60kZuuOgYzSu9CyjMfSTv1zgH3CJvdJUziIsSqka3unUykZtGmYyh
+inAx3KjbbG3EHJTICg5zhhSUARt7RP81cWppb0HiNSBofFV5Jc2jzu7NR8utYUCO
+NaE+rqRFGUSQrWN7lBMgxvp/PYHqtDYVjo7FAUXovC7//0ePqT6rCJQHohiFaXcp
+8jI6iRaw0Ck1nfQNrh59oxjkHCYHvMCl8rR0om2WLua4haZpMueopcuOmSlR2p+l
+hDTnloxPLsIR8jV/gVOVnFDeLs4etX71KL15ANLEAldBVcmLMvl9+iLBgv9Rl/tR
+CDy3afb9rtUwoztwOC/q
+=zKhQ
-----END PGP SIGNATURE-----
diff --git a/app-laptop/hdapsd/files/hdapsd.conf-20141024 b/app-laptop/hdapsd/files/hdapsd.conf-20141024
new file mode 100644
index 000000000000..a83d8bb181ac
--- /dev/null
+++ b/app-laptop/hdapsd/files/hdapsd.conf-20141024
@@ -0,0 +1,24 @@
+# Configuration for the HDAPS daemon (hdapsd). All settings here are
+# optional and will override those set in /etc/hdapsd.conf (if hdapsd
+# was built with libconfig support).
+
+# The list of the disk devices that hdapsd should monitor. Usually
+# this is "hda", "sda", or "hda sda". The hdaps daemon will attempt to
+# auto-detect your drive if this is left empty. Empty by default.
+#
+#DISKLIST="sda"
+
+# Hdapsd sensitivity. The lower the threshold, the earlier the heads
+# are parked when movement is detected. The default is determined by
+# hdapsd, and is currently 15.
+#
+#THRESHOLD="10"
+
+# Log to syslog? Disabled by default.
+#
+#SYSLOG="true"
+
+# Set any extra options here, like -a for "adaptive mode". Empty by
+# default.
+#
+#OPTIONS="-a"
diff --git a/app-laptop/hdapsd/files/hdapsd.init-20141024 b/app-laptop/hdapsd/files/hdapsd.init-20141024
new file mode 100644
index 000000000000..b4d0eab26b5c
--- /dev/null
+++ b/app-laptop/hdapsd/files/hdapsd.init-20141024
@@ -0,0 +1,76 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2
+
+description="Hard Drive Active Protection System daemon"
+command="/usr/sbin/hdapsd"
+pidfile="/run/hdapsd.pid"
+
+# Always daemonize when started by OpenRC, and don't make the pidfile
+# configurable. Even if the user sets something dumb for the pidfile
+# in /etc/hdapsd.conf, we want it to work! Fortunately the settings
+# passed on the command-line override the config file.
+command_args="--background --pidfile=${pidfile}"
+
+
+depend() {
+ need localmount
+}
+
+checkconfig() {
+ # An empty DISKLIST is allowed because the disk will be
+ # auto-detected.
+ for DISK in ${DISKLIST}; do
+ if [ ! -b /dev/${DISK} ]; then
+ eerror "Could not find disk /dev/${DISK}!"
+ eerror "Adjust the DISK setting in /etc/conf.d/hdapsd"
+ return 1
+ fi
+
+ if [ ! -e /sys/block/${DISK}/queue/protect ] && \
+ [ ! -e /sys/block/${DISK}/device/unload_heads ] ; then
+ eerror "No protect entry for ${DISK}!"
+ eerror "Make sure your kernel is patched with the blk_freeze patch"
+ return 1
+ fi
+ done
+
+ # Load the tp_smapi module first. This is not a requirement, but
+ # it helps hdapsd's adaptive mode.
+ if [ ! -e /sys/devices/platform/smapi ] ; then
+ modprobe tp_smapi 2>/dev/null
+ fi
+
+ if [ ! -d /sys/devices/platform/hdaps ] ; then
+ ebegin "Loading hdaps module"
+ modprobe hdaps
+ eend $? || return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ for DISK in ${DISKLIST}; do
+ command_args="${command_args} -d ${DISK}"
+ done
+
+ # Since all of these settings are now optional, we append them
+ # only if we need to.
+ if [ ! -z "${THRESHOLD}" ] ; then
+ command_args="${command_args} --sensitivity ${THRESHOLD}"
+ fi
+
+ if [ ! -z "${SYSLOG}" ] ; then
+ command_args="${command_args} --syslog"
+ fi
+
+ if [ ! -z "${OPTIONS}" ] ; then
+ command_args="${command_args} ${OPTIONS}"
+ fi
+
+ ebegin "Starting the ${description}"
+ start-stop-daemon --start --exec "${command}" --pidfile "${pidfile}" \
+ -- ${command_args}
+ eend $?
+}
diff --git a/app-laptop/hdapsd/hdapsd-20141024.ebuild b/app-laptop/hdapsd/hdapsd-20141024.ebuild
new file mode 100644
index 000000000000..ab9bbc838317
--- /dev/null
+++ b/app-laptop/hdapsd/hdapsd-20141024.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/hdapsd/hdapsd-20141024.ebuild,v 1.1 2014/10/29 02:12:52 mjo Exp $
+
+EAPI=5
+inherit linux-info readme.gentoo systemd
+
+DESCRIPTION="IBM ThinkPad Hard Drive Active Protection System (HDAPS) daemon"
+HOMEPAGE="https://github.com/evgeni/${PN}/"
+SRC_URI="https://github.com/evgeni/${PN}/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libconfig"
+
+DEPEND="libconfig? ( dev-libs/libconfig )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ # We require the hdaps module which can either come from either the
+ # kernel itself (CONFIG_SENSORS_HDAPS) or from the tp_smapi package.
+ if ! has_version app-laptop/tp_smapi[hdaps]; then
+ CONFIG_CHECK="~SENSORS_HDAPS"
+ ERROR_SENSORS_HDAPS="${P} requires app-laptop/tp_smapi[hdaps] or "
+ ERROR_SENSORS_HDAPS+="kernel support for CONFIG_SENSORS_HDAPS enabled"
+ linux-info_pkg_setup
+ fi
+}
+
+src_configure(){
+ econf \
+ $(use_enable libconfig) \
+ --with-systemdsystemunitdir=$(systemd_get_unitdir) \
+ --docdir="${EROOT}usr/share/doc/${PF}"
+}
+
+src_install() {
+ default
+ newconfd "${FILESDIR}/hdapsd.conf-${PV}" hdapsd
+ newinitd "${FILESDIR}/hdapsd.init-${PV}" hdapsd
+ readme.gentoo_create_doc
+}
+
+pkg_postinst(){
+ [[ -z $(ls "${EROOT}"sys/block/*/queue/protect 2>/dev/null) ]] && \
+ [[ -z $(ls "${EROOT}"sys/block/*/device/unload_heads 2>/dev/null) ]] && \
+ ewarn "Your kernel does NOT support shock protection."
+
+ readme.gentoo_print_elog
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="
+${PN} requires a kernel module to function properly. The recommended
+approach is to install app-laptop/tp_smapi[hdaps], but the in-tree
+module provided by CONFIG_SENSORS_HDAPS may work as well.
+
+Common daemon parameters can be set in ${EROOT}etc/conf.d/${PN}. If the
+package was installed with USE=libconfig, then the parameters can also
+be set in ${EROOT}etc/${PN}.conf, although the former will take
+precedence over the latter if both are used.
+
+You can change the default sampling rate by modifing
+
+ /sys/devices/platform/hdaps/sampling_rate
+
+and you may need to enable shock protection manually by running
+
+ # echo -1 > /sys/block/<disk>/device/unload_heads
+
+as root.
+"
diff --git a/app-laptop/hdapsd/metadata.xml b/app-laptop/hdapsd/metadata.xml
index fe60e106f9c3..2eea4ca078b5 100644
--- a/app-laptop/hdapsd/metadata.xml
+++ b/app-laptop/hdapsd/metadata.xml
@@ -1,12 +1,20 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer>
- <email>ottxor@gentoo.org</email>
- <name>Christoph Junghans</name>
- </maintainer>
- <longdescription>IBM ThinkPad Harddrive Active Protection disk head parking daemon</longdescription>
- <upstream>
- <remote-id type="sourceforge">hdapsd</remote-id>
- </upstream>
+ <maintainer>
+ <email>ottxor@gentoo.org</email>
+ <name>Christoph Junghans</name>
+ </maintainer>
+
+ <maintainer>
+ <email>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+ </maintainer>
+
+ <use>
+ <flag name='libconfig'>
+ Require <pkg>dev-libs/libconfig</pkg> to allow the daemon to
+ read a configuration file at startup
+ </flag>
+ </use>
</pkgmetadata>