* [PATCH] rpm: make rpm work in toolchain.
@ 2019-09-09 10:56 Zheng Ruoqin
2019-09-09 11:07 ` Alexander Kanavin
2019-09-09 11:08 ` Zheng, Ruoqin
0 siblings, 2 replies; 11+ messages in thread
From: Zheng Ruoqin @ 2019-09-09 10:56 UTC (permalink / raw)
To: openembedded-core
We need to configure rpm to use package architecture from yocto build
system.
Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
---
meta/recipes-devtools/rpm/rpm_4.14.2.1.bb | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb b/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
index 063f4269a5..af8e144f96 100644
--- a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
@@ -102,6 +102,9 @@ do_install_append_class-native() {
done
}
+REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}"
+SDKTARGETSYSROOT = "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}"
+
do_install_append_class-nativesdk() {
for tool in ${WRAPPER_TOOLS}; do
create_wrapper ${D}$tool \
@@ -112,6 +115,16 @@ do_install_append_class-nativesdk() {
done
rm -rf ${D}/var
+ install -d ${D}/${SDKTARGETSYSROOT}/etc/rpm
+
+ cat >${D}/${SDKTARGETSYSROOT}/etc/rpmrc <<EOF
+arch_compat: ${MACHINE_ARCH}: ${PACKAGE_ARCHS}
+EOF
+ sed -i 's/-nativesdk//g' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc
+ sed -i 's/-/_/' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc
+ cat >${D}/${SDKTARGETSYSROOT}/etc/rpm/platform <<EOF
+${MACHINE_ARCH}-pc-linux
+EOF
}
# Rpm's make install creates var/tmp which clashes with base-files packaging
@@ -133,6 +146,8 @@ FILES_${PN} += "${libdir}/rpm-plugins/*.so \
FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \
"
+FILES_${PN}_append_class-nativesdk += "${SDKTARGETSYSROOT}"
+
PACKAGES += "python3-rpm"
PROVIDES += "python3-rpm"
--
2.17.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH] rpm: make rpm work in toolchain.
2019-09-09 10:56 [PATCH] rpm: make rpm work in toolchain Zheng Ruoqin
@ 2019-09-09 11:07 ` Alexander Kanavin
2019-09-09 11:19 ` Zheng, Ruoqin
2019-09-09 11:08 ` Zheng, Ruoqin
1 sibling, 1 reply; 11+ messages in thread
From: Alexander Kanavin @ 2019-09-09 11:07 UTC (permalink / raw)
To: Zheng Ruoqin; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 793 bytes --]
On Mon, 9 Sep 2019 at 12:58, Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
wrote:
> rm -rf ${D}/var
> + install -d ${D}/${SDKTARGETSYSROOT}/etc/rpm
>
Why not simply ${D}/etc/rpm?
> + sed -i 's/-nativesdk//g' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc
> + sed -i 's/-/_/' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc
>
What do these two sed commands do? If we create /etc/rpmrc just above, can
it have the right content from the beginning?
"
> +FILES_${PN}_append_class-nativesdk += "${SDKTARGETSYSROOT}"
>
Same question: why is ${SDKTARGETSYSROOT} needed? The configuration files
should be in /etc, and rpm should be instructed to pick them up from there,
same way as it is done for -native variant when building an image.
Alex
[-- Attachment #2: Type: text/html, Size: 1499 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rpm: make rpm work in toolchain.
2019-09-09 10:56 [PATCH] rpm: make rpm work in toolchain Zheng Ruoqin
2019-09-09 11:07 ` Alexander Kanavin
@ 2019-09-09 11:08 ` Zheng, Ruoqin
2019-09-09 11:17 ` Alexander Kanavin
1 sibling, 1 reply; 11+ messages in thread
From: Zheng, Ruoqin @ 2019-09-09 11:08 UTC (permalink / raw)
To: openembedded-core
Hi Alex
I'd like to explain the path ${SDKTARGETSYSROOT} in this patch.
As you see, ${SDKTARGETSYSROOT} for x86_64 is /opt/poky/2.7+snapshot/sysroots/core2-64-pokysdk-linux.
I make it because config file in host-sysroot as /opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux will be covered by another ARCH.
For example, first install SDK for x86_64, and next install SDK for x86, as host-sysroot is same, the same config file will be covered. In that case config settings for x86_64 will be inefficacy.
To resolve that problem, I put config file in target-sysroot like /opt/poky/2.7+snapshot/sysroots/core2-64-poky-linux. As each ARCH has its own target-sysroot, config file will not be covered.
--
--------------------------------------------------
Zheng Ruoqin
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
ADDR.: No.6 Wenzhu Road, Software Avenue,
Nanjing, 210012, China
MAIL : zhengrq.fnst@cn.fujistu.com
> -----Original Message-----
> From: Zheng, Ruoqin/郑 若钦
> Sent: Monday, September 09, 2019 6:57 PM
> To: openembedded-core@lists.openembedded.org
> Cc: Zheng, Ruoqin/郑 若钦 <zhengrq.fnst@cn.fujitsu.com>
> Subject: [OE-core][PATCH] rpm: make rpm work in toolchain.
>
> We need to configure rpm to use package architecture from yocto build system.
>
> Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
> ---
> meta/recipes-devtools/rpm/rpm_4.14.2.1.bb | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb b/meta/recipes-
> devtools/rpm/rpm_4.14.2.1.bb
> index 063f4269a5..af8e144f96 100644
> --- a/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
> +++ b/meta/recipes-devtools/rpm/rpm_4.14.2.1.bb
> @@ -102,6 +102,9 @@ do_install_append_class-native() {
> done
> }
>
> +REAL_MULTIMACH_TARGET_SYS = "${TUNE_PKGARCH}${TARGET_VENDOR}-
> ${TARGET_OS}"
> +SDKTARGETSYSROOT =
> "${SDKPATH}/sysroots/${REAL_MULTIMACH_TARGET_SYS}"
> +
> do_install_append_class-nativesdk() {
> for tool in ${WRAPPER_TOOLS}; do
> create_wrapper ${D}$tool \ @@ -112,6 +115,16 @@
> do_install_append_class-nativesdk() {
> done
>
> rm -rf ${D}/var
> + install -d ${D}/${SDKTARGETSYSROOT}/etc/rpm
> +
> + cat >${D}/${SDKTARGETSYSROOT}/etc/rpmrc <<EOF
> +arch_compat: ${MACHINE_ARCH}: ${PACKAGE_ARCHS} EOF
> + sed -i 's/-nativesdk//g' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc
> + sed -i 's/-/_/' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc
> + cat >${D}/${SDKTARGETSYSROOT}/etc/rpm/platform <<EOF
> +${MACHINE_ARCH}-pc-linux EOF
> }
>
> # Rpm's make install creates var/tmp which clashes with base-files packaging
> @@ -133,6 +146,8 @@ FILES_${PN} += "${libdir}/rpm-plugins/*.so \
>
> FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \
> "
> +FILES_${PN}_append_class-nativesdk += "${SDKTARGETSYSROOT}"
> +
>
> PACKAGES += "python3-rpm"
> PROVIDES += "python3-rpm"
> --
> 2.17.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rpm: make rpm work in toolchain.
2019-09-09 11:08 ` Zheng, Ruoqin
@ 2019-09-09 11:17 ` Alexander Kanavin
0 siblings, 0 replies; 11+ messages in thread
From: Alexander Kanavin @ 2019-09-09 11:17 UTC (permalink / raw)
To: Zheng, Ruoqin; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 899 bytes --]
On Mon, 9 Sep 2019 at 13:08, Zheng, Ruoqin <zhengrq.fnst@cn.fujitsu.com>
wrote:
> I'd like to explain the path ${SDKTARGETSYSROOT} in this patch.
>
> As you see, ${SDKTARGETSYSROOT} for x86_64 is
> /opt/poky/2.7+snapshot/sysroots/core2-64-pokysdk-linux.
>
> I make it because config file in host-sysroot as
> /opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux will be covered by
> another ARCH.
> For example, first install SDK for x86_64, and next install SDK for x86,
> as host-sysroot is same, the same config file will be covered. In that case
> config settings for x86_64 will be inefficacy.
>
> To resolve that problem, I put config file in target-sysroot like
> /opt/poky/2.7+snapshot/sysroots/core2-64-poky-linux. As each ARCH has its
> own target-sysroot, config file will not be covered.
>
I see, thanks. Can you add this information to the patch please?
Alex
[-- Attachment #2: Type: text/html, Size: 1208 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rpm: make rpm work in toolchain.
2019-09-09 11:07 ` Alexander Kanavin
@ 2019-09-09 11:19 ` Zheng, Ruoqin
2019-09-09 13:06 ` Alexander Kanavin
0 siblings, 1 reply; 11+ messages in thread
From: Zheng, Ruoqin @ 2019-09-09 11:19 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 2506 bytes --]
Hi Alex
I’d like to explain it.
->Why not simply ${D}/etc/rpm?
As you see, ${SDKTARGETSYSROOT} for x86_64 is /opt/poky/2.7+snapshot/sysroots/core2-64-pokysdk-linux.
I make it because config file in host-sysroot as /opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux will be covered by another ARCH.
For example, first install SDK for x86_64, and next install SDK for x86, as host-sysroot is same, the same config file will be covered. In that case config settings for x86_64 will be inefficacy.
To resolve that problem, I put config file in target-sysroot like /opt/poky/2.7+snapshot/sysroots/core2-64-poky-linux. As each ARCH has its own target-sysroot, config file will not be covered.
That was also why I put config file in meta-environment in last patch.
->What do these two sed commands do? If we create /etc/rpmrc just above, can it have the right content from the beginning?
Well, in the environment in Yocto Build system, the value of ${PACKAGE_ARCHS} include “–nativesdk” as not needed in SDK environment.
And the ARCH name of core2-64 rpm is core2_64 like rpm-4.14.2.1-r0.core2_64.rpm.
So I modify the ARCH name in etc/rpmrc.
--------------------------------------------------
Zheng Ruoqin
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
ADDR.: No.6 Wenzhu Road, Software Avenue,
Nanjing, 210012, China
MAIL : zhengrq.fnst@cn.fujistu.com
From: Alexander Kanavin [mailto:alex.kanavin@gmail.com]
Sent: Monday, September 09, 2019 7:07 PM
To: Zheng, Ruoqin/郑 若钦 <zhengrq.fnst@cn.fujitsu.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH] rpm: make rpm work in toolchain.
On Mon, 9 Sep 2019 at 12:58, Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com<mailto:zhengrq.fnst@cn.fujitsu.com>> wrote:
rm -rf ${D}/var
+ install -d ${D}/${SDKTARGETSYSROOT}/etc/rpm
Why not simply ${D}/etc/rpm?
+ sed -i 's/-nativesdk//g' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc
+ sed -i 's/-/_/' ${D}/${SDKTARGETSYSROOT}/etc/rpmrc
What do these two sed commands do? If we create /etc/rpmrc just above, can it have the right content from the beginning?
"
+FILES_${PN}_append_class-nativesdk += "${SDKTARGETSYSROOT}"
Same question: why is ${SDKTARGETSYSROOT} needed? The configuration files should be in /etc, and rpm should be instructed to pick them up from there, same way as it is done for -native variant when building an image.
Alex
[-- Attachment #2: Type: text/html, Size: 9260 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rpm: make rpm work in toolchain.
2019-09-09 11:19 ` Zheng, Ruoqin
@ 2019-09-09 13:06 ` Alexander Kanavin
2019-09-09 23:53 ` Zheng, Ruoqin
2019-09-10 8:06 ` Zheng, Ruoqin
0 siblings, 2 replies; 11+ messages in thread
From: Alexander Kanavin @ 2019-09-09 13:06 UTC (permalink / raw)
To: Zheng, Ruoqin; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 645 bytes --]
On Mon, 9 Sep 2019 at 13:19, Zheng, Ruoqin <zhengrq.fnst@cn.fujitsu.com>
wrote:
> ->What do these two sed commands do? If we create /etc/rpmrc just above,
> can it have the right content from the beginning?
>
>
>
> Well, in the environment in Yocto Build system, the value of
> ${PACKAGE_ARCHS} include “–nativesdk” as not needed in SDK environment.
>
> And the ARCH name of core2-64 rpm is core2_64 like
> rpm-4.14.2.1-r0.core2_64.rpm.
>
> So I modify the ARCH name in etc/rpmrc.
>
Thanks, can you put a comment in front of the sed commands explaining that?
It would be useful to anyone who reads the recipe.
Alex
[-- Attachment #2: Type: text/html, Size: 1281 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rpm: make rpm work in toolchain.
2019-09-09 13:06 ` Alexander Kanavin
@ 2019-09-09 23:53 ` Zheng, Ruoqin
2019-09-10 8:06 ` Zheng, Ruoqin
1 sibling, 0 replies; 11+ messages in thread
From: Zheng, Ruoqin @ 2019-09-09 23:53 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]
Hi Alex:
Ok, I will send a V3 patch.
--------------------------------------------------
Zheng Ruoqin
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
ADDR.: No.6 Wenzhu Road, Software Avenue,
Nanjing, 210012, China
MAIL : zhengrq.fnst@cn.fujistu.com
From: Alexander Kanavin [mailto:alex.kanavin@gmail.com]
Sent: Monday, September 09, 2019 9:07 PM
To: Zheng, Ruoqin/郑 若钦 <zhengrq.fnst@cn.fujitsu.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH] rpm: make rpm work in toolchain.
On Mon, 9 Sep 2019 at 13:19, Zheng, Ruoqin <zhengrq.fnst@cn.fujitsu.com<mailto:zhengrq.fnst@cn.fujitsu.com>> wrote:
->What do these two sed commands do? If we create /etc/rpmrc just above, can it have the right content from the beginning?
Well, in the environment in Yocto Build system, the value of ${PACKAGE_ARCHS} include “–nativesdk” as not needed in SDK environment.
And the ARCH name of core2-64 rpm is core2_64 like rpm-4.14.2.1-r0.core2_64.rpm.
So I modify the ARCH name in etc/rpmrc.
Thanks, can you put a comment in front of the sed commands explaining that? It would be useful to anyone who reads the recipe.
Alex
[-- Attachment #2: Type: text/html, Size: 6031 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rpm: make rpm work in toolchain.
2019-09-09 13:06 ` Alexander Kanavin
2019-09-09 23:53 ` Zheng, Ruoqin
@ 2019-09-10 8:06 ` Zheng, Ruoqin
2019-09-10 10:53 ` Alexander Kanavin
1 sibling, 1 reply; 11+ messages in thread
From: Zheng, Ruoqin @ 2019-09-10 8:06 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 1703 bytes --]
Hi Alex
Now I have a question after a test.
In last patch, I put the config file in meta-environment as its do_install task is in the target environment which means the value of ${PACKAGE_ARCHS} is right.
And it finally produce a nativesdk package.
If I put the config file in nativesdk-rpm, the value of ${PACKAGE_ARCHS} will always be “all any noarch x86_64-nativesdk” which is not suitable for x86, arm and other ARCHS.
So I’d like to put config file in the rpm of meta-environment. Did you have any good Suggestions?
--------------------------------------------------
Zheng Ruoqin
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
ADDR.: No.6 Wenzhu Road, Software Avenue,
Nanjing, 210012, China
MAIL : zhengrq.fnst@cn.fujistu.com
From: Alexander Kanavin [mailto:alex.kanavin@gmail.com]
Sent: Monday, September 09, 2019 9:07 PM
To: Zheng, Ruoqin/郑 若钦 <zhengrq.fnst@cn.fujitsu.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH] rpm: make rpm work in toolchain.
On Mon, 9 Sep 2019 at 13:19, Zheng, Ruoqin <zhengrq.fnst@cn.fujitsu.com<mailto:zhengrq.fnst@cn.fujitsu.com>> wrote:
->What do these two sed commands do? If we create /etc/rpmrc just above, can it have the right content from the beginning?
Well, in the environment in Yocto Build system, the value of ${PACKAGE_ARCHS} include “–nativesdk” as not needed in SDK environment.
And the ARCH name of core2-64 rpm is core2_64 like rpm-4.14.2.1-r0.core2_64.rpm.
So I modify the ARCH name in etc/rpmrc.
Thanks, can you put a comment in front of the sed commands explaining that? It would be useful to anyone who reads the recipe.
Alex
[-- Attachment #2: Type: text/html, Size: 7556 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rpm: make rpm work in toolchain.
2019-09-10 8:06 ` Zheng, Ruoqin
@ 2019-09-10 10:53 ` Alexander Kanavin
2019-09-10 11:55 ` Zheng, Ruoqin
0 siblings, 1 reply; 11+ messages in thread
From: Alexander Kanavin @ 2019-09-10 10:53 UTC (permalink / raw)
To: Zheng, Ruoqin; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 892 bytes --]
On Tue, 10 Sep 2019 at 10:07, Zheng, Ruoqin <zhengrq.fnst@cn.fujitsu.com>
wrote:
> In last patch, I put the config file in meta-environment as its do_install
> task is in the target environment which means the value of ${PACKAGE_ARCHS}
> is right.
>
> And it finally produce a nativesdk package.
>
>
>
> If I put the config file in nativesdk-rpm, the value of ${PACKAGE_ARCHS}
> will always be “all any noarch x86_64-nativesdk” which is not suitable for
> x86, arm and other ARCHS.
>
>
>
> So I’d like to put config file in the rpm of meta-environment. Did you
> have any good Suggestions?
>
You probably need to use the post-relocate-setup.d/ facility, like the
nativesdk-meson recipe does. I am not sure if PACKAGE_ARCHS is accessible
from it, but it does seem like the right mechanism for tweaking settings
that are specific to nativesdk packages.
Alex
[-- Attachment #2: Type: text/html, Size: 2038 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rpm: make rpm work in toolchain.
2019-09-10 10:53 ` Alexander Kanavin
@ 2019-09-10 11:55 ` Zheng, Ruoqin
2019-09-10 13:18 ` Alexander Kanavin
0 siblings, 1 reply; 11+ messages in thread
From: Zheng, Ruoqin @ 2019-09-10 11:55 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 3114 bytes --]
Hi Alex
->You probably need to use the post-relocate-setup.d/ facility, like the nativesdk-meson recipe does. I am not sure if ->PACKAGE_ARCHS is accessible from it, but it does seem like the right mechanism for tweaking settings that are ->specific to nativesdk packages.
1. About ${PACKAGE_ARCHS}
Well, for nativesdk packages ${PACKAGE_ARCHS} is accessible from nativesdk.bbclass, and it equals
PACKAGE_ARCHS = "${SDK_PACKAGE_ARCHS}"
SDK_PACKAGE_ARCHS = "all any noarch ${SDK_ARCH}-${SDKPKGSUFFIX}"
Which will not be changed for different ARCH.
While target packages ${PACKAGE_ARCHS} is accessible from base.bbclass, and the value is suitable for different ARCH.
2. About post-relocate-setup.d
And usually, tweaking settings are specific to nativesdk packages. But Even if I use the post-relocate-setup.d/ facility, as the value of ${MACHINE_ARCH} is not provided in SDK, so it will not work for target packages.
To skip it, I have to write arch info in config file explicitly for different target ARCH as only meta-environment has a similar implementation.
3. Actually, my first plan is to write ${MACHINE_ARCH} in toolchain, but it was rejected
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -101,6 +101,7 @@ toolchain_shared_env_script () {
echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
echo 'export KCFLAGS="--sysroot=$SDKTARGETSYSROOT"' >> $script
echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script
+ echo 'export MACHINE_ARCH=${MACHINE_ARCH}' >> $script
echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
I guess if it can work, maybe post-relocate-setup.d/ facility will be usefull.
--------------------------------------------------
Zheng Ruoqin
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
ADDR.: No.6 Wenzhu Road, Software Avenue,
Nanjing, 210012, China
MAIL : zhengrq.fnst@cn.fujistu.com
From: Alexander Kanavin [mailto:alex.kanavin@gmail.com]
Sent: Tuesday, September 10, 2019 6:53 PM
To: Zheng, Ruoqin/郑 若钦 <zhengrq.fnst@cn.fujitsu.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH] rpm: make rpm work in toolchain.
On Tue, 10 Sep 2019 at 10:07, Zheng, Ruoqin <zhengrq.fnst@cn.fujitsu.com<mailto:zhengrq.fnst@cn.fujitsu.com>> wrote:
In last patch, I put the config file in meta-environment as its do_install task is in the target environment which means the value of ${PACKAGE_ARCHS} is right.
And it finally produce a nativesdk package.
If I put the config file in nativesdk-rpm, the value of ${PACKAGE_ARCHS} will always be “all any noarch x86_64-nativesdk” which is not suitable for x86, arm and other ARCHS.
So I’d like to put config file in the rpm of meta-environment. Did you have any good Suggestions?
You probably need to use the post-relocate-setup.d/ facility, like the nativesdk-meson recipe does. I am not sure if PACKAGE_ARCHS is accessible from it, but it does seem like the right mechanism for tweaking settings that are specific to nativesdk packages.
Alex
[-- Attachment #2: Type: text/html, Size: 21751 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] rpm: make rpm work in toolchain.
2019-09-10 11:55 ` Zheng, Ruoqin
@ 2019-09-10 13:18 ` Alexander Kanavin
0 siblings, 0 replies; 11+ messages in thread
From: Alexander Kanavin @ 2019-09-10 13:18 UTC (permalink / raw)
To: Zheng, Ruoqin; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 983 bytes --]
On Tue, 10 Sep 2019 at 13:56, Zheng, Ruoqin <zhengrq.fnst@cn.fujitsu.com>
wrote:
> 3. Actually, my first plan is to write ${MACHINE_ARCH} in toolchain, but
> it was rejected
>
> +++ b/meta/classes/toolchain-scripts.bbclass
>
> @@ -101,6 +101,7 @@ toolchain_shared_env_script () {
>
> echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
>
> echo 'export KCFLAGS="--sysroot=$SDKTARGETSYSROOT"' >> $script
>
> echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script
>
> + echo 'export MACHINE_ARCH=${MACHINE_ARCH}' >> $script
>
> echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
>
>
>
> I guess if it can work, maybe post-relocate-setup.d/ facility will be
> usefull.
>
What I would like to avoid is placing rpm-specific things into SDK recipes
that have nothing to do with rpm. So please investigate
post-relocate-setup.d/, and if it is not good enough, we can perhaps extend
it.
Alex
[-- Attachment #2: Type: text/html, Size: 2902 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2019-09-10 13:18 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-09 10:56 [PATCH] rpm: make rpm work in toolchain Zheng Ruoqin
2019-09-09 11:07 ` Alexander Kanavin
2019-09-09 11:19 ` Zheng, Ruoqin
2019-09-09 13:06 ` Alexander Kanavin
2019-09-09 23:53 ` Zheng, Ruoqin
2019-09-10 8:06 ` Zheng, Ruoqin
2019-09-10 10:53 ` Alexander Kanavin
2019-09-10 11:55 ` Zheng, Ruoqin
2019-09-10 13:18 ` Alexander Kanavin
2019-09-09 11:08 ` Zheng, Ruoqin
2019-09-09 11:17 ` Alexander Kanavin
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.