Hello community,

here is the log from the commit of package bbswitch for openSUSE:Factory 
checked in at 2020-04-04 12:25:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bbswitch (Old)
 and      /work/SRC/openSUSE:Factory/.bbswitch.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bbswitch"

Sat Apr  4 12:25:35 2020 rev:8 rq:791134 version:0.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/bbswitch/bbswitch.changes        2019-12-23 
22:45:09.534017022 +0100
+++ /work/SRC/openSUSE:Factory/.bbswitch.new.3248/bbswitch.changes      
2020-04-04 12:26:33.227997531 +0200
@@ -1,0 +2,6 @@
+Fri Apr  3 08:25:12 UTC 2020 - Antonio Larrosa <alarr...@suse.com>
+
+- Add patch to build with kernel 5.6
+  * 0001-Update-proc_create_call-for-5.6-kernel.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Update-proc_create_call-for-5.6-kernel.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ bbswitch.spec ++++++
--- /var/tmp/diff_new_pack.V3J1CK/_old  2020-04-04 12:26:34.251998590 +0200
+++ /var/tmp/diff_new_pack.V3J1CK/_new  2020-04-04 12:26:34.255998594 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package bbswitch
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -22,8 +22,9 @@
 Summary:        Bumblebee ACPI kernel module
 License:        GPL-2.0-or-later
 Group:          System/Kernel
-Url:            http://github.com/Bumblebee-Project/bbswitch
+URL:            http://github.com/Bumblebee-Project/bbswitch
 Source0:        
https://github.com/Bumblebee-Project/bbswitch/archive/v%{version}.tar.gz
+Patch0:         0001-Update-proc_create_call-for-5.6-kernel.patch
 BuildRequires:  %{kernel_module_package_buildreqs}
 BuildRequires:  libelf-devel
 BuildRequires:  pkgconfig(libsystemd)
@@ -43,6 +44,9 @@
 
 %prep
 %setup -q
+%if %{?pkg_vcmp:%{pkg_vcmp kernel-devel >= 5.6.0}}%{!?pkg_vcmp:0}
+%patch0 -p1
+%endif
 set -- *
 mkdir source
 mv "$@" source/

++++++ 0001-Update-proc_create_call-for-5.6-kernel.patch ++++++
>From 314d223a1d1bab86370c2da3771b76bf8ac93e3b Mon Sep 17 00:00:00 2001
From: Adrian Curless <awcurl...@wpi.edu>
Date: Tue, 31 Mar 2020 22:43:28 -0400
Subject: [PATCH] Update proc_create call to pass proc_ops instead of
 file_operations, a change made in 5.6

Modified by Antonio Larrosa <alarr...@suse.com> to not bump the version number
since the patch was done by a fork of the upstream project [1] and the only
change it does is to fix it to build with the new kernel.

[1] 
https://github.com/awcurless/bbswitch/commit/314d223a1d1bab86370c2da3771b76bf8ac93e3b
---
 bbswitch.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/bbswitch.c b/bbswitch.c
index 341608f..2934b5a 100644
--- a/bbswitch.c
+++ b/bbswitch.c
@@ -35,8 +35,9 @@
 #include <linux/suspend.h>
 #include <linux/seq_file.h>
 #include <linux/pm_runtime.h>
+#include <linux/proc_fs.h>
 
-#define BBSWITCH_VERSION "0.8"
#+#define BBSWITCH_VERSION "0.9"
+#define BBSWITCH_VERSION "0.8"
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Toggle the discrete graphics card");
@@ -375,12 +376,12 @@ static int bbswitch_pm_handler(struct notifier_block *nbp,
     return 0;
 }
 
-static struct file_operations bbswitch_fops = {
-    .open   = bbswitch_proc_open,
-    .read   = seq_read,
-    .write  = bbswitch_proc_write,
-    .llseek = seq_lseek,
-    .release= single_release
+static struct proc_ops bbswitch_ops = {
+    .proc_open = bbswitch_proc_open,
+    .proc_read = seq_read,
+    .proc_write = bbswitch_proc_write,
+    .proc_lseek = seq_lseek,
+    .proc_release = single_release,
 };
 
 static struct notifier_block nb = {
@@ -457,7 +458,7 @@ static int __init bbswitch_init(void) {
         }
     }
 
-    acpi_entry = proc_create("bbswitch", 0664, acpi_root_dir, &bbswitch_fops);
+    acpi_entry = proc_create("bbswitch", 0664, acpi_root_dir, &bbswitch_ops);
     if (acpi_entry == NULL) {
         pr_err("Couldn't create proc entry\n");
         return -ENOMEM;

Reply via email to