Skip to contentSkip to conversation

populate_sdk_base.bbclass: fix warning: name not matched

PATCH Superseded [email protected] 3 participants 4 messages May 6, 2020 – Sep 16, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 populate_sdk_base.bbclass: fix warning: name not matched

Fix below warning:
zip warning: name not matched: sysroots/aarch64-wrs-linux/etc/udev/rules.d/80-net-setup-link.rules zip warning: name not matched: sysroots/aarch64-wrs-linux/etc/tmpfiles.d/etc.conf zip warning: name not matched: sysroots/aarch64-wrs-linux/etc/tmpfiles.d/home.conf zip warning: name not matched: sysroots/aarch64-wrs-linux/etc/systemd/network/80-wired.network zip warning: name not matched: sysroots/aarch64-wrs-linux/etc/resolv.conf
zip warning: name not matched: sysroots/aarch64-wrs-linux/etc/mtab
zip warning: name not matched: sysroots/aarch64-wrs-linux/etc/resolv-conf.systemd zip warning: name not matched: sysroots/aarch64-wrs-linux/var/lock

---
 meta/classes/populate_sdk_base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/populate_sdk_base.bbclass +1 -1
index d03465b6fc..b5c004d832 100644
@@ -55,7 +55,7 @@ python () {
        d.setVar('SDK_ARCHIVE_DEPENDS', 'zip-native')
        # SDK_ARCHIVE_CMD used to generate archived sdk ${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} from input dir ${SDK_OUTPUT}/${SDKPATH} to output dir ${SDKDEPLOYDIR}
        # recommand to cd into input dir first to avoid archive with buildpath
-       d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip -r ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .')
+       d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip -r -y ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .')
     else:
        d.setVar('SDK_ARCHIVE_DEPENDS', 'xz-native')
        d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; tar ${SDKTAROPTS} -cf - . | xz -T 0 -9 > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}')
Signature · 1 line
2.23.0
#1 lore raw

Hi,

Quoted 7 lines · On Wed, 2020-05-06 at 01:46 -0700, [email protected] wrote:

Fix below warning:
zip warning: name not matched: sysroots/aarch64-wrs- linux/etc/udev/rules.d/80-net-setup-link.rules zip warning: name not matched: sysroots/aarch64-wrs- linux/etc/tmpfiles.d/etc.conf
zip warning: name not matched: sysroots/aarch64-wrs- linux/etc/tmpfiles.d/home.conf

Quoted 9 lines

zip warning: name not matched: sysroots/aarch64-wrs- linux/etc/systemd/network/80-wired.network
zip warning: name not matched: sysroots/aarch64-wrs- linux/etc/resolv.conf
zip warning: name not matched: sysroots/aarch64-wrs-linux/etc/mtab zip warning: name not matched: sysroots/aarch64-wrs-linux/etc/resolv- conf.systemd
zip warning: name not matched: sysroots/aarch64-wrs-linux/var/lock

Is this specific to zeus? I don't see this change in master/dunfell. It'd be great if you could include more details in commit message explaining what is happening.

Thanks,

Anuj

Quoted 27 lines
---
 meta/classes/populate_sdk_base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/populate_sdk_base.bbclass +0 -0
index d03465b6fc..b5c004d832 100644
@@ -55,7 +55,7 @@ python () {
        d.setVar('SDK_ARCHIVE_DEPENDS', 'zip-native')
        # SDK_ARCHIVE_CMD used to generate archived sdk

${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} from input dir ${SDK_OUTPUT}/${SDKPATH} to output dir ${SDKDEPLOYDIR}

        # recommand to cd into input dir first to avoid archive with
buildpath
meta/classes/populate_sdk_base.bbclass +1 -3
-       d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip
-r ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .')
+       d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip
-r -y ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .')
     else:
        d.setVar('SDK_ARCHIVE_DEPENDS', 'xz-native')
        d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; tar

${SDKTAROPTS} -cf - . | xz -T 0 -9 > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}')

#2 lore raw
Quoted 19 lines · Anuj

Hi,

Quoted 7 lines · On Wed, 2020-05-06 at 01:46 -0700, [email protected] wrote:

Fix below warning:
zip warning: name not matched: sysroots/aarch64-wrs- linux/etc/udev/rules.d/80-net-setup-link.rules zip warning: name not matched: sysroots/aarch64-wrs- linux/etc/tmpfiles.d/etc.conf
zip warning: name not matched: sysroots/aarch64-wrs- linux/etc/tmpfiles.d/home.conf

Quoted 9 lines

zip warning: name not matched: sysroots/aarch64-wrs- linux/etc/systemd/network/80-wired.network
zip warning: name not matched: sysroots/aarch64-wrs- linux/etc/resolv.conf
zip warning: name not matched: sysroots/aarch64-wrs-linux/etc/mtab zip warning: name not matched: sysroots/aarch64-wrs-linux/etc/resolv- conf.systemd
zip warning: name not matched: sysroots/aarch64-wrs-linux/var/lock

Quoted 3 lines

Is this specific to zeus? I don't see this change in master/dunfell. It'd be great if you could include more details in commit message explaining what is happening.

No, this issue can be seen in master too, but this patch is only to zeus, for master, I have sent patch too.

Steps:

1. Setup poky[zeus]project

2. In local.conf, add:
SDK_ARCHIVE_TYPE = "zip"

3. bitbake core-image-minimal -c populate_sdk

4.  check log file log.do_populate_sdk

Quoted 32 lines

Thanks,

Anuj

Quoted 27 lines
---
  meta/classes/populate_sdk_base.bbclass | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/populate_sdk_base.bbclass +0 -0
index d03465b6fc..b5c004d832 100644
@@ -55,7 +55,7 @@ python () {
         d.setVar('SDK_ARCHIVE_DEPENDS', 'zip-native')
         # SDK_ARCHIVE_CMD used to generate archived sdk

${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} from input dir ${SDK_OUTPUT}/${SDKPATH} to output dir ${SDKDEPLOYDIR}

         # recommand to cd into input dir first to avoid archive with
buildpath
meta/classes/populate_sdk_base.bbclass +1 -3
-       d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip
-r ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .')
+       d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip
-r -y ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .')
      else:
         d.setVar('SDK_ARCHIVE_DEPENDS', 'xz-native')
         d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; tar

${SDKTAROPTS} -cf - . | xz -T 0 -9 > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}')

Signature · 2 lines
Thanks,
Wenlin Kang
#3 lore raw

Hi,

As I understand it, the original zip format support was done so that there wouldn't be any symlinks in the sdk package.
https://git.openembedded.org/openembedded-core/commit/?id=57a33048a89a422cfdc986d3489c67b2d297e1e7

With this change the symlinks are now back again which leads to broken SDK when extracted with 7Zip.
Both commits were contributed from windriver, are you now using something else to extract the zip?

-samuli

Quoted 83 lines · On Fri, 8 May 2020 at 07:34, [email protected] <…

On 2020/5/8 上午11:04, Mittal, Anuj wrote:

Hi,

On Wed, 2020-05-06 at 01:46 -0700, [email protected] wrote:

Fix below warning:
zip warning: name not matched: sysroots/aarch64-wrs- linux/etc/udev/rules.d/80-net-setup-link.rules
zip warning: name not matched: sysroots/aarch64-wrs- linux/etc/tmpfiles.d/etc.conf
zip warning: name not matched: sysroots/aarch64-wrs- linux/etc/tmpfiles.d/home.conf
zip warning: name not matched: sysroots/aarch64-wrs- linux/etc/systemd/network/80-wired.network
zip warning: name not matched: sysroots/aarch64-wrs- linux/etc/resolv.conf
zip warning: name not matched: sysroots/aarch64-wrs-linux/etc/mtab zip warning: name not matched: sysroots/aarch64-wrs-linux/etc/resolv- conf.systemd
zip warning: name not matched: sysroots/aarch64-wrs-linux/var/lock

Is this specific to zeus? I don't see this change in master/dunfell. It'd be great if you could include more details in commit message explaining what is happening.

No, this issue can be seen in master too, but this patch is only to zeus, for master, I have sent patch too.

Steps:

1. Setup poky[zeus] project

2. In local.conf, add:
SDK_ARCHIVE_TYPE = "zip"

3. bitbake core-image-minimal -c populate_sdk

4. check log file log.do_populate_sdk

Thanks,

Anuj

---
 meta/classes/populate_sdk_base.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/populate_sdk_base.bbclass +0 -0
index d03465b6fc..b5c004d832 100644
@@ -55,7 +55,7 @@ python () {
        d.setVar('SDK_ARCHIVE_DEPENDS', 'zip-native')
        # SDK_ARCHIVE_CMD used to generate archived sdk

${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} from input dir ${SDK_OUTPUT}/${SDKPATH} to output dir ${SDKDEPLOYDIR}

        # recommand to cd into input dir first to avoid archive with
buildpath
meta/classes/populate_sdk_base.bbclass +1 -3
-       d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip
-r ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .')
+       d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; zip
-r -y ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} .')
     else:
        d.setVar('SDK_ARCHIVE_DEPENDS', 'xz-native')
        d.setVar('SDK_ARCHIVE_CMD', 'cd ${SDK_OUTPUT}/${SDKPATH}; tar

${SDKTAROPTS} -cf - . | xz -T 0 -9 > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE}')

--
Thanks,
Wenlin Kang