Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package nvme-cli for openSUSE:Factory 
checked in at 2022-03-05 14:43:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nvme-cli (Old)
 and      /work/SRC/openSUSE:Factory/.nvme-cli.new.1958 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nvme-cli"

Sat Mar  5 14:43:07 2022 rev:51 rq:959374 version:2.0~5

Changes:
--------
--- /work/SRC/openSUSE:Factory/nvme-cli/nvme-cli.changes        2022-02-23 
16:26:35.667509140 +0100
+++ /work/SRC/openSUSE:Factory/.nvme-cli.new.1958/nvme-cli.changes      
2022-03-05 14:43:16.251698705 +0100
@@ -1,0 +2,10 @@
+Thu Mar 03 19:00:27 UTC 2022 - Daniel Wagner <daniel.wag...@suse.com>
+
+- Update to version 2.0-rc5:
+  * nvme: passthru bugfix(wrong jump, wrong file descriptor)
+  * nvme-cli: Ignore traddr case (bsc#1194025)
+  * nvme: fix segfault in nvme telemetry-log error handling
+  * fabrics: ensure zero kato for non-persistent controllers
+  * documenation updates
+
+-------------------------------------------------------------------

Old:
----
  nvme-cli-2.0~4.obscpio

New:
----
  nvme-cli-2.0~5.obscpio

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

Other differences:
------------------
++++++ nvme-cli.spec ++++++
--- /var/tmp/diff_new_pack.TAzvL6/_old  2022-03-05 14:43:18.031699154 +0100
+++ /var/tmp/diff_new_pack.TAzvL6/_new  2022-03-05 14:43:18.035699155 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           nvme-cli
-Version:        2.0~4
+Version:        2.0~5
 Release:        0
 Summary:        NVM Express user space tools
 License:        GPL-2.0-only
@@ -31,7 +31,7 @@
 BuildRequires:  gcc-c++
 BuildRequires:  libhugetlbfs-devel
 BuildRequires:  libjson-c-devel
-BuildRequires:  libnvme-devel >= 1.0~4
+BuildRequires:  libnvme-devel >= 1.0~5
 BuildRequires:  libuuid-devel
 BuildRequires:  make
 BuildRequires:  meson >= 0.47.0

++++++ _service ++++++
--- /var/tmp/diff_new_pack.TAzvL6/_old  2022-03-05 14:43:18.071699164 +0100
+++ /var/tmp/diff_new_pack.TAzvL6/_new  2022-03-05 14:43:18.075699165 +0100
@@ -5,7 +5,7 @@
     <param name="filename">nvme-cli</param>
     <!-- <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param> -->
     <param name="versionformat">@PARENT_TAG@</param>
-    <param name="revision">v2.0-rc4</param>
+    <param name="revision">v2.0-rc5</param>
     <param name="match-tag">v[02].[0-9]*</param>
     <param name="versionrewrite-pattern">v([^+]*)-rc([0-9]+)</param>
     <param name="versionrewrite-replacement">\1~\2</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.TAzvL6/_old  2022-03-05 14:43:18.091699169 +0100
+++ /var/tmp/diff_new_pack.TAzvL6/_new  2022-03-05 14:43:18.095699171 +0100
@@ -1,7 +1,7 @@
 <servicedata>
   <service name="tar_scm">
     <param name="url">https://github.com/linux-nvme/nvme-cli.git</param>
-    <param 
name="changesrevision">59263bbcd3e4f5eaffe7d200c4cad2a361008e48</param>
+    <param 
name="changesrevision">221734dca8aabc8c2e30820368d1fb5893c80c00</param>
   </service>
 </servicedata>
 (No newline at EOF)

++++++ nvme-cli-2.0~4.obscpio -> nvme-cli-2.0~5.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/Documentation/cmds-main.txt 
new/nvme-cli-2.0~5/Documentation/cmds-main.txt
--- old/nvme-cli-2.0~4/Documentation/cmds-main.txt      2022-02-22 
18:25:01.000000000 +0100
+++ new/nvme-cli-2.0~5/Documentation/cmds-main.txt      2022-03-03 
19:46:24.000000000 +0100
@@ -168,3 +168,102 @@
 
 linknvme:nvme-get-property[1]::
        Reads and shows NVMe-over-Fabrics controller property
+
+linknvme:nvme-media-unit-stat-log[1]::
+       Retrieve and show the configuration and wear of media units
+
+linknvme:nvme-supported-cap-config-log[1]::
+       Retrieve and show the list of Supported Capacity Configuration 
Descriptors
+
+linknvme:nvme-boot-part-log[1]::
+       Retrieve Boot Partition Log
+
+linknvme:nvme-capacity-mgmt[1]::
+       Capacity Management Command
+
+linknvme:nvme-check-dhchap-key[1]::
+       Generate NVMeoF DH-HMAC-CHAP host key
+
+linknvme:nvme-check-tls-key[1]::
+       Validate NVMeoF TLS PSK
+
+linknvme:nvme-cmdset-ind-id-ns[1]::
+       I/O Command Set Independent Identify Namespace
+
+linknvme:nvme-endurance-event-agg-log[1]::
+       Retrieve Endurance Group Event Aggregate Log
+
+linknvme:nvme-fid-support-effects-log[1]::
+       Retrieve FID Support and Effects log
+
+linknvme:nvme-gen-dhchap-key[1]::
+       Generate NVMeoF DH-HMAC-CHAP host key
+
+linknvme:nvme-gen-hostnqn[1]::
+       Generate NVMeoF host NQN
+
+linknvme:nvme-gen-tls-key[1]::
+       Generate NVMeoF TLS PSK
+
+linknvme:nvme-get-lba-status[1]::
+       Get LBA Status command
+
+linknvme:nvme-id-domain[1]::
+       NVMe Identify Domain List
+
+linknvme:nvme-id-ns-lba-format[1]::
+       NVMe Identify Namespace for the specified LBA Format index
+
+linknvme:nvme-lba-status-log[1]::
+       Retrieve LBA Status Information Log
+
+linknvme:nvme-list-endgrp[1]::
+       NVMe Identify Endurance Group List
+
+linknvme:nvme-ns-rescan[1]::
+       Rescans the NVME namespaces
+
+linknvme:nvme-nvm-id-ctrl[1]::
+       NVMe Identify Controller NVM Command Set
+
+linknvme:nvme-nvm-id-ns[1]::
+       NVMe Identify Namespace NVM Command Set
+
+linknvme:nvme-nvm-id-ns-lba-format[1]::
+       NVMe Identify Namespace NVM Command Set for the specified LBA Format 
index
+
+linknvme:nvme-persistent-event-log[1]::
+       Retrieve Presistent Event Log
+
+linknvme:nvme-predictable-lat-log[1]::
+       Retrieve Predictable Latency per Nvmset Log
+
+linknvme:nvme-pred-lat-event-agg-log[1]::
+       Retrieve Predictable Latency Event Aggregate Log
+
+linknvme:nvme-primary-ctrl-caps[1]::
+       NVMe Identify Primary Controller Capabilities
+
+linknvme:nvme-reset[1]::
+       Resets the controller
+
+linknvme:nvme-rpmb[1]::
+       Replay Protection Memory Block commands
+
+linknvme:nvme-sanitize-log[1]::
+       Retrieve sanitize log
+
+linknvme:nvme-set-property[1]::
+       Set a property and show the resulting value
+
+linknvme:nvme-show-hostnqn[1]::
+       Show NVMeoF host NQN
+
+linknvme:nvme-subsystem-reset[1]::
+       Resets the subsystem
+
+linknvme:nvme-supported-log-pages[1]::
+       Retrieve the Supported Log pages details
+
+linknvme:nvme-verify[1]::
+       verify command
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/README.md new/nvme-cli-2.0~5/README.md
--- old/nvme-cli-2.0~4/README.md        2022-02-22 18:25:01.000000000 +0100
+++ new/nvme-cli-2.0~5/README.md        2022-03-03 19:46:24.000000000 +0100
@@ -7,6 +7,8 @@
        $ meson .build
        $ ninja -C .build
 
+nvme-cli depends on zlib, json-c and libuuid.
+
 To install, run:
 
        # meson install -C .build
@@ -236,3 +238,15 @@
 
 After that, you just need to implement the functions you defined in each
 ENTRY, then append the object file name to the meson.build "sources".
+
+## meson tips
+
+In case meson doesn't find libnvme header files (via pkg-config) it
+will fallback using subprojects. meson checks out libnvme in
+subprojects directory as git tree once and will not modify libnvme
+unless explicitly told. That means the current branch is updated via
+git, the subprojects/libnvme branch will not updated accordingly. So
+either update it via normal git operations or
+
+    $ meson subprojects update
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/fabrics.c new/nvme-cli-2.0~5/fabrics.c
--- old/nvme-cli-2.0~4/fabrics.c        2022-02-22 18:25:01.000000000 +0100
+++ new/nvme-cli-2.0~5/fabrics.c        2022-03-03 19:46:24.000000000 +0100
@@ -47,6 +47,8 @@
 #define MAX_DISC_ARGS          32
 #define MAX_DISC_RETRIES       10
 
+#define NVMF_DEF_DISC_TMO      30
+
 /* Name of file to output log pages in their raw format */
 static char *raw;
 static bool persistent;
@@ -113,6 +115,16 @@
        }
 }
 
+static void set_discovery_kato(struct nvme_fabrics_config *cfg)
+{
+       /* Set kato to NVMF_DEF_DISC_TMO for persistent controllers */
+       if (persistent && !cfg->keep_alive_tmo)
+               cfg->keep_alive_tmo = NVMF_DEF_DISC_TMO;
+       /* Set kato to zero for non-persistent controllers */
+       else if (!persistent && (cfg->keep_alive_tmo > 0))
+               cfg->keep_alive_tmo = 0;
+}
+
 static void print_discovery_log(struct nvmf_discovery_log *log, int numrec)
 {
        int i;
@@ -384,11 +396,11 @@
                ret = argconfig_parse(argc, argv, desc, opts);
                if (ret)
                        goto next;
-               if (persistent && !cfg.keep_alive_tmo)
-                       cfg.keep_alive_tmo = 30;
                if (!transport && !traddr)
                        goto next;
 
+               set_discovery_kato(&cfg);
+
                c = nvme_create_ctrl(r, subsysnqn, transport, traddr,
                                     cfg.host_traddr, cfg.host_iface, trsvcid);
                if (!c)
@@ -468,8 +480,8 @@
                return ret;
        }
 
-       if (persistent && !cfg.keep_alive_tmo)
-               cfg.keep_alive_tmo = 30;
+       set_discovery_kato(&cfg);
+
        if (!hostnqn)
                hostnqn = hnqn = nvmf_hostnqn_from_file();
        if (!hostid)
@@ -499,7 +511,7 @@
                        /* Check if device matches command-line options */
                        if (strcmp(nvme_ctrl_get_subsysnqn(c), subsysnqn) ||
                            strcmp(nvme_ctrl_get_transport(c), transport) ||
-                           strcmp(nvme_ctrl_get_traddr(c), traddr) ||
+                           strcasecmp(nvme_ctrl_get_traddr(c), traddr) ||
                            (cfg.host_traddr && nvme_ctrl_get_host_traddr(c) &&
                             strcmp(nvme_ctrl_get_host_traddr(c),
                                    cfg.host_traddr)) ||
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/meson.build 
new/nvme-cli-2.0~5/meson.build
--- old/nvme-cli-2.0~4/meson.build      2022-02-22 18:25:01.000000000 +0100
+++ new/nvme-cli-2.0~5/meson.build      2022-03-03 19:46:24.000000000 +0100
@@ -148,6 +148,11 @@
 )
 
 
################################################################################
+libtype = get_option('default_library')
+if libtype == 'static'
+  requires = ''
+endif
+
 substs = configuration_data()
 substs.set('NAME',    meson.project_name())
 substs.set('VERSION', meson.project_version())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/nvme.c new/nvme-cli-2.0~5/nvme.c
--- old/nvme-cli-2.0~4/nvme.c   2022-02-22 18:25:01.000000000 +0100
+++ new/nvme-cli-2.0~5/nvme.c   2022-03-03 19:46:24.000000000 +0100
@@ -482,7 +482,7 @@
                fprintf(stderr, "Failed to open output file %s: %s!\n",
                                cfg.file_name, strerror(errno));
                err = output;
-               goto free_mem;
+               goto close_fd;
        }
 
        if (cfg.ctrl_init)
@@ -526,10 +526,10 @@
                return -1;
        }
 
+       free(log);
+
 close_output:
        close(output);
-free_mem:
-       free(log);
 close_fd:
        close(fd);
 ret:
@@ -6191,7 +6191,6 @@
                        err = -EINVAL;
                        goto close_fd;
                }
-               mfd = dfd;
        }
 
        if (strlen(cfg.metadata)) {
@@ -7123,7 +7122,7 @@
        flags = cfg.opcode & 1 ? O_RDONLY : O_WRONLY | O_CREAT;
        dfd = mfd = cfg.opcode & 1 ? STDIN_FILENO : STDOUT_FILENO;
        if (strlen(cfg.input_file)) {
-               mfd = open(cfg.input_file, flags, mode);
+               dfd = open(cfg.input_file, flags, mode);
                if (dfd < 0) {
                        perror(cfg.input_file);
                        err = -EINVAL;
@@ -7136,7 +7135,7 @@
                if (mfd < 0) {
                        perror(cfg.metadata);
                        err = -EINVAL;
-                       goto close_fd;
+                       goto close_dfd;
                }
        }
 
@@ -7144,14 +7143,14 @@
                mdata = malloc(cfg.metadata_len);
                if (!mdata) {
                        err = -ENOMEM;
-                       goto close_wfd;
+                       goto close_mfd;
                }
 
                if (cfg.write) {
                        if (read(mfd, mdata, cfg.metadata_len) < 0) {
                                err = -errno;
                                perror("failed to read metadata write buffer");
-                               goto free_data;
+                               goto free_metadata;
                        }
                } else
                        memset(mdata, cfg.prefill, cfg.metadata_len);
@@ -7253,13 +7252,16 @@
                } else if (data && cfg.read)
                        d_raw((unsigned char *)data, cfg.data_len);
        }
-free_data:
-       nvme_free(data, huge);
 free_metadata:
        free(mdata);
-close_wfd:
+free_data:
+       nvme_free(data, huge);
+close_dfd:
        if (strlen(cfg.input_file))
                close(dfd);
+close_mfd:
+       if (strlen(cfg.metadata))
+               close(mfd);
 close_fd:
        close(fd);
 ret:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/subprojects/libnvme.wrap 
new/nvme-cli-2.0~5/subprojects/libnvme.wrap
--- old/nvme-cli-2.0~4/subprojects/libnvme.wrap 2022-02-22 18:25:01.000000000 
+0100
+++ new/nvme-cli-2.0~5/subprojects/libnvme.wrap 2022-03-03 19:46:24.000000000 
+0100
@@ -1,6 +1,6 @@
 [wrap-git]
 url = https://github.com/linux-nvme/libnvme.git
-revision = 3a1bc6c6226d240b544058065382e2546018caa8
+revision = e9a32c8236375356a65d85084c2b9e30619f7ed2
 
 [provide]
 libnvme = libnvme_dep
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/tests/README 
new/nvme-cli-2.0~5/tests/README
--- old/nvme-cli-2.0~4/tests/README     2022-02-22 18:25:01.000000000 +0100
+++ new/nvme-cli-2.0~5/tests/README     2022-03-03 19:46:24.000000000 +0100
@@ -11,18 +11,16 @@
 1. Common Package Dependencies
 ------------------------------
 
-    1. Python(>= 2.7.5 or >= 3.3)
-    2. nose(http://nose.readthedocs.io/en/latest/)
-    3. nose2(Installation guide http://nose2.readthedocs.io/)
-    4. pep8(https://pypi.python.org/pypi/setuptools-pep8)
-    5. flake8(https://pypi.python.org/pypi/flake8)
-    6. pylint(https://www.pylint.org/)
-    7. Epydoc(http://epydoc.sourceforge.net/)
-    8. nvme-cli(https://github.com/linux-nvme/nvme-cli.git)
+    1. Python(>= 3.3)
+    2. nose2 (Installation guide http://nose2.readthedocs.io/)
+    3. flake8 (https://pypi.python.org/pypi/flake8)
+    4. mypy (https://pypi.org/project/mypy/)
+    5. autopep8 (https://pypi.org/project/autopep8/)
+    6. isort (https://pypi.org/project/isort/)
 
     Python package management system pip can be used to install most of the
     listed packages(https://pip.pypa.io/en/stable/installing/) :-
-    $ pip install nose nose2 pep8 flake8 pylint epydoc
+    $ pip install nose2 flake8 mypy autopep8 isort
 
 2. Overview
 -----------
@@ -76,12 +74,12 @@
     6. Before writing a new function have a look into TestNVMe to see if it
        can be reused.
     7. Once testcase is ready make sure :-
-           a. Run pep8, flake8, pylint on the testcase and fix errors/warnings.
-              -Example "$ make static_check" will run pep8, flake8 and pylint 
on
-              all the python files in current directory.
-           b. Execute make doc to generate the documentation.
-              -Example "$ make doc" will create and update existing
-              documentation.
+           a. Run flake8, mypy, autopep8 and isort on the testcase and fix
+             errors/warnings.
+               - Example "$ ninja -C .build lint-python" will run flake8 and
+                mypy on all the python files in current directory.
+              - Example "$ ninja -C .build fomrat-python" will run autopep8 and
+                isort on all the python files in the current directory.
 
 4. Running testcases with framework
 -----------------------------------
@@ -89,5 +87,5 @@
        $ nose2 --verbose nvme_writezeros_test
        $ nose2 --verbose nvme_read_write_test
 
-    2. Running all the testcases with Makefile :-
-       $ make run
+    2. Running all the testcases with ninja :-
+       $ ninja test -C .build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/tests/meson.build 
new/nvme-cli-2.0~5/tests/meson.build
--- old/nvme-cli-2.0~4/tests/meson.build        2022-02-22 18:25:01.000000000 
+0100
+++ new/nvme-cli-2.0~5/tests/meson.build        2022-03-03 19:46:24.000000000 
+0100
@@ -30,3 +30,45 @@
          timeout: 500)
   endforeach
 endif
+
+python_module = import('python')
+
+python = python_module.find_installation('python3')
+
+mypy = find_program(
+    'mypy',
+    required : false,
+)
+flake8 = find_program(
+    'flake8',
+    required : false,
+)
+linter_script = files('run_py_linters.py')
+
+if mypy.found() and flake8.found()
+    run_target(
+        'lint-python',
+        command : [python, linter_script, 'lint'],
+    )
+else
+    message('Mypy or Flake8 not found. Python linting disabled')
+endif
+
+
+autopep8 = find_program(
+    'autopep8',
+    required : false,
+)
+isort = find_program(
+    'isort',
+    required : false,
+)
+
+if autopep8.found() and isort.found()
+    run_target(
+        'format-python',
+        command : [python, linter_script, 'format'],
+    )
+else
+    message('autopep8 or isort not found. Python formating disabled')
+endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/tests/nvme_attach_detach_ns_test.py 
new/nvme-cli-2.0~5/tests/nvme_attach_detach_ns_test.py
--- old/nvme-cli-2.0~4/tests/nvme_attach_detach_ns_test.py      2022-02-22 
18:25:01.000000000 +0100
+++ new/nvme-cli-2.0~5/tests/nvme_attach_detach_ns_test.py      2022-03-03 
19:46:24.000000000 +0100
@@ -28,6 +28,7 @@
 """
 
 import time
+
 from nose.tools import assert_equal
 from nvme_test import TestNVMe
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/tests/nvme_create_max_ns_test.py 
new/nvme-cli-2.0~5/tests/nvme_create_max_ns_test.py
--- old/nvme-cli-2.0~4/tests/nvme_create_max_ns_test.py 2022-02-22 
18:25:01.000000000 +0100
+++ new/nvme-cli-2.0~5/tests/nvme_create_max_ns_test.py 2022-03-03 
19:46:24.000000000 +0100
@@ -28,6 +28,7 @@
 """
 
 import time
+
 from nose.tools import assert_equal
 from nvme_test import TestNVMe
 
@@ -50,7 +51,8 @@
         TestNVMe.__init__(self)
         self.dps = 0
         self.flbas = 0
-        self.nsze = int(self.get_ncap() / self.get_format() / 
self.get_max_ns())
+        self.nsze = int(self.get_ncap() /
+                        self.get_format() / self.get_max_ns())
         self.ncap = self.nsze
         self.setup_log_dir(self.__class__.__name__)
         self.max_ns = self.get_max_ns()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/tests/nvme_format_test.py 
new/nvme-cli-2.0~5/tests/nvme_format_test.py
--- old/nvme-cli-2.0~4/tests/nvme_format_test.py        2022-02-22 
18:25:01.000000000 +0100
+++ new/nvme-cli-2.0~5/tests/nvme_format_test.py        2022-03-03 
19:46:24.000000000 +0100
@@ -35,8 +35,9 @@
            - Delete Namespace.
 """
 
-import time
 import subprocess
+import time
+
 from nose.tools import assert_equal
 from nvme_test import TestNVMe
 
@@ -130,8 +131,8 @@
 
         # iterate through all supported format
         for i in range(0, len(self.lba_format_list)):
-            print("\nlba format " + str(self.lba_format_list[i]) + \
-                  " lbad       " + str(self.lbads_list[i]) + \
+            print("\nlba format " + str(self.lba_format_list[i]) +
+                  " lbad       " + str(self.lbads_list[i]) +
                   " ms         " + str(self.ms_list[i]))
             metadata_size = 1 if self.ms_list[i] == '8' else 0
             err = self.create_and_validate_ns(self.default_nsid,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/tests/nvme_fw_log_test.py 
new/nvme-cli-2.0~5/tests/nvme_fw_log_test.py
--- old/nvme-cli-2.0~4/tests/nvme_fw_log_test.py        2022-02-22 
18:25:01.000000000 +0100
+++ new/nvme-cli-2.0~5/tests/nvme_fw_log_test.py        2022-03-03 
19:46:24.000000000 +0100
@@ -25,6 +25,7 @@
 """
 
 import subprocess
+
 from nose.tools import assert_equal
 from nvme_test import TestNVMe
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/tests/nvme_get_features_test.py 
new/nvme-cli-2.0~5/tests/nvme_get_features_test.py
--- old/nvme-cli-2.0~4/tests/nvme_get_features_test.py  2022-02-22 
18:25:01.000000000 +0100
+++ new/nvme-cli-2.0~5/tests/nvme_get_features_test.py  2022-03-03 
19:46:24.000000000 +0100
@@ -33,6 +33,7 @@
 """
 
 import subprocess
+
 from nose.tools import assert_equal
 from nvme_test import TestNVMe
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/tests/nvme_id_ns_test.py 
new/nvme-cli-2.0~5/tests/nvme_id_ns_test.py
--- old/nvme-cli-2.0~4/tests/nvme_id_ns_test.py 2022-02-22 18:25:01.000000000 
+0100
+++ new/nvme-cli-2.0~5/tests/nvme_id_ns_test.py 2022-03-03 19:46:24.000000000 
+0100
@@ -26,6 +26,7 @@
 """
 
 import subprocess
+
 from nose.tools import assert_equal
 from nvme_test import TestNVMe
 
@@ -78,7 +79,7 @@
                 - 0 on success, error code on failure.
         """
         err = 0
-        for namespace  in self.ns_list:
+        for namespace in self.ns_list:
             err = self.get_id_ns(str(namespace))
         return err
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/tests/nvme_read_write_test.py 
new/nvme-cli-2.0~5/tests/nvme_read_write_test.py
--- old/nvme-cli-2.0~4/tests/nvme_read_write_test.py    2022-02-22 
18:25:01.000000000 +0100
+++ new/nvme-cli-2.0~5/tests/nvme_read_write_test.py    2022-03-03 
19:46:24.000000000 +0100
@@ -27,6 +27,7 @@
 """
 
 import filecmp
+
 from nose.tools import assert_equal
 from nvme_test_io import TestNVMeIO
 
@@ -41,6 +42,7 @@
               - compare_file : data file to use in nvme compare command.
               - test_log_dir : directory for logs, temp files.
     """
+
     def __init__(self):
         """ Pre Section for TestNVMeReadWriteTest """
         TestNVMeIO.__init__(self)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/tests/nvme_test.py 
new/nvme-cli-2.0~5/tests/nvme_test.py
--- old/nvme-cli-2.0~4/tests/nvme_test.py       2022-02-22 18:25:01.000000000 
+0100
+++ new/nvme-cli-2.0~5/tests/nvme_test.py       2022-03-03 19:46:24.000000000 
+0100
@@ -20,15 +20,16 @@
 """ Base class for all the testcases
 """
 
-import re
-import os
-import sys
 import json
 import mmap
-import stat
-import time
+import os
+import re
 import shutil
+import stat
 import subprocess
+import sys
+import time
+
 from nose import tools
 from nose.tools import assert_equal
 from nvme_test_logger import TestNVMeLogger
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/tests/nvme_test_io.py 
new/nvme-cli-2.0~5/tests/nvme_test_io.py
--- old/nvme-cli-2.0~4/tests/nvme_test_io.py    2022-02-22 18:25:01.000000000 
+0100
+++ new/nvme-cli-2.0~5/tests/nvme_test_io.py    2022-03-03 19:46:24.000000000 
+0100
@@ -20,6 +20,7 @@
 """ Inherit TestNVMeIO for nvme read/write operations """
 
 import os
+
 from nose import tools
 from nvme_test import TestNVMe
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/tests/nvme_test_logger.py 
new/nvme-cli-2.0~5/tests/nvme_test_logger.py
--- old/nvme-cli-2.0~4/tests/nvme_test_logger.py        2022-02-22 
18:25:01.000000000 +0100
+++ new/nvme-cli-2.0~5/tests/nvme_test_logger.py        2022-03-03 
19:46:24.000000000 +0100
@@ -26,6 +26,7 @@
 
 class TestNVMeLogger(object):
     """ Represents Logger for NVMe Testframework.  """
+
     def __init__(self, log_file_path):
         """ Logger setup
             - Args:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/tests/nvme_writezeros_test.py 
new/nvme-cli-2.0~5/tests/nvme_writezeros_test.py
--- old/nvme-cli-2.0~4/tests/nvme_writezeros_test.py    2022-02-22 
18:25:01.000000000 +0100
+++ new/nvme-cli-2.0~5/tests/nvme_writezeros_test.py    2022-03-03 
19:46:24.000000000 +0100
@@ -28,6 +28,7 @@
 """
 
 import filecmp
+
 from nose.tools import assert_equal
 from nvme_test_io import TestNVMeIO
 
@@ -44,6 +45,7 @@
               - block_count: Number of blocks to use in IO.
               - test_log_dir : directory for logs, temp files.
     """
+
     def __init__(self):
         """ Pre Section for TestNVMeWriteZeros """
         TestNVMeIO.__init__(self)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nvme-cli-2.0~4/tests/run_py_linters.py 
new/nvme-cli-2.0~5/tests/run_py_linters.py
--- old/nvme-cli-2.0~4/tests/run_py_linters.py  1970-01-01 01:00:00.000000000 
+0100
+++ new/nvme-cli-2.0~5/tests/run_py_linters.py  2022-03-03 19:46:24.000000000 
+0100
@@ -0,0 +1,123 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+# Copied from https://github.com/python-sdbus/python-sdbus
+# Copyright (C) 2020, 2021 igo95862
+
+# This file is part of nvme-cli
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+from __future__ import annotations
+
+from argparse import ArgumentParser
+from os import environ
+from pathlib import Path
+from subprocess import run
+from typing import List
+
+source_root = Path(environ['MESON_SOURCE_ROOT'])
+build_dir = Path(environ['MESON_BUILD_ROOT'])
+
+tests_dir = source_root / 'tests'
+
+all_python_modules = [
+    tests_dir,
+]
+
+mypy_cache_dir = build_dir / '.mypy_cache'
+
+
+def run_mypy(path: Path) -> None:
+    print(f"Running mypy on {path}")
+    run(
+        args=(
+            'mypy', '--strict',
+            '--cache-dir', mypy_cache_dir,
+            '--python-version', '3.8',
+            '--namespace-packages',
+            '--ignore-missing-imports',
+            path,
+        ),
+        check=False,
+        env={'MYPYPATH': str(tests_dir.absolute()), **environ},
+    )
+
+
+def linter_main() -> None:
+    run(
+        args=(
+            'flake8',
+            *all_python_modules,
+        ),
+        check=False,
+    )
+
+    for x in all_python_modules:
+        run_mypy(x)
+
+
+def get_all_python_files() -> List[Path]:
+    python_files: List[Path] = []
+
+    for python_module in all_python_modules:
+        if python_module.is_dir():
+            for a_file in python_module.iterdir():
+                if a_file.suffix == '.py':
+                    python_files.append(a_file)
+        else:
+            python_files.append(python_module)
+
+    return python_files
+
+
+def formater_main() -> None:
+    all_python_files = get_all_python_files()
+
+    run(
+        args=('autopep8', '--in-place', *all_python_files),
+        check=False,
+    )
+
+    run(
+        args=(
+            'isort',
+            '-m', 'VERTICAL_HANGING_INDENT',
+            '--trailing-comma',
+            *all_python_files,
+        ),
+        check=False,
+    )
+
+
+def main() -> None:
+    parser = ArgumentParser()
+    parser.add_argument(
+        'mode',
+        choices=('lint', 'format'),
+    )
+
+    args = parser.parse_args()
+
+    mode = args.mode
+
+    if mode == 'lint':
+        linter_main()
+    elif mode == 'format':
+        formater_main()
+    else:
+        raise ValueError('Unknown mode', mode)
+
+
+if __name__ == '__main__':
+    main()

++++++ nvme-cli.obsinfo ++++++
--- /var/tmp/diff_new_pack.TAzvL6/_old  2022-03-05 14:43:18.507699275 +0100
+++ /var/tmp/diff_new_pack.TAzvL6/_new  2022-03-05 14:43:18.507699275 +0100
@@ -1,5 +1,5 @@
 name: nvme-cli
-version: 2.0~4
-mtime: 1645550701
-commit: 59263bbcd3e4f5eaffe7d200c4cad2a361008e48
+version: 2.0~5
+mtime: 1646333184
+commit: 221734dca8aabc8c2e30820368d1fb5893c80c00
 

Reply via email to