diff --git a/_service b/_service index 16c8672..398f93e 100644 --- a/_service +++ b/_service @@ -11,8 +11,8 @@ https://en.opensuse.org/openSUSE:Build_Service_Concept_SourceService https://github.com/google/gasket-driver git .git - 97aeba5 - 1.0.18 + main + 1.0.18_%h diff --git a/fix-for-backported-dma-buf-ns.patch b/fix-for-backported-dma-buf-ns.patch index 3aa19df..2f21b64 100644 --- a/fix-for-backported-dma-buf-ns.patch +++ b/fix-for-backported-dma-buf-ns.patch @@ -1,21 +1,12 @@ -From a87c105c14e826dafd4b25c36fa7c7c657a7ad03 Mon Sep 17 00:00:00 2001 -From: hibby50 -Date: Thu, 20 Apr 2023 14:16:06 -0400 -Subject: [PATCH] import DMA_BUF regardless of kernel version - ---- - src/gasket_page_table.c | 2 -- - 1 file changed, 2 deletions(-) - diff --git a/src/gasket_page_table.c b/src/gasket_page_table.c -index e81ab2b..0e768e0 100644 +index c9067cb..0e768e0 100644 --- a/src/gasket_page_table.c +++ b/src/gasket_page_table.c @@ -53,9 +53,7 @@ #include #include --#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,16,0) +-#if __has_include() MODULE_IMPORT_NS(DMA_BUF); -#endif diff --git a/fix-kernel-gte-6.4.patch b/fix-kernel-gte-6.4.patch deleted file mode 100644 index 82f464d..0000000 --- a/fix-kernel-gte-6.4.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 83cbe8264fc63511e4e6250f2426749951a340c8 Mon Sep 17 00:00:00 2001 -From: Chris Bradbury -Date: Fri, 14 Jul 2023 18:55:56 +0100 -Subject: [PATCH] Amend use of `class_create()` for kernels >= 6.4 - -The function signature for `class_create()` was changed in kernels >= 6.4.x to only accept a single argument (see kernel commit #dcfbb67). - -This change will conditionally modify how `class_create()` is called depending on the kernel version. ---- - src/gasket_core.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/src/gasket_core.c b/src/gasket_core.c -index 139616b..b1c2726 100644 ---- a/src/gasket_core.c -+++ b/src/gasket_core.c -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - - #ifdef GASKET_KERNEL_TRACE_SUPPORT - #define CREATE_TRACE_POINTS -@@ -1837,8 +1838,15 @@ int gasket_register_device(const struct gasket_driver_desc *driver_desc) - internal = &g_descs[desc_idx]; - mutex_init(&internal->mutex); - memset(internal->devs, 0, sizeof(struct gasket_dev *) * GASKET_DEV_MAX); -- internal->class = -- class_create(driver_desc->module, driver_desc->name); -+ -+ /* Function signature for `class_create()` is changed in kernel >= 6.4.x -+ * to only accept a single argument. -+ * */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) -+ internal->class = class_create(driver_desc->module, driver_desc->name); -+#else -+ internal->class = class_create(driver_desc->name); -+#endif - - if (IS_ERR(internal->class)) { - pr_err("Cannot register %s class [ret=%ld]\n", - diff --git a/gasket-driver-1.0.18.obscpio b/gasket-driver-1.0.18.obscpio deleted file mode 100644 index d3d42d6..0000000 --- a/gasket-driver-1.0.18.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e189a8829b8a50d13f472037e2e2b387cb7335d00a86b9f22f67669e98fad675 -size 257035 diff --git a/gasket-driver-1.0.18_09385d4.obscpio b/gasket-driver-1.0.18_09385d4.obscpio new file mode 100644 index 0000000..ebbbe72 --- /dev/null +++ b/gasket-driver-1.0.18_09385d4.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b23694f2d97ed358dc8875a251f0148a5f5573e785a60a38495cab3fc6b504d3 +size 257547 diff --git a/gasket-driver-rpmlintrc b/gasket-driver-rpmlintrc index dce77bd..4377b64 100644 --- a/gasket-driver-rpmlintrc +++ b/gasket-driver-rpmlintrc @@ -13,5 +13,3 @@ addFilter("E: no-binary") # This error is introduced by the KMP sub-package build. addFilter("gasket-driver-kmp-.* E: suse-zypp-packageand") -# This warning is introduced by the "pesign-repackage" Secure Boot cert package build. -addFilter("gasket-driver-ueficert.* W: non-conffile-in-etc") diff --git a/gasket-driver.changes b/gasket-driver.changes index ccbfce0..de6b3bf 100644 --- a/gasket-driver.changes +++ b/gasket-driver.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Oct 17 00:00:26 UTC 2023 - Chris Bradbury + +- Remove `fix-kernel-gte-6.4.patch` as it has been merged upstream. +- Fix ueficert package builds. + ------------------------------------------------------------------- Wed Jul 19 23:18:19 UTC 2023 - Chris Bradbury diff --git a/gasket-driver.obsinfo b/gasket-driver.obsinfo index 68ec35d..d02e8f1 100644 --- a/gasket-driver.obsinfo +++ b/gasket-driver.obsinfo @@ -1,4 +1,4 @@ name: gasket-driver -version: 1.0.18 -mtime: 1645731663 -commit: 97aeba584efd18983850c36dcf7384b0185284b3 +version: 1.0.18_09385d4 +mtime: 1693941990 +commit: 09385d485812088e04a98a6e1227bf92663e0b59 diff --git a/gasket-driver.spec b/gasket-driver.spec index e27ba8a..11a10ab 100644 --- a/gasket-driver.spec +++ b/gasket-driver.spec @@ -33,8 +33,12 @@ # # norootforbuild +# Upstream doesn't really do proper releases, so track the main branch +# HEAD's commit hash as well. +%define git_version 09385d4 + Name: gasket-driver -Version: 1.0.18 +Version: 1.0.18_%{git_version} Release: 0 Summary: The Coral Gasket Driver allows usage of the Coral EdgeTPU on Linux systems License: GPL-2.0-only @@ -43,7 +47,7 @@ URL: https://github.com/google/gasket-driver Source0: %{name}-%{version}.tar.xz Source1: group.conf Source2: preamble -Source3: gasket-driver-rpmlintrc +Source3: %{name}-rpmlintrc BuildRequires: %kernel_module_package_buildreqs BuildRequires: pesign-obs-integration BuildRequires: sysuser-tools @@ -51,25 +55,20 @@ Requires: %{name}-kmp %sysusers_requires # The dma-buf symbols used by this driver were moved into their own `DMA_BUF` -# module namespace in kernel 5.16. Consequently, the upstream source conditionally -# imports the `DMA_BUF` module namespace if the kernel version is >= 5.16. -# This patch removes that condition, allowing this module to be built for kernels -# that have backported the `DMA_BUF` namespace changes. +# module namespace in kernel 5.16. Upstream's current attempt at fixing this +# doesn't work with GCC versions that don't support the `__has_include` directive. +# +# Affects: +# - Leap 15.5 +# # See: # https://github.com/google/gasket-driver/pull/10 -# https://github.com/google/gasket-driver/commit/a87c105c14e826dafd4b25c36fa7c7c657a7ad03.patch +# https://github.com/google/gasket-driver/pull/16 +# https://github.com/google/gasket-driver/issues/17 +# # PATCH-FIX-OPENSUSE fix-for-backported-dma-buf-ns.patch gh#google/gasket-driver!10 Patch0: fix-for-backported-dma-buf-ns.patch -# The function signature for `class_create()` was changed in kernels >= 6.4.x to only accept a -# single argument (see kernel commit #dcfbb67). -# This patch conditionally modifies how `class_create()` is called depending on the kernel version. -# See: -# https://github.com/google/gasket-driver/pull/13 -# https://github.com/google/gasket-driver/commit/83cbe8264fc63511e4e6250f2426749951a340c8.patch -# PATCH-FIX-OPENSUSE fix-kernel-gte-6.4.patch gh#google/gasket-driver!13 -Patch1: fix-kernel-gte-6.4.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 @@ -78,10 +77,9 @@ Patch1: fix-kernel-gte-6.4.patch # # needssslcertforbuild # -# Having included the above directive, using the `-c` flag below will cause -# the "ueficert" package to get built. `%%_sourcedir` must be prefixed as the -# working dir is changed before the build service attempts to source the certificate. -%kernel_module_package -p preamble -c %_sourcedir/_projectcert.crt +# Having included the above directive, the below line will +# cause the "ueficert" package to get built. +%kernel_module_package -p %_sourcedir/preamble %description The Coral Gasket Driver allows usage of the Coral EdgeTPU on Linux systems. @@ -90,13 +88,6 @@ The driver contains two modules: for lightweight communication with Google ASICs. - Apex refers to the EdgeTPU v1. - - - - -# This magic "KMP" subpackage is documented in -# https://en.opensuse.org/Kernel_Module_Packages#Specfile_mechanisms - %package KMP Summary: Gasket Driver kernel modules Group: System/Kernel @@ -114,9 +105,6 @@ mkdir -p obj %patch0 -p1 %endif -# Apply patches without conditions. -%patch1 -p1 - %build # Build the kernel modules. for flavor in %flavors_to_build; do