Gentoo Archives: gentoo-commits

From: Tony Vroon <chainsaw@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/cciss_vol_status/, sys-apps/cciss_vol_status/files/
Date: Fri, 30 Jun 2017 17:49:11
Message-Id: 1498844924.3ae4420681873e7d3f60758fce31f25b5d426ead.chainsaw@gentoo
1 commit: 3ae4420681873e7d3f60758fce31f25b5d426ead
2 Author: Tony Vroon <chainsaw <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 30 17:48:44 2017 +0000
4 Commit: Tony Vroon <chainsaw <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 30 17:48:44 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ae44206
7
8 sys-apps/cciss_vol_status: Version bump to 1.12; new cron script by Michael "mjo" Orlitzky closes bug #561868.
9
10 Package-Manager: portage-2.3.6
11
12 sys-apps/cciss_vol_status/Manifest | 1 +
13 .../cciss_vol_status/cciss_vol_status-1.12.ebuild | 21 +++++++++
14 .../cciss_vol_status/files/cciss_vol_status.cron2 | 52 ++++++++++++++++++++++
15 3 files changed, 74 insertions(+)
16
17 diff --git a/sys-apps/cciss_vol_status/Manifest b/sys-apps/cciss_vol_status/Manifest
18 index 5ddfa11bc38..771888e2bb1 100644
19 --- a/sys-apps/cciss_vol_status/Manifest
20 +++ b/sys-apps/cciss_vol_status/Manifest
21 @@ -2,3 +2,4 @@ DIST cciss_vol_status-1.03.tar.gz 86581 SHA256 b3cdcadba4dc8637c70aac9d594e32acb
22 DIST cciss_vol_status-1.09.tar.gz 104978 SHA256 93520050c3b1742288b92314585d1c0d4eaed9799747b8fc0c06977bbf5b74e4 SHA512 c773c6addcb26a3c635c28f9ebad7b9a5c2457516ffa87548fe0d3cee5ff864267dbe7c4dfccef0ed1c40d0273a833475ce4c96ba51f755776059daee892d114 WHIRLPOOL a3dcd382d5100c41bd0ff9900a3c6edba5e23a40711fbf9ec2762f596580947e51e31795b3d5a2daf4a299d68f798bba7500b5cb7e607a05f9cc39788abd0f48
23 DIST cciss_vol_status-1.10.tar.gz 107233 SHA256 803110bf3f7d49f3b03e299e9a5209eba2661631bd07630672e497a6e182a504 SHA512 2010a9fd90b3e4c1d21ae6946c8085df96d15e4d4ce732d6488034e96f1d029f48d6226190c7422f9d99ab2994315c0514c534bb79aafd52b52bd27498428461 WHIRLPOOL a3b80b9f914621fbcc8251c942638d7eef35dad40fdfe9f795ed2693045e36f3e5c5bf8559f49320679114b9fbde88b75b26cda33d13cdb80c36629df2380478
24 DIST cciss_vol_status-1.11.tar.gz 112316 SHA256 98c3c798cd8f322af8c8f18b19be069a137af15fce9e4022edee3ea7371df919 SHA512 20a80367a794a7f805f3b40184e93bd4f85e8ce2a7784eba1d2d68cbffc8299cbe121f9bf25e7112abec1269802f8146f3fc36501fb72536b1aee384e8d32064 WHIRLPOOL 70e7f5aa2f72e14e75df3c98b92bc03505ac770776bce1730c972bdf7f84808467275da93cf89e6eeab3e6af1096d8f51e35ef030a98d45ddcb3394d450fecaf
25 +DIST cciss_vol_status-1.12.tar.gz 120346 SHA256 a49abbfde6369416ac3d71bca6f60f342584eb99c786c080f8722ad19a17f91f SHA512 f9fa8b98bd42810932f03f514b4b8c6cea690378f065a6c9788ddb78612c7ca2aa9a7fefa8a40634cfe247600fb6d3f11f0b687fba77d1423087a2b319773d69 WHIRLPOOL 194a9edaea1c2e9b4a6a4681f583d3b665b84c432b4dfa26be9d96ea73ab7a7d632db0c7dc6a9c7d5b4b029f3e2bd78212feefa3789dd659e2e2d832034e3f9c
26
27 diff --git a/sys-apps/cciss_vol_status/cciss_vol_status-1.12.ebuild b/sys-apps/cciss_vol_status/cciss_vol_status-1.12.ebuild
28 new file mode 100644
29 index 00000000000..b70b2f6a0b9
30 --- /dev/null
31 +++ b/sys-apps/cciss_vol_status/cciss_vol_status-1.12.ebuild
32 @@ -0,0 +1,21 @@
33 +# Copyright 1999-2017 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +IUSE=""
39 +DESCRIPTION="Shows status of logical drives attached to HP SmartArray controllers"
40 +HOMEPAGE="http://cciss.sourceforge.net/#cciss_utils"
41 +LICENSE="GPL-2"
42 +SRC_URI="mirror://sourceforge/cciss/${P}.tar.gz"
43 +KEYWORDS="~amd64 ~ia64 ~x86"
44 +SLOT="0"
45 +RDEPEND=""
46 +DEPEND=""
47 +
48 +src_install() {
49 + emake DESTDIR="${D}" install || die "Install failed."
50 + dodoc AUTHORS ChangeLog NEWS README
51 + exeinto /etc/cron.hourly
52 + newexe "${FILESDIR}/cciss_vol_status.cron2" cciss_vol_status
53 +}
54
55 diff --git a/sys-apps/cciss_vol_status/files/cciss_vol_status.cron2 b/sys-apps/cciss_vol_status/files/cciss_vol_status.cron2
56 new file mode 100644
57 index 00000000000..43731b48e0c
58 --- /dev/null
59 +++ b/sys-apps/cciss_vol_status/files/cciss_vol_status.cron2
60 @@ -0,0 +1,52 @@
61 +#!/bin/sh
62 +
63 +test -x /usr/bin/cciss_vol_status || exit 0
64 +
65 +# WARNING: For the hpsa driver, we only support /dev/sda through
66 +# /dev/sdz and /dev/sg0 through /dev/sg9.
67 +DEVICES=$(find /dev -type b \( -path '/dev/cciss/c*d0' \
68 + -or \
69 + -path '/dev/sd[a-z]' \
70 + -or \
71 + -path '/dev/sg[0-9]' \))
72 +
73 +if [ -n "${DEVICES}" ]; then
74 + #
75 + # Unsupported devices will generate an error (to stderr) of the form,
76 + #
77 + # cciss_vol_status: /dev/sda: Unknown SCSI device.
78 + #
79 + # We want to ignore these, and fortunately, an exit code of zero
80 + # is returned in this case. So we need only hide the output by
81 + # redirecting stderr elsewhere. But, that also hides errors of the
82 + # form,
83 + #
84 + # cciss_vol_status: open /dev/sda: Permission denied
85 + #
86 + # which we DO want to present to the user. So instead of sending
87 + # stderr to stdout, we redirect it to a temporary file. We then
88 + # show the content of the temporary file to the user if it
89 + # contains errors other than "Unknown SCSI device."
90 + #
91 + TMPFILE=$( mktemp )
92 + if [ $? -ne 0 ] || [ ! -f "${TMPFILE}" ]; then
93 + echo "${0}: error creating temporary file." >&2
94 + exit 2
95 + fi
96 +
97 + OUTPUT=$( /usr/bin/cciss_vol_status ${DEVICES} 2> "${TMPFILE}" )
98 + if [ $? -ne 0 ]; then
99 + printf "%s\n" "$OUTPUT"
100 + rm -f "${TMPFILE}"
101 + exit 1
102 + fi
103 +
104 + ERRORS=$( GREP_OPTIONS="" grep -v "Unknown SCSI device" "${TMPFILE}" )
105 + rm -f "${TMPFILE}"
106 + if [ -n "${ERRORS}" ]; then
107 + echo "${ERRORS}" >&2
108 + exit 3
109 + fi
110 +fi
111 +
112 +exit 0