[v3] lttng-modules: Add git based recipe

Submitted by zhe.he@windriver.com on June 12, 2019, 11:12 a.m. | Patch ID: 162148

Details

Message ID 1560337967-208223-1-git-send-email-zhe.he@windriver.com
State Superseded
Headers show

Commit Message

zhe.he@windriver.com June 12, 2019, 11:12 a.m.
From: He Zhe <zhe.he@windriver.com>

The git based recipe is for those who want to build lttng-modules with bleeding
edge kernel, to avoid regularly backporting patches from upstream.

Note that PREFERRED_VERSION needs to be set to select the git recipe instead of
the tar ball one.

Signed-off-by: He Zhe <zhe.he@windriver.com>
---
v2: Correct a typo in SOB in 0001
v3: Use devupstream to make it more clean and clear

 meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb b/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
index 70a6843..dfd166a 100644
--- a/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
+++ b/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
@@ -11,7 +11,6 @@  inherit module
 
 COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
 
-#https://lttng.org/files/lttng-modules/lttng-modules-2.10.7.tar.bz2
 SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
            file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
            file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
@@ -34,3 +33,13 @@  python do_package_prepend() {
         bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
 }
 
+BBCLASSEXTEND = "devupstream:target"
+LIC_FILES_CHKSUM_class-devupstream = "file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128"
+DEFAULT_PREFERENCE_class-devupstream = "-1"
+SRC_URI_class-devupstream = "git://git.lttng.org/lttng-modules;branch=master \
+           file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
+           file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
+           "
+SRCREV_class-devupstream = "${AUTOREV}"
+PV_class-devupstream = "2.11.0-rc+git${SRCPV}"
+S_class-devupstream = "${WORKDIR}/git"

Comments

Richard Purdie June 12, 2019, 12:36 p.m.
On Wed, 2019-06-12 at 19:12 +0800, zhe.he@windriver.com wrote:
> From: He Zhe <zhe.he@windriver.com>
> 
> The git based recipe is for those who want to build lttng-modules with bleeding
> edge kernel, to avoid regularly backporting patches from upstream.
> 
> Note that PREFERRED_VERSION needs to be set to select the git recipe instead of
> the tar ball one.
> 
> Signed-off-by: He Zhe <zhe.he@windriver.com>
> ---
> v2: Correct a typo in SOB in 0001
> v3: Use devupstream to make it more clean and clear
> 
>  meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb b/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
> index 70a6843..dfd166a 100644
> --- a/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
> +++ b/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
> @@ -11,7 +11,6 @@ inherit module
>  
>  COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
>  
> -#https://lttng.org/files/lttng-modules/lttng-modules-2.10.7.tar.bz2
>  SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
>             file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
>             file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
> @@ -34,3 +33,13 @@ python do_package_prepend() {
>          bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
>  }
>  
> +BBCLASSEXTEND = "devupstream:target"
> +LIC_FILES_CHKSUM_class-devupstream = "file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128"
> +DEFAULT_PREFERENCE_class-devupstream = "-1"
> +SRC_URI_class-devupstream = "git://git.lttng.org/lttng-modules;branch=master \
> +           file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
> +           file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
> +           "
> +SRCREV_class-devupstream = "${AUTOREV}"
> +PV_class-devupstream = "2.11.0-rc+git${SRCPV}"
> +S_class-devupstream = "${WORKDIR}/git"

OE-Core can't access the network by default so this will need to be a
specific SRCREV which you can set to AUTOREV in local config if that
makes sense.

I've sent a separate email to openembedded-architecture about a better
syntax for some of this but that isn't anything wrong with this patch,
more just the way devupstream works.

Cheers,

Richard
Jonathan Rajotte-Julien June 12, 2019, 3 p.m.
Hi,

> +BBCLASSEXTEND = "devupstream:target"
> +LIC_FILES_CHKSUM_class-devupstream = "file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128"
> +DEFAULT_PREFERENCE_class-devupstream = "-1"
> +SRC_URI_class-devupstream = "git://git.lttng.org/lttng-modules;branch=master \
> +           file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
> +           file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
> +           "

Please use the head of the stable release. 2.10 in this case.

> +SRCREV_class-devupstream = "${AUTOREV}"
> +PV_class-devupstream = "2.11.0-rc+git${SRCPV}"

This should be 2.10.
Bruce Ashfield June 12, 2019, 3:50 p.m.
On Wed, Jun 12, 2019 at 8:36 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2019-06-12 at 19:12 +0800, zhe.he@windriver.com wrote:
> > From: He Zhe <zhe.he@windriver.com>
> >
> > The git based recipe is for those who want to build lttng-modules with bleeding
> > edge kernel, to avoid regularly backporting patches from upstream.
> >
> > Note that PREFERRED_VERSION needs to be set to select the git recipe instead of
> > the tar ball one.
> >
> > Signed-off-by: He Zhe <zhe.he@windriver.com>
> > ---
> > v2: Correct a typo in SOB in 0001
> > v3: Use devupstream to make it more clean and clear
> >
> >  meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb | 11 ++++++++++-
> >  1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb b/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
> > index 70a6843..dfd166a 100644
> > --- a/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
> > +++ b/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
> > @@ -11,7 +11,6 @@ inherit module
> >
> >  COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
> >
> > -#https://lttng.org/files/lttng-modules/lttng-modules-2.10.7.tar.bz2
> >  SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
> >             file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
> >             file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
> > @@ -34,3 +33,13 @@ python do_package_prepend() {
> >          bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
> >  }
> >
> > +BBCLASSEXTEND = "devupstream:target"
> > +LIC_FILES_CHKSUM_class-devupstream = "file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128"
> > +DEFAULT_PREFERENCE_class-devupstream = "-1"
> > +SRC_URI_class-devupstream = "git://git.lttng.org/lttng-modules;branch=master \
> > +           file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
> > +           file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
> > +           "
> > +SRCREV_class-devupstream = "${AUTOREV}"
> > +PV_class-devupstream = "2.11.0-rc+git${SRCPV}"
> > +S_class-devupstream = "${WORKDIR}/git"
>
> OE-Core can't access the network by default so this will need to be a
> specific SRCREV which you can set to AUTOREV in local config if that
> makes sense.

Agreed. I was going to comment on the AUTOREV,  and I see that
everyone beat me to it.

The _git recipe does *not* need to be AUTOREV (unless as you say,
someone wants to do that locally), it just has to be branch and SRCREV
based, so we can easily bump it forward to an intermediate point that
makes sense while working with new kernels.

Bruce

>
> I've sent a separate email to openembedded-architecture about a better
> syntax for some of this but that isn't anything wrong with this patch,
> more just the way devupstream works.
>
> Cheers,
>
> Richard
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
zhe.he@windriver.com June 14, 2019, 2:33 a.m.
On 6/12/19 8:36 PM, Richard Purdie wrote:
> On Wed, 2019-06-12 at 19:12 +0800, zhe.he@windriver.com wrote:
>> From: He Zhe <zhe.he@windriver.com>
>>
>> The git based recipe is for those who want to build lttng-modules with bleeding
>> edge kernel, to avoid regularly backporting patches from upstream.
>>
>> Note that PREFERRED_VERSION needs to be set to select the git recipe instead of
>> the tar ball one.
>>
>> Signed-off-by: He Zhe <zhe.he@windriver.com>
>> ---
>> v2: Correct a typo in SOB in 0001
>> v3: Use devupstream to make it more clean and clear
>>
>>  meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb | 11 ++++++++++-
>>  1 file changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb b/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
>> index 70a6843..dfd166a 100644
>> --- a/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
>> +++ b/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
>> @@ -11,7 +11,6 @@ inherit module
>>  
>>  COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
>>  
>> -#https://lttng.org/files/lttng-modules/lttng-modules-2.10.7.tar.bz2
>>  SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
>>             file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
>>             file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
>> @@ -34,3 +33,13 @@ python do_package_prepend() {
>>          bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
>>  }
>>  
>> +BBCLASSEXTEND = "devupstream:target"
>> +LIC_FILES_CHKSUM_class-devupstream = "file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128"
>> +DEFAULT_PREFERENCE_class-devupstream = "-1"
>> +SRC_URI_class-devupstream = "git://git.lttng.org/lttng-modules;branch=master \
>> +           file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
>> +           file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
>> +           "
>> +SRCREV_class-devupstream = "${AUTOREV}"
>> +PV_class-devupstream = "2.11.0-rc+git${SRCPV}"
>> +S_class-devupstream = "${WORKDIR}/git"
> OE-Core can't access the network by default so this will need to be a
> specific SRCREV which you can set to AUTOREV in local config if that
> makes sense.
>
> I've sent a separate email to openembedded-architecture about a better
> syntax for some of this but that isn't anything wrong with this patch,
> more just the way devupstream works.

Thanks. I assumed this patch was on the way to be merged. But with Jonathan
Rajotte-Julien's idea coming after your comment, I want to make sure if there's
anything/update I should do for the patch.

Zhe

>
> Cheers,
>
> Richard
>
>
Richard Purdie June 14, 2019, 7:59 a.m.
On Fri, 2019-06-14 at 10:33 +0800, He Zhe wrote:
> 
> On 6/12/19 8:36 PM, Richard Purdie wrote:
> > On Wed, 2019-06-12 at 19:12 +0800, zhe.he@windriver.com wrote:
> > > From: He Zhe <zhe.he@windriver.com>
> > > 
> > > The git based recipe is for those who want to build lttng-modules 
> > > with bleeding
> > > edge kernel, to avoid regularly backporting patches from
> > > upstream.
> > > 
> > > Note that PREFERRED_VERSION needs to be set to select the git
> > > recipe instead of
> > > the tar ball one.
> > > 
> > > Signed-off-by: He Zhe <zhe.he@windriver.com>
> > > ---
> > > v2: Correct a typo in SOB in 0001
> > > v3: Use devupstream to make it more clean and clear
> > > 
> > >  meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb | 11
> > > ++++++++++-
> > >  1 file changed, 10 insertions(+), 1 deletion(-)
> > > 
> > > diff --git a/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
> > > b/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
> > > index 70a6843..dfd166a 100644
> > > --- a/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
> > > +++ b/meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb
> > > @@ -11,7 +11,6 @@ inherit module
> > >  
> > >  COMPATIBLE_HOST =
> > > '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
> > >  
> > > -#
> > > https://lttng.org/files/lttng-modules/lttng-modules-2.10.7.tar.bz2
> > >  SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
> > >             file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-
> > > not-en.patch \
> > >             file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
> > > @@ -34,3 +33,13 @@ python do_package_prepend() {
> > >          bb.warn("%s: no modules were created; this may be due to
> > > CONFIG_TRACEPOINTS not being enabled in your kernel." %
> > > d.getVar('PN'))
> > >  }
> > >  
> > > +BBCLASSEXTEND = "devupstream:target"
> > > +LIC_FILES_CHKSUM_class-devupstream =
> > > "file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128"
> > > +DEFAULT_PREFERENCE_class-devupstream = "-1"
> > > +SRC_URI_class-devupstream = "git://git.lttng.org/lttng-
> > > modules;branch=master \
> > > +           file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-
> > > not-en.patch \
> > > +           file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
> > > +           "
> > > +SRCREV_class-devupstream = "${AUTOREV}"
> > > +PV_class-devupstream = "2.11.0-rc+git${SRCPV}"
> > > +S_class-devupstream = "${WORKDIR}/git"
> > OE-Core can't access the network by default so this will need to be
> > a
> > specific SRCREV which you can set to AUTOREV in local config if
> > that
> > makes sense.
> > 
> > I've sent a separate email to openembedded-architecture about a
> > better
> > syntax for some of this but that isn't anything wrong with this
> > patch,
> > more just the way devupstream works.
> 
> Thanks. I assumed this patch was on the way to be merged. But with
> Jonathan
> Rajotte-Julien's idea coming after your comment, I want to make sure
> if there's
> anything/update I should do for the patch.

We need two things tweaking, I think we need to incorporate Jonathan's
advice on which branch to use and also not use AUTOREV here by default.

Cheers,

Richard
zhe.he@windriver.com June 17, 2019, 5:34 p.m.
This is a system generated Comment: Patch 162148 was automatically marked as superseded by patch 162239.