diff options
author | Kevin Hao <kexin.hao@windriver.com> | 2016-06-09 07:25:34 +0800 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2016-06-10 12:33:32 -0400 |
commit | 4e1b08670997b79cd6741be316499bd38b61f8ef (patch) | |
tree | 04fedb8b5ca30079b65fc6d2b8af2b4a2b34360f /meta-openstack | |
parent | e2e920747f0bb3b41def94c7c462fa908aebd9b2 (diff) | |
download | meta-cloud-services-4e1b08670997b79cd6741be316499bd38b61f8ef.tar.gz |
Remove the duplicated recipe of iscsi-initiator-utils
The iscsi-initiator-utils recipe has already been integrated into
meta-networking layer. We have no reason to keep a duplicated one
in meta-cloud-services layer. It also kill two QA warnings caused
by this recipe.
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack')
5 files changed, 0 insertions, 501 deletions
diff --git a/meta-openstack/recipes-extended/iscsi-initiator-utils/files/initd.debian b/meta-openstack/recipes-extended/iscsi-initiator-utils/files/initd.debian deleted file mode 100644 index eb8eea7..0000000 --- a/meta-openstack/recipes-extended/iscsi-initiator-utils/files/initd.debian +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | #! /bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: | ||
4 | # Required-Start: | ||
5 | # Required-Stop: | ||
6 | # Default-Start: | ||
7 | # Default-Stop: | ||
8 | # Short-Description: Starts and stops the iSCSI initiator services and logins to default targets | ||
9 | ### END INIT INFO | ||
10 | #set -x | ||
11 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
12 | DAEMON=/sbin/iscsid | ||
13 | ADM=/sbin/iscsiadm | ||
14 | PIDFILE=/var/run/iscsid.pid | ||
15 | |||
16 | [ -x "$DAEMON" ] || exit 0 | ||
17 | |||
18 | if [ ! -d /sys/class/ ]; then | ||
19 | echo "Failure:" "iSCSI requires a mounted sysfs, not started." | ||
20 | exit 1 | ||
21 | fi | ||
22 | |||
23 | nodestartup_re='s/^node\.conn\[0]\.startup[ ]*=[ ]*//p' | ||
24 | |||
25 | RETVAL=0 | ||
26 | |||
27 | start() { | ||
28 | echo "Starting iSCSI initiator service" "iscsid" | ||
29 | modprobe -q iscsi_tcp 2>/dev/null || : | ||
30 | modprobe -q ib_iser 2>/dev/null || : | ||
31 | if [ ! -f /etc/iscsi/initiatorname.iscsi ]; then | ||
32 | INITIATORNAME=$(iscsi-iname) | ||
33 | cat >/etc/iscsi/initiatorname.iscsi <<EOF | ||
34 | ## DO NOT EDIT OR REMOVE THIS FILE! | ||
35 | ## If you remove this file, the iSCSI daemon will not start. | ||
36 | ## If you change the InitiatorName, existing access control lists | ||
37 | ## may reject this initiator. The InitiatorName must be unique | ||
38 | ## for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames. | ||
39 | InitiatorName=$INITIATORNAME | ||
40 | EOF | ||
41 | fi | ||
42 | start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON | ||
43 | RETVAL=$? | ||
44 | starttargets | ||
45 | } | ||
46 | |||
47 | starttargets() { | ||
48 | echo "Setting up iSCSI targets" | ||
49 | $ADM -m node --loginall=automatic | ||
50 | } | ||
51 | |||
52 | stoptargets() { | ||
53 | echo "Disconnecting iSCSI targets" | ||
54 | sync | ||
55 | $ADM -m node --logoutall=all | ||
56 | RETVAL=$? | ||
57 | #if RETVAL is 21, means no active sessions, consider ok | ||
58 | if [ "$RETVAL" = "21" ]; then | ||
59 | RETVAL=0 | ||
60 | fi | ||
61 | } | ||
62 | |||
63 | stop() { | ||
64 | stoptargets | ||
65 | if [ $RETVAL -ne 0 ]; then | ||
66 | echo "Failure:" "Could not stop all targets, try again later" | ||
67 | return $RETVAL | ||
68 | fi | ||
69 | |||
70 | echo "Stopping iSCSI initiator service" | ||
71 | start-stop-daemon --stop --quiet --pidfile $PIDFILE --exec $DAEMON | ||
72 | rm -f $PIDFILE | ||
73 | status=0 | ||
74 | modprobe -r ib_iser 2>/dev/null | ||
75 | if [ "$?" -ne "0" -a "$?" -ne "1" ]; then | ||
76 | status=1 | ||
77 | fi | ||
78 | modprobe -r iscsi_tcp 2>/dev/null | ||
79 | if [ "$?" -ne "0" -a "$?" -ne "1" ]; then | ||
80 | status=1 | ||
81 | fi | ||
82 | } | ||
83 | |||
84 | restart() { | ||
85 | stop | ||
86 | if [ $RETVAL -ne 0 ]; then | ||
87 | echo "Failure:" "Stopping iSCSI initiator service failed, not starting" | ||
88 | return $RETVAL | ||
89 | fi | ||
90 | start | ||
91 | } | ||
92 | |||
93 | restarttargets() { | ||
94 | stoptargets | ||
95 | if [ $RETVAL -ne 0 ]; then | ||
96 | echo "Failure:" "Could not stop all targets, try again later" | ||
97 | return $RETVAL | ||
98 | fi | ||
99 | starttargets | ||
100 | } | ||
101 | |||
102 | status() { | ||
103 | #XXX FIXME: what to do here? | ||
104 | #status iscsid | ||
105 | # list active sessions | ||
106 | echo Current active iSCSI sessions: | ||
107 | $ADM -m session | ||
108 | } | ||
109 | |||
110 | case "$1" in | ||
111 | start|starttargets|stop|stoptargets|restart|restarttargets|status) | ||
112 | $1 | ||
113 | ;; | ||
114 | *) | ||
115 | echo "Usage: $0 {start|stop|restart|status}" | ||
116 | exit 1 | ||
117 | ;; | ||
118 | esac | ||
119 | exit $RETVAL | ||
diff --git a/meta-openstack/recipes-extended/iscsi-initiator-utils/files/iscsi-initiator-utils-dont-use-static.patch b/meta-openstack/recipes-extended/iscsi-initiator-utils/files/iscsi-initiator-utils-dont-use-static.patch deleted file mode 100644 index 8645587..0000000 --- a/meta-openstack/recipes-extended/iscsi-initiator-utils/files/iscsi-initiator-utils-dont-use-static.patch +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | iscsi-initiator-utils not to use static | ||
2 | |||
3 | This patch is from fedora17. | ||
4 | |||
5 | Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | ||
6 | Signed-off-by: Vu Tran <vu.tran@windriver.com> | ||
7 | |||
8 | diff --git a/usr/Makefile b/usr/Makefile | ||
9 | index 673b7f1..fd14a10 100644 | ||
10 | --- a/usr/Makefile | ||
11 | +++ b/usr/Makefile | ||
12 | @@ -61,7 +61,7 @@ iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o | ||
13 | |||
14 | iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \ | ||
15 | iscsistart.o statics.o | ||
16 | - $(CC) $(CFLAGS) -static $^ -o $@ | ||
17 | + $(CC) $(CFLAGS) $^ -o $@ | ||
18 | clean: | ||
19 | rm -f *.o $(PROGRAMS) .depend $(LIBSYS) | ||
20 | |||
diff --git a/meta-openstack/recipes-extended/iscsi-initiator-utils/files/iscsi-initiator-utils-use-var-for-config.patch b/meta-openstack/recipes-extended/iscsi-initiator-utils/files/iscsi-initiator-utils-use-var-for-config.patch deleted file mode 100644 index b0ce889..0000000 --- a/meta-openstack/recipes-extended/iscsi-initiator-utils/files/iscsi-initiator-utils-use-var-for-config.patch +++ /dev/null | |||
@@ -1,239 +0,0 @@ | |||
1 | iscsi-initiator-utils to use var for config | ||
2 | |||
3 | This patch is from fedora. | ||
4 | |||
5 | Use /var/lib/iscsi/ instead of /etc/iscsi/ for holding | ||
6 | state files. | ||
7 | |||
8 | Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | ||
9 | Signed-off-by: Vu Tran <vu.tran@windriver.com> | ||
10 | |||
11 | diff --git a/README b/README | ||
12 | index 7364b2d..5e8bff8 100644 | ||
13 | --- a/README | ||
14 | +++ b/README | ||
15 | @@ -164,10 +164,10 @@ available on all Linux installations. | ||
16 | |||
17 | The database contains two tables: | ||
18 | |||
19 | -- Discovery table (/etc/iscsi/send_targets); | ||
20 | -- Node table (/etc/iscsi/nodes). | ||
21 | +- Discovery table (/var/lib/iscsi/send_targets); | ||
22 | +- Node table (/var/lib/iscsi/nodes). | ||
23 | |||
24 | -The regular place for iSCSI database files: /etc/iscsi/nodes | ||
25 | +The regular place for iSCSI database files: /var/lib/iscsi/nodes | ||
26 | |||
27 | The iscsiadm utility is a command-line tool to manage (update, delete, | ||
28 | insert, query) the persistent database. | ||
29 | @@ -444,7 +444,7 @@ a scsi_host per HBA port). | ||
30 | To manage both types of initiator stacks, iscsiadm uses the interface (iface) | ||
31 | structure. For each HBA port or for software iscsi for each network | ||
32 | device (ethX) or NIC, that you wish to bind sessions to you must create | ||
33 | -a iface config /etc/iscsi/ifaces. | ||
34 | +a iface config /var/lib/iscsi/ifaces. | ||
35 | |||
36 | Prep: | ||
37 | |||
38 | @@ -478,29 +478,29 @@ Running: | ||
39 | iface0 qla4xxx,00:c0:dd:08:63:e8,20.15.0.7,default,iqn.2005-06.com.redhat:madmax | ||
40 | iface1 qla4xxx,00:c0:dd:08:63:ea,20.15.0.9,default,iqn.2005-06.com.redhat:madmax | ||
41 | |||
42 | -Will report iface configurations that are setup in /etc/iscsi/ifaces. | ||
43 | +Will report iface configurations that are setup in /var/lib/iscsi/ifaces. | ||
44 | The format is: | ||
45 | |||
46 | iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname | ||
47 | |||
48 | For software iscsi, you can create the iface configs by hand, but it is | ||
49 | reccomended that you use iscsiadm's iface mode. There is a iface.example in | ||
50 | -/etc/iscsi/ifaces which can be used as a template for the daring. | ||
51 | +/var/lib/iscsi/ifaces which can be used as a template for the daring. | ||
52 | |||
53 | For each network object you wish to bind a session to you must create | ||
54 | -a seperate iface config in /etc/iscsi/ifaces and each iface config file | ||
55 | +a seperate iface config in /var/lib/iscsi/ifaces and each iface config file | ||
56 | must have a unique name which is less than or equal to 64 characters. | ||
57 | |||
58 | Example: | ||
59 | |||
60 | If you have NIC1 with MAC address 00:0F:1F:92:6B:BF and NIC2 with | ||
61 | MAC address 00:C0:DD:08:63:E7 and you wanted to do software iscsi over | ||
62 | -TCP/IP. Then in /etc/iscsi/ifaces/iface0 you would enter: | ||
63 | +TCP/IP. Then in /var/lib/iscsi/ifaces/iface0 you would enter: | ||
64 | |||
65 | iface.transport_name = tcp | ||
66 | iface.hwaddress = 00:0F:1F:92:6B:BF | ||
67 | |||
68 | -and in /etc/iscsi/ifaces/iface1 you would enter: | ||
69 | +and in /var/lib/iscsi/ifaces/iface1 you would enter: | ||
70 | |||
71 | iface.transport_name = tcp | ||
72 | iface.hwaddress = 00:C0:DD:08:63:E7 | ||
73 | @@ -550,7 +550,7 @@ cxgb3i.00:07:43:05:97:07 cxgb3i,00:07:43:05:97:07,<empty>,<empty>,<empty> | ||
74 | qla4xxx.00:0e:1e:04:8b:2e qla4xxx,00:0e:1e:04:8b:2e,<empty>,<empty>,<empty> | ||
75 | |||
76 | |||
77 | -Will report iface configurations that are setup in /etc/iscsi/ifaces. | ||
78 | +Will report iface configurations that are setup in /var/lib/iscsi/ifaces. | ||
79 | The format is: | ||
80 | |||
81 | iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname | ||
82 | @@ -636,7 +636,7 @@ need a seperate network connection to the target for discovery purposes. | ||
83 | *This will be fixed in the next version of open-iscsi* | ||
84 | |||
85 | For compatibility reasons, when you run iscsiadm to do discovery, it | ||
86 | -will check for interfaces in /etc/iscsi/iscsi/ifaces that are using | ||
87 | +will check for interfaces in /var/lib/iscsi/iscsi/ifaces that are using | ||
88 | tcp for the iface.transport and it will bind the portals that are discovered | ||
89 | so that they will be logged in through those ifaces. This behavior can also | ||
90 | be overriden by passing in the interfaces you want to use. For the case | ||
91 | @@ -654,7 +654,7 @@ we do not bind a session to a iface, then you can use the special iface | ||
92 | |||
93 | iscsiadm -m discoverydb -t st -p ip:port -I default --discover -P 1 | ||
94 | |||
95 | -And if you did not define any interfaces in /etc/iscsi/ifaces and do | ||
96 | +And if you did not define any interfaces in /var/lib/iscsi/ifaces and do | ||
97 | not pass anything into iscsiadm, running iscsiadm will do the default | ||
98 | behavior, where we allow the network subsystem to decide which | ||
99 | device to use. | ||
100 | @@ -696,7 +696,7 @@ To now log into targets it is the same as with sofware iscsi. See section | ||
101 | |||
102 | ./iscsiadm -m discoverydb -t st -p 192.168.1.1:3260 --discover | ||
103 | |||
104 | - This will search /etc/iscsi/send_targets for a record with the | ||
105 | + This will search /var/lib/iscsi/send_targets for a record with the | ||
106 | ID [portal = 192.168.1.1:3260 and type = sendtargets. If found it | ||
107 | will perform discovery using the settings stored in the record. | ||
108 | If a record does not exist, it will be created using the iscsid.conf | ||
109 | @@ -705,7 +705,7 @@ To now log into targets it is the same as with sofware iscsi. See section | ||
110 | The argument to -p may also be a hostname instead of an address. | ||
111 | ./iscsiadm -m discoverydb -t st -p smoehost --discover | ||
112 | |||
113 | - For the ifaces, iscsiadm will first search /etc/iscsi/ifaces for | ||
114 | + For the ifaces, iscsiadm will first search /var/lib/iscsi/ifaces for | ||
115 | interfaces using software iscsi. If any are found then nodes found | ||
116 | during discovery will be setup so that they can logged in through | ||
117 | those interfaces. To specify a specific iface, pass the | ||
118 | @@ -761,7 +761,7 @@ To now log into targets it is the same as with sofware iscsi. See section | ||
119 | This command will perform discovery, but not manipulate the node DB. | ||
120 | |||
121 | - SendTargets iSCSI Discovery with a specific interface. If you | ||
122 | - wish to only use a subset of the interfaces in /etc/iscsi/ifaces | ||
123 | + wish to only use a subset of the interfaces in /var/lib/iscsi/ifaces | ||
124 | then you can pass them in during discovery: | ||
125 | |||
126 | ./iscsiadm -m discoverydb -t sendtargets -p 192.168.1.1:3260 \ | ||
127 | @@ -1072,8 +1072,8 @@ where targetname is the name of the target and ip_address:port is the address | ||
128 | and port of the portal. tpgt, is the portal group tag of | ||
129 | the portal, and is not used in iscsiadm commands except for static | ||
130 | record creation. And iface name is the name of the iscsi interface | ||
131 | -defined in /etc/iscsi/ifaces. If no interface was defined in | ||
132 | -/etc/iscsi/ifaces or passed in, the default behavior is used. | ||
133 | +defined in /var/lib/iscsi/ifaces. If no interface was defined in | ||
134 | +/var/lib/iscsi/ifaces or passed in, the default behavior is used. | ||
135 | Default here is iscsi_tcp/tcp to be used over which ever NIC the | ||
136 | network layer decides is best. | ||
137 | |||
138 | @@ -1188,7 +1188,7 @@ If set, iscsid will perform discovery to the address every | ||
139 | discovery.isns.discoveryd_poll_inval or | ||
140 | discovery.sendtargets.discoveryd_poll_inval seconds, | ||
141 | and it will log into any portals found from the discovery source using | ||
142 | -the ifaces in /etc/iscsi/ifaces. | ||
143 | +the ifaces in /var/lib/iscsi/ifaces. | ||
144 | |||
145 | Note that for iSNS the poll_interval does not have to be set. If not set, | ||
146 | iscsid will only perform rediscovery when it gets a SCN from the server. | ||
147 | diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8 | ||
148 | index 7c209f6..e94cca0 100644 | ||
149 | --- a/doc/iscsiadm.8 | ||
150 | +++ b/doc/iscsiadm.8 | ||
151 | @@ -89,7 +89,7 @@ This option is only valid for ping submode. | ||
152 | .TP | ||
153 | \fB\-I\fR, \fB\-\-interface=\fI[iface]\fR | ||
154 | The interface argument specifies the iSCSI interface to use for the operation. | ||
155 | -iSCSI interfaces (iface) are defined in /etc/iscsi/ifaces. For hardware | ||
156 | +iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces. For hardware | ||
157 | iSCSI (qla4xxx) the iface config must have the hardware address | ||
158 | (iface.hwaddress = port's MAC address) | ||
159 | and the driver/transport_name (iface.transport_name). The iface's name is | ||
160 | @@ -166,7 +166,7 @@ If no other options are specified: for \fIdiscoverydb\fR and \fInode\fR, all | ||
161 | of their respective records are displayed; for \fIsession\fR, all active | ||
162 | sessions and connections are displayed; for \fIfw\fR, all boot firmware | ||
163 | values are displayed; for \fIhost\fR, all iSCSI hosts are displayed; and | ||
164 | -for \fIiface\fR, all ifaces setup in /etc/iscsi/ifaces are displayed. | ||
165 | +for \fIiface\fR, all ifaces setup in /var/lib/iscsi/ifaces are displayed. | ||
166 | |||
167 | .TP | ||
168 | \fB\-n\fR, \fB\-\-name=\fIname\fR | ||
169 | @@ -535,10 +535,10 @@ The configuration file read by \fBiscsid\fR and \fBiscsiadm\fR on startup. | ||
170 | The file containing the iSCSI InitiatorName and InitiatorAlias read by | ||
171 | \fBiscsid\fR and \fBiscsiadm\fR on startup. | ||
172 | .TP | ||
173 | -/etc/iscsi/nodes/ | ||
174 | +/var/lib/iscsi/nodes/ | ||
175 | This directory contains the nodes with their targets. | ||
176 | .TP | ||
177 | -/etc/iscsi/send_targets | ||
178 | +/var/lib/iscsi/send_targets | ||
179 | This directory contains the portals. | ||
180 | |||
181 | .SH "SEE ALSO" | ||
182 | diff --git a/usr/idbm.c b/usr/idbm.c | ||
183 | index 4d30aa9..316e54f 100644 | ||
184 | --- a/usr/idbm.c | ||
185 | +++ b/usr/idbm.c | ||
186 | @@ -2468,9 +2468,9 @@ free_info: | ||
187 | int idbm_init(idbm_get_config_file_fn *fn) | ||
188 | { | ||
189 | /* make sure root db dir is there */ | ||
190 | - if (access(ISCSI_CONFIG_ROOT, F_OK) != 0) { | ||
191 | - if (mkdir(ISCSI_CONFIG_ROOT, 0660) != 0) { | ||
192 | - log_error("Could not make %s %d\n", ISCSI_CONFIG_ROOT, | ||
193 | + if (access(ISCSIVAR, F_OK) != 0) { | ||
194 | + if (mkdir(ISCSIVAR, 0660) != 0) { | ||
195 | + log_error("Could not make %s %d\n", ISCSIVAR, | ||
196 | errno); | ||
197 | return errno; | ||
198 | } | ||
199 | diff --git a/usr/idbm.h b/usr/idbm.h | ||
200 | index 245f046..f45e86e 100644 | ||
201 | --- a/usr/idbm.h | ||
202 | +++ b/usr/idbm.h | ||
203 | @@ -28,12 +28,16 @@ | ||
204 | #include "config.h" | ||
205 | #include "list.h" | ||
206 | |||
207 | -#define NODE_CONFIG_DIR ISCSI_CONFIG_ROOT"nodes" | ||
208 | -#define SLP_CONFIG_DIR ISCSI_CONFIG_ROOT"slp" | ||
209 | -#define ISNS_CONFIG_DIR ISCSI_CONFIG_ROOT"isns" | ||
210 | -#define STATIC_CONFIG_DIR ISCSI_CONFIG_ROOT"static" | ||
211 | -#define FW_CONFIG_DIR ISCSI_CONFIG_ROOT"fw" | ||
212 | -#define ST_CONFIG_DIR ISCSI_CONFIG_ROOT"send_targets" | ||
213 | +#define ISCSIVAR "/var/lib/iscsi/" | ||
214 | + | ||
215 | +#define NODE_CONFIG_DIR ISCSIVAR"nodes" | ||
216 | +#define SLP_CONFIG_DIR ISCSIVAR"slp" | ||
217 | +#define ISNS_CONFIG_DIR ISCSIVAR"isns" | ||
218 | +#define STATIC_CONFIG_DIR ISCSIVAR"static" | ||
219 | +#define FW_CONFIG_DIR ISCSIVAR"fw" | ||
220 | +#define ST_CONFIG_DIR ISCSIVAR"send_targets" | ||
221 | + | ||
222 | + | ||
223 | #define ST_CONFIG_NAME "st_config" | ||
224 | #define ISNS_CONFIG_NAME "isns_config" | ||
225 | |||
226 | diff --git a/usr/iface.h b/usr/iface.h | ||
227 | index 01f7074..2c6ef72 100644 | ||
228 | --- a/usr/iface.h | ||
229 | +++ b/usr/iface.h | ||
230 | @@ -20,7 +20,8 @@ | ||
231 | #ifndef ISCSI_IFACE_H | ||
232 | #define ISCSI_IFACE_H | ||
233 | |||
234 | -#define IFACE_CONFIG_DIR ISCSI_CONFIG_ROOT"ifaces" | ||
235 | +#include "idbm.h" | ||
236 | +#define IFACE_CONFIG_DIR ISCSIVAR"ifaces" | ||
237 | |||
238 | struct iface_rec; | ||
239 | struct list_head; | ||
diff --git a/meta-openstack/recipes-extended/iscsi-initiator-utils/iscsi-initiator-utils.inc b/meta-openstack/recipes-extended/iscsi-initiator-utils/iscsi-initiator-utils.inc deleted file mode 100644 index 30dcffc..0000000 --- a/meta-openstack/recipes-extended/iscsi-initiator-utils/iscsi-initiator-utils.inc +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | # | ||
2 | # Copyright (C) 2014 Wind River Systems, Inc. | ||
3 | # | ||
4 | SUMMARY = "iSCSI daemon and utility programs" | ||
5 | DESCRIPTION = \ | ||
6 | "Open-iSCSI project is a high performance, transport independent, \ | ||
7 | multi-platform implementation of RFC3720. The iscsi package provides \ | ||
8 | the server daemon for the iSCSI protocol, as well as the utility \ | ||
9 | programs used to manage it. iSCSI is a protocol for distributed \ | ||
10 | disk access using SCSI commands sent over Internet Protocol networks." | ||
11 | SECTION = "console/network" | ||
12 | |||
13 | HOMEPAGE = "http://www.open-iscsi.org/" | ||
14 | INC_PR = "r4" | ||
15 | |||
16 | UPSTREAM_name = "open-iscsi" | ||
17 | |||
18 | #iscsi-initiator-utils-{use-var-for-config}.patch are from fedora | ||
19 | #change nodes,send_targets... from /etc/iscsi to /var/lib/iscsi | ||
20 | SRC_URI = "http://www.open-iscsi.org/bits/${UPSTREAM_name}-${PV}.tar.gz \ | ||
21 | file://iscsi-initiator-utils-use-var-for-config.patch \ | ||
22 | file://iscsi-initiator-utils-dont-use-static.patch \ | ||
23 | file://initd.debian \ | ||
24 | " | ||
25 | S = "${WORKDIR}/${UPSTREAM_name}-${PV}" | ||
26 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
27 | |||
28 | #utils/fwparam_ibft/prom_parse.y utils/fwparam_ibft/prom_lex.l | ||
29 | #already parsed in source 2.0 but still depends on flex and bison | ||
30 | #native in case future version they are not parsed | ||
31 | DEPENDS += "openssl flex-native bison-native" | ||
32 | |||
33 | PACKAGES =+ "${PN}-tests" | ||
34 | |||
35 | FILES_${PN}-tests = "/opt/${BPN}-tests/*" | ||
36 | RDEPENDS_${PN}-tests = "perl" | ||
37 | |||
38 | inherit update-rc.d | ||
39 | |||
40 | do_configure () { | ||
41 | #need to support cross-compiling in open-isns only | ||
42 | (cd utils/open-isns; \ | ||
43 | ./configure --host=${TARGET_SYS} --build=${BUILD_SYS} --with-security=no ) | ||
44 | } | ||
45 | |||
46 | do_compile () { | ||
47 | #make iscsistart one of PROGRAMS if install_user in do_install | ||
48 | #sed -i -e '/^PROGRAMS = /s;$; usr/iscsistart;' Makefile | ||
49 | |||
50 | #fix the ar used in open-isns | ||
51 | sed -i -e 's:ar cr :$(AR) cr :' ${S}/utils/open-isns/Makefile | ||
52 | oe_runmake user | ||
53 | |||
54 | } | ||
55 | |||
56 | do_install () { | ||
57 | #completely override the install_user as bugs in Makefile | ||
58 | #oe_runmake DESTDIR="${D}" install_user | ||
59 | |||
60 | #install necessary directories | ||
61 | install -d ${D}${base_sbindir} \ | ||
62 | ${D}${sysconfdir}/init.d \ | ||
63 | ${D}${sysconfdir}/iscsi \ | ||
64 | ${D}${localstatedir}/lib/iscsi/nodes \ | ||
65 | ${D}${localstatedir}/lib/iscsi/send_targets \ | ||
66 | ${D}${localstatedir}/lib/iscsi/static \ | ||
67 | ${D}${localstatedir}/lib/iscsi/isns \ | ||
68 | ${D}${localstatedir}/lib/iscsi/slp \ | ||
69 | ${D}${localstatedir}/lib/iscsi/ifaces \ | ||
70 | ${D}${localstatedir}/lock/iscsi ${D}/${mandir}/man8 | ||
71 | |||
72 | install -p -m 755 ${S}/usr/iscsid ${S}/usr/iscsiadm \ | ||
73 | ${S}/utils/iscsi-iname \ | ||
74 | ${S}/usr/iscsistart ${D}/${base_sbindir} | ||
75 | |||
76 | install -p -m 644 ${S}/doc/iscsiadm.8 ${S}/doc/iscsid.8 ${D}/${mandir}/man8 | ||
77 | install -p -m 644 ${S}/etc/iscsid.conf ${D}${sysconfdir}/iscsi | ||
78 | install -p -m 755 ${WORKDIR}/initd.debian ${D}${sysconfdir}/init.d/iscsid | ||
79 | |||
80 | #install regression tests | ||
81 | [ ! -d ${D}/opt/${BPN}-tests ] && mkdir -p ${D}/opt/${BPN}-tests | ||
82 | install ${S}/test/regression.dat ${S}/test/regression.sh ${D}/opt/${BPN}-tests/ | ||
83 | |||
84 | #open-isns tests | ||
85 | mkdir -p ${D}/opt/${BPN}-tests/isns-tests | ||
86 | install ${S}/utils/open-isns/tests/*.pl ${D}/opt/${BPN}-tests/isns-tests/ | ||
87 | install ${S}/utils/open-isns/tests/genkey \ | ||
88 | ${S}/utils/open-isns/tests/client.conf \ | ||
89 | ${S}/utils/open-isns/tests/server.conf \ | ||
90 | ${D}/opt/${BPN}-tests/isns-tests/ | ||
91 | cp -a ${S}/utils/open-isns/tests/data ${D}/opt/${BPN}-tests/isns-tests/ | ||
92 | } | ||
93 | |||
94 | pkg_postinst_${PN}() { | ||
95 | #default there is no initiatorname.iscsi installed | ||
96 | #but it is needed or iscsid will fail | ||
97 | |||
98 | #will run only when postinst on target | ||
99 | if [ "x$D" != "x" ]; then | ||
100 | exit 1 | ||
101 | fi | ||
102 | if [ ! -f ${sysconfdir}/iscsi/initiatorname.iscsi ]; then | ||
103 | echo "InitiatorName=$(${base_sbindir}/iscsi-iname)" > \ | ||
104 | ${sysconfdir}/iscsi/initiatorname.iscsi | ||
105 | fi | ||
106 | } | ||
107 | |||
108 | INITSCRIPT_NAME = "iscsid" | ||
109 | INITSCRIPT_PARAMS = "start 30 1 2 3 4 5 . stop 70 0 1 2 3 4 5 6 ." | ||
diff --git a/meta-openstack/recipes-extended/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb b/meta-openstack/recipes-extended/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb deleted file mode 100644 index cb7429d..0000000 --- a/meta-openstack/recipes-extended/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | # | ||
2 | # Copyright (C) 2014 Wind River Systems, Inc. | ||
3 | # | ||
4 | LICENSE = "GPLv2 & LGPLv2.1" | ||
5 | LIC_FILES_CHKSUM = \ | ||
6 | "file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \ | ||
7 | file://utils/open-isns/COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" | ||
8 | |||
9 | PR = "${INC_PR}.0" | ||
10 | |||
11 | SRC_URI[md5sum] = "8b8316d7c9469149a6cc6234478347f7" | ||
12 | SRC_URI[sha256sum] = "7dd9f2f97da417560349a8da44ea4fcfe98bfd5ef284240a2cc4ff8e88ac7cd9" | ||
13 | |||
14 | require ${PN}.inc | ||