[gentoo-commits] repo/gentoo:master commit in: sys-apps/smartmontools/files/, sys-apps/smartmontools/
commit: 55ea66e73da3b7d76f05bc512d4b01bf4802155a Author: Louis Sautier gentoo org> AuthorDate: Sat Nov 6 20:14:27 2021 + Commit: Louis Sautier gentoo org> CommitDate: Sat Nov 6 20:34:49 2021 + 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 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 000..77337550822 --- /dev/null +++ b/sys-apps/smartmontools/files/smartmontools-7.2-update-smart-drivedb-quiet.patch @@ -0,0 +1,86 @@ +commit 56363dff436c12eaa296bbba39dfd65ec3f1f1f2 +Author: chrfranke +Date: Sat Nov 6 15:07:18 2021 + + +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 +-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-keyPrint the OpenPGP/GPG public key block + --dryrunPrint 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
[gentoo-commits] repo/gentoo:master commit in: sys-apps/smartmontools/files/, sys-apps/smartmontools/
commit: 245e296b2cf5918d52b52e33af1822d424732ebe Author: Thomas Deutschmann gentoo org> AuthorDate: Sun Jan 14 19:10:55 2018 + Commit: Thomas Deutschmann gentoo org> CommitDate: Sun Jan 14 19:11:11 2018 + 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 000..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
[gentoo-commits] repo/gentoo:master commit in: sys-apps/smartmontools/files/, sys-apps/smartmontools/
commit: ad8950f967e37dcff1fb1ab9fcd2e0b4001b0a69 Author: Thomas Deutschmann gentoo org> AuthorDate: Tue Oct 31 21:51:15 2017 + Commit: Thomas Deutschmann gentoo org> CommitDate: Tue Oct 31 21:52:56 2017 + 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 000..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 @@ Gentoo Base System + Build against sys-libs/libcap-ng to allow smartd to drop its privileges. + Install the monitoring daemon (smartd) and associated scripts. Do not install the monitoring daemon and associated scripts. Install a script to update the drivedb file. 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 000..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} == "" ]] ; 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 ) )" +
[gentoo-commits] repo/gentoo:master commit in: sys-apps/smartmontools/files/, sys-apps/smartmontools/
commit: 13b11d0a5c7a197c66ef8cd986d475c2b215cc64 Author: Lars Wendler gentoo org> AuthorDate: Mon Apr 18 13:44:31 2016 + Commit: Lars Wendler gentoo org> CommitDate: Mon Apr 18 13:56:23 2016 + 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 gentoo.org> sys-apps/smartmontools/files/smartd-r1.rc | 4 +- .../files/smartmontools-update-drivedb | 3 ++ ...ols-.ebuild => smartmontools-6.4-r1.ebuild} | 53 +- sys-apps/smartmontools/smartmontools-.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 000..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-.ebuild b/sys-apps/smartmontools/smartmontools-6.4-r1.ebuild similarity index 50% copy from sys-apps/smartmontools/smartmontools-.ebuild copy to sys-apps/smartmontools/smartmontools-6.4-r1.ebuild index 241fec4..9b4bce3 100644 --- a/sys-apps/smartmontools/smartmontools-.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} == "" ]] ; then @@ -11,17 +11,21 @@ if [[ ${PV} == "" ]] ; 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} == "" ]] ; 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