1 |
commit: 9278a10daad10aaedff21f2ca630570a1c0dacbe |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 2 14:01:56 2018 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 2 14:53:57 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9278a10d |
7 |
|
8 |
sys-block/open-iscsi: Rev bump to fix multiple issues |
9 |
|
10 |
Ebuild changes: |
11 |
=============== |
12 |
- Patch: Include sysmacros.h. [Bug 604442] |
13 |
|
14 |
- Install systemd service. [Bug 640598] |
15 |
|
16 |
- Remove deprecated iscsidev.sh udev rule in favor of udev native iSCSI |
17 |
support which is available since udev-143. [Bug 633574] |
18 |
|
19 |
- Drop "slp" USE flag. [Bug 558366] |
20 |
|
21 |
Bug: https://bugs.gentoo.org/558366 |
22 |
Closes: https://bugs.gentoo.org/604442 |
23 |
Closes: https://bugs.gentoo.org/640598 |
24 |
Closes: https://bugs.gentoo.org/633574 |
25 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
26 |
|
27 |
.../open-iscsi-2.0.874-include-sysmacros.patch | 20 ++++ |
28 |
sys-block/open-iscsi/open-iscsi-2.0.874-r2.ebuild | 122 +++++++++++++++++++++ |
29 |
2 files changed, 142 insertions(+) |
30 |
|
31 |
diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.874-include-sysmacros.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.874-include-sysmacros.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..05d5d1239cb |
34 |
--- /dev/null |
35 |
+++ b/sys-block/open-iscsi/files/open-iscsi-2.0.874-include-sysmacros.patch |
36 |
@@ -0,0 +1,20 @@ |
37 |
+--- a/iscsiuio/src/unix/libs/bnx2.c |
38 |
++++ b/iscsiuio/src/unix/libs/bnx2.c |
39 |
+@@ -46,6 +46,7 @@ |
40 |
+ #include <sys/user.h> |
41 |
+ #include <fcntl.h> |
42 |
+ #include <unistd.h> |
43 |
++#include <sys/sysmacros.h> |
44 |
+ |
45 |
+ #include "config.h" |
46 |
+ |
47 |
+--- a/iscsiuio/src/unix/libs/bnx2x.c |
48 |
++++ b/iscsiuio/src/unix/libs/bnx2x.c |
49 |
+@@ -50,6 +50,7 @@ |
50 |
+ #include <sys/user.h> |
51 |
+ #include <fcntl.h> |
52 |
+ #include <unistd.h> |
53 |
++#include <sys/sysmacros.h> |
54 |
+ |
55 |
+ #include "config.h" |
56 |
+ |
57 |
|
58 |
diff --git a/sys-block/open-iscsi/open-iscsi-2.0.874-r2.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.874-r2.ebuild |
59 |
new file mode 100644 |
60 |
index 00000000000..24e8be24de1 |
61 |
--- /dev/null |
62 |
+++ b/sys-block/open-iscsi/open-iscsi-2.0.874-r2.ebuild |
63 |
@@ -0,0 +1,122 @@ |
64 |
+# Copyright 1999-2018 Gentoo Foundation |
65 |
+# Distributed under the terms of the GNU General Public License v2 |
66 |
+ |
67 |
+EAPI=6 |
68 |
+ |
69 |
+inherit autotools versionator linux-info flag-o-matic toolchain-funcs udev systemd |
70 |
+ |
71 |
+DESCRIPTION="A performant, transport independent, multi-platform implementation of RFC3720" |
72 |
+HOMEPAGE="http://www.open-iscsi.com/" |
73 |
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
74 |
+ |
75 |
+LICENSE="GPL-2" |
76 |
+SLOT="0" |
77 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" |
78 |
+IUSE="debug infiniband +tcp rdma" |
79 |
+ |
80 |
+DEPEND="sys-block/open-isns:= |
81 |
+ infiniband? ( sys-fabric/ofed )" |
82 |
+RDEPEND="${DEPEND} |
83 |
+ sys-fs/lsscsi |
84 |
+ sys-apps/util-linux" |
85 |
+REQUIRED_USE="infiniband? ( rdma ) || ( rdma tcp )" |
86 |
+ |
87 |
+PATCHES=( |
88 |
+ "${FILESDIR}/${P}-Makefiles.patch" |
89 |
+ "${FILESDIR}/${P}-musl-fixes.patch" |
90 |
+ "${FILESDIR}/${P}-musl-ethtool-compat.patch" |
91 |
+ "${FILESDIR}/${P}-include-sysmacros.patch" |
92 |
+) |
93 |
+ |
94 |
+pkg_setup() { |
95 |
+ linux-info_pkg_setup |
96 |
+ |
97 |
+ if kernel_is -lt 2 6 16; then |
98 |
+ die "Sorry, your kernel must be 2.6.16-rc5 or newer!" |
99 |
+ fi |
100 |
+ |
101 |
+ # Needs to be done, as iscsid currently only starts, when having the iSCSI |
102 |
+ # support loaded as module. Kernel builtin options don't work. See this for |
103 |
+ # more information: |
104 |
+ # https://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966 |
105 |
+ # If there's a new release, check whether this is still valid! |
106 |
+ TCP_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP" |
107 |
+ RDMA_MODULES="INFINIBAND_ISER" |
108 |
+ INFINIBAND_MODULES="INFINIBAND_IPOIB INIBAND_USER_MAD INFINIBAND_USER_ACCESS" |
109 |
+ CONFIG_CHECK_MODULES="tcp? ( ${TCP_MODULES} ) rdma? ( ${RDMA_MODULES} ) infiniband? ( ${INFINIBAND_MODULES} )" |
110 |
+ if linux_config_exists; then |
111 |
+ if use tcp; then |
112 |
+ for module in ${TCP_MODULES}; do |
113 |
+ linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" |
114 |
+ done |
115 |
+ fi |
116 |
+ if use infiniband; then |
117 |
+ for module in ${INFINIBAND_MODULES}; do |
118 |
+ linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)" |
119 |
+ done |
120 |
+ fi |
121 |
+ if use rdma; then |
122 |
+ for module in ${RDMA_MODULES}; do |
123 |
+ linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"$ |
124 |
+ done |
125 |
+ fi |
126 |
+ fi |
127 |
+} |
128 |
+ |
129 |
+src_prepare() { |
130 |
+ sed -i -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' etc/iscsid.conf || die |
131 |
+ default |
132 |
+ |
133 |
+ pushd iscsiuio >/dev/null || die |
134 |
+ eautoreconf |
135 |
+ popd >/dev/null || die |
136 |
+} |
137 |
+ |
138 |
+src_configure() { |
139 |
+ use debug && append-cppflags -DDEBUG_TCP -DDEBUG_SCSI |
140 |
+ append-lfs-flags |
141 |
+} |
142 |
+ |
143 |
+src_compile() { |
144 |
+ # Stuffing CPPFLAGS into CFLAGS isn't entirely correct, but the build |
145 |
+ # is messed up already here, so it's not making it that much worse. |
146 |
+ KSRC="${KV_DIR}" CFLAGS="" \ |
147 |
+ emake \ |
148 |
+ OPTFLAGS="${CFLAGS} ${CPPFLAGS}" \ |
149 |
+ AR="$(tc-getAR)" CC="$(tc-getCC)" \ |
150 |
+ user |
151 |
+} |
152 |
+ |
153 |
+src_install() { |
154 |
+ emake DESTDIR="${ED}" sbindir="/usr/sbin" install |
155 |
+ # Upstream make is not deterministic, per bug #601514 |
156 |
+ rm -f "${ED}"/etc/initiatorname.iscsi |
157 |
+ |
158 |
+ dodoc README THANKS |
159 |
+ |
160 |
+ docinto test/ |
161 |
+ dodoc test/* |
162 |
+ |
163 |
+ insinto /etc/iscsi |
164 |
+ newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example |
165 |
+ |
166 |
+ newconfd "${FILESDIR}"/iscsid-conf.d iscsid |
167 |
+ newinitd "${FILESDIR}"/iscsid-init.d iscsid |
168 |
+ |
169 |
+ systemd_dounit "${S%/}"/etc/systemd/iscsid.service |
170 |
+ |
171 |
+ keepdir /var/db/iscsi |
172 |
+ fperms 700 /var/db/iscsi |
173 |
+ fperms 600 /etc/iscsi/iscsid.conf |
174 |
+} |
175 |
+ |
176 |
+pkg_postinst() { |
177 |
+ in='/etc/iscsi/initiatorname.iscsi' |
178 |
+ if [ ! -f "${EROOT}${in}" -a -f "${EROOT}${in}.example" ]; then |
179 |
+ { |
180 |
+ cat "${EROOT}${in}.example" |
181 |
+ echo "# InitiatorName generated by ${CATEGORY}/${PF} at $(date -uR)" |
182 |
+ echo "InitiatorName=$(${ROOT}/usr/sbin/iscsi-iname)" |
183 |
+ } >> "${EROOT}${in}.tmp" && mv -f "${EROOT}${in}.tmp" "${EROOT}${in}" |
184 |
+ fi |
185 |
+} |