* [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix
@ 2024-05-17 16:35 Jan Kiszka
2024-05-17 16:35 ` [PATCH v3 1/5] dpkg-base: Fix enabling of cross build profile Jan Kiszka
` (6 more replies)
0 siblings, 7 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-05-17 16:35 UTC (permalink / raw)
To: isar-users
Cc: Felix Moessbauer, stefan-koch, Adriaan Schmidt, Anton Mikanovich
This depends on [1] and [2] and replaces [3].
Changes in v3:
- avoid anything but source package fetching for non-base targets
- fix regression of kbuildtarget
Jan
[1] https://patchwork.isar-build.org/project/isar/list/?series=1184
[2] https://patchwork.isar-build.org/project/isar/list/?series=1188
[3] https://patchwork.isar-build.org/project/isar/list/?series=1171
Jan Kiszka (5):
dpkg-base: Fix enabling of cross build profile
linux-custom: Model cross-built kbuild package separately
linux-custom: Resolve native source package differences
dpkg: Retrieve Debian source name from variable
dpkg-source: Build source package only once
meta/classes/dpkg-base.bbclass | 6 +-
meta/classes/dpkg-prebuilt.bbclass | 7 +--
meta/classes/dpkg-source.bbclass | 56 ++++++++++++++++---
meta/classes/dpkg.bbclass | 6 +-
.../linux/files/debian/control.tmpl | 12 +++-
.../linux/files/debian/isar/common.tmpl | 2 +
.../linux/files/debian/isar/install.tmpl | 6 +-
meta/recipes-kernel/linux/linux-custom.inc | 8 +--
8 files changed, 79 insertions(+), 24 deletions(-)
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 1/5] dpkg-base: Fix enabling of cross build profile
2024-05-17 16:35 [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix Jan Kiszka
@ 2024-05-17 16:35 ` Jan Kiszka
2024-05-17 16:35 ` [PATCH v3 2/5] linux-custom: Model cross-built kbuild package separately Jan Kiszka
` (5 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-05-17 16:35 UTC (permalink / raw)
To: isar-users
Cc: Felix Moessbauer, stefan-koch, Adriaan Schmidt, Anton Mikanovich
From: Jan Kiszka <jan.kiszka@siemens.com>
ISAR_CROSS_COMPILE might be set even if we are not cross-building a
package. Use an output of crossbuild.bbclass, BUILD_ARCH, to find out
if we are actually cross-building a package.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/classes/dpkg-base.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 30caedf9..93321976 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -215,7 +215,7 @@ dpkg_runbuild() {
def isar_deb_build_profiles(d):
deb_build_profiles = d.getVar('DEB_BUILD_PROFILES')
- if bb.utils.to_boolean(d.getVar('ISAR_CROSS_COMPILE')):
+ if d.getVar('BUILD_ARCH') != d.getVar('DISTRO_ARCH'):
deb_build_profiles += ' cross'
return deb_build_profiles.strip()
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 2/5] linux-custom: Model cross-built kbuild package separately
2024-05-17 16:35 [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix Jan Kiszka
2024-05-17 16:35 ` [PATCH v3 1/5] dpkg-base: Fix enabling of cross build profile Jan Kiszka
@ 2024-05-17 16:35 ` Jan Kiszka
2024-05-17 16:35 ` [PATCH v3 3/5] linux-custom: Resolve native source package differences Jan Kiszka
` (4 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-05-17 16:35 UTC (permalink / raw)
To: isar-users
Cc: Felix Moessbauer, stefan-koch, Adriaan Schmidt, Anton Mikanovich
From: Jan Kiszka <jan.kiszka@siemens.com>
Rename to kbuild package containing tools to cross-build modules
linux-kbuild-<name>-<arch>-cross. The headers package now depends on
either the native kbuild or a cross variant, unconditionally. This
allows to have unstable source packages between native and cross and is
generally cleaner to describe the cross version.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/recipes-kernel/linux/files/debian/control.tmpl | 12 +++++++++++-
.../linux/files/debian/isar/common.tmpl | 2 ++
.../linux/files/debian/isar/install.tmpl | 6 +++++-
meta/recipes-kernel/linux/linux-custom.inc | 5 +----
4 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/meta/recipes-kernel/linux/files/debian/control.tmpl b/meta/recipes-kernel/linux/files/debian/control.tmpl
index 6f8f8afe..e0e932a0 100644
--- a/meta/recipes-kernel/linux/files/debian/control.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/control.tmpl
@@ -51,9 +51,19 @@ Description: Linux kernel debugging symbols for @KR@
all the necessary debug symbols for the kernel and its modules.
Package: linux-kbuild-${KERNEL_NAME_PROVIDED}
-Build-Profiles: <kbuild>
+Build-Profiles: <kbuild !cross>
Architecture: any
Depends: ${perl:Depends}, ${shlib:Depends}
Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
This package provides kernel kbuild scripts and tools for @KR@
This is useful for people who need to build external modules
+
+Package: linux-kbuild-${KERNEL_NAME_PROVIDED}-${DISTRO_ARCH}-cross
+Build-Profiles: <kbuild cross>
+Architecture: any
+Multi-Arch: foreign
+Depends: ${perl:Depends}, ${shlib:Depends}
+Conflicts: linux-kbuild-${KERNEL_NAME_PROVIDED}
+Description: ${KERNEL_NAME_PROVIDED} Linux kbuild scripts and tools for @KR@
+ This package provides kernel kbuild scripts and tools for @KR@
+ This is useful for people who need to build external modules
diff --git a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
index e3a1d8a0..86af70c5 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/common.tmpl
@@ -11,6 +11,7 @@ KERNEL_PKG_KERN_HEADERS=linux-headers-${KERNEL_NAME_PROVIDED}
KERNEL_PKG_LIBC_HEADERS=linux-libc-dev
KERNEL_PKG_LIBC_HEADERS_CROSS=linux-libc-dev-${DISTRO_ARCH}-cross
KERNEL_PKG_KERN_KBUILD=linux-kbuild-${KERNEL_NAME_PROVIDED}
+KERNEL_PKG_KERN_KBUILD_CROSS=${KERNEL_PKG_KERN_KBUILD}-${DISTRO_ARCH}-cross
# Force creating debian package with valid host arch for -native build
# Use a cross build to comply with arch specific kernel defconfigs
@@ -32,6 +33,7 @@ deb_kern_hdr_dir=${deb_top_dir}/${KERNEL_PKG_KERN_HEADERS}
deb_libc_hdr_dir=${deb_top_dir}/${KERNEL_PKG_LIBC_HEADERS}
deb_libc_hdr_cross_dir=${deb_top_dir}/${KERNEL_PKG_LIBC_HEADERS_CROSS}
deb_kern_kbuild_dir=${deb_top_dir}/${KERNEL_PKG_KERN_KBUILD}
+deb_kern_kbuild_cross_dir=${deb_top_dir}/${KERNEL_PKG_KERN_KBUILD_CROSS}
# Array of packages to be generated
declare -A kern_pkgs
diff --git a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
index 77856aee..00011517 100644
--- a/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
+++ b/meta/recipes-kernel/linux/files/debian/isar/install.tmpl
@@ -35,7 +35,11 @@ do_install() {
if echo "${DEB_BUILD_PROFILES}" | grep -q "kbuild"; then
# Install kernel scripts and tools
- install_kbuild ${deb_kern_kbuild_dir}
+ if echo "${DEB_BUILD_PROFILES}" | grep -q "cross"; then
+ install_kbuild ${deb_kern_kbuild_cross_dir}
+ else
+ install_kbuild ${deb_kern_kbuild_dir}
+ fi
fi
if echo "${DEB_BUILD_PROFILES}" | grep -q "kernel"; then
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index 3fd0c6c2..c54c287f 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -111,9 +111,6 @@ BBCLASSEXTEND:append:cross-profile = " kbuildtarget"
# build only kernel with the default variant of the recipe
BUILD_PROFILES:cross-profile = "kernel"
-# Select correct kbuild package for isar cross-build
-HEADERS_DEPENDS:cross-profile = ", linux-kbuild-${KERNEL_NAME_PROVIDED}:${HOST_ARCH} | linux-kbuild-${KERNEL_NAME_PROVIDED}"
-
# -native: kbuild package for host
BUILD_PROFILES:class-native = "kbuild"
RECIPE_PROVIDES:class-native = " \
@@ -151,7 +148,7 @@ RECIPE_PROVIDES:remove:cross-profile = " \
linux-kbuild-${KERNEL_NAME_PROVIDED}"
# Append headers depends
-HEADERS_DEPENDS = ", linux-kbuild-${KERNEL_NAME_PROVIDED}"
+HEADERS_DEPENDS = ", linux-kbuild-${KERNEL_NAME_PROVIDED} | linux-kbuild-${KERNEL_NAME_PROVIDED}-${DISTRO_ARCH}-cross"
KERNEL_HEADERS_DEBIAN_DEPENDS:append = "${HEADERS_DEPENDS}"
# Append provides
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 3/5] linux-custom: Resolve native source package differences
2024-05-17 16:35 [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix Jan Kiszka
2024-05-17 16:35 ` [PATCH v3 1/5] dpkg-base: Fix enabling of cross build profile Jan Kiszka
2024-05-17 16:35 ` [PATCH v3 2/5] linux-custom: Model cross-built kbuild package separately Jan Kiszka
@ 2024-05-17 16:35 ` Jan Kiszka
2024-05-17 16:35 ` [PATCH v3 4/5] dpkg: Retrieve Debian source name from variable Jan Kiszka
` (3 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-05-17 16:35 UTC (permalink / raw)
To: isar-users
Cc: Felix Moessbauer, stefan-koch, Adriaan Schmidt, Anton Mikanovich
From: Jan Kiszka <jan.kiszka@siemens.com>
When building the native package, KERNEL_FILE as defined in bitbake.conf
is wrong as it uses the package arch. Avoid that by redefining
KERNEL_FILE in the kernel recipe using KERNEL_ARCH.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/recipes-kernel/linux/linux-custom.inc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-kernel/linux/linux-custom.inc b/meta/recipes-kernel/linux/linux-custom.inc
index c54c287f..b53d136c 100644
--- a/meta/recipes-kernel/linux/linux-custom.inc
+++ b/meta/recipes-kernel/linux/linux-custom.inc
@@ -175,6 +175,9 @@ def get_kernel_arch(d):
KERNEL_ARCH ??= "${@get_kernel_arch(d)}"
+# set KERNEL_FILE without depending on package arch used in bitbake.conf
+KERNEL_FILE:forcevariable = "${@ 'vmlinux' if d.getVar('KERNEL_ARCH') in ['mipsel', 'riscv', 'arm64'] else 'vmlinuz'}"
+
def config_fragments(d):
fragments = []
sources = d.getVar("SRC_URI").split()
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 4/5] dpkg: Retrieve Debian source name from variable
2024-05-17 16:35 [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix Jan Kiszka
` (2 preceding siblings ...)
2024-05-17 16:35 ` [PATCH v3 3/5] linux-custom: Resolve native source package differences Jan Kiszka
@ 2024-05-17 16:35 ` Jan Kiszka
2024-05-17 16:35 ` [PATCH v3 5/5] dpkg-source: Build source package only once Jan Kiszka
` (2 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-05-17 16:35 UTC (permalink / raw)
To: isar-users
Cc: Felix Moessbauer, stefan-koch, Adriaan Schmidt, Anton Mikanovich
From: Jan Kiszka <jan.kiszka@siemens.com>
Rather than reading this multiple times back from the changelog, define
DEBIAN_SOURCE, by default BPN, and use that consistently. This will
allow to fetch sources built by the base recipe in native and compat
recipes later on without generating the changelog first.
It also permits to clean up related code. Specifically do_deploy_source
was expecting more than one source file (which was incorrect) and looked
in the wrong folder.
The equivalence between DEBIAN_SOURCE and the actual source field is
checked in do_dpkg_source and enforced by failing the build otherwise.
At this chance, also move global -maxdepth before -name in find
statements.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/classes/dpkg-source.bbclass | 16 +++++++++++-----
meta/classes/dpkg.bbclass | 3 +--
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/meta/classes/dpkg-source.bbclass b/meta/classes/dpkg-source.bbclass
index 7fd5d2ed..560f536b 100644
--- a/meta/classes/dpkg-source.bbclass
+++ b/meta/classes/dpkg-source.bbclass
@@ -7,10 +7,15 @@ inherit dpkg-base
DPKG_SOURCE_EXTRA_ARGS ?= "-I"
+DEBIAN_SOURCE ?= "${BPN}"
+
do_dpkg_source() {
# Create a .dsc file from source directory to use it with sbuild
DEB_SOURCE_NAME=$(dpkg-parsechangelog --show-field Source --file ${WORKDIR}/${PPS}/debian/changelog)
- find ${WORKDIR} -name "${DEB_SOURCE_NAME}*.dsc" -maxdepth 1 -delete
+ if [ "${DEB_SOURCE_NAME}" != "${DEBIAN_SOURCE}" ]; then
+ bbfatal "DEBIAN_SOURCE (${DEBIAN_SOURCE}) not aligned with source name used in control files (${DEB_SOURCE_NAME})"
+ fi
+ find ${WORKDIR} -maxdepth 1 -name "${DEBIAN_SOURCE}_*.dsc" -delete
sh -c "cd ${WORKDIR}; dpkg-source ${DPKG_SOURCE_EXTRA_ARGS} -b ${PPS}"
}
addtask dpkg_source after do_prepare_build before do_dpkg_build
@@ -20,12 +25,13 @@ do_deploy_source[lockfiles] = "${REPO_ISAR_DIR}/isar.lock"
do_deploy_source[dirs] = "${S}"
do_deploy_source() {
repo_del_srcpackage "${REPO_ISAR_DIR}"/"${DISTRO}" \
- "${REPO_ISAR_DB_DIR}"/"${DISTRO}" "${DEBDISTRONAME}" "${BPN}"
- find "${S}/../" -name '*\.dsc' -maxdepth 1 | while read package; do
+ "${REPO_ISAR_DB_DIR}"/"${DISTRO}" "${DEBDISTRONAME}" "${DEBIAN_SOURCE}"
+ DSC_FILE=$(find ${WORKDIR} -maxdepth 1 -name "${DEBIAN_SOURCE}_*.dsc")
+ if [ -n "${DSC_FILE}" ]; then
repo_add_srcpackage "${REPO_ISAR_DIR}"/"${DISTRO}" \
"${REPO_ISAR_DB_DIR}"/"${DISTRO}" \
"${DEBDISTRONAME}" \
- "${package}"
- done
+ "${DSC_FILE}"
+ fi
}
addtask deploy_source after do_dpkg_source before do_dpkg_build
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 0e25eb76..804fe5a6 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -109,8 +109,7 @@ dpkg_runbuild() {
echo '$apt_keep_downloaded_packages = 1;' >> ${SBUILD_CONFIG}
echo '$stalled_pkg_timeout = ${DPKG_BUILD_TIMEOUT};' >> ${SBUILD_CONFIG}
- DEB_SOURCE_NAME=$(dpkg-parsechangelog --show-field Source --file ${WORKDIR}/${PPS}/debian/changelog)
- DSC_FILE=$(find ${WORKDIR} -name "${DEB_SOURCE_NAME}*.dsc" -maxdepth 1 -print)
+ DSC_FILE=$(find ${WORKDIR} -maxdepth 1 -name "${DEBIAN_SOURCE}_*.dsc" -print)
sbuild -A -n -c ${SBUILD_CHROOT} \
--host=${PACKAGE_ARCH} --build=${BUILD_ARCH} ${profiles} \
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 5/5] dpkg-source: Build source package only once
2024-05-17 16:35 [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix Jan Kiszka
` (3 preceding siblings ...)
2024-05-17 16:35 ` [PATCH v3 4/5] dpkg: Retrieve Debian source name from variable Jan Kiszka
@ 2024-05-17 16:35 ` Jan Kiszka
2024-05-17 16:57 ` [PATCH v3 6/5] testsuite: Build linux-headers for the hikey target Jan Kiszka
2024-05-21 10:29 ` [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix Koch, Stefan
6 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-05-17 16:35 UTC (permalink / raw)
To: isar-users
Cc: Felix Moessbauer, stefan-koch, Adriaan Schmidt, Anton Mikanovich
From: Jan Kiszka <jan.kiszka@siemens.com>
Avoid building the source package multiple times, possibly even
inconsistently. This is achieved by delegating this task to to the base
package and installing the source package from isar-apt in the native
and compat package variants. Those derived packages will also no longer
trigger fetching, unpacking or prepare_build as everything is supposed
to be in the source package.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/classes/dpkg-base.bbclass | 4 +--
meta/classes/dpkg-prebuilt.bbclass | 7 ++----
meta/classes/dpkg-source.bbclass | 40 ++++++++++++++++++++++++++++--
meta/classes/dpkg.bbclass | 3 ++-
4 files changed, 44 insertions(+), 10 deletions(-)
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 93321976..789d6c74 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -78,7 +78,7 @@ addtask adjust_git after do_unpack before do_patch
do_adjust_git[lockfiles] += "${DL_DIR}/git/isar.lock"
inherit patch
-addtask patch after do_adjust_git before do_dpkg_build
+addtask patch after do_adjust_git
SRC_APT ?= ""
@@ -191,7 +191,7 @@ do_prepare_build() {
true
}
-addtask prepare_build after do_patch do_transform_template before do_dpkg_build
+addtask prepare_build after do_patch do_transform_template
# If Isar recipes depend on each other, they typically need the package
# deployed to isar-apt
do_local_isarapt[depends] += "isar-apt:do_cache_config"
diff --git a/meta/classes/dpkg-prebuilt.bbclass b/meta/classes/dpkg-prebuilt.bbclass
index 8135fc81..7092670b 100644
--- a/meta/classes/dpkg-prebuilt.bbclass
+++ b/meta/classes/dpkg-prebuilt.bbclass
@@ -16,11 +16,8 @@ python do_unpack:prepend() {
d.setVar('SRC_URI', ' '.join(src_uri))
}
-# break dependencies on do_patch, etc... but still support sstate caching
-deltask dpkg_build
-addtask dpkg_build after do_unpack before do_deploy_deb
-# break inherited (from dpkg-base) dependency on sbuild_chroot
-do_dpkg_build[depends] = ""
+# also breaks inherited (from dpkg-base) dependency on sbuild_chroot
+do_dpkg_build[depends] = "${PN}:do_unpack"
do_dpkg_build() {
true
}
diff --git a/meta/classes/dpkg-source.bbclass b/meta/classes/dpkg-source.bbclass
index 560f536b..d6ab5aad 100644
--- a/meta/classes/dpkg-source.bbclass
+++ b/meta/classes/dpkg-source.bbclass
@@ -18,7 +18,7 @@ do_dpkg_source() {
find ${WORKDIR} -maxdepth 1 -name "${DEBIAN_SOURCE}_*.dsc" -delete
sh -c "cd ${WORKDIR}; dpkg-source ${DPKG_SOURCE_EXTRA_ARGS} -b ${PPS}"
}
-addtask dpkg_source after do_prepare_build before do_dpkg_build
+addtask dpkg_source after do_prepare_build
do_deploy_source[depends] += "isar-apt:do_cache_config"
do_deploy_source[lockfiles] = "${REPO_ISAR_DIR}/isar.lock"
@@ -34,4 +34,40 @@ do_deploy_source() {
"${DSC_FILE}"
fi
}
-addtask deploy_source after do_dpkg_source before do_dpkg_build
+addtask deploy_source after do_dpkg_source
+
+do_dpkg_build[depends] += "${BPN}:do_deploy_source"
+
+SCHROOT_MOUNTS = "${WORKDIR}:/work ${REPO_ISAR_DIR}/${DISTRO}:/isar-apt"
+
+do_fetch_common_source[depends] += "${SCHROOT_DEP} ${BPN}:do_deploy_source"
+do_fetch_common_source[network] = "${TASK_USE_SUDO}"
+do_fetch_common_source() {
+ schroot_create_configs
+ insert_mounts
+
+ session_id=$(schroot -q -b -c ${SBUILD_CHROOT})
+ echo "Started session: ${session_id}"
+
+ schroot_cleanup() {
+ schroot -q -f -e -c ${session_id} > /dev/null 2>&1
+ remove_mounts > /dev/null 2>&1
+ schroot_delete_configs
+ }
+ trap 'exit 1' INT HUP QUIT TERM ALRM USR1
+ trap 'schroot_cleanup' EXIT
+
+ schroot -r -c ${session_id} -d / -u root -- \
+ apt-get update -o Dir::Etc::SourceList="sources.list.d/isar-apt.list" -o Dir::Etc::SourceParts="-" -o APT::Get::List-Cleanup="0"
+ schroot -r -c ${session_id} -d / -- \
+ sh -c '
+ cd /work
+ apt-get -y --download-only --only-source -o Acquire::Source-Symlinks="false" source ${DEBIAN_SOURCE}'
+
+ schroot -e -c ${session_id}
+ remove_mounts
+ schroot_delete_configs
+}
+addtask fetch_common_source
+
+do_dpkg_build[depends] += "${@'${PN}:do_dpkg_source' if '${PN}' == '${BPN}' else '${PN}:do_fetch_common_source'}"
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index 804fe5a6..d92ff68c 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -24,9 +24,10 @@ def expand_sbuild_pt_additions(d):
cmds += 'sbuild_export ' + var + ' "' + varval + '"\n'
return cmds
-do_prepare_build:append() {
+do_get_reference_env() {
env > ${DPKG_PREBUILD_ENV_FILE}
}
+addtask get_reference_env before do_dpkg_build
# cp -n results in nonzero exit code starting from coreutils 9.2
# and starting from 9.3 we can use --update=none for the same behaviour
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 6/5] testsuite: Build linux-headers for the hikey target
2024-05-17 16:35 [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix Jan Kiszka
` (4 preceding siblings ...)
2024-05-17 16:35 ` [PATCH v3 5/5] dpkg-source: Build source package only once Jan Kiszka
@ 2024-05-17 16:57 ` Jan Kiszka
2024-05-21 10:29 ` [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix Koch, Stefan
6 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-05-17 16:57 UTC (permalink / raw)
To: isar-users
Cc: Felix Moessbauer, stefan-koch, Adriaan Schmidt, Anton Mikanovich
From: Jan Kiszka <jan.kiszka@siemens.com>
This ensures that kbuildtarget case is checked.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
I must admit that this test code is, well, untested.
testsuite/cibuilder.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index 3e151566..ebe79468 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -143,6 +143,7 @@ class CIBuilder(Test):
f.write('IMAGE_INSTALL += "kselftest"\n')
if cross:
f.write('ISAR_CROSS_COMPILE = "1"\n')
+ f.write('IMAGE_INSTALL:append:hikey = " linux-headers-${KERNEL_NAME}"\n')
if debsrc_cache:
f.write('BASE_REPO_FEATURES = "cache-deb-src"\n')
if offline:
--
2.35.3
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix
2024-05-17 16:35 [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix Jan Kiszka
` (5 preceding siblings ...)
2024-05-17 16:57 ` [PATCH v3 6/5] testsuite: Build linux-headers for the hikey target Jan Kiszka
@ 2024-05-21 10:29 ` Koch, Stefan
2024-05-21 10:35 ` Anton Mikanovich
2024-05-28 5:38 ` Uladzimir Bely
6 siblings, 2 replies; 14+ messages in thread
From: Koch, Stefan @ 2024-05-21 10:29 UTC (permalink / raw)
To: isar-users, Kiszka, Jan; +Cc: Schmidt, Adriaan, amikan, MOESSBAUER, Felix
Successful compiled.
Thanks.
Stefan
On Fri, 2024-05-17 at 18:35 +0200, Jan Kiszka wrote:
> This depends on [1] and [2] and replaces [3].
>
> Changes in v3:
> - avoid anything but source package fetching for non-base targets
> - fix regression of kbuildtarget
>
> Jan
>
> [1] https://patchwork.isar-build.org/project/isar/list/?series=1184
> [2] https://patchwork.isar-build.org/project/isar/list/?series=1188
> [3] https://patchwork.isar-build.org/project/isar/list/?series=1171
>
> Jan Kiszka (5):
> dpkg-base: Fix enabling of cross build profile
> linux-custom: Model cross-built kbuild package separately
> linux-custom: Resolve native source package differences
> dpkg: Retrieve Debian source name from variable
> dpkg-source: Build source package only once
>
> meta/classes/dpkg-base.bbclass | 6 +-
> meta/classes/dpkg-prebuilt.bbclass | 7 +--
> meta/classes/dpkg-source.bbclass | 56 ++++++++++++++++-
> --
> meta/classes/dpkg.bbclass | 6 +-
> .../linux/files/debian/control.tmpl | 12 +++-
> .../linux/files/debian/isar/common.tmpl | 2 +
> .../linux/files/debian/isar/install.tmpl | 6 +-
> meta/recipes-kernel/linux/linux-custom.inc | 8 +--
> 8 files changed, 79 insertions(+), 24 deletions(-)
>
--
Stefan Koch
Siemens AG
www.siemens.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix
2024-05-21 10:29 ` [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix Koch, Stefan
@ 2024-05-21 10:35 ` Anton Mikanovich
2024-05-21 10:41 ` Jan Kiszka
2024-05-28 5:38 ` Uladzimir Bely
1 sibling, 1 reply; 14+ messages in thread
From: Anton Mikanovich @ 2024-05-21 10:35 UTC (permalink / raw)
To: Koch, Stefan, isar-users, Kiszka, Jan; +Cc: Schmidt, Adriaan, MOESSBAUER, Felix
21/05/2024 13:29, Koch, Stefan wrote:
> Successful compiled.
>
> Thanks.
>
> Stefan
This one also is the first version passed fast CI.
Will try full also.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix
2024-05-21 10:35 ` Anton Mikanovich
@ 2024-05-21 10:41 ` Jan Kiszka
2024-05-27 9:16 ` Jan Kiszka
0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2024-05-21 10:41 UTC (permalink / raw)
To: Anton Mikanovich, Koch, Stefan, isar-users
Cc: Schmidt, Adriaan, MOESSBAUER, Felix
On 21.05.24 12:35, Anton Mikanovich wrote:
> 21/05/2024 13:29, Koch, Stefan wrote:
>> Successful compiled.
>>
>> Thanks.
>>
>> Stefan
>
> This one also is the first version passed fast CI.
> Will try full also.
>
Great to hear!
We are running this over in isar-cip-core as well [1], though with less
coverage than full CI here. But there it is currently the last blocker
for going into a release.
Jan
[1]
https://gitlab.com/cip-project/cip-core/isar-cip-core/-/pipelines/1298866474
--
Siemens AG, Technology
Linux Expert Center
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix
2024-05-21 10:41 ` Jan Kiszka
@ 2024-05-27 9:16 ` Jan Kiszka
2024-05-27 11:05 ` Uladzimir Bely
0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2024-05-27 9:16 UTC (permalink / raw)
To: Anton Mikanovich
Cc: Schmidt, Adriaan, Koch, Stefan, MOESSBAUER, Felix, isar-users
On 21.05.24 12:41, 'Jan Kiszka' via isar-users wrote:
> On 21.05.24 12:35, Anton Mikanovich wrote:
>> 21/05/2024 13:29, Koch, Stefan wrote:
>>> Successful compiled.
>>>
>>> Thanks.
>>>
>>> Stefan
>>
>> This one also is the first version passed fast CI.
>> Will try full also.
>>
>
> Great to hear!
>
> We are running this over in isar-cip-core as well [1], though with less
> coverage than full CI here. But there it is currently the last blocker
> for going into a release.
>
> Jan
>
> [1]
> https://gitlab.com/cip-project/cip-core/isar-cip-core/-/pipelines/1298866474
>
Any news?
Jan
--
Siemens AG, Technology
Linux Expert Center
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix
2024-05-27 9:16 ` Jan Kiszka
@ 2024-05-27 11:05 ` Uladzimir Bely
2024-05-28 5:30 ` Jan Kiszka
0 siblings, 1 reply; 14+ messages in thread
From: Uladzimir Bely @ 2024-05-27 11:05 UTC (permalink / raw)
To: Jan Kiszka, Anton Mikanovich
Cc: Schmidt, Adriaan, Koch, Stefan, MOESSBAUER, Felix, isar-users
On Mon, 2024-05-27 at 11:16 +0200, 'Jan Kiszka' via isar-users wrote:
> On 21.05.24 12:41, 'Jan Kiszka' via isar-users wrote:
> > On 21.05.24 12:35, Anton Mikanovich wrote:
> > > 21/05/2024 13:29, Koch, Stefan wrote:
> > > > Successful compiled.
> > > >
> > > > Thanks.
> > > >
> > > > Stefan
> > >
> > > This one also is the first version passed fast CI.
> > > Will try full also.
> > >
> >
> > Great to hear!
> >
> > We are running this over in isar-cip-core as well [1], though with
> > less
> > coverage than full CI here. But there it is currently the last
> > blocker
> > for going into a release.
> >
> > Jan
> >
> > [1]
> > https://gitlab.com/cip-project/cip-core/isar-cip-core/-/pipelines/1298866474
> >
>
> Any news?
>
> Jan
>
> --
> Siemens AG, Technology
> Linux Expert Center
>
Hello.
We have the patchet passed both fast and full CI, so it could be
merged.
--
Best regards,
Uladzimir.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix
2024-05-27 11:05 ` Uladzimir Bely
@ 2024-05-28 5:30 ` Jan Kiszka
0 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2024-05-28 5:30 UTC (permalink / raw)
To: Uladzimir Bely, Anton Mikanovich
Cc: Schmidt, Adriaan, Koch, Stefan, MOESSBAUER, Felix, isar-users
On 27.05.24 13:05, Uladzimir Bely wrote:
> On Mon, 2024-05-27 at 11:16 +0200, 'Jan Kiszka' via isar-users wrote:
>> On 21.05.24 12:41, 'Jan Kiszka' via isar-users wrote:
>>> On 21.05.24 12:35, Anton Mikanovich wrote:
>>>> 21/05/2024 13:29, Koch, Stefan wrote:
>>>>> Successful compiled.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Stefan
>>>>
>>>> This one also is the first version passed fast CI.
>>>> Will try full also.
>>>>
>>>
>>> Great to hear!
>>>
>>> We are running this over in isar-cip-core as well [1], though with
>>> less
>>> coverage than full CI here. But there it is currently the last
>>> blocker
>>> for going into a release.
>>>
>>> Jan
>>>
>>> [1]
>>> https://gitlab.com/cip-project/cip-core/isar-cip-core/-/pipelines/1298866474
>>>
>>
>> Any news?
>>
>> Jan
>>
>> --
>> Siemens AG, Technology
>> Linux Expert Center
>>
>
> Hello.
>
> We have the patchet passed both fast and full CI, so it could be
> merged.
>
And when do you plan to?
Jan
--
Siemens AG, Technology
Linux Expert Center
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix
2024-05-21 10:29 ` [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix Koch, Stefan
2024-05-21 10:35 ` Anton Mikanovich
@ 2024-05-28 5:38 ` Uladzimir Bely
1 sibling, 0 replies; 14+ messages in thread
From: Uladzimir Bely @ 2024-05-28 5:38 UTC (permalink / raw)
To: Koch, Stefan, isar-users, Kiszka, Jan
On Tue, 2024-05-21 at 10:29 +0000, 'Koch, Stefan' via isar-users wrote:
> Successful compiled.
>
> Thanks.
>
> Stefan
>
> On Fri, 2024-05-17 at 18:35 +0200, Jan Kiszka wrote:
> > This depends on [1] and [2] and replaces [3].
> >
> > Changes in v3:
> > - avoid anything but source package fetching for non-base targets
> > - fix regression of kbuildtarget
> >
> > Jan
> >
> > [1] https://patchwork.isar-build.org/project/isar/list/?series=1184
> > [2] https://patchwork.isar-build.org/project/isar/list/?series=1188
> > [3] https://patchwork.isar-build.org/project/isar/list/?series=1171
> >
> > Jan Kiszka (5):
> > dpkg-base: Fix enabling of cross build profile
> > linux-custom: Model cross-built kbuild package separately
> > linux-custom: Resolve native source package differences
> > dpkg: Retrieve Debian source name from variable
> > dpkg-source: Build source package only once
> >
> > meta/classes/dpkg-base.bbclass | 6 +-
> > meta/classes/dpkg-prebuilt.bbclass | 7 +--
> > meta/classes/dpkg-source.bbclass | 56
> > ++++++++++++++++-
> > --
> > meta/classes/dpkg.bbclass | 6 +-
> > .../linux/files/debian/control.tmpl | 12 +++-
> > .../linux/files/debian/isar/common.tmpl | 2 +
> > .../linux/files/debian/isar/install.tmpl | 6 +-
> > meta/recipes-kernel/linux/linux-custom.inc | 8 +--
> > 8 files changed, 79 insertions(+), 24 deletions(-)
> >
>
> --
> Stefan Koch
> Siemens AG
> www.siemens.com
>
Applied to next, thanks.
--
Best regards,
Uladzimir.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2024-05-28 5:38 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-17 16:35 [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix Jan Kiszka
2024-05-17 16:35 ` [PATCH v3 1/5] dpkg-base: Fix enabling of cross build profile Jan Kiszka
2024-05-17 16:35 ` [PATCH v3 2/5] linux-custom: Model cross-built kbuild package separately Jan Kiszka
2024-05-17 16:35 ` [PATCH v3 3/5] linux-custom: Resolve native source package differences Jan Kiszka
2024-05-17 16:35 ` [PATCH v3 4/5] dpkg: Retrieve Debian source name from variable Jan Kiszka
2024-05-17 16:35 ` [PATCH v3 5/5] dpkg-source: Build source package only once Jan Kiszka
2024-05-17 16:57 ` [PATCH v3 6/5] testsuite: Build linux-headers for the hikey target Jan Kiszka
2024-05-21 10:29 ` [PATCH v3 0/5] More kbuild improvements, single-build source packages, cross profile fix Koch, Stefan
2024-05-21 10:35 ` Anton Mikanovich
2024-05-21 10:41 ` Jan Kiszka
2024-05-27 9:16 ` Jan Kiszka
2024-05-27 11:05 ` Uladzimir Bely
2024-05-28 5:30 ` Jan Kiszka
2024-05-28 5:38 ` Uladzimir Bely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox