Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-block/open-iscsi/files/, sys-block/open-iscsi/
Date: Thu, 30 Jul 2020 21:41:49
Message-Id: 1596145302.134f546a4d4d5151c82c518e051020f1d95afb43.polynomial-c@gentoo
1 commit: 134f546a4d4d5151c82c518e051020f1d95afb43
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 30 21:25:27 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 30 21:41:42 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=134f546a
7
8 sys-block/open-iscsi: Removed old
9
10 Package-Manager: Portage-3.0.1, Repoman-2.3.23
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 sys-block/open-iscsi/Manifest | 2 -
14 .../files/open-iscsi-2.0.876-Makefiles.patch | 61 ---------
15 .../open-iscsi-2.0.878-gcc10-fno-common.patch | 107 ----------------
16 sys-block/open-iscsi/open-iscsi-2.0.878-r1.ebuild | 141 ---------------------
17 sys-block/open-iscsi/open-iscsi-2.1.0.ebuild | 140 --------------------
18 5 files changed, 451 deletions(-)
19
20 diff --git a/sys-block/open-iscsi/Manifest b/sys-block/open-iscsi/Manifest
21 index 96afd5717d8..c19643f4813 100644
22 --- a/sys-block/open-iscsi/Manifest
23 +++ b/sys-block/open-iscsi/Manifest
24 @@ -1,6 +1,4 @@
25 DIST open-iscsi-2.0-873.tar.gz 667069 BLAKE2B edb427f8483c31499cdde644bbf8d658952952fa8d52a232537e7e6ec71d2d237dcd4e8759de21b65cac757678c7d71c22bd2fe71ed1e7ac152ae8396f080061 SHA512 4e67116cb7dd49381c9279645e5a661f05596ae6be3b832772089828b3764ca2d04b5dea1bcc337071efb52c3c75a6fb943136c659ee59500f3a198ed0dcea6b
26 DIST open-iscsi-2.0.875.tar.gz 635121 BLAKE2B 34a7083087c53ed0e59d293d26efe166b09c5ea18b6022869cc9ff3d2edb2fb8b69e2c1ce6c9011bd20fc590b02dafd6d7c13d8bfa1eae6408c4bace13992e5e SHA512 1709011d7d12d3dd9278a0d775af064d5f7da37357f35d6d5c5b3aa8ec16385c28b201b1261f4581dbbbbca3d815015ed8696e1694aa19f3231132f90d1e5b36
27 -DIST open-iscsi-2.0.878.tar.gz 607489 BLAKE2B f08f7a49dee6a377aed1d5efba100c4c357e95683e841e3c7960a49a40601cf8047dd28403866d963ef6850eb23c03ac39e0861575e21c452190a20534cbec48 SHA512 2eb26e5e69b88614d9b6262fffce94b93f9afc0742415ad6c2505daacd3014cd9d73bd89c36f452d004e2c4f312f372aab1ddc55e1bdec73c58de60181d73b33
28 -DIST open-iscsi-2.1.0.tar.gz 604689 BLAKE2B 1741f4ac5072e3e952ba8268b1f52c6d296156b4c2696efad9fd0ccfe54870f74ac54b21144e4e71eed03cf8674a6aff96eee4f72f8a608fde40dc463f962b6f SHA512 bb1a4ff2bab0562bfd4281d757dd888e8f5d2d1ae16561cabf5598073c343e8c2dc9b35992c2bc51398faffceb9b70ea2eae214ab205a586bcb971d741d5f59d
29 DIST open-iscsi-2.1.1.tar.gz 616859 BLAKE2B 7004b0866e55837f06cfe9e45f49f6a482932fda8a2c21c55819d658fb96113f1913290d490f28baccea86ceb755c63b73bd010b201f974c9803d39fbf5d0672 SHA512 88dbea433fe5266714c5c73ce4b60dfb8ddeffcaad4ff77abbdda2a865d29d4307ca51b8f45376f54542b19baed30d5f2f1836a8c136eb0af840f489f47e4fb3
30 DIST open-iscsi-2.1.2.tar.gz 617407 BLAKE2B 13a8c70d8a4618262c746cce3f2c66c04b577b35918d993c29fff041d292ef9e60b4d39c6d6a308d306b8303d08e7aac81b9927157361eaf47e694e9ae1e365a SHA512 a0b1fc4aa2acadbf3a69fa636a47fec527fff75748fccfa83c9540f3ac05c71835a406503b15480ed25fe4fb780e58e0dd21760cccc7f7ef07128d1aef8ee2e3
31
32 diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.876-Makefiles.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.876-Makefiles.patch
33 deleted file mode 100644
34 index 2cfa4362285..00000000000
35 --- a/sys-block/open-iscsi/files/open-iscsi-2.0.876-Makefiles.patch
36 +++ /dev/null
37 @@ -1,61 +0,0 @@
38 ---- a/usr/Makefile
39 -+++ b/usr/Makefile
40 -@@ -69,9 +69,9 @@ iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \
41 - iscsistart.o statics.o
42 - $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lrt $(ISCSI_LIB)
43 - clean:
44 -- rm -f *.o $(PROGRAMS) .depend $(LIBSYS)
45 -+ $(RM) *.o $(PROGRAMS) .depend $(LIBSYS)
46 -
47 - depend:
48 -- gcc $(CFLAGS) -M `ls *.c` > .depend
49 -+ $(CC) $(CFLAGS) -M `ls *.c` > .depend
50 -
51 - -include .depend
52 ---- a/utils/Makefile
53 -+++ b/utils/Makefile
54 -@@ -10,9 +10,9 @@ iscsi-iname: md5.o iscsi-iname.o
55 - $(CC) $(CFLAGS) $(LDFLAGS) $^ $(DBM_LIB) -o $@
56 -
57 - clean:
58 -- rm -f *.o $(PROGRAMS) .depend
59 -+ $(RM) *.o $(PROGRAMS) .depend
60 -
61 - depend:
62 -- gcc $(CFLAGS) -M `ls *.c` > .depend
63 -+ $(CC) $(CFLAGS) -M `ls *.c` > .depend
64 -
65 - -include .depend
66 ---- a/utils/fwparam_ibft/Makefile
67 -+++ b/utils/fwparam_ibft/Makefile
68 -@@ -41,11 +41,11 @@ LDFLAGS += -L$(TOPDIR)/libopeniscsiusr -liscsiusr
69 - all: $(OBJS)
70 -
71 - clean:
72 -- rm -f *.o $(CLEANFILES) .depend
73 -+ $(RM) *.o $(CLEANFILES) .depend
74 -
75 - $(OBJS): prom_parse.tab.h prom_parse.h fwparam_ibft.h
76 -
77 - depend:
78 -- gcc $(CFLAGS) -M `ls *.c` > .depend
79 -+ $(CC) $(CFLAGS) -M `ls *.c` > .depend
80 -
81 - -include .depend
82 ---- a/utils/sysdeps/Makefile
83 -+++ b/utils/sysdeps/Makefile
84 -@@ -8,9 +8,9 @@ SYSDEPS_OBJS=sysdeps.o
85 - all: $(SYSDEPS_OBJS)
86 -
87 - clean:
88 -- rm -f *.o .depend
89 -+ $(RM) *.o .depend
90 -
91 - depend:
92 -- gcc $(CFLAGS) -M `ls *.c` > .depend
93 -+ $(CC) $(CFLAGS) -M `ls *.c` > .depend
94 -
95 - -include .depend
96 ---
97 -2.16.2
98 -
99
100 diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.878-gcc10-fno-common.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.878-gcc10-fno-common.patch
101 deleted file mode 100644
102 index b61476555fb..00000000000
103 --- a/sys-block/open-iscsi/files/open-iscsi-2.0.878-gcc10-fno-common.patch
104 +++ /dev/null
105 @@ -1,107 +0,0 @@
106 -From 499a006a7d6bb154f9e1ab430e4c9e231ba6096a Mon Sep 17 00:00:00 2001
107 -From: Lee Duncan <lduncan@××××.com>
108 -Date: Tue, 28 Jan 2020 16:36:56 -0800
109 -Subject: [PATCH] Updates to support gcc -fno-common option.
110 -
111 -This meant cleaning up the definition of some
112 -global variables, so that they were only defined
113 -in one place and refered to as external elsewhere.
114 ----
115 - include/iscsi_err.h | 6 ++++--
116 - iscsiuio/configure.ac | 2 +-
117 - iscsiuio/src/uip/uip.h | 4 ++--
118 - usr/iscsi_err.c | 2 ++
119 - usr/log.c | 1 +
120 - usr/log.h | 2 +-
121 - 6 files changed, 11 insertions(+), 6 deletions(-)
122 -
123 -diff --git a/include/iscsi_err.h b/include/iscsi_err.h
124 -index ed000dd0..04a8723e 100644
125 ---- a/include/iscsi_err.h
126 -+++ b/include/iscsi_err.h
127 -@@ -4,7 +4,7 @@
128 - #ifndef _ISCSI_ERR_
129 - #define _ISCSI_ERR_
130 -
131 --enum {
132 -+enum iscsi_error_list {
133 - ISCSI_SUCCESS = 0,
134 - /* Generic error */
135 - ISCSI_ERR = 1,
136 -@@ -73,7 +73,9 @@ enum {
137 -
138 - /* Always last. Indicates end of error code space */
139 - ISCSI_MAX_ERR_VAL,
140 --} iscsi_err;
141 -+};
142 -+
143 -+extern enum iscsi_error_list iscsi_err;
144 -
145 - extern void iscsi_err_print_msg(int err);
146 - extern char *iscsi_err_to_str(int err);
147 -diff --git a/iscsiuio/configure.ac b/iscsiuio/configure.ac
148 -index b41df0ec..8099f09c 100644
149 ---- a/iscsiuio/configure.ac
150 -+++ b/iscsiuio/configure.ac
151 -@@ -78,7 +78,7 @@ AC_CONFIG_COMMANDS([default],[[
152 - else
153 - echo 'char *build_date = "'`date`'";' > src/unix/build_date.c
154 - fi
155 -- echo 'char *build_date;'> src/unix/build_date.h
156 -+ echo 'extern char *build_date;'> src/unix/build_date.h
157 - ]],[[]])
158 -
159 - AC_PREFIX_DEFAULT()
160 -diff --git a/iscsiuio/src/uip/uip.h b/iscsiuio/src/uip/uip.h
161 -index 1180ab50..9d9428a2 100644
162 ---- a/iscsiuio/src/uip/uip.h
163 -+++ b/iscsiuio/src/uip/uip.h
164 -@@ -70,8 +70,8 @@ struct uip_stack;
165 - typedef u16_t uip_ip4addr_t[2];
166 - typedef u16_t uip_ip6addr_t[8];
167 -
168 --const uip_ip6addr_t all_zeroes_addr6;
169 --const uip_ip4addr_t all_zeroes_addr4;
170 -+extern const uip_ip6addr_t all_zeroes_addr6;
171 -+extern const uip_ip4addr_t all_zeroes_addr4;
172 -
173 - #define ETH_BUF(buf) ((struct uip_eth_hdr *)buf)
174 - #define VLAN_ETH_BUF(buf) ((struct uip_vlan_eth_hdr *)buf)
175 -diff --git a/usr/iscsi_err.c b/usr/iscsi_err.c
176 -index 23c61fc3..4a057d57 100644
177 ---- a/usr/iscsi_err.c
178 -+++ b/usr/iscsi_err.c
179 -@@ -21,6 +21,8 @@
180 - #include "iscsi_err.h"
181 - #include "log.h"
182 -
183 -+enum iscsi_error_list iscsi_err;
184 -+
185 - static char *iscsi_err_msgs[] = {
186 - /* 0 */ "",
187 - /* 1 */ "unknown error",
188 -diff --git a/usr/log.c b/usr/log.c
189 -index f29b54b3..6e16e7ce 100644
190 ---- a/usr/log.c
191 -+++ b/usr/log.c
192 -@@ -33,6 +33,7 @@
193 -
194 - char *log_name;
195 - int log_level = 0;
196 -+struct logarea *la = NULL;
197 -
198 - static int log_stop_daemon = 0;
199 - static void (*log_func)(int prio, void *priv, const char *fmt, va_list ap);
200 -diff --git a/usr/log.h b/usr/log.h
201 -index 486a08ea..c548791e 100644
202 ---- a/usr/log.h
203 -+++ b/usr/log.h
204 -@@ -64,7 +64,7 @@ struct logarea {
205 - union semun semarg;
206 - };
207 -
208 --struct logarea *la;
209 -+extern struct logarea *la;
210 -
211 - extern int log_init(char *program_name, int size,
212 - void (*func)(int prio, void *priv, const char *fmt, va_list ap),
213
214 diff --git a/sys-block/open-iscsi/open-iscsi-2.0.878-r1.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.878-r1.ebuild
215 deleted file mode 100644
216 index a622e3b62f5..00000000000
217 --- a/sys-block/open-iscsi/open-iscsi-2.0.878-r1.ebuild
218 +++ /dev/null
219 @@ -1,141 +0,0 @@
220 -# Copyright 1999-2020 Gentoo Authors
221 -# Distributed under the terms of the GNU General Public License v2
222 -
223 -EAPI=7
224 -
225 -inherit autotools linux-info flag-o-matic toolchain-funcs udev systemd
226 -
227 -DESCRIPTION="A performant, transport independent, multi-platform implementation of RFC3720"
228 -HOMEPAGE="http://www.open-iscsi.com/"
229 -SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
230 -
231 -LICENSE="GPL-2"
232 -SLOT="0/0.2"
233 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
234 -IUSE="debug infiniband libressl +tcp rdma systemd"
235 -
236 -DEPEND="
237 - sys-apps/kmod
238 - sys-block/open-isns:=
239 - sys-kernel/linux-headers
240 - infiniband? ( sys-fabric/ofed )
241 - !libressl? ( dev-libs/openssl:0= )
242 - libressl? ( dev-libs/libressl:0= )
243 - systemd? ( sys-apps/systemd )
244 -"
245 -RDEPEND="${DEPEND}
246 - sys-fs/lsscsi
247 - sys-apps/util-linux"
248 -BDEPEND="virtual/pkgconfig"
249 -
250 -REQUIRED_USE="infiniband? ( rdma ) || ( rdma tcp )"
251 -
252 -PATCHES=(
253 - "${FILESDIR}/${PN}-2.0.876-Makefiles.patch"
254 - "${FILESDIR}/${PN}-2.0.878-gcc10-fno-common.patch"
255 -)
256 -
257 -pkg_setup() {
258 - linux-info_pkg_setup
259 -
260 - if kernel_is -lt 2 6 16; then
261 - die "Sorry, your kernel must be 2.6.16-rc5 or newer!"
262 - fi
263 -
264 - # Needs to be done, as iscsid currently only starts, when having the iSCSI
265 - # support loaded as module. Kernel builtin options don't work. See this for
266 - # more information:
267 - # https://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966
268 - # If there's a new release, check whether this is still valid!
269 - TCP_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP"
270 - RDMA_MODULES="INFINIBAND_ISER"
271 - INFINIBAND_MODULES="INFINIBAND_IPOIB INIBAND_USER_MAD INFINIBAND_USER_ACCESS"
272 - CONFIG_CHECK_MODULES="tcp? ( ${TCP_MODULES} ) rdma? ( ${RDMA_MODULES} ) infiniband? ( ${INFINIBAND_MODULES} )"
273 - if linux_config_exists; then
274 - if use tcp; then
275 - for module in ${TCP_MODULES}; do
276 - linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"
277 - done
278 - fi
279 - if use infiniband; then
280 - for module in ${INFINIBAND_MODULES}; do
281 - linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"
282 - done
283 - fi
284 - if use rdma; then
285 - for module in ${RDMA_MODULES}; do
286 - linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"$
287 - done
288 - fi
289 - fi
290 -}
291 -
292 -src_prepare() {
293 - sed -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' \
294 - -i etc/iscsid.conf || die
295 - sed -e 's@\(/sbin/\)@/usr\1@' \
296 - -i etc/systemd/iscsi* || die
297 - default
298 -
299 - pushd iscsiuio >/dev/null || die
300 - eautoreconf
301 - popd >/dev/null || die
302 -}
303 -
304 -src_configure() {
305 - use debug && append-cppflags -DDEBUG_TCP -DDEBUG_SCSI
306 - append-lfs-flags
307 -}
308 -
309 -src_compile() {
310 - # Stuffing CPPFLAGS into CFLAGS isn't entirely correct, but the build
311 - # is messed up already here, so it's not making it that much worse.
312 - KSRC="${KV_DIR}" CFLAGS="" \
313 - emake \
314 - OPTFLAGS="${CFLAGS} ${CPPFLAGS} $(usex systemd '' -DNO_SYSTEMD)" \
315 - AR="$(tc-getAR)" CC="$(tc-getCC)" \
316 - $(usex systemd '' NO_SYSTEMD=1) \
317 - user
318 -}
319 -
320 -src_install() {
321 - emake DESTDIR="${ED}" sbindir="/usr/sbin" install
322 - # Upstream make is not deterministic, per bug #601514
323 - rm -f "${ED}"/etc/initiatorname.iscsi
324 -
325 - dodoc README THANKS
326 -
327 - docinto test/
328 - dodoc test/*
329 -
330 - insinto /etc/iscsi
331 - newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example
332 -
333 - newconfd "${FILESDIR}"/iscsid-conf.d iscsid
334 - newinitd "${FILESDIR}"/iscsid-init.d iscsid
335 -
336 - local unit
337 - local units=(
338 - iscsi.service
339 - iscsid.{service,socket}
340 - iscsiuio.{service,socket}
341 - )
342 - for unit in ${units[@]} ; do
343 - systemd_dounit etc/systemd/${unit}
344 - done
345 -
346 - keepdir /var/db/iscsi
347 - fperms 700 /var/db/iscsi
348 - fperms 600 /etc/iscsi/iscsid.conf
349 -}
350 -
351 -pkg_postinst() {
352 - in='/etc/iscsi/initiatorname.iscsi'
353 - if [[ ! -f "${EROOT}${in}" ]] && [[ -f "${EROOT}${in}.example" ]] ; then
354 - {
355 - cat "${EROOT}${in}.example"
356 - echo "# InitiatorName generated by ${CATEGORY}/${PF} at $(date -uR)"
357 - echo "InitiatorName=$(${ROOT}/usr/sbin/iscsi-iname)"
358 - } >> "${EROOT}${in}.tmp" && mv -f "${EROOT}${in}.tmp" "${EROOT}${in}"
359 - fi
360 -}
361
362 diff --git a/sys-block/open-iscsi/open-iscsi-2.1.0.ebuild b/sys-block/open-iscsi/open-iscsi-2.1.0.ebuild
363 deleted file mode 100644
364 index a1f80e0a347..00000000000
365 --- a/sys-block/open-iscsi/open-iscsi-2.1.0.ebuild
366 +++ /dev/null
367 @@ -1,140 +0,0 @@
368 -# Copyright 1999-2019 Gentoo Authors
369 -# Distributed under the terms of the GNU General Public License v2
370 -
371 -EAPI=7
372 -
373 -inherit autotools linux-info flag-o-matic toolchain-funcs udev systemd
374 -
375 -DESCRIPTION="A performant, transport independent, multi-platform implementation of RFC3720"
376 -HOMEPAGE="http://www.open-iscsi.com/"
377 -SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
378 -
379 -LICENSE="GPL-2"
380 -SLOT="0/0.2"
381 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
382 -IUSE="debug infiniband libressl +tcp rdma systemd"
383 -
384 -DEPEND="
385 - sys-apps/kmod
386 - sys-block/open-isns:=
387 - sys-kernel/linux-headers
388 - infiniband? ( sys-fabric/ofed )
389 - !libressl? ( dev-libs/openssl:0= )
390 - libressl? ( dev-libs/libressl:0= )
391 - systemd? ( sys-apps/systemd )
392 -"
393 -RDEPEND="${DEPEND}
394 - sys-fs/lsscsi
395 - sys-apps/util-linux"
396 -BDEPEND="virtual/pkgconfig"
397 -
398 -REQUIRED_USE="infiniband? ( rdma ) || ( rdma tcp )"
399 -
400 -PATCHES=(
401 - "${FILESDIR}/${PN}-2.0.876-Makefiles.patch"
402 -)
403 -
404 -pkg_setup() {
405 - linux-info_pkg_setup
406 -
407 - if kernel_is -lt 2 6 16; then
408 - die "Sorry, your kernel must be 2.6.16-rc5 or newer!"
409 - fi
410 -
411 - # Needs to be done, as iscsid currently only starts, when having the iSCSI
412 - # support loaded as module. Kernel builtin options don't work. See this for
413 - # more information:
414 - # https://groups.google.com/group/open-iscsi/browse_thread/thread/cc10498655b40507/fd6a4ba0c8e91966
415 - # If there's a new release, check whether this is still valid!
416 - TCP_MODULES="SCSI_ISCSI_ATTRS ISCSI_TCP"
417 - RDMA_MODULES="INFINIBAND_ISER"
418 - INFINIBAND_MODULES="INFINIBAND_IPOIB INIBAND_USER_MAD INFINIBAND_USER_ACCESS"
419 - CONFIG_CHECK_MODULES="tcp? ( ${TCP_MODULES} ) rdma? ( ${RDMA_MODULES} ) infiniband? ( ${INFINIBAND_MODULES} )"
420 - if linux_config_exists; then
421 - if use tcp; then
422 - for module in ${TCP_MODULES}; do
423 - linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"
424 - done
425 - fi
426 - if use infiniband; then
427 - for module in ${INFINIBAND_MODULES}; do
428 - linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"
429 - done
430 - fi
431 - if use rdma; then
432 - for module in ${RDMA_MODULES}; do
433 - linux_chkconfig_module ${module} || ewarn "${module} needs to be built as module (builtin doesn't work)"$
434 - done
435 - fi
436 - fi
437 -}
438 -
439 -src_prepare() {
440 - sed -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' \
441 - -i etc/iscsid.conf || die
442 - sed -e 's@\(/sbin/\)@/usr\1@' \
443 - -i etc/systemd/iscsi* || die
444 - default
445 -
446 - pushd iscsiuio >/dev/null || die
447 - eautoreconf
448 - popd >/dev/null || die
449 -}
450 -
451 -src_configure() {
452 - use debug && append-cppflags -DDEBUG_TCP -DDEBUG_SCSI
453 - append-lfs-flags
454 -}
455 -
456 -src_compile() {
457 - # Stuffing CPPFLAGS into CFLAGS isn't entirely correct, but the build
458 - # is messed up already here, so it's not making it that much worse.
459 - KSRC="${KV_DIR}" CFLAGS="" \
460 - emake \
461 - OPTFLAGS="${CFLAGS} ${CPPFLAGS} $(usex systemd '' -DNO_SYSTEMD)" \
462 - AR="$(tc-getAR)" CC="$(tc-getCC)" \
463 - $(usex systemd '' NO_SYSTEMD=1) \
464 - user
465 -}
466 -
467 -src_install() {
468 - emake DESTDIR="${ED}" sbindir="/usr/sbin" install
469 - # Upstream make is not deterministic, per bug #601514
470 - rm -f "${ED}"/etc/initiatorname.iscsi
471 -
472 - dodoc README THANKS
473 -
474 - docinto test/
475 - dodoc test/*
476 -
477 - insinto /etc/iscsi
478 - newins "${FILESDIR}"/initiatorname.iscsi initiatorname.iscsi.example
479 -
480 - newconfd "${FILESDIR}"/iscsid-conf.d iscsid
481 - newinitd "${FILESDIR}"/iscsid-init.d iscsid
482 -
483 - local unit
484 - local units=(
485 - iscsi.service
486 - iscsid.{service,socket}
487 - iscsiuio.{service,socket}
488 - )
489 - for unit in ${units[@]} ; do
490 - systemd_dounit etc/systemd/${unit}
491 - done
492 -
493 - keepdir /var/db/iscsi
494 - fperms 700 /var/db/iscsi
495 - fperms 600 /etc/iscsi/iscsid.conf
496 -}
497 -
498 -pkg_postinst() {
499 - in='/etc/iscsi/initiatorname.iscsi'
500 - if [[ ! -f "${EROOT}${in}" ]] && [[ -f "${EROOT}${in}.example" ]] ; then
501 - {
502 - cat "${EROOT}${in}.example"
503 - echo "# InitiatorName generated by ${CATEGORY}/${PF} at $(date -uR)"
504 - echo "InitiatorName=$(${ROOT}/usr/sbin/iscsi-iname)"
505 - } >> "${EROOT}${in}.tmp" && mv -f "${EROOT}${in}.tmp" "${EROOT}${in}"
506 - fi
507 -}