[oe] [meta-oe][PATCH] open-iscsi : add new recipe
Koen Kooi
koen at dominion.thruhere.net
Thu Nov 27 09:14:51 UTC 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Li xin schreef op 21-11-14 08:44:
> Open-iSCSI project is a high performance, transport independent,
> multi-platform implementation of RFC3720.
>
> Signed-off-by: Li Xin <lixin.fnst at cn.fujitsu.com>
> +++ b/meta-oe/recipes-support/open-iscsi/files/open-iscsi.service @@ -0,0
> +1,18 @@ +[Unit] +Description=Open-iSCSI +Documentation=man:iscsid(8)
> man:iscsiadm(8) +After=network.target + +[Service] +Type=forking
> +PIDFile=/var/run/iscsid.pid +ExecStartPre=-/sbin/modprobe -q iscsi_tcp
> +ExecStartPre=-/sbin/modprobe -q ib_iser +ExecStart=/usr/sbin/iscsid -p
> /var/run/iscsid.pid +ExecStartPost=-/usr/sbin/iscsiadm -m node
> --loginall=automatic +ExecStopPost=/bin/sync
> +ExecStopPost=-/sbin/modprobe -r ib_iser +ExecStopPost=-/sbin/modprobe -r
> iscsi_tcp
Tons of hardcoded paths here
> + +[Install] +WantedBy=multi-user.target diff --git
> a/meta-oe/recipes-support/open-iscsi/open-iscsi_2.0-871.bb
> b/meta-oe/recipes-support/open-iscsi/open-iscsi_2.0-871.bb new file mode
> 100644 index 0000000..c8a87d3 --- /dev/null +++
> b/meta-oe/recipes-support/open-iscsi/open-iscsi_2.0-871.bb @@ -0,0 +1,35
> @@
> +SRC_URI = "http://www.open-iscsi.org/bits/${BP}.tar.gz"
[..]
> +SRC_URI += "file://iscsi_sysfs.c-add-include-files.patch \ +
> file://open-iscsi.service"
Please collapse these into a single SRC_URI
> +do_install_append () { + if
> ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then +
> install -d ${D}${systemd_unitdir}/system + install -m 0644
> ${WORKDIR}/open-iscsi.service ${D}${systemd_unitdir}/system/ + fi +}
> + +do_install () { + oe_runmake DESTDIR="${D}" install_user +}
Please collapse these into a single method
> +inherit
> ${@base_contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','',d)}
'inherit
>
systemd' should be safe enough with this check. And if you *really*
want to check, check for DISTRO_FEATURES.
Also, you're missing RRECOMMENDS for the kernel modules you try to modprobe
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org
iD8DBQFUduuKMkyGM64RGpERAg9KAJ9lOrnIsfdO55QXXtOapwNqlA003wCgumTL
Cc+RUQRUvvzJKfupM/kauqc=
=MBC4
-----END PGP SIGNATURE-----
More information about the Openembedded-devel
mailing list