update to 0.19 [release 0.19-1mamba;Wed Aug 08 2012]

This commit is contained in:
Automatic Build System 2024-01-06 03:48:52 +01:00
parent fa3f971e7a
commit f18173b158
4 changed files with 176 additions and 0 deletions

View File

@ -1,2 +1,5 @@
# libatasmart # libatasmart
A small and lightweight parser library for ATA S.M.A.R.T. hard disk
health monitoring.

17
glibc-scsi_h.patch Normal file
View File

@ -0,0 +1,17 @@
--- /usr/include/scsi/scsi.h 2009-07-15 11:00:17.897425654 +0200
+++ /usr/include/scsi/scsi.h.patched 2009-07-15 11:00:08.305425688 +0200
@@ -142,10 +142,10 @@
/* defined in T10 SCSI Primary Commands-2 (SPC2) */
struct scsi_varlen_cdb_hdr {
- u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */
- u8 control;
- u8 misc[5];
- u8 additional_cdb_length; /* total cdb length - 8 */
+ __u8 opcode; /* opcode always == VARIABLE_LENGTH_CMD */
+ __u8 control;
+ __u8 misc[5];
+ __u8 additional_cdb_length; /* total cdb length - 8 */
__be16 service_action;
/* service specific data follows */
};

View File

@ -0,0 +1,52 @@
From 26f0cc57fcf346753f17e75fb1378f053dcba92c Mon Sep 17 00:00:00 2001
From: David Zeuthen <davidz@redhat.com>
Date: Wed, 9 Dec 2009 17:14:36 -0500
Subject: [PATCH] fix return of uninitialized variable
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
atasmart.c: In function ‘init_smart’:
atasmart.c:2556: warning: ‘ret’ may be used uninitialized in this function
We apparently don't initialize the ret variable in init_smart() -
unfortunately
o this warning is never reported with using -O0 (thanks gcc -
see http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings though)
o we never run into this bug with just skdump(1)
The bug does show up in the udisks (aka DeviceKit-disks) use of
libatasmart and this patch fixes it.
Signed-off-by: David Zeuthen <davidz@redhat.com>
---
atasmart.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/atasmart.c b/atasmart.c
index 3ff0334..cf93819 100644
--- a/atasmart.c
+++ b/atasmart.c
@@ -2564,6 +2564,8 @@ static int init_smart(SkDisk *d) {
if (!disk_smart_is_available(d))
return 0;
+ ret = -1;
+
if (!disk_smart_is_enabled(d)) {
if ((ret = disk_smart_enable(d, TRUE)) < 0)
goto fail;
@@ -2580,6 +2582,8 @@ static int init_smart(SkDisk *d) {
disk_smart_read_thresholds(d);
+ ret = 0;
+
fail:
return ret;
}
--
1.6.5.5

104
libatasmart.spec Normal file
View File

@ -0,0 +1,104 @@
Name: libatasmart
Version: 0.19
Release: 1mamba
Summary: ATA S.M.A.R.T. Disk Health Monitoring Library
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Automatic Build System <autodist@mambasoft.it>
URL: http://git.0pointer.de/?p=libatasmart.git;a=summary
Source: http://0pointer.de/public/libatasmart-%{version}.tar.xz
# FIXME rebuild glibc and apply this patch
# see http://www.mail-archive.com/debian-kernel@lists.debian.org/msg48804.html
Source1: glibc-scsi_h.patch
# https://bugs.freedesktop.org/show_bug.cgi?id=25543
Patch0: libatasmart-uninitialized-var.patch
License: LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: udev-devel
## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
A small and lightweight parser library for ATA S.M.A.R.T. hard disk
health monitoring.
%package devel
Group: Development/Libraries
Summary: Libraries and headers for %{name}
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: vala
%description devel
ATA S.M.A.R.T. Disk Health Monitoring Library.
This package contains libraries and header files need for development.
%package static
Group: Development/Libraries
Summary: Static libraries for %{name}
Requires: %{name}-devel = %{?epoch:%epoch:}%{version}-%{release}
%description static
ATA S.M.A.R.T. Disk Health Monitoring Library.
This package contains static libraries need for development.
%prep
%setup -q
%patch0 -p1 -b .uninitialized-var.patch
%build
%configure
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
rm -rf %{buildroot}%{_docdir}/libatasmart/README
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_sbindir}/skdump
%{_sbindir}/sktest
%{_libdir}/libatasmart.so.*
%doc LGPL README
%files devel
%defattr(-,root,root)
%{_includedir}/atasmart.h
%{_libdir}/libatasmart.so
%{_libdir}/pkgconfig/libatasmart.pc
%{_datadir}/vala/vapi/atasmart.vapi
%doc blob-examples/FUJITSU*
%doc blob-examples/INTEL*
%doc blob-examples/MCC*
%doc blob-examples/Maxtor*
%doc blob-examples/SAMSUNG*
%doc blob-examples/ST*
%doc blob-examples/TOSHIBA*
%doc blob-examples/WDC*
%files static
%defattr(-,root,root)
%{_libdir}/libatasmart.*a
%changelog
* Wed Aug 08 2012 Automatic Build System <autodist@mambasoft.it> 0.19-1mamba
- update to 0.19
* Sun Oct 16 2011 Automatic Build System <autodist@mambasoft.it> 0.18-1mamba
- automatic version update by autodist
* Sat Feb 05 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.17-2mamba
- automatic port from devel-gil
* Wed Oct 27 2010 gil <puntogil@libero.it> 0.17-1mamba
- package created by autospec