[oe-commits] [meta-openembedded] 12/62: samba: Fix qa issue and update ctdb-tests

git at git.openembedded.org git at git.openembedded.org
Tue Mar 7 13:28:45 UTC 2017


This is an automated email from the git hooks/post-receive script.

martin_jansa pushed a commit to branch morty-next
in repository meta-openembedded.

commit 6f1f4e30076d8af2e03d946b0947fe65c2bae5a2
Author: Kai Kang <kai.kang at windriver.com>
AuthorDate: Thu Nov 17 13:37:35 2016 +0800

    samba: Fix qa issue and update ctdb-tests
    
    Fix file-rdeps QA warning by replace shell interpreter of script
    ${bindir}/onnode with /bin/sh that it doesn't has any bashism.
    
    File ${bindir}/ctdb_run_cluster_tests which is a link to
    ${bindir}/ctdb_run_tests is split into package samba. That causes wrong
    runtime dependency that samba depends on samba-ctdb-tests. Split the
    file to samba-ctdb-tests to fix the issue.
    
    Script ctdb_run_tests calls command 'getopt', so add runtime dependency
    util-linux-getopt. Install config file and test cases for
    samba-ctdt-tests at same time.
    
    Signed-off-by: Kai Kang <kai.kang at windriver.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
    Signed-off-by: Joe MacDonald <joe_macdonald at mentor.com>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 .../recipes-connectivity/samba/samba_4.4.5.bb           | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb b/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb
index a27bcd1..303d5ae 100644
--- a/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb
+++ b/meta-networking/recipes-connectivity/samba/samba_4.4.5.bb
@@ -50,7 +50,7 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '${SYSVIN
 "
 
 RDEPENDS_${PN}-base += "${@bb.utils.contains('PACKAGECONFIG', 'lsb', 'lsb', '', d)}"
-RDEPENDS_${PN}-ctdb-tests += "bash"
+RDEPENDS_${PN}-ctdb-tests += "bash util-linux-getopt"
 
 PACKAGECONFIG[acl] = "--with-acl-support,--without-acl-support,acl"
 PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
@@ -129,6 +129,19 @@ do_install_append() {
     install -d ${D}${sysconfdir}/sysconfig/
     install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/sysconfig/samba
 
+    # install ctdb config file and test cases
+    install -D -m 0644 ${S}/ctdb/tests/onnode/nodes ${D}${sysconfdir}/ctdb/nodes
+    # the items are from ctdb/tests/run_tests.sh
+    for d in onnode takeover tool eventscripts cunit simple complex; do
+        testdir=${D}${datadir}/ctdb-tests/$d
+        install -d $testdir
+        cp ${S}/ctdb/tests/$d/*.sh $testdir
+        cp -r ${S}/ctdb/tests/$d/scripts ${S}/ctdb/tests/$d/stubs $testdir || true
+    done
+
+    # fix file-rdeps qa warning
+    sed -i 's:\(#!/bin/\)bash:\1sh:' ${D}${bindir}/onnode
+
     rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log
 }
 
@@ -147,6 +160,8 @@ FILES_${PN}-base = "${sbindir}/nmbd \
 "
 
 FILES_${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \
+                          ${bindir}/ctdb_run_cluster_tests \
+                          ${sysconfdir}/ctdb/nodes \
                           ${libdir}/ctdb-tests \
                           ${datadir}/ctdb-tests \
                           /run/ctdb \

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list