-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: address feedback for Fedora package
- Loading branch information
Showing
28 changed files
with
1,310 additions
and
1,261 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,49 @@ | ||
[build-system] | ||
requires = ["setuptools", "pytest"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "smfc" | ||
description = "Super Micro Fan Control for Linux" | ||
readme = "README.md" | ||
version = "3.5.0" | ||
authors = [ | ||
{ name = "Peter Sulyok", email = "[email protected]" } | ||
] | ||
requires-python = ">=3.8" | ||
keywords = ["supermicro", "linux"] | ||
license = {file = "LICENSE"} | ||
dependencies = [] | ||
classifiers = [ | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: POSIX :: Linux", | ||
"Topic :: System :: Hardware", | ||
"Development Status :: 5 - Production/Stable" | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/petersulyok/smfc" | ||
Changelog = "https://github.com/simonw/demo-package/releases" | ||
Issues = "https://github.com/petersulyok/smfc/issues" | ||
|
||
[project.optional-dependencies] | ||
test = [ | ||
"pytest", | ||
] | ||
|
||
[project.scripts] | ||
smfc = "smfc.app:main" | ||
|
||
[tool.setuptools] | ||
packages = ["smfc"] | ||
|
||
# pytest options | ||
[tool.pytest.ini_options] | ||
pythonpath = "src" | ||
filterwarnings = [ "default", "ignore::pytest.PytestCollectionWarning"] | ||
|
||
# flake8 options | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
# | ||
|
||
# Startup options for the service | ||
OPTIONS="-c /opt/smfc/smfc.conf -l 3" | ||
OPTIONS="-c /etc/smfc/smfc.conf -l 3" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[metadata] | ||
name = smfc | ||
version = 3.5.0 | ||
|
||
[options] | ||
packages = | ||
smfc | ||
|
||
[options.entry_points] | ||
console_scripts = | ||
cli-name = smfc.app:main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from setuptools import setup | ||
|
||
setup( | ||
name='smfc', | ||
version='3.5.0', | ||
packages=['smfc'], | ||
entry_points={ | ||
'console_scripts': [ | ||
'smfc = smfc.app:main', | ||
] | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,49 +9,64 @@ Release: 1%{?dist} | |
Summary: Super Micro Fan Control | ||
|
||
License: GPL-3.0-or-later | ||
URL: %{forgeurl} | ||
URL: %{forgeurl} | ||
Source: %{forgesource} | ||
|
||
Requires: systemd | ||
Requires: python3 >= 3.7 | ||
Requires: bash | ||
Requires: ipmitool | ||
Requires: ipmitool | ||
Requires: python3-smfc | ||
Recommends: smartmontools | ||
Recommends: hddtemp | ||
|
||
BuildRequires: systemd | ||
BuildRequires: python3-devel | ||
BuildRequires: systemd-rpm-macros | ||
BuildArch: noarch | ||
|
||
%description | ||
systemd service to control fans in CPU and HD zones with the help of IPMI on Super Micro X10-X13 (and some X9) motherboards. | ||
%global _description %{expand: | ||
systemd service to control fans in CPU and HD zones with the help of IPMI on | ||
Super Micro X10-X13 (and some X9) motherboards.} | ||
|
||
%description %_description | ||
|
||
%package -n python3-smfc | ||
Summary: python module for Super Micro Fan Control | ||
|
||
%global _python_module_description %{expand: | ||
python module for Super Micro Fan Control.} | ||
|
||
%description -n python3-smfc %_python_module_description | ||
|
||
%prep | ||
%forgesetup | ||
|
||
%build | ||
# not needed, just copying files | ||
%generate_buildrequires -n python3-smfc | ||
%pyproject_buildrequires | ||
|
||
%build -n python3-smfc | ||
%pyproject_wheel | ||
|
||
%install | ||
mkdir -p %{buildroot}/opt/smfc | ||
install -m 755 src/smfc.py %{buildroot}/opt/smfc/smfc.py | ||
install -m 644 src/smfc.conf %{buildroot}/opt/smfc/smfc.conf | ||
mkdir -p %{buildroot}/%{_sysconfdir}/default | ||
install -m 644 src/smfc %{buildroot}/%{_sysconfdir}/default/smfc | ||
mkdir -p %{buildroot}/%{_unitdir} | ||
install -m 644 src/smfc.service %{buildroot}/%{_unitdir}/smfc.service | ||
mkdir -p %{buildroot}/%{_presetdir} | ||
install -m 644 src/smfc.preset %{buildroot}/%{_presetdir}/90-smfc.preset | ||
|
||
%check | ||
# not needed, just copying files | ||
%pyproject_install | ||
%pyproject_save_files smfc | ||
install -Dm 644 resources/smfc.conf %{buildroot}%{_sysconfdir}/smfc/smfc.conf | ||
install -Dm 644 resources/smfc %{buildroot}%{_sysconfdir}/default/smfc | ||
install -Dm 644 systemd/smfc.service %{buildroot}%{_unitdir}/smfc.service | ||
install -Dm 644 systemd/smfc.preset %{buildroot}%{_presetdir}/90-smfc.preset | ||
|
||
%check -n python3-smfc | ||
%pytest | ||
|
||
%files | ||
/opt/smfc/smfc.py | ||
%config(noreplace) /opt/smfc/smfc.conf | ||
%config(noreplace) /etc/default/smfc | ||
/usr/lib/systemd/system/smfc.service | ||
/usr/lib/systemd/system-preset/90-smfc.preset | ||
%{_bindir}/smfc | ||
%config(noreplace) %{_sysconfdir}/smfc/smfc.conf | ||
%config(noreplace) %{_sysconfdir}/default/smfc | ||
%{_unitdir}/smfc.service | ||
%{_presetdir}/90-smfc.preset | ||
%doc README.md | ||
%license LICENSE | ||
|
||
%files -n python3-smfc | ||
%{python3_sitelib}/smfc/ | ||
%{python3_sitelib}/smfc-%{version}.dist-info/ | ||
%doc README.md | ||
%license LICENSE | ||
|
||
|
@@ -65,6 +80,3 @@ install -m 644 src/smfc.preset %{buildroot}/%{_presetdir}/90-smfc.preset | |
%systemd_postun_with_restart smfc.service | ||
|
||
%changelog | ||
* Wed Apr 03 2024 Ewout van Mansom <[email protected]> 3.5.0-1 | ||
- new package built with tito | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from .logger import Log | ||
from .bmc import Ipmi | ||
from .fans import FanController | ||
from .zones import CpuZone, HdZone | ||
from .daemon import Service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from .daemon import Service | ||
|
||
def main() -> None: | ||
service = Service() | ||
service.run() |
Oops, something went wrong.