Skip to contentSkip to conversation

iscsi-initiator-utils/open-isns: fix for sysvinit

PATCH New [email protected] 1 participant 4 messages Nov 9, 2017

lore
Share & tools
lore
#0 lore raw

cover iscsi-initiator-utils/open-isns: fix for sysvinit

From: Jackie Huang <[email protected]>

--
The following changes since commit 5d6d21e98ed594809169d2b2f6964e90a3369a96:

libreport: fix Nothing RPROVIDES 'lib32-python3-libreport' (2017-10-27 16:39:34 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib.git jhuang0/d_iscsi-openisns_171109_0
http://git.pokylinux.org/cgit.cgi//log/?h=jhuang0/d_iscsi-openisns_171109_0

Jackie Huang (3):
open-isns: add sysvinit support
iscsi-initiator-utils: remove the distro_features_check
iscsi-initiator-utils: check file existence before moving

 .../iscsi-initiator-utils/iscsi-initiator-utils_2.0.874.bb   |  8 ++++----
 meta-networking/recipes-support/open-isns/open-isns_0.97.bb  | 12 ++++++++----
 2 files changed, 12 insertions(+), 8 deletions(-)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/3 open-isns: add sysvinit support

From: Jackie Huang <[email protected]>

It's not mandatory to depend on systemd for open-isns, the sysvinit script is also provided in open-isns source code, so add it to support sysvinit and remove the distro_features_check.

---
 meta-networking/recipes-support/open-isns/open-isns_0.97.bb | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
meta-networking/recipes-support/open-isns/open-isns_0.97.bb +8 -4
index 420ef5be0..9ee1f87c8 100644
@@ -11,7 +11,7 @@ LICENSE = "GPLv2+ & LGPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=321bf41f280cf805086dd5a720b37785"
 SECTION = "net"
 
-DEPENDS = "openssl systemd"
+DEPENDS = "openssl"
 
 SRC_URI = " \
     git://github.com/open-iscsi/open-isns \
@@ -21,9 +21,7 @@ SRCREV ?= "09954404e948e41eb0fce8e28836018b4ce3d20d"
 
 S = "${WORKDIR}/git"
 
-inherit systemd autotools-brokensep distro_features_check
-# depends on systemd
-REQUIRED_DISTRO_FEATURES = "systemd"
+inherit systemd autotools-brokensep update-rc.d
 
 EXTRA_OECONF = " --prefix=${prefix} --enable-shared"
 EXTRA_OEMAKE += "SYSTEMDDIR=${D}${systemd_unitdir}/system"
@@ -31,6 +29,12 @@ EXTRA_OEMAKE += "SYSTEMDDIR=${D}${systemd_unitdir}/system"
 do_install_append () {
     oe_runmake INCDIR=${D}${includedir}/libisns/ install_hdrs
     oe_runmake LIBDIR=${D}${libdir} install_lib
+
+    install -D -m 755 ${S}/etc/openisns.init ${D}${sysconfdir}/init.d/openisns
+    sed -i 's|daemon isnsd|start-stop-daemon --start --quiet --oknodo --exec ${sbindir}/isnsd --|' \
+        ${D}${sysconfdir}/init.d/openisns
 }
 
 FILES_${PN} += "${libdir} ${systemd_unitdir}"
+
+INITSCRIPT_NAME = "openisns"
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/3 iscsi-initiator-utils: remove the distro_features_check

In reply to [email protected]

From: Jackie Huang <[email protected]>

open-isns supports both systemd and sysvinit now, so remove the distro_features_check.

---
 .../iscsi-initiator-utils/iscsi-initiator-utils_2.0.874.bb            | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.874.bb +1 -3
index 16ac19992..50aadb6b6 100644
@@ -27,9 +27,7 @@ SRC_URI = "git://github.com/open-iscsi/open-iscsi \
 S = "${WORKDIR}/git"
 B = "${WORKDIR}/build"
 
-inherit update-rc.d systemd autotools distro_features_check
-# open-isns depends on systemd
-REQUIRED_DISTRO_FEATURES = "systemd"
+inherit update-rc.d systemd autotools
 
 EXTRA_OECONF = " \
     --target=${TARGET_SYS} \
Signature · 1 line
2.11.0
#3 lore raw

PATCH 3/3 iscsi-initiator-utils: check file existence before moving

In reply to [email protected]

From: Jackie Huang <[email protected]>

Check the file existence before moving to avoid the error:
| mv: cannot stat /<build_dir>/git/utils/fwparam_ibft/prom_lex.l:
| No such file or directory

---
 .../iscsi-initiator-utils/iscsi-initiator-utils_2.0.874.bb            | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.874.bb +3 -1
index 50aadb6b6..95848d0b3 100644
@@ -57,7 +57,9 @@ do_configure () {
 
 do_compile () {
     # Make sure we DO NOT regenerate prom_lex.c.
-    mv ${S}/utils/fwparam_ibft/prom_lex.l ${S}/utils/fwparam_ibft/prom_lex.l.unused
+    if [ -f ${S}/utils/fwparam_ibft/prom_lex.l ]; then
+        mv ${S}/utils/fwparam_ibft/prom_lex.l ${S}/utils/fwparam_ibft/prom_lex.l.unused
+    fi
     oe_runmake -C ${S} ${EXTRA_OEMAKE} user
 }
 
Signature · 1 line
2.11.0