public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] linux-custom: Allow for config fragments in subdirs
@ 2023-10-18 13:47 Jan Kiszka
  2023-10-25  6:42 ` Uladzimir Bely
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2023-10-18 13:47 UTC (permalink / raw)
  To: isar-users

From: Jan Kiszka <jan.kiszka@siemens.com>

Might be useful in same cases, and while fetching and processing already
worked, copying didn't take subdirs into account.

Adjust the linux-mainline recipe to have a test case for this.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../linux/files/{ => subdir}/no-ubifs-fs.cfg             | 0
 meta-isar/recipes-kernel/linux/linux-mainline_5.4.203.bb | 2 +-
 meta/recipes-kernel/linux/linux-custom.inc               | 9 +++++----
 3 files changed, 6 insertions(+), 5 deletions(-)
 rename meta-isar/recipes-kernel/linux/files/{ => subdir}/no-ubifs-fs.cfg (100%)

diff --git a/meta-isar/recipes-kernel/linux/files/no-ubifs-fs.cfg b/meta-isar/recipes-kernel/linux/files/subdir/no-ubifs-fs.cfg
similarity index 100%
rename from meta-isar/recipes-kernel/linux/files/no-ubifs-fs.cfg
rename to meta-isar/recipes-kernel/linux/files/subdir/no-ubifs-fs.cfg
diff --git a/meta-isar/recipes-kernel/linux/linux-mainline_5.4.203.bb b/meta-isar/recipes-kernel/linux/linux-mainline_5.4.203.bb
index 7f1bac12..47270cbb 100644
--- a/meta-isar/recipes-kernel/linux/linux-mainline_5.4.203.bb
+++ b/meta-isar/recipes-kernel/linux/linux-mainline_5.4.203.bb
@@ -13,7 +13,7 @@ SRC_URI += " \
     https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-${ARCHIVE_VERSION}.tar.xz \
     file://x86_64_defconfig \
     file://ftpm-module.cfg \
-    file://no-ubifs-fs.cfg \
+    file://subdir/no-ubifs-fs.cfg \
     file://no-root-nfs.cfg;apply=no"
 
 SRC_URI[sha256sum] = "fc933f5b13066cfa54aacb5e86747a167bad1d8d23972e4a03ab5ee36c29798a"
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 09fb5c85..876397c3 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -210,10 +210,11 @@ EOF
 	# copy config fragments over to the kernel tree
 	src_frags="${@ " ".join(config_fragments(d)) }"
 	rm -rf ${S}/debian/fragments
-	if [ -n "${src_frags}" ]; then
-		mkdir -p ${S}/debian/fragments
-		(cd ${WORKDIR} && cp ${src_frags} ${S}/debian/fragments/)
-	fi
+	for frag in ${src_frags}; do
+		basedir=$(dirname ${frag})
+		mkdir -p ${S}/debian/fragments/${basedir}
+		cp ${WORKDIR}/${frag} ${S}/debian/fragments/${basedir}/
+	done
 }
 
 do_dpkg_source:prepend() {
-- 
2.35.3

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

* Re: [PATCH] linux-custom: Allow for config fragments in subdirs
  2023-10-18 13:47 [PATCH] linux-custom: Allow for config fragments in subdirs Jan Kiszka
@ 2023-10-25  6:42 ` Uladzimir Bely
  0 siblings, 0 replies; 2+ messages in thread
From: Uladzimir Bely @ 2023-10-25  6:42 UTC (permalink / raw)
  To: Jan Kiszka, isar-users

On Wed, 2023-10-18 at 15:47 +0200, 'Jan Kiszka' via isar-users wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Might be useful in same cases, and while fetching and processing
> already
> worked, copying didn't take subdirs into account.
> 
> Adjust the linux-mainline recipe to have a test case for this.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  .../linux/files/{ => subdir}/no-ubifs-fs.cfg             | 0
>  meta-isar/recipes-kernel/linux/linux-mainline_5.4.203.bb | 2 +-
>  meta/recipes-kernel/linux/linux-custom.inc               | 9 +++++--
> --
>  3 files changed, 6 insertions(+), 5 deletions(-)
>  rename meta-isar/recipes-kernel/linux/files/{ => subdir}/no-ubifs-
> fs.cfg (100%)
> 

Applied to next, thanks.

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

end of thread, other threads:[~2023-10-25  6:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-18 13:47 [PATCH] linux-custom: Allow for config fragments in subdirs Jan Kiszka
2023-10-25  6:42 ` Uladzimir Bely

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