* [gentoo-commits] repo/gentoo:master commit in: sys-apps/smartmontools/files/, sys-apps/smartmontools/
@ 2016-04-18 13:56 Lars Wendler
0 siblings, 0 replies; 4+ messages in thread
From: Lars Wendler @ 2016-04-18 13:56 UTC (permalink / raw
To: gentoo-commits
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
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/smartmontools/files/, sys-apps/smartmontools/
@ 2017-10-31 21:53 Thomas Deutschmann
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Deutschmann @ 2017-10-31 21:53 UTC (permalink / raw
To: gentoo-commits
commit: ad8950f967e37dcff1fb1ab9fcd2e0b4001b0a69
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 31 21:51:15 2017 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Oct 31 21:52:56 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad8950f9
sys-apps/smartmontools: Rev bump to address several problems
- EAPI updated to EAPI 6.
- Depend on sys-freebsd/freebsd-lib[usb] on FreeBSD. (bug #552054)
- Update smartd systemd service to reflect that we don't provide a general
config file for the service. Users are supposed to overwrite the
provided service if they want to pass additional
parameters. (bug #527648)
- We no longer install executable files in /usr/share/{PN}. (bug #622072)
- "minimal" USE flag was replaced by "daemon" USE flag to better indicate
what the USE flag does.
- "caps" USE flag now requires "daemon" USE flag.
- It is now possible to use the "update_drivedb" USE flag
alone (i.e. without the "minimal", now "daemon" USE flag). (bug #635700)
- The drive database logic was rewritten: Per default we try to install
the drive database shipped with the package. If there's already a drive
database installed we will not replace the database anymore in
assumption that the user has updated the database in the meantime and
want to preserve the changes.
A warning will be displayed in this case with an instruction how to
update or restore the default drive database shipped with the package.
The new logic now also works when using binary packages. (bug #575292)
- RDEPENDs on net-misc/curl, net-misc/wget, www-client/lynx and
dev-vcs/subversion (just one of them is required!) were added when using
"update_drivedb" USE flag.
Closes: https://bugs.gentoo.org/552054
Closes: https://bugs.gentoo.org/527648
Closes: https://bugs.gentoo.org/622072
Closes: https://bugs.gentoo.org/635700
Closes: https://bugs.gentoo.org/575292
Package-Manager: Portage-2.3.13, Repoman-2.3.4
sys-apps/smartmontools/files/smartd.systemd | 11 ++
sys-apps/smartmontools/metadata.xml | 2 +
sys-apps/smartmontools/smartmontools-6.5-r1.ebuild | 148 +++++++++++++++++++++
3 files changed, 161 insertions(+)
diff --git a/sys-apps/smartmontools/files/smartd.systemd b/sys-apps/smartmontools/files/smartd.systemd
new file mode 100644
index 00000000000..bdcbdbbe306
--- /dev/null
+++ b/sys-apps/smartmontools/files/smartd.systemd
@@ -0,0 +1,11 @@
+[Unit]
+Description=Self Monitoring and Reporting Technology (SMART) Daemon
+Documentation=man:smartd(8) man:smartd.conf(5)
+
+[Service]
+ExecStart=/usr/sbin/smartd -n
+ExecReload=/bin/kill -HUP $MAINPID
+StandardOutput=syslog
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-apps/smartmontools/metadata.xml b/sys-apps/smartmontools/metadata.xml
index b3555884800..0ae4667bf8d 100644
--- a/sys-apps/smartmontools/metadata.xml
+++ b/sys-apps/smartmontools/metadata.xml
@@ -6,6 +6,8 @@
<name>Gentoo Base System</name>
</maintainer>
<use>
+ <flag name="caps">Build against <pkg>sys-libs/libcap-ng</pkg> to allow smartd to drop its privileges.</flag>
+ <flag name="daemon">Install the monitoring daemon (smartd) and associated scripts.</flag>
<flag name="minimal">Do not install the monitoring daemon and associated scripts.</flag>
<flag name="update_drivedb">Install a script to update the drivedb file.</flag>
</use>
diff --git a/sys-apps/smartmontools/smartmontools-6.5-r1.ebuild b/sys-apps/smartmontools/smartmontools-6.5-r1.ebuild
new file mode 100644
index 00000000000..499584db4c3
--- /dev/null
+++ b/sys-apps/smartmontools/smartmontools-6.5-r1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools flag-o-matic systemd
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="https://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools"
+ ESVN_PROJECT="smartmontools"
+ inherit subversion
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~x64-macos"
+fi
+
+DESCRIPTION="Tools to monitor storage systems to provide advanced warning of disk degradation"
+HOMEPAGE="https://www.smartmontools.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="caps +daemon selinux static update_drivedb"
+
+DEPEND="
+ caps? (
+ static? ( sys-libs/libcap-ng[static-libs] )
+ !static? ( sys-libs/libcap-ng )
+ )
+ kernel_FreeBSD? (
+ sys-freebsd/freebsd-lib[usb]
+ )
+ selinux? (
+ sys-libs/libselinux
+ )"
+RDEPEND="${DEPEND}
+ daemon? ( virtual/mailx )
+ selinux? ( sec-policy/selinux-smartmon )
+ update_drivedb? (
+ || (
+ net-misc/curl
+ net-misc/wget
+ www-client/lynx
+ dev-vcs/subversion
+ )
+ )
+"
+
+REQUIRED_USE="( caps? ( daemon ) )"
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+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.
+ myeconfargs=(
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --with-drivedbdir="${EPREFIX}/var/db/${PN}" #575292
+ --with-initscriptdir="${EPREFIX}/etc/init.d"
+ $(use_with caps libcap-ng)
+ $(use_with selinux)
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+ $(use_with update_drivedb update-smart-drivedb)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ local db_path="/var/db/${PN}"
+
+ if use daemon; then
+ default
+
+ newinitd "${FILESDIR}"/smartd-r1.rc smartd
+ newconfd "${FILESDIR}"/smartd.confd smartd
+ systemd_newunit "${FILESDIR}"/smartd.systemd smartd.service
+ else
+ dosbin smartctl
+ doman smartctl.8
+
+ local DOCS=( AUTHORS ChangeL* COPYING INSTALL NEWS README TODO )
+ einstalldocs
+ fi
+
+ if use update_drivedb ; then
+ if ! use daemon; then
+ dosbin "${S}"/update-smart-drivedb
+ fi
+
+ exeinto /etc/cron.monthly
+ doexe "${FILESDIR}/${PN}-update-drivedb"
+ fi
+
+ if use daemon || use update_drivedb; then
+ keepdir "${db_path}"
+
+ # Install a copy of the initial drivedb.h to /usr/share/${PN}
+ # so that we can access that file later in pkg_postinst
+ # even when dealing with binary packages (bug #575292)
+ insinto /usr/share/${PN}
+ doins "${S}"/drivedb.h
+ fi
+
+ # Make sure we never install drivedb.h into the db location
+ # of the acutal image so we don't record hashes because user
+ # can modify that file
+ rm -f "${ED%/}${db_path}/drivedb.h" || die
+
+ # Bug #622072
+ find "${ED%/}"/usr/share/doc -type f -exec chmod a-x '{}' \; || die
+}
+
+pkg_postinst() {
+ if use daemon || use update_drivedb; then
+ local initial_db_file="${EPREFIX%/}/usr/share/${PN}/drivedb.h"
+ local db_path="${EPREFIX%/}/var/db/${PN}"
+
+ if [[ ! -f "${db_path}/drivedb.h" ]] ; then
+ # No initial database found
+ cp "${initial_db_file}" "${db_path}" || die
+ einfo "Default drive database which was shipped with this release of ${PN}"
+ einfo "has been installed to '${db_path}'."
+ else
+ ewarn "WARNING: There's already a drive database in '${db_path}'!"
+ ewarn "Because we cannot determine if this database is untouched"
+ ewarn "or was modified by the user you have to manually update the"
+ ewarn "drive database:"
+ ewarn ""
+ ewarn "a) Replace '${db_path}/drivedb.h' by the database shipped with this"
+ ewarn " release which can be found in '${initial_db_file}', i.e."
+ ewarn ""
+ ewarn " cp \"${initial_db_file}\" \"${db_path}\""
+ ewarn ""
+ ewarn "b) Run the following command as root:"
+ ewarn ""
+ ewarn " /usr/sbin/update-smart-drivedb"
+
+ if ! use update_drivedb ; then
+ ewarn ""
+ ewarn "However, 'update-smart-drivedb' requires that you re-emerge ${PN}"
+ ewarn "with USE='update_drivedb'."
+ fi
+ fi
+ fi
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/smartmontools/files/, sys-apps/smartmontools/
@ 2018-01-14 19:11 Thomas Deutschmann
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Deutschmann @ 2018-01-14 19:11 UTC (permalink / raw
To: gentoo-commits
commit: 245e296b2cf5918d52b52e33af1822d424732ebe
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 14 19:10:55 2018 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jan 14 19:11:11 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=245e296b
sys-apps/smartmontools: Fix build on MUSL
Closes: https://bugs.gentoo.org/644586
Package-Manager: Portage-2.3.19, Repoman-2.3.6
.../files/smartmontools-6.6-fix-build-on-musl.patch | 13 +++++++++++++
sys-apps/smartmontools/smartmontools-6.6.ebuild | 2 ++
2 files changed, 15 insertions(+)
diff --git a/sys-apps/smartmontools/files/smartmontools-6.6-fix-build-on-musl.patch b/sys-apps/smartmontools/files/smartmontools-6.6-fix-build-on-musl.patch
new file mode 100644
index 00000000000..2cd36e0dce5
--- /dev/null
+++ b/sys-apps/smartmontools/files/smartmontools-6.6-fix-build-on-musl.patch
@@ -0,0 +1,13 @@
+Bug: https://bugs.gentoo.org/644586
+
+Upstream fix: https://www.smartmontools.org/changeset/4603
+
+--- smartmontools-6.6/os_linux.cpp
++++ smartmontools-6.6/os_linux.cpp
+@@ -3177,5 +3177,5 @@
+ char path[128];
+ snprintf(path, sizeof(path), "/sys/block/%s/device", name);
+- char * syshostpath = canonicalize_file_name(path);
++ char * syshostpath = realpath(name, (char *)0);
+ if (!syshostpath)
+ return false;
diff --git a/sys-apps/smartmontools/smartmontools-6.6.ebuild b/sys-apps/smartmontools/smartmontools-6.6.ebuild
index e96fcf91947..5edbb8d138d 100644
--- a/sys-apps/smartmontools/smartmontools-6.6.ebuild
+++ b/sys-apps/smartmontools/smartmontools-6.6.ebuild
@@ -47,6 +47,8 @@ RDEPEND="${DEPEND}
REQUIRED_USE="( caps? ( daemon ) )"
+PATCHES=( "${FILESDIR}"/${P}-fix-build-on-musl.patch )
+
src_prepare() {
default
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/smartmontools/files/, sys-apps/smartmontools/
@ 2021-11-06 20:35 Louis Sautier
0 siblings, 0 replies; 4+ messages in thread
From: Louis Sautier @ 2021-11-06 20:35 UTC (permalink / raw
To: gentoo-commits
commit: 55ea66e73da3b7d76f05bc512d4b01bf4802155a
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 6 20:14:27 2021 +0000
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Sat Nov 6 20:34:49 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55ea66e7
sys-apps/smartmontools: updatedb cron: use new -q option
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>
...rtmontools-7.2-update-smart-drivedb-quiet.patch | 86 ++++++++++++++++++++++
.../files/smartmontools-update-drivedb | 4 +-
...s-7.2-r1.ebuild => smartmontools-7.2-r2.ebuild} | 5 ++
3 files changed, 92 insertions(+), 3 deletions(-)
diff --git a/sys-apps/smartmontools/files/smartmontools-7.2-update-smart-drivedb-quiet.patch b/sys-apps/smartmontools/files/smartmontools-7.2-update-smart-drivedb-quiet.patch
new file mode 100644
index 00000000000..77337550822
--- /dev/null
+++ b/sys-apps/smartmontools/files/smartmontools-7.2-update-smart-drivedb-quiet.patch
@@ -0,0 +1,86 @@
+commit 56363dff436c12eaa296bbba39dfd65ec3f1f1f2
+Author: chrfranke <authors@smartmontools.org>
+Date: Sat Nov 6 15:07:18 2021 +0000
+
+ update-smart-drivedb.in: Add '-q' option to suppress info messages.
+ (GH issues/110).
+ update-smart-drivedb.8.in: Document new option.
+
+ git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5242 4ea69e1a-61f1-4043-bf83-b5c94c648137
+
+--- a/update-smart-drivedb.8.in
++++ b/update-smart-drivedb.8.in
+@@ -1,6 +1,6 @@
+ .ig
+ Copyright (C) 2013 Hannes von Haugwitz <hannes@vonhaugwitz.com>
+-Copyright (C) 2014-20 Christian Franke
++Copyright (C) 2014-21 Christian Franke
+
+ SPDX-License-Identifier: GPL-2.0-or-later
+
+@@ -144,6 +144,10 @@ Print the OpenPGP/GPG public key block.
+ .B \-\-dryrun
+ Print download commands only.
+ .TP
++.B \-q
++[NEW EXPERIMENTAL UPDATE-SMART-DRIVEDB FEATURE]
++Suppress info messages.
++.TP
+ .B \-v
+ Verbose output.
+ .Sp
+--- a/update-smart-drivedb.in
++++ b/update-smart-drivedb.in
+@@ -72,6 +72,7 @@ Usage: $myname [OPTIONS] [DESTFILE]
+ --no-verify Don't verify signature
+ --export-key Print the OpenPGP/GPG public key block
+ --dryrun Print download commands only
++ -q Suppress info messages
+ -v Verbose output
+
+ Updates $DRIVEDB
+@@ -131,6 +132,11 @@ inpath()
+ return $rc
+ }
+
++iecho()
++{
++ test -n "$quiet" || echo "$*"
++}
++
+ vecho()
+ {
+ test -n "$q" || echo "$*"
+@@ -522,6 +528,7 @@ mv_all()
+ smtctl=$SMARTCTL
+ tool=
+ urlid="svn"
++quiet=
+ q="-q"
+ dryrun=
+ trunk=
+@@ -547,6 +554,9 @@ while true; do case $1 in
+ shift; test -n "$1" || usage
+ urlid=$1 ;;
+
++ -q)
++ quiet=t ;;
++
+ -v)
+ q= ;;
+
+@@ -727,7 +737,7 @@ if [ -f "$DEST" ]; then
+ then
+ rm -f "$DEST.new" "$DEST.new.raw" "$DEST.new.raw.asc"
+ touch "$DEST.lastcheck"
+- echo "$DEST is already up to date"
++ iecho "$DEST is already up to date"
+ exit 0
+ fi
+ mv_all "$DEST" "" ".old"
+@@ -738,4 +748,4 @@ fi
+
+ mv_all "$DEST" ".new" ""
+
+-echo "$DEST updated from ${trunk:-branches/$brnch}${no_verify:+ (NOT VERIFIED)}"
++iecho "$DEST updated from ${trunk:-branches/$brnch}${no_verify:+ (NOT VERIFIED)}"
diff --git a/sys-apps/smartmontools/files/smartmontools-update-drivedb b/sys-apps/smartmontools/files/smartmontools-update-drivedb
index b7d1bb95243..270789c53d0 100644
--- a/sys-apps/smartmontools/files/smartmontools-update-drivedb
+++ b/sys-apps/smartmontools/files/smartmontools-update-drivedb
@@ -1,5 +1,3 @@
#!/bin/sh
-# Hide stdout until a --quiet switch is added:
-# https://github.com/smartmontools/smartmontools/issues/110
-/usr/sbin/update-smart-drivedb > /dev/null
+/usr/sbin/update-smart-drivedb -q
diff --git a/sys-apps/smartmontools/smartmontools-7.2-r1.ebuild b/sys-apps/smartmontools/smartmontools-7.2-r2.ebuild
similarity index 96%
rename from sys-apps/smartmontools/smartmontools-7.2-r1.ebuild
rename to sys-apps/smartmontools/smartmontools-7.2-r2.ebuild
index 39f90ac1de4..3059ff0feb5 100644
--- a/sys-apps/smartmontools/smartmontools-7.2-r1.ebuild
+++ b/sys-apps/smartmontools/smartmontools-7.2-r2.ebuild
@@ -48,6 +48,11 @@ REQUIRED_USE="(
static? ( !systemd )
)"
+PATCHES=(
+ # Backport from commit 56363dff436c12eaa296bbba39dfd65ec3f1f1f2
+ "${FILESDIR}/${P}-update-smart-drivedb-quiet.patch"
+)
+
src_prepare() {
default
eautoreconf
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-06 20:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-14 19:11 [gentoo-commits] repo/gentoo:master commit in: sys-apps/smartmontools/files/, sys-apps/smartmontools/ Thomas Deutschmann
-- strict thread matches above, loose matches on Subject: below --
2021-11-06 20:35 Louis Sautier
2017-10-31 21:53 Thomas Deutschmann
2016-04-18 13:56 Lars Wendler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox