From ba800dc986522f0b58bafa0269706a6a5e09e4c6 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2016 05:46:49 +0000 Subject: import smartmontools-6.2-7.el7 --- diff --git a/SOURCES/smartmontools-6.2-discovermore.patch b/SOURCES/smartmontools-6.2-discovermore.patch new file mode 100644 index 0000000..f9610d9 --- /dev/null +++ b/SOURCES/smartmontools-6.2-discovermore.patch @@ -0,0 +1,12 @@ +diff -up smartmontools-6.2/os_linux.cpp.discovermore smartmontools-6.2/os_linux.cpp +--- smartmontools-6.2/os_linux.cpp.discovermore 2016-05-05 10:28:19.661725361 +0200 ++++ smartmontools-6.2/os_linux.cpp 2016-05-05 10:28:43.252945983 +0200 +@@ -2488,7 +2488,7 @@ bool linux_smart_interface::get_dev_list + } + + // did we find too many paths? +- const int max_pathc = 32; ++ const int max_pathc = 1024; + int n = (int)globbuf.gl_pathc; + if (n > max_pathc) { + pout("glob(3) found %d > MAX=%d devices matching pattern %s: ignoring %d paths\n", diff --git a/SOURCES/smartmontools-6.2-drivedbman.patch b/SOURCES/smartmontools-6.2-drivedbman.patch new file mode 100644 index 0000000..fadce0f --- /dev/null +++ b/SOURCES/smartmontools-6.2-drivedbman.patch @@ -0,0 +1,157 @@ +diff -up smartmontools-6.2/Makefile.am.drivedbman smartmontools-6.2/Makefile.am +--- smartmontools-6.2/Makefile.am.drivedbman 2013-01-26 22:11:02.000000000 +0100 ++++ smartmontools-6.2/Makefile.am 2016-09-07 17:22:23.382337649 +0200 +@@ -288,7 +288,8 @@ else + # For systems that adopts traditional manner + man_MANS = smartd.conf.5 \ + smartctl.8 \ +- smartd.8 ++ smartd.8 \ ++ update-smart-drivedb.8 + endif + + docsdir=$(docdir) +@@ -360,6 +361,7 @@ EXTRA_DIST = \ + smartd.service.in \ + smartd_warning.sh.in \ + update-smart-drivedb.in \ ++ update-smart-drivedb.8.in \ + m4/pkg.m4 \ + os_darwin/SMART.in \ + os_darwin/StartupParameters.plist \ +@@ -398,6 +400,7 @@ CLEANFILES = \ + smartd_warning.sh \ + svnversion.h \ + update-smart-drivedb \ ++ update-smart-drivedb.8 \ + SMART + + # 'make maintainer-clean' also removes files generated by './autogen.sh' +@@ -597,6 +600,9 @@ smartd.8: smartd.8.in Makefile svnversio + smartd.conf.5: smartd.conf.5.in Makefile svnversion.h + cat $(srcdir)/smartd.conf.5.in | $(MAN_FILTER) > $@ + ++update-smart-drivedb.8: update-smart-drivedb.8.in Makefile svnversion.h ++ cat $(srcdir)/update-smart-drivedb.8.in | $(MAN_FILTER) > $@ ++ + # Commands to convert man pages into .html and .txt + # TODO: configure + MAN2HTML = man2html +diff -up smartmontools-6.2/update-smart-drivedb.8.in.drivedbman smartmontools-6.2/update-smart-drivedb.8.in +--- smartmontools-6.2/update-smart-drivedb.8.in.drivedbman 2016-09-07 17:20:44.354661063 +0200 ++++ smartmontools-6.2/update-smart-drivedb.8.in 2016-09-07 17:20:44.354661063 +0200 +@@ -0,0 +1,114 @@ ++.ig ++Copyright (C) 2013 Hannes von Haugwitz ++Copyright (C) 2014-16 Christian Franke ++ ++$Id: update-smart-drivedb.8.in 4223 2016-02-26 20:18:40Z chrfranke $ ++ ++This program is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++You should have received a copy of the GNU General Public License ++(for example COPYING); If not, see . ++ ++.. ++.TH UPDATE-SMART-DRIVEDB 8 "CURRENT_SVN_DATE" "CURRENT_SVN_VERSION" "SMART Monitoring Tools" ++.SH NAME ++update-smart-drivedb \- update smartmontools drive database ++ ++.SH "SYNOPSIS" ++.B update-smart-drivedb ++.RI [ OPTIONS ] ++.RI [ DESTFILE ] ++ ++.SH "DESCRIPTION" ++.\" %IF NOT OS ALL ++.\"! [This man page is generated for the OS_MAN_FILTER version of smartmontools. ++.\"! It does not contain info specific to other platforms.] ++.\"! .PP ++.\" %ENDIF NOT OS ALL ++.B update-smart-drivedb ++updates ++.B /usr/local/share/smartmontools/drivedb.h ++or ++.I DESTFILE ++from smartmontools SVN repository. ++ ++It tries to download first from the current branch and then from ++trunk. The tools used for downloading are either ++.BR curl (1), ++.BR wget (1), ++.BR lynx (1), ++.\" %IF OS FreeBSD ++.BR fetch (1) ++[FreeBSD only], ++.\" %ENDIF OS FreeBSD ++.\" %IF OS OpenBSD ++.BR ftp (1) ++[OpenBSD only], ++.\" %ENDIF OS OpenBSD ++or ++.BR svn (1). ++ ++The old file is kept if the downloaded file is identical (ignoring ++the differences in Id string) otherwise it is moved to ++.BR drivedb.h.old . ++ ++.SH "OPTIONS" ++.TP ++.B \-v ++Verbose output. ++ ++.SH "EXAMPLES" ++.nf ++# update-smart-drivedb ++/usr/local/share/smartmontools/drivedb.h updated from branches/RELEASE_6_0_DRIVEDB ++.fi ++ ++.SH "EXIT STATUS" ++The exit status is 0 if the database has been successfully ++updated. If an error occurs the exit status is 1. ++ ++.SH FILES ++.TP ++.B /usr/local/sbin/update-smart-drivedb ++full path of this script. ++.TP ++.B /usr/local/sbin/smartctl ++used to check syntax of new drive database. ++.TP ++.B /usr/local/share/smartmontools/drivedb.h ++current drive database. ++.TP ++.B /usr/local/share/smartmontools/drivedb.h.old ++previous drive database. ++.TP ++.B /usr/local/share/smartmontools/drivedb.h.error ++new drive database if rejected due to syntax errors. ++.TP ++.B /usr/local/share/smartmontools/drivedb.h.lastcheck ++empty file created if downloaded file was identical. ++ ++.SH AUTHORS ++\fBChristian Franke\fP. ++.br ++This manual page was originally written by ++.BR "Hannes von Haugwitz " . ++ ++.SH REPORTING BUGS ++To submit a bug report, create a ticket in smartmontools wiki: ++.br ++<\fBhttp://www.smartmontools.org/\fP>. ++.br ++Alternatively send the info to the smartmontools support mailing list: ++.br ++<\fBhttps://lists.sourceforge.net/lists/listinfo/smartmontools-support\fB>. ++ ++.SH SEE ALSO ++\fBsmartctl\fP(8), \fBsmartd\fP(8). ++ ++.SH PACKAGE VERSION ++CURRENT_SVN_VERSION CURRENT_SVN_DATE CURRENT_SVN_REV ++.br ++$Id: update-smart-drivedb.8.in 4223 2016-02-26 20:18:40Z chrfranke $ diff --git a/SOURCES/smartmontools-6.2-httpsdrivedb.patch b/SOURCES/smartmontools-6.2-httpsdrivedb.patch new file mode 100644 index 0000000..c579fc6 --- /dev/null +++ b/SOURCES/smartmontools-6.2-httpsdrivedb.patch @@ -0,0 +1,12 @@ +diff -up smartmontools-6.2/update-smart-drivedb.in.httpsdrivedb smartmontools-6.2/update-smart-drivedb.in +--- smartmontools-6.2/update-smart-drivedb.in.httpsdrivedb 2016-09-07 17:01:31.459785835 +0200 ++++ smartmontools-6.2/update-smart-drivedb.in 2016-09-07 17:01:31.471785916 +0200 +@@ -40,7 +40,7 @@ DEST="$drivedbdir/drivedb.h" + SMARTCTL="$sbindir/smartctl" + + # Download URL for sourceforge code browser +-SRCEXPR='http://sourceforge.net/p/smartmontools/code/HEAD/tree/$location/smartmontools/drivedb.h?format=raw' ++SRCEXPR='https://sourceforge.net/p/smartmontools/code/HEAD/tree/$location/smartmontools/drivedb.h?format=raw' + + # Parse options + q="-q " diff --git a/SOURCES/smartmontools-6.4-fdleak.patch b/SOURCES/smartmontools-6.4-fdleak.patch new file mode 100644 index 0000000..7e74e27 --- /dev/null +++ b/SOURCES/smartmontools-6.4-fdleak.patch @@ -0,0 +1,11 @@ +diff -up smartmontools-6.2/os_linux.cpp.fdleak smartmontools-6.2/os_linux.cpp +--- smartmontools-6.2/os_linux.cpp.fdleak 2013-07-05 12:40:38.000000000 +0200 ++++ smartmontools-6.2/os_linux.cpp 2016-05-02 15:38:59.369700749 +0200 +@@ -2703,6 +2703,7 @@ linux_smart_interface::megasas_dcmd_cmd( + } + + int r = ioctl(fd, MEGASAS_IOC_FIRMWARE, &ioc); ++ ::close(fd); + if (r < 0) { + return (r); + } diff --git a/SPECS/smartmontools.spec b/SPECS/smartmontools.spec index c843775..f5f6e09 100644 --- a/SPECS/smartmontools.spec +++ b/SPECS/smartmontools.spec @@ -1,7 +1,7 @@ Summary: Tools for monitoring SMART capable hard disks Name: smartmontools Version: 6.2 -Release: 4%{?dist} +Release: 7%{?dist} Epoch: 1 Group: System Environment/Base License: GPLv2+ @@ -12,6 +12,12 @@ Source4: smartdnotify #fedora/rhel specific Patch1: smartmontools-5.38-defaultconf.patch +#from upstream, rhbz#1212582 +Patch2: smartmontools-6.4-fdleak.patch +#from upstream, rhbz#1294999 +Patch3: smartmontools-6.2-discovermore.patch +Patch4: smartmontools-6.2-httpsdrivedb.patch +Patch5: smartmontools-6.2-drivedbman.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Requires: fileutils mailx chkconfig @@ -35,6 +41,10 @@ failure. %prep %setup -q %patch1 -p1 -b .defaultconf +%patch2 -p1 -b .fdleak +%patch3 -p1 -b .discovermore +%patch4 -p1 -b .httpsdrivedb +%patch5 -p1 -b .drivedbman # fix encoding for fe in AUTHORS ChangeLog @@ -104,10 +114,21 @@ fi %{_sbindir}/update-smart-drivedb %{_sbindir}/smartctl %{_mandir}/man?/smart*.* +%{_mandir}/man8/update-smart-drivedb.8* %{_libexecdir}/%{name} %{_datadir}/%{name} %changelog +* Wed Sep 07 2016 Michal Hlavinka - 1:6.2-7 +- add update-smart-drivedb.8 man page (#1367237) +- fix drivedb update url (#1364830) + +* Thu May 05 2016 Michal Hlavinka - 1:6.2-6 +- allow to discover more devices (#1294999) + +* Mon May 02 2016 Michal Hlavinka - 1:6.2-5 +- do not leak file descriptor when calling mailx (#1212582) + * Fri Jan 24 2014 Daniel Mach - 1:6.2-4 - Mass rebuild 2014-01-24