From 0d9b862ee120eea07602551e1eca6989bf33a1fe Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann Date: Thu, 20 Aug 2020 17:11:00 +0200 Subject: sys-apps/cciss_vol_status: bump to v1.12a Package-Manager: Portage-3.0.3, Repoman-3.0.0 Signed-off-by: Thomas Deutschmann --- sys-apps/cciss_vol_status/Manifest | 2 +- .../cciss_vol_status/cciss_vol_status-1.12.ebuild | 21 --------- .../cciss_vol_status/cciss_vol_status-1.12a.ebuild | 21 +++++++++ .../files/cciss_vol_status-r2.cron | 52 ++++++++++++++++++++++ .../cciss_vol_status/files/cciss_vol_status.cron | 21 --------- .../cciss_vol_status/files/cciss_vol_status.cron2 | 52 ---------------------- 6 files changed, 74 insertions(+), 95 deletions(-) delete mode 100644 sys-apps/cciss_vol_status/cciss_vol_status-1.12.ebuild create mode 100644 sys-apps/cciss_vol_status/cciss_vol_status-1.12a.ebuild create mode 100644 sys-apps/cciss_vol_status/files/cciss_vol_status-r2.cron delete mode 100644 sys-apps/cciss_vol_status/files/cciss_vol_status.cron delete mode 100644 sys-apps/cciss_vol_status/files/cciss_vol_status.cron2 (limited to 'sys-apps') diff --git a/sys-apps/cciss_vol_status/Manifest b/sys-apps/cciss_vol_status/Manifest index 93623f27e2b2..a511002e096b 100644 --- a/sys-apps/cciss_vol_status/Manifest +++ b/sys-apps/cciss_vol_status/Manifest @@ -1 +1 @@ -DIST cciss_vol_status-1.12.tar.gz 120346 BLAKE2B 8094f7b421c8c3f003f38cef380eb14c6778b750a62a5b8b94df955f87c0a77b1b7dfa9df16d6bb10f4955b6961b022b871fc39d143717b8024ec40fdb3b819f SHA512 f9fa8b98bd42810932f03f514b4b8c6cea690378f065a6c9788ddb78612c7ca2aa9a7fefa8a40634cfe247600fb6d3f11f0b687fba77d1423087a2b319773d69 +DIST cciss_vol_status-1.12a.tar.gz 120748 BLAKE2B 855712328e53165f6b7cf5858a1f73fe71a55570a104ad401cb8359ae9bccb3f2abc01d0e92f0001b8d69c732fadfe26c54a73e52af50cc544a76d13e72c6023 SHA512 c6aeae0d1fd66aabcd4a82f69b12433770fab2dde726bca67d97a09636e39f2eb596a0695afdb7e3e1a35c3d6882a9804a8263caa9b0dad97da8256afea778be 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 deleted file mode 100644 index 8c5f27b95379..000000000000 --- a/sys-apps/cciss_vol_status/cciss_vol_status-1.12.ebuild +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -IUSE="" -DESCRIPTION="Shows status of logical drives attached to HP SmartArray controllers" -HOMEPAGE="http://cciss.sourceforge.net/#cciss_utils" -LICENSE="GPL-2" -SRC_URI="mirror://sourceforge/cciss/${P}.tar.gz" -KEYWORDS="amd64 ~ia64 x86" -SLOT="0" -RDEPEND="" -DEPEND="" - -src_install() { - emake DESTDIR="${D}" install - dodoc AUTHORS ChangeLog NEWS README - exeinto /etc/cron.hourly - newexe "${FILESDIR}/cciss_vol_status.cron2" cciss_vol_status -} diff --git a/sys-apps/cciss_vol_status/cciss_vol_status-1.12a.ebuild b/sys-apps/cciss_vol_status/cciss_vol_status-1.12a.ebuild new file mode 100644 index 000000000000..94fedd2679d0 --- /dev/null +++ b/sys-apps/cciss_vol_status/cciss_vol_status-1.12a.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +IUSE="" +DESCRIPTION="Shows status of logical drives attached to HP SmartArray controllers" +HOMEPAGE="http://cciss.sourceforge.net/#cciss_utils" +LICENSE="GPL-2" +SRC_URI="mirror://sourceforge/cciss/${P}.tar.gz" +KEYWORDS="amd64 ~ia64 x86" +SLOT="0" +RDEPEND="" +DEPEND="" + +src_install() { + emake DESTDIR="${D}" install + dodoc AUTHORS ChangeLog NEWS README + exeinto /etc/cron.hourly + newexe "${FILESDIR}/cciss_vol_status-r2.cron" cciss_vol_status +} diff --git a/sys-apps/cciss_vol_status/files/cciss_vol_status-r2.cron b/sys-apps/cciss_vol_status/files/cciss_vol_status-r2.cron new file mode 100644 index 000000000000..43731b48e0ca --- /dev/null +++ b/sys-apps/cciss_vol_status/files/cciss_vol_status-r2.cron @@ -0,0 +1,52 @@ +#!/bin/sh + +test -x /usr/bin/cciss_vol_status || exit 0 + +# WARNING: For the hpsa driver, we only support /dev/sda through +# /dev/sdz and /dev/sg0 through /dev/sg9. +DEVICES=$(find /dev -type b \( -path '/dev/cciss/c*d0' \ + -or \ + -path '/dev/sd[a-z]' \ + -or \ + -path '/dev/sg[0-9]' \)) + +if [ -n "${DEVICES}" ]; then + # + # Unsupported devices will generate an error (to stderr) of the form, + # + # cciss_vol_status: /dev/sda: Unknown SCSI device. + # + # We want to ignore these, and fortunately, an exit code of zero + # is returned in this case. So we need only hide the output by + # redirecting stderr elsewhere. But, that also hides errors of the + # form, + # + # cciss_vol_status: open /dev/sda: Permission denied + # + # which we DO want to present to the user. So instead of sending + # stderr to stdout, we redirect it to a temporary file. We then + # show the content of the temporary file to the user if it + # contains errors other than "Unknown SCSI device." + # + TMPFILE=$( mktemp ) + if [ $? -ne 0 ] || [ ! -f "${TMPFILE}" ]; then + echo "${0}: error creating temporary file." >&2 + exit 2 + fi + + OUTPUT=$( /usr/bin/cciss_vol_status ${DEVICES} 2> "${TMPFILE}" ) + if [ $? -ne 0 ]; then + printf "%s\n" "$OUTPUT" + rm -f "${TMPFILE}" + exit 1 + fi + + ERRORS=$( GREP_OPTIONS="" grep -v "Unknown SCSI device" "${TMPFILE}" ) + rm -f "${TMPFILE}" + if [ -n "${ERRORS}" ]; then + echo "${ERRORS}" >&2 + exit 3 + fi +fi + +exit 0 diff --git a/sys-apps/cciss_vol_status/files/cciss_vol_status.cron b/sys-apps/cciss_vol_status/files/cciss_vol_status.cron deleted file mode 100644 index 8d1175b45678..000000000000 --- a/sys-apps/cciss_vol_status/files/cciss_vol_status.cron +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -test -x /usr/bin/cciss_vol_status || exit 0 - -STATUS=0 - -if [ -d /proc/driver/cciss ]; then - DEVS=`awk -F: '/^cciss\/c.*d0/{print "/dev/" $1}' /proc/driver/cciss/cciss*` - OUTPUT=`/usr/bin/cciss_vol_status $DEVS` - if [ $? -ne 0 ]; then - printf "%s\n" "$OUTPUT" - exit 1 - fi -fi -# FIXME: This cronjob should also look at the scsi generic nodes -# (/dev/sg*?) to cover the hpsa driver, fibre-attached MSA1000 family -# devices, orthehpahcisr software RAID driver (see cciss_vol_status(8) -# about how to choose the correct nodes -- i don't use these other -# devices, so i cannot verify how to check them cleanly) -# -exit 0 diff --git a/sys-apps/cciss_vol_status/files/cciss_vol_status.cron2 b/sys-apps/cciss_vol_status/files/cciss_vol_status.cron2 deleted file mode 100644 index 43731b48e0ca..000000000000 --- a/sys-apps/cciss_vol_status/files/cciss_vol_status.cron2 +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh - -test -x /usr/bin/cciss_vol_status || exit 0 - -# WARNING: For the hpsa driver, we only support /dev/sda through -# /dev/sdz and /dev/sg0 through /dev/sg9. -DEVICES=$(find /dev -type b \( -path '/dev/cciss/c*d0' \ - -or \ - -path '/dev/sd[a-z]' \ - -or \ - -path '/dev/sg[0-9]' \)) - -if [ -n "${DEVICES}" ]; then - # - # Unsupported devices will generate an error (to stderr) of the form, - # - # cciss_vol_status: /dev/sda: Unknown SCSI device. - # - # We want to ignore these, and fortunately, an exit code of zero - # is returned in this case. So we need only hide the output by - # redirecting stderr elsewhere. But, that also hides errors of the - # form, - # - # cciss_vol_status: open /dev/sda: Permission denied - # - # which we DO want to present to the user. So instead of sending - # stderr to stdout, we redirect it to a temporary file. We then - # show the content of the temporary file to the user if it - # contains errors other than "Unknown SCSI device." - # - TMPFILE=$( mktemp ) - if [ $? -ne 0 ] || [ ! -f "${TMPFILE}" ]; then - echo "${0}: error creating temporary file." >&2 - exit 2 - fi - - OUTPUT=$( /usr/bin/cciss_vol_status ${DEVICES} 2> "${TMPFILE}" ) - if [ $? -ne 0 ]; then - printf "%s\n" "$OUTPUT" - rm -f "${TMPFILE}" - exit 1 - fi - - ERRORS=$( GREP_OPTIONS="" grep -v "Unknown SCSI device" "${TMPFILE}" ) - rm -f "${TMPFILE}" - if [ -n "${ERRORS}" ]; then - echo "${ERRORS}" >&2 - exit 3 - fi -fi - -exit 0 -- cgit v1.2.3-65-gdbad