iscsi-initiator-utils: add recipe file
PATCH 1/1 iscsi-initiator-utils: add recipe file
From: Roy Li <[email protected]>
The package provides the server daemon for the iSCSI protocol, as well as the utility programs used to manage it. iSCSI is a protocol for distributed disk access using SCSI commands sent over Internet Protocol networks
It's a fairly basic utility, so copy it from meta-cloud-service to meta-oe
--- .../files/99_iscsi-initiator-utils | 2 + .../iscsi-initiator-utils/files/initd.debian | 119 ++++++++++ .../iscsi-initiator-utils-dont-use-static.patch | 21 ++ .../iscsi-initiator-utils-use-var-for-config.patch | 240 ++++++++++++++++++++ .../iscsi-initiator-utils.inc | 112 +++++++++ .../iscsi-initiator-utils_2.0-873.bb | 9 + 6 files changed, 503 insertions(+) create mode 100644 meta-networking/recipes-daemons/iscsi-initiator-utils/files/99_iscsi-initiator-utils create mode 100644 meta-networking/recipes-daemons/iscsi-initiator-utils/files/initd.debian create mode 100644 meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-dont-use-static.patch create mode 100644 meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-use-var-for-config.patch create mode 100644 meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils.inc create mode 100644 meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
meta-networking/recipes-daemons/iscsi-initiator-utils/files/99_iscsi-initiator-utils new file +2 -0
@@ -0,0 +1,2 @@ +# <type> <owner> <group> <mode> <path> <linksource> +d root root 0755 /var/lock/iscsi none
meta-networking/recipes-daemons/iscsi-initiator-utils/files/initd.debian new file +119 -0
119 lines not on this page · raw message
meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-dont-use-static.patch new file +21 -0
@@ -0,0 +1,21 @@ +iscsi-initiator-utils not to use static + +Upstream-status: Backport +This patch is from fedora17. + +Signed-off-by: Yao Zhao <[email protected]> +Signed-off-by: Vu Tran <[email protected]> + +diff --git a/usr/Makefile b/usr/Makefile +index 673b7f1..fd14a10 100644 +--- a/usr/Makefile ++++ b/usr/Makefile +@@ -61,7 +61,7 @@ iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o + + iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \ + iscsistart.o statics.o +- $(CC) $(CFLAGS) -static $^ -o $@ ++ $(CC) $(CFLAGS) $^ -o $@ + clean: + rm -f *.o $(PROGRAMS) .depend $(LIBSYS) +
meta-networking/recipes-daemons/iscsi-initiator-utils/files/iscsi-initiator-utils-use-var-for-config.patch new file +240 -0
240 lines not on this page · raw message
meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils.inc new file +112 -0
112 lines not on this page · raw message
meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb new file +9 -0
@@ -0,0 +1,9 @@ +LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = \ + "file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \ + file://utils/open-isns/COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" + +SRC_URI[md5sum] = "8b8316d7c9469149a6cc6234478347f7" +SRC_URI[sha256sum] = "7dd9f2f97da417560349a8da44ea4fcfe98bfd5ef284240a2cc4ff8e88ac7cd9" + +require ${PN}.inc
Signature · 1 line
1.7.10.4
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[email protected] schreef op 24-09-14 07:42:
Quoted 11 lines
From: Roy Li <[email protected]>
The package provides the server daemon for the iSCSI protocol, as well as the utility programs used to manage it. iSCSI is a protocol for distributed disk access using SCSI commands sent over Internet Protocol networks
It's a fairly basic utility, so copy it from meta-cloud-service to meta-oe
Signed-off-by Roy Li <[email protected]> ---
[..]
Quoted 2 lines
+++
b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils.inc
Is
Quoted 1 line
there a specific reason to use an .inc+.bb instead of just a .bb?
Quoted 8 lines
(quoted diff) +1
-0@@ -0,0 +1,112 @@ +SUMMARY = "iSCSI daemon and utility programs" +DESCRIPTION = \ +"Open-iSCSI project is a high performance, transportindependent, \ +multi-platform implementation of RFC3720. The iscsi package provides \ +the server daemon for the iSCSI protocol, as well as the utility \ +programs used to manage it. iSCSI is a protocol for distributed \ +disk access using SCSI commands sent over Internet Protocol networks." +SECTION = "console/network" + +HOMEPAGE = "http://www.open-iscsi.org/" + +UPSTREAM_name = "open-iscsi"
This variable is not used in OE-core, remove it
Quoted 7 lines
+ +#iscsi-initiator-utils-{use-var-for-config}.patch are from fedora +#change nodes,send_targets... from
/etc/iscsito/var/lib/iscsi+SRC_URI = "http://www.open-iscsi.org/bits/${UPSTREAM_name}-${PV}.tar.gz \ + file://iscsi-initiator-utils-use-var-for-config.patch \ +
file://iscsi-initiator-utils-dont-use-static.patch \ +
file://initd.debian \ + file://99_iscsi-initiator-utils \ +" +S
= "${WORKDIR}/${UPSTREAM_name}-${PV}" +TARGET_CC_ARCH += "${LDFLAGS}"
Move TARGET_CC_ARCH to be right above do_configure
Quoted 4 lines
+ +#utils/fwparam_ibft/prom_parse.y utils/fwparam_ibft/prom_lex.l
(quoted diff) +2
-0+#already parsed in source 2.0 but still depends on flex and bison +#native in case future version they are not parsed +DEPENDS += "opensslflex-native bison-native"
DEPENDS goes at the top, somewhere between HOMEPAGE and SRC_URI
Quoted 2 lines
+ +PACKAGES =+ "${PN}-tests" + +FILES_${PN}-tests = "
/opt/${BPN}-tests/*" +RDEPENDS_${PN}-tests = "perl"
PACKAGES, FILES, R* go below do_install
Quoted 1 line
+ +inherit update-rc.d
inherits go above SRC_URI
Quoted 3 lines
+ +do_configure () { + #need to support cross-compiling in open-isns
only + (cd utils/open-isns; \ + ./configure --host=${TARGET_SYS}
--build=${BUILD_SYS} --with-security=no ) +}
You should run at least 'gnu-configize' if it's autotools based.
Quoted 21 lines
+ +do_compile () { + #make iscsistart one of PROGRAMS if
install_userindo_install+ #sed -i -e '/^PROGRAMS = /s;$; usr/iscsistart;'Makefile+ +
#fix the ar used in open-isns + sed -i -e 's:ar cr :$(AR) cr :'
${S}/utils/open-isns/Makefile +oe_runmakeuser + +} + +do_install () { +
#completely override theinstall_useras bugs inMakefile+ #oe_runmake
DESTDIR="${D}"install_user+ + #install necessary directories + install
-d ${D}${base_sbindir} \ + ${D}${sysconfdir}/init.d \ +
${D}${sysconfdir}/iscsi \ + ${D}${localstatedir}/lib/iscsi/nodes \ +
${D}${localstatedir}/lib/iscsi/send_targets \ + ${D}${localstatedir}/lib/iscsi/static \ + ${D}${localstatedir}/lib/iscsi/isns \ + ${D}${localstatedir}/lib/iscsi/slp \ +
${D}${localstatedir}/lib/iscsi/ifaces \ + ${D}/${mandir}/man8 + +
install -p -m 755 ${S}/usr/iscsid ${S}/usr/iscsiadm \ +
${S}/utils/iscsi-iname \ + ${S}/usr/iscsistart ${D}/${base_sbindir} + +
install -p -m 644 ${S}/doc/iscsiadm.8 ${S}/doc/iscsid.8
${D}/${mandir}/man8 + install -p -m 644${S}/etc/iscsid.conf
${D}${sysconfdir}/iscsi + install -p -m 755 ${WORKDIR}/initd.debian
${D}${sysconfdir}/init.d/iscsid + + #install regression tests + [ ! -d
${D}/opt/${BPN}-tests ] && mkdir -p ${D}/opt/${BPN}-tests + install
${S}/test/regression.dat${S}/test/regression.sh${D}/opt/${BPN}-tests/
Quoted 8 lines
+ + #open-isns tests + mkdir -p ${D}/opt/${BPN}-tests/isns-tests +
install ${S}/utils/open-isns/tests/*.pl
${D}/opt/${BPN}-tests/isns-tests/ + install
${S}/utils/open-isns/tests/genkey \ +${S}/utils/open-isns/tests/client.conf\ +${S}/utils/open-isns/tests/server.conf\ +
${D}/opt/${BPN}-tests/isns-tests/ + cp -a ${S}/utils/open-isns/tests/data
${D}/opt/${BPN}-tests/isns-tests/
/opt shouldn't be used in normal packaging, ${datadir} would be a better place
Quoted 6 lines
(quoted diff) +1
-0+ install -d ${D}/etc/default/volatiles + install -m 0644${WORKDIR}/99_iscsi-initiator-utils ${D}/etc/default/volatiles +} +
+pkg_postinst_${PN}() { + #default there is no initiatorname.iscsi
installed + #but it is needed or iscsid will fail + + #will run only when
postinst on target + if [ "x$D" != "x" ]; then + exit 1 + fi + if [ ! -f
${sysconfdir}/iscsi/initiatorname.iscsi ]; then + echo
Quoted 10 lines
"InitiatorName=$(${base_sbindir}/iscsi-iname)" > \ +
${sysconfdir}/iscsi/initiatorname.iscsi + fi + + if [ -e/etc/init.d/populate-volatile.sh]; then +/etc/init.d/populate-volatile.shupdate + fi +} + +INITSCRIPT_NAME =
"iscsid" +INITSCRIPT_PARAMS = "start 30 1 2 3 4 5 . stop 70 0 1 2 3 4 5 6 ." diff --git a/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
new file mode 100644
Quoted 4 lines
index 0000000..e85a5d2 ---
/dev/null+++ b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0-873.bb
@@ -0,0 +1,9 @@
Quoted 7 lines
+LICENSE = "GPLv2 & LGPLv2.1" +LIC_FILES_CHKSUM = \ + "file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \ + file://utils/open-isns/COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" + +SRC_URI[md5sum] = "
8b8316d7c9469149a6cc6234478347f7" +SRC_URI[sha256sum] = "7dd9f2f97da417560349a8da44ea4fcfe98bfd5ef284240a2cc4ff8e88ac7cd9" + +require ${PN}.inc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org
iD8DBQFUImQ7MkyGM64RGpERAqcMAKCBpCVSNZRwECsE5NAWMaKE97fjqACfQB+j Z4q+8rh/QYRnQ+kUQKTYsEU=
=kCre
-----END PGP SIGNATURE-----
I see there are two recipes for iscsi under meta-cloud-service, one is called iscsi-initiator-utils, other is called open-iscsi. and open-iscsi provides the systemd support and kernel modules, so I will copy open-iscsi into meta-oe/meta-oe.
-Roy
Quoted 16 lines · Koen Kooi
[email protected] schreef op 24-09-14 07:42:
Quoted 11 lines
Quoted 11 lines
From: Roy Li<[email protected]>
The package provides the server daemon for the iSCSI protocol, as well as the utility programs used to manage it. iSCSI is a protocol for distributed disk access using SCSI commands sent over Internet Protocol networks
It's a fairly basic utility, so copy it from meta-cloud-service to meta-oe
Signed-off-by Roy Li<[email protected]> ---[..]
Quoted 2 lines
Quoted 2 lines
+++
b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils.inc
Signature · 2 lines
Best Reagrds, Roy | RongQing Li
Quoted 7 lines · Rongqing Li
I see there are two recipes for iscsi under meta-cloud-service, one is called iscsi-initiator-utils, other is called open-iscsi. and open-iscsi provides the systemd support and kernel modules, so I will copy open-iscsi into meta-oe/meta-oe.
Giveup to use open-iscsi, and continue to use iscsi-initiator-utils , since open-iscsi-kernel can not pass compile.
-R
Quoted 23 lines
-Roy
Quoted 16 lines · Koen Kooi
[email protected] schreef op 24-09-14 07:42:
Quoted 11 lines
Quoted 11 lines
From: Roy Li<[email protected]>
The package provides the server daemon for the iSCSI protocol, as well as the utility programs used to manage it. iSCSI is a protocol for distributed disk access using SCSI commands sent over Internet Protocol networks
It's a fairly basic utility, so copy it from meta-cloud-service to meta-oe
Signed-off-by Roy Li<[email protected]> ---[..]
Quoted 2 lines
Quoted 2 lines
+++
b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils.inc
Signature · 2 lines
Best Reagrds, Roy | RongQing Li
Quoted 12 lines · Rongqing Li
Quoted 7 lines · Rongqing Li
I see there are two recipes for iscsi under meta-cloud-service, one is called iscsi-initiator-utils, other is called open-iscsi. and open-iscsi provides the systemd support and kernel modules, so I will copy open-iscsi into meta-oe/meta-oe.
Quoted 2 lines
Giveup to use open-iscsi, and continue to use iscsi-initiator-utils , since open-iscsi-kernel can not pass compile.
And FWIW, I'm going to continue to carry my own version in meta-cloud-services.
We are heavily version dependent on all the components in the cloud space, so we can't follow the cadence of pretty much any other layer.
Out of curiosity, if you need it .. why not just use it out of meta-cloud-services ?
Bruce
Quoted 30 lines
-R
Quoted 26 lines
-Roy
Quoted 19 lines · Koen Kooi
[email protected] schreef op 24-09-14 07:42:
Quoted 13 lines
Quoted 3 lines
From: Roy Li<[email protected]>
The package provides the server daemon for the iSCSI protocol, as
well as
Quoted 2 lines
the utility programs used to manage it. iSCSI is a protocol for distributed disk access using SCSI commands sent over Internet
Protocol
Quoted 6 lines
networks
It's a fairly basic utility, so copy it from meta-cloud-service to meta-oe
Signed-off-by Roy Li<[email protected]> ---[..]
Quoted 3 lines
Quoted 2 lines
+++
b/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils.inc