Skip to contentSkip to conversation

Update for lsb and lsbtest

PATCH In review Kai Kang 2 participants 8 messages Dec 13, 2013 – Dec 16, 2013

lore
Share & tools
lore

Kai Kang

author
#0 lore raw

cover Update for lsb and lsbtest

Hi Saul,

This version of lsb patch creates necessary directory otherwise do_install fails. And some update for package lsbtest.

The following changes since commit ba8506ee342a1a579ceb309f3f50285eaad84f25:

local.conf.extended: Bring into sync with OE-Core (2013-12-12 23:18:39 +0000)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib kangkai/lsb
http://git.yoctoproject.org/cgit.cgi/poky-contrib/?h=kangkai%2Flsb

Kai Kang (5):
lsb: update directory of install_initd and remove_initd LSB_Test.sh: update rpm platform file when enable multilib LSB_Test.sh: check ldconfig before update cache LSB_Test.sh: update locales
lsbtest: add ppc64 support

 meta/recipes-extended/lsb/lsb_4.1.bb          |  7 ++++---
 meta/recipes-extended/lsb/lsbtest/LSB_Test.sh | 20 ++++++++++++++++++--
 meta/recipes-extended/lsb/lsbtest_1.0.bb      | 12 ++++++++++++
 3 files changed, 34 insertions(+), 5 deletions(-)
Signature · 1 line
1.8.1.2
author
#1 lore raw

PATCH 1/5 lsb: update directory of install_initd and remove_initd

According to LSB specification:

http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/installinitd.html
http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/removeinitd.html

commands install_initd and remove_initd should under directory /usr/lib/lsb/.

lsb recipe creates these commands under directory ${libdir} which may expand to /usr/lib64 when multilib is enabled on qemux86-64. That will cause LSB command check for install_initd and remove_initd fail. So correct it.

---
 meta/recipes-extended/lsb/lsb_4.1.bb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes-extended/lsb/lsb_4.1.bb +4 -3
index c80ff59..b798ae1 100644
@@ -78,9 +78,10 @@ do_install_append(){
        install -m 0755 ${WORKDIR}/init-functions ${D}/${baselib}/lsb
 
        # creat links for LSB test
-       install -d ${D}/${libdir}/lsb
-       ln -sf ${sbindir}/chkconfig ${D}/${libdir}/lsb/install_initd
-       ln -sf ${sbindir}/chkconfig ${D}/${libdir}/lsb/remove_initd
+       install -d ${D}/usr/lib/lsb
+       ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/install_initd
+       ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/remove_initd
+       install -d ${D}/${libdir}
        ln -sf ${sbindir}/sendmail ${D}/${libdir}/sendmail
 
        if [ "${TARGET_ARCH}" = "x86_64" ];then
Signature · 1 line
1.8.1.2
author
#2 lore raw

PATCH 2/5 LSB_Test.sh: update rpm platform file when enable multilib

In reply to Kai Kang

When enable multilib for x86_64, lsb rpm packages of arch i486 are installed for lib32 images such as lib32-core-image-lsb. But i486 is not a valid platform that it is not included in rpm platform file, then fail to install i486 rpm packages.

Update platform file to enable install i486 rpm packages for lib32 images.

---
 meta/recipes-extended/lsb/lsbtest/LSB_Test.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
meta/recipes-extended/lsb/lsbtest/LSB_Test.sh +9 -0
index af1d61c..db4e749 100644
@@ -277,6 +277,15 @@ if ! `grep -F -q "noarch-suse" ${PLATFORM_FILE}`; then
 		echo "i486-noarch" >> ${PLATFORM_FILE}
 		echo "i486-pc" >> ${PLATFORM_FILE}
 		echo "noarch-suse" >> ${PLATFORM_FILE}
+	elif [ ${ARCH} == x86_64 ]; then
+		echo "i486-suse" >> ${PLATFORM_FILE}
+		echo "i486-noarch" >> ${PLATFORM_FILE}
+		echo "i486-pc" >> ${PLATFORM_FILE}
+		echo "i486-.*-linux.*" >> ${PLATFORM_FILE}
+		echo "noarch-suse" >> ${PLATFORM_FILE}
+		echo "${ARCH}-suse" >> ${PLATFORM_FILE}
+		echo "${ARCH}-noarch" >> ${PLATFORM_FILE}
+		echo "${ARCH}-pc" >> ${PLATFORM_FILE}
 	else
 		echo "${ARCH}-suse" >> ${PLATFORM_FILE}
 		echo "${ARCH}-noarch" >> ${PLATFORM_FILE}
Signature · 1 line
1.8.1.2
author
#3 lore raw

PATCH 3/5 LSB_Test.sh: check ldconfig before update cache

In reply to Kai Kang

LSB_Test.sh run ldconfig to update library cache. If command ldconfig doesn't exists, test will fail.

Check whether ldconfig exists. If not, don't update library cache.

---
 meta/recipes-extended/lsb/lsbtest/LSB_Test.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-extended/lsb/lsbtest/LSB_Test.sh +3 -1
index db4e749..2004157 100644
@@ -444,11 +444,13 @@ else
 	echo "Fail to creat Dirnames file"
 fi
 
+[ -x /sbin/ldconfig ] && {
 echo ""
 echo "---------------------------------"
 echo "Update cache"
-ldconfig
+/sbin/ldconfig
 check;
+}
 
 # Check loop device
 if [ ! -b /dev/loop0 ]
Signature · 1 line
1.8.1.2
author
#4 lore raw

PATCH 4/5 LSB_Test.sh: update locales

In reply to Kai Kang

LSB libstdc++ test requires some locales. Generate them explicitly in case they don't exist.

---
 meta/recipes-extended/lsb/lsbtest/LSB_Test.sh | 5 +++++
 1 file changed, 5 insertions(+)
meta/recipes-extended/lsb/lsbtest/LSB_Test.sh +5 -0
index 2004157..37ce3f1 100644
@@ -485,6 +485,11 @@ localedef -i it_IT -f ISO-8859-1 it_IT
 localedef -i ja_JP -f EUC-JP ja_JP.eucjp
 localedef -i se_NO -f UTF-8 se_NO.UTF-8
 localedef -i ta_IN -f UTF-8 ta_IN
+localedef -i es_ES -f ISO-8859-1 es_ES
+localedef -i fr_FR@euro -f ISO-8859-1 fr_FR@euro
+localedef -i is_IS -f UTF-8 is_IS.UTF-8
+localedef -i zh_TW -f BIG5 zh_TW.BIG5
+localedef -i en_US -f ISO-8859-15 en_US.ISO-8859-15
 
 echo ""
 echo "Installation done!"
Signature · 1 line
1.8.1.2
author
#5 lore raw

PATCH 5/5 lsbtest: add ppc64 support

In reply to Kai Kang

LSB supports to test on PPC64 target, so update lsbtest recipe and test scripts to enable PPC64 support.

---
 meta/recipes-extended/lsb/lsbtest/LSB_Test.sh |  2 +-
 meta/recipes-extended/lsb/lsbtest_1.0.bb      | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
meta/recipes-extended/lsb/lsbtest/LSB_Test.sh +1 -1
index 37ce3f1..12f0054 100644
@@ -29,7 +29,7 @@ EOF
 fi
 
 ARCH=`uname -m`
-if [ ${ARCH} != "i686" ] && [ ${ARCH} != "x86_64" ] && [ ${ARCH} != "ppc" ]
+if [ ${ARCH} != "i686" ] && [ ${ARCH} != "x86_64" ] && [ ${ARCH} != "ppc" ] && [ ${ARCH} != "ppc64" ]
 then
 	echo "Error: Unsupported architecture"
 	exit 1
meta/recipes-extended/lsb/lsbtest_1.0.bb +12 -0
index 8973e09..520c1e7 100644
@@ -31,6 +31,18 @@ do_install() {
 		sed -i -e 's/lsbarch/ppc32/g' -e 's/targetarch/ppc/g' ${D}/opt/lsb-test/packages_list
 		sed -i -e 's/targetarch/PPC32/g' ${D}/opt/lsb-test/session
 	fi
+
+	# For a ppc64 target. the default userspace is 32b.
+	# Therefore, only change the lsbarch and targetarch
+	# in the package_list when MLIB=lib64 is being used.
+	# Otherwise, by default, the ppc32 LSB packages
+	# will be downloaded by LSB_Test.sh
+	if [ "${TARGET_ARCH}" == "powerpc64" ];then
+		if [ "${PN}" != "${BPN}" ];then
+			sed -i -e 's/lsbarch/ppc64/g' -e 's/targetarch/ppc64/g' ${D}/opt/lsb-test/packages_list
+			sed -i -e 's/targetarch/PPC64/g' ${D}/opt/lsb-test/session
+		fi
+	fi
 }
 
 FILES_${PN} += "/opt/lsb-test/* \
Signature · 1 line
1.8.1.2
#6 lore raw
In reply to Kai Kang
Quoted 21 lines · Kai Kang

Hi Saul,

This version of lsb patch creates necessary directory otherwise do_install fails. And some update for package lsbtest.

The following changes since commit ba8506ee342a1a579ceb309f3f50285eaad84f25:

local.conf.extended: Bring into sync with OE-Core (2013-12-12 23:18:39 +0000)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib kangkai/lsb
http://git.yoctoproject.org/cgit.cgi/poky-contrib/?h=kangkai%2Flsb

Kai Kang (5):
lsb: update directory of install_initd and remove_initd LSB_Test.sh: update rpm platform file when enable multilib LSB_Test.sh: check ldconfig before update cache LSB_Test.sh: update locales
lsbtest: add ppc64 support

Quoted 4 lines
 meta/recipes-extended/lsb/lsb_4.1.bb          |  7 ++++---
 meta/recipes-extended/lsb/lsbtest/LSB_Test.sh | 20 ++++++++++++++++++--
 meta/recipes-extended/lsb/lsbtest_1.0.bb      | 12 ++++++++++++
 3 files changed, 34 insertions(+), 5 deletions(-)

These changes continue to break the multilib builds:

http://autobuilder.yoctoproject.org/main/builders/nightly-multilib/builds/52

Cheers,

Richard

author
#7 lore raw
Quoted 22 lines · Richard Purdie
Quoted 21 lines · Kai Kang

Hi Saul,

This version of lsb patch creates necessary directory otherwise do_install fails. And some update for package lsbtest.

The following changes since commit ba8506ee342a1a579ceb309f3f50285eaad84f25:

local.conf.extended: Bring into sync with OE-Core (2013-12-12 23:18:39 +0000)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib kangkai/lsb
http://git.yoctoproject.org/cgit.cgi/poky-contrib/?h=kangkai%2Flsb

Kai Kang (5):
lsb: update directory of install_initd and remove_initd LSB_Test.sh: update rpm platform file when enable multilib LSB_Test.sh: check ldconfig before update cache LSB_Test.sh: update locales
lsbtest: add ppc64 support

Quoted 7 lines
Quoted 4 lines
 meta/recipes-extended/lsb/lsb_4.1.bb          |  7 ++++---
 meta/recipes-extended/lsb/lsbtest/LSB_Test.sh | 20 ++++++++++++++++++--
 meta/recipes-extended/lsb/lsbtest_1.0.bb      | 12 ++++++++++++
 3 files changed, 34 insertions(+), 5 deletions(-)

These changes continue to break the multilib builds:

http://autobuilder.yoctoproject.org/main/builders/nightly-multilib/builds/52

Something wrong when merge patches from build machine to local host. V3 will send.

Regards,
Kai

Quoted 8 lines

Cheers,

Richard

Signature · 2 lines
Regards,
Neil | Kai Kang