Gentoo Archives: gentoo-commits

From: Aric Belsito <lluixhi@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: sys-apps/smartmontools/, sys-apps/smartmontools/files/
Date: Sat, 02 Jun 2018 01:18:23
Message-Id: 1527902166.c02a8ded3f09f25bba976a7f1831d9a6df2da54b.lluixhi@gentoo
1 commit: c02a8ded3f09f25bba976a7f1831d9a6df2da54b
2 Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
3 AuthorDate: Sat Jun 2 01:16:06 2018 +0000
4 Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
5 CommitDate: Sat Jun 2 01:16:06 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=c02a8ded
7
8 sys-apps/smartmontools: remove, fixed in tree
9
10 sys-apps/smartmontools/Manifest | 1 -
11 sys-apps/smartmontools/files/smartd-r1.rc | 28 ----
12 sys-apps/smartmontools/files/smartd.confd | 4 -
13 sys-apps/smartmontools/files/smartd.systemd | 11 --
14 .../files/smartmontools-6.6-realpath.patch | 12 --
15 .../files/smartmontools-update-drivedb | 3 -
16 sys-apps/smartmontools/metadata.xml | 16 ---
17 sys-apps/smartmontools/smartmontools-6.6.ebuild | 152 ---------------------
18 8 files changed, 227 deletions(-)
19
20 diff --git a/sys-apps/smartmontools/Manifest b/sys-apps/smartmontools/Manifest
21 deleted file mode 100644
22 index ee05dce..0000000
23 --- a/sys-apps/smartmontools/Manifest
24 +++ /dev/null
25 @@ -1 +0,0 @@
26 -DIST smartmontools-6.6.tar.gz 903847 SHA256 51f43d0fb064fccaf823bbe68cf0d317d0895ff895aa353b3339a3b316a53054 SHA512 64bb533dac29f62ddd662a16a12c97df1af9cbac9ac526ce7af0b3bff9da49cf265a2030d91a7160452b56a67e80d7f34c9b4e45bbb320114f55695e2cb5cfaf WHIRLPOOL 7a34444977ae069ecf52f9de67077cf67d56a5888bec159ef7e2b19977f821fed8d8b5bca872c6df17cf12a9cb21c0df37dd9bbb44f295774ef93e93f9552bb3
27
28 diff --git a/sys-apps/smartmontools/files/smartd-r1.rc b/sys-apps/smartmontools/files/smartd-r1.rc
29 deleted file mode 100644
30 index 1aa2ece..0000000
31 --- a/sys-apps/smartmontools/files/smartd-r1.rc
32 +++ /dev/null
33 @@ -1,28 +0,0 @@
34 -#!/sbin/openrc-run
35 -# Copyright 1999-2016 Gentoo Foundation
36 -# Distributed under the terms of the GNU General Public License v2
37 -
38 -pidfile="/run/smartd.pid"
39 -command="/usr/sbin/smartd"
40 -command_args="-p ${pidfile} ${SMARTD_OPTS}"
41 -extra_started_commands="reload"
42 -
43 -depend() {
44 - need localmount
45 - after bootmisc
46 -}
47 -
48 -start_pre() {
49 - if [ ! -f "/etc/smartd.conf" ] ; then
50 - eerror "You should setup your /etc/smartd.conf file!"
51 - eerror "See the smartd.conf(5) manpage."
52 - return 1
53 - fi
54 - return 0
55 -}
56 -
57 -reload() {
58 - ebegin "Reloading configuration"
59 - start-stop-daemon --signal HUP --pidfile ${pidfile} ${command##*/}
60 - eend $?
61 -}
62
63 diff --git a/sys-apps/smartmontools/files/smartd.confd b/sys-apps/smartmontools/files/smartd.confd
64 deleted file mode 100644
65 index 4b7db4d..0000000
66 --- a/sys-apps/smartmontools/files/smartd.confd
67 +++ /dev/null
68 @@ -1,4 +0,0 @@
69 -# /etc/conf.d/smartd: config file for /etc/init.d/smartd
70 -
71 -# Insert any other options needed
72 -SMARTD_OPTS=""
73
74 diff --git a/sys-apps/smartmontools/files/smartd.systemd b/sys-apps/smartmontools/files/smartd.systemd
75 deleted file mode 100644
76 index bdcbdbb..0000000
77 --- a/sys-apps/smartmontools/files/smartd.systemd
78 +++ /dev/null
79 @@ -1,11 +0,0 @@
80 -[Unit]
81 -Description=Self Monitoring and Reporting Technology (SMART) Daemon
82 -Documentation=man:smartd(8) man:smartd.conf(5)
83 -
84 -[Service]
85 -ExecStart=/usr/sbin/smartd -n
86 -ExecReload=/bin/kill -HUP $MAINPID
87 -StandardOutput=syslog
88 -
89 -[Install]
90 -WantedBy=multi-user.target
91
92 diff --git a/sys-apps/smartmontools/files/smartmontools-6.6-realpath.patch b/sys-apps/smartmontools/files/smartmontools-6.6-realpath.patch
93 deleted file mode 100644
94 index 7a80f8a..0000000
95 --- a/sys-apps/smartmontools/files/smartmontools-6.6-realpath.patch
96 +++ /dev/null
97 @@ -1,12 +0,0 @@
98 -diff -Naur smartmontools-6.6.orig/os_linux.cpp smartmontools-6.6/os_linux.cpp
99 ---- smartmontools-6.6.orig/os_linux.cpp 2017-11-06 12:06:53.605654329 -0800
100 -+++ smartmontools-6.6/os_linux.cpp 2017-11-06 12:07:41.881653464 -0800
101 -@@ -3176,7 +3176,7 @@
102 - {
103 - char path[128];
104 - snprintf(path, sizeof(path), "/sys/block/%s/device", name);
105 -- char * syshostpath = canonicalize_file_name(path);
106 -+ char * syshostpath = realpath(path, NULL);
107 - if (!syshostpath)
108 - return false;
109 -
110
111 diff --git a/sys-apps/smartmontools/files/smartmontools-update-drivedb b/sys-apps/smartmontools/files/smartmontools-update-drivedb
112 deleted file mode 100644
113 index 831f1e6..0000000
114 --- a/sys-apps/smartmontools/files/smartmontools-update-drivedb
115 +++ /dev/null
116 @@ -1,3 +0,0 @@
117 -#!/bin/sh
118 -
119 -/usr/sbin/update-smart-drivedb
120
121 diff --git a/sys-apps/smartmontools/metadata.xml b/sys-apps/smartmontools/metadata.xml
122 deleted file mode 100644
123 index cb72f51..0000000
124 --- a/sys-apps/smartmontools/metadata.xml
125 +++ /dev/null
126 @@ -1,16 +0,0 @@
127 -<?xml version="1.0" encoding="UTF-8"?>
128 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
129 -<pkgmetadata>
130 -<maintainer type="project">
131 - <email>base-system@g.o</email>
132 - <name>Gentoo Base System</name>
133 -</maintainer>
134 -<use>
135 - <flag name="caps">Build against <pkg>sys-libs/libcap-ng</pkg> to allow smartd to drop its privileges.</flag>
136 - <flag name="daemon">Install the monitoring daemon (smartd) and associated scripts.</flag>
137 - <flag name="update_drivedb">Install a script to update the drivedb file.</flag>
138 -</use>
139 -<upstream>
140 - <remote-id type="sourceforge">smartmontools</remote-id>
141 -</upstream>
142 -</pkgmetadata>
143
144 diff --git a/sys-apps/smartmontools/smartmontools-6.6.ebuild b/sys-apps/smartmontools/smartmontools-6.6.ebuild
145 deleted file mode 100644
146 index 855aea0..0000000
147 --- a/sys-apps/smartmontools/smartmontools-6.6.ebuild
148 +++ /dev/null
149 @@ -1,152 +0,0 @@
150 -# Copyright 1999-2017 Gentoo Foundation
151 -# Distributed under the terms of the GNU General Public License v2
152 -
153 -EAPI=6
154 -
155 -inherit autotools flag-o-matic systemd
156 -if [[ ${PV} == "9999" ]] ; then
157 - ESVN_REPO_URI="https://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools"
158 - ESVN_PROJECT="smartmontools"
159 - inherit subversion
160 -else
161 - SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
162 - KEYWORDS="~amd64 ~arm ~ia64 ~mips ~ppc ~sparc ~x86"
163 -fi
164 -
165 -DESCRIPTION="Tools to monitor storage systems to provide advanced warning of disk degradation"
166 -HOMEPAGE="https://www.smartmontools.org"
167 -
168 -LICENSE="GPL-2"
169 -SLOT="0"
170 -IUSE="caps +daemon selinux static update_drivedb"
171 -
172 -DEPEND="
173 - caps? (
174 - static? ( sys-libs/libcap-ng[static-libs] )
175 - !static? ( sys-libs/libcap-ng )
176 - )
177 - kernel_FreeBSD? (
178 - sys-freebsd/freebsd-lib[usb]
179 - )
180 - selinux? (
181 - sys-libs/libselinux
182 - )"
183 -RDEPEND="${DEPEND}
184 - daemon? ( virtual/mailx )
185 - selinux? ( sec-policy/selinux-smartmon )
186 - update_drivedb? (
187 - app-crypt/gnupg
188 - || (
189 - net-misc/curl
190 - net-misc/wget
191 - www-client/lynx
192 - dev-vcs/subversion
193 - )
194 - )
195 -"
196 -
197 -REQUIRED_USE="( caps? ( daemon ) )"
198 -
199 -PATCHES=( "${FILESDIR}"/${P}-realpath.patch )
200 -
201 -src_prepare() {
202 - default
203 -
204 - eautoreconf
205 -}
206 -
207 -src_configure() {
208 - use static && append-ldflags -static
209 - # The build installs /etc/init.d/smartd, but we clobber it
210 - # in our src_install, so no need to manually delete it.
211 - myeconfargs=(
212 - --docdir="${EPREFIX}/usr/share/doc/${PF}"
213 - --with-drivedbdir="${EPREFIX}/var/db/${PN}" #575292
214 - --with-initscriptdir="${EPREFIX}/etc/init.d"
215 - $(use_with caps libcap-ng)
216 - $(use_with selinux)
217 - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
218 - $(use_with update_drivedb gnupg)
219 - $(use_with update_drivedb update-smart-drivedb)
220 - )
221 - econf "${myeconfargs[@]}"
222 -}
223 -
224 -src_install() {
225 - local db_path="/var/db/${PN}"
226 -
227 - if use daemon; then
228 - default
229 -
230 - newinitd "${FILESDIR}"/smartd-r1.rc smartd
231 - newconfd "${FILESDIR}"/smartd.confd smartd
232 - systemd_newunit "${FILESDIR}"/smartd.systemd smartd.service
233 - else
234 - dosbin smartctl
235 - doman smartctl.8
236 -
237 - local DOCS=( AUTHORS ChangeL* COPYING INSTALL NEWS README TODO )
238 - einstalldocs
239 - fi
240 -
241 - if use update_drivedb ; then
242 - if ! use daemon; then
243 - dosbin "${S}"/update-smart-drivedb
244 - fi
245 -
246 - exeinto /etc/cron.monthly
247 - doexe "${FILESDIR}/${PN}-update-drivedb"
248 - fi
249 -
250 - if use daemon || use update_drivedb; then
251 - keepdir "${db_path}"
252 -
253 - # Install a copy of the initial drivedb.h to /usr/share/${PN}
254 - # so that we can access that file later in pkg_postinst
255 - # even when dealing with binary packages (bug #575292)
256 - insinto /usr/share/${PN}
257 - doins "${S}"/drivedb.h
258 - fi
259 -
260 - # Make sure we never install drivedb.h into the db location
261 - # of the acutal image so we don't record hashes because user
262 - # can modify that file
263 - rm -f "${ED%/}${db_path}/drivedb.h" || die
264 -
265 - # Bug #622072
266 - find "${ED%/}"/usr/share/doc -type f -exec chmod a-x '{}' \; || die
267 -}
268 -
269 -pkg_postinst() {
270 - if use daemon || use update_drivedb; then
271 - local initial_db_file="${EPREFIX%/}/usr/share/${PN}/drivedb.h"
272 - local db_path="${EPREFIX%/}/var/db/${PN}"
273 -
274 - if [[ ! -f "${db_path}/drivedb.h" ]] ; then
275 - # No initial database found
276 - cp "${initial_db_file}" "${db_path}" || die
277 - einfo "Default drive database which was shipped with this release of ${PN}"
278 - einfo "has been installed to '${db_path}'."
279 - else
280 - ewarn "WARNING: There's already a drive database in '${db_path}'!"
281 - ewarn "Because we cannot determine if this database is untouched"
282 - ewarn "or was modified by the user you have to manually update the"
283 - ewarn "drive database:"
284 - ewarn ""
285 - ewarn "a) Replace '${db_path}/drivedb.h' by the database shipped with this"
286 - ewarn " release which can be found in '${initial_db_file}', i.e."
287 - ewarn ""
288 - ewarn " cp \"${initial_db_file}\" \"${db_path}\""
289 - ewarn ""
290 - ewarn "b) Run the following command as root:"
291 - ewarn ""
292 - ewarn " /usr/sbin/update-smart-drivedb"
293 -
294 - if ! use update_drivedb ; then
295 - ewarn ""
296 - ewarn "However, 'update-smart-drivedb' requires that you re-emerge ${PN}"
297 - ewarn "with USE='update_drivedb'."
298 - fi
299 - fi
300 - fi
301 -}