* [xenomai-images] [PATCH 0/1] Upcoming sbuild in Isar support @ 2021-12-09 7:36 Uladzimir Bely 2021-12-09 7:36 ` [xenomai-images] [PATCH 1/1] Changes to support sbuild-based Isar Uladzimir Bely 0 siblings, 1 reply; 9+ messages in thread From: Uladzimir Bely @ 2021-12-09 7:36 UTC (permalink / raw) To: xenomai There is 'sbuild' patchset under development in Isar and it requires some changes in downstream. This makes 'xenomai-images' compatible with it, but breaks compatibility with current 'next' branch. So, this patch is only for applying in the future, when 'sbuild' is merged in Isar. Kas container used for build should also consider changes described here: https://github.com/siemens/meta-iot2050/pull/229 (using external volume for schroot overlay and sbuild-compatible docker image). Uladzimir Bely (1): Changes to support sbuild-based Isar recipes-kernel/linux/linux-xenomai.inc | 14 ++++++++------ recipes-xenomai/xenomai/xenomai.inc | 4 +--- 2 files changed, 9 insertions(+), 9 deletions(-) -- 2.20.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [xenomai-images] [PATCH 1/1] Changes to support sbuild-based Isar 2021-12-09 7:36 [xenomai-images] [PATCH 0/1] Upcoming sbuild in Isar support Uladzimir Bely @ 2021-12-09 7:36 ` Uladzimir Bely 2021-12-09 9:35 ` Jan Kiszka 2021-12-09 9:42 ` Bezdeka, Florian 0 siblings, 2 replies; 9+ messages in thread From: Uladzimir Bely @ 2021-12-09 7:36 UTC (permalink / raw) To: xenomai These patch is required to build Isar from 'ubely/sbuild' branch, e.g. refspec: 37a71e72c7b8e9ae7e9f6a402ecdc6ff66eab8c4 Signed-off-by: Uladzimir Bely <ubely@ilbers.de> --- recipes-kernel/linux/linux-xenomai.inc | 14 ++++++++------ recipes-xenomai/xenomai/xenomai.inc | 4 +--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/recipes-kernel/linux/linux-xenomai.inc b/recipes-kernel/linux/linux-xenomai.inc index 1852bf6..d68c7a1 100644 --- a/recipes-kernel/linux/linux-xenomai.inc +++ b/recipes-kernel/linux/linux-xenomai.inc @@ -28,7 +28,7 @@ def get_commit(d): LINUX_COMMIT ?= "${@get_commit(d)}" -dpkg_runbuild_prepend() { +dpkg_configure_kernel_append() { case ${DISTRO_ARCH} in armhf) ARCH=arm @@ -46,9 +46,11 @@ dpkg_runbuild_prepend() { bbplain $(printf "linux-xenomai-%s: Building revision %.20s\n" \ ${PV} ${LINUX_COMMIT}) - ${BUILDCHROOT_DIR}/usr/src/xenomai-kernel-source/scripts/prepare-kernel.sh \ - --linux=${BUILDCHROOT_DIR}/${PP}/${PPS} --arch=$ARCH \ - --outpatch=${WORKDIR}/xenomai-kernel.patch - patch -d ${BUILDCHROOT_DIR}/${PP}/${PPS} \ - -p1 -i ${WORKDIR}/xenomai-kernel.patch + SBUILD_PREBUILD="${SBUILD_PREBUILD} && \ + touch /home/builder/${PN}/file.touch && \ + /usr/src/xenomai-kernel-source/scripts/prepare-kernel.sh \ + --linux=%p --arch=${ARCH} \ + --outpatch=/home/builder/${PN}/xenomai-kernel.patch && \ + patch -d %p -p1 -i /home/builder/${PN}/xenomai-kernel.patch \ + " } diff --git a/recipes-xenomai/xenomai/xenomai.inc b/recipes-xenomai/xenomai/xenomai.inc index 8f13767..454dd7b 100644 --- a/recipes-xenomai/xenomai/xenomai.inc +++ b/recipes-xenomai/xenomai/xenomai.inc @@ -41,7 +41,5 @@ do_prepare_build() { dpkg_runbuild_prepend() { bbplain $(printf "xenomai-%s: Building revision %.20s\n" \ ${PV} ${COMMIT}) - - sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \ - sh -c "cd ${PP}/${PPS}; scripts/bootstrap" + SBUILD_PREBUILD="cd %p; scripts/bootstrap" } -- 2.20.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [xenomai-images] [PATCH 1/1] Changes to support sbuild-based Isar 2021-12-09 7:36 ` [xenomai-images] [PATCH 1/1] Changes to support sbuild-based Isar Uladzimir Bely @ 2021-12-09 9:35 ` Jan Kiszka 2021-12-13 5:41 ` Uladzimir Bely 2021-12-09 9:42 ` Bezdeka, Florian 1 sibling, 1 reply; 9+ messages in thread From: Jan Kiszka @ 2021-12-09 9:35 UTC (permalink / raw) To: Uladzimir Bely, xenomai On 09.12.21 08:36, Uladzimir Bely via Xenomai wrote: > These patch is required to build Isar from 'ubely/sbuild' branch, > e.g. refspec: 37a71e72c7b8e9ae7e9f6a402ecdc6ff66eab8c4 > > Signed-off-by: Uladzimir Bely <ubely@ilbers.de> > --- > recipes-kernel/linux/linux-xenomai.inc | 14 ++++++++------ > recipes-xenomai/xenomai/xenomai.inc | 4 +--- > 2 files changed, 9 insertions(+), 9 deletions(-) > > diff --git a/recipes-kernel/linux/linux-xenomai.inc b/recipes-kernel/linux/linux-xenomai.inc > index 1852bf6..d68c7a1 100644 > --- a/recipes-kernel/linux/linux-xenomai.inc > +++ b/recipes-kernel/linux/linux-xenomai.inc > @@ -28,7 +28,7 @@ def get_commit(d): > > LINUX_COMMIT ?= "${@get_commit(d)}" > > -dpkg_runbuild_prepend() { > +dpkg_configure_kernel_append() { > case ${DISTRO_ARCH} in > armhf) > ARCH=arm > @@ -46,9 +46,11 @@ dpkg_runbuild_prepend() { > bbplain $(printf "linux-xenomai-%s: Building revision %.20s\n" \ > ${PV} ${LINUX_COMMIT}) > > - ${BUILDCHROOT_DIR}/usr/src/xenomai-kernel-source/scripts/prepare-kernel.sh \ > - --linux=${BUILDCHROOT_DIR}/${PP}/${PPS} --arch=$ARCH \ > - --outpatch=${WORKDIR}/xenomai-kernel.patch > - patch -d ${BUILDCHROOT_DIR}/${PP}/${PPS} \ > - -p1 -i ${WORKDIR}/xenomai-kernel.patch > + SBUILD_PREBUILD="${SBUILD_PREBUILD} && \ > + touch /home/builder/${PN}/file.touch && \ > + /usr/src/xenomai-kernel-source/scripts/prepare-kernel.sh \ > + --linux=%p --arch=${ARCH} \ > + --outpatch=/home/builder/${PN}/xenomai-kernel.patch && \ > + patch -d %p -p1 -i /home/builder/${PN}/xenomai-kernel.patch \ > + " Inconsistent indention. > } > diff --git a/recipes-xenomai/xenomai/xenomai.inc b/recipes-xenomai/xenomai/xenomai.inc > index 8f13767..454dd7b 100644 > --- a/recipes-xenomai/xenomai/xenomai.inc > +++ b/recipes-xenomai/xenomai/xenomai.inc > @@ -41,7 +41,5 @@ do_prepare_build() { > dpkg_runbuild_prepend() { > bbplain $(printf "xenomai-%s: Building revision %.20s\n" \ > ${PV} ${COMMIT}) > - > - sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \ > - sh -c "cd ${PP}/${PPS}; scripts/bootstrap" > + SBUILD_PREBUILD="cd %p; scripts/bootstrap" Could we rather provide an abstract interface to users, not carrying SBUILD in its name? I'm concerned that the current will make it hard to switch builders in the future if we may have to. Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [xenomai-images] [PATCH 1/1] Changes to support sbuild-based Isar 2021-12-09 9:35 ` Jan Kiszka @ 2021-12-13 5:41 ` Uladzimir Bely 2021-12-13 7:44 ` Jan Kiszka 0 siblings, 1 reply; 9+ messages in thread From: Uladzimir Bely @ 2021-12-13 5:41 UTC (permalink / raw) To: xenomai, Jan Kiszka, Baurzhan Ismagulov In mail from четверг, 9 декабря 2021 г. 12:35:16 +03 user Jan Kiszka wrote: > On 09.12.21 08:36, Uladzimir Bely via Xenomai wrote: > > > > diff --git a/recipes-xenomai/xenomai/xenomai.inc > > b/recipes-xenomai/xenomai/xenomai.inc index 8f13767..454dd7b 100644 > > --- a/recipes-xenomai/xenomai/xenomai.inc > > +++ b/recipes-xenomai/xenomai/xenomai.inc > > @@ -41,7 +41,5 @@ do_prepare_build() { > > > > dpkg_runbuild_prepend() { > > > > bbplain $(printf "xenomai-%s: Building revision %.20s\n" \ > > > > ${PV} ${COMMIT}) > > > > - > > - sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \ > > - sh -c "cd ${PP}/${PPS}; scripts/bootstrap" > > + SBUILD_PREBUILD="cd %p; scripts/bootstrap" > > Could we rather provide an abstract interface to users, not carrying > SBUILD in its name? I'm concerned that the current will make it hard to > switch builders in the future if we may have to. > > Jan Hello. With current approach it doesn't look easy enough. With buildchroot, it's possible to do anything we want in 'dpkg_runbuild_prepend' or 'prepare_build' task. When the actual build is started, all preparations are here and can be used. Sbuild is an isolated environment, so similar things can only be somehow passed to the build environment. Here we use SBUILD_PREBUILD to do it, so all preparations are 'postponed' until real build starts and all dependencies installed. If we want to unify the approach, we have 2 possible ways: 1) use something like SBUILD_PREBUILD (we can call it BUILD_PREBUILD) - so, the preparations won't be done in some prebuild tasks, but they will be postponed (with buildchroot, too) and executed during the actual build. 2) place the stuff into debian/rules, using patches or somehow else. So, the preparations will be done in Debian style at the correct time. Q: Also, there is a question regarding 'xenomai.inc' quoted above. Why 'scripts/ bootstrap' is executed manually here, before the build? There is `bootstrap` make target that does exactly the same, but at the build stage. I'm simply removing 'dpkg_runbuild_prepend()' from xenomai.inc and it is still working for me. -- Uladzimir Bely Promwad Ltd. External service provider of ilbers GmbH Maria-Merian-Str. 8 85521 Ottobrunn, Germany +49 (89) 122 67 24-0 Commercial register Munich, HRB 214197 General Manager: Baurzhan Ismagulov ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [xenomai-images] [PATCH 1/1] Changes to support sbuild-based Isar 2021-12-13 5:41 ` Uladzimir Bely @ 2021-12-13 7:44 ` Jan Kiszka 0 siblings, 0 replies; 9+ messages in thread From: Jan Kiszka @ 2021-12-13 7:44 UTC (permalink / raw) To: Uladzimir Bely, xenomai, Baurzhan Ismagulov On 13.12.21 06:41, Uladzimir Bely wrote: > In mail from четверг, 9 декабря 2021 г. 12:35:16 +03 user Jan Kiszka wrote: >> On 09.12.21 08:36, Uladzimir Bely via Xenomai wrote: >>> >>> diff --git a/recipes-xenomai/xenomai/xenomai.inc >>> b/recipes-xenomai/xenomai/xenomai.inc index 8f13767..454dd7b 100644 >>> --- a/recipes-xenomai/xenomai/xenomai.inc >>> +++ b/recipes-xenomai/xenomai/xenomai.inc >>> @@ -41,7 +41,5 @@ do_prepare_build() { >>> >>> dpkg_runbuild_prepend() { >>> >>> bbplain $(printf "xenomai-%s: Building revision %.20s\n" \ >>> >>> ${PV} ${COMMIT}) >>> >>> - >>> - sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \ >>> - sh -c "cd ${PP}/${PPS}; scripts/bootstrap" >>> + SBUILD_PREBUILD="cd %p; scripts/bootstrap" >> >> Could we rather provide an abstract interface to users, not carrying >> SBUILD in its name? I'm concerned that the current will make it hard to >> switch builders in the future if we may have to. >> >> Jan > > Hello. > > With current approach it doesn't look easy enough. With buildchroot, it's > possible to do anything we want in 'dpkg_runbuild_prepend' or 'prepare_build' > task. When the actual build is started, all preparations are here and can be > used. > > Sbuild is an isolated environment, so similar things can only be somehow > passed to the build environment. Here we use SBUILD_PREBUILD to do it, so all > preparations are 'postponed' until real build starts and all dependencies > installed. > > If we want to unify the approach, we have 2 possible ways: > 1) use something like SBUILD_PREBUILD (we can call it BUILD_PREBUILD) - so, > the preparations won't be done in some prebuild tasks, but they will be > postponed (with buildchroot, too) and executed during the actual build. > 2) place the stuff into debian/rules, using patches or somehow else. So, the > preparations will be done in Debian style at the correct time. The latter is likely better than adding an Isar-specific interface. However, we may need to add hooks to complex Isar-provided rules like in the kernel case. You don't want to fork them, just to add a statement. > > Q: > Also, there is a question regarding 'xenomai.inc' quoted above. Why 'scripts/ > bootstrap' is executed manually here, before the build? There is `bootstrap` > make target that does exactly the same, but at the build stage. > I'm simply removing 'dpkg_runbuild_prepend()' from xenomai.inc and it is still > working for me. Indeed, I probably missed that back then when adding the recipe - or something broke things that was fixed meanwhile. Feel free to propose a patch that removes the bootstrap call. Thanks, Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [xenomai-images] [PATCH 1/1] Changes to support sbuild-based Isar 2021-12-09 7:36 ` [xenomai-images] [PATCH 1/1] Changes to support sbuild-based Isar Uladzimir Bely 2021-12-09 9:35 ` Jan Kiszka @ 2021-12-09 9:42 ` Bezdeka, Florian 2021-12-09 9:43 ` Bezdeka, Florian 2021-12-09 10:11 ` Uladzimir Bely 1 sibling, 2 replies; 9+ messages in thread From: Bezdeka, Florian @ 2021-12-09 9:42 UTC (permalink / raw) To: ubely@ilbers.de, xenomai@xenomai.org On Thu, 2021-12-09 at 08:36 +0100, Uladzimir Bely via Xenomai wrote: > These patch is required to build Isar from 'ubely/sbuild' branch, > e.g. refspec: 37a71e72c7b8e9ae7e9f6a402ecdc6ff66eab8c4 We're using that, so why do we need to patch? Is that related to the new SBUILD feature in ISAR? No way to handle that without breaking many downstream layers? > > Signed-off-by: Uladzimir Bely <ubely@ilbers.de> > --- > recipes-kernel/linux/linux-xenomai.inc | 14 ++++++++------ > recipes-xenomai/xenomai/xenomai.inc | 4 +--- > 2 files changed, 9 insertions(+), 9 deletions(-) > > diff --git a/recipes-kernel/linux/linux-xenomai.inc b/recipes-kernel/linux/linux-xenomai.inc > index 1852bf6..d68c7a1 100644 > --- a/recipes-kernel/linux/linux-xenomai.inc > +++ b/recipes-kernel/linux/linux-xenomai.inc > @@ -28,7 +28,7 @@ def get_commit(d): > > LINUX_COMMIT ?= "${@get_commit(d)}" > > -dpkg_runbuild_prepend() { > +dpkg_configure_kernel_append() { > case ${DISTRO_ARCH} in > armhf) > ARCH=arm > @@ -46,9 +46,11 @@ dpkg_runbuild_prepend() { > bbplain $(printf "linux-xenomai-%s: Building revision %.20s\n" \ > ${PV} ${LINUX_COMMIT}) > > - ${BUILDCHROOT_DIR}/usr/src/xenomai-kernel-source/scripts/prepare-kernel.sh \ > - --linux=${BUILDCHROOT_DIR}/${PP}/${PPS} --arch=$ARCH \ > - --outpatch=${WORKDIR}/xenomai-kernel.patch > - patch -d ${BUILDCHROOT_DIR}/${PP}/${PPS} \ > - -p1 -i ${WORKDIR}/xenomai-kernel.patch > + SBUILD_PREBUILD="${SBUILD_PREBUILD} && \ > + touch /home/builder/${PN}/file.touch && \ Where does this paths come from? Looks kas or even kas-container related. > + /usr/src/xenomai-kernel-source/scripts/prepare-kernel.sh \ > + --linux=%p --arch=${ARCH} \ > + --outpatch=/home/builder/${PN}/xenomai-kernel.patch && \ > + patch -d %p -p1 -i /home/builder/${PN}/xenomai-kernel.patch \ > + " > } > diff --git a/recipes-xenomai/xenomai/xenomai.inc b/recipes-xenomai/xenomai/xenomai.inc > index 8f13767..454dd7b 100644 > --- a/recipes-xenomai/xenomai/xenomai.inc > +++ b/recipes-xenomai/xenomai/xenomai.inc > @@ -41,7 +41,5 @@ do_prepare_build() { > dpkg_runbuild_prepend() { > bbplain $(printf "xenomai-%s: Building revision %.20s\n" \ > ${PV} ${COMMIT}) > - > - sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \ > - sh -c "cd ${PP}/${PPS}; scripts/bootstrap" > + SBUILD_PREBUILD="cd %p; scripts/bootstrap" > } ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [xenomai-images] [PATCH 1/1] Changes to support sbuild-based Isar 2021-12-09 9:42 ` Bezdeka, Florian @ 2021-12-09 9:43 ` Bezdeka, Florian 2021-12-09 9:48 ` Bezdeka, Florian 2021-12-09 10:11 ` Uladzimir Bely 1 sibling, 1 reply; 9+ messages in thread From: Bezdeka, Florian @ 2021-12-09 9:43 UTC (permalink / raw) To: ubely@ilbers.de, xenomai@xenomai.org On Thu, 2021-12-09 at 09:42 +0000, Bezdeka, Florian via Xenomai wrote: > On Thu, 2021-12-09 at 08:36 +0100, Uladzimir Bely via Xenomai wrote: > > These patch is required to build Isar from 'ubely/sbuild' branch, > > e.g. refspec: 37a71e72c7b8e9ae7e9f6a402ecdc6ff66eab8c4 > > We're using that, so why do we need to patch? Is that related to the ^- not > new SBUILD feature in ISAR? No way to handle that without breaking many > downstream layers? > > > > > Signed-off-by: Uladzimir Bely <ubely@ilbers.de> > > --- > > recipes-kernel/linux/linux-xenomai.inc | 14 ++++++++------ > > recipes-xenomai/xenomai/xenomai.inc | 4 +--- > > 2 files changed, 9 insertions(+), 9 deletions(-) > > > > diff --git a/recipes-kernel/linux/linux-xenomai.inc b/recipes-kernel/linux/linux-xenomai.inc > > index 1852bf6..d68c7a1 100644 > > --- a/recipes-kernel/linux/linux-xenomai.inc > > +++ b/recipes-kernel/linux/linux-xenomai.inc > > @@ -28,7 +28,7 @@ def get_commit(d): > > > > LINUX_COMMIT ?= "${@get_commit(d)}" > > > > -dpkg_runbuild_prepend() { > > +dpkg_configure_kernel_append() { > > case ${DISTRO_ARCH} in > > armhf) > > ARCH=arm > > @@ -46,9 +46,11 @@ dpkg_runbuild_prepend() { > > bbplain $(printf "linux-xenomai-%s: Building revision %.20s\n" \ > > ${PV} ${LINUX_COMMIT}) > > > > - ${BUILDCHROOT_DIR}/usr/src/xenomai-kernel-source/scripts/prepare-kernel.sh \ > > - --linux=${BUILDCHROOT_DIR}/${PP}/${PPS} --arch=$ARCH \ > > - --outpatch=${WORKDIR}/xenomai-kernel.patch > > - patch -d ${BUILDCHROOT_DIR}/${PP}/${PPS} \ > > - -p1 -i ${WORKDIR}/xenomai-kernel.patch > > + SBUILD_PREBUILD="${SBUILD_PREBUILD} && \ > > + touch /home/builder/${PN}/file.touch && \ > > Where does this paths come from? Looks kas or even kas-container > related. > > > + /usr/src/xenomai-kernel-source/scripts/prepare-kernel.sh \ > > + --linux=%p --arch=${ARCH} \ > > + --outpatch=/home/builder/${PN}/xenomai-kernel.patch && \ > > + patch -d %p -p1 -i /home/builder/${PN}/xenomai-kernel.patch \ > > + " > > } > > diff --git a/recipes-xenomai/xenomai/xenomai.inc b/recipes-xenomai/xenomai/xenomai.inc > > index 8f13767..454dd7b 100644 > > --- a/recipes-xenomai/xenomai/xenomai.inc > > +++ b/recipes-xenomai/xenomai/xenomai.inc > > @@ -41,7 +41,5 @@ do_prepare_build() { > > dpkg_runbuild_prepend() { > > bbplain $(printf "xenomai-%s: Building revision %.20s\n" \ > > ${PV} ${COMMIT}) > > - > > - sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \ > > - sh -c "cd ${PP}/${PPS}; scripts/bootstrap" > > + SBUILD_PREBUILD="cd %p; scripts/bootstrap" > > } > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [xenomai-images] [PATCH 1/1] Changes to support sbuild-based Isar 2021-12-09 9:43 ` Bezdeka, Florian @ 2021-12-09 9:48 ` Bezdeka, Florian 0 siblings, 0 replies; 9+ messages in thread From: Bezdeka, Florian @ 2021-12-09 9:48 UTC (permalink / raw) To: ubely@ilbers.de, xenomai@xenomai.org On Thu, 2021-12-09 at 09:43 +0000, Bezdeka, Florian via Xenomai wrote: > On Thu, 2021-12-09 at 09:42 +0000, Bezdeka, Florian via Xenomai wrote: > > On Thu, 2021-12-09 at 08:36 +0100, Uladzimir Bely via Xenomai wrote: > > > These patch is required to build Isar from 'ubely/sbuild' branch, > > > e.g. refspec: 37a71e72c7b8e9ae7e9f6a402ecdc6ff66eab8c4 > > > > We're using that, so why do we need to patch? Is that related to the > ^- not The cover letter (which made it into my junk folder) explains that. I fear that SBUILD stuff is going to break nearly all downstream layers when xenomai-images is affected as well. So the question of "no way to prevent downstream layers to break?" still stands. > > > new SBUILD feature in ISAR? No way to handle that without breaking many > > downstream layers? > > > > > > > > Signed-off-by: Uladzimir Bely <ubely@ilbers.de> > > > --- > > > recipes-kernel/linux/linux-xenomai.inc | 14 ++++++++------ > > > recipes-xenomai/xenomai/xenomai.inc | 4 +--- > > > 2 files changed, 9 insertions(+), 9 deletions(-) > > > > > > diff --git a/recipes-kernel/linux/linux-xenomai.inc b/recipes-kernel/linux/linux-xenomai.inc > > > index 1852bf6..d68c7a1 100644 > > > --- a/recipes-kernel/linux/linux-xenomai.inc > > > +++ b/recipes-kernel/linux/linux-xenomai.inc > > > @@ -28,7 +28,7 @@ def get_commit(d): > > > > > > LINUX_COMMIT ?= "${@get_commit(d)}" > > > > > > -dpkg_runbuild_prepend() { > > > +dpkg_configure_kernel_append() { > > > case ${DISTRO_ARCH} in > > > armhf) > > > ARCH=arm > > > @@ -46,9 +46,11 @@ dpkg_runbuild_prepend() { > > > bbplain $(printf "linux-xenomai-%s: Building revision %.20s\n" \ > > > ${PV} ${LINUX_COMMIT}) > > > > > > - ${BUILDCHROOT_DIR}/usr/src/xenomai-kernel-source/scripts/prepare-kernel.sh \ > > > - --linux=${BUILDCHROOT_DIR}/${PP}/${PPS} --arch=$ARCH \ > > > - --outpatch=${WORKDIR}/xenomai-kernel.patch > > > - patch -d ${BUILDCHROOT_DIR}/${PP}/${PPS} \ > > > - -p1 -i ${WORKDIR}/xenomai-kernel.patch > > > + SBUILD_PREBUILD="${SBUILD_PREBUILD} && \ > > > + touch /home/builder/${PN}/file.touch && \ > > > > Where does this paths come from? Looks kas or even kas-container > > related. > > > > > + /usr/src/xenomai-kernel-source/scripts/prepare-kernel.sh \ > > > + --linux=%p --arch=${ARCH} \ > > > + --outpatch=/home/builder/${PN}/xenomai-kernel.patch && \ > > > + patch -d %p -p1 -i /home/builder/${PN}/xenomai-kernel.patch \ > > > + " > > > } > > > diff --git a/recipes-xenomai/xenomai/xenomai.inc b/recipes-xenomai/xenomai/xenomai.inc > > > index 8f13767..454dd7b 100644 > > > --- a/recipes-xenomai/xenomai/xenomai.inc > > > +++ b/recipes-xenomai/xenomai/xenomai.inc > > > @@ -41,7 +41,5 @@ do_prepare_build() { > > > dpkg_runbuild_prepend() { > > > bbplain $(printf "xenomai-%s: Building revision %.20s\n" \ > > > ${PV} ${COMMIT}) > > > - > > > - sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \ > > > - sh -c "cd ${PP}/${PPS}; scripts/bootstrap" > > > + SBUILD_PREBUILD="cd %p; scripts/bootstrap" > > > } > > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [xenomai-images] [PATCH 1/1] Changes to support sbuild-based Isar 2021-12-09 9:42 ` Bezdeka, Florian 2021-12-09 9:43 ` Bezdeka, Florian @ 2021-12-09 10:11 ` Uladzimir Bely 1 sibling, 0 replies; 9+ messages in thread From: Uladzimir Bely @ 2021-12-09 10:11 UTC (permalink / raw) To: xenomai@xenomai.org, Bezdeka, Florian In mail from четверг, 9 декабря 2021 г. 12:42:44 +03 user Bezdeka, Florian wrote: > On Thu, 2021-12-09 at 08:36 +0100, Uladzimir Bely via Xenomai wrote: > > > These patch is required to build Isar from 'ubely/sbuild' branch, > > e.g. refspec: 37a71e72c7b8e9ae7e9f6a402ecdc6ff66eab8c4 > > > We're using that, so why do we need to patch? Is that related to the > new SBUILD feature in ISAR? No way to handle that without breaking many > downstream layers? > > > > > > Signed-off-by: Uladzimir Bely <ubely@ilbers.de> > > --- > > > > recipes-kernel/linux/linux-xenomai.inc | 14 ++++++++------ > > recipes-xenomai/xenomai/xenomai.inc | 4 +--- > > 2 files changed, 9 insertions(+), 9 deletions(-) > > > > > > diff --git a/recipes-kernel/linux/linux-xenomai.inc > > b/recipes-kernel/linux/linux-xenomai.inc index 1852bf6..d68c7a1 100644 > > --- a/recipes-kernel/linux/linux-xenomai.inc > > +++ b/recipes-kernel/linux/linux-xenomai.inc > > @@ -28,7 +28,7 @@ def get_commit(d): > > > > > > LINUX_COMMIT ?= "${@get_commit(d)}" > > > > > > -dpkg_runbuild_prepend() { > > +dpkg_configure_kernel_append() { > > > > case ${DISTRO_ARCH} in > > armhf) > > > > ARCH=arm > > > > @@ -46,9 +46,11 @@ dpkg_runbuild_prepend() { > > > > bbplain $(printf "linux-xenomai-%s: Building revision %.20s\n" \ > > > > ${PV} ${LINUX_COMMIT}) > > > > > > > > - ${BUILDCHROOT_DIR}/usr/src/xenomai-kernel-source/scripts/prepare- kernel. > > sh \ - --linux=${BUILDCHROOT_DIR}/${PP}/${PPS} --arch=$ARCH \ > > - --outpatch=${WORKDIR}/xenomai-kernel.patch > > - patch -d ${BUILDCHROOT_DIR}/${PP}/${PPS} \ > > - -p1 -i ${WORKDIR}/xenomai-kernel.patch > > + SBUILD_PREBUILD="${SBUILD_PREBUILD} && \ > > + touch /home/builder/${PN}/file.touch && \ > > > Where does this paths come from? Looks kas or even kas-container > related. > It's coming from current 'sbuild' series. The problem here is the following. We are building 'linux-xenomai` here and relay on some '${BUILDCHROOT_DIR}/usr/src/xenomai-kernel-source/scripts/ prepare-kernel.sh' script that is not a part of 'linux-xenomai' recipe. Buildchroot allows to do do that because it doesn't provide 'clean room' build environment, so it is already 'polluted' by previously installed packages. That's why we have this prepare-kernel.sh preinstalled and can run at any moment. With sbuild, package is compiled in clean environment, so we can't directly reuse files belonging to other packages. To do that, we use SBUILD_PREBUILD variable to keep command that should be passed later to sbuild compilation. So, sbuild internally first install dependencies in clean environment and executes this command at some internal stage. > > > + /usr/src/xenomai-kernel-source/scripts/prepare-kernel.sh \ > > + --linux=%p --arch=${ARCH} \ > > + --outpatch=/home/builder/${PN}/xenomai-kernel.patch && \ > > + patch -d %p -p1 -i /home/builder/${PN}/xenomai-kernel.patch \ > > + " > > > > } > > > > diff --git a/recipes-xenomai/xenomai/xenomai.inc > > b/recipes-xenomai/xenomai/xenomai.inc index 8f13767..454dd7b 100644 > > --- a/recipes-xenomai/xenomai/xenomai.inc > > +++ b/recipes-xenomai/xenomai/xenomai.inc > > @@ -41,7 +41,5 @@ do_prepare_build() { > > > > dpkg_runbuild_prepend() { > > > > bbplain $(printf "xenomai-%s: Building revision %.20s\n" \ > > > > ${PV} ${COMMIT}) > > > > - > > - sudo chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \ > > - sh -c "cd ${PP}/${PPS}; scripts/bootstrap" > > + SBUILD_PREBUILD="cd %p; scripts/bootstrap" > > > > } > > -- Uladzimir Bely Promwad Ltd. External service provider of ilbers GmbH Maria-Merian-Str. 8 85521 Ottobrunn, Germany +49 (89) 122 67 24-0 Commercial register Munich, HRB 214197 General Manager: Baurzhan Ismagulov ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-12-13 7:44 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-12-09 7:36 [xenomai-images] [PATCH 0/1] Upcoming sbuild in Isar support Uladzimir Bely 2021-12-09 7:36 ` [xenomai-images] [PATCH 1/1] Changes to support sbuild-based Isar Uladzimir Bely 2021-12-09 9:35 ` Jan Kiszka 2021-12-13 5:41 ` Uladzimir Bely 2021-12-13 7:44 ` Jan Kiszka 2021-12-09 9:42 ` Bezdeka, Florian 2021-12-09 9:43 ` Bezdeka, Florian 2021-12-09 9:48 ` Bezdeka, Florian 2021-12-09 10:11 ` Uladzimir Bely
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.