Compare commits
No commits in common. "c8" and "c9s" have entirely different histories.
32
.gitignore
vendored
32
.gitignore
vendored
@ -1 +1,31 @@
|
|||||||
SOURCES/v1.16.tar.gz
|
/bdbb4da0979fbdc079cf98410cdb31cf799e83b3.tar.gz
|
||||||
|
/v0.4.tar.gz
|
||||||
|
/v0.5.tar.gz
|
||||||
|
/v0.7.tar.gz
|
||||||
|
/v0.8.tar.gz
|
||||||
|
/v0.9.tar.gz
|
||||||
|
/v1.0.tar.gz
|
||||||
|
/v1.1.tar.gz
|
||||||
|
/v1.2.tar.gz
|
||||||
|
/v1.3.tar.gz
|
||||||
|
/v1.4.tar.gz
|
||||||
|
/v1.6.tar.gz
|
||||||
|
/v1.7.tar.gz
|
||||||
|
/v1.8.1.tar.gz
|
||||||
|
/v1.9.tar.gz
|
||||||
|
/v1.10.tar.gz
|
||||||
|
/v1.10.1.tar.gz
|
||||||
|
/v1.11.tar.gz
|
||||||
|
/v1.11.1.tar.gz
|
||||||
|
/v1.13.tar.gz
|
||||||
|
/v1.14.tar.gz
|
||||||
|
/v1.16.tar.gz
|
||||||
|
/nvme-cli-2.0.tar.gz
|
||||||
|
/nvme-cli-2.1.2.tar.gz
|
||||||
|
/nvme-cli-2.2.1.tar.gz
|
||||||
|
/nvme-cli-2.4.tar.gz
|
||||||
|
/nvme-cli-2.6.tar.gz
|
||||||
|
/nvme-cli-2.8.tar.gz
|
||||||
|
/nvme-cli-2.9.1.tar.gz
|
||||||
|
/nvme-cli-2.10.2.tar.gz
|
||||||
|
/nvme-cli-2.11.tar.gz
|
||||||
|
5
99-nvme-nbft-connect.sh
Normal file
5
99-nvme-nbft-connect.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ "$1" == nbft* ]] && [[ "$2" == "up" ]]; then
|
||||||
|
systemctl start nvmf-connect-nbft.service
|
||||||
|
fi
|
15
99-nvme-nbft-no-ignore-carrier.conf
Normal file
15
99-nvme-nbft-no-ignore-carrier.conf
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Boot from NVMe over TCP (NBFT)
|
||||||
|
#
|
||||||
|
# For NVMe/TCP connections that provide namespaces containing rootfs
|
||||||
|
# it is crucial to react on carrier events and reconnect any missing
|
||||||
|
# NVMe/TCP connections as defined in the ACPI NBFT table. A custom
|
||||||
|
# /usr/lib/NetworkManager/dispatcher.d/99-nvme-nbft-connect.sh hook
|
||||||
|
# will respawn nvmf-connect-nbft.service on such occasion.
|
||||||
|
|
||||||
|
[device-nbft-no-ignore-carrier]
|
||||||
|
|
||||||
|
# only affects nbft0, nbft1, ... interfaces
|
||||||
|
match-device=interface-name:nbft*
|
||||||
|
|
||||||
|
# react on link up/down events
|
||||||
|
ignore-carrier=no
|
@ -1,32 +0,0 @@
|
|||||||
From f74ac1b841b0aae73969debaed0444f0ecb03dba Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin George <marting@netapp.com>
|
|
||||||
Date: Mon, 15 Nov 2021 16:00:47 +0530
|
|
||||||
Subject: [PATCH] fabrics: fix 'nvme connect' segfault if transport type is
|
|
||||||
omitted
|
|
||||||
|
|
||||||
Check if the transport type is available before dereferencing
|
|
||||||
it in discovery_trsvcid().
|
|
||||||
|
|
||||||
Fixes: 362c90f ("fabrics: add default port number for NVMe/TCP I/O
|
|
||||||
controllers")
|
|
||||||
Signed-off-by: Martin George <marting@netapp.com>
|
|
||||||
---
|
|
||||||
fabrics.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/fabrics.c b/fabrics.c
|
|
||||||
index d691191..adca89b 100644
|
|
||||||
--- a/fabrics.c
|
|
||||||
+++ b/fabrics.c
|
|
||||||
@@ -1070,6 +1070,8 @@ static void set_discovery_kato(struct fabrics_config *cfg)
|
|
||||||
|
|
||||||
static void discovery_trsvcid(struct fabrics_config *fabrics_cfg, bool discover)
|
|
||||||
{
|
|
||||||
+ if (!fabrics_cfg->transport)
|
|
||||||
+ return;
|
|
||||||
if (!strcmp(fabrics_cfg->transport, "tcp")) {
|
|
||||||
if (discover) {
|
|
||||||
/* Default port for NVMe/TCP discovery controllers */
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
From ff8f9b6f59b574fda24a071fb0af4381c0cc6d9f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
Date: Thu, 9 Dec 2021 12:21:51 +0100
|
|
||||||
Subject: [PATCH 1/6] fabrics: fix a buffer overrun
|
|
||||||
|
|
||||||
the uuid buffer size must be at least 37 bytes to avoid
|
|
||||||
corrupting the memory
|
|
||||||
|
|
||||||
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
---
|
|
||||||
fabrics.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/fabrics.c b/fabrics.c
|
|
||||||
index adca89b..0766729 100644
|
|
||||||
--- a/fabrics.c
|
|
||||||
+++ b/fabrics.c
|
|
||||||
@@ -883,7 +883,7 @@ static char *hostnqn_generate_systemd(void)
|
|
||||||
|
|
||||||
static char *hostnqn_read_dmi(void)
|
|
||||||
{
|
|
||||||
- char uuid[16];
|
|
||||||
+ char uuid[37];
|
|
||||||
char *ret = NULL;
|
|
||||||
|
|
||||||
if (uuid_from_dmi(uuid) < 0)
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
From 821935cccfcad6b18da78d42f9ddf49f4cbe0b8e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Wagner <dwagner@suse.de>
|
|
||||||
Date: Thu, 9 Dec 2021 15:40:26 +0100
|
|
||||||
Subject: [PATCH 2/6] bash: Fix nvme completion
|
|
||||||
|
|
||||||
Signed-off-by: Daniel Wagner <dwagner@suse.de>
|
|
||||||
---
|
|
||||||
completions/bash-nvme-completion.sh | 5 ++---
|
|
||||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/completions/bash-nvme-completion.sh b/completions/bash-nvme-completion.sh
|
|
||||||
index 41938d7..902da01 100644
|
|
||||||
--- a/completions/bash-nvme-completion.sh
|
|
||||||
+++ b/completions/bash-nvme-completion.sh
|
|
||||||
@@ -101,8 +101,7 @@ _cmds="list list-subsys id-ctrl id-ns \
|
|
||||||
connect disconnect disconnect-all gen-hostnqn \
|
|
||||||
show-hostnqn dir-receive dir-send virt-mgmt \
|
|
||||||
rpmb boot-part-log fid-support-effects-log \
|
|
||||||
- supported-log-pages lockdown"
|
|
||||||
- supported-log-pages list-endgrp"
|
|
||||||
+ supported-log-pages lockdown list-endgrp"
|
|
||||||
|
|
||||||
# Add plugins:
|
|
||||||
for plugin in "${!_plugin_subcmds[@]}"; do
|
|
||||||
@@ -1368,7 +1367,7 @@ plugin_ymtc_opts () {
|
|
||||||
opts+=" --namespace-id= -n --raw-binary -b"
|
|
||||||
;;
|
|
||||||
"help")
|
|
||||||
- opts+=NO_OPTS
|
|
||||||
+ opts+=$NO_OPTS
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
From 45223fd3c5a13da9209c4f44d7593cb42cab94fb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
Date: Tue, 14 Dec 2021 10:09:42 +0100
|
|
||||||
Subject: [PATCH 3/6] nvme: do not leak an open file handle
|
|
||||||
|
|
||||||
We performed a "sec_fd=open(cfg.file)" earlier, so we should not
|
|
||||||
overwrite the handle.
|
|
||||||
|
|
||||||
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
---
|
|
||||||
nvme.c | 9 +--------
|
|
||||||
1 file changed, 1 insertion(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/nvme.c b/nvme.c
|
|
||||||
index 862f9b6..5beeac7 100644
|
|
||||||
--- a/nvme.c
|
|
||||||
+++ b/nvme.c
|
|
||||||
@@ -4379,17 +4379,10 @@ static int sec_send(int argc, char **argv, struct command *cmd, struct plugin *p
|
|
||||||
fprintf(stderr, "WARNING: --tl not dword aligned; unaligned bytes may be truncated\n");
|
|
||||||
|
|
||||||
if (strlen(cfg.file) == 0) {
|
|
||||||
+ close(sec_fd);
|
|
||||||
sec_fd = STDIN_FILENO;
|
|
||||||
sec_size = cfg.tl;
|
|
||||||
} else {
|
|
||||||
- sec_fd = open(cfg.file, O_RDONLY);
|
|
||||||
- if (sec_fd < 0) {
|
|
||||||
- fprintf(stderr, "Failed to open %s: %s\n",
|
|
||||||
- cfg.file, strerror(errno));
|
|
||||||
- err = -EINVAL;
|
|
||||||
- goto close_fd;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
err = fstat(sec_fd, &sb);
|
|
||||||
if (err < 0) {
|
|
||||||
perror("fstat");
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
From b580886dbc322b2a71d6c0c1b71f9fca7b750b02 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
Date: Tue, 14 Dec 2021 09:58:09 +0100
|
|
||||||
Subject: [PATCH 4/6] nvme-topology: fix memory leaks in
|
|
||||||
nvme_logical_block_size_from_ns_char()
|
|
||||||
|
|
||||||
Free the allocated strings before returning from the function
|
|
||||||
|
|
||||||
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
---
|
|
||||||
nvme-topology.c | 5 ++++-
|
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/nvme-topology.c b/nvme-topology.c
|
|
||||||
index 0a22f6b..6be2b09 100644
|
|
||||||
--- a/nvme-topology.c
|
|
||||||
+++ b/nvme-topology.c
|
|
||||||
@@ -686,10 +686,13 @@ int nvme_logical_block_size_from_ns_char(const char *dev)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
s = nvme_get_ctrl_attr(path, "logical_block_size");
|
|
||||||
+ free(path);
|
|
||||||
if (!s)
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
- return atoi(s);
|
|
||||||
+ ret = atoi(s);
|
|
||||||
+ free(s);
|
|
||||||
+ return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
void *mmap_registers(const char *dev)
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
|||||||
From 58c23ceb12d16756b2222a55d1d9dc5f34bb4fa4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: James Smart <jsmart2021@gmail.com>
|
|
||||||
Date: Fri, 17 Dec 2021 11:32:32 -0800
|
|
||||||
Subject: [PATCH 5/6] nvme-cli: nvmf-connect@.service: Remove matching from
|
|
||||||
default syntax
|
|
||||||
|
|
||||||
commit 53aab69a0add added the "--matching" argument to the systemd
|
|
||||||
connect script that issues connect-all to a discovery controller. When
|
|
||||||
this argument is used, only discovery log entries whose target port
|
|
||||||
traddr's match the traddr of the discovery controller will be connected
|
|
||||||
to. This eliminates the ability to do referrals by the discovery
|
|
||||||
controller.
|
|
||||||
|
|
||||||
Revert the commit so that the "--matching" argument is not default
|
|
||||||
behavior.
|
|
||||||
|
|
||||||
Signed-off-by: James Smart <jsmart2021@gmail.com>
|
|
||||||
CC: Martin Wilck <mwilck@suse.com>
|
|
||||||
Signed-off-by: Daniel Wagner <dwagner@suse.de>
|
|
||||||
Link: https://lore.kernel.org/r/20211217193232.29034-1-jsmart2021@gmail.com
|
|
||||||
---
|
|
||||||
nvmf-autoconnect/systemd/nvmf-connect@.service | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/nvmf-autoconnect/systemd/nvmf-connect@.service b/nvmf-autoconnect/systemd/nvmf-connect@.service
|
|
||||||
index 5fbf081..c60f146 100644
|
|
||||||
--- a/nvmf-autoconnect/systemd/nvmf-connect@.service
|
|
||||||
+++ b/nvmf-autoconnect/systemd/nvmf-connect@.service
|
|
||||||
@@ -11,4 +11,4 @@ Requires=nvmf-connect.target
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
Environment="CONNECT_ARGS=%i"
|
|
||||||
-ExecStart=/bin/sh -c "nvme connect-all --matching --quiet `/bin/echo -e '${CONNECT_ARGS}'`"
|
|
||||||
+ExecStart=/bin/sh -c "nvme connect-all --quiet `/bin/echo -e '${CONNECT_ARGS}'`"
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
@ -1,86 +0,0 @@
|
|||||||
From 1264c6323937c4a0342174fdd9be5a66ab1eaf24 Mon Sep 17 00:00:00 2001
|
|
||||||
From: James Smart <jsmart2021@gmail.com>
|
|
||||||
Date: Fri, 17 Dec 2021 14:20:22 -0800
|
|
||||||
Subject: [PATCH 6/6] nvme-cli: Make connect-all matching be case insensitive
|
|
||||||
|
|
||||||
The comparison routine that checks discovery controller traddr with a
|
|
||||||
discovery log traddr uses a simple strncmp. For FC, which kicks off
|
|
||||||
connect-all requests vay systemd, the nvme-fc transport will build
|
|
||||||
traddr strings with lower case hexadecimal. Some FC discovery
|
|
||||||
controllers return traddr strings with upper case hexadecimal. There
|
|
||||||
was is no rqmt in the NVME-FC spec that it be upper or lower case.
|
|
||||||
Given the case difference, the connect-all fails the match logic and
|
|
||||||
doesn't connect to storage.
|
|
||||||
|
|
||||||
Revise the traddr comparison routine to duplicate the strings and
|
|
||||||
convert them to lower case for comparison.
|
|
||||||
|
|
||||||
Signed-off-by: James Smart <jsmart2021@gmail.com>
|
|
||||||
Signed-off-by: Daniel Wagner <dwagner@suse.de>
|
|
||||||
Link: https://lore.kernel.org/r/20211217222022.30516-1-jsmart2021@gmail.com
|
|
||||||
---
|
|
||||||
fabrics.c | 26 +++++++++++++++++++++++++-
|
|
||||||
1 file changed, 25 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/fabrics.c b/fabrics.c
|
|
||||||
index 0766729..a1e2593 100644
|
|
||||||
--- a/fabrics.c
|
|
||||||
+++ b/fabrics.c
|
|
||||||
@@ -34,6 +34,7 @@
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <syslog.h>
|
|
||||||
#include <time.h>
|
|
||||||
+#include <ctype.h>
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
@@ -681,6 +682,12 @@ static int space_strip_len(int max, const char *str)
|
|
||||||
return i + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void strtolower(char *str)
|
|
||||||
+{
|
|
||||||
+ for ( ; *str; str++)
|
|
||||||
+ *str = tolower(*str);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static void print_discovery_log(struct nvmf_disc_rsp_page_hdr *log, int numrec,
|
|
||||||
int instance)
|
|
||||||
{
|
|
||||||
@@ -1385,7 +1392,9 @@ static bool cargs_match_found(struct nvmf_disc_rsp_page_entry *entry)
|
|
||||||
|
|
||||||
static bool should_connect(struct nvmf_disc_rsp_page_entry *entry)
|
|
||||||
{
|
|
||||||
+ char *dctrl_traddr, *log_traddr;
|
|
||||||
int len;
|
|
||||||
+ bool connect = true;
|
|
||||||
|
|
||||||
if (cargs_match_found(entry))
|
|
||||||
return false;
|
|
||||||
@@ -1398,7 +1407,22 @@ static bool should_connect(struct nvmf_disc_rsp_page_entry *entry)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
len = space_strip_len(NVMF_TRADDR_SIZE, entry->traddr);
|
|
||||||
- return !strncmp(fabrics_cfg.traddr, entry->traddr, len);
|
|
||||||
+
|
|
||||||
+ dctrl_traddr = strdup(fabrics_cfg.traddr);
|
|
||||||
+ log_traddr = strndup(entry->traddr, len);
|
|
||||||
+ if (!dctrl_traddr || !log_traddr)
|
|
||||||
+ goto free_exit;
|
|
||||||
+
|
|
||||||
+ strtolower(dctrl_traddr);
|
|
||||||
+ strtolower(log_traddr);
|
|
||||||
+
|
|
||||||
+ connect = (strlen(dctrl_traddr) == len) &&
|
|
||||||
+ !strcmp(dctrl_traddr, log_traddr);
|
|
||||||
+
|
|
||||||
+free_exit:
|
|
||||||
+ free(log_traddr);
|
|
||||||
+ free(dctrl_traddr);
|
|
||||||
+ return connect;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int connect_ctrls(struct nvmf_disc_rsp_page_hdr *log, int numrec)
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
|||||||
From db50dbf5692325cfef8fb77e56e1e44af83a022e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
Date: Wed, 29 Jun 2022 16:47:30 +0200
|
|
||||||
Subject: [PATCH 1/7] nvme-cli: nvme gen-hostnqn use partition UUID on IBM
|
|
||||||
POWER
|
|
||||||
|
|
||||||
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
---
|
|
||||||
nvme.c | 27 +++++++++++++++++++++++++--
|
|
||||||
1 file changed, 25 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/nvme.c b/nvme.c
|
|
||||||
index 5beeac78..0535ed2b 100644
|
|
||||||
--- a/nvme.c
|
|
||||||
+++ b/nvme.c
|
|
||||||
@@ -6516,6 +6516,26 @@ static int admin_passthru(int argc, char **argv, struct command *cmd, struct plu
|
|
||||||
return passthru(argc, argv, NVME_IOCTL_ADMIN_CMD, 1, desc, cmd);
|
|
||||||
}
|
|
||||||
|
|
||||||
+#define PATH_UUID_IBM "/proc/device-tree/ibm,partition-uuid"
|
|
||||||
+
|
|
||||||
+static int uuid_from_device_tree(char *system_uuid)
|
|
||||||
+{
|
|
||||||
+ ssize_t len;
|
|
||||||
+ int f;
|
|
||||||
+
|
|
||||||
+ f = open(PATH_UUID_IBM, O_RDONLY);
|
|
||||||
+ if (f < 0)
|
|
||||||
+ return -ENXIO;
|
|
||||||
+
|
|
||||||
+ memset(system_uuid, 0, 37);
|
|
||||||
+ len = read(f, system_uuid, 37 - 1);
|
|
||||||
+ close(f);
|
|
||||||
+ if (len < 0)
|
|
||||||
+ return -ENXIO;
|
|
||||||
+
|
|
||||||
+ return strlen(system_uuid) ? 0 : -ENXIO;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static int gen_hostnqn_cmd(int argc, char **argv, struct command *command, struct plugin *plugin)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
@@ -6525,8 +6545,11 @@ static int gen_hostnqn_cmd(int argc, char **argv, struct command *command, struc
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ret = uuid_from_dmi(uuid_str);
|
|
||||||
- if (ret < 0)
|
|
||||||
- ret = uuid_from_systemd(uuid_str);
|
|
||||||
+ if (ret < 0) {
|
|
||||||
+ ret = uuid_from_device_tree(uuid_str);
|
|
||||||
+ if (ret < 0)
|
|
||||||
+ ret = uuid_from_systemd(uuid_str);
|
|
||||||
+ }
|
|
||||||
#ifdef LIBUUID
|
|
||||||
if (ret < 0) {
|
|
||||||
uuid_generate_random(uuid);
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
|||||||
From f491884513bfba7bb007428e4664c2dfda21d424 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
Date: Wed, 29 Jun 2022 17:33:10 +0200
|
|
||||||
Subject: [PATCH 2/7] Add new events support in PEL
|
|
||||||
|
|
||||||
Add two new events support in header file.
|
|
||||||
|
|
||||||
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
---
|
|
||||||
linux/nvme.h | 8 ++++++++
|
|
||||||
1 file changed, 8 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/linux/nvme.h b/linux/nvme.h
|
|
||||||
index 7a925c7a..8b4c6833 100644
|
|
||||||
--- a/linux/nvme.h
|
|
||||||
+++ b/linux/nvme.h
|
|
||||||
@@ -862,6 +862,12 @@ struct nvme_thermal_exc_event {
|
|
||||||
__u8 threshold;
|
|
||||||
};
|
|
||||||
|
|
||||||
+/* persistent event type 0Bh */
|
|
||||||
+struct nvme_set_feature_event {
|
|
||||||
+ __le32 layout;
|
|
||||||
+ __le32 cdw_mem[0];
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
/* persistent event entry head */
|
|
||||||
struct nvme_persistent_event_entry_head {
|
|
||||||
__u8 etype;
|
|
||||||
@@ -909,6 +915,8 @@ enum nvme_persistent_event_types {
|
|
||||||
NVME_FORMAT_COMPLETION_EVENT = 0x08,
|
|
||||||
NVME_SANITIZE_START_EVENT = 0x09,
|
|
||||||
NVME_SANITIZE_COMPLETION_EVENT = 0x0a,
|
|
||||||
+ NVME_SET_FEATURE_EVENT = 0x0b,
|
|
||||||
+ NVME_TELEMETRY_CRT = 0x0c,
|
|
||||||
NVME_THERMAL_EXCURSION_EVENT = 0x0d
|
|
||||||
};
|
|
||||||
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,146 +0,0 @@
|
|||||||
From a0db61992c14b34fcf6787b957d5d5d0e77c6f33 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
Date: Wed, 29 Jun 2022 18:00:44 +0200
|
|
||||||
Subject: [PATCH 3/7] nvme-cli: Decode "Supported Events Bitmap" in PEL header
|
|
||||||
|
|
||||||
"Supported Events Bitmap" in PEL header shows what events
|
|
||||||
are supported in current nvme devices.
|
|
||||||
|
|
||||||
Persistent Event Log for device: nvme0n1
|
|
||||||
Action for Persistent Event Log: 0
|
|
||||||
..
|
|
||||||
..
|
|
||||||
..
|
|
||||||
Supported Events Bitmap:
|
|
||||||
Support SMART/Health Log Snapshot Event(0x1)
|
|
||||||
Support Firmware Commit Event(0x2)
|
|
||||||
Support Timestamp Change Event(0x3)
|
|
||||||
Support Power-on or Reset Event(0x4)
|
|
||||||
Support NVM Subsystem Hardware Error Event(0x5)
|
|
||||||
Support Change Namespace Event(0x6)
|
|
||||||
Support Format NVM Start Event(0x7)
|
|
||||||
Support Format NVM Completion Event(0x8)
|
|
||||||
Support Sanitize Start Event(0x9)
|
|
||||||
Support Sanitize Completion Event(0xa)
|
|
||||||
Support Set Feature Event(0xb)
|
|
||||||
Support Set Telemetry CRT Event(0xc)
|
|
||||||
Support Thermal Excursion Event(0xd)
|
|
||||||
|
|
||||||
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
---
|
|
||||||
nvme-print.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++------
|
|
||||||
nvme.c | 4 ++--
|
|
||||||
2 files changed, 48 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/nvme-print.c b/nvme-print.c
|
|
||||||
index f631b347..21524a50 100755
|
|
||||||
--- a/nvme-print.c
|
|
||||||
+++ b/nvme-print.c
|
|
||||||
@@ -1015,6 +1015,26 @@ void nvme_show_predictable_latency_event_agg_log(
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+const char *nvme_pel_event_to_string(int type)
|
|
||||||
+{
|
|
||||||
+ switch (type) {
|
|
||||||
+ case NVME_SMART_HEALTH_EVENT: return "SMART/Health Log Snapshot Event(0x1)";
|
|
||||||
+ case NVME_FW_COMMIT_EVENT: return "Firmware Commit Event(0x2)";
|
|
||||||
+ case NVME_TIMESTAMP_EVENT: return "Timestamp Change Event(0x3)";
|
|
||||||
+ case NVME_POWER_ON_RESET_EVENT: return "Power-on or Reset Event(0x4)";
|
|
||||||
+ case NVME_NSS_HW_ERROR_EVENT: return "NVM Subsystem Hardware Error Event(0x5)";
|
|
||||||
+ case NVME_CHANGE_NS_EVENT: return "Change Namespace Event(0x6)";
|
|
||||||
+ case NVME_FORMAT_START_EVENT: return "Format NVM Start Event(0x7)";
|
|
||||||
+ case NVME_FORMAT_COMPLETION_EVENT: return "Format NVM Completion Event(0x8)";
|
|
||||||
+ case NVME_SANITIZE_START_EVENT: return "Sanitize Start Event(0x9)";
|
|
||||||
+ case NVME_SANITIZE_COMPLETION_EVENT: return "Sanitize Completion Event(0xa)";
|
|
||||||
+ case NVME_SET_FEATURE_EVENT: return "Set Feature Event(0xb)";
|
|
||||||
+ case NVME_TELEMETRY_CRT: return "Set Telemetry CRT Event(0xc)";
|
|
||||||
+ case NVME_THERMAL_EXCURSION_EVENT: return "Thermal Excursion Event(0xd)";
|
|
||||||
+ default: return NULL;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static const char *nvme_show_nss_hw_error(__u16 error_code)
|
|
||||||
{
|
|
||||||
switch (error_code) {
|
|
||||||
@@ -1043,6 +1063,29 @@ static const char *nvme_show_nss_hw_error(__u16 error_code)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void add_bitmap(int i, __u8 seb, struct json_object *root, int json_flag)
|
|
||||||
+{
|
|
||||||
+ char evt_str[50];
|
|
||||||
+ char key[128];
|
|
||||||
+
|
|
||||||
+ for (int bit = 0; bit < 8; bit++) {
|
|
||||||
+ if (nvme_pel_event_to_string(bit + i * 8)) {
|
|
||||||
+ if (json_flag == 1) {
|
|
||||||
+ sprintf(key, "bitmap_%x", (bit + i * 8));
|
|
||||||
+ if ((seb >> bit) & 0x1)
|
|
||||||
+ snprintf(evt_str, sizeof(evt_str), "Support %s",
|
|
||||||
+ nvme_pel_event_to_string(bit + i * 8));
|
|
||||||
+ json_object_add_value_string(root, key, evt_str);
|
|
||||||
+ } else {
|
|
||||||
+ if (nvme_pel_event_to_string(bit + i * 8))
|
|
||||||
+ if ((seb >> bit) & 0x1)
|
|
||||||
+ printf(" Support %s\n",
|
|
||||||
+ nvme_pel_event_to_string(bit + i * 8));
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void json_persistent_event_log(void *pevent_log_info, __u32 size)
|
|
||||||
{
|
|
||||||
struct json_object *root;
|
|
||||||
@@ -1112,9 +1155,7 @@ void json_persistent_event_log(void *pevent_log_info, __u32 size)
|
|
||||||
for (int i = 0; i < 32; i++) {
|
|
||||||
if (pevent_log_head->supp_event_bm[i] == 0)
|
|
||||||
continue;
|
|
||||||
- sprintf(key, "bitmap_%d", i);
|
|
||||||
- json_object_add_value_uint(root, key,
|
|
||||||
- pevent_log_head->supp_event_bm[i]);
|
|
||||||
+ add_bitmap(i, pevent_log_head->supp_event_bm[i], root, 1);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
printf("No log data can be shown with this log len at least " \
|
|
||||||
@@ -1440,12 +1481,11 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
le32_to_cpu(pevent_log_head->rci));
|
|
||||||
if(human)
|
|
||||||
nvme_show_persistent_event_log_rci(pevent_log_head->rci);
|
|
||||||
- printf("Supported Events Bitmap: ");
|
|
||||||
+ printf("Supported Events Bitmap: \n");
|
|
||||||
for (int i = 0; i < 32; i++) {
|
|
||||||
if (pevent_log_head->supp_event_bm[i] == 0)
|
|
||||||
continue;
|
|
||||||
- printf("BitMap[%d] is 0x%x\n", i,
|
|
||||||
- pevent_log_head->supp_event_bm[i]);
|
|
||||||
+ add_bitmap(i, pevent_log_head->supp_event_bm[i], NULL, 0);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
printf("No log data can be shown with this log len at least " \
|
|
||||||
diff --git a/nvme.c b/nvme.c
|
|
||||||
index 0535ed2b..44c53e6b 100644
|
|
||||||
--- a/nvme.c
|
|
||||||
+++ b/nvme.c
|
|
||||||
@@ -4808,7 +4808,7 @@ static int dsm(int argc, char **argv, struct command *cmd, struct plugin *plugin
|
|
||||||
|
|
||||||
nc = argconfig_parse_comma_sep_array(cfg.ctx_attrs, ctx_attrs, ARRAY_SIZE(ctx_attrs));
|
|
||||||
nb = argconfig_parse_comma_sep_array(cfg.blocks, nlbs, ARRAY_SIZE(nlbs));
|
|
||||||
- ns = argconfig_parse_comma_sep_array_long(cfg.slbas, slbas, ARRAY_SIZE(slbas));
|
|
||||||
+ ns = argconfig_parse_comma_sep_array_long(cfg.slbas, (long long unsigned int *)slbas, ARRAY_SIZE(slbas));
|
|
||||||
nr = max(nc, max(nb, ns));
|
|
||||||
if (!nr || nr > 256) {
|
|
||||||
fprintf(stderr, "No range definition provided\n");
|
|
||||||
@@ -4963,7 +4963,7 @@ static int copy(int argc, char **argv, struct command *cmd, struct plugin *plugi
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- copy = nvme_setup_copy_range(nlbs, slbas, eilbrts, elbatms, elbats, nr);
|
|
||||||
+ copy = nvme_setup_copy_range(nlbs, (__u64 *)slbas, eilbrts, elbatms, elbats, nr);
|
|
||||||
if (!copy) {
|
|
||||||
fprintf(stderr, "failed to allocate payload\n");
|
|
||||||
errno = ENOMEM;
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,141 +0,0 @@
|
|||||||
From 6c916ee527e14bf4c4640ffeef8efdd891ba9ef4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
Date: Thu, 30 Jun 2022 16:17:44 +0200
|
|
||||||
Subject: [PATCH 4/7] nvme-cli: Adds event number in persistent event entries
|
|
||||||
|
|
||||||
Persistent Event Entries:
|
|
||||||
Event Number: 0
|
|
||||||
Event Type: SMART/Health Log Snapshot Event(0x1)
|
|
||||||
Event Type Revision: 1
|
|
||||||
Event Header Length: 21
|
|
||||||
Controller Identifier: 66
|
|
||||||
Event Timestamp: 44392
|
|
||||||
|
|
||||||
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
---
|
|
||||||
nvme-print.c | 30 ++++++++++++++++--------------
|
|
||||||
1 file changed, 16 insertions(+), 14 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/nvme-print.c b/nvme-print.c
|
|
||||||
index 21524a50..3b82b174 100755
|
|
||||||
--- a/nvme-print.c
|
|
||||||
+++ b/nvme-print.c
|
|
||||||
@@ -1174,8 +1174,9 @@ void json_persistent_event_log(void *pevent_log_info, __u32 size)
|
|
||||||
break;
|
|
||||||
valid_attrs = json_create_object();
|
|
||||||
|
|
||||||
- json_object_add_value_uint(valid_attrs, "event_type",
|
|
||||||
- pevent_entry_head->etype);
|
|
||||||
+ json_object_add_value_uint(valid_attrs, "event_number", i);
|
|
||||||
+ json_object_add_value_string(valid_attrs, "event_type",
|
|
||||||
+ nvme_pel_event_to_string(pevent_entry_head->etype));
|
|
||||||
json_object_add_value_uint(valid_attrs, "event_type_rev",
|
|
||||||
pevent_entry_head->etype_rev);
|
|
||||||
json_object_add_value_uint(valid_attrs, "event_header_len",
|
|
||||||
@@ -1505,7 +1506,8 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
le16_to_cpu(pevent_entry_head->el)) >= size)
|
|
||||||
break;
|
|
||||||
|
|
||||||
- printf("Event Type: %u\n", pevent_entry_head->etype);
|
|
||||||
+ printf("Event Number: %u\n", i);
|
|
||||||
+ printf("Event Type: %s\n", nvme_pel_event_to_string(pevent_entry_head->etype));
|
|
||||||
printf("Event Type Revision: %u\n", pevent_entry_head->etype_rev);
|
|
||||||
printf("Event Header Length: %u\n", pevent_entry_head->ehl);
|
|
||||||
printf("Controller Identifier: %u\n",
|
|
||||||
@@ -1521,12 +1523,12 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
switch (pevent_entry_head->etype) {
|
|
||||||
case NVME_SMART_HEALTH_EVENT:
|
|
||||||
smart_event = pevent_log_info + offset;
|
|
||||||
- printf("Smart Health Event: \n");
|
|
||||||
+ printf("Smart Health Event Entry: \n");
|
|
||||||
nvme_show_smart_log(smart_event, NVME_NSID_ALL, devname, flags);
|
|
||||||
break;
|
|
||||||
case NVME_FW_COMMIT_EVENT:
|
|
||||||
fw_commit_event = pevent_log_info + offset;
|
|
||||||
- printf("FW Commit Event: \n");
|
|
||||||
+ printf("FW Commit Event Entry: \n");
|
|
||||||
printf("Old Firmware Revision: %"PRIu64"\n",
|
|
||||||
le64_to_cpu(fw_commit_event->old_fw_rev));
|
|
||||||
printf("New Firmware Revision: %"PRIu64"\n",
|
|
||||||
@@ -1543,7 +1545,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
break;
|
|
||||||
case NVME_TIMESTAMP_EVENT:
|
|
||||||
ts_change_event = pevent_log_info + offset;
|
|
||||||
- printf("Time Stamp Change Event: \n");
|
|
||||||
+ printf("Time Stamp Change Event Entry: \n");
|
|
||||||
printf("Previous Timestamp: %"PRIu64"\n",
|
|
||||||
le64_to_cpu(ts_change_event->previous_timestamp));
|
|
||||||
printf("Milliseconds Since Reset: %"PRIu64"\n",
|
|
||||||
@@ -1555,7 +1557,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
|
|
||||||
por_info_list = por_info_len / sizeof(*por_event);
|
|
||||||
|
|
||||||
- printf("Power On Reset Event: \n");
|
|
||||||
+ printf("Power On Reset Event Entry: \n");
|
|
||||||
fw_rev = pevent_log_info + offset;
|
|
||||||
printf("Firmware Revision: %"PRIu64"\n", le64_to_cpu(*fw_rev));
|
|
||||||
printf("Reset Information List: \n");
|
|
||||||
@@ -1578,13 +1580,13 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
break;
|
|
||||||
case NVME_NSS_HW_ERROR_EVENT:
|
|
||||||
nss_hw_err_event = pevent_log_info + offset;
|
|
||||||
- printf("NVM Subsystem Hardware Error Event Code: %u, %s\n",
|
|
||||||
+ printf("NVM Subsystem Hardware Error Event Code Entry: %u, %s\n",
|
|
||||||
le16_to_cpu(nss_hw_err_event->nss_hw_err_event_code),
|
|
||||||
nvme_show_nss_hw_error(nss_hw_err_event->nss_hw_err_event_code));
|
|
||||||
break;
|
|
||||||
case NVME_CHANGE_NS_EVENT:
|
|
||||||
ns_event = pevent_log_info + offset;
|
|
||||||
- printf("Change Namespace Event: \n");
|
|
||||||
+ printf("Change Namespace Event Entry: \n");
|
|
||||||
printf("Namespace Management CDW10: %u\n",
|
|
||||||
le32_to_cpu(ns_event->nsmgt_cdw10));
|
|
||||||
printf("Namespace Size: %"PRIu64"\n",
|
|
||||||
@@ -1603,7 +1605,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
break;
|
|
||||||
case NVME_FORMAT_START_EVENT:
|
|
||||||
format_start_event = pevent_log_info + offset;
|
|
||||||
- printf("Format NVM Start Event: \n");
|
|
||||||
+ printf("Format NVM Start Event Entry: \n");
|
|
||||||
printf("Namespace Identifier: %u\n",
|
|
||||||
le32_to_cpu(format_start_event->nsid));
|
|
||||||
printf("Format NVM Attributes: %u\n",
|
|
||||||
@@ -1613,7 +1615,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
break;
|
|
||||||
case NVME_FORMAT_COMPLETION_EVENT:
|
|
||||||
format_cmpln_event = pevent_log_info + offset;
|
|
||||||
- printf("Format NVM Completion Event: \n");
|
|
||||||
+ printf("Format NVM Completion Event Entry: \n");
|
|
||||||
printf("Namespace Identifier: %u\n",
|
|
||||||
le32_to_cpu(format_cmpln_event->nsid));
|
|
||||||
printf("Smallest Format Progress Indicator: %u\n",
|
|
||||||
@@ -1627,7 +1629,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
break;
|
|
||||||
case NVME_SANITIZE_START_EVENT:
|
|
||||||
sanitize_start_event = pevent_log_info + offset;
|
|
||||||
- printf("Sanitize Start Event: \n");
|
|
||||||
+ printf("Sanitize Start Event Entry: \n");
|
|
||||||
printf("SANICAP: %u\n", sanitize_start_event->sani_cap);
|
|
||||||
printf("Sanitize CDW10: %u\n",
|
|
||||||
le32_to_cpu(sanitize_start_event->sani_cdw10));
|
|
||||||
@@ -1636,7 +1638,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
break;
|
|
||||||
case NVME_SANITIZE_COMPLETION_EVENT:
|
|
||||||
sanitize_cmpln_event = pevent_log_info + offset;
|
|
||||||
- printf("Sanitize Completion Event: \n");
|
|
||||||
+ printf("Sanitize Completion Event Entry: \n");
|
|
||||||
printf("Sanitize Progress: %u\n",
|
|
||||||
le16_to_cpu(sanitize_cmpln_event->sani_prog));
|
|
||||||
printf("Sanitize Status: %u\n",
|
|
||||||
@@ -1646,7 +1648,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
break;
|
|
||||||
case NVME_THERMAL_EXCURSION_EVENT:
|
|
||||||
thermal_exc_event = pevent_log_info + offset;
|
|
||||||
- printf("Thermal Excursion Event: \n");
|
|
||||||
+ printf("Thermal Excursion Event Entry: \n");
|
|
||||||
printf("Over Temperature: %u\n", thermal_exc_event->over_temp);
|
|
||||||
printf("Threshold: %u\n", thermal_exc_event->threshold);
|
|
||||||
break;
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,113 +0,0 @@
|
|||||||
From 7e858ab53eb23083205d75f590ca2c2b256c2a7b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
Date: Thu, 30 Jun 2022 16:37:40 +0200
|
|
||||||
Subject: [PATCH 5/7] nvme-cli: Adds readable firmware level in persistent
|
|
||||||
|
|
||||||
For example, In Firmware Commit Event:
|
|
||||||
|
|
||||||
Old Firmware Revision: 3617604718875264338
|
|
||||||
New Firmware Revision: 3833777500989048146
|
|
||||||
|
|
||||||
changes to
|
|
||||||
Old Firmware Revision: 3617604718875264338 (REV.SP42)
|
|
||||||
New Firmware Revision: 3833777500989048146 (REV.SP45)
|
|
||||||
|
|
||||||
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
---
|
|
||||||
nvme-print.c | 43 ++++++++++++++++++++++++++++---------------
|
|
||||||
1 file changed, 28 insertions(+), 15 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/nvme-print.c b/nvme-print.c
|
|
||||||
index 3b82b174..74ecd95a 100755
|
|
||||||
--- a/nvme-print.c
|
|
||||||
+++ b/nvme-print.c
|
|
||||||
@@ -104,12 +104,15 @@ const char *nvme_cmd_to_string(int admin, __u8 opcode)
|
|
||||||
return "Unknown";
|
|
||||||
}
|
|
||||||
|
|
||||||
-static char *fw_to_string(__u8 fw[])
|
|
||||||
+static const char *fw_to_string(char *c)
|
|
||||||
{
|
|
||||||
- static char frs[9];
|
|
||||||
+ static char ret[9];
|
|
||||||
+ int i;
|
|
||||||
|
|
||||||
- snprintf(frs, sizeof(frs), "%-.*s", 8, fw);
|
|
||||||
- return frs;
|
|
||||||
+ for (i = 0; i < 8; i++)
|
|
||||||
+ ret[i] = c[i] >= '!' && c[i] <= '~' ? c[i] : '.';
|
|
||||||
+ ret[i] = '\0';
|
|
||||||
+ return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char *get_sanitize_log_sstat_status_str(__u16 status)
|
|
||||||
@@ -1094,6 +1097,7 @@ void json_persistent_event_log(void *pevent_log_info, __u32 size)
|
|
||||||
__u32 offset, por_info_len, por_info_list;
|
|
||||||
__u64 *fw_rev;
|
|
||||||
char key[128];
|
|
||||||
+ char fw_str[50];
|
|
||||||
struct nvme_smart_log *smart_event;
|
|
||||||
struct nvme_fw_commit_event *fw_commit_event;
|
|
||||||
struct nvme_time_stamp_change_event *ts_change_event;
|
|
||||||
@@ -1266,10 +1270,14 @@ void json_persistent_event_log(void *pevent_log_info, __u32 size)
|
|
||||||
break;
|
|
||||||
case NVME_FW_COMMIT_EVENT:
|
|
||||||
fw_commit_event = pevent_log_info + offset;
|
|
||||||
- json_object_add_value_uint(valid_attrs, "old_fw_rev",
|
|
||||||
- le64_to_cpu(fw_commit_event->old_fw_rev));
|
|
||||||
- json_object_add_value_uint(valid_attrs, "new_fw_rev",
|
|
||||||
- le64_to_cpu(fw_commit_event->new_fw_rev));
|
|
||||||
+ snprintf(fw_str, sizeof(fw_str), "%"PRIu64" (%s)",
|
|
||||||
+ le64_to_cpu(fw_commit_event->old_fw_rev),
|
|
||||||
+ fw_to_string((char *)&fw_commit_event->old_fw_rev));
|
|
||||||
+ json_object_add_value_string(valid_attrs, "old_fw_rev", fw_str);
|
|
||||||
+ snprintf(fw_str, sizeof(fw_str), "%"PRIu64" (%s)",
|
|
||||||
+ le64_to_cpu(fw_commit_event->new_fw_rev),
|
|
||||||
+ fw_to_string((char *)&fw_commit_event->new_fw_rev));
|
|
||||||
+ json_object_add_value_string(valid_attrs, "new_fw_rev", fw_str);
|
|
||||||
json_object_add_value_uint(valid_attrs, "fw_commit_action",
|
|
||||||
fw_commit_event->fw_commit_action);
|
|
||||||
json_object_add_value_uint(valid_attrs, "fw_slot",
|
|
||||||
@@ -1297,8 +1305,10 @@ void json_persistent_event_log(void *pevent_log_info, __u32 size)
|
|
||||||
por_info_list = por_info_len / sizeof(*por_event);
|
|
||||||
|
|
||||||
fw_rev = pevent_log_info + offset;
|
|
||||||
- json_object_add_value_uint(valid_attrs, "fw_rev",
|
|
||||||
- le64_to_cpu(*fw_rev));
|
|
||||||
+ snprintf(fw_str, sizeof(fw_str), "%"PRIu64" (%s)",
|
|
||||||
+ le64_to_cpu(*fw_rev),
|
|
||||||
+ fw_to_string((char *)fw_rev));
|
|
||||||
+ json_object_add_value_string(valid_attrs, "fw_rev", fw_str);
|
|
||||||
for (int i = 0; i < por_info_list; i++) {
|
|
||||||
por_event = pevent_log_info + offset +
|
|
||||||
sizeof(*fw_rev) + i * sizeof(*por_event);
|
|
||||||
@@ -1529,10 +1539,12 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
case NVME_FW_COMMIT_EVENT:
|
|
||||||
fw_commit_event = pevent_log_info + offset;
|
|
||||||
printf("FW Commit Event Entry: \n");
|
|
||||||
- printf("Old Firmware Revision: %"PRIu64"\n",
|
|
||||||
- le64_to_cpu(fw_commit_event->old_fw_rev));
|
|
||||||
- printf("New Firmware Revision: %"PRIu64"\n",
|
|
||||||
- le64_to_cpu(fw_commit_event->new_fw_rev));
|
|
||||||
+ printf("Old Firmware Revision: %"PRIu64" (%s)\n",
|
|
||||||
+ le64_to_cpu(fw_commit_event->old_fw_rev),
|
|
||||||
+ fw_to_string((char *)&fw_commit_event->old_fw_rev));
|
|
||||||
+ printf("New Firmware Revision: %"PRIu64" (%s)\n",
|
|
||||||
+ le64_to_cpu(fw_commit_event->new_fw_rev),
|
|
||||||
+ fw_to_string((char *)&fw_commit_event->new_fw_rev));
|
|
||||||
printf("FW Commit Action: %u\n",
|
|
||||||
fw_commit_event->fw_commit_action);
|
|
||||||
printf("FW Slot: %u\n", fw_commit_event->fw_slot);
|
|
||||||
@@ -1559,7 +1571,8 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
|
|
||||||
printf("Power On Reset Event Entry: \n");
|
|
||||||
fw_rev = pevent_log_info + offset;
|
|
||||||
- printf("Firmware Revision: %"PRIu64"\n", le64_to_cpu(*fw_rev));
|
|
||||||
+ printf("Firmware Revision: %"PRIu64" (%s)\n", le64_to_cpu(*fw_rev),
|
|
||||||
+ fw_to_string((char *)fw_rev));
|
|
||||||
printf("Reset Information List: \n");
|
|
||||||
|
|
||||||
for (int i = 0; i < por_info_list; i++) {
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,69 +0,0 @@
|
|||||||
From 859b8ee99a725bdcfbb7c8352c50449d126cffc4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
Date: Thu, 30 Jun 2022 16:41:59 +0200
|
|
||||||
Subject: [PATCH 6/7] nvme-cli: Add support set feature event in PEL
|
|
||||||
|
|
||||||
Add "Set Feature" event in PEL.
|
|
||||||
|
|
||||||
Persistent Event Entries:
|
|
||||||
Event Number: 0
|
|
||||||
Event Type: Set Feature Event(0xb)
|
|
||||||
Event Type Revision: 1
|
|
||||||
Event Header Length: 21
|
|
||||||
Controller Identifier: 65
|
|
||||||
Event Timestamp: 564587204146155
|
|
||||||
Vendor Specific Information Length: 0
|
|
||||||
Event Length: 16
|
|
||||||
Set Feature Event Entry:
|
|
||||||
Set Feature ID :0x7 (Number of Queues), value:0x270027
|
|
||||||
Number of IO Completion Queues Allocated (NCQA): 40
|
|
||||||
Number of IO Submission Queues Allocated (NSQA): 40
|
|
||||||
|
|
||||||
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
---
|
|
||||||
nvme-print.c | 15 +++++++++++++++
|
|
||||||
1 file changed, 15 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/nvme-print.c b/nvme-print.c
|
|
||||||
index 74ecd95a..37011dbe 100755
|
|
||||||
--- a/nvme-print.c
|
|
||||||
+++ b/nvme-print.c
|
|
||||||
@@ -1436,6 +1436,8 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
{
|
|
||||||
__u32 offset, por_info_len, por_info_list;
|
|
||||||
__u64 *fw_rev;
|
|
||||||
+ int fid, cdw11, dword_cnt;
|
|
||||||
+ unsigned char *mem_buf = NULL;
|
|
||||||
struct nvme_smart_log *smart_event;
|
|
||||||
struct nvme_fw_commit_event *fw_commit_event;
|
|
||||||
struct nvme_time_stamp_change_event *ts_change_event;
|
|
||||||
@@ -1446,6 +1448,7 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
struct nvme_format_nvm_compln_event *format_cmpln_event;
|
|
||||||
struct nvme_sanitize_start_event *sanitize_start_event;
|
|
||||||
struct nvme_sanitize_compln_event *sanitize_cmpln_event;
|
|
||||||
+ struct nvme_set_feature_event *set_feat_event;
|
|
||||||
struct nvme_thermal_exc_event *thermal_exc_event;
|
|
||||||
struct nvme_persistent_event_log_head *pevent_log_head;
|
|
||||||
struct nvme_persistent_event_entry_head *pevent_entry_head;
|
|
||||||
@@ -1659,6 +1662,18 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
printf("Completion Information: %u\n",
|
|
||||||
le16_to_cpu(sanitize_cmpln_event->cmpln_info));
|
|
||||||
break;
|
|
||||||
+ case NVME_SET_FEATURE_EVENT:
|
|
||||||
+ set_feat_event = pevent_log_info + offset;
|
|
||||||
+ printf("Set Feature Event Entry: \n");
|
|
||||||
+ dword_cnt = set_feat_event->layout & 0x03;
|
|
||||||
+ fid = le32_to_cpu(set_feat_event->cdw_mem[0]) & 0x000f;
|
|
||||||
+ cdw11 = le32_to_cpu(set_feat_event->cdw_mem[1]);
|
|
||||||
+ if (((set_feat_event->layout & 0xff) >> 2) != 0)
|
|
||||||
+ mem_buf = (unsigned char *)(set_feat_event + 4 + dword_cnt * 4);
|
|
||||||
+ printf("Set Feature ID :%#02x (%s), value:%#08x\n", fid,
|
|
||||||
+ nvme_feature_to_string(fid), cdw11);
|
|
||||||
+ nvme_feature_show_fields(fid, cdw11, mem_buf);
|
|
||||||
+ break;
|
|
||||||
case NVME_THERMAL_EXCURSION_EVENT:
|
|
||||||
thermal_exc_event = pevent_log_info + offset;
|
|
||||||
printf("Thermal Excursion Event Entry: \n");
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
From 44b23d2daf246db0ac09a4a79a9a5161843a4936 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
Date: Thu, 30 Jun 2022 16:44:07 +0200
|
|
||||||
Subject: [PATCH 7/7] nvme-cli: Add support Telemetry CRT in PEL
|
|
||||||
|
|
||||||
Add "Telemetry CRT" event in PEL.
|
|
||||||
|
|
||||||
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
---
|
|
||||||
nvme-print.c | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/nvme-print.c b/nvme-print.c
|
|
||||||
index 37011dbe..992b9b83 100755
|
|
||||||
--- a/nvme-print.c
|
|
||||||
+++ b/nvme-print.c
|
|
||||||
@@ -1674,6 +1674,9 @@ void nvme_show_persistent_event_log(void *pevent_log_info,
|
|
||||||
nvme_feature_to_string(fid), cdw11);
|
|
||||||
nvme_feature_show_fields(fid, cdw11, mem_buf);
|
|
||||||
break;
|
|
||||||
+ case NVME_TELEMETRY_CRT:
|
|
||||||
+ d(pevent_log_info + offset, 512, 16, 1);
|
|
||||||
+ break;
|
|
||||||
case NVME_THERMAL_EXCURSION_EVENT:
|
|
||||||
thermal_exc_event = pevent_log_info + offset;
|
|
||||||
printf("Thermal Excursion Event Entry: \n");
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From b3db6509e1f70bdde9205ab97bd87fbb94a49f0a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
Date: Fri, 15 Jul 2022 11:10:59 +0200
|
|
||||||
Subject: [PATCH] fix firmware log page frs variable sign
|
|
||||||
|
|
||||||
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
---
|
|
||||||
linux/nvme.h | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/linux/nvme.h b/linux/nvme.h
|
|
||||||
index 8b4c6833..2c402688 100644
|
|
||||||
--- a/linux/nvme.h
|
|
||||||
+++ b/linux/nvme.h
|
|
||||||
@@ -1539,7 +1539,7 @@ struct nvme_error_log_page {
|
|
||||||
struct nvme_firmware_log_page {
|
|
||||||
__u8 afi;
|
|
||||||
__u8 resv[7];
|
|
||||||
- __u8 frs[7][8];
|
|
||||||
+ char frs[7][8];
|
|
||||||
__u8 resv2[448];
|
|
||||||
};
|
|
||||||
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
From f9b6c2100db88e9f317f15f17faaed59b725ac9b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Keith Busch <kbusch@kernel.org>
|
|
||||||
Date: Tue, 24 Aug 2021 11:49:16 -0700
|
|
||||||
Subject: [PATCH] fix file permissions (nvme-print.c)
|
|
||||||
|
|
||||||
It's not executable.
|
|
||||||
|
|
||||||
Signed-off-by: Keith Busch <kbusch@kernel.org>
|
|
||||||
---
|
|
||||||
nvme-print.c | 0
|
|
||||||
1 file changed, 0 insertions(+), 0 deletions(-)
|
|
||||||
mode change 100755 => 100644 nvme-print.c
|
|
||||||
|
|
||||||
diff --git a/nvme-print.c b/nvme-print.c
|
|
||||||
old mode 100755
|
|
||||||
new mode 100644
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
|||||||
From ad9f35c0bf8a71c6a4b7586d7553b8e9d171f48e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Wagner <dwagner@suse.de>
|
|
||||||
Date: Tue, 7 Mar 2023 10:24:01 +0100
|
|
||||||
Subject: [PATCH] fabrics: Fix ordering for auto connect services
|
|
||||||
|
|
||||||
In order to be able to mount file systems via /etc/fstab we have to
|
|
||||||
make sure that the corresponding auto connect services have been
|
|
||||||
executed. Because the mounting of the local filesystem happens very
|
|
||||||
early in the boot we have to carefully sort these service file into the
|
|
||||||
boot process.
|
|
||||||
|
|
||||||
First, we have to disable the DefaultDependency as this will
|
|
||||||
automatically add dependency on sysinit.target which is too late (after
|
|
||||||
local mounts). Though without the default dependency we have to provide
|
|
||||||
a Before and After conditions.
|
|
||||||
|
|
||||||
The Before is simple as we have a local-fs-pre target. The After
|
|
||||||
is a bit tricky as there are no targets available.
|
|
||||||
|
|
||||||
Because the whole autoconnect machinery depends on udev events being
|
|
||||||
delivered we place the service after systemd-udevd has been started.
|
|
||||||
|
|
||||||
Link: https://www.freedesktop.org/software/systemd/man/bootup.html
|
|
||||||
Reported-by: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
Reported-by: Wen Xiong <wenxiong@linux.ibm.com>
|
|
||||||
Tested-by: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
Tested-by: Wen Xiong <wenxiong@linux.ibm.com>
|
|
||||||
Signed-off-by: Daniel Wagner <dwagner@suse.de>
|
|
||||||
---
|
|
||||||
nvmf-autoconnect/systemd/nvmefc-boot-connections.service.in | 3 +++
|
|
||||||
nvmf-autoconnect/systemd/nvmf-connect@.service.in | 4 +++-
|
|
||||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/nvmf-autoconnect/systemd/nvmefc-boot-connections.service b/nvmf-autoconnect/systemd/nvmefc-boot-connections.service
|
|
||||||
index 33ab8c1f..7036625c 100644
|
|
||||||
--- a/nvmf-autoconnect/systemd/nvmefc-boot-connections.service
|
|
||||||
+++ b/nvmf-autoconnect/systemd/nvmefc-boot-connections.service
|
|
||||||
@@ -1,6 +1,9 @@
|
|
||||||
[Unit]
|
|
||||||
Description=Auto-connect to subsystems on FC-NVME devices found during boot
|
|
||||||
ConditionPathExists=/sys/class/fc/fc_udev_device/nvme_discovery
|
|
||||||
+DefaultDependencies=no
|
|
||||||
+After=systemd-udevd.service
|
|
||||||
+Before=local-fs-pre.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
diff --git a/nvmf-autoconnect/systemd/nvmf-connect@.service b/nvmf-autoconnect/systemd/nvmf-connect@.service
|
|
||||||
index 90f774c5..dd245ee6 100644
|
|
||||||
--- a/nvmf-autoconnect/systemd/nvmf-connect@.service
|
|
||||||
+++ b/nvmf-autoconnect/systemd/nvmf-connect@.service
|
|
||||||
@@ -4,7 +4,9 @@
|
|
||||||
|
|
||||||
[Unit]
|
|
||||||
Description=NVMf auto-connect scan upon nvme discovery controller Events
|
|
||||||
-After=syslog.target
|
|
||||||
+DefaultDependencies=no
|
|
||||||
+After=systemd-udevd.service
|
|
||||||
+Before=local-fs-pre.target
|
|
||||||
PartOf=nvmf-connect.target
|
|
||||||
Requires=nvmf-connect.target
|
|
||||||
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
From 00909e8bc7e5a1b7a1129f8e18c60eedca0248f7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
Date: Mon, 17 Apr 2023 15:39:56 +0200
|
|
||||||
Subject: [PATCH] nvme: fix rnlpt to_string() values.
|
|
||||||
|
|
||||||
"Reservation Notification Log Page Type" values do not start
|
|
||||||
from 0x1 but from 0x0.
|
|
||||||
|
|
||||||
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
|
|
||||||
---
|
|
||||||
nvme-print.c | 8 ++++----
|
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/nvme-print.c b/nvme-print.c
|
|
||||||
index 8bd2174f..1ed34572 100644
|
|
||||||
--- a/nvme-print.c
|
|
||||||
+++ b/nvme-print.c
|
|
||||||
@@ -610,10 +610,10 @@ void nvme_show_lba_status_log(void *lba_status, __u32 size,
|
|
||||||
static const char *resv_notif_to_string(__u8 type)
|
|
||||||
{
|
|
||||||
switch (type) {
|
|
||||||
- case 0x1: return "Empty Log Page";
|
|
||||||
- case 0x2: return "Registration Preempted";
|
|
||||||
- case 0x3: return "Reservation Released";
|
|
||||||
- case 0x4: return "Reservation Preempted";
|
|
||||||
+ case 0x0: return "Empty Log Page";
|
|
||||||
+ case 0x1: return "Registration Preempted";
|
|
||||||
+ case 0x2: return "Reservation Released";
|
|
||||||
+ case 0x3: return "Reservation Preempted";
|
|
||||||
default: return "Reserved";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.31.1
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
--- nvme-cli-1.9/Makefile.orig 2020-05-27 14:04:56.259961135 -0400
|
|
||||||
+++ nvme-cli-1.9/Makefile 2020-05-27 14:05:22.796185371 -0400
|
|
||||||
@@ -125,8 +125,8 @@
|
|
||||||
$(INSTALL) -m 644 -T ./etc/discovery.conf.in $(DESTDIR)$(SYSCONFDIR)/nvme/discovery.conf; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
-install-spec: install-bin install-man install-bash-completion install-zsh-completion install-etc install-systemd install-udev install-dracut
|
|
||||||
-install: install-spec install-hostparams
|
|
||||||
+install-spec: install-bin install-man install-bash-completion install-zsh-completion install-systemd install-udev install-dracut
|
|
||||||
+install: install-spec
|
|
||||||
|
|
||||||
nvme.spec: nvme.spec.in NVME-VERSION-FILE
|
|
||||||
sed -e 's/@@VERSION@@/$(NVME_VERSION)/g' < $< > $@+
|
|
@ -1,254 +0,0 @@
|
|||||||
#%%global commit0 bdbb4da0979fbdc079cf98410cdb31cf799e83b3
|
|
||||||
#%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7})
|
|
||||||
|
|
||||||
Name: nvme-cli
|
|
||||||
Version: 1.16
|
|
||||||
Release: 9%{?dist}
|
|
||||||
Summary: NVMe management command line interface
|
|
||||||
|
|
||||||
License: GPLv2+
|
|
||||||
URL: https://github.com/linux-nvme/nvme-cli
|
|
||||||
Source0: https://github.com/linux-nvme/%{name}/archive/v%{version}.tar.gz
|
|
||||||
|
|
||||||
Patch0: nvme-cli-makefile-dont-install-host-params-patch
|
|
||||||
Patch1: 0001-fabrics-fix-nvme-connect-segfault-if-transport-type-.patch
|
|
||||||
Patch2: 0002-fabrics-fix-a-buffer-overrun.patch
|
|
||||||
Patch3: 0003-bash-Fix-nvme-completion.patch
|
|
||||||
Patch4: 0004-nvme-do-not-leak-an-open-file-handle.patch
|
|
||||||
Patch5: 0005-nvme-topology-fix-memory-leaks-in-nvme_logical_block.patch
|
|
||||||
Patch6: 0006-nvme-cli-nvmf-connect-.service-Remove-matching-from-.patch
|
|
||||||
Patch7: 0007-nvme-cli-Make-connect-all-matching-be-case-insensiti.patch
|
|
||||||
Patch8: 0008-nvme-cli-nvme-gen-hostnqn-use-partition-UUID-on-IBM-.patch
|
|
||||||
Patch9: 0009-Add-new-events-support-in-PEL.patch
|
|
||||||
Patch10: 0010-nvme-cli-Decode-Supported-Events-Bitmap-in-PEL-heade.patch
|
|
||||||
Patch11: 0011-nvme-cli-Adds-event-number-in-persistent-event-entri.patch
|
|
||||||
Patch12: 0012-nvme-cli-Adds-readable-firmware-level-in-persistent.patch
|
|
||||||
Patch13: 0013-nvme-cli-Add-support-set-feature-event-in-PEL.patch
|
|
||||||
Patch14: 0014-nvme-cli-Add-support-Telemetry-CRT-in-PEL.patch
|
|
||||||
Patch15: 0015-fix-firmware-log-page-frs-variable-sign.patch
|
|
||||||
Patch16: 0016-fix-file-permissions-nvme-print.c.patch
|
|
||||||
Patch17: 0017-fabrics-Fix-ordering-for-auto-connect-services.patch
|
|
||||||
Patch18: 0018-nvme-fix-rnlpt-to_string-values.patch
|
|
||||||
|
|
||||||
BuildRequires: libuuid-devel
|
|
||||||
BuildRequires: gcc
|
|
||||||
BuildRequires: systemd-devel
|
|
||||||
Requires: util-linux
|
|
||||||
|
|
||||||
%description
|
|
||||||
nvme-cli provides NVM-Express user space tooling for Linux.
|
|
||||||
|
|
||||||
%prep
|
|
||||||
#%%setup -qn %%{name}-%%{commit0}
|
|
||||||
%setup -q
|
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
%patch6 -p1
|
|
||||||
%patch7 -p1
|
|
||||||
%patch8 -p1
|
|
||||||
%patch9 -p1
|
|
||||||
%patch10 -p1
|
|
||||||
%patch11 -p1
|
|
||||||
%patch12 -p1
|
|
||||||
%patch13 -p1
|
|
||||||
%patch14 -p1
|
|
||||||
%patch15 -p1
|
|
||||||
%patch16 -p1
|
|
||||||
%patch17 -p1
|
|
||||||
%patch18 -p1
|
|
||||||
|
|
||||||
%build
|
|
||||||
|
|
||||||
# CFLAGS on the command line breaks the build. It works okay as an
|
|
||||||
# environment variable, though. See:
|
|
||||||
# https://github.com/linux-nvme/nvme-cli/pull/480
|
|
||||||
CFLAGS="%{optflags}" make PREFIX=/usr LDFLAGS="%{__global_ldflags}" %{?_smp_mflags}
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
|
||||||
%make_install PREFIX=/usr UDEVDIR="%{_udevrulesdir}/.." SYSTEMDDIR="%{_unitdir}/.."
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/nvme
|
|
||||||
|
|
||||||
# hostid and hostnqn are supposed to be unique per machine. We obviously
|
|
||||||
# can't package them.
|
|
||||||
#rm -f %{buildroot}%{_sysconfdir}/nvme/hostid
|
|
||||||
#rm -f %{buildroot}%{_sysconfdir}/nvme/hostnqn
|
|
||||||
|
|
||||||
# Do not install the dracut rule yet. See rhbz 1742764
|
|
||||||
rm -f %{buildroot}/usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
|
||||||
%license LICENSE
|
|
||||||
%doc README.md
|
|
||||||
%{_sbindir}/nvme
|
|
||||||
%{_mandir}/man1/nvme*.gz
|
|
||||||
%{_datadir}/bash-completion/completions/nvme
|
|
||||||
%{_datadir}/zsh/site-functions/_nvme
|
|
||||||
%dir %{_sysconfdir}/nvme
|
|
||||||
%{_unitdir}/nvmefc-boot-connections.service
|
|
||||||
%{_unitdir}/nvmf-autoconnect.service
|
|
||||||
%{_unitdir}/nvmf-connect.target
|
|
||||||
%{_unitdir}/nvmf-connect@.service
|
|
||||||
%{_udevrulesdir}/70-nvmf-autoconnect.rules
|
|
||||||
%{_udevrulesdir}/71-nvmf-iopolicy-netapp.rules
|
|
||||||
# Do not install the dracut rule yet. See rhbz 1742764
|
|
||||||
# /usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
|
|
||||||
|
|
||||||
%post
|
|
||||||
if [ $1 -eq 1 ] || [ $1 -eq 2 ]; then
|
|
||||||
if [ ! -s %{_sysconfdir}/nvme/hostnqn ]; then
|
|
||||||
echo $(nvme gen-hostnqn) > %{_sysconfdir}/nvme/hostnqn
|
|
||||||
fi
|
|
||||||
if [ ! -s %{_sysconfdir}/nvme/hostid ]; then
|
|
||||||
uuidgen > %{_sysconfdir}/nvme/hostid
|
|
||||||
fi
|
|
||||||
|
|
||||||
# apply udev and systemd changes that we did
|
|
||||||
if [ $1 -eq 1 ]; then
|
|
||||||
systemctl enable nvmefc-boot-connections
|
|
||||||
fi
|
|
||||||
systemctl daemon-reload
|
|
||||||
udevadm control --reload-rules && udevadm trigger
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Thu Apr 20 2023 Maurizio Lombardi <mlombard@redhat.com> - 1.16-9
|
|
||||||
- Fix BZ #2187288
|
|
||||||
|
|
||||||
* Wed Apr 05 2023 Maurizio Lombardi <mlombard@redhat.com> - 1.16-8
|
|
||||||
- Fix BZ #1954185
|
|
||||||
|
|
||||||
* Wed Nov 09 2022 Maurizio Lombardi <mlombard@redhat.com> - 1.16-7
|
|
||||||
- Do not re-enable the nvmefc-boot-connections service if
|
|
||||||
we are just upgrading the package.
|
|
||||||
|
|
||||||
* Thu Oct 13 2022 Maurizio Lombardi <mlombard@redhat.com> - 1.16-6
|
|
||||||
- Fix a file permission
|
|
||||||
|
|
||||||
* Fri Jul 15 2022 Maurizio Lombardi <mlombard@redhat.com> - 1.16-5
|
|
||||||
- Fix a compiler warning
|
|
||||||
|
|
||||||
* Tue Jul 12 2022 Maurizio Lombardi <mlombard@redhat.com> - 1.16-4
|
|
||||||
- Merge fixes for PowerPC
|
|
||||||
|
|
||||||
* Fri Jan 07 2022 Maurizio Lombardi <mlombard@redhat.com> - 1.16-3
|
|
||||||
- Merge a few bugfixes
|
|
||||||
|
|
||||||
* Mon Nov 29 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.16-2
|
|
||||||
- Update to version 1.16
|
|
||||||
|
|
||||||
* Thu Jul 22 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.14-2
|
|
||||||
- Merge various bugfixes
|
|
||||||
|
|
||||||
* Wed Apr 28 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.14-1
|
|
||||||
- Update to version v1.14
|
|
||||||
|
|
||||||
* Tue Apr 20 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.13-4
|
|
||||||
- Rebuild to mark bz1949462 as fixed
|
|
||||||
|
|
||||||
* Fri Apr 16 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.13-3
|
|
||||||
- KATO values fixes for various controllers
|
|
||||||
|
|
||||||
* Wed Apr 14 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.13-2
|
|
||||||
- Add dependency to util-linux and fix the post install script
|
|
||||||
|
|
||||||
* Wed Apr 14 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.13-1
|
|
||||||
- Update to 1.13
|
|
||||||
|
|
||||||
* Tue Jun 16 2020 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 1.12-1
|
|
||||||
- Update to 1.12 (#1827581)
|
|
||||||
|
|
||||||
* Sat Apr 25 2020 luto@kernel.org - 1.11.1-1
|
|
||||||
- Update to 1.11
|
|
||||||
|
|
||||||
* Thu Mar 19 2020 luto@kernel.org - 1.10.1-1
|
|
||||||
- Update to 1.10.1
|
|
||||||
|
|
||||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Oct 02 2019 luto@kernel.org - 1.9-1
|
|
||||||
- Update to 1.9
|
|
||||||
- Certain fabric functionality may not work yet due to missing dracut
|
|
||||||
support and missing hostid and hostnqn configuration.
|
|
||||||
|
|
||||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.1-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Apr 15 2019 luto@kernel.org - 1.8.1-1
|
|
||||||
- Update to 1.8.1-1.
|
|
||||||
- Remove a build hack.
|
|
||||||
|
|
||||||
* Sun Feb 24 2019 luto@kernel.org - 1.7-2
|
|
||||||
- Create /etc/nvme
|
|
||||||
|
|
||||||
* Sun Feb 24 2019 luto@kernel.org - 1.7-1
|
|
||||||
- Bump to 1.7
|
|
||||||
- Clean up some trivial rpmlint complaints
|
|
||||||
|
|
||||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Jul 24 2018 luto@kernel.org - 1.6-1
|
|
||||||
- Update to 1.6
|
|
||||||
|
|
||||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-5
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Nov 22 2017 luto@kernel.org - 1.4-1
|
|
||||||
- Update to 1.4
|
|
||||||
|
|
||||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon May 22 2017 luto@kernel.org - 1.3-1
|
|
||||||
- Update to 1.3
|
|
||||||
|
|
||||||
* Wed Apr 19 2017 luto@kernel.org - 1.2-2
|
|
||||||
- Update to 1.2
|
|
||||||
- 1.2-1 never existed
|
|
||||||
|
|
||||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Feb 01 2017 luto@kernel.org - 1.1-1
|
|
||||||
- Update to 1.1
|
|
||||||
|
|
||||||
* Sun Nov 20 2016 luto@kernel.org - 1.0-1
|
|
||||||
- Update to 1.0
|
|
||||||
|
|
||||||
* Mon Oct 31 2016 luto@kernel.org - 0.9-1
|
|
||||||
- Update to 0.9
|
|
||||||
|
|
||||||
* Thu Jun 30 2016 luto@kernel.org - 0.8-1
|
|
||||||
- Update to 0.8
|
|
||||||
|
|
||||||
* Tue May 31 2016 luto@kernel.org - 0.7-1
|
|
||||||
- Update to 0.7
|
|
||||||
|
|
||||||
* Fri Mar 18 2016 luto@kernel.org - 0.5-1
|
|
||||||
- Update to 0.5
|
|
||||||
|
|
||||||
* Sun Mar 06 2016 luto@kernel.org - 0.4-1
|
|
||||||
- Update to 0.4
|
|
||||||
|
|
||||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2-3.20160112gitbdbb4da
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Jan 20 2016 luto@kernel.org - 0.2-2.20160112gitbdbb4da
|
|
||||||
- Update to new upstream commit, fixing #49. "nvme list" now works.
|
|
||||||
|
|
||||||
* Wed Jan 13 2016 luto@kernel.org - 0.2-1.20160112gitde3e0f1
|
|
||||||
- Initial import.
|
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-9
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
302
nvme-cli.spec
Normal file
302
nvme-cli.spec
Normal file
@ -0,0 +1,302 @@
|
|||||||
|
#%%global commit0 bdbb4da0979fbdc079cf98410cdb31cf799e83b3
|
||||||
|
#%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7})
|
||||||
|
|
||||||
|
%global nmlibdir %{_prefix}/lib/NetworkManager
|
||||||
|
|
||||||
|
Name: nvme-cli
|
||||||
|
Version: 2.11
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: NVMe management command line interface
|
||||||
|
|
||||||
|
License: GPL-2.0-only
|
||||||
|
URL: https://github.com/linux-nvme/nvme-cli
|
||||||
|
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
|
Source1: 99-nvme-nbft-connect.sh
|
||||||
|
Source2: 99-nvme-nbft-no-ignore-carrier.conf
|
||||||
|
|
||||||
|
BuildRequires: meson >= 0.50.0
|
||||||
|
BuildRequires: gcc gcc-c++
|
||||||
|
BuildRequires: libuuid-devel
|
||||||
|
BuildRequires: systemd-devel
|
||||||
|
BuildRequires: systemd-rpm-macros
|
||||||
|
BuildRequires: zlib-devel
|
||||||
|
BuildRequires: libnvme-devel >= 1.11-1
|
||||||
|
BuildRequires: json-c-devel >= 0.14
|
||||||
|
BuildRequires: asciidoc
|
||||||
|
BuildRequires: xmlto
|
||||||
|
|
||||||
|
Requires: util-linux
|
||||||
|
|
||||||
|
%description
|
||||||
|
nvme-cli provides NVM-Express user space tooling for Linux.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n %{name}-%{version}
|
||||||
|
|
||||||
|
%build
|
||||||
|
%meson -Dudevrulesdir=%{_udevrulesdir} -Dsystemddir=%{_unitdir} -Ddocs=all -Ddocs-build=true -Dhtmldir=%{_pkgdocdir}
|
||||||
|
%meson_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%meson_install
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{nmlibdir}/dispatcher.d
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{nmlibdir}/conf.d
|
||||||
|
%{__install} -pm 755 %{SOURCE1} $RPM_BUILD_ROOT%{nmlibdir}/dispatcher.d/
|
||||||
|
%{__install} -pm 644 %{SOURCE2} $RPM_BUILD_ROOT%{nmlibdir}/conf.d/
|
||||||
|
|
||||||
|
# Do not install the dracut rule yet. See rhbz 1742764
|
||||||
|
# Do we want to keep this here? Now that we have boot support for nvme/fc + tcp?
|
||||||
|
rm -f %{buildroot}/usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
|
||||||
|
|
||||||
|
# Move html docs into the right place
|
||||||
|
mv %{buildroot}%{_pkgdocdir}/nvme %{buildroot}%{_pkgdocdir}/html
|
||||||
|
rm -rf %{buildroot}%{_pkgdocdir}/nvme
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.md
|
||||||
|
%doc %{_pkgdocdir}/*
|
||||||
|
%{_sbindir}/nvme
|
||||||
|
%{_mandir}/man1/nvme*.gz
|
||||||
|
%{_datadir}/bash-completion/completions/nvme
|
||||||
|
%{_datadir}/zsh/site-functions/_nvme
|
||||||
|
%dir %{_sysconfdir}/nvme
|
||||||
|
%config(noreplace) %{_sysconfdir}/nvme/discovery.conf
|
||||||
|
%{_unitdir}/nvmefc-boot-connections.service
|
||||||
|
%{_unitdir}/nvmf-autoconnect.service
|
||||||
|
%{_unitdir}/nvmf-connect-nbft.service
|
||||||
|
%{_unitdir}/nvmf-connect.target
|
||||||
|
%{_unitdir}/nvmf-connect@.service
|
||||||
|
%{_udevrulesdir}/65-persistent-net-nbft.rules
|
||||||
|
%{_udevrulesdir}/70-nvmf-autoconnect.rules
|
||||||
|
%{_udevrulesdir}/70-nvmf-keys.rules
|
||||||
|
%{_udevrulesdir}/71-nvmf-netapp.rules
|
||||||
|
# Do not install the dracut rule yet. See rhbz 1742764
|
||||||
|
# Is this still true? Now that we support nvme-of boot, do we want to install this file?
|
||||||
|
# /usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
|
||||||
|
%{nmlibdir}/dispatcher.d/99-nvme-nbft-connect.sh
|
||||||
|
%{nmlibdir}/conf.d/99-nvme-nbft-no-ignore-carrier.conf
|
||||||
|
|
||||||
|
%post
|
||||||
|
if [ $1 -eq 1 ] || [ $1 -eq 2 ]; then
|
||||||
|
if [ ! -s %{_sysconfdir}/nvme/hostnqn ]; then
|
||||||
|
echo $(nvme gen-hostnqn) > %{_sysconfdir}/nvme/hostnqn
|
||||||
|
fi
|
||||||
|
if [ ! -s %{_sysconfdir}/nvme/hostid ]; then
|
||||||
|
echo $(nvme show-hostnqn | sed 's/^.*uuid://') > %{_sysconfdir}/nvme/hostid
|
||||||
|
fi
|
||||||
|
|
||||||
|
# apply udev and systemd changes that we did
|
||||||
|
if [ $1 -eq 1 ]; then
|
||||||
|
systemctl enable nvmefc-boot-connections
|
||||||
|
fi
|
||||||
|
systemctl daemon-reload
|
||||||
|
udevadm control --reload-rules && udevadm trigger
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Nov 12 2024 Maurizio Lombardi <mlombard@redhat.com> - 2.11-1
|
||||||
|
- Update to version v2.11 RHEL-67144
|
||||||
|
|
||||||
|
* Mon Oct 07 2024 Maurizio Lombardi <mlombard@redhat.com> - 2.10.2-1
|
||||||
|
- Update to version 2.10.2 RHEL-60536
|
||||||
|
|
||||||
|
* Thu Aug 22 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.9.1-6
|
||||||
|
- Install NetworkManager override for nbft interfaces
|
||||||
|
- Rename reconnect NetworkManager hook to 99-nvme-nbft-connect.sh
|
||||||
|
|
||||||
|
* Tue Aug 06 2024 Maurizio Lombardi <mlombard@redhat.com> - 2.9.1-5
|
||||||
|
- Fix RHEL-38372
|
||||||
|
|
||||||
|
* Wed Jul 24 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.9.1-4
|
||||||
|
- Backport NBFT discovery support (RHEL-37601)
|
||||||
|
|
||||||
|
* Wed June 19 2024 Maurizio Lombardi <mlombard@redhat.com> - 2.9.1-3
|
||||||
|
- Fix RHEL-36139
|
||||||
|
|
||||||
|
* Tue May 07 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.9.1-2
|
||||||
|
- Install custom nvmf-connect-nbft.sh NetworkManager hook (RHEL-18912)
|
||||||
|
|
||||||
|
* Tue May 07 2024 Maurizio Lombardi <mlombard@redhat.com> - 2.9.1-1
|
||||||
|
- Update to version 2.9.1
|
||||||
|
|
||||||
|
* Wed Apr 03 2024 Maurizio Lombardi <mlombard@redhat.com> - 2.8-1
|
||||||
|
- Update to version 2.8
|
||||||
|
|
||||||
|
* Thu Feb 22 2024 Maurizio Lombardi <mlombard@redhat.com> - 2.6-5
|
||||||
|
- Fix for RHEL-13107
|
||||||
|
|
||||||
|
* Mon Nov 13 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.6-4
|
||||||
|
- Fix for RHEL-16216 (revert 1:1 mapping between hostnqn and hostid)
|
||||||
|
|
||||||
|
* Wed Nov 08 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.6-3
|
||||||
|
- Fixes for RHEL-12566
|
||||||
|
|
||||||
|
* Mon Nov 06 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.6-2
|
||||||
|
- Rebuild for side-tag
|
||||||
|
|
||||||
|
* Tue Oct 31 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.6-1
|
||||||
|
- Update to version 2.6
|
||||||
|
|
||||||
|
* Mon Aug 21 2023 John Meneghini <jmeneghi@redhat.com> - 2.4-10
|
||||||
|
- JIRA: https://issues.redhat.com/browse/RHEL-1492
|
||||||
|
|
||||||
|
* Thu Aug 10 2023 John Meneghini <jmeneghi@redhat.com> - 2.4-9
|
||||||
|
- JIRA: https://issues.redhat.com/browse/RHEL-1147
|
||||||
|
|
||||||
|
* Mon Jul 17 2023 John Meneghini <jmeneghi@redhat.com> - 2.4-8
|
||||||
|
- Fix BZ#2223436
|
||||||
|
|
||||||
|
* Wed Jun 14 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.4-7
|
||||||
|
- Fix BZ#2210656
|
||||||
|
|
||||||
|
* Tue May 30 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.4-6
|
||||||
|
- Rebuild for #2208399
|
||||||
|
|
||||||
|
* Thu May 25 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.4-5
|
||||||
|
- Fix SSTAT print (BZ2208399)
|
||||||
|
|
||||||
|
* Tue May 16 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.4-4
|
||||||
|
- Add support to NBFT (BZ2188518)
|
||||||
|
|
||||||
|
* Fri May 12 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.4-3
|
||||||
|
- Fix a warning when building the package BZ2195897
|
||||||
|
|
||||||
|
* Wed May 03 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.4-2
|
||||||
|
- Fix a bogus changelog date BZ2186074
|
||||||
|
|
||||||
|
* Mon Apr 03 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.4-1
|
||||||
|
- Update to version v2.4
|
||||||
|
|
||||||
|
* Thu Nov 10 2022 Maurizio Lombardi <mlombard@redhat.com> - 2.1.2-2
|
||||||
|
- Do not re-enable nvmefc-boot-connections when the package gets updated
|
||||||
|
|
||||||
|
* Mon Sep 26 2022 Maurizio Lombardi <mlombard@redhat.com> - 2.1.2-1
|
||||||
|
- Update to version v2.1.2
|
||||||
|
|
||||||
|
* Mon Aug 29 2022 Maurizio Lombardi <mlombard@redhat.com> - 2.0-4
|
||||||
|
- Fix BZ2104945
|
||||||
|
|
||||||
|
* Fri Jul 15 2022 Maurizio Lombardi <mlombard@redhat.com> - 2.0-3
|
||||||
|
- Fix BZ2105742
|
||||||
|
|
||||||
|
* Thu Jun 16 2022 Maurizio Lombardi <mlombard@redhat.com> - 2.0-2
|
||||||
|
- Fix the gating tests
|
||||||
|
|
||||||
|
* Wed Apr 27 2022 Maurizio Lombardi <mlombard@redhat.com> - 2.0-1
|
||||||
|
- Upgrade to version 2.0
|
||||||
|
|
||||||
|
* Mon Feb 07 2022 Maurizio Lombardi <mlombard@redhat.com> - 1.16-3
|
||||||
|
- Add a few bugfixes
|
||||||
|
|
||||||
|
* Mon Dec 13 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.16-2
|
||||||
|
- Update to the latest version
|
||||||
|
|
||||||
|
* Thu Dec 09 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.14-4
|
||||||
|
- Fix handling of the ctrl_loss_tmo parameter
|
||||||
|
|
||||||
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com>
|
||||||
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
|
Related: rhbz#1991688
|
||||||
|
|
||||||
|
* Mon Jun 14 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.14-2
|
||||||
|
- Fix for bz1962422 (nvme flush failed from from v5.13-rc1)
|
||||||
|
|
||||||
|
* Mon May 03 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.14-1
|
||||||
|
- Update to the latest upstream version
|
||||||
|
|
||||||
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com>
|
||||||
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
|
* Fri Mar 19 2021 Maurizio Lombardi <mlombard@redhat.com> - 1.12-1
|
||||||
|
- Update to 1.13 and add postin scriptlet
|
||||||
|
|
||||||
|
* Sat Apr 25 2020 luto@kernel.org - 1.11.1-1
|
||||||
|
- Update to 1.11
|
||||||
|
|
||||||
|
* Thu Mar 19 2020 luto@kernel.org - 1.10.1-1
|
||||||
|
- Update to 1.10.1
|
||||||
|
|
||||||
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Oct 02 2019 luto@kernel.org - 1.9-1
|
||||||
|
- Update to 1.9
|
||||||
|
- Certain fabric functionality may not work yet due to missing dracut
|
||||||
|
support and missing hostid and hostnqn configuration.
|
||||||
|
|
||||||
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Apr 15 2019 luto@kernel.org - 1.8.1-1
|
||||||
|
- Update to 1.8.1-1.
|
||||||
|
- Remove a build hack.
|
||||||
|
|
||||||
|
* Sun Feb 24 2019 luto@kernel.org - 1.7-2
|
||||||
|
- Create /etc/nvme
|
||||||
|
|
||||||
|
* Sun Feb 24 2019 luto@kernel.org - 1.7-1
|
||||||
|
- Bump to 1.7
|
||||||
|
- Clean up some trivial rpmlint complaints
|
||||||
|
|
||||||
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jul 24 2018 luto@kernel.org - 1.6-1
|
||||||
|
- Update to 1.6
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Nov 22 2017 luto@kernel.org - 1.4-1
|
||||||
|
- Update to 1.4
|
||||||
|
|
||||||
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon May 22 2017 luto@kernel.org - 1.3-1
|
||||||
|
- Update to 1.3
|
||||||
|
|
||||||
|
* Wed Apr 19 2017 luto@kernel.org - 1.2-2
|
||||||
|
- Update to 1.2
|
||||||
|
- 1.2-1 never existed
|
||||||
|
|
||||||
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Feb 01 2017 luto@kernel.org - 1.1-1
|
||||||
|
- Update to 1.1
|
||||||
|
|
||||||
|
* Sun Nov 20 2016 luto@kernel.org - 1.0-1
|
||||||
|
- Update to 1.0
|
||||||
|
|
||||||
|
* Mon Oct 31 2016 luto@kernel.org - 0.9-1
|
||||||
|
- Update to 0.9
|
||||||
|
|
||||||
|
* Thu Jun 30 2016 luto@kernel.org - 0.8-1
|
||||||
|
- Update to 0.8
|
||||||
|
|
||||||
|
* Tue May 31 2016 luto@kernel.org - 0.7-1
|
||||||
|
- Update to 0.7
|
||||||
|
|
||||||
|
* Fri Mar 18 2016 luto@kernel.org - 0.5-1
|
||||||
|
- Update to 0.5
|
||||||
|
|
||||||
|
* Sun Mar 06 2016 luto@kernel.org - 0.4-1
|
||||||
|
- Update to 0.4
|
||||||
|
|
||||||
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2-3.20160112gitbdbb4da
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 20 2016 luto@kernel.org - 0.2-2.20160112gitbdbb4da
|
||||||
|
- Update to new upstream commit, fixing #49. "nvme list" now works.
|
||||||
|
|
||||||
|
* Wed Jan 13 2016 luto@kernel.org - 0.2-1.20160112gitde3e0f1
|
||||||
|
- Initial import.
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
|||||||
|
SHA512 (nvme-cli-2.11.tar.gz) = 33de20ad990a3b87fef46fa486832edde41907223aa6b8a47606e605b360745fd7e2054226bf93a59b2a09c6bc04d0b684e4b3bb27c3fc0e6110c64a558cadc0
|
272
tests/include/tc.sh
Normal file
272
tests/include/tc.sh
Normal file
@ -0,0 +1,272 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright (c) 2016 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program 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 General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# Author: Yi Zhang <yizhan@redhat.com>
|
||||||
|
|
||||||
|
# filename: function
|
||||||
|
|
||||||
|
# USAGE
|
||||||
|
|
||||||
|
test x$LXT_TC = x || return
|
||||||
|
LXT_TC=1
|
||||||
|
|
||||||
|
#
|
||||||
|
# print the current date
|
||||||
|
# usage: d=$(tdate)
|
||||||
|
#
|
||||||
|
tdate ()
|
||||||
|
{
|
||||||
|
date '+%T' 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# print the log information
|
||||||
|
# usage: tlog "hello world" "WARNING"
|
||||||
|
#
|
||||||
|
tlog ()
|
||||||
|
{
|
||||||
|
local msg=$1
|
||||||
|
local log_level=${2:-INFO}
|
||||||
|
local cur_date=$(tdate)
|
||||||
|
|
||||||
|
echo "[$log_level][$cur_date]$msg"
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# run the cmd and format the log. return the exitint status of cmd
|
||||||
|
# use the global variables: tSTDOUT and tSTDERR to return the stdout and stderr
|
||||||
|
# usage: trun "ls"
|
||||||
|
# trun "ls"; echo $?
|
||||||
|
# stdout=$tSTDOUT
|
||||||
|
# stderr=$tSTDERR
|
||||||
|
#
|
||||||
|
trun ()
|
||||||
|
{
|
||||||
|
local cmd="$*"
|
||||||
|
|
||||||
|
_trun_ "$cmd"
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# verify the execution of command
|
||||||
|
# if the cmd return 0, mark this checkpoint failed and return 1
|
||||||
|
# if not, mark it passed and return 0
|
||||||
|
# usage: tnot "ls /not_existing"
|
||||||
|
#
|
||||||
|
tnot () {
|
||||||
|
local cmd="$*"
|
||||||
|
_trun_ "$cmd" 1
|
||||||
|
if test $? -eq 0; then
|
||||||
|
tfail_ "$cmd" ;
|
||||||
|
else
|
||||||
|
tpass_ "$cmd" ;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# verify the execution of command
|
||||||
|
# if the cmd return 0, mark this checkpoint passed and return 0
|
||||||
|
# if not, mark it failed and return 1
|
||||||
|
# usage: tok "ls /"
|
||||||
|
#
|
||||||
|
tok ()
|
||||||
|
{
|
||||||
|
local cmd="$*"
|
||||||
|
_trun_ "$cmd" 0
|
||||||
|
if test $? -eq 0; then
|
||||||
|
tpass_ "$cmd" ;
|
||||||
|
else
|
||||||
|
tfail_ "$cmd" ;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# verify the execution of command
|
||||||
|
# if the cmd return 0, mark this checkpoint passed and return 0
|
||||||
|
# if not, mark it failes and exit
|
||||||
|
# usage: terr "ls"
|
||||||
|
#
|
||||||
|
#terr ()
|
||||||
|
#{
|
||||||
|
# tok "$*" || tend
|
||||||
|
#}
|
||||||
|
|
||||||
|
#
|
||||||
|
# verify the execution of command
|
||||||
|
# if the cmd return 0, will continue to run the script
|
||||||
|
# if not, mark it failes and exit
|
||||||
|
# usage: terr "ls"
|
||||||
|
#
|
||||||
|
terr ()
|
||||||
|
{
|
||||||
|
local cmd="$*"
|
||||||
|
_trun_ "$cmd" 0
|
||||||
|
if test $? -ne 0; then
|
||||||
|
tfail_ "$cmd" ;
|
||||||
|
tend ;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# exit the program and print the log message
|
||||||
|
# usage: texit "error message" 100
|
||||||
|
# similar to the exception
|
||||||
|
#
|
||||||
|
texit ()
|
||||||
|
{
|
||||||
|
msg=$1
|
||||||
|
err=$2
|
||||||
|
is_null $err && err=1
|
||||||
|
test $err -lt 1 || err=1
|
||||||
|
|
||||||
|
tlog "$msg" "ERROR"
|
||||||
|
exit $2
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# print the test report, cleanup the testing bed and close the testing.
|
||||||
|
# usage: tend
|
||||||
|
#
|
||||||
|
tend ()
|
||||||
|
{
|
||||||
|
local pcount=$(wc -l $tPASS_FILE | awk '{print $1}')
|
||||||
|
local fcount=$(wc -l $tFAIL_FILE | awk '{print $1}')
|
||||||
|
local total=$(( $pcount + $fcount ))
|
||||||
|
|
||||||
|
echo "#################################Test Report###############################"
|
||||||
|
echo "TOTAL : $total"
|
||||||
|
echo "PASSED : $pcount"
|
||||||
|
echo "FAILED : $fcount"
|
||||||
|
cat $tPASS_FILE $tFAIL_FILE
|
||||||
|
echo "###########################End of running $0########################"
|
||||||
|
|
||||||
|
#cleanup
|
||||||
|
rm -f $tPASS_FILE $tFAIL_FILE $tRETURN_FILE $tSTDERR_FILE
|
||||||
|
# rm -rf $LXT_TMP_DIR
|
||||||
|
if [[ $pcount -eq 0 ]] && [[ $total -eq 0 ]];then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
test $pcount -eq 0 && exit 1
|
||||||
|
test $pcount -eq $total && exit 0
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# private function
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# print the error message and call stack. return 1
|
||||||
|
#
|
||||||
|
tfail_ ()
|
||||||
|
{
|
||||||
|
local msg=$*
|
||||||
|
tlog "$msg" "ERROR" >>$tFAIL_FILE
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# print the sucessful message. return 0
|
||||||
|
#
|
||||||
|
tpass_ ()
|
||||||
|
{
|
||||||
|
local msg=$*
|
||||||
|
tlog "$msg" "PASS" >> $tPASS_FILE
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
_trun_ ()
|
||||||
|
{
|
||||||
|
local cmd="$1"
|
||||||
|
local chk="$2"
|
||||||
|
local cur_date=$(tdate)
|
||||||
|
|
||||||
|
local stdout=$(eval "$cmd" 2>$tSTDERR_FILE; echo $? >$tRETURN_FILE 2>/dev/null)
|
||||||
|
#timeout -- how to set timeout?
|
||||||
|
local exit_status=$(< $tRETURN_FILE)
|
||||||
|
local stderr=$(< $tSTDERR_FILE)
|
||||||
|
local msg=CMD
|
||||||
|
#tnot
|
||||||
|
if test x$chk = x1; then
|
||||||
|
test $exit_status -eq 0 || msg=PASS
|
||||||
|
test $exit_status -eq 0 && msg=FAIL
|
||||||
|
#should let the tester know this is the negative testing
|
||||||
|
#if cmd return 0 we will return 1 and vice versa
|
||||||
|
cmd="[NOT] $cmd"
|
||||||
|
fi
|
||||||
|
#tok
|
||||||
|
if test x$chk = x0; then
|
||||||
|
test $exit_status -eq 0 && msg=PASS
|
||||||
|
test $exit_status -eq 0 || msg=FAIL
|
||||||
|
fi
|
||||||
|
|
||||||
|
tSTDOUT=$stdout
|
||||||
|
tSTDERR=$stderr
|
||||||
|
|
||||||
|
test $tIGNORE_STDOUT -eq 1 && stdout='redirect the stdout to /dev/null'
|
||||||
|
test $tIGNORE_STDERR -eq 1 && stderr='redirect the stderr to /dev/null'
|
||||||
|
|
||||||
|
echo "[$msg][$cur_date][$HOSTNAME]$cmd"
|
||||||
|
echo "STDOUT:"
|
||||||
|
test "x$stdout" = x || echo "$stdout"
|
||||||
|
echo "STDERR:$stderr"
|
||||||
|
echo "RETURN:$exit_status"
|
||||||
|
echo
|
||||||
|
|
||||||
|
return $exit_status
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# setup the testing environment
|
||||||
|
#
|
||||||
|
_tsetup_ ()
|
||||||
|
{
|
||||||
|
|
||||||
|
LXT_TMP_DIR="/mnt/testarea/lxt";
|
||||||
|
|
||||||
|
test -z "$HOSTNAME" && HOSTNAME=$(hostname)
|
||||||
|
test -d "$LXT_TMP_DIR" || mkdir -p "$LXT_TMP_DIR" >& /dev/null || exit 1
|
||||||
|
|
||||||
|
tSTDERR_FILE="$LXT_TMP_DIR/stderr.$$"
|
||||||
|
test -e "$tSTDERR_FILE" || > "$tSTDERR_FILE" || exit 1
|
||||||
|
tRETURN_FILE="$LXT_TMP_DIR/return.$$"
|
||||||
|
test -e "$tRETURN_FILE" || > "$tRETURN_FILE" || exit 1
|
||||||
|
tPASS_FILE="$LXT_TMP_DIR/tc.pass.$$"
|
||||||
|
test -e "$tPASS_FILE" || > "$tPASS_FILE" || exit 1
|
||||||
|
tFAIL_FILE="$LXT_TMP_DIR/tc.fail.$$"
|
||||||
|
test -e "$tFAIL_FILE" || > "$tFAIL_FILE" || exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# main
|
||||||
|
#
|
||||||
|
|
||||||
|
# global variables
|
||||||
|
tIGNORE_STDOUT=0
|
||||||
|
tIGNORE_STDERR=0
|
||||||
|
tSTDOUT=
|
||||||
|
tSTDERR=
|
||||||
|
#LXT_TMP_DIR
|
||||||
|
# only used in this file
|
||||||
|
tPASS_FILE=
|
||||||
|
tFAIL_FILE=
|
||||||
|
|
||||||
|
_tsetup_
|
675
tests/sanity/LICENSE
Normal file
675
tests/sanity/LICENSE
Normal file
@ -0,0 +1,675 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program 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 General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
|
|
47
tests/sanity/Makefile
Normal file
47
tests/sanity/Makefile
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright (c) 2016 Red Hat, Inc.
|
||||||
|
# #
|
||||||
|
# # This program is free software: you can redistribute it and/or modify
|
||||||
|
# # it under the terms of the GNU General Public License as published by
|
||||||
|
# # the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# # (at your option) any later version.
|
||||||
|
# #
|
||||||
|
# # This program 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 General Public License for more details.
|
||||||
|
# #
|
||||||
|
# # You should have received a copy of the GNU General Public License
|
||||||
|
# # along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# # Author: Yi Zhang <yizhan@redhat.com>
|
||||||
|
|
||||||
|
.PHONY: all install download clean LICENSE
|
||||||
|
|
||||||
|
BUILT_FILES=
|
||||||
|
|
||||||
|
FILES=$(METADATA) Makefile PURPOSE main.sh
|
||||||
|
|
||||||
|
run: $(FILES) build
|
||||||
|
./main.sh
|
||||||
|
|
||||||
|
build: $(BUILT_FILES)
|
||||||
|
chmod a+x ./main.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ *.rpm $(BUILT_FILES)
|
||||||
|
|
||||||
|
$(METADATA): Makefile
|
||||||
|
@touch $(METADATA)
|
||||||
|
@echo "Owner: Yi Zhang <yizhan@redhat.com>" > $(METADATA)
|
||||||
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
|
@echo "License: GPLv3" >> $(METADATA)
|
||||||
|
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||||
|
@echo "Description: nvme-cli sanity test" >> $(METADATA)
|
||||||
|
@echo "TestTime: 15m" >> $(METADATA)
|
||||||
|
@echo "RunFor: nvme-cli" >> $(METADATA)
|
||||||
|
@echo "Requires: nvme-cli" >> $(METADATA)
|
||||||
|
|
||||||
|
rhts-lint $(METADATA)
|
1
tests/sanity/PURPOSE
Normal file
1
tests/sanity/PURPOSE
Normal file
@ -0,0 +1 @@
|
|||||||
|
Sanity test for nvme-cli package
|
36
tests/sanity/main.sh
Normal file
36
tests/sanity/main.sh
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright (c) 2016 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program 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 General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# Author: Yi Zhang <yizhan@redhat.com>
|
||||||
|
|
||||||
|
#set -x
|
||||||
|
source ../include/tc.sh || exit 200
|
||||||
|
|
||||||
|
tlog "running $0"
|
||||||
|
|
||||||
|
tok "yum -y reinstall nvme-cli"
|
||||||
|
tok "yum -y remove nvme-cli"
|
||||||
|
tok "yum -y install nvme-cli"
|
||||||
|
tok "which nvme"
|
||||||
|
tok "yum info nvme-cli"
|
||||||
|
tok "[[ -f "/usr/sbin/nvme" ]]"
|
||||||
|
#tok "nvme list"
|
||||||
|
#trun "nvme list-subsys"
|
||||||
|
tok "nvme version"
|
||||||
|
tok "nvme help"
|
||||||
|
|
||||||
|
tend
|
36
tests/sanity/runtest.sh
Normal file
36
tests/sanity/runtest.sh
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright (c) 2016 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program 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 General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# Author: Yi Zhang <yizhan@redhat.com>
|
||||||
|
|
||||||
|
#set -x
|
||||||
|
source ../include/tc.sh || exit 200
|
||||||
|
|
||||||
|
tlog "running $0"
|
||||||
|
|
||||||
|
tok "yum -y reinstall nvme-cli"
|
||||||
|
tok "yum -y remove nvme-cli"
|
||||||
|
tok "yum -y install nvme-cli"
|
||||||
|
tok "which nvme"
|
||||||
|
tok "yum info nvme-cli"
|
||||||
|
tok "[[ -f "/usr/sbin/nvme" ]]"
|
||||||
|
#tok "nvme list"
|
||||||
|
#trun "nvme list-subsys"
|
||||||
|
tok "nvme version"
|
||||||
|
tok "nvme help"
|
||||||
|
|
||||||
|
tend
|
9
tests/tests.yml
Normal file
9
tests/tests.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
- hosts: localhost
|
||||||
|
roles:
|
||||||
|
- role: standard-test-basic
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
tests:
|
||||||
|
- sanity
|
||||||
|
required_packages:
|
||||||
|
- which
|
Loading…
Reference in New Issue
Block a user