commit: 13b11d0a5c7a197c66ef8cd986d475c2b215cc64
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 18 13:44:31 2016 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Apr 18 13:56:23 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13b11d0a
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 <AT> gentoo.org>
sys-apps/smartmontools/files/smartd-r1.rc | 4 +-
.../files/smartmontools-update-drivedb | 3 ++
...ols-9999.ebuild => smartmontools-6.4-r1.ebuild} | 53 +++++++++++++++++-----
sys-apps/smartmontools/smartmontools-9999.ebuild | 53 +++++++++++++++++-----
4 files changed, 89 insertions(+), 24 deletions(-)
diff --git a/sys-apps/smartmontools/files/smartd-r1.rc
b/sys-apps/smartmontools/files/smartd-r1.rc
index 336bc4e..32e12b7 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 0000000..831f1e6
--- /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-9999.ebuild
b/sys-apps/smartmontools/smartmontools-6.4-r1.ebuild
similarity index 50%
copy from sys-apps/smartmontools/smartmontools-9999.ebuild
copy to sys-apps/smartmontools/smartmontools-6.4-r1.ebuild
index 241fec4..9b4bce3 100644
--- a/sys-apps/smartmontools/smartmontools-9999.ebuild
+++ b/sys-apps/smartmontools/smartmontools-6.4-r1.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
}
diff --git a/sys-apps/smartmontools/smartmontools-9999.ebuild
b/sys-apps/smartmontools/smartmontools-9999.ebuild
index 241fec4..9b4bce3 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
}