Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] archiver.bbclass: Improve work-shared checking
@ 2023-12-11 15:13 liezhi.yang
  2023-12-11 15:13 ` [PATCH 1/1] " liezhi.yang
  0 siblings, 1 reply; 6+ messages in thread
From: liezhi.yang @ 2023-12-11 15:13 UTC (permalink / raw)
  To: openembedded-core

From: Robert Yang <liezhi.yang@windriver.com>

The following changes since commit 564339afb73fc52a66c1a08437587cad1c4d46e7:

  useradd: Fix useradd do_populate_sysroot dependency bug (2023-12-10 09:23:58 +0000)

are available in the Git repository at:

  https://github.com/robertlinux/yocto rbt/archiver
  https://github.com/robertlinux/yocto/tree/rbt/archiver

Robert Yang (1):
  archiver.bbclass: Improve work-shared checking

 meta/classes/archiver.bbclass | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

-- 
2.42.0



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

* [PATCH 1/1] archiver.bbclass: Improve work-shared checking
  2023-12-11 15:13 [PATCH 0/1] archiver.bbclass: Improve work-shared checking liezhi.yang
@ 2023-12-11 15:13 ` liezhi.yang
  2024-06-05 21:04   ` Livius
  0 siblings, 1 reply; 6+ messages in thread
From: liezhi.yang @ 2023-12-11 15:13 UTC (permalink / raw)
  To: openembedded-core

From: Robert Yang <liezhi.yang@windriver.com>

There are other recipes except the listed ones which use work-shared, improve
the checking to make other recipes such as llvm-project-source work with
do_ar_patched.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 meta/classes/archiver.bbclass | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index 0eee1abefab..80a69cf31db 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -468,10 +468,8 @@ def create_diff_gz(d, src_orig, src, ar_outdir):
         os.chdir(cwd)
 
 def is_work_shared(d):
-    pn = d.getVar('PN')
-    return pn.startswith('gcc-source') or \
-        bb.data.inherits_class('kernel', d) or \
-        (bb.data.inherits_class('kernelsrc', d) and d.expand("${TMPDIR}/work-shared") in d.getVar('S'))
+    sharedworkdir = os.path.join(d.getVar('TMPDIR'), 'work-shared')
+    return d.getVar('S').startswith(sharedworkdir)
 
 # Run do_unpack and do_patch
 python do_unpack_and_patch() {
-- 
2.42.0



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

* Re: [PATCH 1/1] archiver.bbclass: Improve work-shared checking
  2023-12-11 15:13 ` [PATCH 1/1] " liezhi.yang
@ 2024-06-05 21:04   ` Livius
  2024-06-05 21:06     ` Livius
       [not found]     ` <Groupsio.1.24041.1717621460219935507@lists.openembedded.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Livius @ 2024-06-05 21:04 UTC (permalink / raw)
  To: openembedded-core

Hi,

https://github.com/openembedded/openembedded-core/commit/5fbb4ca8da4f4f1ea426275c45634802dcb5a575

This patch caused something terrible wrong behavior, because ".../work-shared/<MACHINE>/kernel-source/" directory is totally empty and the complete Linux kernel source is missing if INHERIT += "archiver" is used in local.conf file. Please fix it and if there any workaround please send it because at the moment without usage of INHERIT += "archiver" Yocto scarthgap build is working but with use it, all the time it failed to compile Linux kernel because git symbolic folder which linked to kernel-source is totally empty in this case in linux working directory.

I use the following settings when i try to making archives but it is failed to build/fetch kernel source to kernel-source directory (it was fine to use in nanbield release before).

INHERIT += "archiver"
ARCHIVER_MODE[src] = "patched"
ARCHIVER_MODE[compression] = "bz2"
ARCHIVER_MODE[mirror] = "combined"
COPYLEFT_RECIPE_TYPES = "target"
COPYLEFT_AVAILABLE_RECIPE_TYPES = "target"

# Don't filter the license
COPYLEFT_LICENSE_INCLUDE = ""
COPYLEFT_LICENSE_EXCLUDE = ""

# Deploy licenses
COPY_LIC_MANIFEST = "1"
COPY_LIC_DIRS = "1"
LICENSE_CREATE_PACKAGE = "1"


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

* Re: [PATCH 1/1] archiver.bbclass: Improve work-shared checking
  2024-06-05 21:04   ` Livius
@ 2024-06-05 21:06     ` Livius
       [not found]     ` <Groupsio.1.24041.1717621460219935507@lists.openembedded.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Livius @ 2024-06-05 21:06 UTC (permalink / raw)
  To: openembedded-core

Hi,

https://github.com/openembedded/openembedded-core/commit/5fbb4ca8da4f4f1ea426275c45634802dcb5a575

This patch caused something terrible wrong behavior, because ".../work-shared/<MACHINE>/kernel-source/" directory is totally empty and the complete Linux kernel source is missing if INHERIT += "archiver" is used in local.conf file. Please fix it and if there any workaround please send it because at the moment without usage of INHERIT += "archiver" Yocto scarthgap build is working but with use it, all the time it failed to compile Linux kernel because git symbolic folder which linked to kernel-source is totally empty in this case in linux working directory.

I use the following settings when i try to making archives but it is failed to fetch kernel source to kernel-source directory (it was fine to use in nanbield release before).

INHERIT += "archiver"
ARCHIVER_MODE[src] = "patched"
ARCHIVER_MODE[compression] = "bz2"
ARCHIVER_MODE[mirror] = "combined"
COPYLEFT_RECIPE_TYPES = "target"
COPYLEFT_AVAILABLE_RECIPE_TYPES = "target"

# Don't filter the license
COPYLEFT_LICENSE_INCLUDE = ""
COPYLEFT_LICENSE_EXCLUDE = ""

# Deploy licenses
COPY_LIC_MANIFEST = "1"
COPY_LIC_DIRS = "1"
LICENSE_CREATE_PACKAGE = "1"


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

* Re: [OE-core] [PATCH 1/1] archiver.bbclass: Improve work-shared checking
       [not found]     ` <Groupsio.1.24041.1717621460219935507@lists.openembedded.org>
@ 2024-06-06  9:51       ` Robert Yang
  2024-06-06 10:46         ` Livius
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2024-06-06  9:51 UTC (permalink / raw)
  To: Livius, openembedded-core

Hi Livius,

On 6/6/24 05:06, Livius wrote:
> [Edited Message Follows]
> 
> Hi,
> 
> https://github.com/openembedded/openembedded-core/commit/5fbb4ca8da4f4f1ea426275c45634802dcb5a575
> 
> This patch caused something terrible wrong behavior, because ".../work-shared/<MACHINE>/kernel-source/" directory is totally empty and the complete Linux kernel source is missing if INHERIT += "archiver" is used in local.conf file. Please fix it and if there any workaround please send it because at the moment without usage of INHERIT += "archiver" Yocto scarthgap build is working but with use it, all the time it failed to compile Linux kernel because git symbolic folder which linked to kernel-source is totally empty in this case in linux working directory.
> 
> I use the following settings when i try to making archives but it is failed to fetch kernel source to kernel-source directory (it was fine to use in nanbield release before).
> 
> INHERIT += "archiver"
> ARCHIVER_MODE[src] = "patched"
> ARCHIVER_MODE[compression] = "bz2"
> ARCHIVER_MODE[mirror] = "combined"
> COPYLEFT_RECIPE_TYPES = "target"
> COPYLEFT_AVAILABLE_RECIPE_TYPES = "target"
> 
> # Don't filter the license
> COPYLEFT_LICENSE_INCLUDE = ""
> COPYLEFT_LICENSE_EXCLUDE = ""
> 
> # Deploy licenses
> COPY_LIC_MANIFEST = "1"
> COPY_LIC_DIRS = "1"
> LICENSE_CREATE_PACKAGE = "1"

I added the above settings to conf/layer.conf, and started a fresh build on
scarthgap branch, it works well for me:

commit ae6cebca5bac9521230c69fed23b375d0de7f5f6 (HEAD -> scarthgap, 
origin/scarthgap)

$ bitbake linux-yocto

$ ls tmp/deploy/images/qemux86-64/* -1
tmp/deploy/images/qemux86-64/bzImage
tmp/deploy/images/qemux86-64/bzImage--6.6.23+git0+f7f00b22ef_2d01bc1d4e-r0-qemux86-64-20240606092927.bin
tmp/deploy/images/qemux86-64/bzImage-qemux86-64.bin
tmp/deploy/images/qemux86-64/modules--6.6.23+git0+f7f00b22ef_2d01bc1d4e-r0-qemux86-64-20240606092927.tgz
tmp/deploy/images/qemux86-64/modules-qemux86-64.tgz

$ du -sh 
tmp/deploy/sources/x86_64-poky-linux/linux-yocto-6.6.23+git-r0/linux-yocto-6.6.23+
git-r0-patched.tar.bz2
168M 
tmp/deploy/sources/x86_64-poky-linux/linux-yocto-6.6.23+git-r0/linux-yocto-6.6.23+git-r0-patched.tar.bz2

// Robert

> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#200381): https://lists.openembedded.org/g/openembedded-core/message/200381
> Mute This Topic: https://lists.openembedded.org/mt/103110276/7304958
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [liezhi.yang@eng.windriver.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


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

* Re: [PATCH 1/1] archiver.bbclass: Improve work-shared checking
  2024-06-06  9:51       ` [OE-core] " Robert Yang
@ 2024-06-06 10:46         ` Livius
  0 siblings, 0 replies; 6+ messages in thread
From: Livius @ 2024-06-06 10:46 UTC (permalink / raw)
  To: openembedded-core

It seems to me i found, when it can not work well.
I use linux-fslc recipe from meta-freescale which redefining somewhy source directory in linux-imx.inc file.

https://github.com/Freescale/meta-freescale/blob/master/recipes-kernel/linux/linux-imx.inc#L22
S = "${WORKDIR}/git"

In kernel.bbclass it is the default S = "${STAGING_KERNEL_DIR}" value. This patch should work well only if the linux-kernel recipe use the default source dir as STAGING_KERNEL_DIR. If any other BSP provider company uses for example S = "${WORKDIR}/git", their linux-kernel recipe build/compiling will be failed in case of use archiver class.


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

end of thread, other threads:[~2024-06-06 10:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-11 15:13 [PATCH 0/1] archiver.bbclass: Improve work-shared checking liezhi.yang
2023-12-11 15:13 ` [PATCH 1/1] " liezhi.yang
2024-06-05 21:04   ` Livius
2024-06-05 21:06     ` Livius
     [not found]     ` <Groupsio.1.24041.1717621460219935507@lists.openembedded.org>
2024-06-06  9:51       ` [OE-core] " Robert Yang
2024-06-06 10:46         ` Livius

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox