Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@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: Tue, 03 Jan 2017 22:13:39
Message-Id: 1483481598.da400dec15a2987751259860fea158bf252b3baa.blueness@gentoo
1 commit: da400dec15a2987751259860fea158bf252b3baa
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 3 22:13:18 2017 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 3 22:13:18 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da400dec
7
8 sys-block/open-iscsi: use compat <linux/ethtool.h> to build on musl
9
10 Package-Manager: portage-2.3.0
11
12 .../open-iscsi-2.0.874-musl-ethtool-compat.patch | 69 ++++++++++++++++++++++
13 sys-block/open-iscsi/open-iscsi-2.0.874.ebuild | 7 ++-
14 2 files changed, 73 insertions(+), 3 deletions(-)
15
16 diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-ethtool-compat.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-ethtool-compat.patch
17 new file mode 100644
18 index 00000000..12b82c7
19 --- /dev/null
20 +++ b/sys-block/open-iscsi/files/open-iscsi-2.0.874-musl-ethtool-compat.patch
21 @@ -0,0 +1,69 @@
22 +From: Anthony G. Basiel <blueness@g.o>
23 +
24 +diff -Naur open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/bnx2x.c open-iscsi-2.0.874/iscsiuio/src/unix/libs/bnx2x.c
25 +--- open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/bnx2x.c 2016-09-29 18:33:24.000000000 +0000
26 ++++ open-iscsi-2.0.874/iscsiuio/src/unix/libs/bnx2x.c 2017-01-03 21:45:47.504035833 +0000
27 +@@ -42,7 +42,7 @@
28 + #include <arpa/inet.h>
29 + #include <linux/types.h> /* Needed for linux/ethtool.h on RHEL 5.x */
30 + #include <linux/sockios.h>
31 +-#include <linux/ethtool.h>
32 ++#include "ethtool-compat.h"
33 + #include <sys/mman.h>
34 + #include <sys/ioctl.h>
35 + #include <sys/types.h>
36 +diff -Naur open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/ethtool-compat.h open-iscsi-2.0.874/iscsiuio/src/unix/libs/ethtool-compat.h
37 +--- open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/ethtool-compat.h 1970-01-01 00:00:00.000000000 +0000
38 ++++ open-iscsi-2.0.874/iscsiuio/src/unix/libs/ethtool-compat.h 2017-01-03 21:45:23.016034980 +0000
39 +@@ -0,0 +1,51 @@
40 ++/*
41 ++ * ethtool-compat.h: adopted from
42 ++ # ethtool.h: Defines for Linux ethtool.
43 ++ *
44 ++ * Copyright (C) 1998 David S. Miller (davem@××××××.com)
45 ++ * Copyright 2001 Jeff Garzik <jgarzik@×××××.com>
46 ++ * Portions Copyright 2001 Sun Microsystems (thockin@×××.com)
47 ++ * Portions Copyright 2002 Intel (eli.kupermann@×××××.com,
48 ++ * christopher.leech@×××××.com,
49 ++ * scott.feldman@×××××.com)
50 ++ * Portions Copyright (C) Sun Microsystems 2008
51 ++ */
52 ++
53 ++#include <linux/types.h>
54 ++#include <netinet/if_ether.h>
55 ++
56 ++#define ETHTOOL_FWVERS_LEN 32
57 ++#define ETHTOOL_BUSINFO_LEN 32
58 ++#define ETHTOOL_EROMVERS_LEN 32
59 ++
60 ++struct ethtool_drvinfo {
61 ++ __u32 cmd;
62 ++ char driver[32];
63 ++ char version[32];
64 ++ char fw_version[ETHTOOL_FWVERS_LEN];
65 ++ char bus_info[ETHTOOL_BUSINFO_LEN];
66 ++ char erom_version[ETHTOOL_EROMVERS_LEN];
67 ++ char reserved2[12];
68 ++ __u32 n_priv_flags;
69 ++ __u32 n_stats;
70 ++ __u32 testinfo_len;
71 ++ __u32 eedump_len;
72 ++ __u32 regdump_len;
73 ++};
74 ++
75 ++struct ethtool_tcpip4_spec {
76 ++ __be32 ip4src;
77 ++ __be32 ip4dst;
78 ++ __be16 psrc;
79 ++ __be16 pdst;
80 ++ __u8 tos;
81 ++};
82 ++
83 ++struct ethtool_ah_espip4_spec {
84 ++ __be32 ip4src;
85 ++ __be32 ip4dst;
86 ++ __be32 spi;
87 ++ __u8 tos;
88 ++};
89 ++
90 ++#define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */
91
92 diff --git a/sys-block/open-iscsi/open-iscsi-2.0.874.ebuild b/sys-block/open-iscsi/open-iscsi-2.0.874.ebuild
93 index 61e16f0..5aea512 100644
94 --- a/sys-block/open-iscsi/open-iscsi-2.0.874.ebuild
95 +++ b/sys-block/open-iscsi/open-iscsi-2.0.874.ebuild
96 @@ -4,7 +4,7 @@
97
98 EAPI=6
99
100 -inherit versionator linux-info eutils flag-o-matic toolchain-funcs udev
101 +inherit versionator linux-info flag-o-matic toolchain-funcs udev
102
103 DESCRIPTION="A performant, transport independent, multi-platform implementation of RFC3720"
104 HOMEPAGE="http://www.open-iscsi.org/"
105 @@ -59,8 +59,9 @@ pkg_setup() {
106 }
107
108 src_prepare() {
109 - epatch "${FILESDIR}"/${P}-Makefiles.patch
110 - epatch "${FILESDIR}"/${P}-musl-fixes.patch
111 + eapply "${FILESDIR}"/${P}-Makefiles.patch
112 + eapply "${FILESDIR}"/${P}-musl-fixes.patch
113 + eapply "${FILESDIR}"/${P}-musl-ethtool-compat.patch
114 eapply_user
115
116 sed -i -e 's:^\(iscsid.startup\)\s*=.*:\1 = /usr/sbin/iscsid:' etc/iscsid.conf || die