nss: avoid to use the hardcode kernel version
PATCH 1/1 nss: avoid to use the hardcode kernel version
Hi Richard,
I don't quite understand what you mean "this makes nss machine specific". After update way for nss-native, I send this new version for review.
Thanks.
Roy Li (1):
nss: avoid to use the hardcode kernel version
meta/recipes-support/nss/nss.inc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.1.2
PATCH 1/1 nss: avoid to use the hardcode kernel version
From: Roy Li <[email protected]>
When native package is built, use the uname to return the kernel version.
When target is built, read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion to avoid to use the hardcode kernel version.
--- meta/recipes-support/nss/nss.inc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
meta/recipes-support/nss/nss.inc +13 -2
@@ -26,6 +26,7 @@ SRC_URI_append_class-target = "\ inherit siteinfo PR = "r0" DEPENDS = "sqlite3 nspr zlib nss-native" +DEPENDS_append_class-target += "virtual/kernel" DEPENDS_class-native = "sqlite3-native nspr-native zlib-native" RDEPENDS_${PN} = "perl"
@@ -37,12 +38,24 @@ TARGET_CC_ARCH += "${LDFLAGS}" do_compile_prepend_class-native() { export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE} export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE} + export OS_RELEASE=`uname -r` } do_compile_prepend_class-nativesdk() { export LDFLAGS="" } +do_compile_prepend_class-target() { + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'` +} + +do_install_prepend_class-native() { + export OS_RELEASE=`uname -r` +} + +do_install_prepend_class-target() { + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'` +} do_compile() { export CROSS_COMPILE=1 export NATIVE_CC="gcc"
@@ -57,7 +70,6 @@ do_compile() { export NSS_USE_SYSTEM_SQLITE=1 export NSS_ENABLE_ECC=1 - export OS_RELEASE=3.4 export OS_TARGET=Linux export OS_ARCH=Linux
@@ -97,7 +109,6 @@ do_install() { export NSS_USE_SYSTEM_SQLITE=1 export NSS_ENABLE_ECC=1 - export OS_RELEASE=3.4 export OS_TARGET=Linux export OS_ARCH=Linux
Signature · 1 line
1.8.1.2
Quoted 9 lines · Kai Kang
From: Roy Li <[email protected]>
When native package is built, use the uname to return the kernel version.
When target is built, read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion to avoid to use the hardcode kernel version.
Signed-off-by Roy Li <[email protected]>Signed-off-by Kai Kang <[email protected]>
This makes it depends on virtual/kernel and it vary from one machine to another.
Am I missing anything here?
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Quoted 6 lines · Kai Kang
From: Roy Li <[email protected]>
When native package is built, use the uname to return the kernel version.
When target is built, read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion to avoid to use the hardcode kernel version.
Doesn't it make nss MACHINE_ARCH like most virtual/kernel providers are?
Quoted 67 lines
Signed-off-by Roy Li <[email protected]>Signed-off-by Kai Kang <[email protected]>--- meta/recipes-support/nss/nss.inc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)meta/recipes-support/nss/nss.inc +13
-2@@ -26,6 +26,7 @@ SRC_URI_append_class-target = "\ inherit siteinfo PR = "r0" DEPENDS = "sqlite3 nspr zlib nss-native" +DEPENDS_append_class-target += "virtual/kernel" DEPENDS_class-native = "sqlite3-native nspr-native zlib-native" RDEPENDS_${PN} = "perl"@@ -37,12 +38,24 @@ TARGET_CC_ARCH += "${LDFLAGS}" do_compile_prepend_class-native() { export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE} export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE} + export OS_RELEASE=`uname -r` } do_compile_prepend_class-nativesdk() { export LDFLAGS="" } +do_compile_prepend_class-target() { + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'` +} + +do_install_prepend_class-native() { + export OS_RELEASE=`uname -r` +} + +do_install_prepend_class-target() { + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'` +} do_compile() { export CROSS_COMPILE=1 export NATIVE_CC="gcc"@@ -57,7 +70,6 @@ do_compile() { export NSS_USE_SYSTEM_SQLITE=1 export NSS_ENABLE_ECC=1 - export OS_RELEASE=3.4 export OS_TARGET=Linux export OS_ARCH=Linux@@ -97,7 +109,6 @@ do_install() { export NSS_USE_SYSTEM_SQLITE=1 export NSS_ENABLE_ECC=1 - export OS_RELEASE=3.4 export OS_TARGET=Linux export OS_ARCH=LinuxSignature · 7 lines
1.8.1.2 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 9 lines · Martin Jansa
Quoted 6 lines · Kai Kang
From: Roy Li <[email protected]>
When native package is built, use the uname to return the kernel version.
When target is built, read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion to avoid to use the hardcode kernel version.
Doesn't it make nss
MACHINE_ARCHlike most virtual/kernel providers are?
Agreed. I rejected this patch a while ago due to this and I'll reject it again.
Cheers,
Richard
Quoted 11 lines · Richard Purdie
Quoted 8 lines · Martin Jansa
Quoted 6 lines · Kai Kang
From: Roy Li <[email protected]>
When native package is built, use the uname to return the kernel version.
When target is built, read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion to avoid to use the hardcode kernel version.
Doesn't it make nss
MACHINE_ARCHlike most virtual/kernel providers are?Agreed. I rejected this patch a while ago due to this and I'll reject it again.
Got it. Thanks for all of your comments.
--Kai
Quoted 7 lines
Cheers,
Richard
Signature · 2 lines
Regards, Neil | Kai Kang
Quoted 9 lines · Martin Jansa
Quoted 6 lines · Kai Kang
From: Roy Li <[email protected]>
When native package is built, use the uname to return the kernel version.
When target is built, read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion to avoid to use the hardcode kernel version.
Doesn't it make nss
MACHINE_ARCHlike most virtual/kernel providers are?
Yes.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Quoted 51 lines · Kai Kang
From: Roy Li <[email protected]>
When native package is built, use the uname to return the kernel version.
When target is built, read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion to avoid to use the hardcode kernel version.
Signed-off-by Roy Li <[email protected]>Signed-off-by Kai Kang <[email protected]>--- meta/recipes-support/nss/nss.inc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)meta/recipes-support/nss/nss.inc +13
-0@@ -26,6 +26,7 @@ SRC_URI_append_class-target = "\ inherit siteinfo PR = "r0" DEPENDS = "sqlite3 nspr zlib nss-native" +DEPENDS_append_class-target += "virtual/kernel" DEPENDS_class-native = "sqlite3-native nspr-native zlib-native" RDEPENDS_${PN} = "perl"@@ -37,12 +38,24 @@ TARGET_CC_ARCH += "${LDFLAGS}" do_compile_prepend_class-native() { export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE} export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE} + export OS_RELEASE=`uname -r` } do_compile_prepend_class-nativesdk() { export LDFLAGS="" } +do_compile_prepend_class-target() { + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'` +} + +do_install_prepend_class-native() { + export OS_RELEASE=`uname -r` +} + +do_install_prepend_class-target() { + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'` +} do_compile() { export CROSS_COMPILE=1 export NATIVE_CC="gcc"
meta/recipes-support/nss/nss.inc do_compile() { · line 60
Quoted 4 lines
meta/recipes-support/nss/nss.inc +0
-1@@ -57,7 +70,6 @@ do_compile() { export NSS_USE_SYSTEM_SQLITE=1 export NSS_ENABLE_ECC=1 - export OS_RELEASE=3.4
How about use var LINUXLIBCVERSION:
export OS_RELEASE="${@d.getVar('LINUXLIBCVERSION', True)}"
it should be the same value with kernel version, right?
--Kai
Quoted 11 lines
meta/recipes-support/nss/nss.inc +0
-1export OS_TARGET=Linux export OS_ARCH=Linux@@ -97,7 +109,6 @@ do_install() { export NSS_USE_SYSTEM_SQLITE=1 export NSS_ENABLE_ECC=1 - export OS_RELEASE=3.4 export OS_TARGET=Linux export OS_ARCH=Linux
Signature · 2 lines
Regards, Neil | Kai Kang
Quoted 61 lines · Kang Kai
Quoted 52 lines · Kai Kang
From: Roy Li <[email protected]>
When native package is built, use the uname to return the kernel version.
When target is built, read kernel version from
${STAGING_KERNEL_DIR}/kernel-abiversion
to avoid to use the hardcode kernel version.Signed-off-by Roy Li <[email protected]>Signed-off-by Kai Kang <[email protected]>--- meta/recipes-support/nss/nss.inc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)meta/recipes-support/nss/ renamed from meta/recipes-support/nss/nss.inc +0
-0nss.inc
index 404decc..f24da68 100644meta/recipes-support/nss/nss.inc +1
-0@@ -26,6 +26,7 @@ SRC_URI_append_class-target = "\ inherit siteinfo PR = "r0" DEPENDS = "sqlite3 nspr zlib nss-native" +DEPENDS_append_class-target += "virtual/kernel" DEPENDS_class-native = "sqlite3-native nspr-native zlib-native" RDEPENDS_${PN} = "perl" @@ -37,12 +38,24 @@ TARGET_CC_ARCH += "${LDFLAGS}"do_compile_prepend_class-native() { export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE} export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}meta/recipes-support/nss/nss.inc +2
-0+ export OS_RELEASE=`uname -r` } do_compile_prepend_class-nativesdk() { export LDFLAGS="" } +do_compile_prepend_class-target() { + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed's/-.*//'`
meta/recipes-support/nss/nss.inc +8
-0+} + +do_install_prepend_class-native() { + export OS_RELEASE=`uname -r` +} + +do_install_prepend_class-target() { + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed's/-.*//'`
meta/recipes-support/nss/nss.inc +1
-0+} do_compile() { export CROSS_COMPILE=1 export NATIVE_CC="gcc"meta/recipes-support/nss/nss.inc do_compile() { · line 73
Quoted 4 lines
meta/recipes-support/nss/nss.inc +0
-0@@ -57,7 +70,6 @@ do_compile() { export NSS_USE_SYSTEM_SQLITE=1 export NSS_ENABLE_ECC=1 - export OS_RELEASE=3.4How about use var LINUXLIBCVERSION:
Quoted 3 lines
export OS_RELEASE="${@d.getVar('LINUXLIBCVERSION', True)}"
it should be the same value with kernel version, right?
No, that's the kernel headers version, if the dependency is on kernel proper then it won't be the right thing to do since many bsps use different kernel
Quoted 26 lines
--Kai
export OS_TARGET=Linux
meta/recipes-support/nss/nss.inc do_compile() { · line 74
Quoted 9 lines
meta/recipes-support/nss/nss.inc +0
-0export OS_ARCH=Linux @@ -97,7 +109,6 @@ do_install() { export NSS_USE_SYSTEM_SQLITE=1 export NSS_ENABLE_ECC=1 - export OS_RELEASE=3.4 export OS_TARGET=Linux export OS_ARCH=Linux--
Regards,
Neil | Kai Kang--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 55 lines · Kang Kai
Quoted 54 lines · Kai Kang
From: Roy Li <[email protected]>
When native package is built, use the uname to return the kernel version.
When target is built, read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion to avoid to use the hardcode kernel version.
Signed-off-by Roy Li <[email protected]>Signed-off-by Kai Kang <[email protected]>--- meta/recipes-support/nss/nss.inc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)meta/recipes-support/nss/nss.inc +13
-0@@ -26,6 +26,7 @@ SRC_URI_append_class-target = "\ inherit siteinfo PR = "r0" DEPENDS = "sqlite3 nspr zlib nss-native" +DEPENDS_append_class-target += "virtual/kernel" DEPENDS_class-native = "sqlite3-native nspr-native zlib-native" RDEPENDS_${PN} = "perl"@@ -37,12 +38,24 @@ TARGET_CC_ARCH += "${LDFLAGS}" do_compile_prepend_class-native() { export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE} export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE} + export OS_RELEASE=`uname -r` } do_compile_prepend_class-nativesdk() { export LDFLAGS="" } +do_compile_prepend_class-target() { + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'` +} + +do_install_prepend_class-native() { + export OS_RELEASE=`uname -r` +} + +do_install_prepend_class-target() { + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'` +} do_compile() { export CROSS_COMPILE=1 export NATIVE_CC="gcc"@@ -57,7 +70,6 @@ do_compile() { export NSS_USE_SYSTEM_SQLITE=1 export NSS_ENABLE_ECC=1
Quoted 7 lines
meta/recipes-support/nss/nss.inc do_compile() { · line 60
Quoted 1 line
meta/recipes-support/nss/nss.inc +0
-1- export OS_RELEASE=3.4How about use var LINUXLIBCVERSION:
export OS_RELEASE="${@d.getVar('LINUXLIBCVERSION', True)}"
it should be the same value with kernel version, right?
As others have replied, that is usually much more recent than the oldest kernel we support. What does nss do with this value? Is it about the header versions? Would something run on an older kernel with a newer value for OS_RELEASE?
We also have the OLDEST_KERNEL variable (currently at 2.6.16) FWIW.
Cheers,
Richard
Quoted 78 lines · On Thursday 03 April 2014 13:00:09 Richard Purdie wrote:
Quoted 77 lines · Kang Kai
Quoted 66 lines · Kai Kang
From: Roy Li <[email protected]>
When native package is built, use the uname to return the kernel version.
When target is built, read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion to avoid to use the hardcode kernel version.
Signed-off-by Roy Li <[email protected]>Signed-off-by Kai Kang <[email protected]>---
meta/recipes-support/nss/nss.inc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)(quoted diff) +0
-0b/meta/recipes-support/nss/nss.inc index 404decc..f24da68 100644
meta/recipes-support/nss/nss.inc +1
-0@@ -26,6 +26,7 @@ SRC_URI_append_class-target = "\ inherit siteinfo PR = "r0" DEPENDS = "sqlite3 nspr zlib nss-native" +DEPENDS_append_class-target += "virtual/kernel"DEPENDS_class-native = "sqlite3-native nspr-native zlib-native" RDEPENDS_${PN} = "perl"meta/recipes-support/nss/nss.inc +3
-0@@ -37,12 +38,24 @@ TARGET_CC_ARCH += "${LDFLAGS}" do_compile_prepend_class-native() { export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE} export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE} + export OS_RELEASE=`uname -r` } do_compile_prepend_class-nativesdk() { export LDFLAGS="" } +do_compile_prepend_class-target() { + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed's/-.*//'` +}
meta/recipes-support/nss/nss.inc +7
-0+ +do_install_prepend_class-native() { + export OS_RELEASE=`uname -r` +} + +do_install_prepend_class-target() { + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed's/-.*//'` +}
do_compile() {export CROSS_COMPILE=1
export NATIVE_CC="gcc"meta/recipes-support/nss/nss.inc do_compile() { · line 61
Quoted 5 lines
meta/recipes-support/nss/nss.inc +0
-1@@ -57,7 +70,6 @@ do_compile() { export NSS_USE_SYSTEM_SQLITE=1 export NSS_ENABLE_ECC=1 - export OS_RELEASE=3.4How about use var LINUXLIBCVERSION:
export OS_RELEASE="${@d.getVar('LINUXLIBCVERSION', True)}"
Quoted 8 lines
Quoted 1 line
it should be the same value with kernel version, right?
As others have replied, that is usually much more recent than the oldest kernel we support. What does nss do with this value? Is it about the header versions? Would something run on an older kernel with a newer value for
OS_RELEASE?We also have the
OLDEST_KERNELvariable (currently at 2.6.16) FWIW.
Incidentally, I think maybe for 1.7 it's time we bumped OLDEST_KERNEL. What a sensible minimum would be though I'm not sure. The minimum version for udev 182 would be one choice, but I believe there are people still using older kernels even than that.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Quoted 4 lines · Paul Eggleton
Incidentally, I think maybe for 1.7 it's time we bumped
OLDEST_KERNEL. What a sensible minimum would be though I'm not sure. The minimum version for udev 182 would be one choice, but I believe there are people still using older kernels even than that.
What would be the advantages of bumping it up?
p.
Quoted 7 lines · On Thursday 03 April 2014 14:49:05 Phil Blundell wrote:
Quoted 4 lines · Paul Eggleton
Incidentally, I think maybe for 1.7 it's time we bumped
OLDEST_KERNEL. What a sensible minimum would be though I'm not sure. The minimum version for udev 182 would be one choice, but I believe there are people still using older kernels even than that.What would be the advantages of bumping it up?
I could be wrong, but my understanding was that EGLIBC functionality specific to a particular kernel version or later is enabled / disabled based upon this value.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Quoted 59 lines · Richard Purdie
Quoted 58 lines · Kang Kai
Quoted 51 lines · Kai Kang
From: Roy Li <[email protected]>
When native package is built, use the uname to return the kernel version.
When target is built, read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion to avoid to use the hardcode kernel version.
Signed-off-by Roy Li <[email protected]>Signed-off-by Kai Kang <[email protected]>--- meta/recipes-support/nss/nss.inc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)meta/recipes-support/nss/nss.inc +13
-0@@ -26,6 +26,7 @@ SRC_URI_append_class-target = "\ inherit siteinfo PR = "r0" DEPENDS = "sqlite3 nspr zlib nss-native" +DEPENDS_append_class-target += "virtual/kernel" DEPENDS_class-native = "sqlite3-native nspr-native zlib-native" RDEPENDS_${PN} = "perl"@@ -37,12 +38,24 @@ TARGET_CC_ARCH += "${LDFLAGS}" do_compile_prepend_class-native() { export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE} export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE} + export OS_RELEASE=`uname -r` } do_compile_prepend_class-nativesdk() { export LDFLAGS="" } +do_compile_prepend_class-target() { + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'` +} + +do_install_prepend_class-native() { + export OS_RELEASE=`uname -r` +} + +do_install_prepend_class-target() { + export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'` +} do_compile() { export CROSS_COMPILE=1 export NATIVE_CC="gcc"meta/recipes-support/nss/nss.inc do_compile() { · line 60
Quoted 4 lines
meta/recipes-support/nss/nss.inc +0
-1@@ -57,7 +70,6 @@ do_compile() { export NSS_USE_SYSTEM_SQLITE=1 export NSS_ENABLE_ECC=1 - export OS_RELEASE=3.4How about use var LINUXLIBCVERSION:
Quoted 7 lines
Quoted 3 lines
export OS_RELEASE="${@d.getVar('LINUXLIBCVERSION', True)}"
it should be the same value with kernel version, right?
As others have replied, that is usually much more recent than the oldest kernel we support. What does nss do with this value? Is it about the header versions? Would something run on an older kernel with a newer value for
OS_RELEASE?
I misunderstanding the usage of LINUXLIBCVERSION. What nss needs is just current kernel version to export for build:
- export OS_RELEASE=3.4
Currently it is a fix string, and I think it is a problem.
Regards,
Kai
Quoted 9 lines
We also have the
OLDEST_KERNELvariable (currently at 2.6.16) FWIW.Cheers,
Richard
Signature · 2 lines
Regards, Neil | Kai Kang
Quoted 3 lines · Kai Kang
I don't quite understand what you mean "this makes nss machine specific". After update way for nss-native, I send this new version for review.
The kernel is machine specific. You're adding a dependency on the kernel to nss recipe. This means the nss recipe now depends on the kernel and the nss recipe is then also machine specific.
We do not want nss to change each time you change machine. This was unacceptable last time you sent the patch, its still unacceptable.
Cheers,
Richard