Some checks failed
RPMs/gasket-driver/pipeline/head There was a failure building this commit
Since _kernel_ is an `installonly` package, "upgrading" actually installs a new version instead of replacing the installed version. Because of this, the `Requires` tag of _gasket-driver_ does not prevent upgrading to a new version of the kernel, as the requirement will still be satisfied by the old version. To fully prevent upgrading to a new kernel for which there is no _gasket-driver_ (which would prevent Frigate from starting after the reboot), we need to add a `Conflicts` tag. This will not allow RPM to install a version of _kernel_ newer than the one that matches _gasket-driver_.
58 lines
1.8 KiB
RPMSpec
58 lines
1.8 KiB
RPMSpec
%global git_revision 5815ee3
|
|
%global git_revision_full 5815ee3908a46a415aac616ac7b9aedcb98a504c
|
|
|
|
%global kernel_version %(rpm -q --qf %{VERSION} kernel-devel)
|
|
%global kernel_release %(rpm -q --qf %{RELEASE} kernel-devel)
|
|
%global kernel_ver %{kernel_version}-%{kernel_release}
|
|
|
|
%define _debugsource_template %{nil}
|
|
|
|
Name: gasket-driver
|
|
Version: 0.0.git%{git_revision}
|
|
Release: 3.k%{kernel_version}%{?dist}
|
|
Summary: The Coral Gasket Driver allows usage of the Coral EdgeTPU on Linux systems
|
|
|
|
License: GPL-2.0
|
|
URL: https://github.com/google/gasket-driver/
|
|
Source0: %{name}-%{git_revision_full}.tar.gz
|
|
Patch0: 0001-core-Omit-no_llseek-reference.patch
|
|
Patch1: 0002-Update-gasket_page_table.c-Fix-MODULE_IMPORT_NS.patch
|
|
|
|
BuildRequires: kernel-devel
|
|
Requires: kernel-core == %{kernel_version}
|
|
Conflicts: kernel-core > %{kernel_version}
|
|
Requires(post): kmod
|
|
|
|
%description
|
|
The Coral Gasket Driver allows usage of the Coral EdgeTPU on Linux systems. The driver contains two modules:
|
|
|
|
Gasket: Gasket (Google ASIC Software, Kernel Extensions, and Tools) is a top level driver for lightweight communication with Google ASICs.
|
|
Apex: Apex refers to the EdgeTPU v1
|
|
|
|
|
|
%prep
|
|
%autosetup -n %{name}-%{git_revision_full} -p1
|
|
|
|
|
|
%build
|
|
make -C /usr/src/kernels/%{kernel_ver}.%{_arch} M=${PWD}/src modules
|
|
|
|
|
|
%install
|
|
make -C /usr/src/kernels/%{kernel_ver}.%{_arch} M=${PWD}/src INSTALL_MOD_PATH="${RPM_BUILD_ROOT}" DEPMOD=true modules_install
|
|
|
|
%post
|
|
depmod -a %{kernel_ver}.%{_arch}
|
|
|
|
|
|
%files
|
|
/lib/modules/%{kernel_ver}.%{_arch}/updates/*.ko
|
|
|
|
|
|
%changelog
|
|
* Sun Nov 16 2025 Dustin C. Hatch <dustin@hatch.name> [0.0.git5815ee3-2]
|
|
- Include kernel version in release tag
|
|
|
|
* Wed Aug 06 2025 Dustin C. Hatch <dustin@hatch.name> [0.0.git5815ee3-1]
|
|
- Initial package
|