summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2016-04-18 15:44:31 +0200
committerLars Wendler <polynomial-c@gentoo.org>2016-04-18 15:56:23 +0200
commit13b11d0a5c7a197c66ef8cd986d475c2b215cc64 (patch)
treeeeb02fba29025e9493a749234d98d6645e86f49a /sys-apps
parentx11-terms/terminology: update live ebuild (diff)
downloadgentoo-13b11d0a5c7a197c66ef8cd986d475c2b215cc64.tar.gz
gentoo-13b11d0a5c7a197c66ef8cd986d475c2b215cc64.tar.bz2
gentoo-13b11d0a5c7a197c66ef8cd986d475c2b215cc64.zip
sys-apps/smartmontools: Revbump to fix bugs #575292 and #580424
Don't install drivedb.h into /usr and don't add it to the PM's file database (#575292). Fix download location of latest drivedb.h file (#580424). Package-Manager: portage-2.2.28 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/smartmontools/files/smartd-r1.rc4
-rw-r--r--sys-apps/smartmontools/files/smartmontools-update-drivedb3
-rw-r--r--sys-apps/smartmontools/smartmontools-6.4-r1.ebuild93
-rw-r--r--sys-apps/smartmontools/smartmontools-9999.ebuild53
4 files changed, 140 insertions, 13 deletions
diff --git a/sys-apps/smartmontools/files/smartd-r1.rc b/sys-apps/smartmontools/files/smartd-r1.rc
index 336bc4ea9be9..32e12b720b2f 100644
--- a/sys-apps/smartmontools/files/smartd-r1.rc
+++ b/sys-apps/smartmontools/files/smartd-r1.rc
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
diff --git a/sys-apps/smartmontools/files/smartmontools-update-drivedb b/sys-apps/smartmontools/files/smartmontools-update-drivedb
new file mode 100644
index 000000000000..831f1e6541b5
--- /dev/null
+++ b/sys-apps/smartmontools/files/smartmontools-update-drivedb
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/usr/sbin/update-smart-drivedb
diff --git a/sys-apps/smartmontools/smartmontools-6.4-r1.ebuild b/sys-apps/smartmontools/smartmontools-6.4-r1.ebuild
new file mode 100644
index 000000000000..9b4bce3b1fa3
--- /dev/null
+++ b/sys-apps/smartmontools/smartmontools-6.4-r1.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit flag-o-matic systemd
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk/smartmontools"
+ ESVN_PROJECT="smartmontools"
+ inherit subversion autotools
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~x64-macos"
+fi
+
+DESCRIPTION="Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.) monitoring tools"
+HOMEPAGE="https://www.smartmontools.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="caps minimal selinux static"
+
+DEPEND="
+ caps? (
+ static? ( sys-libs/libcap-ng[static-libs] )
+ !static? ( sys-libs/libcap-ng )
+ )
+ selinux? (
+ sys-libs/libselinux
+ )"
+RDEPEND="${DEPEND}
+ !minimal? ( virtual/mailx )
+ selinux? ( sec-policy/selinux-smartmon )
+"
+
+src_prepare() {
+ # 580424
+ sed '/^SRCEXPR/s@http:@https:@' \
+ -i update-smart-drivedb.in \
+ || die
+ if [[ ${PV} == "9999" ]] ; then
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ use minimal && einfo "Skipping the monitoring daemon for minimal build."
+ use static && append-ldflags -static
+ # The build installs /etc/init.d/smartd, but we clobber it
+ # in our src_install, so no need to manually delete it.
+ myeconfargs=(
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --with-drivedbdir=/var/db/${PN} #575292
+ --with-initscriptdir="${EPREFIX}/etc/init.d"
+ $(use_with caps libcap-ng)
+ $(use_with selinux)
+ $(systemd_with_unitdir)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ if use minimal ; then
+ dosbin smartctl
+ doman smartctl.8
+ else
+ default
+ newinitd "${FILESDIR}"/smartd-r1.rc smartd
+ newconfd "${FILESDIR}"/smartd.confd smartd
+ fi
+
+ # Move drivedb.h file out of PM's sight (bug #575292)
+ mv "${ED}"/var/db/${PN}/drivedb.h "${T}" || die
+
+ exeinto /etc/cron.monthly
+ doexe "${FILESDIR}"/${PN}-update-drivedb
+}
+
+pkg_postinst() {
+ local db_path="/var/db/${PN}"
+
+ if [[ -f "${db_path}/drivedb.h" ]] ; then
+ ewarn "WARNING! The drive database file has been replaced with the version that"
+ ewarn "got shipped with this release of ${PN}. You may want to update the"
+ ewarn "database by running the following command as root:"
+ ewarn ""
+ ewarn "/usr/sbin/update-smart-drivedb"
+ fi
+
+ # Move drivedb.h to /var/db/${PN} (bug #575292)
+ mv "${T}"/drivedb.h ${db_path} || die
+}
diff --git a/sys-apps/smartmontools/smartmontools-9999.ebuild b/sys-apps/smartmontools/smartmontools-9999.ebuild
index 241fec4f456a..9b4bce3b1fa3 100644
--- a/sys-apps/smartmontools/smartmontools-9999.ebuild
+++ b/sys-apps/smartmontools/smartmontools-9999.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI="4"
+EAPI=5
inherit flag-o-matic systemd
if [[ ${PV} == "9999" ]] ; then
@@ -11,17 +11,21 @@ if [[ ${PV} == "9999" ]] ; then
inherit subversion autotools
else
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-freebsd ~x86-linux ~x64-macos"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~x64-macos"
fi
DESCRIPTION="Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.) monitoring tools"
-HOMEPAGE="http://smartmontools.sourceforge.net/"
+HOMEPAGE="https://www.smartmontools.org"
LICENSE="GPL-2"
SLOT="0"
IUSE="caps minimal selinux static"
-DEPEND="caps? ( sys-libs/libcap-ng )
+DEPEND="
+ caps? (
+ static? ( sys-libs/libcap-ng[static-libs] )
+ !static? ( sys-libs/libcap-ng )
+ )
selinux? (
sys-libs/libselinux
)"
@@ -31,8 +35,11 @@ RDEPEND="${DEPEND}
"
src_prepare() {
+ # 580424
+ sed '/^SRCEXPR/s@http:@https:@' \
+ -i update-smart-drivedb.in \
+ || die
if [[ ${PV} == "9999" ]] ; then
- #./autogen.sh
eautoreconf
fi
}
@@ -42,12 +49,15 @@ src_configure() {
use static && append-ldflags -static
# The build installs /etc/init.d/smartd, but we clobber it
# in our src_install, so no need to manually delete it.
- econf \
- --docdir="${EPREFIX}/usr/share/doc/${PF}" \
- --with-initscriptdir="${EPREFIX}/etc/init.d" \
- $(use_with caps libcap-ng) \
- $(use_with selinux) \
+ myeconfargs=(
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --with-drivedbdir=/var/db/${PN} #575292
+ --with-initscriptdir="${EPREFIX}/etc/init.d"
+ $(use_with caps libcap-ng)
+ $(use_with selinux)
$(systemd_with_unitdir)
+ )
+ econf "${myeconfargs[@]}"
}
src_install() {
@@ -59,4 +69,25 @@ src_install() {
newinitd "${FILESDIR}"/smartd-r1.rc smartd
newconfd "${FILESDIR}"/smartd.confd smartd
fi
+
+ # Move drivedb.h file out of PM's sight (bug #575292)
+ mv "${ED}"/var/db/${PN}/drivedb.h "${T}" || die
+
+ exeinto /etc/cron.monthly
+ doexe "${FILESDIR}"/${PN}-update-drivedb
+}
+
+pkg_postinst() {
+ local db_path="/var/db/${PN}"
+
+ if [[ -f "${db_path}/drivedb.h" ]] ; then
+ ewarn "WARNING! The drive database file has been replaced with the version that"
+ ewarn "got shipped with this release of ${PN}. You may want to update the"
+ ewarn "database by running the following command as root:"
+ ewarn ""
+ ewarn "/usr/sbin/update-smart-drivedb"
+ fi
+
+ # Move drivedb.h to /var/db/${PN} (bug #575292)
+ mv "${T}"/drivedb.h ${db_path} || die
}