Adding README.md, .gitignore, .gitattributes; adding python-pySMART files; update to v1.4.2

This commit is contained in:
2025-10-01 14:22:04 -04:00
commit f5c546dbae
8 changed files with 152 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
_buildconfig-*
_buildinfo-*

11
README.md Normal file
View File

@@ -0,0 +1,11 @@
# python-pySMART
URL: [pySMART](https://pypi.org/project/pySMART/)
----
https://github.com/truenas/py-SMART
pySMART is a simple Python wrapper for the smartctl component of smartmontools. It is officially compatible with Linux, Windows and FreeBSD, as long as smartctl is on the system path. Running with administrative rights is strongly recommended, as smartctl cannot accurately detect all device types or parse all SMART information without these permissions.
With only a device's name (ie: /dev/sda, pd0), the package will create a Device object, populated with all relevant information about that device. The documented API can then be used to query this object for information, initiate self-tests, and perform other functions.

3
_service Normal file
View File

@@ -0,0 +1,3 @@
<services>
<service name="download_files" mode="manual" />
</services>

BIN
pysmart-1.4.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

3
python-pySMART-rpmlintrc Normal file
View File

@@ -0,0 +1,3 @@
### 20250419: This is needed when building locally, but not in OBS
addFilter("python-bytecode-inconsistent-mtime *");
#####

39
python-pySMART.changes Normal file
View File

@@ -0,0 +1,39 @@
-------------------------------------------------------------------
Sat Apr 19 21:31:40 UTC 2025 - Scott Bradnick <scott.bradnick@suse.com>
- Changing '%{python_sitelib}/pySMART-%{version}.dist-info' to
'%{python_sitelib}/pysmart-%{version}.dist-info'
-------------------------------------------------------------------
Fri Jan 17 19:25:16 UTC 2025 - Scott Bradnick <scott.bradnick@suse.com>
- Updating to upstream version 1.4.1
* Hotfixes #91. There was an issue regarding the logging.trace custom
handler. This has been patched. Better fix will be provided in the next
release. Thanks @henryptung @weastur @danpodeanu @f18m for reporting.
-------------------------------------------------------------------
Fri Dec 27 19:44:39 UTC 2024 - Scott Bradnick <scott.bradnick@suse.com>
- Updating Requires, was formatted for BuildRequires
-------------------------------------------------------------------
Fri Dec 27 19:27:56 UTC 2024 - Scott Bradnick <scott.bradnick@suse.com>
- Initial version from upstream
* Added support for test polling_minutes. Requested in #77 and #78.
Thanks @Gigahawk
* Minnor typo fixed in NvmeAttributes (issue #81). Thanks @petersulyok
* Minnor fix for JBOD devices (MR #85). Thanks @jackeichen
* Fixed getstate method in Device class. (issue #86). Thanks @f18m
* Added DEVELOP.md file to help developers to get started with the project.
(MR #87). Thanks @ssteinerx
* Fixed listing devices on MACOS (issue #84). Thanks @evanrich
* Fixed get_selftest_result (issue #88). Thanks @guanfeix
* Breaking changes
- smartctl.all:
* Officially removed support for python 3.7.
- smartctl.interface.scsi:
* Now scsi interfaces are handled in the same way as NVMe/ata interfaces.
* device.diags/diagnostics references if_attributes.diags/diagnostics
for backwards compatibility.

68
python-pySMART.spec Normal file
View File

@@ -0,0 +1,68 @@
#
# spec file for package python-pySMART
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define skip_python311 1
%define skip_python312 1
%define short_name_nocaps pysmart
Name: python-pySMART
Version: 1.4.2
Release: 0
Summary: Wrapper for smartctl (smartmontools)
License: LGPL-2.1
URL: https://github.com/truenas/py-SMART
Source: https://files.pythonhosted.org/packages/source/p/pySMART/pysmart-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
Requires: python3-chardet
Requires: python3-humanfriendly
BuildArch: noarch
%python_subpackages
%description
pySMART is a simple Python wrapper for the `smartctl` component of
`smartmontools`. It is officially compatible with Linux, Windows and FreeBSD,
as long as smartctl is on the system path. Running with administrative rights
is strongly recommended, as smartctl cannot accurately detect all device types
or parse all SMART information without these permissions.
With only a device's name (ie: /dev/sda, pd0), the package will create a
`Device` object, populated with all relevant information about that
device. The documented API can then be used to query this object for
information, initiate self-tests, and perform other functions.
%prep
%autosetup -p1 -n %{short_name_nocaps}-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
### 20241227: Not sure why it does pySMART-0.0.0.dist-info otherwise
%python_expand mv -v %{buildroot}%{$python_sitelib}/%{short_name_nocaps}-0.0.0.dist-info %{buildroot}%{$python_sitelib}/%{short_name_nocaps}-%{version}.dist-info
#####
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%{python_sitelib}/pySMART
%{python_sitelib}/%{short_name_nocaps}-%{version}.dist-info
%changelog