mirror of
https://github.com/t2linux/fedora.git
synced 2026-04-30 13:51:42 -07:00
Package t2fanrd fan daemon
The systemd service is run as root but is significanty hardened. There is no default config file shipped.
This commit is contained in:
@@ -41,6 +41,7 @@ jobs:
|
||||
rust-arraydeque/*
|
||||
rust-nonempty/*
|
||||
rust-rust-ini0.20/*
|
||||
t2fanrd/*
|
||||
dir_names: "true"
|
||||
|
||||
- name: "Increase Disk Space"
|
||||
|
||||
@@ -12,6 +12,7 @@ on:
|
||||
- "rust-arraydeque/*"
|
||||
- "rust-nonempty/*"
|
||||
- "rust-rust-ini0.20/*"
|
||||
- "t2fanrd/*"
|
||||
|
||||
jobs:
|
||||
copr-webhook:
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
set -e
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
packages=( "t2linux-config" "t2linux-audio" "rust-tiny-dfr" "kernel" "copr-sharpenedblade-t2linux-release" "rust-arraydeque" "rust-nonempty" "rust-rust-ini0.20" )
|
||||
packages=( "t2linux-config" "t2linux-audio" "rust-tiny-dfr" "kernel" "copr-sharpenedblade-t2linux-release" "rust-arraydeque" "rust-nonempty" "rust-rust-ini0.20" "t2fanrd" )
|
||||
else
|
||||
packages=( "$@" )
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
[Unit]
|
||||
Description=T2FanRD daemon to manage fan curves for t2 macs
|
||||
|
||||
[Service]
|
||||
Type=exec
|
||||
ExecStart=t2fanrd
|
||||
Restart=always
|
||||
|
||||
PrivateTmp=true
|
||||
ProtectSystem=true
|
||||
ProtectHome=true
|
||||
ProtectClock=true
|
||||
ProtectHostname=true
|
||||
ProtectControlGroups=true
|
||||
ProtectHostname=true
|
||||
ProtectKernelLogs=true
|
||||
ProtectKernelModules=true
|
||||
ProtectProc=invisible
|
||||
PrivateDevices=true
|
||||
PrivateNetwork=true
|
||||
NoNewPrivileges=true
|
||||
DevicePolicy=closed
|
||||
KeyringMode=private
|
||||
LockPersonality=true
|
||||
MemoryDenyWriteExecute=true
|
||||
PrivateUsers=yes
|
||||
RemoveIPC=yes
|
||||
RestrictNamespaces=yes
|
||||
RestrictRealtime=yes
|
||||
RestrictSUIDSGID=yes
|
||||
SystemCallArchitectures=native
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,68 @@
|
||||
%global forgeurl https://github.com/GnomedDev/T2FanRD
|
||||
%global commit 68859ca5f858d542444c64391faa90678afb6995
|
||||
%forgemeta -iv
|
||||
|
||||
%bcond_without check
|
||||
|
||||
# prevent library files from being installed
|
||||
%global __cargo_is_lib() 0
|
||||
|
||||
%global crate t2fanrd
|
||||
|
||||
Name: t2fanrd
|
||||
Version: 0.1.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Simple Fan Daemon for T2 Macs
|
||||
|
||||
SourceLicense: GPL-3.0-or-later
|
||||
License: GPL-3.0-or-later AND Apache-2.0 OR MIT AND MIT
|
||||
|
||||
URL: %{forgeurl}
|
||||
Source0: %{forgesource}
|
||||
Source1: t2fanrd.service
|
||||
|
||||
BuildRequires: cargo-rpm-macros >= 24
|
||||
BuildRequires: systemd-rpm-macros
|
||||
|
||||
%description
|
||||
Simple Fan Daemon for T2 Macs.
|
||||
|
||||
%prep
|
||||
%forgeautosetup -p1
|
||||
%cargo_prep
|
||||
|
||||
%generate_buildrequires
|
||||
%cargo_generate_buildrequires
|
||||
|
||||
%build
|
||||
%cargo_build
|
||||
%{cargo_license_summary}
|
||||
%{cargo_license} > LICENSE.dependencies
|
||||
|
||||
%install
|
||||
%cargo_install
|
||||
install -Dpm0644 -t %{buildroot}%{_unitdir} %{SOURCE1}
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
%cargo_test
|
||||
%endif
|
||||
|
||||
%post
|
||||
%systemd_post %{crate}.service
|
||||
|
||||
%preun
|
||||
%systemd_preun %{crate}.service
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart %{crate}.service
|
||||
|
||||
%files
|
||||
%license LICENCE
|
||||
%license LICENSE.dependencies
|
||||
%doc README.md
|
||||
%{_bindir}/%{crate}
|
||||
%{_unitdir}/%{crate}.service
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
Reference in New Issue
Block a user