Hello community,

here is the log from the commit of package nvme-cli for openSUSE:Factory 
checked in at 2019-05-27 08:36:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nvme-cli (Old)
 and      /work/SRC/openSUSE:Factory/.nvme-cli.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nvme-cli"

Mon May 27 08:36:24 2019 rev:34 rq:704985 version:1.8.1+git64.b969cf0

Changes:
--------
--- /work/SRC/openSUSE:Factory/nvme-cli/nvme-cli.changes        2019-05-15 
12:24:44.398055377 +0200
+++ /work/SRC/openSUSE:Factory/.nvme-cli.new.5148/nvme-cli.changes      
2019-05-27 08:36:26.999116243 +0200
@@ -1,0 +2,19 @@
+Thu May 23 06:55:34 UTC 2019 - Simon Schricker <[email protected]>
+
+- Add new subpackage containing the nvme-cli regress script
+- Add script to determine host NQN based on the system UUID
+  + 0008-nvme-cli-Add-script-to-determine-host-NQN.patch
+- Add new udev rule for NetApp E-Series and adjust udev rule naming
+  scheme accordingly. (bsc#1124564)
+  + 0006-nvme-cli-add-default-IO-policy-rule-for-NetApp-E-Ser.patch
+  + 0007-nvme-cli-Rename-udev-rule-for-ONTAP-controller.patch
+- Update to version 1.8.1+git64.b969cf0:
+  * fix json print for list-subsys command
+  * Add Virtium plugin extension document
+  * Add Virtium plugin extension
+  * nvme.h: Fix typos in status code values
+  * nvme-cli: remove unused NVME_AER_NOTICE_
+  * list-ctrl, create-ns, format: Do not return directly without
+    freeing fd
+
+-------------------------------------------------------------------

Old:
----
  nvme-cli-1.8.1+git41.2c43c51.tar.xz

New:
----
  0006-nvme-cli-add-default-IO-policy-rule-for-NetApp-E-Ser.patch
  0007-nvme-cli-Rename-udev-rule-for-ONTAP-controller.patch
  0008-nvme-cli-Add-script-to-determine-host-NQN.patch
  nvme-cli-1.8.1+git64.b969cf0.tar.xz

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

Other differences:
------------------
++++++ nvme-cli.spec ++++++
--- /var/tmp/diff_new_pack.OLceRy/_old  2019-05-27 08:36:27.635115995 +0200
+++ /var/tmp/diff_new_pack.OLceRy/_new  2019-05-27 08:36:27.639115993 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           nvme-cli
-Version:        1.8.1+git41.2c43c51
+Version:        1.8.1+git64.b969cf0
 Release:        0
 Summary:        NVM Express user space tools
 License:        GPL-2.0-only
@@ -31,17 +31,32 @@
 Patch3:         0003-Add-nvmefc-connect.target.patch
 Patch4:         0004-Change-service-to-type-simple.patch
 Patch5:         0005-nvme-cli-Check-for-sysfs-interface-before-NVMe-disco.patch
+Patch6:         0006-nvme-cli-add-default-IO-policy-rule-for-NetApp-E-Ser.patch
+Patch7:         0007-nvme-cli-Rename-udev-rule-for-ONTAP-controller.patch
+Patch8:         0008-nvme-cli-Add-script-to-determine-host-NQN.patch
 BuildRequires:  libuuid-devel
 BuildRequires:  pkgconfig
 BuildRequires:  xmlto
 BuildRequires:  pkgconfig(libudev)
 BuildRequires:  rubygem(asciidoctor)
+%ifarch x86_64 aarch64 i586
+Requires(post): dmidecode
+%endif
 
 %description
 NVM Express (NVMe) is a direct attached storage interface. The
 nvme-cli package contains core management tools with minimal
 dependencies.
 
+%package -n     nvme-cli-regress-script
+Summary:        A small script to test the nvme binary for regressions
+Group:          Hardware/Other
+Requires:       nvme-cli
+
+%description -n nvme-cli-regress-script
+A small shell script to test the nvme binary for regressions. It requires an
+NVMe device for testing purposes. Do NOT use in a production environment.
+
 %prep
 %setup -q
 %patch1 -p1
@@ -49,10 +64,14 @@
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
 
 %build
 echo %{version} > version
 make CFLAGS="%{optflags} -I." PREFIX=%{_prefix} USE_ASCIIDOCTOR=YesPlease 
%{?_smp_mflags} all
+sed -i '/make.*/d' regress
 
 %install
 make PREFIX=%{_prefix} DESTDIR=%{buildroot} install-bin install-man 
%{?_smp_mflags}
@@ -62,7 +81,13 @@
 install -m 644 -D nvme-fc-autoconnect/nvmefc-boot-connections.service 
%{buildroot}%{_unitdir}/nvmefc-boot-connections.service
 install -m 644 -D nvme-fc-autoconnect/[email protected] 
%{buildroot}%{_unitdir}/[email protected]
 install -m 644 -D nvme-fc-autoconnect/nvmefc-connect.target 
%{buildroot}%{_unitdir}/nvmefc-connect.target
-install -m 644 -D scripts/71-nvme-iopolicy-netapp.rules 
%{buildroot}%{_udevrulesdir}/71-nvme-iopolicy-netapp.rules
+install -m 644 -D scripts/71-nvme-iopolicy-netapp-ONTAP.rules 
%{buildroot}%{_udevrulesdir}/71-nvme-iopolicy-netapp-ONTAP.rules
+install -m 644 -D scripts/71-nvme-iopolicy-netapp-E-Series.rules 
%{buildroot}%{_udevrulesdir}/71-nvme-iopolicy-netapp-E-Series.rules
+%ifarch x86_64 aarch64 i586
+install -m 744 -D scripts/det-hostnqn.sh 
%{buildroot}%{_sbindir}/nvme-det-hostnqn
+%endif
+# for subpackage nvme-cli-regress-script:
+install -m 744 -D regress %{buildroot}%{_sbindir}/nvme-regress
 
 %define services nvmefc-boot-connections.service nvmefc-connect.target
 
@@ -70,10 +95,16 @@
 %service_add_pre %services [email protected]
 
 %post
-if [ ! -e %{_sysconfdir}/nvme/hostnqn ]; then
+%ifarch x86_64 aarch64 i586
+if [ ! -s %{_sysconfdir}/nvme/hostnqn ]; then
+       %{_sbindir}/nvme-det-hostnqn > %{_sysconfdir}/nvme/hostnqn
+fi
+%endif
+if [ ! -s %{_sysconfdir}/nvme/hostnqn ]; then
+       %{_bindir}/echo "Generating random host NQN."
        %{_sbindir}/nvme gen-hostnqn > %{_sysconfdir}/nvme/hostnqn
 fi
-if [ ! -e %{_sysconfdir}/nvme/hostid ]; then
+if [ ! -s %{_sysconfdir}/nvme/hostid ]; then
        %{_bindir}/uuidgen > %{_sysconfdir}/nvme/hostid
 fi
 %service_add_post %services [email protected]
@@ -93,12 +124,16 @@
 %license LICENSE
 %doc README.md
 %{_sbindir}/nvme
+%ifarch x86_64 aarch64 i586
+%{_sbindir}/nvme-det-hostnqn
+%endif
 %{_mandir}/man1/nvme*.1*%{?ext_man}
 %dir %{_datadir}/bash_completion
 %dir %{_datadir}/bash_completion/completions/
 %{_datadir}/bash_completion/completions/nvme
 %{_udevrulesdir}/70-nvmefc-autoconnect.rules
-%{_udevrulesdir}/71-nvme-iopolicy-netapp.rules
+%{_udevrulesdir}/71-nvme-iopolicy-netapp-ONTAP.rules
+%{_udevrulesdir}/71-nvme-iopolicy-netapp-E-Series.rules
 %{_unitdir}/nvmefc-boot-connections.service
 %{_unitdir}/[email protected]
 %{_unitdir}/nvmefc-connect.target
@@ -106,4 +141,7 @@
 %ghost %{_sysconfdir}/nvme/hostnqn
 %ghost %{_sysconfdir}/nvme/hostid
 
+%files -n nvme-cli-regress-script
+%{_sbindir}/nvme-regress
+
 %changelog

++++++ 0006-nvme-cli-add-default-IO-policy-rule-for-NetApp-E-Ser.patch ++++++
>From bfbcc6d02f0621bb9ff5afc39862aac55ff305bf Mon Sep 17 00:00:00 2001
From: Simon Schricker <[email protected]>
Date: Wed, 15 May 2019 13:36:41 +0200
Subject: [PATCH] nvme-cli: add default IO-policy rule for NetApp E-Series

NetApp E-Series controller provide several paths to the same subsystem,
so we should be switching to 'round-robin' iopolicy to provide the best
performance.
---
 scripts/71-nvme-iopolicy-netapp-E-Series.rules | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 scripts/71-nvme-iopolicy-netapp-E-Series.rules

diff --git a/scripts/71-nvme-iopolicy-netapp-E-Series.rules 
b/scripts/71-nvme-iopolicy-netapp-E-Series.rules
new file mode 100644
index 0000000..902c083
--- /dev/null
+++ b/scripts/71-nvme-iopolicy-netapp-E-Series.rules
@@ -0,0 +1,2 @@
+# Enable round-robin for NetApp E-Series
+ACTION=="add", SUBSYSTEM=="nvme-subsystem", ATTR{model}=="NetApp E-Series", 
ATTR{iopolicy}="round-robin"
-- 
2.16.4

++++++ 0007-nvme-cli-Rename-udev-rule-for-ONTAP-controller.patch ++++++
>From eae06c9af819f7d1782833783661ad3bf376fae4 Mon Sep 17 00:00:00 2001
From: Simon Schricker <[email protected]>
Date: Thu, 16 May 2019 16:42:49 +0200
Subject: [PATCH] nvme-cli: Rename udev rule for ONTAP controller

To have a consistent naming scheme with the E-Series udev rule.
---
 ...{71-nvme-iopolicy-netapp.rules => 71-nvme-iopolicy-netapp-ONTAP.rules} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename scripts/{71-nvme-iopolicy-netapp.rules => 
71-nvme-iopolicy-netapp-ONTAP.rules} (100%)

diff --git a/scripts/71-nvme-iopolicy-netapp.rules 
b/scripts/71-nvme-iopolicy-netapp-ONTAP.rules
similarity index 100%
rename from scripts/71-nvme-iopolicy-netapp.rules
rename to scripts/71-nvme-iopolicy-netapp-ONTAP.rules
-- 
2.16.4

++++++ 0008-nvme-cli-Add-script-to-determine-host-NQN.patch ++++++
>From b38de666b0ae385bb35c00280c48a20f4d4d6aae Mon Sep 17 00:00:00 2001
From: Simon Schricker <[email protected]>
Date: Fri, 17 May 2019 15:36:37 +0200
Subject: [PATCH] nvme-cli: Add script to determine host NQN

* Based on the system-UUID, via dmidecode
* verifies UUID format
* tries to catch fake/lazy UUIDs
---
 scripts/det-hostnqn.sh | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 scripts/det-hostnqn.sh

diff --git a/scripts/det-hostnqn.sh b/scripts/det-hostnqn.sh
new file mode 100644
index 0000000..d8783cf
--- /dev/null
+++ b/scripts/det-hostnqn.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+LC_ALL=C
+
+UUID=$(dmidecode -s system-uuid | tr -d '[:space:]')
+
+if [ -z "$UUID" ] ; then
+       >&2 echo "No UUID found, can't determine hostnqn."
+       exit 1
+fi
+
+# convert UUID to lower-case only:
+UUID=$(echo $UUID | tr '[:upper:]' '[:lower:]')
+
+# check UUID format, e.g.: 4c4c4544-0156-4a10-8134-b7d04f383232, so: 8-4-4-4-12
+if ! [[ $UUID =~ 
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ ]] ; then
+       >&2 echo "UUID has invalid format."
+       >&2 echo "Invalid UUID: ${UUID}"
+       exit 2
+fi
+
+# HEURISTIC:
+# (1) if any one given character occurs more than 50% of the time, it is likely
+# that the UUID is fake.
+# (2) if the first or the last group consists of mostly the same character, it
+# is likely that the UUID is fake.
+FIRST_GROUP="$(echo $UUID | cut -d'-' -f1)"
+LAST_GROUP="$(echo $UUID | cut -d'-' -f5)"
+for i in {{0..9},{a..f}} ; do
+       COUNT_TOTAL="${UUID//[^$i]}"
+       COUNT_FIRST="${FIRST_GROUP//[^$i]}"
+       COUNT_LAST="${LAST_GROUP//[^$i]}"
+       if [ ${#COUNT_TOTAL} -ge 16 ] || [ ${#COUNT_FIRST} -ge 7 ] || [ 
${#COUNT_LAST} -ge 11 ] ; then
+               >&2 echo "UUID is too repetitive. This may be a false alert."
+               >&2 echo "Repetitive UUID: ${UUID}"
+               exit 3
+       fi
+done
+
+HOSTNQN="nqn.2014-08.org.nvmexpress:uuid:${UUID}"
+
+echo $HOSTNQN
-- 
2.16.4

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.OLceRy/_old  2019-05-27 08:36:27.715115964 +0200
+++ /var/tmp/diff_new_pack.OLceRy/_new  2019-05-27 08:36:27.719115963 +0200
@@ -1,4 +1,10 @@
 <servicedata>
 <service name="obs_scm">
           <param name="url">https://github.com/linux-nvme/nvme-cli.git</param>
-          <param 
name="changesrevision">75800fff4a17f6d97ef884772b88a2dfbd84251a</param></service></servicedata>
+          <param 
name="changesrevision">75800fff4a17f6d97ef884772b88a2dfbd84251a</param>
+</service>
+<service name="tar_scm">
+          <param name="url">https://github.com/linux-nvme/nvme-cli.git</param>
+          <param 
name="changesrevision">b969cf0b67995035a17ed89812d695b7f954f39c</param>
+</service>
+</servicedata>

++++++ nvme-cli-1.8.1+git41.2c43c51.tar.xz -> 
nvme-cli-1.8.1+git64.b969cf0.tar.xz ++++++
++++ 3423 lines of diff (skipped)


Reply via email to