diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2008-06-14 08:18:53 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2008-06-14 08:18:53 +0000 |
commit | 5c890fc69db786f01ed87f7578b88e9867ba3e77 (patch) | |
tree | 4c46a30836ec94b593355b54fffca345c5ff6e07 /sys-block/iscsitarget | |
parent | Stable for HPPA (bug #225905). (diff) | |
download | historical-5c890fc69db786f01ed87f7578b88e9867ba3e77.tar.gz historical-5c890fc69db786f01ed87f7578b88e9867ba3e77.tar.bz2 historical-5c890fc69db786f01ed87f7578b88e9867ba3e77.zip |
Version bump (bug #223093), and apply patch to fix building with glibc 2.8 (bug #225719).
Package-Manager: portage-2.1.5.5
Diffstat (limited to 'sys-block/iscsitarget')
-rw-r--r-- | sys-block/iscsitarget/ChangeLog | 10 | ||||
-rw-r--r-- | sys-block/iscsitarget/Manifest | 15 | ||||
-rw-r--r-- | sys-block/iscsitarget/files/iscsitarget-0.4.16+glibc-2.8-lists.patch | 432 | ||||
-rw-r--r-- | sys-block/iscsitarget/iscsitarget-0.4.16.ebuild | 61 |
4 files changed, 516 insertions, 2 deletions
diff --git a/sys-block/iscsitarget/ChangeLog b/sys-block/iscsitarget/ChangeLog index d6e562f71108..b6f99a4a24ba 100644 --- a/sys-block/iscsitarget/ChangeLog +++ b/sys-block/iscsitarget/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-block/iscsitarget # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/ChangeLog,v 1.12 2008/04/12 14:04:51 nixnut Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/ChangeLog,v 1.13 2008/06/14 08:18:53 flameeyes Exp $ + +*iscsitarget-0.4.16 (14 Jun 2008) + + 14 Jun 2008; Diego Pettenò <flameeyes@gentoo.org> + +files/iscsitarget-0.4.16+glibc-2.8-lists.patch, + +iscsitarget-0.4.16.ebuild: + Version bump (bug #223093), and apply patch to fix building with glibc 2.8 + (bug #225719). 12 Apr 2008; nixnut <nixnut@gentoo.org> iscsitarget-0.4.15-r1.ebuild: Stable on ppc wrt bug 214805 diff --git a/sys-block/iscsitarget/Manifest b/sys-block/iscsitarget/Manifest index e638d2499959..e0b75f7227f6 100644 --- a/sys-block/iscsitarget/Manifest +++ b/sys-block/iscsitarget/Manifest @@ -1,10 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX ietd-conf.d 1073 RMD160 ade5301c8e2eb8cbc16dfae4bfa80e22393e2953 SHA1 1bb990e26b847169d4937e5d2fc28a5f86d55003 SHA256 28c4a6ddfe555d9f400513de04e2e44473263c4505434fc6e926d2b2fe89c414 AUX ietd-init.d 2490 RMD160 f8236e27db076f93308a627d20f6bf11eef0cdac SHA1 731b4ba2e0a60cd8ce3892988e6248501ec6c91b SHA256 efe61cefe96571dd5ef3c38d0f692f40f66ad9dc30db436471ef998c0491a9a2 AUX iscsitarget-0.4.15-build.patch 527 RMD160 2199754d3e8befbe12fb4e12b25cd9ca0974cb15 SHA1 4bce3d74e723fd4d8ddbf2ca3623651eea684f63 SHA256 508535914bac15c14ce727ddc9f3962478afe38fbb53bfe1392fc031611bfef1 AUX iscsitarget-0.4.15-isns-set-scn-flag.patch 507 RMD160 9a3b091eafb3d213a0c830a691684e0dc1f04b9c SHA1 9d80a8d1b5069e6ec5252ed8b1636023288bada2 SHA256 dc99ad8fa1cc10f6c6af4c99374dd0da14d3a56aebee2c48dd02cd8e156f9996 AUX iscsitarget-0.4.15-kmem.patch 1459 RMD160 9bff8127a865fe6ca86616966f092344de24c240 SHA1 8af2830595558373c0e9e5be0e673ea840fed0ee SHA256 f65e20f1bf5c7823056d0760b43841c4e2a4b1280c923bc91fbda951cf72dd91 AUX iscsitarget-0.4.15-scatter.patch 4388 RMD160 f41ad197a2b27e34595a4bf1be743eaed2e7cd12 SHA1 b0bbfb2b088d8f18792c4ce44b65557dccabaa0a SHA256 277607b25d32e73846e2dde0bfdd0393b5c804e93c3a1eb93d9daae0e4101b20 +AUX iscsitarget-0.4.16+glibc-2.8-lists.patch 12736 RMD160 e6b4d39d4e2ae88db8f9fd8661759181200de219 SHA1 921d48ce83031610223b88ed3f0aa944bd1499a3 SHA256 8476001e2ea14e92f3c46467dc17284b38b9a73d4cd54400c6a92869793e0175 DIST iscsitarget-0.4.15.tar.gz 102922 RMD160 d7d787f1fcbdb124d17eaaa62eaa47c21b6e5dd2 SHA1 c4802e208077bc0249518555c7eace6808de1878 SHA256 da8eb570f9abb6e50c515321747407e9945f5a83bab774c42ed41809234505cb +DIST iscsitarget-0.4.16.tar.gz 103196 RMD160 e0a68f04523191d6116646566fa9132e5aebdb58 SHA1 a7ddbd15767764bad221f59cff4b5e9f0bf57d7b SHA256 e6605ae5f9ed2e2fdbe84df967236678579a4fbe536b75a93277cbb607bead7d EBUILD iscsitarget-0.4.15-r1.ebuild 1848 RMD160 7294286c00a5f59b13a01fd7da2e8aca3a694585 SHA1 949d43f991de676b676714213dfea02626d31217 SHA256 fcd6fd854e27a10e93442956fab35833ac94b3b831a39b36b2257c3e881bd1f7 -MISC ChangeLog 2408 RMD160 90f7d62a7c6b76ff7105dc8a88a0e3399b9932c9 SHA1 e086f026ae2197439db4b59765be9e78a6d56bee SHA256 c258ffd62846d8a0bc2cb06abae525452c7caa7720fcdb15522a487f3d882623 +EBUILD iscsitarget-0.4.16.ebuild 1902 RMD160 69b66c9c8fb1a49a4fab49c02630444c64024f56 SHA1 02ec71d4172269e14ea680339f52f6bf43290228 SHA256 f1309cda1d1eedf776032010300142b35bbfbca94c5eedb62ea6cb82fd50d1e0 +MISC ChangeLog 2675 RMD160 28d3422b73b56e2685e0038c3ffbcb53021ac6cf SHA1 0f342bca8fd8ddd94e250e5024b4c3af99102464 SHA256 7b3659e919f98d0cb457e179579930646912043f7a6018bc31fa6d445df243aa MISC metadata.xml 164 RMD160 f43cbec30b7074319087c9acffdb9354b17b0db3 SHA1 9c213f5803676c56439df3716be07d6692588856 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.9 (GNU/Linux) + +iEYEARECAAYFAkhTfvUACgkQAiZjviIA2XgNAwCghUczQiWVmIV3KwcYMTwdXF2K +WwUAoO1Cg7t+vBqJ2z2ugV5Ivk+k8oss +=qIEI +-----END PGP SIGNATURE----- diff --git a/sys-block/iscsitarget/files/iscsitarget-0.4.16+glibc-2.8-lists.patch b/sys-block/iscsitarget/files/iscsitarget-0.4.16+glibc-2.8-lists.patch new file mode 100644 index 000000000000..e02ce18c0f4f --- /dev/null +++ b/sys-block/iscsitarget/files/iscsitarget-0.4.16+glibc-2.8-lists.patch @@ -0,0 +1,432 @@ +From: Arne Redlich <agr@powerkom-dd.de> +Subject: [PATCH 1/6] Replace qelem based lists with list_head based ones +Newsgroups: gmane.linux.iscsi.iscsi-target.devel +To: fujita.tomonori@lab.ntt.co.jp +Cc: iscsitarget-devel@lists.sourceforge.net, + Vladislav Bolkhovitin <vst@vlnb.net> +Date: Sat, 31 May 2008 16:09:08 +0200 + +When building against glibc >= 2.8, __USE_GNU has to be #define'd, which +in turn leads to our struct qelem conflicting with the version provided by +glibc (also enabled by this #define). So let's get rid of struct qelem and +use the familiar list_head-based lists. + +This patch also fixes a few issues: +- list_length_is_one(list) also returned true if list is actually empty +- plain_account_add(): if the outgoing account is to be overwritten, the + retrieval of the old account presently only works due to "black magic" + (i.e., because the struct qelem is the first member of struct user). + +Merely compile tested! +--- + usr/iscsid.h | 11 +++---- + usr/isns.c | 22 +++++++------- + usr/misc.h | 92 ++++++++++++++++++++++++++++++++++++++++++-------------- + usr/plain.c | 24 +++++++------- + usr/session.c | 4 +- + usr/target.c | 6 ++-- + 6 files changed, 102 insertions(+), 57 deletions(-) + +diff --git a/usr/iscsid.h b/usr/iscsid.h +index ba13ecf..a664b0d 100644 +--- a/usr/iscsid.h ++++ b/usr/iscsid.h +@@ -7,7 +7,6 @@ + #ifndef ISCSID_H + #define ISCSID_H + +-#include <search.h> + #include <sys/types.h> + + #include "types.h" +@@ -32,7 +31,7 @@ struct PDU { + #define KEY_STATE_DONE 2 + + struct session { +- struct qelem slist; ++ struct list_head slist; + + char *initiator; + struct target *target; +@@ -122,9 +121,9 @@ struct connection { + #define INCOMING_BUFSIZE 8192 + + struct target { +- struct qelem tlist; ++ struct list_head tlist; + +- struct qelem sessions_list; ++ struct list_head sessions_list; + + u32 tid; + char name[ISCSI_NAME_LEN]; +@@ -133,7 +132,7 @@ struct target { + int max_nr_sessions; + int nr_sessions; + +- struct qelem isns_head; ++ struct list_head isns_head; + }; + + /* chap.c */ +@@ -180,7 +179,7 @@ extern void session_create(struct connection *conn); + extern void session_remove(struct session *session); + + /* target.c */ +-extern struct qelem targets_list; ++extern struct list_head targets_list; + extern int target_add(u32 *, char *); + extern int target_del(u32); + extern u32 target_find_by_name(const char *name); +diff --git a/usr/isns.c b/usr/isns.c +index 08c72de..30ac8d2 100644 +--- a/usr/isns.c ++++ b/usr/isns.c +@@ -44,12 +44,12 @@ struct isns_io { + struct isns_qry_mgmt { + char name[ISCSI_NAME_LEN]; + uint16_t transaction; +- struct qelem qlist; ++ struct list_head qlist; + }; + + struct isns_initiator { + char name[ISCSI_NAME_LEN]; +- struct qelem ilist; ++ struct list_head ilist; + }; + + static LIST_HEAD(qry_list); +@@ -246,7 +246,7 @@ static int isns_scn_register(void) + memset(buf, 0, sizeof(buf)); + tlv = (struct isns_tlv *) hdr->pdu; + +- target = list_entry(targets_list.q_forw, struct target, tlist); ++ target = list_entry(targets_list.next, struct target, tlist); + + length += isns_tlv_set(&tlv, ISNS_ATTR_ISCSI_NAME, + strlen(target->name), target->name); +@@ -293,7 +293,7 @@ static int isns_attr_query(char *name) + mgmt = malloc(sizeof(*mgmt)); + if (!mgmt) + return 0; +- insque(&mgmt->qlist, &qry_list); ++ list_add(&mgmt->qlist, &qry_list); + + memset(buf, 0, sizeof(buf)); + tlv = (struct isns_tlv *) hdr->pdu; +@@ -302,7 +302,7 @@ static int isns_attr_query(char *name) + snprintf(mgmt->name, sizeof(mgmt->name), name); + else { + mgmt->name[0] = '\0'; +- target = list_entry(targets_list.q_forw, struct target, tlist); ++ target = list_entry(targets_list.next, struct target, tlist); + name = target->name; + } + +@@ -345,7 +345,7 @@ static int isns_deregister(void) + memset(buf, 0, sizeof(buf)); + tlv = (struct isns_tlv *) hdr->pdu; + +- target = list_entry(targets_list.q_forw, struct target, tlist); ++ target = list_entry(targets_list.next, struct target, tlist); + + length += isns_tlv_set(&tlv, ISNS_ATTR_ISCSI_NAME, + strlen(target->name), target->name); +@@ -385,7 +385,7 @@ int isns_target_register(char *name) + memset(buf, 0, sizeof(buf)); + tlv = (struct isns_tlv *) hdr->pdu; + +- target = list_entry(targets_list.q_back, struct target, tlist); ++ target = list_entry(targets_list.prev, struct target, tlist); + length += isns_tlv_set(&tlv, ISNS_ATTR_ISCSI_NAME, + strlen(target->name), target->name); + +@@ -436,8 +436,8 @@ static void free_all_acl(struct target *target) + struct isns_initiator *ini; + + while (!list_empty(&target->isns_head)) { +- ini = list_entry(target->isns_head.q_forw, typeof(*ini), ilist); +- remque(&ini->ilist); ++ ini = list_entry(target->isns_head.next, typeof(*ini), ilist); ++ list_del(&ini->ilist); + } + } + +@@ -636,7 +636,7 @@ static void qry_rsp_handle(struct isns_hdr *hdr) + + list_for_each_entry_safe(mgmt, n, &qry_list, qlist) { + if (mgmt->transaction == transaction) { +- remque(&mgmt->qlist); ++ list_del(&mgmt->qlist); + goto found; + } + } +@@ -688,7 +688,7 @@ found: + if (!ini) + goto free_qry_mgmt; + snprintf(ini->name, sizeof(ini->name), name); +- insque(&ini->ilist, &target->isns_head); ++ list_add(&ini->ilist, &target->isns_head); + } else + name = NULL; + break; +diff --git a/usr/misc.h b/usr/misc.h +index c467aab..71e69d6 100644 +--- a/usr/misc.h ++++ b/usr/misc.h +@@ -5,11 +5,6 @@ + #ifndef MISC_H + #define MISC_H + +-struct qelem { +- struct qelem *q_forw; +- struct qelem *q_back; +-}; +- + /* stolen list stuff from Linux kernel */ + + #undef offsetof +@@ -19,41 +14,92 @@ struct qelem { + #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) + #endif + ++#define container_of(ptr, type, member) ({ \ ++ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ++ (type *)( (char *)__mptr - offsetof(type,member) );}) ++ ++struct list_head { ++ struct list_head *next, *prev; ++}; ++ + #define LIST_HEAD_INIT(name) { &(name), &(name) } +-#define LIST_HEAD(name) \ +- struct qelem name = LIST_HEAD_INIT(name) + +-#define INIT_LIST_HEAD(ptr) do { \ +- (ptr)->q_forw = (ptr); (ptr)->q_back = (ptr); \ +-} while (0) ++#define LIST_HEAD(name) \ ++ struct list_head name = LIST_HEAD_INIT(name) + +-static inline int list_empty(const struct qelem *head) ++static inline void INIT_LIST_HEAD(struct list_head *list) + { +- return head->q_forw == head; ++ list->next = list; ++ list->prev = list; + } + +-static inline int list_length_is_one(const struct qelem *head) ++#define list_first_entry(ptr, type, member) \ ++ list_entry((ptr)->next, type, member) ++ ++static inline int list_empty(const struct list_head *head) + { +- return head->q_forw == head->q_back; ++ return head->next == head; + } + +-#define container_of(ptr, type, member) ({ \ +- const typeof( ((type *)0)->member ) *__mptr = (ptr); \ +- (type *)( (char *)__mptr - offsetof(type,member) );}) ++static inline int list_length_is_one(const struct list_head *head) ++{ ++ return (head->next == head->prev && !list_empty(head)); ++} + + #define list_entry(ptr, type, member) \ + container_of(ptr, type, member) + ++#define list_for_each(pos, head) \ ++ for (pos = (head)->next; pos != (head); pos = pos->next) ++ + #define list_for_each_entry(pos, head, member) \ +- for (pos = list_entry((head)->q_forw, typeof(*pos), member); \ +- &pos->member != (head); \ +- pos = list_entry(pos->member.q_forw, typeof(*pos), member)) ++ for (pos = list_entry((head)->next, typeof(*pos), member); \ ++ &pos->member != (head); \ ++ pos = list_entry(pos->member.next, typeof(*pos), member)) + + #define list_for_each_entry_safe(pos, n, head, member) \ +- for (pos = list_entry((head)->q_forw, typeof(*pos), member), \ +- n = list_entry(pos->member.q_forw, typeof(*pos), member); \ ++ for (pos = list_entry((head)->next, typeof(*pos), member), \ ++ n = list_entry(pos->member.next, typeof(*pos), member); \ + &pos->member != (head); \ +- pos = n, n = list_entry(n->member.q_forw, typeof(*n), member)) ++ pos = n, n = list_entry(n->member.next, typeof(*n), member)) ++ ++static inline void __list_add(struct list_head *new, ++ struct list_head *prev, ++ struct list_head *next) ++{ ++ next->prev = new; ++ new->next = next; ++ new->prev = prev; ++ prev->next = new; ++} ++ ++static inline void list_add(struct list_head *new, struct list_head *head) ++{ ++ __list_add(new, head, head->next); ++} ++ ++static inline void list_add_tail(struct list_head *new, struct list_head *head) ++{ ++ __list_add(new, head->prev, head); ++} ++ ++static inline void __list_del(struct list_head * prev, struct list_head * next) ++{ ++ next->prev = prev; ++ prev->next = next; ++} ++ ++static inline void list_del(struct list_head *entry) ++{ ++ __list_del(entry->prev, entry->next); ++ entry->next = entry->prev = NULL; ++} ++ ++static inline void list_del_init(struct list_head *entry) ++{ ++ __list_del(entry->prev, entry->next); ++ INIT_LIST_HEAD(entry); ++} + + #ifndef IPV6_V6ONLY + #define IPV6_V6ONLY 26 +diff --git a/usr/plain.c b/usr/plain.c +index e653fbf..4210e11 100644 +--- a/usr/plain.c ++++ b/usr/plain.c +@@ -31,7 +31,7 @@ + */ + + struct user { +- struct qelem ulist; ++ struct list_head ulist; + + u32 tid; + char *name; +@@ -62,18 +62,18 @@ static struct iscsi_key user_keys[] = { + {NULL,}, + }; + +-static struct qelem discovery_users_in = LIST_HEAD_INIT(discovery_users_in); +-static struct qelem discovery_users_out = LIST_HEAD_INIT(discovery_users_out); ++static LIST_HEAD(discovery_users_in); ++static LIST_HEAD(discovery_users_out); + + #define HASH_ORDER 4 + #define acct_hash(x) ((x) & ((1 << HASH_ORDER) - 1)) + +-static struct qelem trgt_acct_in[1 << HASH_ORDER]; +-static struct qelem trgt_acct_out[1 << HASH_ORDER]; ++static struct list_head trgt_acct_in[1 << HASH_ORDER]; ++static struct list_head trgt_acct_out[1 << HASH_ORDER]; + +-static struct qelem *account_list_get(u32 tid, int dir) ++static struct list_head *account_list_get(u32 tid, int dir) + { +- struct qelem *list = NULL; ++ struct list_head *list = NULL; + + if (tid) { + list = (dir == AUTH_DIR_INCOMING) ? +@@ -125,7 +125,7 @@ static int plain_account_init(char *filename) + /* Return the first account if the length of name is zero */ + static struct user *account_lookup_by_name(u32 tid, int dir, char *name) + { +- struct qelem *list = account_list_get(tid, dir); ++ struct list_head *list = account_list_get(tid, dir); + struct user *user = NULL; + + list_for_each_entry(user, list, ulist) { +@@ -160,7 +160,7 @@ static void account_destroy(struct user *user) + { + if (!user) + return; +- remque(&user->ulist); ++ list_del(&user->ulist); + free(user->name); + free(user->password); + free(user); +@@ -196,7 +196,7 @@ static int plain_account_add(u32 tid, int dir, char *name, char *pass) + { + int err = -ENOMEM; + struct user *user; +- struct qelem *list; ++ struct list_head *list; + + if (!name || !pass) + return -EINVAL; +@@ -220,11 +220,11 @@ static int plain_account_add(u32 tid, int dir, char *name, char *pass) + " Replacing the old one.\n", + tid ? "target" : "discovery"); + +- old = (struct user *) list->q_forw; ++ old = list_first_entry(list, struct user, ulist); + account_destroy(old); + } + +- insque(user, list); ++ list_add(&user->ulist, list); + + /* update the file here. */ + return 0; +diff --git a/usr/session.c b/usr/session.c +index cbd681c..0a9714e 100644 +--- a/usr/session.c ++++ b/usr/session.c +@@ -29,7 +29,7 @@ static struct session *session_alloc(u32 tid) + + session->target = target; + INIT_LIST_HEAD(&session->slist); +- insque(&session->slist, &target->sessions_list); ++ list_add(&session->slist, &target->sessions_list); + + return session; + } +@@ -157,7 +157,7 @@ void session_remove(struct session *session) + ki->session_destroy(session->target->tid, session->sid.id64); + + if (session->target) { +- remque(&session->slist); ++ list_del(&session->slist); + /* session->target->nr_sessions--; */ + } + +diff --git a/usr/target.c b/usr/target.c +index 467cbc4..ad94e6d 100644 +--- a/usr/target.c ++++ b/usr/target.c +@@ -14,7 +14,7 @@ + + #include "iscsid.h" + +-struct qelem targets_list = LIST_HEAD_INIT(targets_list); ++LIST_HEAD(targets_list); + + void target_list_build(struct connection *conn, char *addr, char *name) + { +@@ -83,7 +83,7 @@ int target_del(u32 tid) + if ((err = ki->target_destroy(tid)) < 0) + return err; + +- remque(&target->tlist); ++ list_del(&target->tlist); + + if (!list_empty(&target->sessions_list)) { + fprintf(stderr, "%s still have sessions %d\n", __FUNCTION__, tid); +@@ -122,7 +122,7 @@ int target_add(u32 *tid, char *name) + INIT_LIST_HEAD(&target->sessions_list); + INIT_LIST_HEAD(&target->isns_head); + target->tid = *tid; +- insque(&target->tlist, &targets_list); ++ list_add(&target->tlist, &targets_list); + + isns_target_register(name); + diff --git a/sys-block/iscsitarget/iscsitarget-0.4.16.ebuild b/sys-block/iscsitarget/iscsitarget-0.4.16.ebuild new file mode 100644 index 000000000000..4e774b99465d --- /dev/null +++ b/sys-block/iscsitarget/iscsitarget-0.4.16.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/iscsitarget-0.4.16.ebuild,v 1.1 2008/06/14 08:18:53 flameeyes Exp $ + +inherit linux-mod eutils flag-o-matic + +DESCRIPTION="Open Source iSCSI target with professional features" +HOMEPAGE="http://iscsitarget.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +DEPEND="dev-libs/openssl" + +MODULE_NAMES="iscsi_trgt(kernel/iscsi:${S}/kernel)" +CONFIG_CHECK="CRYPTO_CRC32C" +ERROR_CFG="iscsitarget needs support for CRC32C in your kernel." + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PN}-0.4.15-isns-set-scn-flag.patch #180619 + epatch "${FILESDIR}"/${PN}-0.4.15-build.patch + epatch "${FILESDIR}"/${P}+glibc-2.8-lists.patch + convert_to_m "${S}"/Makefile +} + +src_compile() { + local save_CFLAGS="${CFLAGS}" + append-flags -D_GNU_SOURCE + emake usr || die "failed to build userspace" + CFLAGS="${save_CFLAGS}" + + unset ARCH + emake KSRC="${KERNEL_DIR}" kernel || die "failed to build module" +} + +src_install() { + einfo "Installing userspace" + dosbin usr/ietd usr/ietadm || die "dosbin failed" + insinto /etc + doins etc/ietd.conf etc/initiators.{allow,deny} || die "doins failed" + # Upstream's provided Gentoo init script is out of date compared to + # their Debian init script. And isn't that nice. + #newinitd etc/initd/initd.gentoo ietd || die + newinitd "${FILESDIR}"/ietd-init.d ietd || die "newinitd failed" + newconfd "${FILESDIR}"/ietd-conf.d ietd || die "newconfd failed" + + # Lock down perms, per bug 198209 + fperms 0640 /etc/ietd.conf /etc/initiators.{allow,deny} + + doman doc/manpages/*.[1-9] || die "manpages failed" + dodoc ChangeLog README || die "docs failed" + + einfo "Installing kernel module" + unset ARCH + linux-mod_src_install || die "modules failed" +} |