1 Commits

Author SHA256 Message Date
6c61ee4fd7 Import openSUSE:Leap:16.0 modifications 2025-08-12 11:56:42 +02:00
8 changed files with 95 additions and 13 deletions

View File

@@ -0,0 +1,17 @@
diff --git a/src/gasket_page_table.c b/src/gasket_page_table.c
index c9067cb..41dd598 100644
--- a/src/gasket_page_table.c
+++ b/src/gasket_page_table.c
@@ -54,7 +54,11 @@
#include <linux/vmalloc.h>
#if __has_include(<linux/dma-buf.h>)
-MODULE_IMPORT_NS(DMA_BUF);
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0)
+ MODULE_IMPORT_NS(DMA_BUF);
+ #else
+ MODULE_IMPORT_NS("DMA_BUF");
+ #endif
#endif
#include "gasket_constants.h"

14
fix-for-no_llseek.patch Normal file
View File

@@ -0,0 +1,14 @@
diff --git a/src/gasket_core.c b/src/gasket_core.c
index b1c2726..107dfad 100644
--- a/src/gasket_core.c
+++ b/src/gasket_core.c
@@ -1373,7 +1373,9 @@ static long gasket_ioctl(struct file *filp, uint cmd, ulong arg)
/* File operations for all Gasket devices. */
static const struct file_operations gasket_file_ops = {
.owner = THIS_MODULE,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,0,0)
.llseek = no_llseek,
+#endif
.mmap = gasket_mmap,
.open = gasket_open,
.release = gasket_release,

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b23694f2d97ed358dc8875a251f0148a5f5573e785a60a38495cab3fc6b504d3
size 257547

Binary file not shown.

View File

@@ -11,5 +11,8 @@
# In the meantime this is an acceptable alternative.
addFilter("E: no-binary")
# This error is introduced by the KMP sub-package build.
# Ignore this deprecation error from the KMP sub-package build as it's out of our control.
addFilter("gasket-driver-kmp-.* E: suse-zypp-packageand")
# There are no tests in the upstream package, therefore no `%check` section in the spec file.
addFilter("W: no-%check-section")

View File

@@ -1,3 +1,24 @@
-------------------------------------------------------------------
Fri Jan 24 14:59:28 UTC 2025 - Chris Bradbury <opensuse@chrbrd.com>
- Add `fix-for-module-import-ns.patch`.
-------------------------------------------------------------------
Sun Dec 29 18:38:08 UTC 2024 - Chris Bradbury <opensuse@chrbrd.com>
- Add `fix-for-no_llseek.patch`.
-------------------------------------------------------------------
Wed Jul 17 11:42:17 UTC 2024 - Chris Bradbury <opensuse@chrbrd.com>
- Fix `eventfd_signal` for kernels >= 6.8.
- Apply `fix-for-backported-dma-buf-ns.patch` to Leap 15.6 builds.
-------------------------------------------------------------------
Tue Feb 27 10:56:45 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Use %patch -P N instead of deprecated %patchN.
-------------------------------------------------------------------
Tue Oct 17 00:00:26 UTC 2023 - Chris Bradbury <chris@binaryspanner.com>

View File

@@ -1,4 +1,4 @@
name: gasket-driver
version: 1.0.18_09385d4
mtime: 1693941990
commit: 09385d485812088e04a98a6e1227bf92663e0b59
version: 1.0.18_5815ee3
mtime: 1714079142
commit: 5815ee3908a46a415aac616ac7b9aedcb98a504c

View File

@@ -1,7 +1,7 @@
#
# spec file for package gasket-driver
#
# Copyright (c) 2023 SUSE LLC
# 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
@@ -35,7 +35,7 @@
# Upstream doesn't really do proper releases, so track the main branch
# HEAD's commit hash as well.
%define git_version 09385d4
%define git_version 5815ee3
Name: gasket-driver
Version: 1.0.18_%{git_version}
@@ -59,6 +59,7 @@ Requires: %{name}-kmp
# doesn't work with GCC versions that don't support the `__has_include` directive.
#
# Affects:
# - Leap 15.6
# - Leap 15.5
#
# See:
@@ -69,6 +70,25 @@ Requires: %{name}-kmp
# PATCH-FIX-OPENSUSE fix-for-backported-dma-buf-ns.patch gh#google/gasket-driver!10
Patch0: fix-for-backported-dma-buf-ns.patch
# `no_llseek` was set to null in kernel versions >= 6.0, and then completely removed in kernel
# versions >= 6.12 resulting in broken builds.
#
# PATCH-FIX-OPENSUSE fix-for-no_llseek.patch
Patch1: fix-for-no_llseek.patch
# In kernel 6.13 the MODULE_IMPORT_NS() function has been changed to accept string literals
# instead of macro expansions.
#
# Affects:
# - Tumbleweed
#
# See:
# https://github.com/google/gasket-driver/pull/40
# https://github.com/google/gasket-driver/issues/39
#
# PATCH-FIX-OPENSUSE fix-for-module-import-ns.patch gh#google/gasket-driver!40
Patch2: fix-for-module-import-ns.patch
# This directive instructs the build service to temporarily save the project's
# certificate as %%_sourcedir/_projectcert.crt. See:
# https://github.com/openSUSE/pesign-obs-integration
@@ -99,10 +119,17 @@ The Linux Kernel Module Package for the Coral Gasket Driver.
%setup -q
mkdir -p obj
# The `DMA_BUF` module namespace has been backported to the 5.14 kernel used
# in Leap 15.5, so apply the relevant patch.
%if 0%{?sle_version} == 150500
%patch0 -p1
# Apply the patch for `DMA_BUF` module namespace backports.
%if 0%{?sle_version} == 150500 || 0%{?sle_version} == 150600
%patch -P 0 -p1
%endif
# Apply `fix-for-no_llseek.patch`.
%patch -P 1 -p1
# Apply `fix-for-module-import-ns.patch`.
%if 0%{?suse_version} > 1600
%patch -P 2 -p1
%endif
%build