Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package driverctl for openSUSE:Factory 
checked in at 2023-03-01 16:14:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/driverctl (Old)
 and      /work/SRC/openSUSE:Factory/.driverctl.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "driverctl"

Wed Mar  1 16:14:16 2023 rev:3 rq:1068306 version:0.111

Changes:
--------
--- /work/SRC/openSUSE:Factory/driverctl/driverctl.changes      2020-08-17 
16:42:07.053833314 +0200
+++ /work/SRC/openSUSE:Factory/.driverctl.new.31432/driverctl.changes   
2023-03-01 16:14:40.402792577 +0100
@@ -1,0 +2,16 @@
+Fri Feb 24 15:35:17 UTC 2023 - Wolfgang Engel <wolfgang.en...@suse.com>
+
+- Add patch add_list-persisted_command-ec102481.patch:
+  * driverctl: add list-persisted command
+  * Fix device driver binding issue after re-enumeration
+  * driverctl: fix list_devices() when `driver_override` is not set
+  * driverctl: fix --help to return success.
+  * Makefile: drop extra '/'
+  * improve help text
+  * bash-completion: suggest pci addresses instead of driver.
+  * bash-completion: add support for options.
+  * bash-completion: simplify and autocomplete cmds.
+  * bash-completion: add support for list- commands.
+
+
+-------------------------------------------------------------------

Old:
----
  driverctl-0.111.tar.gz

New:
----
  add_list-persisted_command-ec102481.patch
  driverctl-0.111.tar.bz2

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

Other differences:
------------------
++++++ driverctl.spec ++++++
--- /var/tmp/diff_new_pack.XfWQEC/_old  2023-03-01 16:14:40.914795224 +0100
+++ /var/tmp/diff_new_pack.XfWQEC/_new  2023-03-01 16:14:40.918795245 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package driverctl
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -22,7 +22,8 @@
 Summary:        Device driver control utility
 License:        LGPL-2.0-only
 URL:            https://gitlab.com/driverctl/driverctl
-Source0:        
https://gitlab.com/driverctl/driverctl/-/archive/%{version}/driverctl-%{version}.tar.gz
+Source0:        
https://gitlab.com/driverctl/driverctl/-/archive/%{version}/driverctl-%{version}.tar.bz2
+Patch0:         add_list-persisted_command-ec102481.patch
 BuildRequires:  pkg-config
 BuildRequires:  pkgconfig(systemd)
 BuildRequires:  pkgconfig(udev)
@@ -51,6 +52,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %make_build

++++++ add_list-persisted_command-ec102481.patch ++++++
diff -uNr driverctl-0.111/driverctl 
driverctl-0.111+git20220928.ec10248/driverctl
--- driverctl-0.111/driverctl   2020-02-05 17:49:46.000000000 +0100
+++ driverctl-0.111+git20220928.ec10248/driverctl       2022-09-28 
18:28:13.000000000 +0200
@@ -52,6 +52,7 @@
     echo "                                    for <device>"
     echo "  list-devices                      List all overridable devices"
     echo "  list-overrides                    List all currently specified 
overrides"
+    echo "  list-persisted                    List all persisted overrides"
     echo
     echo "Supported options:"
     echo " -h --help             Show this help"
@@ -93,13 +94,18 @@
     fi
 }
 
+function override_is_set()
+{
+    [ "$1" != "(null)" ] && [ "$1" != "" ]
+}
+
 function list_devices()
 {
     devices=()
     for d in "/sys/bus/$bus/devices"/*; do
         if [ -f "$d/driver_override" ]; then
             override="$(< "$d/driver_override")"
-            if [ "$1" -eq 1 ] && [ "$override" == "(null)" ]; then
+            if [ "$1" -eq 1 ] && ! override_is_set "$override"; then
                 continue
             fi
           
@@ -115,7 +121,7 @@
             else
                 line+=" (none)"
             fi
-            if [ "$1" -ne 1 ] && [ "$override" != "(null)" ]; then
+            if [ "$1" -ne 1 ] && override_is_set "$override"; then
                 line+=" [*]"
             fi
 
@@ -130,6 +136,19 @@
     fi
 }
 
+function list_persisted()
+{
+    busL=$(( ${#bus} + 1 ))
+    for d in "$confdir/$bus"-*; do
+        if [ -f "$d" ]; then
+            fn=$(basename "$d")
+            line="${fn:$busL}"
+            line+=" $(< "$d")"
+            echo "$line"
+        fi
+    done
+}
+
 function set_override()
 {
     if [ ! -f "$syspath/driver_override" ]; then
@@ -145,6 +164,9 @@
         debug "unsetting driver override for $dev"
     fi
     unbind
+    if [ "$drv" = "vfio-pci" ]; then
+      echo -n $(< "$syspath/vendor") $(< "$syspath/device") > 
"/sys/module/vfio_pci/drivers/pci:vfio-pci/new_id"
+    fi
     echo "$drv" > "$syspath/driver_override"
 
     if [ "$drv" != "none" ] && [ $probe -ne 0 ]; then 
@@ -208,6 +230,15 @@
         devtype="${devclasses[${2:-all}]}"
         break
         ;;
+    list-persisted)
+        if [ $# -gt 1 ]; then
+            usage
+            exit 1
+        fi
+
+        cmd=$1
+        break
+        ;;
     *)
         usage
         exit 1
@@ -254,6 +285,9 @@
     list-overrides)
         list_devices 1 "$devtype"
         ;;
+    list-persisted)
+        list_persisted
+        ;;
     set-override)
         set_override "$dev" "$drv"
         if [ $save -ne 0 ]; then
diff -uNr driverctl-0.111/driverctl.8 
driverctl-0.111+git20220928.ec10248/driverctl.8
--- driverctl-0.111/driverctl.8 2020-02-05 17:49:46.000000000 +0100
+++ driverctl-0.111+git20220928.ec10248/driverctl.8     2022-09-28 
18:28:13.000000000 +0200
@@ -117,6 +117,13 @@
 as an optional argument, for example "network" to list only network devices.
 .RE
 
+.PP
+\fBlist-persisted\fR
+.RS 4
+List devices with currently persisted overrides on a bus (\fBpci\fR
+by default) along with their driver to be bound on the next boot.
+.RE
+
 .SH "EXIT STATUS"
 On success, 0 is returned, a non-zero failure code otherwise.
 
@@ -147,6 +154,13 @@
 Remove the override from slot 0000:01:00.1:
 # driverctl unset-override 0000:01:00.1
 
+Transiently remove the override from slot 0000:01:00.0:
+# driverctl --nosave unset-override 0000:01:00.0
+
+Find devices with persisted driver overrides:
+# driverctl list-persisted
+0000:01:00.0 vfio-pci
+
 .SH FILES
 \fI/etc/driverctl.d/*\fR
 

++++++ driverctl-0.111.tar.gz -> driverctl-0.111.tar.bz2 ++++++

Reply via email to