public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] dpkg: make sbuild timeout configurable
@ 2023-11-14 17:39 Cedric Hombourger
  2023-11-14 19:47 ` MOESSBAUER, Felix
  0 siblings, 1 reply; 5+ messages in thread
From: Cedric Hombourger @ 2023-11-14 17:39 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

Some builds (especially those under qemu) can take a very long time
and fail only because they did not complete within 2.5 hours. Let
recipes budget some more time by setting DPKG_BUILD_TIMEOUT to a
larger value (defaults to 150 minutes like sbuild).

Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
---
 meta/classes/dpkg.bbclass | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index d61e9377..4accb076 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -4,6 +4,11 @@
 inherit dpkg-base
 inherit dpkg-source
 
+# maximum time (in minutes for the build), override for packages requiring
+# much more time (e.g. when cross-compiling isn't an option / supported and
+# the package large)
+DPKG_BUILD_TIMEOUT ?= "150"
+
 DPKG_PREBUILD_ENV_FILE="${WORKDIR}/dpkg_prebuild.env"
 
 # bitbake variables that should be passed into sbuild env
@@ -94,6 +99,7 @@ dpkg_runbuild() {
     ${@ expand_sbuild_pt_additions(d)}
 
     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)
-- 
2.39.2


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

* Re: [PATCH] dpkg: make sbuild timeout configurable
  2023-11-14 17:39 [PATCH] dpkg: make sbuild timeout configurable Cedric Hombourger
@ 2023-11-14 19:47 ` MOESSBAUER, Felix
  2023-11-15  8:41   ` [PATCH v2 0/1] " Cedric Hombourger
  0 siblings, 1 reply; 5+ messages in thread
From: MOESSBAUER, Felix @ 2023-11-14 19:47 UTC (permalink / raw)
  To: isar-users, Hombourger, Cedric

On Tue, 2023-11-14 at 18:39 +0100, 'Cedric Hombourger' via isar-users
wrote:
> Some builds (especially those under qemu) can take a very long time
> and fail only because they did not complete within 2.5 hours. Let
> recipes budget some more time by setting DPKG_BUILD_TIMEOUT to a
> larger value (defaults to 150 minutes like sbuild).
> 
> Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
> ---
>  meta/classes/dpkg.bbclass | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> index d61e9377..4accb076 100644
> --- a/meta/classes/dpkg.bbclass
> +++ b/meta/classes/dpkg.bbclass
> @@ -4,6 +4,11 @@
>  inherit dpkg-base
>  inherit dpkg-source
>  
> +# maximum time (in minutes for the build), override for packages
> requiring
> +# much more time (e.g. when cross-compiling isn't an option /
> supported and
> +# the package large)
> +DPKG_BUILD_TIMEOUT ?= "150"
> +
>  DPKG_PREBUILD_ENV_FILE="${WORKDIR}/dpkg_prebuild.env"
>  
>  # bitbake variables that should be passed into sbuild env
> @@ -94,6 +99,7 @@ dpkg_runbuild() {
>      ${@ expand_sbuild_pt_additions(d)}
>  
>      echo '$apt_keep_downloaded_packages = 1;' >> ${SBUILD_CONFIG}
> +    echo '$stalled_pkg_timeout = ${DPKG_BUILD_TIMEOUT};' >>

Hi Cedric,

please add this variable to the dpkg_runbuild[vardepsexclude] as well.
Also I'm wondering if we should document this variable in the docs.

Felix


> ${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)
> -- 
> 2.39.2
> 


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

* [PATCH v2 0/1] dpkg: make sbuild timeout configurable
  2023-11-14 19:47 ` MOESSBAUER, Felix
@ 2023-11-15  8:41   ` Cedric Hombourger
  2023-11-15  8:41     ` [PATCH v2 1/1] " Cedric Hombourger
  2023-11-29  9:22     ` [PATCH v2 0/1] " Uladzimir Bely
  0 siblings, 2 replies; 5+ messages in thread
From: Cedric Hombourger @ 2023-11-15  8:41 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

Some builds (especially those under qemu) can take a very long time
and fail only because they did not complete within 2.5 hours. Let
recipes budget some more time by setting DPKG_BUILD_TIMEOUT to a
larger value (defaults to 150 minutes like sbuild).

Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>

Changes since v1:
  - add DPKG_BUILD_TIMEOUT to the user manual
  - add DPKG_BUILD_TIMEOUT to vardepsexclude for dpkg_runbuild

Cedric Hombourger (1):
  dpkg: make sbuild timeout configurable

 doc/user_manual.md        | 2 ++
 meta/classes/dpkg.bbclass | 7 +++++++
 2 files changed, 9 insertions(+)

-- 
2.39.2


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

* [PATCH v2 1/1] dpkg: make sbuild timeout configurable
  2023-11-15  8:41   ` [PATCH v2 0/1] " Cedric Hombourger
@ 2023-11-15  8:41     ` Cedric Hombourger
  2023-11-29  9:22     ` [PATCH v2 0/1] " Uladzimir Bely
  1 sibling, 0 replies; 5+ messages in thread
From: Cedric Hombourger @ 2023-11-15  8:41 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

Some builds (especially those under qemu) can take a very long time
and fail only because they did not complete within 2.5 hours. Let
recipes budget some more time by setting DPKG_BUILD_TIMEOUT to a
larger value (defaults to 150 minutes like sbuild).

Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
---
 doc/user_manual.md        | 2 ++
 meta/classes/dpkg.bbclass | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/doc/user_manual.md b/doc/user_manual.md
index ecb987f4..3744c753 100644
--- a/doc/user_manual.md
+++ b/doc/user_manual.md
@@ -808,6 +808,8 @@ Below are some of the packages with this scenario at the time of writing this.
 
 The `deb` packages are built using `dpkg-buildpackage`, so the sources should contain the `debian` directory with necessary meta information. This way is the default way of adding software that needs to be compiled from source. The bbclass for this approach is called `dpkg`.
 
+For large applications that are not cross-compiled, it may be needed to extend the default build timeout of 150 minutes to a greater value: set `DPKG_BUILD_TIMEOUT` in your recipe to that effect.
+
 **NOTE:** If the sources do not contain a `debian` directory your recipe can fetch, create, or ship that. You might want to read the the next section before returning here.
 
 #### Example
diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
index d61e9377..b69fa254 100644
--- a/meta/classes/dpkg.bbclass
+++ b/meta/classes/dpkg.bbclass
@@ -4,6 +4,12 @@
 inherit dpkg-base
 inherit dpkg-source
 
+# maximum time (in minutes for the build), override for packages requiring
+# much more time (e.g. when cross-compiling isn't an option / supported and
+# the package large)
+DPKG_BUILD_TIMEOUT ?= "150"
+dpkg_runbuild[vardepsexclude] += "${DPKG_BUILD_TIMEOUT}"
+
 DPKG_PREBUILD_ENV_FILE="${WORKDIR}/dpkg_prebuild.env"
 
 # bitbake variables that should be passed into sbuild env
@@ -94,6 +100,7 @@ dpkg_runbuild() {
     ${@ expand_sbuild_pt_additions(d)}
 
     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)
-- 
2.39.2


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

* Re: [PATCH v2 0/1] dpkg: make sbuild timeout configurable
  2023-11-15  8:41   ` [PATCH v2 0/1] " Cedric Hombourger
  2023-11-15  8:41     ` [PATCH v2 1/1] " Cedric Hombourger
@ 2023-11-29  9:22     ` Uladzimir Bely
  1 sibling, 0 replies; 5+ messages in thread
From: Uladzimir Bely @ 2023-11-29  9:22 UTC (permalink / raw)
  To: Cedric Hombourger, isar-users

On Wed, 2023-11-15 at 09:41 +0100, 'Cedric Hombourger' via isar-users
wrote:
> Some builds (especially those under qemu) can take a very long time
> and fail only because they did not complete within 2.5 hours. Let
> recipes budget some more time by setting DPKG_BUILD_TIMEOUT to a
> larger value (defaults to 150 minutes like sbuild).
> 
> Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
> 
> Changes since v1:
>   - add DPKG_BUILD_TIMEOUT to the user manual
>   - add DPKG_BUILD_TIMEOUT to vardepsexclude for dpkg_runbuild
> 
> Cedric Hombourger (1):
>   dpkg: make sbuild timeout configurable
> 
>  doc/user_manual.md        | 2 ++
>  meta/classes/dpkg.bbclass | 7 +++++++
>  2 files changed, 9 insertions(+)
> 
> -- 
> 2.39.2
> 

Applied to next, thanks.

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

end of thread, other threads:[~2023-11-29  9:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-14 17:39 [PATCH] dpkg: make sbuild timeout configurable Cedric Hombourger
2023-11-14 19:47 ` MOESSBAUER, Felix
2023-11-15  8:41   ` [PATCH v2 0/1] " Cedric Hombourger
2023-11-15  8:41     ` [PATCH v2 1/1] " Cedric Hombourger
2023-11-29  9:22     ` [PATCH v2 0/1] " Uladzimir Bely

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