All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nss: avoid to use the hardcode kernel version
@ 2014-03-31 14:20 Kai Kang
  2014-03-31 14:20 ` Kai Kang
  2014-03-31 16:30 ` Richard Purdie
  0 siblings, 2 replies; 20+ messages in thread
From: Kai Kang @ 2014-03-31 14:20 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

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(-)

-- 
1.8.1.2



^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH] nss: avoid to use the hardcode kernel version
  2014-03-31 14:20 [PATCH] nss: avoid to use the hardcode kernel version Kai Kang
@ 2014-03-31 14:20 ` Kai Kang
  2014-03-31 14:33   ` Otavio Salvador
                     ` (2 more replies)
  2014-03-31 16:30 ` Richard Purdie
  1 sibling, 3 replies; 20+ messages in thread
From: Kai Kang @ 2014-03-31 14:20 UTC (permalink / raw)
  To: richard.purdie; +Cc: openembedded-core

From: Roy Li <rongqing.li@windriver.com>

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 <rongqing.li@windriver.com>
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/recipes-support/nss/nss.inc | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
index 404decc..f24da68 100644
--- a/meta/recipes-support/nss/nss.inc
+++ b/meta/recipes-support/nss/nss.inc
@@ -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
 
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-03-31 14:20 ` Kai Kang
@ 2014-03-31 14:33   ` Otavio Salvador
  2014-03-31 15:10   ` Martin Jansa
  2014-04-02  2:35   ` Kang Kai
  2 siblings, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2014-03-31 14:33 UTC (permalink / raw)
  To: Kai Kang; +Cc: Patches and discussions about the oe-core layer

On Mon, Mar 31, 2014 at 11:20 AM, Kai Kang <kai.kang@windriver.com> wrote:
> From: Roy Li <rongqing.li@windriver.com>
>
> 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 <rongqing.li@windriver.com>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>

This makes it depends on virtual/kernel and it vary from one machine to another.

Am I missing anything here?

-- 
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


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-03-31 14:20 ` Kai Kang
  2014-03-31 14:33   ` Otavio Salvador
@ 2014-03-31 15:10   ` Martin Jansa
  2014-03-31 16:32     ` Richard Purdie
  2014-03-31 20:49     ` Otavio Salvador
  2014-04-02  2:35   ` Kang Kai
  2 siblings, 2 replies; 20+ messages in thread
From: Martin Jansa @ 2014-03-31 15:10 UTC (permalink / raw)
  To: Kai Kang; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2593 bytes --]

On Mon, Mar 31, 2014 at 10:20:49PM +0800, Kai Kang wrote:
> From: Roy Li <rongqing.li@windriver.com>
> 
> 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?

> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  meta/recipes-support/nss/nss.inc | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
> index 404decc..f24da68 100644
> --- a/meta/recipes-support/nss/nss.inc
> +++ b/meta/recipes-support/nss/nss.inc
> @@ -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
>  
> -- 
> 1.8.1.2
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-03-31 14:20 [PATCH] nss: avoid to use the hardcode kernel version Kai Kang
  2014-03-31 14:20 ` Kai Kang
@ 2014-03-31 16:30 ` Richard Purdie
  1 sibling, 0 replies; 20+ messages in thread
From: Richard Purdie @ 2014-03-31 16:30 UTC (permalink / raw)
  To: Kai Kang; +Cc: openembedded-core

On Mon, 2014-03-31 at 22:20 +0800, Kai Kang wrote:
> 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





^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-03-31 15:10   ` Martin Jansa
@ 2014-03-31 16:32     ` Richard Purdie
  2014-04-01  1:40       ` Kang Kai
  2014-03-31 20:49     ` Otavio Salvador
  1 sibling, 1 reply; 20+ messages in thread
From: Richard Purdie @ 2014-03-31 16:32 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

On Mon, 2014-03-31 at 17:10 +0200, Martin Jansa wrote:
> On Mon, Mar 31, 2014 at 10:20:49PM +0800, Kai Kang wrote:
> > From: Roy Li <rongqing.li@windriver.com>
> > 
> > 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?

Agreed. I rejected this patch a while ago due to this and I'll reject it
again.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-03-31 15:10   ` Martin Jansa
  2014-03-31 16:32     ` Richard Purdie
@ 2014-03-31 20:49     ` Otavio Salvador
  1 sibling, 0 replies; 20+ messages in thread
From: Otavio Salvador @ 2014-03-31 20:49 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Mon, Mar 31, 2014 at 12:10 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> On Mon, Mar 31, 2014 at 10:20:49PM +0800, Kai Kang wrote:
>> From: Roy Li <rongqing.li@windriver.com>
>>
>> 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?

Yes.

-- 
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


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-03-31 16:32     ` Richard Purdie
@ 2014-04-01  1:40       ` Kang Kai
  0 siblings, 0 replies; 20+ messages in thread
From: Kang Kai @ 2014-04-01  1:40 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On 2014年04月01日 00:32, Richard Purdie wrote:
> On Mon, 2014-03-31 at 17:10 +0200, Martin Jansa wrote:
>> On Mon, Mar 31, 2014 at 10:20:49PM +0800, Kai Kang wrote:
>>> From: Roy Li <rongqing.li@windriver.com>
>>>
>>> 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?
> 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

>
> Cheers,
>
> Richard
>
>
>


-- 
Regards,
Neil | Kai Kang



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-03-31 14:20 ` Kai Kang
  2014-03-31 14:33   ` Otavio Salvador
  2014-03-31 15:10   ` Martin Jansa
@ 2014-04-02  2:35   ` Kang Kai
  2014-04-02  3:35     ` Khem Raj
  2014-04-03 12:00     ` Richard Purdie
  2 siblings, 2 replies; 20+ messages in thread
From: Kang Kai @ 2014-04-02  2:35 UTC (permalink / raw)
  To: Kai Kang; +Cc: openembedded-core

On 2014年03月31日 22:20, Kai Kang wrote:
> From: Roy Li <rongqing.li@windriver.com>
>
> 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 <rongqing.li@windriver.com>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>   meta/recipes-support/nss/nss.inc | 15 +++++++++++++--
>   1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
> index 404decc..f24da68 100644
> --- a/meta/recipes-support/nss/nss.inc
> +++ b/meta/recipes-support/nss/nss.inc
> @@ -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

How about use var LINUXLIBCVERSION:

export OS_RELEASE="${@d.getVar('LINUXLIBCVERSION', True)}"

it should be the same value with kernel version, right?

--Kai


>       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
>   


-- 
Regards,
Neil | Kai Kang



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-04-02  2:35   ` Kang Kai
@ 2014-04-02  3:35     ` Khem Raj
  2014-04-03 12:00     ` Richard Purdie
  1 sibling, 0 replies; 20+ messages in thread
From: Khem Raj @ 2014-04-02  3:35 UTC (permalink / raw)
  To: Kang Kai; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2981 bytes --]

On Tuesday, April 1, 2014, Kang Kai <Kai.Kang@windriver.com> wrote:

> On 2014年03月31日 22:20, Kai Kang wrote:
>
>> From: Roy Li <rongqing.li@windriver.com>
>>
>> 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 <rongqing.li@windriver.com>
>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> ---
>>   meta/recipes-support/nss/nss.inc | 15 +++++++++++++--
>>   1 file changed, 13 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/
>> nss.inc
>> index 404decc..f24da68 100644
>> --- a/meta/recipes-support/nss/nss.inc
>> +++ b/meta/recipes-support/nss/nss.inc
>> @@ -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
>>
>
> How about use var LINUXLIBCVERSION:
>
> 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


>
> --Kai
>
>
>        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
>>
>>
>
>
> --
> Regards,
> Neil | Kai Kang
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 4098 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-04-02  2:35   ` Kang Kai
  2014-04-02  3:35     ` Khem Raj
@ 2014-04-03 12:00     ` Richard Purdie
  2014-04-03 13:13       ` Paul Eggleton
  2014-04-04  2:53       ` Kang Kai
  1 sibling, 2 replies; 20+ messages in thread
From: Richard Purdie @ 2014-04-03 12:00 UTC (permalink / raw)
  To: Kang Kai; +Cc: openembedded-core

On Wed, 2014-04-02 at 10:35 +0800, Kang Kai wrote:
> On 2014年03月31日 22:20, Kai Kang wrote:
> > From: Roy Li <rongqing.li@windriver.com>
> >
> > 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 <rongqing.li@windriver.com>
> > Signed-off-by: Kai Kang <kai.kang@windriver.com>
> > ---
> >   meta/recipes-support/nss/nss.inc | 15 +++++++++++++--
> >   1 file changed, 13 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
> > index 404decc..f24da68 100644
> > --- a/meta/recipes-support/nss/nss.inc
> > +++ b/meta/recipes-support/nss/nss.inc
> > @@ -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
> 
> How 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



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-04-03 12:00     ` Richard Purdie
@ 2014-04-03 13:13       ` Paul Eggleton
  2014-04-03 13:49         ` Phil Blundell
  2014-04-04  2:53       ` Kang Kai
  1 sibling, 1 reply; 20+ messages in thread
From: Paul Eggleton @ 2014-04-03 13:13 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Thursday 03 April 2014 13:00:09 Richard Purdie wrote:
> On Wed, 2014-04-02 at 10:35 +0800, Kang Kai wrote:
> > On 2014年03月31日 22:20, Kai Kang wrote:
> > > From: Roy Li <rongqing.li@windriver.com>
> > > 
> > > 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 <rongqing.li@windriver.com>
> > > Signed-off-by: Kai Kang <kai.kang@windriver.com>
> > > ---
> > > 
> > >   meta/recipes-support/nss/nss.inc | 15 +++++++++++++--
> > >   1 file changed, 13 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/meta/recipes-support/nss/nss.inc
> > > b/meta/recipes-support/nss/nss.inc index 404decc..f24da68 100644
> > > --- a/meta/recipes-support/nss/nss.inc
> > > +++ b/meta/recipes-support/nss/nss.inc
> > > @@ -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
> > 
> > How 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.

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

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-04-03 13:13       ` Paul Eggleton
@ 2014-04-03 13:49         ` Phil Blundell
  2014-04-03 13:53           ` Paul Eggleton
  0 siblings, 1 reply; 20+ messages in thread
From: Phil Blundell @ 2014-04-03 13:49 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On Thu, 2014-04-03 at 14:13 +0100, Paul Eggleton wrote:
> 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.




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-04-03 13:49         ` Phil Blundell
@ 2014-04-03 13:53           ` Paul Eggleton
  0 siblings, 0 replies; 20+ messages in thread
From: Paul Eggleton @ 2014-04-03 13:53 UTC (permalink / raw)
  To: Phil Blundell; +Cc: openembedded-core

On Thursday 03 April 2014 14:49:05 Phil Blundell wrote:
> On Thu, 2014-04-03 at 14:13 +0100, Paul Eggleton wrote:
> > 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

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-04-03 12:00     ` Richard Purdie
  2014-04-03 13:13       ` Paul Eggleton
@ 2014-04-04  2:53       ` Kang Kai
  1 sibling, 0 replies; 20+ messages in thread
From: Kang Kai @ 2014-04-04  2:53 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On 2014年04月03日 20:00, Richard Purdie wrote:
> On Wed, 2014-04-02 at 10:35 +0800, Kang Kai wrote:
>> On 2014年03月31日 22:20, Kai Kang wrote:
>>> From: Roy Li <rongqing.li@windriver.com>
>>>
>>> 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 <rongqing.li@windriver.com>
>>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>>> ---
>>>    meta/recipes-support/nss/nss.inc | 15 +++++++++++++--
>>>    1 file changed, 13 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
>>> index 404decc..f24da68 100644
>>> --- a/meta/recipes-support/nss/nss.inc
>>> +++ b/meta/recipes-support/nss/nss.inc
>>> @@ -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
>> How 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?

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


>
> We also have the OLDEST_KERNEL variable (currently at 2.6.16) FWIW.
>
> Cheers,
>
> Richard
>
>
>


-- 
Regards,
Neil | Kai Kang



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-02-13  3:48 rongqing.li
  2014-02-13 11:45 ` David Nyström
@ 2014-02-13 12:04 ` Richard Purdie
  1 sibling, 0 replies; 20+ messages in thread
From: Richard Purdie @ 2014-02-13 12:04 UTC (permalink / raw)
  To: rongqing.li; +Cc: openembedded-core

On Thu, 2014-02-13 at 11:48 +0800, rongqing.li@windriver.com wrote:
> From: Roy Li <rongqing.li@windriver.com>
> 
> Read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion, to avoid
> to use the hardcode kernel version.
> 
> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> ---
>  meta/recipes-support/nss/nss.inc |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

I've just realised this makes nss machine specific. We do not want to do
that.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-02-13  3:48 rongqing.li
@ 2014-02-13 11:45 ` David Nyström
  2014-02-13 12:04 ` Richard Purdie
  1 sibling, 0 replies; 20+ messages in thread
From: David Nyström @ 2014-02-13 11:45 UTC (permalink / raw)
  To: rongqing.li, openembedded-core

On 2014-02-13 04:48, rongqing.li@windriver.com wrote:
> From: Roy Li <rongqing.li@windriver.com>
>
> Read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion, to avoid
> to use the hardcode kernel version.
>
> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> ---
>   meta/recipes-support/nss/nss.inc |    6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
> index a6aeed8..3ad12cc 100644
> --- a/meta/recipes-support/nss/nss.inc
> +++ b/meta/recipes-support/nss/nss.inc
> @@ -23,7 +23,7 @@ SRC_URI_append_class-target = "\
>   "
>   inherit siteinfo
>   PR = "r0"
> -DEPENDS = "sqlite3 nspr zlib nss-native"
> +DEPENDS = "sqlite3 nspr zlib nss-native virtual/kernel"
>   DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
>   RDEPENDS_${PN} = "perl"
>
> @@ -55,7 +55,7 @@ do_compile() {
>       export NSS_USE_SYSTEM_SQLITE=1
>       export NSS_ENABLE_ECC=1
>
> -    export OS_RELEASE=3.4
> +    export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'`

So if native or nativesdk versions compile before virtual/kernel 
${STAGING_KERNEL_DIR}/kernel-abiversion is available  ?

What will happen then ?

>       export OS_TARGET=Linux
>       export OS_ARCH=Linux
>
> @@ -95,7 +95,7 @@ do_install() {
>       export NSS_USE_SYSTEM_SQLITE=1
>       export NSS_ENABLE_ECC=1
>
> -    export OS_RELEASE=3.4
> +    export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'`
>       export OS_TARGET=Linux
>       export OS_ARCH=Linux
>
>



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH] nss: avoid to use the hardcode kernel version
  2014-02-13  3:34 rongqing.li
@ 2014-02-13  5:04 ` Rongqing Li
  0 siblings, 0 replies; 20+ messages in thread
From: Rongqing Li @ 2014-02-13  5:04 UTC (permalink / raw)
  To: rongqing.li; +Cc: openembedded-core

please drop this one

-Roy

On 02/13/2014 11:34 AM, rongqing.li@windriver.com wrote:
> From: Roy Li <rongqing.li@windriver.com>
>
> Read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion, to avoid
> to use the hardcode kernel version.
>
> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> ---
>   meta/recipes-support/nss/nss.inc |    6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
> index a6aeed8..bd7352d 100644
> --- a/meta/recipes-support/nss/nss.inc
> +++ b/meta/recipes-support/nss/nss.inc
> @@ -23,7 +23,7 @@ SRC_URI_append_class-target = "\
>   "
>   inherit siteinfo
>   PR = "r0"
> -DEPENDS = "sqlite3 nspr zlib nss-native"
> +DEPENDS = "sqlite3 nspr zlib nss-native virtual/kernel"
>   DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
>   RDEPENDS_${PN} = "perl"
>
> @@ -55,7 +55,7 @@ do_compile() {
>       export NSS_USE_SYSTEM_SQLITE=1
>       export NSS_ENABLE_ECC=1
>
> -    export OS_RELEASE=3.4
> +    export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion`
>       export OS_TARGET=Linux
>       export OS_ARCH=Linux
>
> @@ -95,7 +95,7 @@ do_install() {
>       export NSS_USE_SYSTEM_SQLITE=1
>       export NSS_ENABLE_ECC=1
>
> -    export OS_RELEASE=3.4
> +    export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion`
>       export OS_TARGET=Linux
>       export OS_ARCH=Linux
>
>

-- 
Best Reagrds,
Roy | RongQing Li


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH] nss: avoid to use the hardcode kernel version
@ 2014-02-13  3:48 rongqing.li
  2014-02-13 11:45 ` David Nyström
  2014-02-13 12:04 ` Richard Purdie
  0 siblings, 2 replies; 20+ messages in thread
From: rongqing.li @ 2014-02-13  3:48 UTC (permalink / raw)
  To: openembedded-core

From: Roy Li <rongqing.li@windriver.com>

Read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion, to avoid
to use the hardcode kernel version.

Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
 meta/recipes-support/nss/nss.inc |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
index a6aeed8..3ad12cc 100644
--- a/meta/recipes-support/nss/nss.inc
+++ b/meta/recipes-support/nss/nss.inc
@@ -23,7 +23,7 @@ SRC_URI_append_class-target = "\
 "
 inherit siteinfo
 PR = "r0"
-DEPENDS = "sqlite3 nspr zlib nss-native"
+DEPENDS = "sqlite3 nspr zlib nss-native virtual/kernel"
 DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
 RDEPENDS_${PN} = "perl"
 
@@ -55,7 +55,7 @@ do_compile() {
     export NSS_USE_SYSTEM_SQLITE=1
     export NSS_ENABLE_ECC=1
 
-    export OS_RELEASE=3.4
+    export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'`
     export OS_TARGET=Linux
     export OS_ARCH=Linux
 
@@ -95,7 +95,7 @@ do_install() {
     export NSS_USE_SYSTEM_SQLITE=1
     export NSS_ENABLE_ECC=1
 
-    export OS_RELEASE=3.4
+    export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion|sed 's/-.*//'`
     export OS_TARGET=Linux
     export OS_ARCH=Linux
 
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH] nss: avoid to use the hardcode kernel version
@ 2014-02-13  3:34 rongqing.li
  2014-02-13  5:04 ` Rongqing Li
  0 siblings, 1 reply; 20+ messages in thread
From: rongqing.li @ 2014-02-13  3:34 UTC (permalink / raw)
  To: openembedded-core

From: Roy Li <rongqing.li@windriver.com>

Read kernel version from ${STAGING_KERNEL_DIR}/kernel-abiversion, to avoid
to use the hardcode kernel version.

Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
 meta/recipes-support/nss/nss.inc |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc
index a6aeed8..bd7352d 100644
--- a/meta/recipes-support/nss/nss.inc
+++ b/meta/recipes-support/nss/nss.inc
@@ -23,7 +23,7 @@ SRC_URI_append_class-target = "\
 "
 inherit siteinfo
 PR = "r0"
-DEPENDS = "sqlite3 nspr zlib nss-native"
+DEPENDS = "sqlite3 nspr zlib nss-native virtual/kernel"
 DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
 RDEPENDS_${PN} = "perl"
 
@@ -55,7 +55,7 @@ do_compile() {
     export NSS_USE_SYSTEM_SQLITE=1
     export NSS_ENABLE_ECC=1
 
-    export OS_RELEASE=3.4
+    export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion`
     export OS_TARGET=Linux
     export OS_ARCH=Linux
 
@@ -95,7 +95,7 @@ do_install() {
     export NSS_USE_SYSTEM_SQLITE=1
     export NSS_ENABLE_ECC=1
 
-    export OS_RELEASE=3.4
+    export OS_RELEASE=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion`
     export OS_TARGET=Linux
     export OS_ARCH=Linux
 
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2014-04-04  2:53 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-31 14:20 [PATCH] nss: avoid to use the hardcode kernel version Kai Kang
2014-03-31 14:20 ` Kai Kang
2014-03-31 14:33   ` Otavio Salvador
2014-03-31 15:10   ` Martin Jansa
2014-03-31 16:32     ` Richard Purdie
2014-04-01  1:40       ` Kang Kai
2014-03-31 20:49     ` Otavio Salvador
2014-04-02  2:35   ` Kang Kai
2014-04-02  3:35     ` Khem Raj
2014-04-03 12:00     ` Richard Purdie
2014-04-03 13:13       ` Paul Eggleton
2014-04-03 13:49         ` Phil Blundell
2014-04-03 13:53           ` Paul Eggleton
2014-04-04  2:53       ` Kang Kai
2014-03-31 16:30 ` Richard Purdie
  -- strict thread matches above, loose matches on Subject: below --
2014-02-13  3:48 rongqing.li
2014-02-13 11:45 ` David Nyström
2014-02-13 12:04 ` Richard Purdie
2014-02-13  3:34 rongqing.li
2014-02-13  5:04 ` Rongqing Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.