1 |
commit: 55ea66e73da3b7d76f05bc512d4b01bf4802155a |
2 |
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 6 20:14:27 2021 +0000 |
4 |
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 6 20:34:49 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55ea66e7 |
7 |
|
8 |
sys-apps/smartmontools: updatedb cron: use new -q option |
9 |
|
10 |
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org> |
11 |
|
12 |
...rtmontools-7.2-update-smart-drivedb-quiet.patch | 86 ++++++++++++++++++++++ |
13 |
.../files/smartmontools-update-drivedb | 4 +- |
14 |
...s-7.2-r1.ebuild => smartmontools-7.2-r2.ebuild} | 5 ++ |
15 |
3 files changed, 92 insertions(+), 3 deletions(-) |
16 |
|
17 |
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 |
18 |
new file mode 100644 |
19 |
index 00000000000..77337550822 |
20 |
--- /dev/null |
21 |
+++ b/sys-apps/smartmontools/files/smartmontools-7.2-update-smart-drivedb-quiet.patch |
22 |
@@ -0,0 +1,86 @@ |
23 |
+commit 56363dff436c12eaa296bbba39dfd65ec3f1f1f2 |
24 |
+Author: chrfranke <authors@×××××××××××××.org> |
25 |
+Date: Sat Nov 6 15:07:18 2021 +0000 |
26 |
+ |
27 |
+ update-smart-drivedb.in: Add '-q' option to suppress info messages. |
28 |
+ (GH issues/110). |
29 |
+ update-smart-drivedb.8.in: Document new option. |
30 |
+ |
31 |
+ git-svn-id: http://svn.code.sf.net/p/smartmontools/code/trunk@5242 4ea69e1a-61f1-4043-bf83-b5c94c648137 |
32 |
+ |
33 |
+--- a/update-smart-drivedb.8.in |
34 |
++++ b/update-smart-drivedb.8.in |
35 |
+@@ -1,6 +1,6 @@ |
36 |
+ .ig |
37 |
+ Copyright (C) 2013 Hannes von Haugwitz <hannes@×××××××××××.com> |
38 |
+-Copyright (C) 2014-20 Christian Franke |
39 |
++Copyright (C) 2014-21 Christian Franke |
40 |
+ |
41 |
+ SPDX-License-Identifier: GPL-2.0-or-later |
42 |
+ |
43 |
+@@ -144,6 +144,10 @@ Print the OpenPGP/GPG public key block. |
44 |
+ .B \-\-dryrun |
45 |
+ Print download commands only. |
46 |
+ .TP |
47 |
++.B \-q |
48 |
++[NEW EXPERIMENTAL UPDATE-SMART-DRIVEDB FEATURE] |
49 |
++Suppress info messages. |
50 |
++.TP |
51 |
+ .B \-v |
52 |
+ Verbose output. |
53 |
+ .Sp |
54 |
+--- a/update-smart-drivedb.in |
55 |
++++ b/update-smart-drivedb.in |
56 |
+@@ -72,6 +72,7 @@ Usage: $myname [OPTIONS] [DESTFILE] |
57 |
+ --no-verify Don't verify signature |
58 |
+ --export-key Print the OpenPGP/GPG public key block |
59 |
+ --dryrun Print download commands only |
60 |
++ -q Suppress info messages |
61 |
+ -v Verbose output |
62 |
+ |
63 |
+ Updates $DRIVEDB |
64 |
+@@ -131,6 +132,11 @@ inpath() |
65 |
+ return $rc |
66 |
+ } |
67 |
+ |
68 |
++iecho() |
69 |
++{ |
70 |
++ test -n "$quiet" || echo "$*" |
71 |
++} |
72 |
++ |
73 |
+ vecho() |
74 |
+ { |
75 |
+ test -n "$q" || echo "$*" |
76 |
+@@ -522,6 +528,7 @@ mv_all() |
77 |
+ smtctl=$SMARTCTL |
78 |
+ tool= |
79 |
+ urlid="svn" |
80 |
++quiet= |
81 |
+ q="-q" |
82 |
+ dryrun= |
83 |
+ trunk= |
84 |
+@@ -547,6 +554,9 @@ while true; do case $1 in |
85 |
+ shift; test -n "$1" || usage |
86 |
+ urlid=$1 ;; |
87 |
+ |
88 |
++ -q) |
89 |
++ quiet=t ;; |
90 |
++ |
91 |
+ -v) |
92 |
+ q= ;; |
93 |
+ |
94 |
+@@ -727,7 +737,7 @@ if [ -f "$DEST" ]; then |
95 |
+ then |
96 |
+ rm -f "$DEST.new" "$DEST.new.raw" "$DEST.new.raw.asc" |
97 |
+ touch "$DEST.lastcheck" |
98 |
+- echo "$DEST is already up to date" |
99 |
++ iecho "$DEST is already up to date" |
100 |
+ exit 0 |
101 |
+ fi |
102 |
+ mv_all "$DEST" "" ".old" |
103 |
+@@ -738,4 +748,4 @@ fi |
104 |
+ |
105 |
+ mv_all "$DEST" ".new" "" |
106 |
+ |
107 |
+-echo "$DEST updated from ${trunk:-branches/$brnch}${no_verify:+ (NOT VERIFIED)}" |
108 |
++iecho "$DEST updated from ${trunk:-branches/$brnch}${no_verify:+ (NOT VERIFIED)}" |
109 |
|
110 |
diff --git a/sys-apps/smartmontools/files/smartmontools-update-drivedb b/sys-apps/smartmontools/files/smartmontools-update-drivedb |
111 |
index b7d1bb95243..270789c53d0 100644 |
112 |
--- a/sys-apps/smartmontools/files/smartmontools-update-drivedb |
113 |
+++ b/sys-apps/smartmontools/files/smartmontools-update-drivedb |
114 |
@@ -1,5 +1,3 @@ |
115 |
#!/bin/sh |
116 |
|
117 |
-# Hide stdout until a --quiet switch is added: |
118 |
-# https://github.com/smartmontools/smartmontools/issues/110 |
119 |
-/usr/sbin/update-smart-drivedb > /dev/null |
120 |
+/usr/sbin/update-smart-drivedb -q |
121 |
|
122 |
diff --git a/sys-apps/smartmontools/smartmontools-7.2-r1.ebuild b/sys-apps/smartmontools/smartmontools-7.2-r2.ebuild |
123 |
similarity index 96% |
124 |
rename from sys-apps/smartmontools/smartmontools-7.2-r1.ebuild |
125 |
rename to sys-apps/smartmontools/smartmontools-7.2-r2.ebuild |
126 |
index 39f90ac1de4..3059ff0feb5 100644 |
127 |
--- a/sys-apps/smartmontools/smartmontools-7.2-r1.ebuild |
128 |
+++ b/sys-apps/smartmontools/smartmontools-7.2-r2.ebuild |
129 |
@@ -48,6 +48,11 @@ REQUIRED_USE="( |
130 |
static? ( !systemd ) |
131 |
)" |
132 |
|
133 |
+PATCHES=( |
134 |
+ # Backport from commit 56363dff436c12eaa296bbba39dfd65ec3f1f1f2 |
135 |
+ "${FILESDIR}/${P}-update-smart-drivedb-quiet.patch" |
136 |
+) |
137 |
+ |
138 |
src_prepare() { |
139 |
default |
140 |
eautoreconf |