Make patches reference upstream commits
Drop a non-upstreamed patch we can handle in the spec definition
This commit is contained in:
parent
73b83d8607
commit
51f72b8d88
25
0001-Fix-compiler-warning-error-under-gcc7.patch
Normal file
25
0001-Fix-compiler-warning-error-under-gcc7.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From: Ronnie Sahlberg <ronniesahlberg@gmail.com>
|
||||
Date: Sat, 3 Jun 2017 11:20:20 -0700
|
||||
Subject: [PATCH] Fix compiler warning/error under gcc7
|
||||
|
||||
Gcc7 complains about falling through from the previous case to the default arm
|
||||
|
||||
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
|
||||
(cherry picked from commit 854e37aab7d7d2093a0a6620a3257b8f2a1d405c)
|
||||
---
|
||||
test-tool/iscsi-support.c | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/test-tool/iscsi-support.c b/test-tool/iscsi-support.c
|
||||
index 02367ca..ed00ce7 100644
|
||||
--- a/test-tool/iscsi-support.c
|
||||
+++ b/test-tool/iscsi-support.c
|
||||
@@ -2930,8 +2930,6 @@ void populate_ident_tgt_desc(unsigned char *buf, struct scsi_device *dev)
|
||||
tgt_desig = desig;
|
||||
prev_type = desig->designator_type;
|
||||
}
|
||||
- default:
|
||||
- continue;
|
||||
}
|
||||
}
|
||||
if (tgt_desig == NULL) {
|
||||
@ -1,11 +1,21 @@
|
||||
upstream commits 854e37aab7d7d2093a0a6620a3257b8f2a1d405c
|
||||
and fb45f0343e3de45f2bc7516591d36c7466c2184e
|
||||
From: Ronnie Sahlberg <ronniesahlberg@gmail.com>
|
||||
Date: Sat, 3 Jun 2017 11:33:51 -0700
|
||||
Subject: [PATCH] Fix another compiler warning
|
||||
|
||||
We do need a default: arm here as the switch is not supposed to deal with
|
||||
all possible values for the enum.
|
||||
|
||||
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
|
||||
(cherry picked from commit fb45f0343e3de45f2bc7516591d36c7466c2184e)
|
||||
---
|
||||
test-tool/iscsi-support.c | 19 +++++++++++--------
|
||||
1 file changed, 11 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/test-tool/iscsi-support.c b/test-tool/iscsi-support.c
|
||||
index cbadf85..20993d4 100644
|
||||
index ed00ce7..3f860ed 100644
|
||||
--- a/test-tool/iscsi-support.c
|
||||
+++ b/test-tool/iscsi-support.c
|
||||
@@ -2931,16 +2931,17 @@ void populate_ident_tgt_desc(unsigned char *buf, struct scsi_device *dev)
|
||||
@@ -2922,14 +2922,17 @@ void populate_ident_tgt_desc(unsigned char *buf, struct scsi_device *dev)
|
||||
|
||||
for (desig = inq_di->designators; desig; desig = desig->next) {
|
||||
switch (desig->designator_type) {
|
||||
@ -17,8 +27,6 @@ index cbadf85..20993d4 100644
|
||||
- tgt_desig = desig;
|
||||
- prev_type = desig->designator_type;
|
||||
- }
|
||||
- default:
|
||||
- continue;
|
||||
+ case SCSI_DESIGNATOR_TYPE_VENDOR_SPECIFIC:
|
||||
+ case SCSI_DESIGNATOR_TYPE_T10_VENDORT_ID:
|
||||
+ case SCSI_DESIGNATOR_TYPE_EUI_64:
|
||||
@ -1,9 +1,9 @@
|
||||
From a239423a0f9250dad9998152fa4b4b46accdf641 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Suchanek <msuchanek@suse.de>
|
||||
Date: Mon, 14 Nov 2016 17:28:31 +0100
|
||||
Subject: [PATCH] Fix 32bit build.
|
||||
|
||||
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
|
||||
(cherry picked from commit a239423a0f9250dad9998152fa4b4b46accdf641)
|
||||
---
|
||||
lib/iser.c | 7 ++++---
|
||||
test-tool/test_compareandwrite_invalid_dataout_size.c | 4 ++--
|
||||
@ -112,6 +112,3 @@ index 128673f..a2e22bb 100644
|
||||
block_size * 2, block_size);
|
||||
WRITESAME16(sd, 0, block_size * 2, 1, 0, 1, 0, 0, scratch,
|
||||
EXPECT_STATUS_GENERIC_BAD);
|
||||
--
|
||||
2.13.6
|
||||
|
||||
42
0004-iser-Use-local-container_of-definition.patch
Normal file
42
0004-iser-Use-local-container_of-definition.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Mon, 30 Apr 2018 18:11:05 -0400
|
||||
Subject: [PATCH] iser: Use local container_of definition
|
||||
|
||||
The code was implicitly dependent on container_of from
|
||||
inifiniband/verbs.h, however that's been removed in rdma-core
|
||||
latest release:
|
||||
|
||||
https://github.com/linux-rdma/rdma-core/commit/ce0274acffc78ed2861a56bdc34cdd3d60c20e1f
|
||||
|
||||
Define container_of locally if it's not already defined
|
||||
|
||||
(cherry picked from commit f1feb218e2823d236569f0ca3cfad07334f2a304)
|
||||
---
|
||||
lib/iser.c | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/lib/iser.c b/lib/iser.c
|
||||
index 17832c3..aa7244c 100644
|
||||
--- a/lib/iser.c
|
||||
+++ b/lib/iser.c
|
||||
@@ -32,6 +32,20 @@
|
||||
#include <semaphore.h>
|
||||
#include <poll.h>
|
||||
|
||||
+
|
||||
+#ifndef container_of
|
||||
+/**
|
||||
+ * container_of - cast a member of a structure out to the containing structure
|
||||
+ * @ptr: the pointer to the member.
|
||||
+ * @type: the type of the container struct this is embedded in.
|
||||
+ * @member: the name of the member within the struct.
|
||||
+ *
|
||||
+ */
|
||||
+#define container_of(ptr, type, member) \
|
||||
+ ((type *) ((uint8_t *)(ptr) - offsetof(type, member)))
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
#ifdef __linux
|
||||
|
||||
static int cq_handle(struct iser_conn *iser_conn);
|
||||
@ -1,25 +0,0 @@
|
||||
Binary files libiscsi-1.18.0/.git/index and new/.git/index differ
|
||||
diff -rup libiscsi-1.18.0/lib/iser.c new/lib/iser.c
|
||||
--- libiscsi-1.18.0/lib/iser.c 2018-04-26 09:51:53.869133618 -0400
|
||||
+++ new/lib/iser.c 2018-04-26 10:03:45.163899456 -0400
|
||||
@@ -32,6 +32,20 @@
|
||||
#include <semaphore.h>
|
||||
#include <poll.h>
|
||||
|
||||
+
|
||||
+#ifndef container_of
|
||||
+/**
|
||||
+ * container_of - cast a member of a structure out to the containing structure
|
||||
+ * @ptr: the pointer to the member.
|
||||
+ * @type: the type of the container struct this is embedded in.
|
||||
+ * @member: the name of the member within the struct.
|
||||
+ *
|
||||
+ */
|
||||
+#define container_of(ptr, type, member) \
|
||||
+ ((type *) ((uint8_t *)(ptr) - offsetof(type, member)))
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
#ifdef __linux
|
||||
|
||||
static int cq_handle(struct iser_conn *iser_conn);
|
||||
@ -1,13 +0,0 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index e1d01c6..72a5019 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -118,7 +118,7 @@
|
||||
fi
|
||||
AM_CONDITIONAL(ISCSITEST, [test "$ac_cv_have_cunit" = yes -a "$enable_shared" = "yes"])
|
||||
|
||||
-AM_CONDITIONAL(LD_ISCSI, [expr "(" "$host_os" : "linux" ")" "&" "$enable_shared" "=" "yes"])
|
||||
+AM_CONDITIONAL(LD_ISCSI, [false])
|
||||
|
||||
AC_CHECK_MEMBER([struct CU_SuiteInfo.pSetUpFunc],
|
||||
[AC_DEFINE([HAVE_CU_SUITEINFO_PSETUPFUNC], 1,
|
||||
@ -6,10 +6,15 @@ License: LGPLv2+
|
||||
URL: https://github.com/sahlberg/%{name}
|
||||
|
||||
Source: https://github.com/sahlberg/%{name}/archive/%{version}.tar.gz
|
||||
Patch1: disable-ld_iscsi.patch
|
||||
Patch2: fix-gcc7-warnings.patch
|
||||
Patch3: fix-32bit-build.patch
|
||||
Patch4: container_of.patch
|
||||
|
||||
# Fix gcc7 warnings
|
||||
Patch0001: 0001-Fix-compiler-warning-error-under-gcc7.patch
|
||||
Patch0002: 0002-Fix-another-compiler-warning.patch
|
||||
# Fix 32bit build
|
||||
Patch0003: 0003-Fix-32bit-build.patch
|
||||
# Fix build with latest rdma-core
|
||||
# Submitted upstream: https://github.com/sahlberg/libiscsi/pull/265
|
||||
Patch0004: 0004-iser-Use-local-container_of-definition.patch
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -50,6 +55,9 @@ rm $RPM_BUILD_ROOT/%{libiscsi_libdir}/libiscsi.la
|
||||
# Remove "*.old" files
|
||||
find $RPM_BUILD_ROOT -name "*.old" -exec rm -f {} \;
|
||||
|
||||
# Remove library put in /usr/bin
|
||||
rm $RPM_BUILD_ROOT/%{_bindir}/ld_iscsi.so
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
Loading…
Reference in New Issue
Block a user