From: "Peter Kjellerstedt" <peter.kjellerstedt@axis.com>
To: Robert Tiemann <rtie@gmx.de>,
"poky@lists.yoctoproject.org" <poky@lists.yoctoproject.org>
Subject: Re: [poky] Building a package of one version for target, and another version for native
Date: Fri, 28 Jan 2022 19:18:15 +0000 [thread overview]
Message-ID: <25dd33b72a0f4bfca614d3d3db72809e@axis.com> (raw)
In-Reply-To: <3d282d2e-113e-fed8-17d0-5873f6f2e281@gmx.de>
> -----Original Message-----
> From: poky@lists.yoctoproject.org <poky@lists.yoctoproject.org> On Behalf
> Of Robert Tiemann
> Sent: den 28 januari 2022 11:43
> To: poky@lists.yoctoproject.org
> Subject: [poky] Building a package of one version for target, and another
> version for native
>
> Hi!
>
> Is it possible to build packages so that the versions for native and
> target builds are different (using dunfell here)?
>
> My goal is to use gnutls and nettle in the version as shipped with
> dunfell (3.6.12 and 3.5.1, respectively) for the native tool chain,
> but a more recent version for the target. Simply upgrading the version
> for both, native and target, works, but then all RPM packages get
> rebuilt (not taken from sstate), and this is a problem for me.
>
> So, I have added recipes for upgraded versions of gnutls and nettle to
> my own layer, and in my layer's distro configuration I tried
>
> PREFERRED_VERSION_gnutls-native = "3.6.12"
> PREFERRED_VERSION_nettle-native = "3.5.1"
That's the correct format. Not sure why it doesn't work though.
It might have to do with how BBCLASSEXTEND works.
>
> and
>
> PREFERRED_VERSION_pn-gnutls-native = "3.6.12"
> PREFERRED_VERSION_pn-nettle-native = "3.5.1"
>
> and also
>
> PREFERRED_VERSION_gnutls-native_forcevariable = "3.6.12"
> PREFERRED_VERSION_nettle-native_forcevariable = "3.5.1"
>
> and
>
> PREFERRED_VERSION_pn-gnutls-native_forcevariable = "3.6.12"
> PREFERRED_VERSION_pn-nettle-native_forcevariable = "3.5.1"
>
> but all of these seem to get ignored. I always end up with the more
> recent versions for the native builds.
>
> What is it what I am missing here?
>
> Cheers,
> Robert
One solution is to also copy the gnutls_3.6.12.bb recipe to
your own layer and rename it to gnutls-native_3.6.12.bb and
add an inherit of native to it.
Another solution is to instead use a bbappend. It should be
a versioned bbapend, i.e., gnutls_3.6.12.bbappend so in case
you or someone else decide to upgrade to a newer version of
Dunfell (which has a newer version of gnutls), you will get
a build error and know you have to take care of it. Something
like this should do it:
PV_class-target = "3.6.14"
SRC_URI_append_class-target = " \
file://0001-Modied-the-license-to-GPLv2.1-to-keep-with-LICENSE-f.patch \
file://CVE-2020-24659.patch \
file://CVE-2021-20231.patch \
file://CVE-2021-20232.patch \
"
MD5SUM = "a23900f14980a467bdce3a0fd31dfa18"
MD5SUM_class-target = "..."
SRC_URI[md5sum] = "${MD5SUM}"
SHA256SUM = "bfacf16e342949ffd977a9232556092c47164bd26e166736cf3459a870506c4b"
SHA256SUM_class-target = "..."
SRC_URI[sha256sum] = "${SHA256SUM}"
and any other adaptations that are needed to cater to differences
between the two recipe versions. The patches you can pick up from
dunfell-23.0.9 or later.
//Peter
next prev parent reply other threads:[~2022-01-28 19:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 10:42 Building a package of one version for target, and another version for native Robert Tiemann
2022-01-28 19:18 ` Peter Kjellerstedt [this message]
2022-02-08 11:36 ` [poky] " Robert Tiemann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=25dd33b72a0f4bfca614d3d3db72809e@axis.com \
--to=peter.kjellerstedt@axis.com \
--cc=poky@lists.yoctoproject.org \
--cc=rtie@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.