Skip to contentSkip to conversation

samba: Fix qa issue and update ctdb-tests

PATCH New [email protected] 1 participant 3 messages Nov 17, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 samba: Fix qa issue and update ctdb-tests

From: Kai Kang <[email protected]>

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.

---
 .../recipes-connectivity/samba/samba_4.4.5.bb           | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
meta-networking/recipes-connectivity/samba/samba_4.4.5.bb +16 -1
index e9694d4..fe63701 100644
@@ -43,7 +43,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"
@@ -122,6 +122,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
 }
 
@@ -140,6 +153,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 \
Signature · 1 line
2.10.1
#1 lore raw

PATCH 2/3 samba: correct sub-package name for multilib

From: Kai Kang <[email protected]>

The name of sub-package lib${PN}-base is not right when extended by multilib. Correct it by replace ${PN} with ${BPN}.

---
 meta-networking/recipes-connectivity/samba/samba_4.4.5.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-networking/recipes-connectivity/samba/samba_4.4.5.bb +2 -2
index fe63701..98058f4 100644
@@ -140,7 +140,7 @@ do_install_append() {
 
 PACKAGES =+ "${PN}-python ${PN}-python-dbg ${PN}-pidl libwinbind libwinbind-dbg libwinbind-krb5-locator"
 PACKAGES =+ "libwbclient libnss-winbind winbind winbind-dbg libnetapi libsmbsharemodes \
-             libsmbclient libsmbclient-dev lib${PN}-base ${PN}-base ${PN}-ctdb-tests"
+             libsmbclient libsmbclient-dev lib${BPN}-base ${PN}-base ${PN}-ctdb-tests"
 
 RDEPENDS_${PN} += "${PN}-base"
 
@@ -178,7 +178,7 @@ FILES_${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \
 #     echo $l
 # done
 
-FILES_lib${PN}-base = "\
+FILES_lib${BPN}-base = "\
                     ${sysconfdir}/default \
                     ${sysconfdir}/samba \
                     ${libdir}/libdcerpc-binding.so.* \
Signature · 1 line
2.10.1
#2 lore raw

PATCH 3/3 curlpp: fix qa issue of do_configure

In reply to [email protected]

From: Kai Kang <[email protected]>

curlpp is configured with boost by default. And it searches boost directory on build machine. If boost is installed on build machine, then causes qa issue:

| ERROR: curlpp-0.7.3-r0 do_configure: This autoconf log indicates
| errors, it looked at host include and/or library paths while
| determining system capabilities.

Pass the boost directory in ${STAGING_DIR_HOST} to configure script to disable search on build machine to fix the issue.

---
 meta-networking/recipes-support/curlpp/curlpp_0.7.3.bb | 1 +
 1 file changed, 1 insertion(+)
meta-networking/recipes-support/curlpp/curlpp_0.7.3.bb +1 -0
index 1848aa6..c3a242a 100644
@@ -16,6 +16,7 @@ SRC_URI[sha256sum] = "e3f9427b27c5bddf898d383d45c0d3d5397e2056ff935d9a5cdaef6a9a
 
 inherit autotools-brokensep pkgconfig binconfig
 
+EXTRA_OECONF = "--with-boost=${STAGING_DIR_HOST}${prefix}"
 # Upstream is currently working on porting the code to use std::unique_ptr instead of the
 # deprecated auto_ptr.  For now, ignore the issue.
 CXXFLAGS += "-Wno-error=deprecated-declarations"
Signature · 1 line
2.10.1